tutuca 0.9.111 → 0.9.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4727,7 +4727,6 @@ function sizeOf(v) {
4727
4727
 
4728
4728
  class ValParser {
4729
4729
  constructor() {
4730
- this.bindValIt = new BindVal("it");
4731
4730
  this.nullConstVal = new ConstVal(null);
4732
4731
  }
4733
4732
  const(v) {
@@ -6108,7 +6107,7 @@ function parseXOp(attrs, childs, opIdx, px) {
6108
6107
  node = px.addNodeIf(RenderNode, parseXOpVal(name, value, px, vp.parseComponent), as);
6109
6108
  break;
6110
6109
  case "render-it":
6111
- node = px.addNodeIf(RenderItNode, vp.bindValIt, as);
6110
+ node = px.addNode(RenderItNode, as);
6112
6111
  break;
6113
6112
  case "render-each":
6114
6113
  node = parseRenderEach(px, value, as, attrs);
@@ -6201,7 +6200,7 @@ function parseRenderEach(px, value, as, attrs) {
6201
6200
  const seqVal = parseXOpVal("render-each", value, px, vp.parseSequence);
6202
6201
  if (seqVal === null)
6203
6202
  return null;
6204
- const renderIt = px.addNodeIf(RenderItNode, vp.bindValIt, as);
6203
+ const renderIt = px.addNode(RenderItNode, as);
6205
6204
  const attrParser = getAttrParser(px);
6206
6205
  const eachAttr = attrParser.eachAttr = attrParser.pushWrapper("each", value, seqVal);
6207
6206
  const when = attrs.getNamedItem("@when") ?? attrs.getNamedItem("when");
@@ -6288,6 +6287,12 @@ class ParseContext {
6288
6287
  }
6289
6288
  return null;
6290
6289
  }
6290
+ addNode(Class, extra) {
6291
+ const nodeId = this.nodes.length;
6292
+ const node = new Class(nodeId, null, extra);
6293
+ this.nodes.push(node);
6294
+ return node;
6295
+ }
6291
6296
  registerEvents() {
6292
6297
  const id = this.events.length;
6293
6298
  const events = new NodeEvents(id);
@@ -15219,7 +15224,7 @@ class Stack2 {
15219
15224
  return new Stack2(comps, it, binds, newDynBinds, views, viewsId, ctx);
15220
15225
  }
15221
15226
  static root(comps, it, ctx) {
15222
- const binds = [new BindFrame(it, { it }, true), null];
15227
+ const binds = [new BindFrame(it, {}, true), null];
15223
15228
  const dynBinds = [new ObjectFrame({}), null];
15224
15229
  const views = ["main", null];
15225
15230
  return new Stack2(comps, it, binds, dynBinds, views, "", ctx)._pushProvides();
@@ -18084,6 +18089,7 @@ function extractGlobals(argv) {
18084
18089
  function dispatchKnownCommands() {
18085
18090
  return [...Object.keys(COMMANDS), ...Object.keys(NO_MODULE_COMMANDS)];
18086
18091
  }
18092
+ var DEV_BUILD_COMMANDS = new Set(["test", "storybook"]);
18087
18093
  async function main() {
18088
18094
  const { opts, rest } = extractGlobals(process.argv.slice(2));
18089
18095
  if (rest.length === 0) {
@@ -18091,6 +18097,8 @@ async function main() {
18091
18097
  return;
18092
18098
  }
18093
18099
  const command = rest[0];
18100
+ if (DEV_BUILD_COMMANDS.has(command))
18101
+ installDevBuildResolveHook();
18094
18102
  if (NO_MODULE_COMMANDS[command]) {
18095
18103
  const commandArgs2 = rest.slice(1);
18096
18104
  const args = opts.help ? [...commandArgs2, "--help"] : commandArgs2;
@@ -18124,8 +18132,6 @@ async function main() {
18124
18132
  opts.module = rest[1];
18125
18133
  commandArgs = rest.slice(2);
18126
18134
  }
18127
- if (command === "test")
18128
- installDevBuildResolveHook();
18129
18135
  try {
18130
18136
  await runCommand(cmd, commandArgs, opts);
18131
18137
  } catch (e) {
@@ -637,7 +637,6 @@ var PREDICATES = {
637
637
 
638
638
  class ValParser {
639
639
  constructor() {
640
- this.bindValIt = new BindVal("it");
641
640
  this.nullConstVal = new ConstVal(null);
642
641
  }
643
642
  const(v) {
@@ -2183,7 +2182,7 @@ function parseXOp(attrs, childs, opIdx, px) {
2183
2182
  node = px.addNodeIf(RenderNode, parseXOpVal(name, value, px, vp.parseComponent), as);
2184
2183
  break;
2185
2184
  case "render-it":
2186
- node = px.addNodeIf(RenderItNode, vp.bindValIt, as);
2185
+ node = px.addNode(RenderItNode, as);
2187
2186
  break;
2188
2187
  case "render-each":
2189
2188
  node = parseRenderEach(px, value, as, attrs);
@@ -2366,7 +2365,7 @@ function parseRenderEach(px, value, as, attrs) {
2366
2365
  const seqVal = parseXOpVal("render-each", value, px, vp.parseSequence);
2367
2366
  if (seqVal === null)
2368
2367
  return null;
2369
- const renderIt = px.addNodeIf(RenderItNode, vp.bindValIt, as);
2368
+ const renderIt = px.addNode(RenderItNode, as);
2370
2369
  const attrParser = getAttrParser(px);
2371
2370
  const eachAttr = attrParser.eachAttr = attrParser.pushWrapper("each", value, seqVal);
2372
2371
  const when = attrs.getNamedItem("@when") ?? attrs.getNamedItem("when");
@@ -2566,6 +2565,12 @@ class ParseContext {
2566
2565
  }
2567
2566
  return null;
2568
2567
  }
2568
+ addNode(Class, extra) {
2569
+ const nodeId = this.nodes.length;
2570
+ const node = new Class(nodeId, null, extra);
2571
+ this.nodes.push(node);
2572
+ return node;
2573
+ }
2569
2574
  registerEvents() {
2570
2575
  const id = this.events.length;
2571
2576
  const events = new NodeEvents(id);
@@ -6297,7 +6302,7 @@ class Stack {
6297
6302
  return new Stack(comps, it, binds, newDynBinds, views, viewsId, ctx);
6298
6303
  }
6299
6304
  static root(comps, it, ctx) {
6300
- const binds = [new BindFrame(it, { it }, true), null];
6305
+ const binds = [new BindFrame(it, {}, true), null];
6301
6306
  const dynBinds = [new ObjectFrame({}), null];
6302
6307
  const views = ["main", null];
6303
6308
  return new Stack(comps, it, binds, dynBinds, views, "", ctx)._pushProvides();
@@ -8289,7 +8289,6 @@ var PREDICATES = {
8289
8289
 
8290
8290
  class ValParser {
8291
8291
  constructor() {
8292
- this.bindValIt = new BindVal("it");
8293
8292
  this.nullConstVal = new ConstVal(null);
8294
8293
  }
8295
8294
  const(v) {
@@ -9832,7 +9831,7 @@ function parseXOp(attrs, childs, opIdx, px) {
9832
9831
  node = px.addNodeIf(RenderNode, parseXOpVal(name, value, px, vp.parseComponent), as);
9833
9832
  break;
9834
9833
  case "render-it":
9835
- node = px.addNodeIf(RenderItNode, vp.bindValIt, as);
9834
+ node = px.addNode(RenderItNode, as);
9836
9835
  break;
9837
9836
  case "render-each":
9838
9837
  node = parseRenderEach(px, value, as, attrs);
@@ -10015,7 +10014,7 @@ function parseRenderEach(px, value, as, attrs) {
10015
10014
  const seqVal = parseXOpVal("render-each", value, px, vp.parseSequence);
10016
10015
  if (seqVal === null)
10017
10016
  return null;
10018
- const renderIt = px.addNodeIf(RenderItNode, vp.bindValIt, as);
10017
+ const renderIt = px.addNode(RenderItNode, as);
10019
10018
  const attrParser = getAttrParser(px);
10020
10019
  const eachAttr = attrParser.eachAttr = attrParser.pushWrapper("each", value, seqVal);
10021
10020
  const when = attrs.getNamedItem("@when") ?? attrs.getNamedItem("when");
@@ -10215,6 +10214,12 @@ class ParseContext {
10215
10214
  }
10216
10215
  return null;
10217
10216
  }
10217
+ addNode(Class, extra) {
10218
+ const nodeId = this.nodes.length;
10219
+ const node = new Class(nodeId, null, extra);
10220
+ this.nodes.push(node);
10221
+ return node;
10222
+ }
10218
10223
  registerEvents() {
10219
10224
  const id = this.events.length;
10220
10225
  const events2 = new NodeEvents(id);
@@ -13946,7 +13951,7 @@ class Stack2 {
13946
13951
  return new Stack2(comps, it, binds, newDynBinds, views, viewsId, ctx);
13947
13952
  }
13948
13953
  static root(comps, it, ctx) {
13949
- const binds = [new BindFrame(it, { it }, true), null];
13954
+ const binds = [new BindFrame(it, {}, true), null];
13950
13955
  const dynBinds = [new ObjectFrame({}), null];
13951
13956
  const views = ["main", null];
13952
13957
  return new Stack2(comps, it, binds, dynBinds, views, "", ctx)._pushProvides();