|
|
|
@ -9,7 +9,6 @@ import { add_const_tags, add_const_tags_context } from './shared/add_const_tags.
|
|
|
|
|
|
|
|
|
|
|
|
/** @extends Wrapper */
|
|
|
|
/** @extends Wrapper */
|
|
|
|
export default class SlotTemplateWrapper extends Wrapper {
|
|
|
|
export default class SlotTemplateWrapper extends Wrapper {
|
|
|
|
|
|
|
|
|
|
|
|
/** @type {import('../../nodes/SlotTemplate.js').default} */
|
|
|
|
/** @type {import('../../nodes/SlotTemplate.js').default} */
|
|
|
|
node;
|
|
|
|
node;
|
|
|
|
|
|
|
|
|
|
|
|
@ -47,11 +46,17 @@ export default class SlotTemplateWrapper extends Wrapper {
|
|
|
|
this.renderer.blocks.push(this.block);
|
|
|
|
this.renderer.blocks.push(this.block);
|
|
|
|
const seen = new Set(lets.map((l) => l.name.name));
|
|
|
|
const seen = new Set(lets.map((l) => l.name.name));
|
|
|
|
this.parent.node.lets.forEach((l) => {
|
|
|
|
this.parent.node.lets.forEach((l) => {
|
|
|
|
if (!seen.has(l.name.name))
|
|
|
|
if (!seen.has(l.name.name)) lets.push(l);
|
|
|
|
lets.push(l);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.parent.set_slot(slot_template_name, get_slot_definition(this.block, scope, lets));
|
|
|
|
this.parent.set_slot(slot_template_name, get_slot_definition(this.block, scope, lets));
|
|
|
|
this.fragment = new FragmentWrapper(renderer, this.block, node.type === 'SlotTemplate' ? node.children : [node], this, strip_whitespace, next_sibling);
|
|
|
|
this.fragment = new FragmentWrapper(
|
|
|
|
|
|
|
|
renderer,
|
|
|
|
|
|
|
|
this.block,
|
|
|
|
|
|
|
|
node.type === 'SlotTemplate' ? node.children : [node],
|
|
|
|
|
|
|
|
this,
|
|
|
|
|
|
|
|
strip_whitespace,
|
|
|
|
|
|
|
|
next_sibling
|
|
|
|
|
|
|
|
);
|
|
|
|
this.block.parent.add_dependencies(this.block.dependencies);
|
|
|
|
this.block.parent.add_dependencies(this.block.dependencies);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
@ -73,7 +78,3 @@ export default class SlotTemplateWrapper extends Wrapper {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|