sibujs 3.2.1 → 3.3.0
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/browser.cjs +7 -1
- package/dist/browser.js +5 -5
- package/dist/build.cjs +49 -22
- package/dist/build.js +14 -14
- package/dist/cdn.global.js +7 -7
- package/dist/{chunk-5N74TKLD.js → chunk-24DBWDTK.js} +1 -1
- package/dist/{chunk-2C4E3HBM.js → chunk-4WXWJ4SW.js} +5 -5
- package/dist/{chunk-C427DVQF.js → chunk-5K72I3UQ.js} +2 -2
- package/dist/{chunk-2UPRY23K.js → chunk-5VGSK6D2.js} +1 -1
- package/dist/{chunk-NPIEEKPT.js → chunk-6G6UNHZI.js} +6 -6
- package/dist/{chunk-FDY42FIU.js → chunk-7JHWAGRQ.js} +2 -2
- package/dist/{chunk-V2MTG5FT.js → chunk-BEIKESVL.js} +33 -16
- package/dist/{chunk-LMLD24FC.js → chunk-COY6PUD2.js} +7 -1
- package/dist/{chunk-JYXOEYI4.js → chunk-CVMMULHO.js} +2 -2
- package/dist/{chunk-H6PCHJZQ.js → chunk-F4UM7QBJ.js} +11 -3
- package/dist/{chunk-BGNLPNGV.js → chunk-IHBVTURX.js} +4 -4
- package/dist/{chunk-YFDGQWDA.js → chunk-JBXNCZSC.js} +1 -1
- package/dist/{chunk-HMJFCBRR.js → chunk-L3GAGWCC.js} +10 -1
- package/dist/{chunk-GOUM4JCT.js → chunk-M6WSIGYW.js} +2 -2
- package/dist/{chunk-VOCE4NNK.js → chunk-MWZFOIBG.js} +5 -5
- package/dist/{chunk-X67UYC74.js → chunk-NUWKIEHE.js} +14 -24
- package/dist/{chunk-RLUJL2MV.js → chunk-Q2ERM6NT.js} +6 -7
- package/dist/{chunk-HXMS4SNP.js → chunk-R3QEDXFS.js} +2 -2
- package/dist/{chunk-NFYWLRUO.js → chunk-S4FHR5ZZ.js} +3 -3
- package/dist/{chunk-7XDYVJLE.js → chunk-SLCUP2EK.js} +6 -6
- package/dist/{chunk-OYLPZO4N.js → chunk-USDR2GFV.js} +4 -4
- package/dist/{chunk-4JCAUOLN.js → chunk-WVJJUFPC.js} +22 -12
- package/dist/{chunk-Z2FWAE4B.js → chunk-X3NHE2DK.js} +3 -1
- package/dist/{chunk-FOI23UJL.js → chunk-XQ7XSGYP.js} +1 -1
- package/dist/{chunk-RDRSWYNP.js → chunk-ZUVLC7TM.js} +1 -1
- package/dist/data.cjs +7 -1
- package/dist/data.js +8 -8
- package/dist/devtools.cjs +7 -1
- package/dist/devtools.js +7 -7
- package/dist/ecosystem.cjs +22 -19
- package/dist/ecosystem.js +10 -10
- package/dist/extras.cjs +62 -28
- package/dist/extras.js +24 -24
- package/dist/index.cjs +49 -22
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +14 -14
- package/dist/motion.cjs +7 -1
- package/dist/motion.js +4 -4
- package/dist/patterns.cjs +7 -1
- package/dist/patterns.js +6 -6
- package/dist/performance.cjs +47 -9
- package/dist/performance.js +8 -8
- package/dist/plugins.cjs +24 -18
- package/dist/plugins.js +12 -12
- package/dist/{ssr-2QDQ27EV.js → ssr-6D67RAVB.js} +3 -3
- package/dist/ssr.cjs +22 -19
- package/dist/ssr.js +11 -11
- package/dist/testing.cjs +19 -7
- package/dist/testing.js +16 -10
- package/dist/ui.cjs +27 -4
- package/dist/ui.js +9 -9
- package/dist/widgets.cjs +32 -2
- package/dist/widgets.js +8 -8
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bindAttribute
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q2ERM6NT.js";
|
|
4
4
|
import {
|
|
5
5
|
derived
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CVMMULHO.js";
|
|
7
7
|
import {
|
|
8
8
|
dispose,
|
|
9
9
|
registerDisposer
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5VGSK6D2.js";
|
|
11
11
|
import {
|
|
12
12
|
effect
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
14
14
|
import {
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5K72I3UQ.js";
|
|
17
17
|
import {
|
|
18
18
|
track
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-X3NHE2DK.js";
|
|
20
20
|
|
|
21
21
|
// src/ui/form.ts
|
|
22
22
|
function required(message = "This field is required") {
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
cleanup,
|
|
6
6
|
retrack,
|
|
7
7
|
untracked
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-X3NHE2DK.js";
|
|
9
9
|
import {
|
|
10
10
|
devAssert
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-COY6PUD2.js";
|
|
12
12
|
|
|
13
13
|
// src/core/signals/effect.ts
|
|
14
14
|
var _g = globalThis;
|
|
@@ -139,43 +139,43 @@ import {
|
|
|
139
139
|
use,
|
|
140
140
|
var_,
|
|
141
141
|
video
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-24DBWDTK.js";
|
|
143
143
|
import {
|
|
144
144
|
watch
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-F4UM7QBJ.js";
|
|
146
146
|
import {
|
|
147
147
|
trustHTML
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-R3QEDXFS.js";
|
|
149
149
|
import {
|
|
150
150
|
context
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-JBXNCZSC.js";
|
|
152
152
|
import {
|
|
153
153
|
SVG_NS,
|
|
154
154
|
bindChildNode,
|
|
155
155
|
tagFactory
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-NUWKIEHE.js";
|
|
157
157
|
import {
|
|
158
158
|
bindAttribute,
|
|
159
159
|
bindDynamic
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-Q2ERM6NT.js";
|
|
161
161
|
import {
|
|
162
162
|
derived
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-CVMMULHO.js";
|
|
164
164
|
import {
|
|
165
165
|
checkLeaks,
|
|
166
166
|
dispose,
|
|
167
167
|
registerDisposer
|
|
168
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-5VGSK6D2.js";
|
|
169
169
|
import {
|
|
170
170
|
isEventHandlerAttr,
|
|
171
171
|
isUrlAttribute,
|
|
172
172
|
sanitizeSrcset,
|
|
173
173
|
sanitizeUrl
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-L3GAGWCC.js";
|
|
175
175
|
import {
|
|
176
176
|
effect,
|
|
177
177
|
on
|
|
178
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
179
179
|
import {
|
|
180
180
|
disableSSR,
|
|
181
181
|
enableSSR,
|
|
@@ -190,21 +190,23 @@ import {
|
|
|
190
190
|
enqueueBatchedSignal,
|
|
191
191
|
isBatching,
|
|
192
192
|
signal
|
|
193
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-5K72I3UQ.js";
|
|
194
194
|
import {
|
|
195
195
|
notifySubscribers,
|
|
196
196
|
recordDependency,
|
|
197
|
+
resumeTracking,
|
|
197
198
|
retrack,
|
|
198
199
|
setMaxDrainIterations,
|
|
200
|
+
suspendTracking,
|
|
199
201
|
track,
|
|
200
202
|
untracked
|
|
201
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-X3NHE2DK.js";
|
|
202
204
|
import {
|
|
203
205
|
__export,
|
|
204
206
|
devAssert,
|
|
205
207
|
devWarn,
|
|
206
208
|
isDev
|
|
207
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-COY6PUD2.js";
|
|
208
210
|
|
|
209
211
|
// index.ts
|
|
210
212
|
var index_exports = {};
|
|
@@ -1501,7 +1503,12 @@ function store(initialState) {
|
|
|
1501
1503
|
first = false;
|
|
1502
1504
|
return;
|
|
1503
1505
|
}
|
|
1504
|
-
|
|
1506
|
+
suspendTracking();
|
|
1507
|
+
try {
|
|
1508
|
+
callback(snapshot);
|
|
1509
|
+
} finally {
|
|
1510
|
+
resumeTracking();
|
|
1511
|
+
}
|
|
1505
1512
|
});
|
|
1506
1513
|
};
|
|
1507
1514
|
const subscribeKey = (key, callback) => {
|
|
@@ -1517,7 +1524,12 @@ function store(initialState) {
|
|
|
1517
1524
|
if (!Object.is(current, prev)) {
|
|
1518
1525
|
const oldPrev = prev;
|
|
1519
1526
|
prev = current;
|
|
1520
|
-
|
|
1527
|
+
suspendTracking();
|
|
1528
|
+
try {
|
|
1529
|
+
callback(current, oldPrev);
|
|
1530
|
+
} finally {
|
|
1531
|
+
resumeTracking();
|
|
1532
|
+
}
|
|
1521
1533
|
}
|
|
1522
1534
|
});
|
|
1523
1535
|
};
|
|
@@ -3029,7 +3041,12 @@ function ErrorBoundary(optionsOrChildren, maybeChildren) {
|
|
|
3029
3041
|
} else if (collected.length > 1) {
|
|
3030
3042
|
const Agg = globalThis.AggregateError;
|
|
3031
3043
|
handleError(
|
|
3032
|
-
Agg ? new Agg(collected, `${collected.length} pre-mount errors caught by ErrorBoundary`) :
|
|
3044
|
+
Agg ? new Agg(collected, `${collected.length} pre-mount errors caught by ErrorBoundary`) : (
|
|
3045
|
+
// AggregateError is ES2021 and present in every supported runtime
|
|
3046
|
+
// (matches the browserslist targets), so this fallback is defensive.
|
|
3047
|
+
/* v8 ignore next */
|
|
3048
|
+
new Error(collected.map((e) => e.message).join("; "))
|
|
3049
|
+
)
|
|
3033
3050
|
);
|
|
3034
3051
|
}
|
|
3035
3052
|
return void 0;
|
|
@@ -6,7 +6,13 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/core/dev.ts
|
|
8
8
|
function isDev() {
|
|
9
|
-
return typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ :
|
|
9
|
+
return typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ : (
|
|
10
|
+
// The bare `__SIBU_DEV__` is a bundler define that only exists in
|
|
11
|
+
// production builds; under the test runner it is always undefined, so
|
|
12
|
+
// this branch is unreachable here.
|
|
13
|
+
/* v8 ignore next 2 */
|
|
14
|
+
typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : typeof process !== "undefined" && process.env?.NODE_ENV !== "production"
|
|
15
|
+
);
|
|
10
16
|
}
|
|
11
17
|
var _isDev = isDev();
|
|
12
18
|
function devAssert(condition, message) {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
retrack,
|
|
4
4
|
track,
|
|
5
5
|
trackingSuspended
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X3NHE2DK.js";
|
|
7
7
|
import {
|
|
8
8
|
devAssert
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-COY6PUD2.js";
|
|
10
10
|
|
|
11
11
|
// src/core/signals/derived.ts
|
|
12
12
|
function derived(getter, options) {
|
|
@@ -2,11 +2,13 @@ import {
|
|
|
2
2
|
isSSR
|
|
3
3
|
} from "./chunk-GOJMFRBL.js";
|
|
4
4
|
import {
|
|
5
|
+
resumeTracking,
|
|
6
|
+
suspendTracking,
|
|
5
7
|
track
|
|
6
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-X3NHE2DK.js";
|
|
7
9
|
import {
|
|
8
10
|
devAssert
|
|
9
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-COY6PUD2.js";
|
|
10
12
|
|
|
11
13
|
// src/core/signals/watch.ts
|
|
12
14
|
function watch(getter, callback) {
|
|
@@ -24,8 +26,14 @@ function watch(getter, callback) {
|
|
|
24
26
|
return;
|
|
25
27
|
}
|
|
26
28
|
if (!Object.is(newValue, oldValue)) {
|
|
27
|
-
|
|
29
|
+
const prev = oldValue;
|
|
28
30
|
oldValue = newValue;
|
|
31
|
+
suspendTracking();
|
|
32
|
+
try {
|
|
33
|
+
callback(newValue, prev);
|
|
34
|
+
} finally {
|
|
35
|
+
resumeTracking();
|
|
36
|
+
}
|
|
29
37
|
}
|
|
30
38
|
};
|
|
31
39
|
const teardown = track(subscriber);
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-3JHCYHWN.js";
|
|
4
4
|
import {
|
|
5
5
|
tagFactory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NUWKIEHE.js";
|
|
7
7
|
import {
|
|
8
8
|
derived
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CVMMULHO.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
13
13
|
import {
|
|
14
14
|
batch,
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5K72I3UQ.js";
|
|
17
17
|
|
|
18
18
|
// src/ecosystem/adapters/mobx.ts
|
|
19
19
|
function mobXAdapter(options) {
|
|
@@ -41,7 +41,9 @@ function sanitizeSrcset(value) {
|
|
|
41
41
|
}
|
|
42
42
|
return out.join(", ");
|
|
43
43
|
}
|
|
44
|
+
var CSS_DANGER_GATE = /[(:@\\]/;
|
|
44
45
|
function sanitizeCSSValue(value) {
|
|
46
|
+
if (!CSS_DANGER_GATE.test(value)) return value;
|
|
45
47
|
const decoded = value.replace(/\\([0-9a-fA-F]{1,6})\s?/g, (_m, hex) => {
|
|
46
48
|
const code = Number.parseInt(hex, 16);
|
|
47
49
|
if (!Number.isFinite(code) || code < 0 || code > 1114111) return "";
|
|
@@ -90,6 +92,12 @@ var URL_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
|
90
92
|
function isUrlAttribute(attr) {
|
|
91
93
|
return URL_ATTRIBUTES.has(attr.toLowerCase());
|
|
92
94
|
}
|
|
95
|
+
function sanitizeAttributeString(attr, value) {
|
|
96
|
+
const lower = attr.toLowerCase();
|
|
97
|
+
if (lower === "srcset") return sanitizeSrcset(value);
|
|
98
|
+
if (URL_ATTRIBUTES.has(lower)) return sanitizeUrl(value);
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
93
101
|
|
|
94
102
|
export {
|
|
95
103
|
stripControlChars,
|
|
@@ -98,5 +106,6 @@ export {
|
|
|
98
106
|
sanitizeSrcset,
|
|
99
107
|
sanitizeCSSValue,
|
|
100
108
|
stripHtml,
|
|
101
|
-
isUrlAttribute
|
|
109
|
+
isUrlAttribute,
|
|
110
|
+
sanitizeAttributeString
|
|
102
111
|
};
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-H3SRKIYX.js";
|
|
4
4
|
import {
|
|
5
5
|
effect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
7
7
|
import {
|
|
8
8
|
batch,
|
|
9
9
|
signal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5K72I3UQ.js";
|
|
11
11
|
|
|
12
12
|
// src/browser/media.ts
|
|
13
13
|
function media(query) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
context
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JBXNCZSC.js";
|
|
4
4
|
import {
|
|
5
5
|
derived
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CVMMULHO.js";
|
|
7
7
|
import {
|
|
8
8
|
sanitizeUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L3GAGWCC.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
13
13
|
import {
|
|
14
14
|
getRequestScopedCache
|
|
15
15
|
} from "./chunk-GOJMFRBL.js";
|
|
16
16
|
import {
|
|
17
17
|
batch,
|
|
18
18
|
signal
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5K72I3UQ.js";
|
|
20
20
|
|
|
21
21
|
// src/data/retry.ts
|
|
22
22
|
function calculateDelay(attempt, strategy, baseDelay, maxDelay, jitter) {
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bindAttribute
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q2ERM6NT.js";
|
|
4
4
|
import {
|
|
5
5
|
dispose,
|
|
6
6
|
registerDisposer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5VGSK6D2.js";
|
|
8
8
|
import {
|
|
9
9
|
isEventHandlerAttr,
|
|
10
|
-
|
|
11
|
-
sanitizeCSSValue
|
|
12
|
-
|
|
13
|
-
sanitizeUrl
|
|
14
|
-
} from "./chunk-HMJFCBRR.js";
|
|
10
|
+
sanitizeAttributeString,
|
|
11
|
+
sanitizeCSSValue
|
|
12
|
+
} from "./chunk-L3GAGWCC.js";
|
|
15
13
|
import {
|
|
16
14
|
reactiveBinding,
|
|
17
15
|
track
|
|
18
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-X3NHE2DK.js";
|
|
19
17
|
import {
|
|
20
18
|
devWarn,
|
|
21
19
|
isDev
|
|
22
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-COY6PUD2.js";
|
|
23
21
|
|
|
24
22
|
// src/reactivity/bindChildNode.ts
|
|
25
23
|
var _isDev = isDev();
|
|
@@ -98,11 +96,8 @@ function bindChildNode(placeholder, getter) {
|
|
|
98
96
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
99
97
|
var _isDev2 = isDev();
|
|
100
98
|
var BLOCKED_TAGS = /* @__PURE__ */ new Set(["script", "iframe", "object", "embed", "frame", "frameset"]);
|
|
101
|
-
function
|
|
102
|
-
|
|
103
|
-
if (BLOCKED_TAGS.has(lower)) {
|
|
104
|
-
throw new Error(`tagFactory: refusing to create <${tag}> \u2014 tag is blocked for security reasons.`);
|
|
105
|
-
}
|
|
99
|
+
function isBlockedTag(tag) {
|
|
100
|
+
return BLOCKED_TAGS.has(tag.toLowerCase());
|
|
106
101
|
}
|
|
107
102
|
var CLOBBER_RISKY_IDS = /* @__PURE__ */ new Set([
|
|
108
103
|
"config",
|
|
@@ -257,8 +252,11 @@ function appendChildren(el, nodes) {
|
|
|
257
252
|
}
|
|
258
253
|
}
|
|
259
254
|
var tagFactory = (tag, ns) => {
|
|
255
|
+
const blocked = isBlockedTag(tag);
|
|
260
256
|
return (first, second) => {
|
|
261
|
-
|
|
257
|
+
if (blocked) {
|
|
258
|
+
throw new Error(`tagFactory: refusing to create <${tag}> \u2014 tag is blocked for security reasons.`);
|
|
259
|
+
}
|
|
262
260
|
const el = ns ? document.createElementNS(ns, tag) : document.createElement(tag);
|
|
263
261
|
if (first === void 0) return el;
|
|
264
262
|
if (typeof first === "string") {
|
|
@@ -328,7 +326,6 @@ var tagFactory = (tag, ns) => {
|
|
|
328
326
|
default: {
|
|
329
327
|
const value = props[key];
|
|
330
328
|
if (value == null) continue;
|
|
331
|
-
const lkey = key.toLowerCase();
|
|
332
329
|
if (isEventHandlerAttr(key)) continue;
|
|
333
330
|
if (typeof value === "function") {
|
|
334
331
|
registerDisposer(el, bindAttribute(el, key, value));
|
|
@@ -341,14 +338,7 @@ var tagFactory = (tag, ns) => {
|
|
|
341
338
|
el.removeAttribute(key);
|
|
342
339
|
}
|
|
343
340
|
} else {
|
|
344
|
-
|
|
345
|
-
if (lkey === "srcset") {
|
|
346
|
-
el.setAttribute(key, sanitizeSrcset(str));
|
|
347
|
-
} else if (isUrlAttribute(lkey)) {
|
|
348
|
-
el.setAttribute(key, sanitizeUrl(str));
|
|
349
|
-
} else {
|
|
350
|
-
el.setAttribute(key, str);
|
|
351
|
-
}
|
|
341
|
+
el.setAttribute(key, sanitizeAttributeString(key, String(value)));
|
|
352
342
|
}
|
|
353
343
|
}
|
|
354
344
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isEventHandlerAttr,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "./chunk-HMJFCBRR.js";
|
|
3
|
+
sanitizeAttributeString
|
|
4
|
+
} from "./chunk-L3GAGWCC.js";
|
|
6
5
|
import {
|
|
7
6
|
reactiveBinding
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X3NHE2DK.js";
|
|
9
8
|
import {
|
|
10
9
|
devWarn,
|
|
11
10
|
isDev
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-COY6PUD2.js";
|
|
13
12
|
|
|
14
13
|
// src/reactivity/bindAttribute.ts
|
|
15
14
|
var _isDev = isDev();
|
|
@@ -48,7 +47,7 @@ function bindAttribute(el, attr, getter) {
|
|
|
48
47
|
if ((attr === "value" || attr === "checked") && attr in el) {
|
|
49
48
|
setProp(el, attr, attr === "checked" ? Boolean(value) : str);
|
|
50
49
|
} else {
|
|
51
|
-
el.setAttribute(attr,
|
|
50
|
+
el.setAttribute(attr, sanitizeAttributeString(attr, str));
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
return reactiveBinding(commit);
|
|
@@ -78,7 +77,7 @@ function bindDynamic(el, nameGetter, valueGetter) {
|
|
|
78
77
|
if ((name === "value" || name === "checked") && name in el) {
|
|
79
78
|
setProp(el, name, name === "checked" ? Boolean(value) : str);
|
|
80
79
|
} else {
|
|
81
|
-
el.setAttribute(name,
|
|
80
|
+
el.setAttribute(name, sanitizeAttributeString(name, str));
|
|
82
81
|
}
|
|
83
82
|
prevName = name;
|
|
84
83
|
}
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
sanitizeSrcset,
|
|
4
4
|
sanitizeUrl,
|
|
5
5
|
stripControlChars
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L3GAGWCC.js";
|
|
7
7
|
import {
|
|
8
8
|
getSSRStore
|
|
9
9
|
} from "./chunk-GOJMFRBL.js";
|
|
10
10
|
import {
|
|
11
11
|
isDev
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-COY6PUD2.js";
|
|
13
13
|
|
|
14
14
|
// src/platform/ssr.ts
|
|
15
15
|
function sanitizeUrlAttr(name, value) {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-H3SRKIYX.js";
|
|
5
5
|
import {
|
|
6
6
|
derived
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CVMMULHO.js";
|
|
8
8
|
import {
|
|
9
9
|
effect
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
11
11
|
import {
|
|
12
12
|
batch,
|
|
13
13
|
signal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5K72I3UQ.js";
|
|
15
15
|
|
|
16
16
|
// src/patterns/machine.ts
|
|
17
17
|
function machine(config) {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dispose
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5VGSK6D2.js";
|
|
4
4
|
import {
|
|
5
5
|
stripHtml
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L3GAGWCC.js";
|
|
7
7
|
import {
|
|
8
8
|
effect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
10
10
|
import {
|
|
11
11
|
signal
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5K72I3UQ.js";
|
|
13
13
|
import {
|
|
14
14
|
forEachSubscriber,
|
|
15
15
|
getSubscriberCount,
|
|
16
16
|
getSubscriberDeps
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-X3NHE2DK.js";
|
|
18
18
|
import {
|
|
19
19
|
isDev
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-COY6PUD2.js";
|
|
21
21
|
|
|
22
22
|
// src/devtools/debug.ts
|
|
23
23
|
var debugEnabled = false;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
div,
|
|
3
3
|
span
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-24DBWDTK.js";
|
|
5
5
|
import {
|
|
6
6
|
isEventHandlerAttr,
|
|
7
7
|
sanitizeUrl,
|
|
8
8
|
stripControlChars
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L3GAGWCC.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
13
13
|
import {
|
|
14
14
|
batch,
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5K72I3UQ.js";
|
|
17
17
|
|
|
18
18
|
// src/platform/head.ts
|
|
19
19
|
var HEAD_URL_ATTRS = /* @__PURE__ */ new Set(["href", "src"]);
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dispose
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5VGSK6D2.js";
|
|
4
|
+
import {
|
|
5
|
+
sanitizeUrl
|
|
6
|
+
} from "./chunk-L3GAGWCC.js";
|
|
4
7
|
import {
|
|
5
8
|
effect
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
7
10
|
import {
|
|
8
11
|
signal
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5K72I3UQ.js";
|
|
10
13
|
import {
|
|
11
14
|
devWarn,
|
|
12
15
|
isDev
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-COY6PUD2.js";
|
|
14
17
|
|
|
15
18
|
// src/performance/scheduler.ts
|
|
16
19
|
var Priority = {
|
|
@@ -284,11 +287,13 @@ function getDOMPool() {
|
|
|
284
287
|
}
|
|
285
288
|
var preloadedResources = /* @__PURE__ */ new Set();
|
|
286
289
|
function preloadResource(url, type = "fetch") {
|
|
287
|
-
|
|
288
|
-
|
|
290
|
+
const safe = sanitizeUrl(url);
|
|
291
|
+
if (!safe) return;
|
|
292
|
+
if (preloadedResources.has(safe)) return;
|
|
293
|
+
preloadedResources.add(safe);
|
|
289
294
|
const link = document.createElement("link");
|
|
290
295
|
link.rel = "preload";
|
|
291
|
-
link.href =
|
|
296
|
+
link.href = safe;
|
|
292
297
|
switch (type) {
|
|
293
298
|
case "script":
|
|
294
299
|
link.setAttribute("as", "script");
|
|
@@ -306,11 +311,13 @@ function preloadResource(url, type = "fetch") {
|
|
|
306
311
|
document.head.appendChild(link);
|
|
307
312
|
}
|
|
308
313
|
function prefetch(url) {
|
|
309
|
-
|
|
310
|
-
|
|
314
|
+
const safe = sanitizeUrl(url);
|
|
315
|
+
if (!safe) return;
|
|
316
|
+
if (preloadedResources.has(safe)) return;
|
|
317
|
+
preloadedResources.add(safe);
|
|
311
318
|
const link = document.createElement("link");
|
|
312
319
|
link.rel = "prefetch";
|
|
313
|
-
link.href =
|
|
320
|
+
link.href = safe;
|
|
314
321
|
document.head.appendChild(link);
|
|
315
322
|
}
|
|
316
323
|
function preloadImage(src) {
|
|
@@ -679,11 +686,14 @@ function lazyChunk(id, loader, registry, fallback) {
|
|
|
679
686
|
}
|
|
680
687
|
function preloadModule(url) {
|
|
681
688
|
if (typeof document === "undefined") return;
|
|
682
|
-
const
|
|
689
|
+
const safe = sanitizeUrl(url);
|
|
690
|
+
if (!safe) return;
|
|
691
|
+
const safeHref = typeof CSS !== "undefined" && typeof CSS.escape === "function" ? CSS.escape(safe) : safe.replace(/["\\]/g, "\\$&");
|
|
692
|
+
const existing = document.querySelector(`link[rel="modulepreload"][href="${safeHref}"]`);
|
|
683
693
|
if (existing) return;
|
|
684
694
|
const link = document.createElement("link");
|
|
685
695
|
link.rel = "modulepreload";
|
|
686
|
-
link.href =
|
|
696
|
+
link.href = safe;
|
|
687
697
|
document.head.appendChild(link);
|
|
688
698
|
}
|
|
689
699
|
function preloadModules(urls) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
devWarn,
|
|
3
3
|
isDev
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-COY6PUD2.js";
|
|
5
5
|
|
|
6
6
|
// src/reactivity/track.ts
|
|
7
7
|
var _isDev = isDev();
|
|
@@ -411,6 +411,8 @@ function forEachSubscriber(signal, visit) {
|
|
|
411
411
|
|
|
412
412
|
export {
|
|
413
413
|
trackingSuspended,
|
|
414
|
+
suspendTracking,
|
|
415
|
+
resumeTracking,
|
|
414
416
|
untracked,
|
|
415
417
|
retrack,
|
|
416
418
|
track,
|