@marko/runtime-tags 6.0.116 → 6.0.118

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 CHANGED
@@ -38,6 +38,7 @@ __export(dom_exports, {
38
38
  _attr_input_checked_script: () => _attr_input_checked_script,
39
39
  _attr_input_value: () => _attr_input_value,
40
40
  _attr_input_value_script: () => _attr_input_value_script,
41
+ _attr_nonce: () => _attr_nonce,
41
42
  _attr_select_value: () => _attr_select_value,
42
43
  _attr_select_value_script: () => _attr_select_value_script,
43
44
  _attr_style: () => _attr_style,
@@ -1372,6 +1373,9 @@ function _attr_style_items(element, items) {
1372
1373
  function _attr_style_item(element, name, value) {
1373
1374
  element.style.setProperty(name, value || value === 0 ? value + "" : "");
1374
1375
  }
1376
+ function _attr_nonce(scope, nodeAccessor) {
1377
+ _attr(scope[nodeAccessor], "nonce", scope["$global" /* Global */].cspNonce);
1378
+ }
1375
1379
  function _text(node, value) {
1376
1380
  const normalizedValue = normalizeString(value);
1377
1381
  if (node.data !== normalizedValue) {
@@ -1267,6 +1267,9 @@ function _attr_style_items(element, items) {
1267
1267
  function _attr_style_item(element, name, value) {
1268
1268
  element.style.setProperty(name, value || value === 0 ? value + "" : "");
1269
1269
  }
1270
+ function _attr_nonce(scope, nodeAccessor) {
1271
+ _attr(scope[nodeAccessor], "nonce", scope["$global" /* Global */].cspNonce);
1272
+ }
1270
1273
  function _text(node, value) {
1271
1274
  const normalizedValue = normalizeString(value);
1272
1275
  if (node.data !== normalizedValue) {
@@ -2512,6 +2515,7 @@ export {
2512
2515
  _attr_input_checked_script,
2513
2516
  _attr_input_value,
2514
2517
  _attr_input_value_script,
2518
+ _attr_nonce,
2515
2519
  _attr_select_value,
2516
2520
  _attr_select_value_script,
2517
2521
  _attr_style,
@@ -49,6 +49,7 @@ __export(html_exports, {
49
49
  _escape: () => _escape,
50
50
  _escape_script: () => _escape_script,
51
51
  _escape_style: () => _escape_style,
52
+ _escape_text: () => _escape_text,
52
53
  _existing_scope: () => _existing_scope,
53
54
  _for_in: () => _for_in,
54
55
  _for_of: () => _for_of,
@@ -73,7 +74,6 @@ __export(html_exports, {
73
74
  _set_serialize_reason: () => _set_serialize_reason,
74
75
  _subscribe: () => _subscribe,
75
76
  _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 _to_text(val) {
259
+ function _escape_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 _to_text(value);
2891
+ return _escape_text(value);
2892
2892
  }
2893
2893
  function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
2894
2894
  if (valueChange) {
@@ -3653,6 +3653,7 @@ function NOOP3() {
3653
3653
  _escape,
3654
3654
  _escape_script,
3655
3655
  _escape_style,
3656
+ _escape_text,
3656
3657
  _existing_scope,
3657
3658
  _for_in,
3658
3659
  _for_of,
@@ -3677,7 +3678,6 @@ function NOOP3() {
3677
3678
  _set_serialize_reason,
3678
3679
  _subscribe,
3679
3680
  _template,
3680
- _to_text,
3681
3681
  _trailers,
3682
3682
  _try,
3683
3683
  _unescaped,
@@ -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" : "&zwj;";
165
165
  }
166
- function _to_text(val) {
166
+ function _escape_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 _to_text(value);
2798
+ return _escape_text(value);
2799
2799
  }
2800
2800
  function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
2801
2801
  if (valueChange) {
@@ -3559,6 +3559,7 @@ export {
3559
3559
  _escape,
3560
3560
  _escape_script,
3561
3561
  _escape_style,
3562
+ _escape_text,
3562
3563
  _existing_scope,
3563
3564
  _for_in,
3564
3565
  _for_of,
@@ -3583,7 +3584,6 @@ export {
3583
3584
  _set_serialize_reason,
3584
3585
  _subscribe,
3585
3586
  _template,
3586
- _to_text,
3587
3587
  _trailers,
3588
3588
  _try,
3589
3589
  _unescaped,
package/dist/dom/dom.d.ts CHANGED
@@ -9,6 +9,7 @@ export declare function _attr_class_item(element: Element, name: string, value:
9
9
  export declare function _attr_style(element: Element, value: unknown): void;
10
10
  export declare function _attr_style_items(element: HTMLElement, items: Record<string, unknown>): void;
11
11
  export declare function _attr_style_item(element: HTMLElement, name: string, value: unknown): void;
12
+ export declare function _attr_nonce(scope: Scope, nodeAccessor: Accessor): void;
12
13
  export declare function _text(node: Text | Comment, value: unknown): void;
13
14
  export declare function _text_content(node: ParentNode, value: unknown): void;
14
15
  export declare function _attrs(scope: Scope, nodeAccessor: Accessor, nextAttrs: Record<string, 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, _to_text, } from "./dom/dom";
9
+ export { _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_content, _attr_nonce, _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
@@ -35,6 +35,7 @@ __export(dom_exports, {
35
35
  _attr_input_checked_script: () => _attr_input_checked_script,
36
36
  _attr_input_value: () => _attr_input_value,
37
37
  _attr_input_value_script: () => _attr_input_value_script,
38
+ _attr_nonce: () => _attr_nonce,
38
39
  _attr_select_value: () => _attr_select_value,
39
40
  _attr_select_value_script: () => _attr_select_value_script,
40
41
  _attr_style: () => _attr_style,
@@ -854,6 +855,9 @@ function _attr_style_items(element, items) {
854
855
  function _attr_style_item(element, name, value) {
855
856
  element.style.setProperty(name, value || value === 0 ? value + "" : "");
856
857
  }
858
+ function _attr_nonce(scope, nodeAccessor) {
859
+ _attr(scope[nodeAccessor], "nonce", scope.$.cspNonce);
860
+ }
857
861
  function _text(node, value) {
858
862
  let normalizedValue = normalizeString(value);
859
863
  node.data !== normalizedValue && (node.data = normalizedValue);
package/dist/dom.mjs CHANGED
@@ -752,6 +752,9 @@ function _attr_style_items(element, items) {
752
752
  function _attr_style_item(element, name, value) {
753
753
  element.style.setProperty(name, value || value === 0 ? value + "" : "");
754
754
  }
755
+ function _attr_nonce(scope, nodeAccessor) {
756
+ _attr(scope[nodeAccessor], "nonce", scope.$.cspNonce);
757
+ }
755
758
  function _text(node, value) {
756
759
  let normalizedValue = normalizeString(value);
757
760
  node.data !== normalizedValue && (node.data = normalizedValue);
@@ -1548,6 +1551,7 @@ export {
1548
1551
  _attr_input_checked_script,
1549
1552
  _attr_input_value,
1550
1553
  _attr_input_value_script,
1554
+ _attr_nonce,
1551
1555
  _attr_select_value,
1552
1556
  _attr_select_value_script,
1553
1557
  _attr_style,
@@ -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 _to_text(val: unknown): string;
3
+ export declare function _escape_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, _to_text, _unescaped, } from "./html/content";
5
+ export { _escape, _escape_script, _escape_style, _escape_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,6 +46,7 @@ __export(html_exports, {
46
46
  _escape: () => _escape,
47
47
  _escape_script: () => _escape_script,
48
48
  _escape_style: () => _escape_style,
49
+ _escape_text: () => _escape_text,
49
50
  _existing_scope: () => _existing_scope,
50
51
  _for_in: () => _for_in,
51
52
  _for_of: () => _for_of,
@@ -70,7 +71,6 @@ __export(html_exports, {
70
71
  _set_serialize_reason: () => _set_serialize_reason,
71
72
  _subscribe: () => _subscribe,
72
73
  _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 === "&" ? "&amp;" : "&lt
160
160
  function _escape(val) {
161
161
  return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "&zwj;";
162
162
  }
163
- function _to_text(val) {
163
+ function _escape_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
- ), _to_text(value);
1789
+ ), _escape_text(value);
1790
1790
  }
1791
1791
  function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
1792
1792
  return valueChange && writeControlledScope(
@@ -2328,6 +2328,7 @@ function NOOP3() {
2328
2328
  _escape,
2329
2329
  _escape_script,
2330
2330
  _escape_style,
2331
+ _escape_text,
2331
2332
  _existing_scope,
2332
2333
  _for_in,
2333
2334
  _for_of,
@@ -2352,7 +2353,6 @@ function NOOP3() {
2352
2353
  _set_serialize_reason,
2353
2354
  _subscribe,
2354
2355
  _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 === "&" ? "&amp;" : "&lt
70
70
  function _escape(val) {
71
71
  return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "&zwj;";
72
72
  }
73
- function _to_text(val) {
73
+ function _escape_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
- ), _to_text(value);
1699
+ ), _escape_text(value);
1700
1700
  }
1701
1701
  function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
1702
1702
  return valueChange && writeControlledScope(
@@ -2237,6 +2237,7 @@ export {
2237
2237
  _escape,
2238
2238
  _escape_script,
2239
2239
  _escape_style,
2240
+ _escape_text,
2240
2241
  _existing_scope,
2241
2242
  _for_in,
2242
2243
  _for_of,
@@ -2261,7 +2262,6 @@ export {
2261
2262
  _set_serialize_reason,
2262
2263
  _subscribe,
2263
2264
  _template,
2264
- _to_text,
2265
2265
  _trailers,
2266
2266
  _try,
2267
2267
  _unescaped,
@@ -1,10 +1,3 @@
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
- }
1
+ import type { Tag } from "@marko/compiler/babel-utils";
9
2
  declare const _default: Tag;
10
3
  export default _default;
@@ -1,10 +1,3 @@
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
- }
1
+ import type { Tag } from "@marko/compiler/babel-utils";
9
2
  declare const _default: Tag;
10
3
  export default _default;
@@ -155,8 +155,6 @@ declare const _default: {
155
155
  }[];
156
156
  };
157
157
  "<style>": import("@marko/compiler/babel-utils").Tag;
158
- "<textarea>": import("@marko/compiler/babel-utils").Tag;
159
- "<title>": import("@marko/compiler/babel-utils").Tag;
160
158
  "<try>": import("@marko/compiler/babel-utils").Tag;
161
159
  };
162
160
  export default _default;
@@ -1,3 +1,2 @@
1
- import type { Tag } from "@marko/compiler/babel-utils";
2
- declare const _default: Tag;
3
- export default _default;
1
+ import { types as t } from "@marko/compiler";
2
+ export declare function preAnalyze(tag: t.NodePath<t.MarkoTag>): void;
@@ -161,8 +161,6 @@ export declare const taglibs: (string | {
161
161
  }[];
162
162
  };
163
163
  "<style>": import("@marko/compiler/babel-utils").Tag;
164
- "<textarea>": import("@marko/compiler/babel-utils").Tag;
165
- "<title>": import("@marko/compiler/babel-utils").Tag;
166
164
  "<try>": import("@marko/compiler/babel-utils").Tag;
167
165
  })[][];
168
166
  export declare function getRuntimeEntryFiles(output: Config["output"], optimize: boolean): string[];