resuxjs 0.4.0-beta.4 → 0.4.0-beta.6
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/cli.d.ts +2 -2
- package/dist/compiler/implementation.d.ts +2 -0
- package/dist/compiler/implementation.js +186 -31
- package/dist/compiler/index.js.map +1 -1
- package/dist/deploy/vercel.js +9 -0
- package/dist/deploy/vercel.js.map +1 -1
- package/dist/fonts/index.js +67 -45
- package/dist/fonts/index.js.map +1 -1
- package/dist/icons/index.d.ts +4 -14
- package/dist/icons/index.js +26 -55
- package/dist/icons/index.js.map +1 -1
- package/dist/icons/registry.d.ts +22 -0
- package/dist/icons/registry.js +84 -0
- package/dist/icons/registry.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/runtime/index.d.ts +14 -5
- package/dist/runtime/index.js +120 -15
- package/dist/runtime/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
//#region src/icons/registry.ts
|
|
2
|
+
const iconRegistry = {
|
|
3
|
+
"material-symbols:call": { path: "M6.62 10.79a15.15 15.15 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.11-.27c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.26 1.02l-2.2 2.2z" },
|
|
4
|
+
"material-symbols:mail": { path: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z" },
|
|
5
|
+
"material-symbols:location-on-outline-rounded": { path: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5z" },
|
|
6
|
+
"material-symbols:warning": { path: "M1 21h22L12 2L1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" },
|
|
7
|
+
"material-symbols:error": { path: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" },
|
|
8
|
+
"material-symbols:close": { path: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z" },
|
|
9
|
+
"material-symbols:add": { path: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" },
|
|
10
|
+
"material-symbols:keyboard-arrow-down": { path: "m12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8L18 9.4z" },
|
|
11
|
+
"mdi:facebook": { path: "M12 2.04C6.5 2.04 2 6.53 2 12.06C2 17.06 5.66 21.21 10.44 21.96V14.96H7.9V12.06H10.44V9.85C10.44 7.34 11.93 5.96 14.22 5.96C15.31 5.96 16.45 6.15 16.45 6.15V8.62H15.19C13.95 8.62 13.56 9.39 13.56 10.18V12.06H16.34L15.89 14.96H13.56V21.96A10 10 0 0 0 22 12.06C22 6.53 17.5 2.04 12 2.04Z" },
|
|
12
|
+
"mdi:facebook-box": { path: "M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3h-1.8v-2.2h1.8V9.3c0-1.8 1.1-2.8 2.7-2.8c.8 0 1.5.1 1.7.1v2h-1.2c-.9 0-1 .4-1 1v1.3h2.2l-.3 2.2h-1.9v5.3h-2.2z" },
|
|
13
|
+
"mingcute:instagram-fill": { path: "M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1-5 5H8a5 5 0 0 1-5-5V8a5 5 0 0 1 5-5zm-4 5a4 4 0 1 0 0 8a4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4a2 2 0 0 1 0-4m4.5-3.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2" },
|
|
14
|
+
"cib:linkedin": {
|
|
15
|
+
path: "M27.26 27.271h-4.733v-7.427c0-1.771-.037-4.047-2.475-4.047c-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739V11.999h4.552v2.083h.061c.636-1.203 2.183-2.468 4.491-2.468c4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912a2.75 2.75 0 0 1-2.751-2.756a2.753 2.753 0 1 1 2.751 2.756m2.374 17.359H4.74V12h4.749zM29.636 0H2.36C1.057 0 0 1.031 0 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307V2.307C32 1.031 30.932 0 29.636 0z",
|
|
16
|
+
viewBox: "0 0 32 32"
|
|
17
|
+
},
|
|
18
|
+
"uil:youtube": { path: "M23 9.71a8.5 8.5 0 0 0-.91-4.13a2.92 2.92 0 0 0-1.72-1A78 78 0 0 0 12 4.27a79 79 0 0 0-8.34.3a2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48 48 0 0 0 0 6.48a9.6 9.6 0 0 0 .3 2a3.14 3.14 0 0 0 .71 1.36a2.86 2.86 0 0 0 1.49.78a45 45 0 0 0 6.5.33c3.5.05 6.57 0 10.2-.28a2.9 2.9 0 0 0 1.53-.78a2.5 2.5 0 0 0 .61-1a10.6 10.6 0 0 0 .52-3.4c.04-.56.04-3.94.04-4.54M9.74 14.85V8.66l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08" },
|
|
19
|
+
"line-md:twitter-x": { path: "M18.244 2.25h3.308l-7.227 8.26l8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" },
|
|
20
|
+
"ic:baseline-whatsapp": { path: "M12.04 2c-5.46 0-9.91 4.45-9.91 9.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21c5.46 0 9.91-4.45 9.91-9.91c0-2.65-1.03-5.14-2.9-7.01A9.816 9.816 0 0 0 12.04 2zm.01 1.67c4.55 0 8.25 3.7 8.25 8.25c0 4.55-3.7 8.25-8.25 8.25c-1.47 0-2.88-.39-4.12-1.12l-.3-.18l-3.07.81l.82-2.99l-.19-.31A8.204 8.204 0 0 1 3.8 11.92c0-4.55 3.7-8.25 8.25-8.25z" },
|
|
21
|
+
"streamline:interface-validation-check-circle-checkmark-addition-circle-success-check-validation-add-form": { path: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" },
|
|
22
|
+
"ph:check-circle-thin": { path: "M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2zm0 19a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9zm4.53-11.47a.5.5 0 0 1 0 .71l-5 5a.5.5 0 0 1-.71 0l-2.5-2.5a.5.5 0 1 1 .71-.71L11.17 14.4l4.65-4.65a.5.5 0 0 1 .71 0z" },
|
|
23
|
+
"lucide-lab:flower-lotus": { path: "M12 21c-4.418 0-8-3.582-8-8c0-3.5 3.5-7 8-11c4.5 4 8 7.5 8 11c0 4.418-3.582 8-8 8z" },
|
|
24
|
+
"solar:command-linear": { path: "M8.5 5A3.5 3.5 0 0 0 5 8.5v.5A3.5 3.5 0 0 0 8.5 12.5H9v-1h-.5A2.5 2.5 0 0 1 6 9v-.5A2.5 2.5 0 0 1 8.5 6H9V5h-.5zm7 0H15v1h.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5H15v1h.5a3.5 3.5 0 0 0 3.5-3.5v-.5A3.5 3.5 0 0 0 15.5 5z" },
|
|
25
|
+
"gg:mouse": { path: "M12 5a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V6a1 1 0 0 0-1-1M4 8a8 8 0 1 1 16 0v8a8 8 0 1 1-16 0zm14 0v8a6 6 0 0 1-12 0V8a6 6 0 1 1 12 0" },
|
|
26
|
+
"iconoir:flash": { path: "M13 10V3L5 14h6v7l8-11z" },
|
|
27
|
+
"hugeicons:search-01": { path: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z" },
|
|
28
|
+
"solar:info-circle-outline": { path: "M12 17.75a.75.75 0 0 0 .75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75M12 7a1 1 0 1 1 0 2a1 1 0 0 1 0-2M1.25 12C1.25 6.063 6.063 1.25 12 1.25S22.75 6.063 22.75 12S17.937 22.75 12 22.75S1.25 17.937 1.25 12M12 2.75a9.25 9.25 0 1 0 0 18.5a9.25 9.25 0 0 0 0-18.5" },
|
|
29
|
+
"ic:sharp-tag-faces": { path: "M12.01 2C6.49 2 2.02 6.48 2.02 12s4.47 10 9.99 10c5.53 0 10.01-4.48 10.01-10S17.54 2 12.01 2m.01 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8m3.5-9c.83 0 1.5-.67 1.5-1.5S16.35 8 15.52 8s-1.5.67-1.5 1.5s.67 1.5 1.5 1.5m-7 0c.83 0 1.5-.67 1.5-1.5S9.35 8 8.52 8s-1.5.67-1.5 1.5s.67 1.5 1.5 1.5m3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.91c.8 2.04 2.78 3.5 5.11 3.5" },
|
|
30
|
+
"hamburger": { path: "M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z" },
|
|
31
|
+
"svg-spinners:ring-resize": { path: "M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z" },
|
|
32
|
+
"material-symbols:groups": {
|
|
33
|
+
path: "M0-240v-63q0-43 44-70t116-27q13 0 25 .5t23 2.5q-14 21-21 44t-7 48v65H0Zm240 0v-65q0-32 17.5-58.5T307-410q32-20 76.5-30t96.5-10q53 0 97.5 10t76.5 30q32 20 49 46.5t17 58.5v65H240Zm540 0v-65q0-26-6.5-49T754-397q11-2 22.5-2.5t23.5-.5q72 0 116 26.5t44 70.5v63H780Zm-455-80h311q-10-20-55.5-35T480-370q-55 0-100.5 15T325-320ZM160-440q-33 0-56.5-23.5T80-520q0-34 23.5-57t56.5-23q34 0 57 23t23 57q0 33-23 56.5T160-440Zm640 0q-33 0-56.5-23.5T720-520q0-34 23.5-57t56.5-23q34 0 57 23t23 57q0 33-23 56.5T800-440Zm-320-40q-50 0-85-35t-35-85q0-51 35-85.5t85-34.5q51 0 85.5 34.5T600-600q0 50-34.5 85T480-480Zm0-80q17 0 28.5-11.5T520-600q0-17-11.5-28.5T480-640q-17 0-28.5 11.5T440-600q0 17 11.5 28.5T480-560Zm1 240Zm-1-280Z",
|
|
34
|
+
viewBox: "0 -960 960 960"
|
|
35
|
+
},
|
|
36
|
+
"material-symbols:handshake": {
|
|
37
|
+
path: "M475-160q4 0 8-2t6-4l328-328q12-12 17.5-27t5.5-30q0-16-5.5-30.5T817-607L647-777q-11-12-25.5-17.5T591-800q-15 0-30 5.5T534-777l-11 11 74 75q15 14 22 32t7 38q0 42-28.5 70.5T527-522q-20 0-38.5-7T456-550l-75-74-175 175q-3 3-4.5 6.5T200-435q0 8 6 14.5t14 6.5q4 0 8-2t6-4l136-136 56 56-135 136q-3 3-4.5 6.5T285-350q0 8 6 14t14 6q4 0 8-2t6-4l136-135 56 56-135 136q-3 2-4.5 6t-1.5 8q0 8 6 14t14 6q4 0 7.5-1.5t6.5-4.5l136-135 56 56-136 136q-3 3-4.5 6.5T454-180q0 8 6.5 14t14.5 6Zm-1 80q-37 0-65.5-24.5T375-166q-34-5-57-28t-28-57q-34-5-56.5-28.5T206-336q-38-5-62-33t-24-66q0-20 7.5-38.5T149-506l232-231 131 131q2 3 6 4.5t8 1.5q9 0 15-5.5t6-14.5q0-4-1.5-8t-4.5-6L398-777q-11-12-25.5-17.5T342-800q-15 0-30 5.5T285-777L144-635q-9 9-15 21t-8 24q-2 12 0 24.5t8 23.5l-58 58q-17-23-25-50.5T40-590q2-28 14-54.5T87-692l141-141q24-23 53.5-35t60.5-12q31 0 60.5 12t52.5 35l11 11 11-11q24-23 53.5-35t60.5-12q31 0 60.5 12t52.5 35l169 169q23 23 35 53t12 61q0 31-12 60.5T873-437L545-110q-14 14-32.5 22T474-80Zm-99-560Z",
|
|
38
|
+
viewBox: "0 -960 960 960"
|
|
39
|
+
},
|
|
40
|
+
"line-md:email-filled": {
|
|
41
|
+
paths: [{
|
|
42
|
+
d: "M12 11l-8 -5h16l-8 5Z",
|
|
43
|
+
fill: "currentColor"
|
|
44
|
+
}, {
|
|
45
|
+
d: "M4 5h16c0.55 0 1 0.45 1 1v12c0 0.55 -0.45 1 -1 1h-16c-0.55 0 -1 -0.45 -1 -1v-12c0 -0.55 0.45 -1 1 -1ZM3 6.5l9 5.5l9 -5.5",
|
|
46
|
+
fill: "none",
|
|
47
|
+
stroke: "currentColor",
|
|
48
|
+
strokeWidth: "2",
|
|
49
|
+
strokeLinecap: "round",
|
|
50
|
+
strokeLinejoin: "round"
|
|
51
|
+
}],
|
|
52
|
+
viewBox: "0 0 24 24"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
for (const [alias, target] of Object.entries({
|
|
56
|
+
"call": "material-symbols:call",
|
|
57
|
+
"material-symbols-light:mail-outline-sharp": "material-symbols:mail",
|
|
58
|
+
"material-symbols:mail-outline": "material-symbols:mail",
|
|
59
|
+
"mail": "material-symbols:mail",
|
|
60
|
+
"location": "material-symbols:location-on-outline-rounded",
|
|
61
|
+
"warning": "material-symbols:warning",
|
|
62
|
+
"error": "material-symbols:error",
|
|
63
|
+
"close": "material-symbols:close",
|
|
64
|
+
"add": "material-symbols:add",
|
|
65
|
+
"arrow-down": "material-symbols:keyboard-arrow-down",
|
|
66
|
+
"facebook": "mdi:facebook-box",
|
|
67
|
+
"instagram": "mingcute:instagram-fill",
|
|
68
|
+
"lineicons:linkedin": "cib:linkedin",
|
|
69
|
+
"linkedin": "cib:linkedin",
|
|
70
|
+
"youtube": "uil:youtube",
|
|
71
|
+
"twitter": "line-md:twitter-x",
|
|
72
|
+
"solar:check-circle-linear": "ph:check-circle-thin",
|
|
73
|
+
"solar:leaf-outline": "lucide-lab:flower-lotus",
|
|
74
|
+
"mouse": "gg:mouse",
|
|
75
|
+
"flash": "iconoir:flash",
|
|
76
|
+
"search": "hugeicons:search-01"
|
|
77
|
+
})) {
|
|
78
|
+
const data = iconRegistry[target];
|
|
79
|
+
if (data) iconRegistry[alias] = data;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export { iconRegistry };
|
|
84
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","names":[],"sources":["../../src/icons/registry.ts"],"sourcesContent":["export interface IconPathData {\n d: string;\n opacity?: string;\n fill?: string;\n stroke?: string;\n strokeWidth?: string;\n strokeLinecap?: string;\n strokeLinejoin?: string;\n fillRule?: string;\n clipRule?: string;\n}\n\nexport interface IconData {\n path?: string;\n paths?: IconPathData[];\n opacity?: string;\n viewBox?: string;\n}\n\nexport const iconRegistry: Record<string, IconData> = {\n \"material-symbols:call\": { path: \"M6.62 10.79a15.15 15.15 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.11-.27c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.26 1.02l-2.2 2.2z\" },\n \"material-symbols:mail\": { path: \"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z\" },\n \"material-symbols:location-on-outline-rounded\": { path: \"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5z\" },\n \"material-symbols:warning\": { path: \"M1 21h22L12 2L1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\" },\n \"material-symbols:error\": { path: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\" },\n \"material-symbols:close\": { path: \"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z\" },\n \"material-symbols:add\": { path: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\" },\n \"material-symbols:keyboard-arrow-down\": { path: \"m12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8L18 9.4z\" },\n \"mdi:facebook\": { path: \"M12 2.04C6.5 2.04 2 6.53 2 12.06C2 17.06 5.66 21.21 10.44 21.96V14.96H7.9V12.06H10.44V9.85C10.44 7.34 11.93 5.96 14.22 5.96C15.31 5.96 16.45 6.15 16.45 6.15V8.62H15.19C13.95 8.62 13.56 9.39 13.56 10.18V12.06H16.34L15.89 14.96H13.56V21.96A10 10 0 0 0 22 12.06C22 6.53 17.5 2.04 12 2.04Z\" },\n \"mdi:facebook-box\": { path: \"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3h-1.8v-2.2h1.8V9.3c0-1.8 1.1-2.8 2.7-2.8c.8 0 1.5.1 1.7.1v2h-1.2c-.9 0-1 .4-1 1v1.3h2.2l-.3 2.2h-1.9v5.3h-2.2z\" },\n \"mingcute:instagram-fill\": { path: \"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1-5 5H8a5 5 0 0 1-5-5V8a5 5 0 0 1 5-5zm-4 5a4 4 0 1 0 0 8a4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4a2 2 0 0 1 0-4m4.5-3.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2\" },\n \"cib:linkedin\": { path: \"M27.26 27.271h-4.733v-7.427c0-1.771-.037-4.047-2.475-4.047c-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739V11.999h4.552v2.083h.061c.636-1.203 2.183-2.468 4.491-2.468c4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912a2.75 2.75 0 0 1-2.751-2.756a2.753 2.753 0 1 1 2.751 2.756m2.374 17.359H4.74V12h4.749zM29.636 0H2.36C1.057 0 0 1.031 0 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307V2.307C32 1.031 30.932 0 29.636 0z\", viewBox: \"0 0 32 32\" },\n \"uil:youtube\": { path: \"M23 9.71a8.5 8.5 0 0 0-.91-4.13a2.92 2.92 0 0 0-1.72-1A78 78 0 0 0 12 4.27a79 79 0 0 0-8.34.3a2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48 48 0 0 0 0 6.48a9.6 9.6 0 0 0 .3 2a3.14 3.14 0 0 0 .71 1.36a2.86 2.86 0 0 0 1.49.78a45 45 0 0 0 6.5.33c3.5.05 6.57 0 10.2-.28a2.9 2.9 0 0 0 1.53-.78a2.5 2.5 0 0 0 .61-1a10.6 10.6 0 0 0 .52-3.4c.04-.56.04-3.94.04-4.54M9.74 14.85V8.66l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08\" },\n \"line-md:twitter-x\": { path: \"M18.244 2.25h3.308l-7.227 8.26l8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\" },\n \"ic:baseline-whatsapp\": { path: \"M12.04 2c-5.46 0-9.91 4.45-9.91 9.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21c5.46 0 9.91-4.45 9.91-9.91c0-2.65-1.03-5.14-2.9-7.01A9.816 9.816 0 0 0 12.04 2zm.01 1.67c4.55 0 8.25 3.7 8.25 8.25c0 4.55-3.7 8.25-8.25 8.25c-1.47 0-2.88-.39-4.12-1.12l-.3-.18l-3.07.81l.82-2.99l-.19-.31A8.204 8.204 0 0 1 3.8 11.92c0-4.55 3.7-8.25 8.25-8.25z\" },\n \"streamline:interface-validation-check-circle-checkmark-addition-circle-success-check-validation-add-form\": { path: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\" },\n \"ph:check-circle-thin\": { path: \"M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2zm0 19a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9zm4.53-11.47a.5.5 0 0 1 0 .71l-5 5a.5.5 0 0 1-.71 0l-2.5-2.5a.5.5 0 1 1 .71-.71L11.17 14.4l4.65-4.65a.5.5 0 0 1 .71 0z\" },\n \"lucide-lab:flower-lotus\": { path: \"M12 21c-4.418 0-8-3.582-8-8c0-3.5 3.5-7 8-11c4.5 4 8 7.5 8 11c0 4.418-3.582 8-8 8z\" },\n \"solar:command-linear\": { path: \"M8.5 5A3.5 3.5 0 0 0 5 8.5v.5A3.5 3.5 0 0 0 8.5 12.5H9v-1h-.5A2.5 2.5 0 0 1 6 9v-.5A2.5 2.5 0 0 1 8.5 6H9V5h-.5zm7 0H15v1h.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5H15v1h.5a3.5 3.5 0 0 0 3.5-3.5v-.5A3.5 3.5 0 0 0 15.5 5z\" },\n \"gg:mouse\": { path: \"M12 5a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V6a1 1 0 0 0-1-1M4 8a8 8 0 1 1 16 0v8a8 8 0 1 1-16 0zm14 0v8a6 6 0 0 1-12 0V8a6 6 0 1 1 12 0\" },\n \"iconoir:flash\": { path: \"M13 10V3L5 14h6v7l8-11z\" },\n \"hugeicons:search-01\": { path: \"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z\" },\n \"solar:info-circle-outline\": { path: \"M12 17.75a.75.75 0 0 0 .75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75M12 7a1 1 0 1 1 0 2a1 1 0 0 1 0-2M1.25 12C1.25 6.063 6.063 1.25 12 1.25S22.75 6.063 22.75 12S17.937 22.75 12 22.75S1.25 17.937 1.25 12M12 2.75a9.25 9.25 0 1 0 0 18.5a9.25 9.25 0 0 0 0-18.5\" },\n \"ic:sharp-tag-faces\": { path: \"M12.01 2C6.49 2 2.02 6.48 2.02 12s4.47 10 9.99 10c5.53 0 10.01-4.48 10.01-10S17.54 2 12.01 2m.01 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8m3.5-9c.83 0 1.5-.67 1.5-1.5S16.35 8 15.52 8s-1.5.67-1.5 1.5s.67 1.5 1.5 1.5m-7 0c.83 0 1.5-.67 1.5-1.5S9.35 8 8.52 8s-1.5.67-1.5 1.5s.67 1.5 1.5 1.5m3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.91c.8 2.04 2.78 3.5 5.11 3.5\" },\n \"hamburger\": { path: \"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z\" },\n \"svg-spinners:ring-resize\": { path: \"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z\" },\n \"material-symbols:groups\": {\n path: \"M0-240v-63q0-43 44-70t116-27q13 0 25 .5t23 2.5q-14 21-21 44t-7 48v65H0Zm240 0v-65q0-32 17.5-58.5T307-410q32-20 76.5-30t96.5-10q53 0 97.5 10t76.5 30q32 20 49 46.5t17 58.5v65H240Zm540 0v-65q0-26-6.5-49T754-397q11-2 22.5-2.5t23.5-.5q72 0 116 26.5t44 70.5v63H780Zm-455-80h311q-10-20-55.5-35T480-370q-55 0-100.5 15T325-320ZM160-440q-33 0-56.5-23.5T80-520q0-34 23.5-57t56.5-23q34 0 57 23t23 57q0 33-23 56.5T160-440Zm640 0q-33 0-56.5-23.5T720-520q0-34 23.5-57t56.5-23q34 0 57 23t23 57q0 33-23 56.5T800-440Zm-320-40q-50 0-85-35t-35-85q0-51 35-85.5t85-34.5q51 0 85.5 34.5T600-600q0 50-34.5 85T480-480Zm0-80q17 0 28.5-11.5T520-600q0-17-11.5-28.5T480-640q-17 0-28.5 11.5T440-600q0 17 11.5 28.5T480-560Zm1 240Zm-1-280Z\",\n viewBox: \"0 -960 960 960\"\n },\n \"material-symbols:handshake\": {\n path: \"M475-160q4 0 8-2t6-4l328-328q12-12 17.5-27t5.5-30q0-16-5.5-30.5T817-607L647-777q-11-12-25.5-17.5T591-800q-15 0-30 5.5T534-777l-11 11 74 75q15 14 22 32t7 38q0 42-28.5 70.5T527-522q-20 0-38.5-7T456-550l-75-74-175 175q-3 3-4.5 6.5T200-435q0 8 6 14.5t14 6.5q4 0 8-2t6-4l136-136 56 56-135 136q-3 3-4.5 6.5T285-350q0 8 6 14t14 6q4 0 8-2t6-4l136-135 56 56-135 136q-3 2-4.5 6t-1.5 8q0 8 6 14t14 6q4 0 7.5-1.5t6.5-4.5l136-135 56 56-136 136q-3 3-4.5 6.5T454-180q0 8 6.5 14t14.5 6Zm-1 80q-37 0-65.5-24.5T375-166q-34-5-57-28t-28-57q-34-5-56.5-28.5T206-336q-38-5-62-33t-24-66q0-20 7.5-38.5T149-506l232-231 131 131q2 3 6 4.5t8 1.5q9 0 15-5.5t6-14.5q0-4-1.5-8t-4.5-6L398-777q-11-12-25.5-17.5T342-800q-15 0-30 5.5T285-777L144-635q-9 9-15 21t-8 24q-2 12 0 24.5t8 23.5l-58 58q-17-23-25-50.5T40-590q2-28 14-54.5T87-692l141-141q24-23 53.5-35t60.5-12q31 0 60.5 12t52.5 35l11 11 11-11q24-23 53.5-35t60.5-12q31 0 60.5 12t52.5 35l169 169q23 23 35 53t12 61q0 31-12 60.5T873-437L545-110q-14 14-32.5 22T474-80Zm-99-560Z\",\n viewBox: \"0 -960 960 960\"\n },\n \"line-md:email-filled\": {\n paths: [\n { d: \"M12 11l-8 -5h16l-8 5Z\", fill: \"currentColor\" },\n {\n d: \"M4 5h16c0.55 0 1 0.45 1 1v12c0 0.55 -0.45 1 -1 1h-16c-0.55 0 -1 -0.45 -1 -1v-12c0 -0.55 0.45 -1 1 -1ZM3 6.5l9 5.5l9 -5.5\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }\n ],\n viewBox: \"0 0 24 24\"\n }\n};\n\nconst iconAliases: Record<string, string> = {\n \"call\": \"material-symbols:call\",\n \"material-symbols-light:mail-outline-sharp\": \"material-symbols:mail\",\n \"material-symbols:mail-outline\": \"material-symbols:mail\",\n \"mail\": \"material-symbols:mail\",\n \"location\": \"material-symbols:location-on-outline-rounded\",\n \"warning\": \"material-symbols:warning\",\n \"error\": \"material-symbols:error\",\n \"close\": \"material-symbols:close\",\n \"add\": \"material-symbols:add\",\n \"arrow-down\": \"material-symbols:keyboard-arrow-down\",\n \"facebook\": \"mdi:facebook-box\",\n \"instagram\": \"mingcute:instagram-fill\",\n \"lineicons:linkedin\": \"cib:linkedin\",\n \"linkedin\": \"cib:linkedin\",\n \"youtube\": \"uil:youtube\",\n \"twitter\": \"line-md:twitter-x\",\n \"solar:check-circle-linear\": \"ph:check-circle-thin\",\n \"solar:leaf-outline\": \"lucide-lab:flower-lotus\",\n \"mouse\": \"gg:mouse\",\n \"flash\": \"iconoir:flash\",\n \"search\": \"hugeicons:search-01\",\n};\n\nfor (const [alias, target] of Object.entries(iconAliases)) {\n const data = iconRegistry[target];\n if (data) {\n iconRegistry[alias] = data;\n }\n}\n\n"],"mappings":";AAmBA,MAAa,eAAyC;CACpD,yBAAyB,EAAE,MAAM,gOAAgO;CACjQ,yBAAyB,EAAE,MAAM,kHAAkH;CACnJ,gDAAgD,EAAE,MAAM,+JAA+J;CACvN,4BAA4B,EAAE,MAAM,sDAAsD;CAC1F,0BAA0B,EAAE,MAAM,oGAAoG;CACtI,0BAA0B,EAAE,MAAM,yGAAyG;CAC3I,wBAAwB,EAAE,MAAM,uCAAuC;CACvE,wCAAwC,EAAE,MAAM,8CAA8C;CAC9F,gBAAgB,EAAE,MAAM,iSAAiS;CACzT,oBAAoB,EAAE,MAAM,uMAAuM;CACnO,2BAA2B,EAAE,MAAM,6KAA6K;CAChN,gBAAgB;EAAE,MAAM;EAAqc,SAAS;EAAa;CACnf,eAAe,EAAE,MAAM,maAAma;CAC1b,qBAAqB,EAAE,MAAM,+JAA+J;CAC5L,wBAAwB,EAAE,MAAM,iXAAiX;CACjZ,4GAA4G,EAAE,MAAM,yHAAyH;CAC7O,wBAAwB,EAAE,MAAM,kNAAkN;CAClP,2BAA2B,EAAE,MAAM,sFAAsF;CACzH,wBAAwB,EAAE,MAAM,uOAAuO;CACvQ,YAAY,EAAE,MAAM,mIAAmI;CACvJ,iBAAiB,EAAE,MAAM,2BAA2B;CACpD,uBAAuB,EAAE,MAAM,gNAAgN;CAC/O,6BAA6B,EAAE,MAAM,0QAA0Q;CAC/S,sBAAsB,EAAE,MAAM,kXAAkX;CAChZ,aAAa,EAAE,MAAM,wCAAwC;CAC7D,4BAA4B,EAAE,MAAM,+EAA+E;CACnH,2BAA2B;EACzB,MAAM;EACN,SAAS;EACV;CACD,8BAA8B;EAC5B,MAAM;EACN,SAAS;EACV;CACD,wBAAwB;EACtB,OAAO,CACL;GAAE,GAAG;GAAyB,MAAM;GAAgB,EACpD;GACE,GAAG;GACH,MAAM;GACN,QAAQ;GACR,aAAa;GACb,eAAe;GACf,gBAAgB;GACjB,CACF;EACD,SAAS;EACV;CACF;AA0BD,KAAK,MAAM,CAAC,OAAO,WAAW,OAAO,QAxBO;CAC1C,QAAQ;CACR,6CAA6C;CAC7C,iCAAiC;CACjC,QAAQ;CACR,YAAY;CACZ,WAAW;CACX,SAAS;CACT,SAAS;CACT,OAAO;CACP,cAAc;CACd,YAAY;CACZ,aAAa;CACb,sBAAsB;CACtB,YAAY;CACZ,WAAW;CACX,WAAW;CACX,6BAA6B;CAC7B,sBAAsB;CACtB,SAAS;CACT,SAAS;CACT,UAAU;CACX,CAEwD,EAAE;CACzD,MAAM,OAAO,aAAa;AAC1B,KAAI,KACF,cAAa,SAAS"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ import { isReactive, isReadonly, reactive, readonly } from "./reactivity/reactiv
|
|
|
4
4
|
import { computed } from "./reactivity/computed.js";
|
|
5
5
|
import { watch, watchEffect } from "./reactivity/watch.js";
|
|
6
6
|
import { nextTick } from "./reactivity/scheduler.js";
|
|
7
|
-
import { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadEntry, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, PackageAdapterContext, PackageAdapterDefinition, PageMeta, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, abortNavigation, clearError, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, navigateTo, parseUserAgent, readBody, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig } from "./runtime/index.js";
|
|
8
|
-
export { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, ComputedRef, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadEntry, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, MaybeRef, MaybeRefOrGetter, PackageAdapterContext, PackageAdapterDefinition, PageMeta, ReactiveEffectOptions, ReactiveEffectRunner, Ref, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, WatchCallback, WatchOptions, WatchSource, WatchStopHandle, abortNavigation, clearError, computed, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, watch, watchEffect };
|
|
7
|
+
import { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadAttributePrimitive, HeadAttributeStyle, HeadAttributeValue, HeadAttributes, HeadEntry, HeadInput, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, PackageAdapterContext, PackageAdapterDefinition, PageMeta, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, abortNavigation, clearError, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, navigateTo, parseUserAgent, readBody, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig } from "./runtime/index.js";
|
|
8
|
+
export { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, ComputedRef, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadAttributePrimitive, HeadAttributeStyle, HeadAttributeValue, HeadAttributes, HeadEntry, HeadInput, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, MaybeRef, MaybeRefOrGetter, PackageAdapterContext, PackageAdapterDefinition, PageMeta, ReactiveEffectOptions, ReactiveEffectRunner, Ref, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, WatchCallback, WatchOptions, WatchSource, WatchStopHandle, abortNavigation, clearError, computed, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, watch, watchEffect };
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -54,13 +54,22 @@ interface PageMeta {
|
|
|
54
54
|
title?: string | Record<string, string>;
|
|
55
55
|
meta?: Array<Record<string, string>>;
|
|
56
56
|
}
|
|
57
|
+
type HeadAttributePrimitive = string | number | boolean | null | undefined;
|
|
58
|
+
type HeadAttributeStyle = Record<string, HeadAttributePrimitive>;
|
|
59
|
+
type HeadAttributeValue = HeadAttributePrimitive | HeadAttributeStyle | Array<HeadAttributePrimitive | HeadAttributeStyle>;
|
|
60
|
+
type HeadAttributes = Record<string, HeadAttributeValue>;
|
|
57
61
|
interface HeadEntry {
|
|
58
62
|
title?: string;
|
|
59
63
|
meta?: Array<Record<string, string>>;
|
|
60
64
|
link?: Array<Record<string, string>>;
|
|
61
65
|
style?: ComponentStyle[];
|
|
62
|
-
|
|
66
|
+
script?: Array<Record<string, unknown>>;
|
|
67
|
+
noscript?: Array<Record<string, unknown> | string>;
|
|
68
|
+
htmlAttrs?: HeadAttributes;
|
|
69
|
+
bodyAttrs?: HeadAttributes;
|
|
63
70
|
}
|
|
71
|
+
type ReactiveHeadValue<T> = T extends Array<infer Item> ? MaybeRefOrGetter<Array<ReactiveHeadValue<Item>>> : T extends object ? MaybeRefOrGetter<{ [Key in keyof T]: ReactiveHeadValue<T[Key]> }> : MaybeRefOrGetter<T>;
|
|
72
|
+
type HeadInput = { [Key in keyof HeadEntry]?: ReactiveHeadValue<NonNullable<HeadEntry[Key]>> };
|
|
64
73
|
interface ComponentStyle {
|
|
65
74
|
id: string;
|
|
66
75
|
css: string;
|
|
@@ -163,8 +172,8 @@ interface ResuxAppLike {
|
|
|
163
172
|
payload: ResuxPayload;
|
|
164
173
|
$config: RuntimeConfig;
|
|
165
174
|
provides: ResuxAppProvides;
|
|
166
|
-
provide<Key extends keyof ResuxAppInjections & string>(key: Key, value: ResuxAppInjections[Key]): void;
|
|
167
|
-
provide<Key extends string, Value>(key: Key, value: Value): void;
|
|
175
|
+
provide<Key$1 extends keyof ResuxAppInjections & string>(key: Key$1, value: ResuxAppInjections[Key$1]): void;
|
|
176
|
+
provide<Key$1 extends string, Value>(key: Key$1, value: Value): void;
|
|
168
177
|
vueApp?: any;
|
|
169
178
|
}
|
|
170
179
|
type ResuxPlugin = (resuxApp: ResuxAppLike) => unknown | Promise<unknown>;
|
|
@@ -426,7 +435,7 @@ interface SetupContext {
|
|
|
426
435
|
defineModel<T>(name?: string, options?: unknown): Ref<T>;
|
|
427
436
|
useRoute(): RouteContext;
|
|
428
437
|
useRouter(): ResuxRouter;
|
|
429
|
-
useHead(input:
|
|
438
|
+
useHead(input: HeadInput): void;
|
|
430
439
|
useSeoMeta(input: SeoMetaInput): void;
|
|
431
440
|
useRuntimeConfig(): RuntimeConfig;
|
|
432
441
|
useResuxApp(): ResuxAppLike;
|
|
@@ -674,5 +683,5 @@ type ClientPatch = {
|
|
|
674
683
|
declare function renderClientPatches(template: TemplateNode[], scope: Record<string, unknown>, scopeId: string, styleScopeId?: string): ClientPatch[];
|
|
675
684
|
declare function getClientRuntimeSource(options?: ClientRuntimeSourceOptions): string;
|
|
676
685
|
//#endregion
|
|
677
|
-
export { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, type ComputedRef, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadEntry, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, type MaybeRef, type MaybeRefOrGetter, PackageAdapterContext, PackageAdapterDefinition, PageMeta, type ReactiveEffectOptions, type ReactiveEffectRunner, type Ref, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, type WatchCallback, type WatchOptions, type WatchSource, type WatchStopHandle, abortNavigation, clearError, computed, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, watch, watchEffect };
|
|
686
|
+
export { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, type ComputedRef, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadAttributePrimitive, HeadAttributeStyle, HeadAttributeValue, HeadAttributes, HeadEntry, HeadInput, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, type MaybeRef, type MaybeRefOrGetter, PackageAdapterContext, PackageAdapterDefinition, PageMeta, type ReactiveEffectOptions, type ReactiveEffectRunner, type Ref, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, type WatchCallback, type WatchOptions, type WatchSource, type WatchStopHandle, abortNavigation, clearError, computed, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, watch, watchEffect };
|
|
678
687
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { iconRegistry } from "../icons/registry.js";
|
|
1
2
|
import { buildLocalePath, normalizeI18nRuntimeConfig, resolveI18nRoute, resolveLocaleDirection, resolveLocalizedValue, translateRaw, translateText } from "../i18n/shared.js";
|
|
2
3
|
import { isReactive, isReadonly, reactive, readonly } from "../reactivity/reactive.js";
|
|
3
4
|
import { isRef, ref, toRef, toRefs, unref } from "../reactivity/ref.js";
|
|
@@ -1030,12 +1031,15 @@ function renderDocument(result, title = "Resux App", options = {}) {
|
|
|
1030
1031
|
deferVueIslands: bootPlan.deferVueIslands
|
|
1031
1032
|
}) : "";
|
|
1032
1033
|
const mergedHead = mergeHead([{ title }, result.head]);
|
|
1034
|
+
const htmlAttrs = {
|
|
1035
|
+
lang: "en",
|
|
1036
|
+
...mergedHead.htmlAttrs ?? {}
|
|
1037
|
+
};
|
|
1038
|
+
const renderedBodyAttrs = renderAttributes(mergedHead.bodyAttrs ?? {});
|
|
1039
|
+
const bodyOpenTag = renderedBodyAttrs ? `<body ${renderedBodyAttrs}>` : "<body>";
|
|
1033
1040
|
return [
|
|
1034
1041
|
"<!doctype html>",
|
|
1035
|
-
`<html ${renderAttributes(
|
|
1036
|
-
lang: "en",
|
|
1037
|
-
...mergedHead.htmlAttrs ?? {}
|
|
1038
|
-
})}>`,
|
|
1042
|
+
`<html ${renderAttributes(htmlAttrs)}>`,
|
|
1039
1043
|
"<head>",
|
|
1040
1044
|
renderHead(mergedHead),
|
|
1041
1045
|
"<meta charset=\"utf-8\">",
|
|
@@ -1340,7 +1344,7 @@ function renderDocument(result, title = "Resux App", options = {}) {
|
|
|
1340
1344
|
}
|
|
1341
1345
|
</style>`,
|
|
1342
1346
|
"</head>",
|
|
1343
|
-
|
|
1347
|
+
bodyOpenTag,
|
|
1344
1348
|
"<div id=\"__resux\">",
|
|
1345
1349
|
result.html,
|
|
1346
1350
|
"</div>",
|
|
@@ -1512,6 +1516,19 @@ function createServerI18nContext(route, runtimeConfig) {
|
|
|
1512
1516
|
setLocale: () => {}
|
|
1513
1517
|
};
|
|
1514
1518
|
}
|
|
1519
|
+
function unwrapHeadValue(value) {
|
|
1520
|
+
if (isRef(value)) return unref(value);
|
|
1521
|
+
return typeof value === "function" ? value() : value;
|
|
1522
|
+
}
|
|
1523
|
+
function resolveHeadReactiveValue(value) {
|
|
1524
|
+
const unwrapped = unwrapHeadValue(value);
|
|
1525
|
+
if (Array.isArray(unwrapped)) return unwrapped.map((entry) => resolveHeadReactiveValue(entry));
|
|
1526
|
+
if (!unwrapped || typeof unwrapped !== "object") return unwrapped;
|
|
1527
|
+
return Object.fromEntries(Object.entries(unwrapped).map(([key, entry]) => [key, resolveHeadReactiveValue(entry)]));
|
|
1528
|
+
}
|
|
1529
|
+
function resolveHeadEntry(input) {
|
|
1530
|
+
return resolveHeadReactiveValue(input);
|
|
1531
|
+
}
|
|
1515
1532
|
function createServerSetupContext(route, props, stateRefs, asyncDataRefs, headEntries, resuxApp, runtimeConfig, globalStateRefs = Object.create(null), globalStateKeys = /* @__PURE__ */ new Set()) {
|
|
1516
1533
|
const apiURL = (url) => resolveServerApiURL(url, route, runtimeConfig);
|
|
1517
1534
|
const fetchJson = async (url, init) => {
|
|
@@ -1585,7 +1602,7 @@ function createServerSetupContext(route, props, stateRefs, asyncDataRefs, headEn
|
|
|
1585
1602
|
return createServerRouter();
|
|
1586
1603
|
},
|
|
1587
1604
|
useHead(input) {
|
|
1588
|
-
headEntries.push(input);
|
|
1605
|
+
headEntries.push(resolveHeadEntry(input));
|
|
1589
1606
|
},
|
|
1590
1607
|
useSeoMeta(input) {
|
|
1591
1608
|
headEntries.push(seoMetaToHead(input));
|
|
@@ -2899,14 +2916,41 @@ function renderResuxVideo(node, context, locals) {
|
|
|
2899
2916
|
return `<div ${shellAttrs.join(" ")}><div class="resux-video__stage" data-rx-video-stage data-rx-video-custom-controls="${customControls ? "true" : "false"}">${videoMarkup}${interactionZonesMarkup}${feedbackMarkup}${controlsMarkup}</div></div>`;
|
|
2900
2917
|
}
|
|
2901
2918
|
function renderResuxIcon(node, context, locals) {
|
|
2902
|
-
const
|
|
2903
|
-
const iconName =
|
|
2904
|
-
const
|
|
2905
|
-
const
|
|
2906
|
-
const
|
|
2907
|
-
|
|
2919
|
+
const props = collectComponentProps(node, context.scope, locals);
|
|
2920
|
+
const iconName = String(props.name ?? props.icon ?? "").trim().toLowerCase();
|
|
2921
|
+
const iconSize = String(props.size ?? "").trim();
|
|
2922
|
+
const className = stringifyAttributeValue("class", props.class ?? "").trim();
|
|
2923
|
+
const customStyle = stringifyAttributeValue("style", props.style ?? "").trim();
|
|
2924
|
+
const registryData = iconRegistry[iconName];
|
|
2925
|
+
const data = registryData ?? {
|
|
2926
|
+
path: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10zm0-2a8 8 0 1 1 0-16 8 8 0 0 1 0 16z",
|
|
2927
|
+
opacity: ".35",
|
|
2928
|
+
viewBox: "0 0 24 24"
|
|
2929
|
+
};
|
|
2930
|
+
const mergedStyle = [iconSize ? `font-size: ${iconSize}; width: ${iconSize}; height: ${iconSize};` : "", customStyle].filter(Boolean).join(" ");
|
|
2931
|
+
const attrs = [`class="${escapeAttribute(["resux-icon", className].filter(Boolean).join(" "))}"`, `data-icon-name="${escapeAttribute(iconName)}"`];
|
|
2932
|
+
if (!registryData) attrs.push("data-icon-fallback=\"true\"");
|
|
2933
|
+
if (mergedStyle) attrs.push(`style="${escapeAttribute(mergedStyle)}"`);
|
|
2934
|
+
if (props.title) attrs.push(`title="${escapeAttribute(String(props.title))}"`);
|
|
2908
2935
|
appendStyleScopeAttribute(attrs, context.styleScopeId);
|
|
2909
|
-
const
|
|
2936
|
+
const paths = (data.paths?.length ? data.paths : [{
|
|
2937
|
+
d: data.path || "",
|
|
2938
|
+
opacity: data.opacity
|
|
2939
|
+
}]).map((entry) => {
|
|
2940
|
+
const pathAttrs = [
|
|
2941
|
+
`d="${escapeAttribute(entry.d)}"`,
|
|
2942
|
+
`fill-rule="${escapeAttribute(entry.fillRule || "nonzero")}"`,
|
|
2943
|
+
`clip-rule="${escapeAttribute(entry.clipRule || "nonzero")}"`
|
|
2944
|
+
];
|
|
2945
|
+
if (entry.opacity) pathAttrs.push(`opacity="${escapeAttribute(entry.opacity)}"`);
|
|
2946
|
+
if (entry.fill) pathAttrs.push(`fill="${escapeAttribute(entry.fill)}"`);
|
|
2947
|
+
if (entry.stroke) pathAttrs.push(`stroke="${escapeAttribute(entry.stroke)}"`);
|
|
2948
|
+
if (entry.strokeWidth) pathAttrs.push(`stroke-width="${escapeAttribute(entry.strokeWidth)}"`);
|
|
2949
|
+
if (entry.strokeLinecap) pathAttrs.push(`stroke-linecap="${escapeAttribute(entry.strokeLinecap)}"`);
|
|
2950
|
+
if (entry.strokeLinejoin) pathAttrs.push(`stroke-linejoin="${escapeAttribute(entry.strokeLinejoin)}"`);
|
|
2951
|
+
return `<path ${pathAttrs.join(" ")}></path>`;
|
|
2952
|
+
}).join("");
|
|
2953
|
+
const svgInside = `<svg data-icon-name="${escapeAttribute(iconName)}" viewBox="${escapeAttribute(data.viewBox || "0 0 24 24")}" width="1em" height="1em" fill="currentColor" aria-hidden="true">${paths}</svg>`;
|
|
2910
2954
|
return `<span ${attrs.join(" ")}>${svgInside}</span>`;
|
|
2911
2955
|
}
|
|
2912
2956
|
function renderResuxPicture(node, context, locals) {
|
|
@@ -4094,17 +4138,26 @@ function mergeHead(entries) {
|
|
|
4094
4138
|
meta: [],
|
|
4095
4139
|
link: [],
|
|
4096
4140
|
style: [],
|
|
4097
|
-
|
|
4141
|
+
script: [],
|
|
4142
|
+
noscript: [],
|
|
4143
|
+
htmlAttrs: {},
|
|
4144
|
+
bodyAttrs: {}
|
|
4098
4145
|
};
|
|
4099
4146
|
for (const entry of entries) {
|
|
4100
4147
|
if (entry.title) merged.title = entry.title;
|
|
4101
4148
|
if (entry.meta) merged.meta.push(...entry.meta);
|
|
4102
4149
|
if (entry.link) merged.link.push(...entry.link);
|
|
4103
4150
|
if (entry.style) merged.style.push(...entry.style);
|
|
4151
|
+
if (entry.script) merged.script.push(...entry.script);
|
|
4152
|
+
if (entry.noscript) merged.noscript.push(...entry.noscript);
|
|
4104
4153
|
if (entry.htmlAttrs) merged.htmlAttrs = {
|
|
4105
4154
|
...merged.htmlAttrs ?? {},
|
|
4106
4155
|
...entry.htmlAttrs
|
|
4107
4156
|
};
|
|
4157
|
+
if (entry.bodyAttrs) merged.bodyAttrs = {
|
|
4158
|
+
...merged.bodyAttrs ?? {},
|
|
4159
|
+
...entry.bodyAttrs
|
|
4160
|
+
};
|
|
4108
4161
|
}
|
|
4109
4162
|
merged.link = sortHeadLinksForPriority(merged.link ?? []);
|
|
4110
4163
|
return merged;
|
|
@@ -4125,8 +4178,36 @@ function renderHead(head) {
|
|
|
4125
4178
|
const cssContent = escapeStyleContent(style);
|
|
4126
4179
|
tags.push(`<style data-rx-head="true"${styleIdAttr}>${cssContent}</style>`);
|
|
4127
4180
|
}
|
|
4181
|
+
for (const noscript of head.noscript ?? []) {
|
|
4182
|
+
const rendered = renderHeadNoscript(noscript);
|
|
4183
|
+
if (rendered) tags.push(rendered);
|
|
4184
|
+
}
|
|
4185
|
+
for (const script of head.script ?? []) {
|
|
4186
|
+
const rendered = renderHeadScript(script);
|
|
4187
|
+
if (rendered) tags.push(rendered);
|
|
4188
|
+
}
|
|
4128
4189
|
return tags.join("");
|
|
4129
4190
|
}
|
|
4191
|
+
function renderHeadScript(entry) {
|
|
4192
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) return "";
|
|
4193
|
+
const attributes = { ...entry };
|
|
4194
|
+
const innerHTML = String(attributes.innerHTML ?? attributes.children ?? "");
|
|
4195
|
+
delete attributes.innerHTML;
|
|
4196
|
+
delete attributes.children;
|
|
4197
|
+
const renderedAttributes = renderAttributes(attributes);
|
|
4198
|
+
return `<script data-rx-head="true"${renderedAttributes ? ` ${renderedAttributes}` : ""}>${escapeScriptContent(innerHTML)}<\/script>`;
|
|
4199
|
+
}
|
|
4200
|
+
function renderHeadNoscript(entry) {
|
|
4201
|
+
if (typeof entry === "string") return `<noscript data-rx-head="true">${escapeHtml(entry)}</noscript>`;
|
|
4202
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) return "";
|
|
4203
|
+
return `<noscript data-rx-head="true">${Array.isArray(entry.link) ? entry.link.filter((link) => Boolean(link) && typeof link === "object" && !Array.isArray(link)).map((link) => `<link ${renderAttributes(link)}>`).join("") : ""}${entry.innerHTML === void 0 ? "" : escapeNoscriptContent(String(entry.innerHTML))}</noscript>`;
|
|
4204
|
+
}
|
|
4205
|
+
function escapeScriptContent(source) {
|
|
4206
|
+
return source.replace(/<\/script/gi, "<\\/script");
|
|
4207
|
+
}
|
|
4208
|
+
function escapeNoscriptContent(source) {
|
|
4209
|
+
return source.replace(/<\/noscript/gi, "<\\/noscript");
|
|
4210
|
+
}
|
|
4130
4211
|
function sortHeadLinksForPriority(links) {
|
|
4131
4212
|
return links.map((link, index) => ({
|
|
4132
4213
|
link,
|
|
@@ -4241,8 +4322,32 @@ function escapeStyleContent(css) {
|
|
|
4241
4322
|
else str = String(css);
|
|
4242
4323
|
return str.replace(/<\/style/gi, "<\\/style");
|
|
4243
4324
|
}
|
|
4325
|
+
function renderHeadStyleValue(value) {
|
|
4326
|
+
if (value === null || value === void 0 || value === false) return "";
|
|
4327
|
+
if (Array.isArray(value)) return value.map((entry) => renderHeadStyleValue(entry)).filter(Boolean).join(";");
|
|
4328
|
+
if (typeof value === "object") return Object.entries(value).map(([property, entry]) => {
|
|
4329
|
+
if (entry === null || entry === void 0 || entry === false) return "";
|
|
4330
|
+
return `${property.startsWith("--") ? property : property.replace(/^ms([A-Z])/, (_match, letter) => `-ms-${letter.toLowerCase()}`).replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}:${String(entry)}`;
|
|
4331
|
+
}).filter(Boolean).join(";");
|
|
4332
|
+
return String(value);
|
|
4333
|
+
}
|
|
4334
|
+
function renderHeadClassValue(value) {
|
|
4335
|
+
if (value === null || value === void 0 || value === false) return "";
|
|
4336
|
+
if (Array.isArray(value)) return value.map((entry) => renderHeadClassValue(entry)).filter(Boolean).join(" ");
|
|
4337
|
+
if (typeof value === "object") return Object.entries(value).filter(([, enabled]) => Boolean(enabled)).map(([className]) => className).join(" ");
|
|
4338
|
+
return String(value);
|
|
4339
|
+
}
|
|
4340
|
+
function normalizeHeadAttributeValue(key, value) {
|
|
4341
|
+
if (value === null || value === void 0 || value === false) return null;
|
|
4342
|
+
if (key === "style") return renderHeadStyleValue(value) || null;
|
|
4343
|
+
if (key === "class") return renderHeadClassValue(value) || null;
|
|
4344
|
+
return String(value);
|
|
4345
|
+
}
|
|
4244
4346
|
function renderAttributes(attributes) {
|
|
4245
|
-
return Object.entries(attributes).map(([key, value]) =>
|
|
4347
|
+
return Object.entries(attributes).map(([key, value]) => {
|
|
4348
|
+
const normalized = normalizeHeadAttributeValue(key, value);
|
|
4349
|
+
return normalized === null ? "" : `${key}="${escapeAttribute(normalized)}"`;
|
|
4350
|
+
}).filter(Boolean).join(" ");
|
|
4246
4351
|
}
|
|
4247
4352
|
function resolveLayoutName(node, context, locals) {
|
|
4248
4353
|
const dynamic = node.attrs.find((attr) => attr.kind === "dynamic" && attr.name === "name");
|