@weapp-vite/web 1.6.0 → 2.0.1

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.
Files changed (63) hide show
  1. package/README.md +22 -0
  2. package/dist/compiler/wxml/compile.mjs +9 -33
  3. package/dist/compiler/wxml/compile.mjs.map +1 -1
  4. package/dist/compiler/wxml/dependency.mjs +9 -1
  5. package/dist/compiler/wxml/dependency.mjs.map +1 -1
  6. package/dist/compiler/wxml/prepare.mjs +43 -0
  7. package/dist/compiler/wxml/prepare.mjs.map +1 -0
  8. package/dist/css/wxss.mjs +2 -1
  9. package/dist/css/wxss.mjs.map +1 -1
  10. package/dist/plugin/assets.d.mts +1 -0
  11. package/dist/plugin/constants.mjs +4 -2
  12. package/dist/plugin/constants.mjs.map +1 -1
  13. package/dist/plugin/hostTypes.d.mts +75 -0
  14. package/dist/plugin/index.d.mts +2 -74
  15. package/dist/plugin/index.mjs +28 -16
  16. package/dist/plugin/index.mjs.map +1 -1
  17. package/dist/plugin/sfcHmr.mjs +38 -0
  18. package/dist/plugin/sfcHmr.mjs.map +1 -0
  19. package/dist/plugin/vueSfc.mjs +12 -9
  20. package/dist/plugin/vueSfc.mjs.map +1 -1
  21. package/dist/runtime/appStyle.mjs +25 -0
  22. package/dist/runtime/appStyle.mjs.map +1 -0
  23. package/dist/runtime/component/element.mjs +39 -19
  24. package/dist/runtime/component/element.mjs.map +1 -1
  25. package/dist/runtime/component/events.mjs +34 -3
  26. package/dist/runtime/component/events.mjs.map +1 -1
  27. package/dist/runtime/component/publicInstance.mjs +7 -3
  28. package/dist/runtime/component/publicInstance.mjs.map +1 -1
  29. package/dist/runtime/component/state.mjs +7 -0
  30. package/dist/runtime/component/state.mjs.map +1 -1
  31. package/dist/runtime/component/types.d.mts +2 -0
  32. package/dist/runtime/component/utils.mjs +23 -3
  33. package/dist/runtime/component/utils.mjs.map +1 -1
  34. package/dist/runtime/componentEvents.mjs +37 -0
  35. package/dist/runtime/componentEvents.mjs.map +1 -0
  36. package/dist/runtime/eventBinding.d.mts +1 -0
  37. package/dist/runtime/eventBinding.mjs +5 -2
  38. package/dist/runtime/eventBinding.mjs.map +1 -1
  39. package/dist/runtime/hostGlobals.d.mts +1 -0
  40. package/dist/runtime/legacyTemplate/dom.mjs +2 -7
  41. package/dist/runtime/legacyTemplate/dom.mjs.map +1 -1
  42. package/dist/runtime/nativeComponents/canvas/index.mjs +12 -3
  43. package/dist/runtime/nativeComponents/canvas/index.mjs.map +1 -1
  44. package/dist/runtime/nativeComponents/index.mjs +0 -1
  45. package/dist/runtime/nativeComponents/index.mjs.map +1 -1
  46. package/dist/runtime/nativeComponents/richText/index.mjs +2 -2
  47. package/dist/runtime/nativeComponents/richText/index.mjs.map +1 -1
  48. package/dist/runtime/pageLayout.d.mts +1 -0
  49. package/dist/runtime/polyfill/index.mjs +1 -1
  50. package/dist/runtime/polyfill/routeRuntime/options.d.mts +1 -0
  51. package/dist/runtime/polyfill/routeRuntime.d.mts +1 -1
  52. package/dist/runtime/polyfill/routeRuntime.mjs +5 -1
  53. package/dist/runtime/polyfill/routeRuntime.mjs.map +1 -1
  54. package/dist/runtime/renderContext.mjs +3 -2
  55. package/dist/runtime/renderContext.mjs.map +1 -1
  56. package/dist/runtime/wevu.d.mts +1 -0
  57. package/dist/runtime/wevu.mjs +2 -0
  58. package/dist/runtime/wevu.mjs.map +1 -1
  59. package/dist/shared/wxml.mjs +5 -1
  60. package/dist/shared/wxml.mjs.map +1 -1
  61. package/package.json +15 -13
  62. package/dist/runtime/nativeComponents/richText/helpers.mjs +0 -230
  63. package/dist/runtime/nativeComponents/richText/helpers.mjs.map +0 -1
