@lark.js/mvc 0.0.10 → 0.0.11

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/runtime.cjs CHANGED
@@ -24,7 +24,7 @@ __export(runtime_exports, {
24
24
  encQuote: () => encQuote,
25
25
  encUri: () => encUri,
26
26
  refFn: () => refFn,
27
- strSafe: () => strSafe
27
+ strSafe: () => strSafe2
28
28
  });
29
29
  module.exports = __toCommonJS(runtime_exports);
30
30
 
@@ -42,7 +42,7 @@ var HTML_ENT_MAP = {
42
42
  "`": "#96"
43
43
  };
44
44
  var HTML_ENT_REGEXP = /[&<>"'`]/g;
45
- function encodeSafe(v) {
45
+ function strSafe(v) {
46
46
  return String(v == null ? "" : v);
47
47
  }
48
48
  function encodeHTML(v) {
@@ -60,14 +60,14 @@ var URI_ENT_MAP = {
60
60
  };
61
61
  var URI_ENT_REGEXP = /[!')(*]/g;
62
62
  function encodeURIExtra(v) {
63
- return encodeURIComponent(encodeSafe(v)).replace(
63
+ return encodeURIComponent(strSafe(v)).replace(
64
64
  URI_ENT_REGEXP,
65
65
  (m) => URI_ENT_MAP[m]
66
66
  );
67
67
  }
68
68
  var QUOTE_ENT_REGEXP = /['"\\]/g;
69
- function encodeQ(v) {
70
- return encodeSafe(v).replace(QUOTE_ENT_REGEXP, "\\$&");
69
+ function encodeQuote(v) {
70
+ return strSafe(v).replace(QUOTE_ENT_REGEXP, "\\$&");
71
71
  }
72
72
  function refFn(ref, value, key) {
73
73
  const counter = ref[SPLITTER];
@@ -81,10 +81,10 @@ function refFn(ref, value, key) {
81
81
  }
82
82
 
83
83
  // src/runtime.ts
84
- var strSafe = encodeSafe;
84
+ var strSafe2 = strSafe;
85
85
  var encHtml = encodeHTML;
86
86
  var encUri = encodeURIExtra;
87
- var encQuote = encodeQ;
87
+ var encQuote = encodeQuote;
88
88
  // Annotate the CommonJS export names for ESM import in node:
89
89
  0 && (module.exports = {
90
90
  encHtml,
@@ -1,11 +1,11 @@
1
1
  /** Null-safe String conversion */
2
- declare function encodeSafe(v: unknown): string;
2
+ declare function strSafe$1(v: unknown): string;
3
3
  /** HTML entity encoding for safe output */
4
4
  declare function encodeHTML(v: unknown): string;
5
5
  /** URI-encode with extra character encoding */
6
6
  declare function encodeURIExtra(v: unknown): string;
7
7
  /** Quote-encode for attribute values */
8
- declare function encodeQ(v: unknown): string;
8
+ declare function encodeQuote(v: unknown): string;
9
9
  /**
10
10
  * Template reference function for creating stable keys for objects.
11
11
  * Stores objects in refData with SPLITTER-prefixed keys.
@@ -27,12 +27,12 @@ declare function refFn(ref: Record<string, unknown>, value: unknown, key: string
27
27
  */
28
28
 
29
29
  /** Null-safe `String(value)` — `null`/`undefined` become `""`. */
30
- declare const strSafe: typeof encodeSafe;
30
+ declare const strSafe: typeof strSafe$1;
31
31
  /** HTML-escape a value for safe embedding in markup. */
32
32
  declare const encHtml: typeof encodeHTML;
33
33
  /** Percent-encode a value, with extra characters escaped for stricter URIs. */
34
34
  declare const encUri: typeof encodeURIExtra;
35
35
  /** Backslash-escape quotes and backslashes for attribute string contents. */
36
- declare const encQuote: typeof encodeQ;
36
+ declare const encQuote: typeof encodeQuote;
37
37
 
38
38
  export { encHtml, encQuote, encUri, refFn, strSafe };
package/dist/runtime.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /** Null-safe String conversion */
2
- declare function encodeSafe(v: unknown): string;
2
+ declare function strSafe$1(v: unknown): string;
3
3
  /** HTML entity encoding for safe output */
4
4
  declare function encodeHTML(v: unknown): string;
5
5
  /** URI-encode with extra character encoding */
6
6
  declare function encodeURIExtra(v: unknown): string;
7
7
  /** Quote-encode for attribute values */
8
- declare function encodeQ(v: unknown): string;
8
+ declare function encodeQuote(v: unknown): string;
9
9
  /**
10
10
  * Template reference function for creating stable keys for objects.
11
11
  * Stores objects in refData with SPLITTER-prefixed keys.
@@ -27,12 +27,12 @@ declare function refFn(ref: Record<string, unknown>, value: unknown, key: string
27
27
  */
28
28
 
29
29
  /** Null-safe `String(value)` — `null`/`undefined` become `""`. */
30
- declare const strSafe: typeof encodeSafe;
30
+ declare const strSafe: typeof strSafe$1;
31
31
  /** HTML-escape a value for safe embedding in markup. */
32
32
  declare const encHtml: typeof encodeHTML;
33
33
  /** Percent-encode a value, with extra characters escaped for stricter URIs. */
34
34
  declare const encUri: typeof encodeURIExtra;
35
35
  /** Backslash-escape quotes and backslashes for attribute string contents. */
36
- declare const encQuote: typeof encodeQ;
36
+ declare const encQuote: typeof encodeQuote;
37
37
 
38
38
  export { encHtml, encQuote, encUri, refFn, strSafe };
package/dist/runtime.js CHANGED
@@ -1,64 +1,20 @@
1
- // src/common.ts
2
- var SPLITTER = String.fromCharCode(30);
3
- var EVENT_METHOD_REGEXP = new RegExp(
4
- `(?:([\\w-]+)${SPLITTER})?([^(]+)\\(([\\s\\S]*?)?\\)`
5
- );
6
- var HTML_ENT_MAP = {
7
- "&": "amp",
8
- "<": "lt",
9
- ">": "gt",
10
- '"': "#34",
11
- "'": "#39",
12
- "`": "#96"
13
- };
14
- var HTML_ENT_REGEXP = /[&<>"'`]/g;
15
- function encodeSafe(v) {
16
- return String(v == null ? "" : v);
17
- }
18
- function encodeHTML(v) {
19
- return String(v == null ? "" : v).replace(
20
- HTML_ENT_REGEXP,
21
- (m) => "&" + HTML_ENT_MAP[m] + ";"
22
- );
23
- }
24
- var URI_ENT_MAP = {
25
- "!": "%21",
26
- "'": "%27",
27
- "(": "%28",
28
- ")": "%29",
29
- "*": "%2A"
30
- };
31
- var URI_ENT_REGEXP = /[!')(*]/g;
32
- function encodeURIExtra(v) {
33
- return encodeURIComponent(encodeSafe(v)).replace(
34
- URI_ENT_REGEXP,
35
- (m) => URI_ENT_MAP[m]
36
- );
37
- }
38
- var QUOTE_ENT_REGEXP = /['"\\]/g;
39
- function encodeQ(v) {
40
- return encodeSafe(v).replace(QUOTE_ENT_REGEXP, "\\$&");
41
- }
42
- function refFn(ref, value, key) {
43
- const counter = ref[SPLITTER];
44
- for (let i = counter; --i; ) {
45
- key = SPLITTER + i;
46
- if (ref[key] === value) return key;
47
- }
48
- key = SPLITTER + ref[SPLITTER]++;
49
- ref[key] = value;
50
- return key;
51
- }
1
+ import {
2
+ encodeHTML,
3
+ encodeQuote,
4
+ encodeURIExtra,
5
+ refFn,
6
+ strSafe
7
+ } from "./chunk-RIV4NK3K.js";
52
8
 
53
9
  // src/runtime.ts
54
- var strSafe = encodeSafe;
10
+ var strSafe2 = strSafe;
55
11
  var encHtml = encodeHTML;
56
12
  var encUri = encodeURIExtra;
57
- var encQuote = encodeQ;
13
+ var encQuote = encodeQuote;
58
14
  export {
59
15
  encHtml,
60
16
  encQuote,
61
17
  encUri,
62
18
  refFn,
63
- strSafe
19
+ strSafe2 as strSafe
64
20
  };