[IMP] app: add fast path for when component has no prop

This commit is contained in:
Géry Debongnie
2022-06-09 14:55:57 +02:00
committed by Sam Degueldre
parent d046913a01
commit 55ac43c1db
26 changed files with 548 additions and 541 deletions
@@ -4,7 +4,7 @@ exports[`slots can define a default content 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`Dialog\`, true, false, false);
const comp1 = app.createComponent(\`Dialog\`, true, false, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -39,7 +39,7 @@ exports[`slots can define and call slots 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block2 = createBlock(\`<span>header</span>\`);
@@ -82,7 +82,7 @@ exports[`slots can define and call slots with bound params 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, bind, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(\`abc\`);
@@ -114,7 +114,7 @@ exports[`slots can define and call slots with params 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block2 = createBlock(\`<span>header</span>\`);
@@ -159,8 +159,8 @@ exports[`slots can render node with t-ref and Component in same slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp2 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, true);
const comp2 = app.createComponent(\`Child\`, true, true, false, true);
let block2 = createBlock(\`<div block-ref=\\"0\\"/>\`);
@@ -206,7 +206,7 @@ exports[`slots can use component in default-content of t-slot 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, true);
return function template(ctx, node, key = \\"\\") {
return comp1({}, key + \`__1\`, node, ctx, null);
@@ -219,7 +219,7 @@ exports[`slots can use component in default-content of t-slot 2`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { callSlot } = helpers;
const comp1 = app.createComponent(\`GrandChild\`, true, false, false);
const comp1 = app.createComponent(\`GrandChild\`, true, false, false, true);
function defaultContent1(ctx, node, key = \\"\\") {
return comp1({}, key + \`__1\`, node, ctx, null);
@@ -246,7 +246,7 @@ exports[`slots can use t-call in default-content of t-slot 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, true);
return function template(ctx, node, key = \\"\\") {
return comp1({}, key + \`__1\`, node, ctx, null);
@@ -287,7 +287,7 @@ exports[`slots content is the default slot (variation) 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<span>sts rocks</span>\`);
@@ -318,7 +318,7 @@ exports[`slots content is the default slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block2 = createBlock(\`<span>sts rocks</span>\`);
@@ -354,7 +354,7 @@ exports[`slots default content is not rendered if named slot is provided 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -394,7 +394,7 @@ exports[`slots default content is not rendered if slot is provided 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -433,7 +433,7 @@ exports[`slots default slot next to named slot, with default content 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -478,7 +478,7 @@ exports[`slots default slot with params with - in it 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(ctx['slotScope']['some-value']);
@@ -507,7 +507,7 @@ exports[`slots default slot with slot scope: shorthand syntax 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
let b2,b3;
@@ -545,7 +545,7 @@ exports[`slots default slot work with text nodes (variation) 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(\`sts rocks\`);
@@ -574,7 +574,7 @@ exports[`slots default slot work with text nodes 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -609,7 +609,7 @@ exports[`slots dynamic t-slot call 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Toggler\`, true, true, false);
const comp1 = app.createComponent(\`Toggler\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block3 = createBlock(\`<p>slot1</p>\`);
@@ -656,7 +656,7 @@ exports[`slots dynamic t-slot call with default 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Toggler\`, true, true, false);
const comp1 = app.createComponent(\`Toggler\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block3 = createBlock(\`<p>slot1</p>\`);
@@ -706,7 +706,7 @@ exports[`slots fun: two calls to the same slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(\`some text\`);
@@ -736,7 +736,7 @@ exports[`slots missing slots are ignored 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`Dialog\`, true, false, false);
const comp1 = app.createComponent(\`Dialog\`, true, false, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -767,7 +767,7 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`P\`, true, false, false);
const comp1 = app.createComponent(\`P\`, true, false, false, true);
return function template(ctx, node, key = \\"\\") {
return comp1({}, key + \`__1\`, node, ctx, null);
@@ -779,7 +779,7 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`A\`, true, false, false);
const comp1 = app.createComponent(\`A\`, true, false, false, false);
let block2 = createBlock(\`<button block-handler-0=\\"click\\">inc</button>\`);
@@ -798,7 +798,7 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const callTemplate_1 = app.getTemplate(\`__template__1002\`);
const comp1 = app.createComponent(\`B\`, true, true, false);
const comp1 = app.createComponent(\`B\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
const b2 = text(\`[A]\`);
@@ -852,7 +852,7 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`C\`, true, false, false);
const comp1 = app.createComponent(\`C\`, true, false, false, false);
return function template(ctx, node, key = \\"\\") {
const b2 = text(\`[B]\`);
@@ -881,7 +881,7 @@ exports[`slots multiple roots are allowed in a default slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block3 = createBlock(\`<span>sts</span>\`);
@@ -920,7 +920,7 @@ exports[`slots multiple roots are allowed in a named slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block3 = createBlock(\`<span>sts</span>\`);
@@ -960,9 +960,9 @@ exports[`slots multiple slots containing components 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`C\`, true, false, false);
const comp2 = app.createComponent(\`C\`, true, false, false);
const comp3 = app.createComponent(\`B\`, true, true, false);
const comp1 = app.createComponent(\`C\`, true, false, false, false);
const comp2 = app.createComponent(\`C\`, true, false, false, false);
const comp3 = app.createComponent(\`B\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return comp1({val: 1}, key + \`__1\`, node, ctx, null);
@@ -1014,8 +1014,8 @@ exports[`slots named slot inside slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp2 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
const comp2 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block2 = createBlock(\`<p>A<block-text-0/></p>\`);
@@ -1065,8 +1065,8 @@ exports[`slots named slot inside slot, part 3 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp2 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
const comp2 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block2 = createBlock(\`<p>A<block-text-0/></p>\`);
@@ -1115,7 +1115,7 @@ exports[`slots named slots can define a default content 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`Dialog\`, true, false, false);
const comp1 = app.createComponent(\`Dialog\`, true, false, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -1150,8 +1150,8 @@ exports[`slots named slots inside slot, again 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp2 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
const comp2 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block2 = createBlock(\`<p>A<block-text-0/></p>\`);
@@ -1210,9 +1210,9 @@ exports[`slots nested slots in same template 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child3\`, true, false, false);
const comp2 = app.createComponent(\`Child2\`, true, true, false);
const comp3 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child3\`, true, false, false, true);
const comp2 = app.createComponent(\`Child2\`, true, true, false, true);
const comp3 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<span id=\\"parent\\"><block-child-0/></span>\`);
@@ -1279,8 +1279,8 @@ exports[`slots nested slots: evaluation context and parented relationship 1`] =
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Slot\`, true, false, false);
const comp2 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Slot\`, true, false, false, false);
const comp2 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return comp1({val: ctx['state'].val}, key + \`__1\`, node, ctx, null);
@@ -1297,7 +1297,7 @@ exports[`slots nested slots: evaluation context and parented relationship 2`] =
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { callSlot, markRaw } = helpers;
const comp1 = app.createComponent(\`GrandChild\`, true, true, false);
const comp1 = app.createComponent(\`GrandChild\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return callSlot(ctx, node, key, 'default', false, {});
@@ -1342,7 +1342,7 @@ exports[`slots no named slot content => just no children 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`Dialog\`, true, false, false);
const comp1 = app.createComponent(\`Dialog\`, true, false, false, true);
return function template(ctx, node, key = \\"\\") {
return comp1({}, key + \`__1\`, node, ctx, null);
@@ -1370,7 +1370,7 @@ exports[`slots simple default slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(\`some text\`);
@@ -1402,7 +1402,7 @@ exports[`slots simple default slot with params 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
let b2,b3;
@@ -1440,7 +1440,7 @@ exports[`slots simple default slot with params and bound function 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(ctx['slotScope'].fn());
@@ -1469,7 +1469,7 @@ exports[`slots simple default slot, variation 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(\`some text\`);
@@ -1498,7 +1498,7 @@ exports[`slots simple dynamic slot with slot scope 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
let b2,b3;
@@ -1538,7 +1538,7 @@ exports[`slots simple named and empty slot -- 2 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
return function template(ctx, node, key = \\"\\") {
const ctx1 = capture(ctx);
@@ -1571,7 +1571,7 @@ exports[`slots simple named and empty slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(\`some text\`);
@@ -1605,7 +1605,7 @@ exports[`slots simple slot with slot scope 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
let b2,b3;
@@ -1645,7 +1645,7 @@ exports[`slots slot and (inline) t-call 1`] = `
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const callTemplate_1 = app.getTemplate(\`__template__999\`);
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -1695,7 +1695,7 @@ exports[`slots slot and t-call 1`] = `
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const callTemplate_1 = app.getTemplate(\`__template__999\`);
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -1744,7 +1744,7 @@ exports[`slots slot and t-esc 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -1779,8 +1779,8 @@ exports[`slots slot are properly rendered if inner props are changed 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`SomeComponent\`, true, false, false);
const comp2 = app.createComponent(\`GenericComponent\`, true, true, false);
const comp1 = app.createComponent(\`SomeComponent\`, true, false, false, false);
const comp2 = app.createComponent(\`GenericComponent\`, true, true, false, true);
let block1 = createBlock(\`<div><button block-handler-0=\\"click\\">Inc[<block-text-1/>]</button><block-child-0/></div>\`);
@@ -1831,8 +1831,8 @@ exports[`slots slot content has different key from other content -- dynamic slot
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp2 = app.createComponent(\`SlotDisplay\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, false);
const comp2 = app.createComponent(\`SlotDisplay\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return comp1({parent: 'Parent'}, key + \`__1\`, node, ctx, null);
@@ -1849,7 +1849,7 @@ exports[`slots slot content has different key from other content -- dynamic slot
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { callSlot } = helpers;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, false);
return function template(ctx, node, key = \\"\\") {
const b2 = comp1({parent: 'SlotDisplay'}, key + \`__1\`, node, ctx, null);
@@ -1879,8 +1879,8 @@ exports[`slots slot content has different key from other content -- static slot
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp2 = app.createComponent(\`SlotDisplay\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, false);
const comp2 = app.createComponent(\`SlotDisplay\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return comp1({parent: 'Parent'}, key + \`__1\`, node, ctx, null);
@@ -1897,7 +1897,7 @@ exports[`slots slot content has different key from other content -- static slot
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { callSlot } = helpers;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, false);
return function template(ctx, node, key = \\"\\") {
const b2 = comp1({parent: 'SlotDisplay'}, key + \`__1\`, node, ctx, null);
@@ -1926,7 +1926,7 @@ exports[`slots slot content is bound to caller (variation) 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, isBoundary, withDefault, setContextValue, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<button block-handler-0=\\"click\\">some text</button>\`);
@@ -1965,7 +1965,7 @@ exports[`slots slot content is bound to caller 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<button block-handler-0=\\"click\\">some text</button>\`);
@@ -2000,8 +2000,8 @@ exports[`slots slot preserves properly parented relationship 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`GrandChild\`, true, false, false);
const comp2 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`GrandChild\`, true, false, false, true);
const comp2 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2045,7 +2045,7 @@ exports[`slots slot preserves properly parented relationship, even through t-cal
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const callTemplate_1 = app.getTemplate(\`sub\`);
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2065,7 +2065,7 @@ exports[`slots slot preserves properly parented relationship, even through t-cal
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`GrandChild\`, true, false, false);
const comp1 = app.createComponent(\`GrandChild\`, true, false, false, true);
return function template(ctx, node, key = \\"\\") {
return comp1({}, key + \`__1\`, node, ctx, null);
@@ -2101,7 +2101,7 @@ exports[`slots slot with slot scope and t-props 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
let block2 = createBlock(\`<p><block-text-0/></p>\`);
let block3 = createBlock(\`<p><block-text-0/></p>\`);
@@ -2138,7 +2138,7 @@ exports[`slots slots and wrapper components 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Link\`, true, true, false);
const comp1 = app.createComponent(\`Link\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
return text(\`hey\`);
@@ -2169,7 +2169,7 @@ exports[`slots slots are properly bound to correct component 1`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, true);
return function template(ctx, node, key = \\"\\") {
return comp1({}, key + \`__1\`, node, ctx, null);
@@ -2205,7 +2205,7 @@ exports[`slots slots are rendered with proper context 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><span class=\\"counter\\"><block-text-0/></span><block-child-0/></div>\`);
let block2 = createBlock(\`<button block-handler-0=\\"click\\">do something</button>\`);
@@ -2244,7 +2244,7 @@ exports[`slots slots are rendered with proper context, part 2 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, capture, markRaw, withKey } = helpers;
const comp1 = app.createComponent(\`Link\`, true, true, false);
const comp1 = app.createComponent(\`Link\`, true, true, false, false);
let block1 = createBlock(\`<div><u><block-child-0/></u></div>\`);
let block3 = createBlock(\`<li><block-child-0/></li>\`);
@@ -2292,7 +2292,7 @@ exports[`slots slots are rendered with proper context, part 3 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, isBoundary, withDefault, setContextValue, capture, markRaw, withKey } = helpers;
const comp1 = app.createComponent(\`Link\`, true, true, false);
const comp1 = app.createComponent(\`Link\`, true, true, false, false);
let block1 = createBlock(\`<div><u><block-child-0/></u></div>\`);
let block3 = createBlock(\`<li><block-child-0/></li>\`);
@@ -2341,7 +2341,7 @@ exports[`slots slots are rendered with proper context, part 4 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { isBoundary, withDefault, setContextValue, capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Link\`, true, true, false);
const comp1 = app.createComponent(\`Link\`, true, true, false, false);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2381,7 +2381,7 @@ exports[`slots slots in slots, with vars 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { isBoundary, withDefault, setContextValue, capture, markRaw } = helpers;
const comp1 = app.createComponent(\`A\`, true, true, false);
const comp1 = app.createComponent(\`A\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block2 = createBlock(\`<p>hey<block-text-0/></p>\`);
@@ -2407,7 +2407,7 @@ exports[`slots slots in slots, with vars 2`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { callSlot, markRaw } = helpers;
const comp1 = app.createComponent(\`B\`, true, true, false);
const comp1 = app.createComponent(\`B\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2442,7 +2442,7 @@ exports[`slots slots in t-foreach and re-rendering 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, capture, markRaw, withKey } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2487,7 +2487,7 @@ exports[`slots slots in t-foreach in t-foreach 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, capture, markRaw, withKey } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
let block4 = createBlock(\`<div><block-text-0/></div>\`);
@@ -2546,7 +2546,7 @@ exports[`slots slots in t-foreach with t-set and re-rendering 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, isBoundary, withDefault, setContextValue, capture, markRaw, withKey } = helpers;
const comp1 = app.createComponent(\`Child\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2594,7 +2594,7 @@ exports[`slots t-debug on a t-set-slot (defining a slot) 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2631,7 +2631,7 @@ exports[`slots t-set t-value in a slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, isBoundary, withDefault, setContextValue, markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2671,7 +2671,7 @@ exports[`slots t-slot in recursive templates 1`] = `
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, prepareList, isBoundary, withDefault, setContextValue, withKey, markRaw } = helpers;
const callTemplate_1 = app.getTemplate(\`_test_recursive_template\`);
const comp1 = app.createComponent(\`Wrapper\`, true, true, false);
const comp1 = app.createComponent(\`Wrapper\`, true, true, false, true);
function slot1(ctx, node, key = \\"\\") {
ctx = Object.create(ctx);
@@ -2731,8 +2731,8 @@ exports[`slots t-slot nested within another slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child3\`, true, false, false);
const comp2 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Child3\`, true, false, false, true);
const comp2 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<span id=\\"c1\\"><block-child-0/></span>\`);
@@ -2752,8 +2752,8 @@ exports[`slots t-slot nested within another slot 2`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { callSlot, markRaw } = helpers;
const comp1 = app.createComponent(\`Portal\`, true, true, false);
const comp2 = app.createComponent(\`Modal\`, true, true, false);
const comp1 = app.createComponent(\`Portal\`, true, true, false, true);
const comp2 = app.createComponent(\`Modal\`, true, true, false, true);
let block1 = createBlock(\`<span id=\\"c2\\"><block-child-0/></span>\`);
@@ -2820,7 +2820,7 @@ exports[`slots t-slot scope context 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Dialog\`, true, true, false);
const comp1 = app.createComponent(\`Dialog\`, true, true, false, true);
let block1 = createBlock(\`<button>The Button</button>\`);
@@ -2839,7 +2839,7 @@ exports[`slots t-slot scope context 2`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { callSlot, markRaw } = helpers;
const comp1 = app.createComponent(\`Wrapper\`, true, true, false);
const comp1 = app.createComponent(\`Wrapper\`, true, true, false, true);
let block1 = createBlock(\`<div block-handler-0=\\"click\\"><block-child-0/></div>\`);
@@ -2873,7 +2873,7 @@ exports[`slots t-slot within dynamic t-call 1`] = `
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { capture, markRaw } = helpers;
const call = app.callTemplate.bind(app);
const comp1 = app.createComponent(\`Slotted\`, true, true, false);
const comp1 = app.createComponent(\`Slotted\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -2909,7 +2909,7 @@ exports[`slots t-slot within dynamic t-call 3`] = `
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, true);
let block1 = createBlock(\`<div class=\\"slot\\"><block-child-0/></div>\`);
@@ -2938,8 +2938,8 @@ exports[`slots template can just return a slot 1`] = `
) {
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { markRaw } = helpers;
const comp1 = app.createComponent(\`Child\`, true, false, false);
const comp2 = app.createComponent(\`SlotComponent\`, true, true, false);
const comp1 = app.createComponent(\`Child\`, true, false, false, false);
const comp2 = app.createComponent(\`SlotComponent\`, true, true, false, true);
let block1 = createBlock(\`<div><block-child-0/></div>\`);