@marko/runtime-tags 6.0.140 → 6.0.142
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/debug/dom.js +20 -4
- package/dist/debug/dom.mjs +20 -4
- package/dist/debug/html.js +13 -12
- package/dist/debug/html.mjs +13 -12
- package/dist/dom.js +6 -4
- package/dist/dom.mjs +6 -4
- package/dist/html.js +12 -10
- package/dist/html.mjs +12 -10
- package/dist/translator/index.js +112 -75
- package/dist/translator/util/sections.d.ts +1 -0
- package/dist/translator/util/signals.d.ts +2 -2
- package/dist/translator/visitors/program/dom.d.ts +1 -0
- package/package.json +4 -4
- package/tags-html.d.ts +93 -55
package/dist/debug/dom.js
CHANGED
|
@@ -107,7 +107,7 @@ module.exports = __toCommonJS(dom_exports);
|
|
|
107
107
|
|
|
108
108
|
// src/common/attr-tag.ts
|
|
109
109
|
var empty = [];
|
|
110
|
-
var rest = true ? Symbol("Attribute Tag") : Symbol();
|
|
110
|
+
var rest = true ? /* @__PURE__ */ Symbol("Attribute Tag") : /* @__PURE__ */ Symbol();
|
|
111
111
|
function attrTag(attrs) {
|
|
112
112
|
attrs[Symbol.iterator] = attrTagIterator;
|
|
113
113
|
attrs[rest] = empty;
|
|
@@ -312,7 +312,7 @@ function _on(element, type, handler) {
|
|
|
312
312
|
element["$" + type] = handler || null;
|
|
313
313
|
}
|
|
314
314
|
function createDelegator() {
|
|
315
|
-
const kEvents = Symbol();
|
|
315
|
+
const kEvents = /* @__PURE__ */ Symbol();
|
|
316
316
|
return function ensureDelegated(node, type, handler) {
|
|
317
317
|
((node = node.getRootNode())[kEvents] ||= {})[type] ||= (node.addEventListener(type, handler, true), 1);
|
|
318
318
|
};
|
|
@@ -604,6 +604,11 @@ function _closure(...closureSignals) {
|
|
|
604
604
|
function _closure_get(valueAccessor, fn, getOwnerScope, resumeId) {
|
|
605
605
|
if (false) valueAccessor = decodeAccessor(valueAccessor);
|
|
606
606
|
const closureSignal = ((scope) => {
|
|
607
|
+
if (true) {
|
|
608
|
+
if (!(valueAccessor in (getOwnerScope ? getOwnerScope(scope) : scope["_" /* Owner */]))) {
|
|
609
|
+
throwUninitialized(valueAccessor);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
607
612
|
scope[closureSignal.___signalIndexAccessor] = closureSignal.___index;
|
|
608
613
|
fn(scope);
|
|
609
614
|
subscribeToScopeSet(
|
|
@@ -688,6 +693,16 @@ function _hoist(...path) {
|
|
|
688
693
|
function _hoist_resume(id, ...path) {
|
|
689
694
|
return _resume(id, _hoist(...path));
|
|
690
695
|
}
|
|
696
|
+
function throwUninitialized(name) {
|
|
697
|
+
try {
|
|
698
|
+
__UNINITIALIZED__;
|
|
699
|
+
let __UNINITIALIZED__;
|
|
700
|
+
} catch (err) {
|
|
701
|
+
err.message = err.message.replaceAll("__UNINITIALIZED__", name);
|
|
702
|
+
throw err;
|
|
703
|
+
}
|
|
704
|
+
throw new ReferenceError(`Cannot access '${name}' before initialization`);
|
|
705
|
+
}
|
|
691
706
|
|
|
692
707
|
// src/dom/walker.ts
|
|
693
708
|
var walker = /* @__PURE__ */ document.createTreeWalker(document);
|
|
@@ -1421,8 +1436,9 @@ function _attrs_partial(scope, nodeAccessor, nextAttrs, skip) {
|
|
|
1421
1436
|
el.removeAttribute(name);
|
|
1422
1437
|
}
|
|
1423
1438
|
}
|
|
1424
|
-
for (const
|
|
1425
|
-
|
|
1439
|
+
for (const name in nextAttrs) {
|
|
1440
|
+
const key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
1441
|
+
if (!skip[key]) partial[key] = nextAttrs[name];
|
|
1426
1442
|
}
|
|
1427
1443
|
if (true) {
|
|
1428
1444
|
assertExclusiveAttrs({ ...nextAttrs, ...skip });
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/common/attr-tag.ts
|
|
2
2
|
var empty = [];
|
|
3
|
-
var rest = true ? Symbol("Attribute Tag") : Symbol();
|
|
3
|
+
var rest = true ? /* @__PURE__ */ Symbol("Attribute Tag") : /* @__PURE__ */ Symbol();
|
|
4
4
|
function attrTag(attrs) {
|
|
5
5
|
attrs[Symbol.iterator] = attrTagIterator;
|
|
6
6
|
attrs[rest] = empty;
|
|
@@ -205,7 +205,7 @@ function _on(element, type, handler) {
|
|
|
205
205
|
element["$" + type] = handler || null;
|
|
206
206
|
}
|
|
207
207
|
function createDelegator() {
|
|
208
|
-
const kEvents = Symbol();
|
|
208
|
+
const kEvents = /* @__PURE__ */ Symbol();
|
|
209
209
|
return function ensureDelegated(node, type, handler) {
|
|
210
210
|
((node = node.getRootNode())[kEvents] ||= {})[type] ||= (node.addEventListener(type, handler, true), 1);
|
|
211
211
|
};
|
|
@@ -497,6 +497,11 @@ function _closure(...closureSignals) {
|
|
|
497
497
|
function _closure_get(valueAccessor, fn, getOwnerScope, resumeId) {
|
|
498
498
|
if (false) valueAccessor = decodeAccessor(valueAccessor);
|
|
499
499
|
const closureSignal = ((scope) => {
|
|
500
|
+
if (true) {
|
|
501
|
+
if (!(valueAccessor in (getOwnerScope ? getOwnerScope(scope) : scope["_" /* Owner */]))) {
|
|
502
|
+
throwUninitialized(valueAccessor);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
500
505
|
scope[closureSignal.___signalIndexAccessor] = closureSignal.___index;
|
|
501
506
|
fn(scope);
|
|
502
507
|
subscribeToScopeSet(
|
|
@@ -581,6 +586,16 @@ function _hoist(...path) {
|
|
|
581
586
|
function _hoist_resume(id, ...path) {
|
|
582
587
|
return _resume(id, _hoist(...path));
|
|
583
588
|
}
|
|
589
|
+
function throwUninitialized(name) {
|
|
590
|
+
try {
|
|
591
|
+
__UNINITIALIZED__;
|
|
592
|
+
let __UNINITIALIZED__;
|
|
593
|
+
} catch (err) {
|
|
594
|
+
err.message = err.message.replaceAll("__UNINITIALIZED__", name);
|
|
595
|
+
throw err;
|
|
596
|
+
}
|
|
597
|
+
throw new ReferenceError(`Cannot access '${name}' before initialization`);
|
|
598
|
+
}
|
|
584
599
|
|
|
585
600
|
// src/dom/walker.ts
|
|
586
601
|
var walker = /* @__PURE__ */ document.createTreeWalker(document);
|
|
@@ -1314,8 +1329,9 @@ function _attrs_partial(scope, nodeAccessor, nextAttrs, skip) {
|
|
|
1314
1329
|
el.removeAttribute(name);
|
|
1315
1330
|
}
|
|
1316
1331
|
}
|
|
1317
|
-
for (const
|
|
1318
|
-
|
|
1332
|
+
for (const name in nextAttrs) {
|
|
1333
|
+
const key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
1334
|
+
if (!skip[key]) partial[key] = nextAttrs[name];
|
|
1319
1335
|
}
|
|
1320
1336
|
if (true) {
|
|
1321
1337
|
assertExclusiveAttrs({ ...nextAttrs, ...skip });
|
package/dist/debug/html.js
CHANGED
|
@@ -93,7 +93,7 @@ module.exports = __toCommonJS(html_exports);
|
|
|
93
93
|
|
|
94
94
|
// src/common/attr-tag.ts
|
|
95
95
|
var empty = [];
|
|
96
|
-
var rest = true ? Symbol("Attribute Tag") : Symbol();
|
|
96
|
+
var rest = true ? /* @__PURE__ */ Symbol("Attribute Tag") : /* @__PURE__ */ Symbol();
|
|
97
97
|
function attrTag(attrs) {
|
|
98
98
|
attrs[Symbol.iterator] = attrTagIterator;
|
|
99
99
|
attrs[rest] = empty;
|
|
@@ -427,7 +427,7 @@ var REORDER_RUNTIME_CODE = true ? (
|
|
|
427
427
|
) : `(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),"#"==n?(t[a]=l).i++:"!"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):"T"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l["^"+a]){if(--o.i)return 1;for(;(r=e.l[a].previousSibling||i).remove(),i!=r;);c(a,d)}}),(n=e.j[a])&&(g=l.c,l.c=()=>g()||n(e.r)))}})`;
|
|
428
428
|
|
|
429
429
|
// src/html/serializer.ts
|
|
430
|
-
var kTouchedIterator = Symbol();
|
|
430
|
+
var kTouchedIterator = /* @__PURE__ */ Symbol();
|
|
431
431
|
var { hasOwnProperty } = {};
|
|
432
432
|
var Generator = (function* () {
|
|
433
433
|
})().constructor;
|
|
@@ -729,7 +729,7 @@ var Serializer = class {
|
|
|
729
729
|
return nextId(this.#state);
|
|
730
730
|
}
|
|
731
731
|
symbol(id) {
|
|
732
|
-
const symbol = Symbol();
|
|
732
|
+
const symbol = /* @__PURE__ */ Symbol();
|
|
733
733
|
this.#state.refs.set(symbol, new Reference(null, null, 0, null, id));
|
|
734
734
|
return symbol;
|
|
735
735
|
}
|
|
@@ -1772,8 +1772,8 @@ function compareRegisteredReferences(a, b) {
|
|
|
1772
1772
|
var $chunk;
|
|
1773
1773
|
var NOOP = () => {
|
|
1774
1774
|
};
|
|
1775
|
-
var K_SCOPE_ID = Symbol("Scope ID");
|
|
1776
|
-
var K_SCOPE_REFERENCED = Symbol("Scope Referenced");
|
|
1775
|
+
var K_SCOPE_ID = /* @__PURE__ */ Symbol("Scope ID");
|
|
1776
|
+
var K_SCOPE_REFERENCED = /* @__PURE__ */ Symbol("Scope Referenced");
|
|
1777
1777
|
function getChunk() {
|
|
1778
1778
|
return $chunk;
|
|
1779
1779
|
}
|
|
@@ -1834,7 +1834,7 @@ function normalizeServerRender(value) {
|
|
|
1834
1834
|
}
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
|
-
var kPendingContexts = Symbol("Pending Contexts");
|
|
1837
|
+
var kPendingContexts = /* @__PURE__ */ Symbol("Pending Contexts");
|
|
1838
1838
|
function withContext(key, value, cb, cbValue) {
|
|
1839
1839
|
const ctx = $chunk.context ||= { [kPendingContexts]: 0 };
|
|
1840
1840
|
const prev = ctx[key];
|
|
@@ -1915,8 +1915,8 @@ function _resume_branch(scopeId) {
|
|
|
1915
1915
|
writeScope(scopeId, { ["#ClosestBranchId" /* ClosestBranchId */]: branchId });
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
|
-
var kBranchId = Symbol("Branch Id");
|
|
1919
|
-
var kIsAsync = Symbol("Is Async");
|
|
1918
|
+
var kBranchId = /* @__PURE__ */ Symbol("Branch Id");
|
|
1919
|
+
var kIsAsync = /* @__PURE__ */ Symbol("Is Async");
|
|
1920
1920
|
function isInResumedBranch() {
|
|
1921
1921
|
return $chunk?.context?.[kBranchId] !== void 0;
|
|
1922
1922
|
}
|
|
@@ -2882,7 +2882,7 @@ function _attr_option_value(value) {
|
|
|
2882
2882
|
const selectedValue = getContext(kSelectedValue);
|
|
2883
2883
|
return _attr("value", value) + (!isVoid(value) && (Array.isArray(selectedValue) ? selectedValue.includes(value) : selectedValue === value) ? " selected" : "");
|
|
2884
2884
|
}
|
|
2885
|
-
var kSelectedValue = Symbol("selectedValue");
|
|
2885
|
+
var kSelectedValue = /* @__PURE__ */ Symbol("selectedValue");
|
|
2886
2886
|
function _attr_select_value(scopeId, nodeAccessor, value, valueChange, content) {
|
|
2887
2887
|
if (valueChange) {
|
|
2888
2888
|
writeControlledScope(
|
|
@@ -3060,8 +3060,9 @@ function _attrs_content(data, nodeAccessor, scopeId, tagName, serializeReason) {
|
|
|
3060
3060
|
}
|
|
3061
3061
|
function _attrs_partial(data, skip, nodeAccessor, scopeId, tagName) {
|
|
3062
3062
|
const partial = {};
|
|
3063
|
-
for (const
|
|
3064
|
-
|
|
3063
|
+
for (const name in data) {
|
|
3064
|
+
const key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
3065
|
+
if (!skip[key]) partial[key] = data[name];
|
|
3065
3066
|
}
|
|
3066
3067
|
return _attrs(partial, nodeAccessor, scopeId, tagName);
|
|
3067
3068
|
}
|
|
@@ -3283,7 +3284,7 @@ var patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
|
3283
3284
|
})(_dynamic_tag);
|
|
3284
3285
|
|
|
3285
3286
|
// src/html/compat.ts
|
|
3286
|
-
var K_TAGS_API_STATE = Symbol();
|
|
3287
|
+
var K_TAGS_API_STATE = /* @__PURE__ */ Symbol();
|
|
3287
3288
|
var COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap();
|
|
3288
3289
|
var compat = {
|
|
3289
3290
|
$global,
|
package/dist/debug/html.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/common/attr-tag.ts
|
|
2
2
|
var empty = [];
|
|
3
|
-
var rest = true ? Symbol("Attribute Tag") : Symbol();
|
|
3
|
+
var rest = true ? /* @__PURE__ */ Symbol("Attribute Tag") : /* @__PURE__ */ Symbol();
|
|
4
4
|
function attrTag(attrs) {
|
|
5
5
|
attrs[Symbol.iterator] = attrTagIterator;
|
|
6
6
|
attrs[rest] = empty;
|
|
@@ -334,7 +334,7 @@ var REORDER_RUNTIME_CODE = true ? (
|
|
|
334
334
|
) : `(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),"#"==n?(t[a]=l).i++:"!"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):"T"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l["^"+a]){if(--o.i)return 1;for(;(r=e.l[a].previousSibling||i).remove(),i!=r;);c(a,d)}}),(n=e.j[a])&&(g=l.c,l.c=()=>g()||n(e.r)))}})`;
|
|
335
335
|
|
|
336
336
|
// src/html/serializer.ts
|
|
337
|
-
var kTouchedIterator = Symbol();
|
|
337
|
+
var kTouchedIterator = /* @__PURE__ */ Symbol();
|
|
338
338
|
var { hasOwnProperty } = {};
|
|
339
339
|
var Generator = (function* () {
|
|
340
340
|
})().constructor;
|
|
@@ -636,7 +636,7 @@ var Serializer = class {
|
|
|
636
636
|
return nextId(this.#state);
|
|
637
637
|
}
|
|
638
638
|
symbol(id) {
|
|
639
|
-
const symbol = Symbol();
|
|
639
|
+
const symbol = /* @__PURE__ */ Symbol();
|
|
640
640
|
this.#state.refs.set(symbol, new Reference(null, null, 0, null, id));
|
|
641
641
|
return symbol;
|
|
642
642
|
}
|
|
@@ -1679,8 +1679,8 @@ function compareRegisteredReferences(a, b) {
|
|
|
1679
1679
|
var $chunk;
|
|
1680
1680
|
var NOOP = () => {
|
|
1681
1681
|
};
|
|
1682
|
-
var K_SCOPE_ID = Symbol("Scope ID");
|
|
1683
|
-
var K_SCOPE_REFERENCED = Symbol("Scope Referenced");
|
|
1682
|
+
var K_SCOPE_ID = /* @__PURE__ */ Symbol("Scope ID");
|
|
1683
|
+
var K_SCOPE_REFERENCED = /* @__PURE__ */ Symbol("Scope Referenced");
|
|
1684
1684
|
function getChunk() {
|
|
1685
1685
|
return $chunk;
|
|
1686
1686
|
}
|
|
@@ -1741,7 +1741,7 @@ function normalizeServerRender(value) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
|
-
var kPendingContexts = Symbol("Pending Contexts");
|
|
1744
|
+
var kPendingContexts = /* @__PURE__ */ Symbol("Pending Contexts");
|
|
1745
1745
|
function withContext(key, value, cb, cbValue) {
|
|
1746
1746
|
const ctx = $chunk.context ||= { [kPendingContexts]: 0 };
|
|
1747
1747
|
const prev = ctx[key];
|
|
@@ -1822,8 +1822,8 @@ function _resume_branch(scopeId) {
|
|
|
1822
1822
|
writeScope(scopeId, { ["#ClosestBranchId" /* ClosestBranchId */]: branchId });
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
|
-
var kBranchId = Symbol("Branch Id");
|
|
1826
|
-
var kIsAsync = Symbol("Is Async");
|
|
1825
|
+
var kBranchId = /* @__PURE__ */ Symbol("Branch Id");
|
|
1826
|
+
var kIsAsync = /* @__PURE__ */ Symbol("Is Async");
|
|
1827
1827
|
function isInResumedBranch() {
|
|
1828
1828
|
return $chunk?.context?.[kBranchId] !== void 0;
|
|
1829
1829
|
}
|
|
@@ -2789,7 +2789,7 @@ function _attr_option_value(value) {
|
|
|
2789
2789
|
const selectedValue = getContext(kSelectedValue);
|
|
2790
2790
|
return _attr("value", value) + (!isVoid(value) && (Array.isArray(selectedValue) ? selectedValue.includes(value) : selectedValue === value) ? " selected" : "");
|
|
2791
2791
|
}
|
|
2792
|
-
var kSelectedValue = Symbol("selectedValue");
|
|
2792
|
+
var kSelectedValue = /* @__PURE__ */ Symbol("selectedValue");
|
|
2793
2793
|
function _attr_select_value(scopeId, nodeAccessor, value, valueChange, content) {
|
|
2794
2794
|
if (valueChange) {
|
|
2795
2795
|
writeControlledScope(
|
|
@@ -2967,8 +2967,9 @@ function _attrs_content(data, nodeAccessor, scopeId, tagName, serializeReason) {
|
|
|
2967
2967
|
}
|
|
2968
2968
|
function _attrs_partial(data, skip, nodeAccessor, scopeId, tagName) {
|
|
2969
2969
|
const partial = {};
|
|
2970
|
-
for (const
|
|
2971
|
-
|
|
2970
|
+
for (const name in data) {
|
|
2971
|
+
const key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
2972
|
+
if (!skip[key]) partial[key] = data[name];
|
|
2972
2973
|
}
|
|
2973
2974
|
return _attrs(partial, nodeAccessor, scopeId, tagName);
|
|
2974
2975
|
}
|
|
@@ -3190,7 +3191,7 @@ var patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
|
3190
3191
|
})(_dynamic_tag);
|
|
3191
3192
|
|
|
3192
3193
|
// src/html/compat.ts
|
|
3193
|
-
var K_TAGS_API_STATE = Symbol();
|
|
3194
|
+
var K_TAGS_API_STATE = /* @__PURE__ */ Symbol();
|
|
3194
3195
|
var COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap();
|
|
3195
3196
|
var compat = {
|
|
3196
3197
|
$global,
|
package/dist/dom.js
CHANGED
|
@@ -103,7 +103,7 @@ __export(dom_exports, {
|
|
|
103
103
|
module.exports = __toCommonJS(dom_exports);
|
|
104
104
|
|
|
105
105
|
// src/common/attr-tag.ts
|
|
106
|
-
var empty = [], rest = Symbol();
|
|
106
|
+
var empty = [], rest = /* @__PURE__ */ Symbol();
|
|
107
107
|
function attrTag(attrs) {
|
|
108
108
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
109
109
|
}
|
|
@@ -200,7 +200,7 @@ function _on(element, type, handler) {
|
|
|
200
200
|
element["$" + type] === void 0 && defaultDelegator(element, type, handleDelegated), element["$" + type] = handler || null;
|
|
201
201
|
}
|
|
202
202
|
function createDelegator() {
|
|
203
|
-
let kEvents = Symbol();
|
|
203
|
+
let kEvents = /* @__PURE__ */ Symbol();
|
|
204
204
|
return function(node, type, handler) {
|
|
205
205
|
((node = node.getRootNode())[kEvents] ||= {})[type] ||= (node.addEventListener(type, handler, !0), 1);
|
|
206
206
|
};
|
|
@@ -886,8 +886,10 @@ function _attrs_partial(scope, nodeAccessor, nextAttrs, skip) {
|
|
|
886
886
|
let { name } = el.attributes.item(i);
|
|
887
887
|
!skip[name] && !(nextAttrs && name in nextAttrs) && el.removeAttribute(name);
|
|
888
888
|
}
|
|
889
|
-
for (let
|
|
890
|
-
|
|
889
|
+
for (let name in nextAttrs) {
|
|
890
|
+
let key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
891
|
+
skip[key] || (partial[key] = nextAttrs[name]);
|
|
892
|
+
}
|
|
891
893
|
attrsInternal(scope, nodeAccessor, partial);
|
|
892
894
|
}
|
|
893
895
|
function _attrs_partial_content(scope, nodeAccessor, nextAttrs, skip) {
|
package/dist/dom.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/common/attr-tag.ts
|
|
2
|
-
var empty = [], rest = Symbol();
|
|
2
|
+
var empty = [], rest = /* @__PURE__ */ Symbol();
|
|
3
3
|
function attrTag(attrs) {
|
|
4
4
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
5
5
|
}
|
|
@@ -96,7 +96,7 @@ function _on(element, type, handler) {
|
|
|
96
96
|
element["$" + type] === void 0 && defaultDelegator(element, type, handleDelegated), element["$" + type] = handler || null;
|
|
97
97
|
}
|
|
98
98
|
function createDelegator() {
|
|
99
|
-
let kEvents = Symbol();
|
|
99
|
+
let kEvents = /* @__PURE__ */ Symbol();
|
|
100
100
|
return function(node, type, handler) {
|
|
101
101
|
((node = node.getRootNode())[kEvents] ||= {})[type] ||= (node.addEventListener(type, handler, !0), 1);
|
|
102
102
|
};
|
|
@@ -782,8 +782,10 @@ function _attrs_partial(scope, nodeAccessor, nextAttrs, skip) {
|
|
|
782
782
|
let { name } = el.attributes.item(i);
|
|
783
783
|
!skip[name] && !(nextAttrs && name in nextAttrs) && el.removeAttribute(name);
|
|
784
784
|
}
|
|
785
|
-
for (let
|
|
786
|
-
|
|
785
|
+
for (let name in nextAttrs) {
|
|
786
|
+
let key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
787
|
+
skip[key] || (partial[key] = nextAttrs[name]);
|
|
788
|
+
}
|
|
787
789
|
attrsInternal(scope, nodeAccessor, partial);
|
|
788
790
|
}
|
|
789
791
|
function _attrs_partial_content(scope, nodeAccessor, nextAttrs, skip) {
|
package/dist/html.js
CHANGED
|
@@ -89,7 +89,7 @@ __export(html_exports, {
|
|
|
89
89
|
module.exports = __toCommonJS(html_exports);
|
|
90
90
|
|
|
91
91
|
// src/common/attr-tag.ts
|
|
92
|
-
var empty = [], rest = Symbol();
|
|
92
|
+
var empty = [], rest = /* @__PURE__ */ Symbol();
|
|
93
93
|
function attrTag(attrs) {
|
|
94
94
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
95
95
|
}
|
|
@@ -215,7 +215,7 @@ function forStepBy(by, index) {
|
|
|
215
215
|
var WALKER_RUNTIME_CODE = '(e=>(self[e]||(self[e]=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(a[r=l.slice(s+1)]=e,l[s]),r,e),l>"#"&&d.push(e)}}),self[e]))', REORDER_RUNTIME_CODE = '(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),"#"==n?(t[a]=l).i++:"!"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):"T"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l["^"+a]){if(--o.i)return 1;for(;(r=e.l[a].previousSibling||i).remove(),i!=r;);c(a,d)}}),(n=e.j[a])&&(g=l.c,l.c=()=>g()||n(e.r)))}})';
|
|
216
216
|
|
|
217
217
|
// src/html/serializer.ts
|
|
218
|
-
var kTouchedIterator = Symbol(), { hasOwnProperty } = {}, Generator = (function* () {
|
|
218
|
+
var kTouchedIterator = /* @__PURE__ */ Symbol(), { hasOwnProperty } = {}, Generator = (function* () {
|
|
219
219
|
})().constructor, AsyncGenerator = (async function* () {
|
|
220
220
|
})().constructor;
|
|
221
221
|
patchIteratorNext(Generator.prototype);
|
|
@@ -496,7 +496,7 @@ var Serializer = class {
|
|
|
496
496
|
return nextId(this.#state);
|
|
497
497
|
}
|
|
498
498
|
symbol(id) {
|
|
499
|
-
let symbol = Symbol();
|
|
499
|
+
let symbol = /* @__PURE__ */ Symbol();
|
|
500
500
|
return this.#state.refs.set(symbol, new Reference(null, null, 0, null, id)), symbol;
|
|
501
501
|
}
|
|
502
502
|
writeCall(value, object, property, spread) {
|
|
@@ -1131,7 +1131,7 @@ function compareRegisteredReferences(a, b) {
|
|
|
1131
1131
|
|
|
1132
1132
|
// src/html/writer.ts
|
|
1133
1133
|
var $chunk, NOOP = () => {
|
|
1134
|
-
}, K_SCOPE_ID = Symbol("Scope ID"), K_SCOPE_REFERENCED = Symbol("Scope Referenced");
|
|
1134
|
+
}, K_SCOPE_ID = /* @__PURE__ */ Symbol("Scope ID"), K_SCOPE_REFERENCED = /* @__PURE__ */ Symbol("Scope Referenced");
|
|
1135
1135
|
function getChunk() {
|
|
1136
1136
|
return $chunk;
|
|
1137
1137
|
}
|
|
@@ -1165,7 +1165,7 @@ function normalizeServerRender(value) {
|
|
|
1165
1165
|
if (renderer && typeof renderer == "function")
|
|
1166
1166
|
return renderer;
|
|
1167
1167
|
}
|
|
1168
|
-
var kPendingContexts = Symbol("Pending Contexts");
|
|
1168
|
+
var kPendingContexts = /* @__PURE__ */ Symbol("Pending Contexts");
|
|
1169
1169
|
function withContext(key, value, cb, cbValue) {
|
|
1170
1170
|
let ctx = $chunk.context ||= { [kPendingContexts]: 0 }, prev = ctx[key];
|
|
1171
1171
|
ctx[kPendingContexts]++, ctx[key] = value;
|
|
@@ -1235,7 +1235,7 @@ function _resume_branch(scopeId) {
|
|
|
1235
1235
|
let branchId = $chunk.context?.[kBranchId];
|
|
1236
1236
|
branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, { G: branchId });
|
|
1237
1237
|
}
|
|
1238
|
-
var kBranchId = Symbol("Branch Id"), kIsAsync = Symbol("Is Async");
|
|
1238
|
+
var kBranchId = /* @__PURE__ */ Symbol("Branch Id"), kIsAsync = /* @__PURE__ */ Symbol("Is Async");
|
|
1239
1239
|
function isInResumedBranch() {
|
|
1240
1240
|
return $chunk?.context?.[kBranchId] !== void 0;
|
|
1241
1241
|
}
|
|
@@ -1778,7 +1778,7 @@ function _attr_option_value(value) {
|
|
|
1778
1778
|
let selectedValue = getContext(kSelectedValue);
|
|
1779
1779
|
return _attr("value", value) + (!isVoid(value) && (Array.isArray(selectedValue) ? selectedValue.includes(value) : selectedValue === value) ? " selected" : "");
|
|
1780
1780
|
}
|
|
1781
|
-
var kSelectedValue = Symbol("selectedValue");
|
|
1781
|
+
var kSelectedValue = /* @__PURE__ */ Symbol("selectedValue");
|
|
1782
1782
|
function _attr_select_value(scopeId, nodeAccessor, value, valueChange, content) {
|
|
1783
1783
|
valueChange && writeControlledScope(
|
|
1784
1784
|
3 /* SelectValue */,
|
|
@@ -1910,8 +1910,10 @@ function _attrs_content(data, nodeAccessor, scopeId, tagName, serializeReason) {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
function _attrs_partial(data, skip, nodeAccessor, scopeId, tagName) {
|
|
1912
1912
|
let partial = {};
|
|
1913
|
-
for (let
|
|
1914
|
-
|
|
1913
|
+
for (let name in data) {
|
|
1914
|
+
let key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
1915
|
+
skip[key] || (partial[key] = data[name]);
|
|
1916
|
+
}
|
|
1915
1917
|
return _attrs(partial, nodeAccessor, scopeId, tagName);
|
|
1916
1918
|
}
|
|
1917
1919
|
function _attrs_partial_content(data, skip, nodeAccessor, scopeId, tagName, serializeReason) {
|
|
@@ -2065,7 +2067,7 @@ var patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
|
2065
2067
|
})(_dynamic_tag);
|
|
2066
2068
|
|
|
2067
2069
|
// src/html/compat.ts
|
|
2068
|
-
var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
2070
|
+
var K_TAGS_API_STATE = /* @__PURE__ */ Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
2069
2071
|
$global,
|
|
2070
2072
|
fork: _await,
|
|
2071
2073
|
write: _html,
|
package/dist/html.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/common/attr-tag.ts
|
|
2
|
-
var empty = [], rest = Symbol();
|
|
2
|
+
var empty = [], rest = /* @__PURE__ */ Symbol();
|
|
3
3
|
function attrTag(attrs) {
|
|
4
4
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
5
5
|
}
|
|
@@ -125,7 +125,7 @@ function forStepBy(by, index) {
|
|
|
125
125
|
var WALKER_RUNTIME_CODE = '(e=>(self[e]||(self[e]=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(a[r=l.slice(s+1)]=e,l[s]),r,e),l>"#"&&d.push(e)}}),self[e]))', REORDER_RUNTIME_CODE = '(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),"#"==n?(t[a]=l).i++:"!"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):"T"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l["^"+a]){if(--o.i)return 1;for(;(r=e.l[a].previousSibling||i).remove(),i!=r;);c(a,d)}}),(n=e.j[a])&&(g=l.c,l.c=()=>g()||n(e.r)))}})';
|
|
126
126
|
|
|
127
127
|
// src/html/serializer.ts
|
|
128
|
-
var kTouchedIterator = Symbol(), { hasOwnProperty } = {}, Generator = (function* () {
|
|
128
|
+
var kTouchedIterator = /* @__PURE__ */ Symbol(), { hasOwnProperty } = {}, Generator = (function* () {
|
|
129
129
|
})().constructor, AsyncGenerator = (async function* () {
|
|
130
130
|
})().constructor;
|
|
131
131
|
patchIteratorNext(Generator.prototype);
|
|
@@ -406,7 +406,7 @@ var Serializer = class {
|
|
|
406
406
|
return nextId(this.#state);
|
|
407
407
|
}
|
|
408
408
|
symbol(id) {
|
|
409
|
-
let symbol = Symbol();
|
|
409
|
+
let symbol = /* @__PURE__ */ Symbol();
|
|
410
410
|
return this.#state.refs.set(symbol, new Reference(null, null, 0, null, id)), symbol;
|
|
411
411
|
}
|
|
412
412
|
writeCall(value, object, property, spread) {
|
|
@@ -1041,7 +1041,7 @@ function compareRegisteredReferences(a, b) {
|
|
|
1041
1041
|
|
|
1042
1042
|
// src/html/writer.ts
|
|
1043
1043
|
var $chunk, NOOP = () => {
|
|
1044
|
-
}, K_SCOPE_ID = Symbol("Scope ID"), K_SCOPE_REFERENCED = Symbol("Scope Referenced");
|
|
1044
|
+
}, K_SCOPE_ID = /* @__PURE__ */ Symbol("Scope ID"), K_SCOPE_REFERENCED = /* @__PURE__ */ Symbol("Scope Referenced");
|
|
1045
1045
|
function getChunk() {
|
|
1046
1046
|
return $chunk;
|
|
1047
1047
|
}
|
|
@@ -1075,7 +1075,7 @@ function normalizeServerRender(value) {
|
|
|
1075
1075
|
if (renderer && typeof renderer == "function")
|
|
1076
1076
|
return renderer;
|
|
1077
1077
|
}
|
|
1078
|
-
var kPendingContexts = Symbol("Pending Contexts");
|
|
1078
|
+
var kPendingContexts = /* @__PURE__ */ Symbol("Pending Contexts");
|
|
1079
1079
|
function withContext(key, value, cb, cbValue) {
|
|
1080
1080
|
let ctx = $chunk.context ||= { [kPendingContexts]: 0 }, prev = ctx[key];
|
|
1081
1081
|
ctx[kPendingContexts]++, ctx[key] = value;
|
|
@@ -1145,7 +1145,7 @@ function _resume_branch(scopeId) {
|
|
|
1145
1145
|
let branchId = $chunk.context?.[kBranchId];
|
|
1146
1146
|
branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, { G: branchId });
|
|
1147
1147
|
}
|
|
1148
|
-
var kBranchId = Symbol("Branch Id"), kIsAsync = Symbol("Is Async");
|
|
1148
|
+
var kBranchId = /* @__PURE__ */ Symbol("Branch Id"), kIsAsync = /* @__PURE__ */ Symbol("Is Async");
|
|
1149
1149
|
function isInResumedBranch() {
|
|
1150
1150
|
return $chunk?.context?.[kBranchId] !== void 0;
|
|
1151
1151
|
}
|
|
@@ -1688,7 +1688,7 @@ function _attr_option_value(value) {
|
|
|
1688
1688
|
let selectedValue = getContext(kSelectedValue);
|
|
1689
1689
|
return _attr("value", value) + (!isVoid(value) && (Array.isArray(selectedValue) ? selectedValue.includes(value) : selectedValue === value) ? " selected" : "");
|
|
1690
1690
|
}
|
|
1691
|
-
var kSelectedValue = Symbol("selectedValue");
|
|
1691
|
+
var kSelectedValue = /* @__PURE__ */ Symbol("selectedValue");
|
|
1692
1692
|
function _attr_select_value(scopeId, nodeAccessor, value, valueChange, content) {
|
|
1693
1693
|
valueChange && writeControlledScope(
|
|
1694
1694
|
3 /* SelectValue */,
|
|
@@ -1820,8 +1820,10 @@ function _attrs_content(data, nodeAccessor, scopeId, tagName, serializeReason) {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
function _attrs_partial(data, skip, nodeAccessor, scopeId, tagName) {
|
|
1822
1822
|
let partial = {};
|
|
1823
|
-
for (let
|
|
1824
|
-
|
|
1823
|
+
for (let name in data) {
|
|
1824
|
+
let key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
1825
|
+
skip[key] || (partial[key] = data[name]);
|
|
1826
|
+
}
|
|
1825
1827
|
return _attrs(partial, nodeAccessor, scopeId, tagName);
|
|
1826
1828
|
}
|
|
1827
1829
|
function _attrs_partial_content(data, skip, nodeAccessor, scopeId, tagName, serializeReason) {
|
|
@@ -1975,7 +1977,7 @@ var patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
|
1975
1977
|
})(_dynamic_tag);
|
|
1976
1978
|
|
|
1977
1979
|
// src/html/compat.ts
|
|
1978
|
-
var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
1980
|
+
var K_TAGS_API_STATE = /* @__PURE__ */ Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
1979
1981
|
$global,
|
|
1980
1982
|
fork: _await,
|
|
1981
1983
|
write: _html,
|