solid-js 1.6.8 → 1.6.10

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.
package/dist/solid.js CHANGED
@@ -1,18 +1,18 @@
1
1
  let taskIdCounter = 1,
2
- isCallbackScheduled = false,
3
- isPerformingWork = false,
4
- taskQueue = [],
5
- currentTask = null,
6
- shouldYieldToHost = null,
7
- yieldInterval = 5,
8
- deadline = 0,
9
- maxYieldInterval = 300,
10
- scheduleCallback = null,
11
- scheduledCallback = null;
2
+ isCallbackScheduled = false,
3
+ isPerformingWork = false,
4
+ taskQueue = [],
5
+ currentTask = null,
6
+ shouldYieldToHost = null,
7
+ yieldInterval = 5,
8
+ deadline = 0,
9
+ maxYieldInterval = 300,
10
+ scheduleCallback = null,
11
+ scheduledCallback = null;
12
12
  const maxSigned31BitInt = 1073741823;
13
13
  function setupScheduler() {
14
14
  const channel = new MessageChannel(),
15
- port = channel.port2;
15
+ port = channel.port2;
16
16
  scheduleCallback = () => port.postMessage(null);
17
17
  channel.port1.onmessage = () => {
18
18
  if (scheduledCallback !== null) {
@@ -63,7 +63,7 @@ function enqueue(taskQueue, task) {
63
63
  function requestCallback(fn, options) {
64
64
  if (!scheduleCallback) setupScheduler();
65
65
  let startTime = performance.now(),
66
- timeout = maxSigned31BitInt;
66
+ timeout = maxSigned31BitInt;
67
67
  if (options && options.timeout) timeout = options.timeout;
68
68
  const newTask = {
69
69
  id: taskIdCounter++,
@@ -119,7 +119,8 @@ function setHydrateContext(context) {
119
119
  sharedConfig.context = context;
120
120
  }
121
121
  function nextHydrateContext() {
122
- return { ...sharedConfig.context,
122
+ return {
123
+ ...sharedConfig.context,
123
124
  id: `${sharedConfig.context.id}${sharedConfig.context.count++}-`,
124
125
  count: 0
125
126
  };
@@ -154,15 +155,15 @@ let ExecCount = 0;
154
155
  const [transPending, setTransPending] = /*@__PURE__*/createSignal(false);
155
156
  function createRoot(fn, detachedOwner) {
156
157
  const listener = Listener,
157
- owner = Owner,
158
- unowned = fn.length === 0,
159
- root = unowned ? UNOWNED : {
160
- owned: null,
161
- cleanups: null,
162
- context: null,
163
- owner: detachedOwner || owner
164
- },
165
- updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
158
+ owner = Owner,
159
+ unowned = fn.length === 0,
160
+ root = unowned ? UNOWNED : {
161
+ owned: null,
162
+ cleanups: null,
163
+ context: null,
164
+ owner: detachedOwner || owner
165
+ },
166
+ updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
166
167
  Owner = root;
167
168
  Listener = null;
168
169
  try {
@@ -199,7 +200,7 @@ function createRenderEffect(fn, value, options) {
199
200
  function createEffect(fn, value, options) {
200
201
  runEffects = runUserEffects;
201
202
  const c = createComputation(fn, value, false, STALE),
202
- s = SuspenseContext && lookup(Owner, SuspenseContext.id);
203
+ s = SuspenseContext && lookup(Owner, SuspenseContext.id);
203
204
  if (s) c.suspense = s;
204
205
  c.user = true;
205
206
  Effects ? Effects.push(c) : updateComputation(c);
@@ -207,10 +208,10 @@ function createEffect(fn, value, options) {
207
208
  function createReaction(onInvalidate, options) {
208
209
  let fn;
209
210
  const c = createComputation(() => {
210
- fn ? fn() : untrack(onInvalidate);
211
- fn = undefined;
212
- }, undefined, false, 0),
213
- s = SuspenseContext && lookup(Owner, SuspenseContext.id);
211
+ fn ? fn() : untrack(onInvalidate);
212
+ fn = undefined;
213
+ }, undefined, false, 0),
214
+ s = SuspenseContext && lookup(Owner, SuspenseContext.id);
214
215
  if (s) c.suspense = s;
215
216
  c.user = true;
216
217
  return tracking => {
@@ -244,19 +245,19 @@ function createResource(pSource, pFetcher, pOptions) {
244
245
  options = pOptions || {};
245
246
  }
246
247
  let pr = null,
247
- initP = NO_INIT,
248
- id = null,
249
- loadedUnderTransition = false,
250
- scheduled = false,
251
- resolved = ("initialValue" in options),
252
- dynamic = typeof source === "function" && createMemo(source);
248
+ initP = NO_INIT,
249
+ id = null,
250
+ loadedUnderTransition = false,
251
+ scheduled = false,
252
+ resolved = ("initialValue" in options),
253
+ dynamic = typeof source === "function" && createMemo(source);
253
254
  const contexts = new Set(),
254
- [value, setValue] = (options.storage || createSignal)(options.initialValue),
255
- [error, setError] = createSignal(undefined),
256
- [track, trigger] = createSignal(undefined, {
257
- equals: false
258
- }),
259
- [state, setState] = createSignal(resolved ? "ready" : "unresolved");
255
+ [value, setValue] = (options.storage || createSignal)(options.initialValue),
256
+ [error, setError] = createSignal(undefined),
257
+ [track, trigger] = createSignal(undefined, {
258
+ equals: false
259
+ }),
260
+ [state, setState] = createSignal(resolved ? "ready" : "unresolved");
260
261
  if (sharedConfig.context) {
261
262
  id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
262
263
  let v;
@@ -292,8 +293,8 @@ function createResource(pSource, pFetcher, pOptions) {
292
293
  }
293
294
  function read() {
294
295
  const c = SuspenseContext && lookup(Owner, SuspenseContext.id),
295
- v = value(),
296
- err = error();
296
+ v = value(),
297
+ err = error();
297
298
  if (err && !pr) throw err;
298
299
  if (Listener && !Listener.user && c) {
299
300
  createComputed(() => {
@@ -365,7 +366,7 @@ function createResource(pSource, pFetcher, pOptions) {
365
366
  }
366
367
  function createDeferred(source, options) {
367
368
  let t,
368
- timeout = options ? options.timeoutMs : undefined;
369
+ timeout = options ? options.timeoutMs : undefined;
369
370
  const node = createComputation(() => {
370
371
  if (!t || !t.fn) t = requestCallback(() => setDeferred(() => node.value), timeout !== undefined ? {
371
372
  timeout
@@ -455,13 +456,16 @@ function getOwner() {
455
456
  }
456
457
  function runWithOwner(o, fn) {
457
458
  const prev = Owner;
459
+ const prevListener = Listener;
458
460
  Owner = o;
461
+ Listener = null;
459
462
  try {
460
463
  return runUpdates(fn, true);
461
464
  } catch (err) {
462
465
  handleError(err);
463
466
  } finally {
464
467
  Owner = prev;
468
+ Listener = prevListener;
465
469
  }
466
470
  }
467
471
  function enableScheduling(scheduler = requestCallback) {
@@ -612,8 +616,8 @@ function updateComputation(node) {
612
616
  if (!node.fn) return;
613
617
  cleanNode(node);
614
618
  const owner = Owner,
615
- listener = Listener,
616
- time = ExecCount;
619
+ listener = Listener,
620
+ time = ExecCount;
617
621
  Listener = Owner = node;
618
622
  runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
619
623
  if (Transition && !Transition.running && Transition.sources.has(node)) {
@@ -634,7 +638,17 @@ function runComputation(node, value, time) {
634
638
  try {
635
639
  nextValue = node.fn(value);
636
640
  } catch (err) {
637
- if (node.pure) Transition && Transition.running ? node.tState = STALE : node.state = STALE;
641
+ if (node.pure) {
642
+ if (Transition && Transition.running) {
643
+ node.tState = STALE;
644
+ node.tOwned && node.tOwned.forEach(cleanNode);
645
+ node.tOwned = undefined;
646
+ } else {
647
+ node.state = STALE;
648
+ node.owned && node.owned.forEach(cleanNode);
649
+ node.owned = null;
650
+ }
651
+ }
638
652
  handleError(err);
639
653
  }
640
654
  if (!node.updatedAt || node.updatedAt <= time) {
@@ -701,7 +715,7 @@ function runTop(node) {
701
715
  node = ancestors[i];
702
716
  if (runningTransition) {
703
717
  let top = node,
704
- prev = ancestors[i + 1];
718
+ prev = ancestors[i + 1];
705
719
  while ((top = top.owner) && top !== prev) {
706
720
  if (Transition.disposed.has(top)) return;
707
721
  }
@@ -728,6 +742,7 @@ function runUpdates(fn, init) {
728
742
  return res;
729
743
  } catch (err) {
730
744
  if (!Updates) Effects = null;
745
+ Updates = null;
731
746
  handleError(err);
732
747
  }
733
748
  }
@@ -798,7 +813,7 @@ function scheduleQueue(queue) {
798
813
  }
799
814
  function runUserEffects(queue) {
800
815
  let i,
801
- userLength = 0;
816
+ userLength = 0;
802
817
  for (i = 0; i < queue.length; i++) {
803
818
  const e = queue[i];
804
819
  if (!e.user) runTop(e);else queue[userLength++] = e;
@@ -834,11 +849,11 @@ function cleanNode(node) {
834
849
  if (node.sources) {
835
850
  while (node.sources.length) {
836
851
  const source = node.sources.pop(),
837
- index = node.sourceSlots.pop(),
838
- obs = source.observers;
852
+ index = node.sourceSlots.pop(),
853
+ obs = source.observers;
839
854
  if (obs && obs.length) {
840
855
  const n = obs.pop(),
841
- s = source.observerSlots.pop();
856
+ s = source.observerSlots.pop();
842
857
  if (index < obs.length) {
843
858
  n.sourceSlots[s] = index;
844
859
  obs[index] = n;
@@ -962,27 +977,27 @@ function dispose(d) {
962
977
  }
963
978
  function mapArray(list, mapFn, options = {}) {
964
979
  let items = [],
965
- mapped = [],
966
- disposers = [],
967
- len = 0,
968
- indexes = mapFn.length > 1 ? [] : null;
980
+ mapped = [],
981
+ disposers = [],
982
+ len = 0,
983
+ indexes = mapFn.length > 1 ? [] : null;
969
984
  onCleanup(() => dispose(disposers));
970
985
  return () => {
971
986
  let newItems = list() || [],
972
- i,
973
- j;
987
+ i,
988
+ j;
974
989
  newItems[$TRACK];
975
990
  return untrack(() => {
976
991
  let newLen = newItems.length,
977
- newIndices,
978
- newIndicesNext,
979
- temp,
980
- tempdisposers,
981
- tempIndexes,
982
- start,
983
- end,
984
- newEnd,
985
- item;
992
+ newIndices,
993
+ newIndicesNext,
994
+ temp,
995
+ tempdisposers,
996
+ tempIndexes,
997
+ start,
998
+ end,
999
+ newEnd,
1000
+ item;
986
1001
  if (newLen === 0) {
987
1002
  if (len !== 0) {
988
1003
  dispose(disposers);
@@ -1065,11 +1080,11 @@ function mapArray(list, mapFn, options = {}) {
1065
1080
  }
1066
1081
  function indexArray(list, mapFn, options = {}) {
1067
1082
  let items = [],
1068
- mapped = [],
1069
- disposers = [],
1070
- signals = [],
1071
- len = 0,
1072
- i;
1083
+ mapped = [],
1084
+ disposers = [],
1085
+ signals = [],
1086
+ len = 0,
1087
+ i;
1073
1088
  onCleanup(() => dispose(disposers));
1074
1089
  return () => {
1075
1090
  const newItems = list() || [];
@@ -1340,20 +1355,20 @@ function Switch(props) {
1340
1355
  let keyed = false;
1341
1356
  const equals = (a, b) => a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1342
1357
  const conditions = children(() => props.children),
1343
- evalConditions = createMemo(() => {
1344
- let conds = conditions();
1345
- if (!Array.isArray(conds)) conds = [conds];
1346
- for (let i = 0; i < conds.length; i++) {
1347
- const c = conds[i].when;
1348
- if (c) {
1349
- keyed = !!conds[i].keyed;
1350
- return [i, c, conds[i]];
1358
+ evalConditions = createMemo(() => {
1359
+ let conds = conditions();
1360
+ if (!Array.isArray(conds)) conds = [conds];
1361
+ for (let i = 0; i < conds.length; i++) {
1362
+ const c = conds[i].when;
1363
+ if (c) {
1364
+ keyed = !!conds[i].keyed;
1365
+ return [i, c, conds[i]];
1366
+ }
1351
1367
  }
1352
- }
1353
- return [-1];
1354
- }, undefined, {
1355
- equals
1356
- });
1368
+ return [-1];
1369
+ }, undefined, {
1370
+ equals
1371
+ });
1357
1372
  return createMemo(() => {
1358
1373
  const [index, when, cond] = evalConditions();
1359
1374
  if (index < 0) return props.fallback;
@@ -1395,9 +1410,9 @@ const suspenseListEquals = (a, b) => a.showContent === b.showContent && a.showFa
1395
1410
  const SuspenseListContext = createContext();
1396
1411
  function SuspenseList(props) {
1397
1412
  let [wrapper, setWrapper] = createSignal(() => ({
1398
- inFallback: false
1399
- })),
1400
- show;
1413
+ inFallback: false
1414
+ })),
1415
+ show;
1401
1416
  const listContext = useContext(SuspenseListContext);
1402
1417
  const [registry, setRegistry] = createSignal([]);
1403
1418
  if (listContext) {
@@ -1405,13 +1420,13 @@ function SuspenseList(props) {
1405
1420
  }
1406
1421
  const resolved = createMemo(prev => {
1407
1422
  const reveal = props.revealOrder,
1408
- tail = props.tail,
1409
- {
1410
- showContent = true,
1411
- showFallback = true
1412
- } = show ? show() : {},
1413
- reg = registry(),
1414
- reverse = reveal === "backwards";
1423
+ tail = props.tail,
1424
+ {
1425
+ showContent = true,
1426
+ showFallback = true
1427
+ } = show ? show() : {},
1428
+ reg = registry(),
1429
+ reverse = reveal === "backwards";
1415
1430
  if (reveal === "together") {
1416
1431
  const all = reg.every(inFallback => !inFallback());
1417
1432
  const res = reg.map(() => ({
@@ -1426,7 +1441,7 @@ function SuspenseList(props) {
1426
1441
  const res = [];
1427
1442
  for (let i = 0, len = reg.length; i < len; i++) {
1428
1443
  const n = reverse ? len - i - 1 : i,
1429
- s = reg[n]();
1444
+ s = reg[n]();
1430
1445
  if (!stop && !s) {
1431
1446
  res[n] = {
1432
1447
  showContent,
@@ -1469,25 +1484,25 @@ function SuspenseList(props) {
1469
1484
  }
1470
1485
  function Suspense(props) {
1471
1486
  let counter = 0,
1472
- show,
1473
- ctx,
1474
- p,
1475
- flicker,
1476
- error;
1487
+ show,
1488
+ ctx,
1489
+ p,
1490
+ flicker,
1491
+ error;
1477
1492
  const [inFallback, setFallback] = createSignal(false),
1478
- SuspenseContext = getSuspenseContext(),
1479
- store = {
1480
- increment: () => {
1481
- if (++counter === 1) setFallback(true);
1482
- },
1483
- decrement: () => {
1484
- if (--counter === 0) setFallback(false);
1493
+ SuspenseContext = getSuspenseContext(),
1494
+ store = {
1495
+ increment: () => {
1496
+ if (++counter === 1) setFallback(true);
1497
+ },
1498
+ decrement: () => {
1499
+ if (--counter === 0) setFallback(false);
1500
+ },
1501
+ inFallback,
1502
+ effects: [],
1503
+ resolved: false
1485
1504
  },
1486
- inFallback,
1487
- effects: [],
1488
- resolved: false
1489
- },
1490
- owner = getOwner();
1505
+ owner = getOwner();
1491
1506
  if (sharedConfig.context && sharedConfig.load) {
1492
1507
  const key = sharedConfig.context.id + sharedConfig.context.count;
1493
1508
  let ref = sharedConfig.load(key);
@@ -1527,10 +1542,10 @@ function Suspense(props) {
1527
1542
  const rendered = createMemo(() => props.children);
1528
1543
  return createMemo(prev => {
1529
1544
  const inFallback = store.inFallback(),
1530
- {
1531
- showContent = true,
1532
- showFallback = true
1533
- } = show ? show() : {};
1545
+ {
1546
+ showContent = true,
1547
+ showFallback = true
1548
+ } = show ? show() : {};
1534
1549
  if ((!inFallback || p && p !== "$$f") && showContent) {
1535
1550
  store.resolved = true;
1536
1551
  dispose && dispose();
package/h/dist/h.cjs CHANGED
@@ -6,8 +6,8 @@ const $ELEMENT = Symbol("hyper-element");
6
6
  function createHyperScript(r) {
7
7
  function h() {
8
8
  let args = [].slice.call(arguments),
9
- e,
10
- multiExpression = false;
9
+ e,
10
+ multiExpression = false;
11
11
  while (Array.isArray(args[0])) args = args[0];
12
12
  if (args[0][$ELEMENT]) args.unshift(h.Fragment);
13
13
  typeof args[0] === "string" && detectMultiExpression(args);
@@ -40,7 +40,7 @@ function createHyperScript(r) {
40
40
  } else if ("function" === type) {
41
41
  if (!e) {
42
42
  let props,
43
- next = args[0];
43
+ next = args[0];
44
44
  if (next == null || typeof next === "object" && !Array.isArray(next) && !(next instanceof Element)) props = args.shift();
45
45
  props || (props = {});
46
46
  if (args.length) {
@@ -72,7 +72,7 @@ function createHyperScript(r) {
72
72
  if (/^\.|#/.test(m[1])) e = document.createElement("div");
73
73
  for (let i = 0; i < m.length; i++) {
74
74
  const v = m[i],
75
- s = v.substring(1, v.length);
75
+ s = v.substring(1, v.length);
76
76
  if (!v) continue;
77
77
  if (!e) e = r.SVGElements.has(v) ? document.createElementNS("http://www.w3.org/2000/svg", v) : document.createElement(v);else if (v[0] === ".") e.classList.add(s);else if (v[0] === "#") e.setAttribute("id", s);
78
78
  }
package/h/dist/h.js CHANGED
@@ -4,8 +4,8 @@ const $ELEMENT = Symbol("hyper-element");
4
4
  function createHyperScript(r) {
5
5
  function h() {
6
6
  let args = [].slice.call(arguments),
7
- e,
8
- multiExpression = false;
7
+ e,
8
+ multiExpression = false;
9
9
  while (Array.isArray(args[0])) args = args[0];
10
10
  if (args[0][$ELEMENT]) args.unshift(h.Fragment);
11
11
  typeof args[0] === "string" && detectMultiExpression(args);
@@ -38,7 +38,7 @@ function createHyperScript(r) {
38
38
  } else if ("function" === type) {
39
39
  if (!e) {
40
40
  let props,
41
- next = args[0];
41
+ next = args[0];
42
42
  if (next == null || typeof next === "object" && !Array.isArray(next) && !(next instanceof Element)) props = args.shift();
43
43
  props || (props = {});
44
44
  if (args.length) {
@@ -70,7 +70,7 @@ function createHyperScript(r) {
70
70
  if (/^\.|#/.test(m[1])) e = document.createElement("div");
71
71
  for (let i = 0; i < m.length; i++) {
72
72
  const v = m[i],
73
- s = v.substring(1, v.length);
73
+ s = v.substring(1, v.length);
74
74
  if (!v) continue;
75
75
  if (!e) e = r.SVGElements.has(v) ? document.createElementNS("http://www.w3.org/2000/svg", v) : document.createElement(v);else if (v[0] === ".") e.classList.add(s);else if (v[0] === "#") e.setAttribute("id", s);
76
76
  }
@@ -1,4 +1,4 @@
1
- declare type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
1
+ type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
2
2
  interface Runtime {
3
3
  insert(parent: MountableElement, accessor: any, marker?: Node | null, init?: any): any;
4
4
  spread(node: Element, accessor: any, isSVG?: Boolean, skipChildren?: Boolean): void;
@@ -7,10 +7,10 @@ interface Runtime {
7
7
  dynamicProperty(props: any, key: string): any;
8
8
  SVGElements: Set<string>;
9
9
  }
10
- declare type ExpandableNode = Node & {
10
+ type ExpandableNode = Node & {
11
11
  [key: string]: any;
12
12
  };
13
- export declare type HyperScript = {
13
+ export type HyperScript = {
14
14
  (...args: any[]): () => ExpandableNode | ExpandableNode[];
15
15
  Fragment: (props: {
16
16
  children: (() => ExpandableNode) | (() => ExpandableNode)[];
@@ -22,8 +22,7 @@ const lookup = {
22
22
  track: true,
23
23
  wbr: true
24
24
  };
25
- function parseTag(
26
- tag) {
25
+ function parseTag( tag) {
27
26
  const res = {
28
27
  type: 'tag',
29
28
  name: '',
@@ -183,14 +182,14 @@ function createHTML(r, {
183
182
  };
184
183
  function createTemplate(statics) {
185
184
  let i = 0,
186
- markup = "";
185
+ markup = "";
187
186
  for (; i < statics.length - 1; i++) {
188
187
  markup = markup + statics[i] + "<!--#-->";
189
188
  }
190
189
  markup = markup + statics[i];
191
190
  markup = markup.replace(selfClosing, fullClosing).replace(/<(<!--#-->)/g, "<###").replace(/\.\.\.(<!--#-->)/g, "###").replace(attrSeeker, attrReplacer).replace(/>\n+\s*/g, ">").replace(/\n+\s*</g, "<").replace(/\s+</g, " <").replace(/>\s+/g, "> ");
192
191
  const [html, code] = parseTemplate(parse(markup)),
193
- templates = [];
192
+ templates = [];
194
193
  for (let i = 0; i < html.length; i++) {
195
194
  templates.push(document.createElement("template"));
196
195
  templates[i].innerHTML = html[i];
@@ -213,8 +212,8 @@ function createHTML(r, {
213
212
  }
214
213
  function parseKeyValue(tag, name, value, isSVG, isCE, options) {
215
214
  let expr = value === "###" ? `!doNotWrap ? exprs[${options.counter}]() : exprs[${options.counter++}]` : value.split("###").map((v, i) => i ? ` + (typeof exprs[${options.counter}] === "function" ? exprs[${options.counter}]() : exprs[${options.counter++}]) + "${v}"` : `"${v}"`).join(""),
216
- parts,
217
- namespace;
215
+ parts,
216
+ namespace;
218
217
  if ((parts = name.split(":")) && parts[1] && reservedNameSpaces.has(parts[0])) {
219
218
  name = parts[1];
220
219
  namespace = parts[0];
@@ -252,9 +251,9 @@ function createHTML(r, {
252
251
  options.exprs.push(`exprs[${options.counter++}](${tag})`);
253
252
  } else {
254
253
  const childOptions = Object.assign({}, options, {
255
- exprs: []
256
- }),
257
- count = options.counter;
254
+ exprs: []
255
+ }),
256
+ count = options.counter;
258
257
  parseKeyValue(tag, name, value, isSVG, isCE, childOptions);
259
258
  options.decl.push(`_fn${count} = (${value === "###" ? "doNotWrap" : ""}) => {\n${childOptions.exprs.join(";\n")};\n}`);
260
259
  if (value === "###") {
@@ -320,11 +319,11 @@ function createHTML(r, {
320
319
  function processComponent(node, options) {
321
320
  let props = [];
322
321
  const keys = Object.keys(node.attrs),
323
- propGroups = [props],
324
- componentIdentifier = options.counter++;
322
+ propGroups = [props],
323
+ componentIdentifier = options.counter++;
325
324
  for (let i = 0; i < keys.length; i++) {
326
325
  const name = keys[i],
327
- value = node.attrs[name];
326
+ value = node.attrs[name];
328
327
  if (name === "###") {
329
328
  propGroups.push(`exprs[${options.counter++}]`);
330
329
  propGroups.push(props = []);
@@ -336,15 +335,15 @@ function createHTML(r, {
336
335
  props.push(`children: () => exprs[${options.counter++}]`);
337
336
  } else if (node.children.length) {
338
337
  const children = {
339
- type: "fragment",
340
- children: node.children
341
- },
342
- childOptions = Object.assign({}, options, {
343
- first: true,
344
- decl: [],
345
- exprs: [],
346
- parent: false
347
- });
338
+ type: "fragment",
339
+ children: node.children
340
+ },
341
+ childOptions = Object.assign({}, options, {
342
+ first: true,
343
+ decl: [],
344
+ exprs: [],
345
+ parent: false
346
+ });
348
347
  parseNode(children, childOptions);
349
348
  props.push(`children: () => { ${childOptions.exprs.join(";\n")}}`);
350
349
  options.templateId = childOptions.templateId;
@@ -410,7 +409,7 @@ function createHTML(r, {
410
409
  let current = "";
411
410
  for (let i = 0; i < keys.length; i++) {
412
411
  const name = keys[i],
413
- value = node.attrs[name];
412
+ value = node.attrs[name];
414
413
  if (value.includes("###")) {
415
414
  let count = options.counter++;
416
415
  current += `${name}: ${name !== "ref" ? `typeof exprs[${count}] === "function" ? exprs[${count}]() : ` : ""}exprs[${count}],`;
@@ -429,7 +428,7 @@ function createHTML(r, {
429
428
  } else {
430
429
  for (let i = 0; i < keys.length; i++) {
431
430
  const name = keys[i],
432
- value = node.attrs[name];
431
+ value = node.attrs[name];
433
432
  if (value.includes("###")) {
434
433
  delete node.attrs[name];
435
434
  parseAttribute(tag, name, value, isSVG, isCE, options);
@@ -461,18 +460,18 @@ function createHTML(r, {
461
460
  }
462
461
  function parseTemplate(nodes) {
463
462
  const options = {
464
- path: "",
465
- decl: [],
466
- exprs: [],
467
- delegatedEvents: new Set(),
468
- counter: 0,
469
- first: true,
470
- multi: false,
471
- templateId: 0,
472
- templateNodes: []
473
- },
474
- id = uuid,
475
- origNodes = nodes;
463
+ path: "",
464
+ decl: [],
465
+ exprs: [],
466
+ delegatedEvents: new Set(),
467
+ counter: 0,
468
+ first: true,
469
+ multi: false,
470
+ templateId: 0,
471
+ templateNodes: []
472
+ },
473
+ id = uuid,
474
+ origNodes = nodes;
476
475
  let toplevel;
477
476
  if (nodes.length > 1) {
478
477
  nodes = [{