@@ -1,230 +0,0 @@
1
- import { parseDocument } from "htmlparser2";
2
-
3
- //#region src/runtime/nativeComponents/richText/helpers.ts
4
- const ALLOWED_TAGS = /* @__PURE__ */ new Set([
5
- "a",
6
- "abbr",
7
- "address",
8
- "article",
9
- "aside",
10
- "b",
11
- "bdi",
12
- "bdo",
13
- "big",
14
- "blockquote",
15
- "br",
16
- "caption",
17
- "center",
18
- "cite",
19
- "code",
20
- "col",
21
- "colgroup",
22
- "dd",
23
- "del",
24
- "div",
25
- "dl",
26
- "dt",
27
- "em",
28
- "fieldset",
29
- "font",
30
- "h1",
31
- "h2",
32
- "h3",
33
- "h4",
34
- "h5",
35
- "h6",
36
- "header",
37
- "hr",
38
- "i",
39
- "img",
40
- "ins",
41
- "label",
42
- "legend",
43
- "li",
44
- "mark",
45
- "ol",
46
- "p",
47
- "pre",
48
- "q",
49
- "rt",
50
- "ruby",
51
- "s",
52
- "section",
53
- "small",
54
- "span",
55
- "strong",
56
- "sub",
57
- "sup",
58
- "table",
59
- "tbody",
60
- "td",
61
- "tfoot",
62
- "th",
63
- "thead",
64
- "tr",
65
- "tt",
66
- "u",
67
- "ul"
68
- ]);
69
- const ALLOWED_ATTRIBUTES = /* @__PURE__ */ new Set([
70
- "abbr",
71
- "align",
72
- "alt",
73
- "axis",
74
- "bgcolor",
75
- "border",
76
- "cellpadding",
77
- "cellspacing",
78
- "class",
79
- "colspan",
80
- "dir",
81
- "height",
82
- "href",
83
- "id",
84
- "lang",
85
- "rowspan",
86
- "scope",
87
- "span",
88
- "start",
89
- "style",
90
- "summary",
91
- "target",
92
- "title",
93
- "type",
94
- "valign",
95
- "width"
96
- ]);
97
- const URL_ATTRIBUTES = /* @__PURE__ */ new Set(["href", "src"]);
98
- const ALLOWED_STYLE_PROPERTIES = /* @__PURE__ */ new Set([
99
- "background",
100
- "background-color",
101
- "border",
102
- "border-bottom",
103
- "border-color",
104
- "border-left",
105
- "border-radius",
106
- "border-right",
107
- "border-style",
108
- "border-top",
109
- "border-width",
110
- "color",
111
- "display",
112
- "font-family",
113
- "font-size",
114
- "font-style",
115
- "font-weight",
116
- "height",
117
- "letter-spacing",
118
- "line-height",
119
- "margin",
120
- "margin-bottom",
121
- "margin-left",
122
- "margin-right",
123
- "margin-top",
124
- "max-height",
125
- "max-width",
126
- "min-height",
127
- "min-width",
128
- "opacity",
129
- "overflow",
130
- "padding",
131
- "padding-bottom",
132
- "padding-left",
133
- "padding-right",
134
- "padding-top",
135
- "text-align",
136
- "text-decoration",
137
- "text-indent",
138
- "text-overflow",
139
- "text-transform",
140
- "vertical-align",
141
- "white-space",
142
- "width",
143
- "word-break",
144
- "word-wrap"
145
- ]);
146
- function isRecord(value) {
147
- return Boolean(value) && typeof value === "object" && !Array.isArray(value);
148
- }
149
- function isSafeUrl(value, attribute) {
150
- const normalized = Array.from(value).filter((character) => character.charCodeAt(0) > 32).join("").toLowerCase();
151
- if (!normalized || normalized.startsWith("#") || normalized.startsWith("/") || normalized.startsWith("./") || normalized.startsWith("../")) return true;
152
- if (/^(?:https?:|mailto:|tel:)/.test(normalized)) return true;
153
- return attribute === "src" && /^data:image\/(?:gif|jpe?g|png|webp);base64,/.test(normalized);
154
- }
155
- function isSafeStyleValue(value) {
156
- const normalized = value.toLowerCase().replace(/\s+/g, "");
157
- return !normalized.includes("url(") && !normalized.includes("expression(") && !normalized.includes("javascript:") && !normalized.includes("behavior:") && !normalized.includes("-moz-binding");
158
- }
159
- function sanitizeRichTextStyle(value) {
160
- const source = isRecord(value) ? Object.entries(value).map(([property, propertyValue]) => `${property}:${String(propertyValue)}`).join(";") : String(value ?? "");
161
- const declarations = [];
162
- for (const declaration of source.split(";")) {
163
- const separator = declaration.indexOf(":");
164
- if (separator <= 0) continue;
165
- const property = declaration.slice(0, separator).trim().toLowerCase();
166
- const propertyValue = declaration.slice(separator + 1).trim();
167
- if (ALLOWED_STYLE_PROPERTIES.has(property) && propertyValue && isSafeStyleValue(propertyValue)) declarations.push(`${property}: ${propertyValue}`);
168
- }
169
- return declarations.join("; ");
170
- }
171
- function sanitizeRichTextAttributes(value, tagName) {
172
- if (!isRecord(value)) return {};
173
- const attributes = {};
174
- for (const [rawName, rawValue] of Object.entries(value)) {
175
- const name = rawName.trim().toLowerCase();
176
- if (name.startsWith("on") || name === "srcdoc") continue;
177
- if (!ALLOWED_ATTRIBUTES.has(name) && name !== "src" && !name.startsWith("aria-") && !name.startsWith("data-")) continue;
178
- if (name === "src" && tagName !== "img") continue;
179
- const serialized = name === "style" ? sanitizeRichTextStyle(rawValue) : String(rawValue ?? "");
180
- if (!serialized || URL_ATTRIBUTES.has(name) && !isSafeUrl(serialized, name)) continue;
181
- attributes[name] = serialized;
182
- }
183
- if (tagName === "a") attributes.rel = "noopener noreferrer";
184
- return attributes;
185
- }
186
- function convertSourceNode(value) {
187
- if (!isRecord(value)) return [];
188
- if (value.type === "text" || !value.name && typeof value.text === "string") return [{
189
- type: "text",
190
- text: String(value.text ?? "")
191
- }];
192
- const children = Array.isArray(value.children) ? value.children.flatMap(convertSourceNode) : [];
193
- const name = String(value.name ?? "").toLowerCase();
194
- if (!ALLOWED_TAGS.has(name)) return children;
195
- return [{
196
- type: "element",
197
- name,
198
- attrs: sanitizeRichTextAttributes(value.attrs, name),
199
- children
200
- }];
201
- }
202
- function convertParsedNode(node) {
203
- if (node.type === "text") return [{
204
- type: "text",
205
- text: node.data
206
- }];
207
- if (node.type !== "tag") return [];
208
- const element = node;
209
- const children = element.children.flatMap(convertParsedNode);
210
- const name = element.name.toLowerCase();
211
- if (!ALLOWED_TAGS.has(name)) return children;
212
- return [{
213
- type: "element",
214
- name,
215
- attrs: sanitizeRichTextAttributes(element.attribs, name),
216
- children
217
- }];
218
- }
219
- function normalizeRichTextNodes(value) {
220
- if (typeof value === "string") return parseDocument(value, {
221
- decodeEntities: true,
222
- lowerCaseAttributeNames: true,
223
- lowerCaseTags: true
224
- }).children.flatMap(convertParsedNode);
225
- return (Array.isArray(value) ? value : [value]).flatMap(convertSourceNode);
226
- }
227
-
228
- //#endregion
229
- export { normalizeRichTextNodes, sanitizeRichTextAttributes, sanitizeRichTextStyle };
230
- //# sourceMappingURL=helpers.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.mjs","names":[],"sources":["../../../../src/runtime/nativeComponents/richText/helpers.ts"],"sourcesContent":["import type { DataNode, Element, Node } from 'domhandler'\nimport { parseDocument } from 'htmlparser2'\n\nexport interface RichTextSourceNode {\n type?: string\n name?: string\n attrs?: Record<string, unknown>\n children?: RichTextSourceNode[]\n text?: string\n}\n\nexport type SafeRichTextNode\n = | { type: 'text', text: string }\n | { type: 'element', name: string, attrs: Record<string, string>, children: SafeRichTextNode[] }\n\nconst ALLOWED_TAGS = new Set([\n 'a',\n 'abbr',\n 'address',\n 'article',\n 'aside',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blockquote',\n 'br',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'dd',\n 'del',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'fieldset',\n 'font',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hr',\n 'i',\n 'img',\n 'ins',\n 'label',\n 'legend',\n 'li',\n 'mark',\n 'ol',\n 'p',\n 'pre',\n 'q',\n 'rt',\n 'ruby',\n 's',\n 'section',\n 'small',\n 'span',\n 'strong',\n 'sub',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'tr',\n 'tt',\n 'u',\n 'ul',\n])\n\nconst ALLOWED_ATTRIBUTES = new Set([\n 'abbr',\n 'align',\n 'alt',\n 'axis',\n 'bgcolor',\n 'border',\n 'cellpadding',\n 'cellspacing',\n 'class',\n 'colspan',\n 'dir',\n 'height',\n 'href',\n 'id',\n 'lang',\n 'rowspan',\n 'scope',\n 'span',\n 'start',\n 'style',\n 'summary',\n 'target',\n 'title',\n 'type',\n 'valign',\n 'width',\n])\n\nconst URL_ATTRIBUTES = new Set(['href', 'src'])\n\nconst ALLOWED_STYLE_PROPERTIES = new Set([\n 'background',\n 'background-color',\n 'border',\n 'border-bottom',\n 'border-color',\n 'border-left',\n 'border-radius',\n 'border-right',\n 'border-style',\n 'border-top',\n 'border-width',\n 'color',\n 'display',\n 'font-family',\n 'font-size',\n 'font-style',\n 'font-weight',\n 'height',\n 'letter-spacing',\n 'line-height',\n 'margin',\n 'margin-bottom',\n 'margin-left',\n 'margin-right',\n 'margin-top',\n 'max-height',\n 'max-width',\n 'min-height',\n 'min-width',\n 'opacity',\n 'overflow',\n 'padding',\n 'padding-bottom',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'text-align',\n 'text-decoration',\n 'text-indent',\n 'text-overflow',\n 'text-transform',\n 'vertical-align',\n 'white-space',\n 'width',\n 'word-break',\n 'word-wrap',\n])\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction isSafeUrl(value: string, attribute: string) {\n const normalized = Array.from(value)\n .filter(character => character.charCodeAt(0) > 0x20)\n .join('')\n .toLowerCase()\n if (!normalized || normalized.startsWith('#') || normalized.startsWith('/') || normalized.startsWith('./') || normalized.startsWith('../')) {\n return true\n }\n if (/^(?:https?:|mailto:|tel:)/.test(normalized)) {\n return true\n }\n return attribute === 'src' && /^data:image\\/(?:gif|jpe?g|png|webp);base64,/.test(normalized)\n}\n\nfunction isSafeStyleValue(value: string) {\n const normalized = value.toLowerCase().replace(/\\s+/g, '')\n return !normalized.includes('url(')\n && !normalized.includes('expression(')\n && !normalized.includes('javascript:')\n && !normalized.includes('behavior:')\n && !normalized.includes('-moz-binding')\n}\n\nexport function sanitizeRichTextStyle(value: unknown) {\n const source = isRecord(value)\n ? Object.entries(value)\n .map(([property, propertyValue]) => `${property}:${String(propertyValue)}`)\n .join(';')\n : String(value ?? '')\n const declarations: string[] = []\n for (const declaration of source.split(';')) {\n const separator = declaration.indexOf(':')\n if (separator <= 0) {\n continue\n }\n const property = declaration.slice(0, separator).trim().toLowerCase()\n const propertyValue = declaration.slice(separator + 1).trim()\n if (ALLOWED_STYLE_PROPERTIES.has(property) && propertyValue && isSafeStyleValue(propertyValue)) {\n declarations.push(`${property}: ${propertyValue}`)\n }\n }\n return declarations.join('; ')\n}\n\nexport function sanitizeRichTextAttributes(value: unknown, tagName: string) {\n if (!isRecord(value)) {\n return {}\n }\n const attributes: Record<string, string> = {}\n for (const [rawName, rawValue] of Object.entries(value)) {\n const name = rawName.trim().toLowerCase()\n if (name.startsWith('on') || name === 'srcdoc') {\n continue\n }\n if (!ALLOWED_ATTRIBUTES.has(name) && name !== 'src' && !name.startsWith('aria-') && !name.startsWith('data-')) {\n continue\n }\n if (name === 'src' && tagName !== 'img') {\n continue\n }\n const serialized = name === 'style' ? sanitizeRichTextStyle(rawValue) : String(rawValue ?? '')\n if (!serialized || (URL_ATTRIBUTES.has(name) && !isSafeUrl(serialized, name))) {\n continue\n }\n attributes[name] = serialized\n }\n if (tagName === 'a') {\n attributes.rel = 'noopener noreferrer'\n }\n return attributes\n}\n\nfunction convertSourceNode(value: unknown): SafeRichTextNode[] {\n if (!isRecord(value)) {\n return []\n }\n if (value.type === 'text' || (!value.name && typeof value.text === 'string')) {\n return [{ type: 'text', text: String(value.text ?? '') }]\n }\n const children = Array.isArray(value.children)\n ? value.children.flatMap(convertSourceNode)\n : []\n const name = String(value.name ?? '').toLowerCase()\n if (!ALLOWED_TAGS.has(name)) {\n return children\n }\n return [{\n type: 'element',\n name,\n attrs: sanitizeRichTextAttributes(value.attrs, name),\n children,\n }]\n}\n\nfunction convertParsedNode(node: Node): SafeRichTextNode[] {\n if (node.type === 'text') {\n return [{ type: 'text', text: (node as DataNode).data }]\n }\n if (node.type !== 'tag') {\n return []\n }\n const element = node as Element\n const children = element.children.flatMap(convertParsedNode)\n const name = element.name.toLowerCase()\n if (!ALLOWED_TAGS.has(name)) {\n return children\n }\n return [{\n type: 'element',\n name,\n attrs: sanitizeRichTextAttributes(element.attribs, name),\n children,\n }]\n}\n\nexport function normalizeRichTextNodes(value: unknown): SafeRichTextNode[] {\n if (typeof value === 'string') {\n const document = parseDocument(value, {\n decodeEntities: true,\n lowerCaseAttributeNames: true,\n lowerCaseTags: true,\n })\n return document.children.flatMap(convertParsedNode)\n }\n const values = Array.isArray(value) ? value : [value]\n return values.flatMap(convertSourceNode)\n}\n"],"mappings":";;;AAeA,MAAM,+BAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,qCAAqB,IAAI,IAAI;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,iCAAiB,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC;AAE9C,MAAM,2CAA2B,IAAI,IAAI;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,SAAS,SAAS,OAAkD;CAClE,OAAO,QAAQ,KAAK,KAAK,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,UAAU,OAAe,WAAmB;CACnD,MAAM,aAAa,MAAM,KAAK,KAAK,CAAC,CACjC,QAAO,cAAa,UAAU,WAAW,CAAC,IAAI,EAAI,CAAC,CACnD,KAAK,EAAE,CAAC,CACR,YAAY;CACf,IAAI,CAAC,cAAc,WAAW,WAAW,GAAG,KAAK,WAAW,WAAW,GAAG,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