|
|
|
@ -1802,11 +1802,11 @@ export const template_visitors = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (is_reactive) {
|
|
|
|
if (is_reactive) {
|
|
|
|
context.state.init.push(
|
|
|
|
context.state.after_update.push(
|
|
|
|
b.stmt(b.call('$.snippet_effect', b.thunk(snippet_function), ...args))
|
|
|
|
b.stmt(b.call('$.snippet_effect', b.thunk(snippet_function), ...args))
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
context.state.init.push(b.stmt(b.call(snippet_function, ...args)));
|
|
|
|
context.state.after_update.push(b.stmt(b.call(snippet_function, ...args)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
AnimateDirective(node, { state, visit }) {
|
|
|
|
AnimateDirective(node, { state, visit }) {
|
|
|
|
@ -2604,16 +2604,14 @@ export const template_visitors = {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const getter = b.thunk(
|
|
|
|
const getter = b.thunk(/** @type {import('estree').Expression} */ (visit(node.expression)));
|
|
|
|
/** @type {import('estree').Expression} */ (context.visit(node.expression))
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
const assignment = b.assignment('=', node.expression, b.id('$$value'));
|
|
|
|
const assignment = b.assignment('=', node.expression, b.id('$$value'));
|
|
|
|
const setter = b.arrow(
|
|
|
|
const setter = b.arrow(
|
|
|
|
[b.id('$$value')],
|
|
|
|
[b.id('$$value')],
|
|
|
|
serialize_set_binding(
|
|
|
|
serialize_set_binding(
|
|
|
|
assignment,
|
|
|
|
assignment,
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
() => /** @type {import('estree').Expression} */ (context.visit(assignment)),
|
|
|
|
() => /** @type {import('estree').Expression} */ (visit(assignment)),
|
|
|
|
{
|
|
|
|
{
|
|
|
|
skip_proxy_and_freeze: true
|
|
|
|
skip_proxy_and_freeze: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -2776,9 +2774,7 @@ export const template_visitors = {
|
|
|
|
group_getter = b.thunk(
|
|
|
|
group_getter = b.thunk(
|
|
|
|
b.block([
|
|
|
|
b.block([
|
|
|
|
b.stmt(serialize_attribute_value(value, context)[1]),
|
|
|
|
b.stmt(serialize_attribute_value(value, context)[1]),
|
|
|
|
b.return(
|
|
|
|
b.return(/** @type {import('estree').Expression} */ (visit(node.expression)))
|
|
|
|
/** @type {import('estree').Expression} */ (context.visit(node.expression))
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
])
|
|
|
|
])
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -2987,7 +2983,7 @@ export const template_visitors = {
|
|
|
|
: b.member(b.member(b.id('$$props'), b.id('$$slots')), name, true, true);
|
|
|
|
: b.member(b.member(b.id('$$props'), b.id('$$slots')), name, true, true);
|
|
|
|
|
|
|
|
|
|
|
|
const slot = b.call('$.slot', context.state.node, expression, props_expression, fallback);
|
|
|
|
const slot = b.call('$.slot', context.state.node, expression, props_expression, fallback);
|
|
|
|
context.state.init.push(b.stmt(slot));
|
|
|
|
context.state.after_update.push(b.stmt(slot));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
SvelteHead(node, context) {
|
|
|
|
SvelteHead(node, context) {
|
|
|
|
// TODO attributes?
|
|
|
|
// TODO attributes?
|
|
|
|
|