export function render(_ctx) {
const _component_Foo = _resolveComponent("Foo")
const n0 = _createComponentWithFallback(_component_Foo, {
- id: () => ("foo"),
+ id: () => ("foo"),
class: () => ("bar")
}, null, true)
return n0
export function render(_ctx) {
const _component_Foo = _resolveComponent("Foo")
const n0 = _createComponentWithFallback(_component_Foo, {
- id: () => ("foo"),
+ id: () => ("foo"),
$: [
() => (_ctx.obj)
]
export function render(_ctx) {
const _component_Foo = _resolveComponent("Foo")
const n0 = _createComponentWithFallback(_component_Foo, { $: [
- () => (_ctx.obj),
+ () => (_ctx.obj),
{ id: () => ("foo") }
] }, null, true)
return n0
export function render(_ctx) {
const _component_Foo = _resolveComponent("Foo")
const n0 = _createComponentWithFallback(_component_Foo, {
- id: () => ("foo"),
+ id: () => ("foo"),
$: [
- () => (_ctx.obj),
+ () => (_ctx.obj),
{ class: () => ("bar") }
]
}, null, true)
export function render(_ctx) {
const _component_Foo = _resolveComponent("Foo")
const n0 = _createComponentWithFallback(_component_Foo, { $: [
- () => ({ [_toHandlerKey(_ctx.foo-_ctx.bar)]: () => _ctx.bar }),
+ () => ({ [_toHandlerKey(_ctx.foo-_ctx.bar)]: () => _ctx.bar }),
() => ({ [_toHandlerKey(_ctx.baz)]: () => _ctx.qux })
] }, null, true)
return n0
export function render(_ctx) {
const _component_Foo = _resolveComponent("Foo")
const n0 = _createComponentWithFallback(_component_Foo, { $: [
- () => ({ [_ctx.foo-_ctx.bar]: _ctx.bar }),
+ () => ({ [_ctx.foo-_ctx.bar]: _ctx.bar }),
() => ({ [_ctx.baz]: _ctx.qux })
] }, null, true)
return n0
export function render(_ctx) {
const n0 = _createSlot("default", {
- foo: () => ("bar"),
- baz: () => (_ctx.qux),
+ foo: () => ("bar"),
+ baz: () => (_ctx.qux),
fooBar: () => (_ctx.foo-_ctx.bar)
})
return n0
export function render(_ctx) {
const n0 = _createSlot("foo", {
- foo: () => ("bar"),
+ foo: () => ("bar"),
baz: () => (_ctx.qux)
})
return n0
export function render(_ctx) {
const n0 = _createSlot("foo", {
- foo: () => ("bar"),
+ foo: () => ("bar"),
$: [
- () => (_ctx.obj),
+ () => (_ctx.obj),
{ baz: () => (_ctx.qux) }
]
})
export function render(_ctx) {
const n0 = _createSlot("default", {
- onClick: () => _ctx.foo,
+ onClick: () => _ctx.foo,
$: [
- () => (_toHandlers(_ctx.bar)),
+ () => (_toHandlers(_ctx.bar)),
{ baz: () => (_ctx.qux) }
]
})
const n0 = _createComponentWithFallback(_component_Comp, {
foo: () => (_ctx.foo),
"onUpdate:foo": () => _value => (_ctx.foo = _value),
- fooModifiers: () => ({ trim: true }),
+ fooModifiers: () => ({ trim: true }),
bar: () => (_ctx.bar),
"onUpdate:bar": () => _value => (_ctx.bar = _value),
barModifiers: () => ({ number: true })
const n0 = _createComponentWithFallback(_component_Comp, { $: [
() => ({ [_ctx.foo]: _ctx.foo,
["onUpdate:" + _ctx.foo]: () => _value => (_ctx.foo = _value),
- [_ctx.foo + "Modifiers"]: () => ({ trim: true }) }),
+ [_ctx.foo + "Modifiers"]: () => ({ trim: true }) }),
() => ({ [_ctx.bar]: _ctx.bar,
["onUpdate:" + _ctx.bar]: () => _value => (_ctx.bar = _value),
[_ctx.bar + "Modifiers"]: () => ({ number: true }) })
const _on_update_model = () => {}
const _on_update_model1 = () => {}
const n0 = _createComponentWithFallback(_component_Foo, {
- "onUpdate:model": () => _on_update_model,
+ "onUpdate:model": () => _on_update_model,
"onUpdate-model": () => _on_update_model1
}, null, true)
return n0
export function render(_ctx) {
const n0 = t0()
_on(n0, "click", _withModifiers(e => _ctx.test(e), ["stop","prevent"]), {
- capture: true,
+ capture: true,
once: true
})
return n0
const n2 = _createComponentWithFallback(_component_Comp, null, {
$: [
() => ({
- name: _ctx.name,
+ name: _ctx.name,
fn: () => {
const n0 = t0()
return n0
const n2 = _createComponentWithFallback(_component_Comp, null, {
$: [
() => (_createForSlots(_ctx.list, (item) => ({
- name: item,
+ name: item,
fn: (_slotProps0) => {
const n0 = t0()
_renderEffect(() => _setText(n0, _toDisplayString(_slotProps0["bar"])))
const n2 = _createComponentWithFallback(_component_Comp, null, {
$: [
() => (_createForSlots(_ctx.list, (_, __, index) => ({
- name: index,
+ name: index,
fn: () => {
const n0 = t0()
return n0
$: [
() => (_ctx.condition
? {
- name: "condition",
+ name: "condition",
fn: () => {
const n0 = t0()
return n0
}
: _ctx.anotherCondition
? {
- name: "condition",
+ name: "condition",
fn: (_slotProps0) => {
const n2 = t1()
return n2
}
}
: {
- name: "condition",
+ name: "condition",
fn: () => {
const n4 = t2()
return n4
"one": () => {
const n0 = t0()
return n0
- },
+ },
"default": () => {
const n2 = t1()
const n3 = t2()
const n1 = _createComponentWithFallback(_component_Comp, null, {
$: [
() => ({
- name: _ctx.named,
+ name: _ctx.named,
fn: (_slotProps0) => {
const n0 = t0()
_renderEffect(() => _setText(n0, _toDisplayString(_slotProps0["foo"] + _ctx.bar)))
"header": () => {
const n0 = t0()
return n0
- },
+ },
"default": () => {
const n2 = t1()
const n3 = t2()
"header": () => {
const n0 = t0()
return n0
- },
+ },
"default": () => {
const n3 = t1()
return n3
"header": () => {
const n0 = t0()
return n0
- },
+ },
"footer": () => {
const n3 = t1()
return n3
expect(code).toMatchSnapshot()
expect(code).contains(`{
- id: () => ("foo"),
+ id: () => ("foo"),
class: () => ("bar")
}`)
)
expect(code).toMatchSnapshot()
expect(code).contains(`{
- id: () => ("foo"),
+ id: () => ("foo"),
$: [
() => (_ctx.obj)
]
)
expect(code).toMatchSnapshot()
expect(code).contains(`[
- () => (_ctx.obj),
+ () => (_ctx.obj),
{ id: () => ("foo") }
]`)
expect(ir.block.dynamic.children[0].operation).toMatchObject({
)
expect(code).toMatchSnapshot()
expect(code).contains(`{
- id: () => ("foo"),
+ id: () => ("foo"),
$: [
- () => (_ctx.obj),
+ () => (_ctx.obj),
{ class: () => ("bar") }
]
}`)
])
expect(code).contains(
`_on(n0, "click", _withModifiers(e => _ctx.test(e), ["stop","prevent"]), {
- capture: true,
+ capture: true,
once: true
})`,
)
export const DELIMITERS_ARRAY_NEWLINE: CodeFragmentDelimiters = [
['[', INDENT_START, NEWLINE],
[INDENT_END, NEWLINE, ']'],
- [', ', NEWLINE],
+ [',', NEWLINE],
]
export const DELIMITERS_OBJECT: CodeFragmentDelimiters = ['{ ', ' }', ', ']
export const DELIMITERS_OBJECT_NEWLINE: CodeFragmentDelimiters = [
['{', INDENT_START, NEWLINE],
[INDENT_END, NEWLINE, '}'],
- [', ', NEWLINE],
+ [',', NEWLINE],
]
export function genCall(