@marko/runtime-tags 6.0.114 → 6.0.116
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 +4 -0
- package/dist/debug/dom.mjs +4 -0
- package/dist/debug/html.js +4 -4
- package/dist/debug/html.mjs +3 -3
- package/dist/dom/dom.d.ts +1 -0
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +4 -0
- package/dist/dom.mjs +4 -0
- package/dist/html/content.d.ts +1 -1
- package/dist/html.d.ts +1 -1
- package/dist/html.js +4 -4
- package/dist/html.mjs +3 -3
- package/dist/translator/core/index.d.ts +1 -0
- package/dist/translator/core/title.d.ts +10 -0
- package/dist/translator/index.d.ts +1 -0
- package/dist/translator/index.js +776 -351
- package/dist/translator/util/binding-prop-tree.d.ts +1 -0
- package/dist/translator/util/optional.d.ts +1 -0
- package/dist/translator/util/references.d.ts +1 -0
- package/dist/translator/util/translate-attrs.d.ts +2 -1
- package/package.json +1 -1
- package/tags-html.d.ts +5 -0
package/dist/debug/dom.js
CHANGED
|
@@ -86,6 +86,7 @@ __export(dom_exports, {
|
|
|
86
86
|
_template: () => _template,
|
|
87
87
|
_text: () => _text,
|
|
88
88
|
_text_content: () => _text_content,
|
|
89
|
+
_to_text: () => _to_text,
|
|
89
90
|
_try: () => _try,
|
|
90
91
|
_var: () => _var,
|
|
91
92
|
_var_change: () => _var_change,
|
|
@@ -1334,6 +1335,9 @@ function createCloneableHTML(html, ns) {
|
|
|
1334
1335
|
}
|
|
1335
1336
|
|
|
1336
1337
|
// src/dom/dom.ts
|
|
1338
|
+
function _to_text(value) {
|
|
1339
|
+
return value || value === 0 ? value + "" : "";
|
|
1340
|
+
}
|
|
1337
1341
|
function _attr(element, name, value) {
|
|
1338
1342
|
setAttribute(element, name, normalizeAttrValue(value));
|
|
1339
1343
|
}
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1230,6 +1230,9 @@ function createCloneableHTML(html, ns) {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
|
|
1232
1232
|
// src/dom/dom.ts
|
|
1233
|
+
function _to_text(value) {
|
|
1234
|
+
return value || value === 0 ? value + "" : "";
|
|
1235
|
+
}
|
|
1233
1236
|
function _attr(element, name, value) {
|
|
1234
1237
|
setAttribute(element, name, normalizeAttrValue(value));
|
|
1235
1238
|
}
|
|
@@ -2557,6 +2560,7 @@ export {
|
|
|
2557
2560
|
_template,
|
|
2558
2561
|
_text,
|
|
2559
2562
|
_text_content,
|
|
2563
|
+
_to_text,
|
|
2560
2564
|
_try,
|
|
2561
2565
|
_var,
|
|
2562
2566
|
_var_change,
|
package/dist/debug/html.js
CHANGED
|
@@ -49,7 +49,6 @@ __export(html_exports, {
|
|
|
49
49
|
_escape: () => _escape,
|
|
50
50
|
_escape_script: () => _escape_script,
|
|
51
51
|
_escape_style: () => _escape_style,
|
|
52
|
-
_escape_textarea_value: () => _escape_textarea_value,
|
|
53
52
|
_existing_scope: () => _existing_scope,
|
|
54
53
|
_for_in: () => _for_in,
|
|
55
54
|
_for_of: () => _for_of,
|
|
@@ -74,6 +73,7 @@ __export(html_exports, {
|
|
|
74
73
|
_set_serialize_reason: () => _set_serialize_reason,
|
|
75
74
|
_subscribe: () => _subscribe,
|
|
76
75
|
_template: () => _template,
|
|
76
|
+
_to_text: () => _to_text,
|
|
77
77
|
_trailers: () => _trailers,
|
|
78
78
|
_try: () => _try,
|
|
79
79
|
_unescaped: () => _unescaped,
|
|
@@ -256,7 +256,7 @@ var escapeXMLStr = (str) => unsafeXMLReg.test(str) ? str.replace(unsafeXMLReg, r
|
|
|
256
256
|
function _escape(val) {
|
|
257
257
|
return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "‍";
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function _to_text(val) {
|
|
260
260
|
return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "";
|
|
261
261
|
}
|
|
262
262
|
var unsafeScriptReg = /<\/script/g;
|
|
@@ -2888,7 +2888,7 @@ function _attr_textarea_value(scopeId, nodeAccessor, value, valueChange) {
|
|
|
2888
2888
|
valueChange
|
|
2889
2889
|
);
|
|
2890
2890
|
}
|
|
2891
|
-
return
|
|
2891
|
+
return _to_text(value);
|
|
2892
2892
|
}
|
|
2893
2893
|
function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
|
|
2894
2894
|
if (valueChange) {
|
|
@@ -3653,7 +3653,6 @@ function NOOP3() {
|
|
|
3653
3653
|
_escape,
|
|
3654
3654
|
_escape_script,
|
|
3655
3655
|
_escape_style,
|
|
3656
|
-
_escape_textarea_value,
|
|
3657
3656
|
_existing_scope,
|
|
3658
3657
|
_for_in,
|
|
3659
3658
|
_for_of,
|
|
@@ -3678,6 +3677,7 @@ function NOOP3() {
|
|
|
3678
3677
|
_set_serialize_reason,
|
|
3679
3678
|
_subscribe,
|
|
3680
3679
|
_template,
|
|
3680
|
+
_to_text,
|
|
3681
3681
|
_trailers,
|
|
3682
3682
|
_try,
|
|
3683
3683
|
_unescaped,
|
package/dist/debug/html.mjs
CHANGED
|
@@ -163,7 +163,7 @@ var escapeXMLStr = (str) => unsafeXMLReg.test(str) ? str.replace(unsafeXMLReg, r
|
|
|
163
163
|
function _escape(val) {
|
|
164
164
|
return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "‍";
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function _to_text(val) {
|
|
167
167
|
return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "";
|
|
168
168
|
}
|
|
169
169
|
var unsafeScriptReg = /<\/script/g;
|
|
@@ -2795,7 +2795,7 @@ function _attr_textarea_value(scopeId, nodeAccessor, value, valueChange) {
|
|
|
2795
2795
|
valueChange
|
|
2796
2796
|
);
|
|
2797
2797
|
}
|
|
2798
|
-
return
|
|
2798
|
+
return _to_text(value);
|
|
2799
2799
|
}
|
|
2800
2800
|
function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
|
|
2801
2801
|
if (valueChange) {
|
|
@@ -3559,7 +3559,6 @@ export {
|
|
|
3559
3559
|
_escape,
|
|
3560
3560
|
_escape_script,
|
|
3561
3561
|
_escape_style,
|
|
3562
|
-
_escape_textarea_value,
|
|
3563
3562
|
_existing_scope,
|
|
3564
3563
|
_for_in,
|
|
3565
3564
|
_for_of,
|
|
@@ -3584,6 +3583,7 @@ export {
|
|
|
3584
3583
|
_set_serialize_reason,
|
|
3585
3584
|
_subscribe,
|
|
3586
3585
|
_template,
|
|
3586
|
+
_to_text,
|
|
3587
3587
|
_trailers,
|
|
3588
3588
|
_try,
|
|
3589
3589
|
_unescaped,
|
package/dist/dom/dom.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Accessor, type Scope } from "../common/types";
|
|
2
2
|
import { type Renderer } from "./renderer";
|
|
3
|
+
export declare function _to_text(value: unknown): string;
|
|
3
4
|
export declare function _attr(element: Element, name: string, value: unknown): void;
|
|
4
5
|
export declare function setAttribute(element: Element, name: string, value: string | undefined): void;
|
|
5
6
|
export declare function _attr_class(element: Element, value: unknown): void;
|
package/dist/dom.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { $signal, $signalReset } from "./dom/abort-signal";
|
|
|
6
6
|
export { compat } from "./dom/compat";
|
|
7
7
|
export { _await_content, _await_promise, _dynamic_tag, _for_in, _for_of, _for_to, _for_until, _if, _resume_dynamic_tag, _try, } from "./dom/control-flow";
|
|
8
8
|
export { _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checked_script, _attr_input_checkedValue, _attr_input_checkedValue_script, _attr_input_value, _attr_input_value_script, _attr_select_value, _attr_select_value_script, _attr_textarea_value, _attr_textarea_value_script, } from "./dom/controllable";
|
|
9
|
-
export { _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_content, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _html, _lifecycle, _text, _text_content, } from "./dom/dom";
|
|
9
|
+
export { _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_content, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _html, _lifecycle, _text, _text_content, _to_text, } from "./dom/dom";
|
|
10
10
|
export { _on } from "./dom/event";
|
|
11
11
|
export { _enable_catch as _enable_catch, run } from "./dom/queue";
|
|
12
12
|
export { _content, _content_closures, _content_resume } from "./dom/renderer";
|
package/dist/dom.js
CHANGED
|
@@ -83,6 +83,7 @@ __export(dom_exports, {
|
|
|
83
83
|
_template: () => _template,
|
|
84
84
|
_text: () => _text,
|
|
85
85
|
_text_content: () => _text_content,
|
|
86
|
+
_to_text: () => _to_text,
|
|
86
87
|
_try: () => _try,
|
|
87
88
|
_var: () => _var,
|
|
88
89
|
_var_change: () => _var_change,
|
|
@@ -824,6 +825,9 @@ function createCloneableHTML(html, ns) {
|
|
|
824
825
|
}
|
|
825
826
|
|
|
826
827
|
// src/dom/dom.ts
|
|
828
|
+
function _to_text(value) {
|
|
829
|
+
return value || value === 0 ? value + "" : "";
|
|
830
|
+
}
|
|
827
831
|
function _attr(element, name, value) {
|
|
828
832
|
setAttribute(element, name, normalizeAttrValue(value));
|
|
829
833
|
}
|
package/dist/dom.mjs
CHANGED
|
@@ -723,6 +723,9 @@ function createCloneableHTML(html, ns) {
|
|
|
723
723
|
}
|
|
724
724
|
|
|
725
725
|
// src/dom/dom.ts
|
|
726
|
+
function _to_text(value) {
|
|
727
|
+
return value || value === 0 ? value + "" : "";
|
|
728
|
+
}
|
|
726
729
|
function _attr(element, name, value) {
|
|
727
730
|
setAttribute(element, name, normalizeAttrValue(value));
|
|
728
731
|
}
|
|
@@ -1593,6 +1596,7 @@ export {
|
|
|
1593
1596
|
_template,
|
|
1594
1597
|
_text,
|
|
1595
1598
|
_text_content,
|
|
1599
|
+
_to_text,
|
|
1596
1600
|
_try,
|
|
1597
1601
|
_var,
|
|
1598
1602
|
_var_change,
|
package/dist/html/content.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function _unescaped(val: unknown): string;
|
|
2
2
|
export declare function _escape(val: unknown): string;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function _to_text(val: unknown): string;
|
|
4
4
|
export declare function _escape_script(val: unknown): string;
|
|
5
5
|
export declare function _escape_style(val: unknown): string;
|
package/dist/html.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { attrTag, attrTags } from "./common/attr-tag";
|
|
|
2
2
|
export { _assert_hoist, _el_read_error, _hoist_read_error, } from "./common/errors";
|
|
3
3
|
export { _attr, _attr_class, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_option_value, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, } from "./html/attrs";
|
|
4
4
|
export { compat } from "./html/compat";
|
|
5
|
-
export { _escape, _escape_script, _escape_style,
|
|
5
|
+
export { _escape, _escape_script, _escape_style, _to_text, _unescaped, } from "./html/content";
|
|
6
6
|
export { _content, _content_resume, _dynamic_tag } from "./html/dynamic-tag";
|
|
7
7
|
export { forIn, forInBy, forOf, forOfBy, forStepBy, forTo, forUntil, } from "./html/for";
|
|
8
8
|
export { _template } from "./html/template";
|
package/dist/html.js
CHANGED
|
@@ -46,7 +46,6 @@ __export(html_exports, {
|
|
|
46
46
|
_escape: () => _escape,
|
|
47
47
|
_escape_script: () => _escape_script,
|
|
48
48
|
_escape_style: () => _escape_style,
|
|
49
|
-
_escape_textarea_value: () => _escape_textarea_value,
|
|
50
49
|
_existing_scope: () => _existing_scope,
|
|
51
50
|
_for_in: () => _for_in,
|
|
52
51
|
_for_of: () => _for_of,
|
|
@@ -71,6 +70,7 @@ __export(html_exports, {
|
|
|
71
70
|
_set_serialize_reason: () => _set_serialize_reason,
|
|
72
71
|
_subscribe: () => _subscribe,
|
|
73
72
|
_template: () => _template,
|
|
73
|
+
_to_text: () => _to_text,
|
|
74
74
|
_trailers: () => _trailers,
|
|
75
75
|
_try: () => _try,
|
|
76
76
|
_unescaped: () => _unescaped,
|
|
@@ -160,7 +160,7 @@ var unsafeXMLReg = /[<&]/g, replaceUnsafeXML = (c) => c === "&" ? "&" : "<
|
|
|
160
160
|
function _escape(val) {
|
|
161
161
|
return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "‍";
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function _to_text(val) {
|
|
164
164
|
return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "";
|
|
165
165
|
}
|
|
166
166
|
var unsafeScriptReg = /<\/script/g, escapeScriptStr = (str) => unsafeScriptReg.test(str) ? str.replace(unsafeScriptReg, "\\x3C/script") : str;
|
|
@@ -1786,7 +1786,7 @@ function _attr_textarea_value(scopeId, nodeAccessor, value, valueChange) {
|
|
|
1786
1786
|
nodeAccessor,
|
|
1787
1787
|
void 0,
|
|
1788
1788
|
valueChange
|
|
1789
|
-
),
|
|
1789
|
+
), _to_text(value);
|
|
1790
1790
|
}
|
|
1791
1791
|
function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
|
|
1792
1792
|
return valueChange && writeControlledScope(
|
|
@@ -2328,7 +2328,6 @@ function NOOP3() {
|
|
|
2328
2328
|
_escape,
|
|
2329
2329
|
_escape_script,
|
|
2330
2330
|
_escape_style,
|
|
2331
|
-
_escape_textarea_value,
|
|
2332
2331
|
_existing_scope,
|
|
2333
2332
|
_for_in,
|
|
2334
2333
|
_for_of,
|
|
@@ -2353,6 +2352,7 @@ function NOOP3() {
|
|
|
2353
2352
|
_set_serialize_reason,
|
|
2354
2353
|
_subscribe,
|
|
2355
2354
|
_template,
|
|
2355
|
+
_to_text,
|
|
2356
2356
|
_trailers,
|
|
2357
2357
|
_try,
|
|
2358
2358
|
_unescaped,
|
package/dist/html.mjs
CHANGED
|
@@ -70,7 +70,7 @@ var unsafeXMLReg = /[<&]/g, replaceUnsafeXML = (c) => c === "&" ? "&" : "<
|
|
|
70
70
|
function _escape(val) {
|
|
71
71
|
return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "‍";
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function _to_text(val) {
|
|
74
74
|
return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "";
|
|
75
75
|
}
|
|
76
76
|
var unsafeScriptReg = /<\/script/g, escapeScriptStr = (str) => unsafeScriptReg.test(str) ? str.replace(unsafeScriptReg, "\\x3C/script") : str;
|
|
@@ -1696,7 +1696,7 @@ function _attr_textarea_value(scopeId, nodeAccessor, value, valueChange) {
|
|
|
1696
1696
|
nodeAccessor,
|
|
1697
1697
|
void 0,
|
|
1698
1698
|
valueChange
|
|
1699
|
-
),
|
|
1699
|
+
), _to_text(value);
|
|
1700
1700
|
}
|
|
1701
1701
|
function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
|
|
1702
1702
|
return valueChange && writeControlledScope(
|
|
@@ -2237,7 +2237,6 @@ export {
|
|
|
2237
2237
|
_escape,
|
|
2238
2238
|
_escape_script,
|
|
2239
2239
|
_escape_style,
|
|
2240
|
-
_escape_textarea_value,
|
|
2241
2240
|
_existing_scope,
|
|
2242
2241
|
_for_in,
|
|
2243
2242
|
_for_of,
|
|
@@ -2262,6 +2261,7 @@ export {
|
|
|
2262
2261
|
_set_serialize_reason,
|
|
2263
2262
|
_subscribe,
|
|
2264
2263
|
_template,
|
|
2264
|
+
_to_text,
|
|
2265
2265
|
_trailers,
|
|
2266
2266
|
_try,
|
|
2267
2267
|
_unescaped,
|
|
@@ -156,6 +156,7 @@ declare const _default: {
|
|
|
156
156
|
};
|
|
157
157
|
"<style>": import("@marko/compiler/babel-utils").Tag;
|
|
158
158
|
"<textarea>": import("@marko/compiler/babel-utils").Tag;
|
|
159
|
+
"<title>": import("@marko/compiler/babel-utils").Tag;
|
|
159
160
|
"<try>": import("@marko/compiler/babel-utils").Tag;
|
|
160
161
|
};
|
|
161
162
|
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Tag } from "@marko/compiler/babel-utils";
|
|
2
|
+
import { type Binding } from "../util/references";
|
|
3
|
+
declare const kNodeBinding: unique symbol;
|
|
4
|
+
declare module "@marko/compiler/dist/types" {
|
|
5
|
+
interface NodeExtra {
|
|
6
|
+
[kNodeBinding]?: Binding;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
declare const _default: Tag;
|
|
10
|
+
export default _default;
|
|
@@ -162,6 +162,7 @@ export declare const taglibs: (string | {
|
|
|
162
162
|
};
|
|
163
163
|
"<style>": import("@marko/compiler/babel-utils").Tag;
|
|
164
164
|
"<textarea>": import("@marko/compiler/babel-utils").Tag;
|
|
165
|
+
"<title>": import("@marko/compiler/babel-utils").Tag;
|
|
165
166
|
"<try>": import("@marko/compiler/babel-utils").Tag;
|
|
166
167
|
})[][];
|
|
167
168
|
export declare function getRuntimeEntryFiles(output: Config["output"], optimize: boolean): string[];
|