sibujs 4.9.0 → 4.10.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.
- package/dist/browser.cjs +41 -4
- package/dist/browser.js +4 -4
- package/dist/build.cjs +102 -38
- package/dist/build.js +10 -10
- package/dist/cdn.dev.global.js +14 -14
- package/dist/cdn.full.dev.global.js +13 -13
- package/dist/cdn.full.global.js +12 -12
- package/dist/cdn.global.js +15 -15
- package/dist/{chunk-7OV5Q2UU.js → chunk-2D47RVVK.js} +4 -4
- package/dist/{chunk-5MLWTIQE.js → chunk-2T73SWKF.js} +2 -2
- package/dist/{chunk-YW6HQKGO.js → chunk-42REZXE4.js} +2 -2
- package/dist/{chunk-SBTZEYNI.js → chunk-6DYRY2NF.js} +8 -1
- package/dist/{chunk-562UVHMM.js → chunk-ADJEMTRC.js} +11 -6
- package/dist/{chunk-SYHGGDNW.js → chunk-BNZDDNBR.js} +1 -1
- package/dist/{chunk-K6K5ACO6.js → chunk-CID4BYBF.js} +3 -3
- package/dist/{chunk-TV464N2M.js → chunk-CYUU3XXG.js} +3 -3
- package/dist/{chunk-FNOK662L.js → chunk-CZINTERN.js} +73 -43
- package/dist/{chunk-CDBKFGXN.js → chunk-DA2LJXK3.js} +1 -1
- package/dist/{chunk-MPWDSTYK.js → chunk-DS6PFIZK.js} +1 -1
- package/dist/{chunk-XJVTQUIV.js → chunk-GEQNWNYS.js} +5 -5
- package/dist/{chunk-FHCZMHHE.js → chunk-GVVZPMA5.js} +1 -1
- package/dist/{chunk-NQMKWBKU.js → chunk-HZQEL575.js} +1 -1
- package/dist/{chunk-CF2KCWRE.js → chunk-JZMLRF2G.js} +2 -2
- package/dist/{chunk-X7NRHFZR.js → chunk-LK3VK47W.js} +1 -1
- package/dist/{chunk-2K3Z3XO4.js → chunk-LYM6TT2R.js} +4 -4
- package/dist/{chunk-KG25XMGP.js → chunk-MJZUXQHR.js} +15 -8
- package/dist/{chunk-G2WHYEL7.js → chunk-NROLUUCO.js} +39 -4
- package/dist/{chunk-DRMLIF6M.js → chunk-WHZKRSHQ.js} +19 -12
- package/dist/{chunk-QBKCK6MJ.js → chunk-YNE4FSVX.js} +1 -1
- package/dist/data.cjs +48 -6
- package/dist/data.d.cts +9 -1
- package/dist/data.d.ts +9 -1
- package/dist/data.js +5 -5
- package/dist/devtools.cjs +41 -4
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +41 -4
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +75 -25
- package/dist/extras.js +20 -20
- package/dist/index.cjs +102 -38
- package/dist/index.d.cts +32 -4
- package/dist/index.d.ts +32 -4
- package/dist/index.js +10 -10
- package/dist/motion.cjs +36 -4
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +41 -4
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +55 -14
- package/dist/performance.js +4 -4
- package/dist/plugins.cjs +163 -51
- package/dist/plugins.d.cts +56 -2
- package/dist/plugins.d.ts +56 -2
- package/dist/plugins.js +130 -52
- package/dist/ssr.cjs +50 -9
- package/dist/ssr.js +7 -7
- package/dist/testing.cjs +41 -4
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +41 -4
- package/dist/ui.js +7 -7
- package/dist/widgets.cjs +36 -4
- package/dist/widgets.js +6 -6
- package/package.json +1 -1
|
@@ -4,9 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
cleanup,
|
|
6
6
|
emitDevtools,
|
|
7
|
+
getOwnerScope,
|
|
7
8
|
retrack,
|
|
9
|
+
runWithOwnerScope,
|
|
8
10
|
untracked
|
|
9
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NROLUUCO.js";
|
|
10
12
|
import {
|
|
11
13
|
devAssert,
|
|
12
14
|
reportError
|
|
@@ -35,6 +37,11 @@ function flushUserCleanups(ctx) {
|
|
|
35
37
|
const list = ctx.userCleanups;
|
|
36
38
|
if (list.length === 0) return;
|
|
37
39
|
ctx.userCleanups = [];
|
|
40
|
+
const scope = ctx.subscriber._scope ?? null;
|
|
41
|
+
if (scope === getOwnerScope()) runCleanups(list);
|
|
42
|
+
else runWithOwnerScope(scope, () => runCleanups(list));
|
|
43
|
+
}
|
|
44
|
+
function runCleanups(list) {
|
|
38
45
|
for (let i = list.length - 1; i >= 0; i--) {
|
|
39
46
|
try {
|
|
40
47
|
list[i]();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
derived
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LK3VK47W.js";
|
|
4
4
|
import {
|
|
5
5
|
globalSingleton
|
|
6
6
|
} from "./chunk-7ZHH77QA.js";
|
|
7
7
|
import {
|
|
8
8
|
effect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6DYRY2NF.js";
|
|
10
10
|
import {
|
|
11
11
|
sanitizeUrl
|
|
12
12
|
} from "./chunk-EXXSN3BW.js";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
batch,
|
|
18
18
|
signal
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BNZDDNBR.js";
|
|
20
20
|
import {
|
|
21
21
|
untracked
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NROLUUCO.js";
|
|
23
23
|
import {
|
|
24
24
|
reportError
|
|
25
25
|
} from "./chunk-NYNYSPK7.js";
|
|
@@ -269,7 +269,7 @@ function query(key, fetcher, options = {}) {
|
|
|
269
269
|
} = options;
|
|
270
270
|
const resolveKey = typeof key === "function" ? key : () => key;
|
|
271
271
|
const enabledGate = typeof enabled === "function" ? derived(() => Boolean(enabled())) : null;
|
|
272
|
-
const isEnabled = enabledGate ?? (() => enabled);
|
|
272
|
+
const isEnabled = enabledGate ?? (() => Boolean(enabled));
|
|
273
273
|
const cache = getActiveQueryCache();
|
|
274
274
|
const [data, setData] = signal(initialData);
|
|
275
275
|
const [isFetching, setIsFetching] = signal(false);
|
|
@@ -288,6 +288,7 @@ function query(key, fetcher, options = {}) {
|
|
|
288
288
|
let currentKey = null;
|
|
289
289
|
let attachedEntry = null;
|
|
290
290
|
let attachedKey = null;
|
|
291
|
+
let lastEnabled = null;
|
|
291
292
|
let intervalTimer = null;
|
|
292
293
|
const loading = derived(() => isFetching() && data() === void 0);
|
|
293
294
|
const isStale = derived(() => {
|
|
@@ -488,13 +489,16 @@ function query(key, fetcher, options = {}) {
|
|
|
488
489
|
const key2 = resolveKey();
|
|
489
490
|
const on = isEnabled();
|
|
490
491
|
const keyChanged = currentKey !== key2;
|
|
492
|
+
const enabledRose = on && lastEnabled === false;
|
|
491
493
|
currentKey = key2;
|
|
494
|
+
lastEnabled = on;
|
|
492
495
|
if (key2 === "") {
|
|
493
496
|
detachFromEntry();
|
|
494
497
|
setIsFetching(false);
|
|
495
498
|
return;
|
|
496
499
|
}
|
|
497
500
|
const entry = getOrCreateEntry(cache, key2, initialData);
|
|
501
|
+
const reattached = attachedEntry !== entry;
|
|
498
502
|
attachToEntry(entry, key2);
|
|
499
503
|
if (keyChanged) setIsFetching(entry.promise !== null);
|
|
500
504
|
if (entry.data !== void 0) {
|
|
@@ -505,7 +509,8 @@ function query(key, fetcher, options = {}) {
|
|
|
505
509
|
setUpdatedAt(entry.dataUpdatedAt);
|
|
506
510
|
});
|
|
507
511
|
}
|
|
508
|
-
if (!keyChanged &&
|
|
512
|
+
if (!keyChanged && !reattached && !enabledRose) return;
|
|
513
|
+
if (!keyChanged && entry.data !== void 0) {
|
|
509
514
|
const isDataStale2 = entry.dataUpdatedAt === 0 || Date.now() - entry.dataUpdatedAt >= staleTime;
|
|
510
515
|
if (on && isDataStale2 && !entry.promise) doFetch();
|
|
511
516
|
return;
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-7ZHH77QA.js";
|
|
4
4
|
import {
|
|
5
5
|
effect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6DYRY2NF.js";
|
|
7
7
|
import {
|
|
8
8
|
stripHtml
|
|
9
9
|
} from "./chunk-EXXSN3BW.js";
|
|
10
10
|
import {
|
|
11
11
|
signal
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BNZDDNBR.js";
|
|
13
13
|
import {
|
|
14
14
|
forEachSubscriber,
|
|
15
15
|
getSubscriberCount,
|
|
16
16
|
getSubscriberDeps
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NROLUUCO.js";
|
|
18
18
|
import {
|
|
19
19
|
dispose,
|
|
20
20
|
isDev
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-62BDYGAG.js";
|
|
5
5
|
import {
|
|
6
6
|
derived
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LK3VK47W.js";
|
|
8
8
|
import {
|
|
9
9
|
effect
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6DYRY2NF.js";
|
|
11
11
|
import {
|
|
12
12
|
batch,
|
|
13
13
|
signal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BNZDDNBR.js";
|
|
15
15
|
import {
|
|
16
16
|
DEV,
|
|
17
17
|
devWarn,
|
|
@@ -135,44 +135,44 @@ import {
|
|
|
135
135
|
use,
|
|
136
136
|
var_,
|
|
137
137
|
video
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-YNE4FSVX.js";
|
|
139
139
|
import {
|
|
140
140
|
trustHTML
|
|
141
141
|
} from "./chunk-FC6KCJSA.js";
|
|
142
142
|
import {
|
|
143
143
|
watch
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-DA2LJXK3.js";
|
|
145
145
|
import {
|
|
146
146
|
__resetIdCounter,
|
|
147
147
|
createId,
|
|
148
148
|
domBinding
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-GVVZPMA5.js";
|
|
150
150
|
import {
|
|
151
151
|
SVG_NS,
|
|
152
152
|
bindChildNode,
|
|
153
153
|
captureFocusWithin,
|
|
154
154
|
restoreFocusWithin,
|
|
155
155
|
tagFactory
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-2T73SWKF.js";
|
|
157
157
|
import {
|
|
158
158
|
bindAttribute,
|
|
159
159
|
bindDynamic,
|
|
160
160
|
setSafeAttribute,
|
|
161
161
|
setTrustedAttribute
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-DS6PFIZK.js";
|
|
163
163
|
import {
|
|
164
164
|
isCodeTextElement
|
|
165
165
|
} from "./chunk-3ACAAQIN.js";
|
|
166
166
|
import {
|
|
167
167
|
derived
|
|
168
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-LK3VK47W.js";
|
|
169
169
|
import {
|
|
170
170
|
globalSingleton
|
|
171
171
|
} from "./chunk-7ZHH77QA.js";
|
|
172
172
|
import {
|
|
173
173
|
effect,
|
|
174
174
|
on
|
|
175
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-6DYRY2NF.js";
|
|
176
176
|
import {
|
|
177
177
|
disableSSR,
|
|
178
178
|
enableSSR,
|
|
@@ -191,19 +191,22 @@ import {
|
|
|
191
191
|
external,
|
|
192
192
|
isBatching,
|
|
193
193
|
signal
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-BNZDDNBR.js";
|
|
195
195
|
import {
|
|
196
|
+
bindOwnerScope,
|
|
196
197
|
emitDevtools,
|
|
198
|
+
getOwnerScope,
|
|
197
199
|
notifySubscribers,
|
|
198
200
|
reactiveBinding,
|
|
199
201
|
recordDependency,
|
|
200
202
|
resumeTracking,
|
|
201
203
|
retrack,
|
|
204
|
+
runWithOwnerScope,
|
|
202
205
|
setMaxDrainIterations,
|
|
203
206
|
suspendTracking,
|
|
204
207
|
track,
|
|
205
208
|
untracked
|
|
206
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-NROLUUCO.js";
|
|
207
210
|
import {
|
|
208
211
|
DEV,
|
|
209
212
|
MAX_DRAIN_TEARDOWNS,
|
|
@@ -487,12 +490,16 @@ function lazy(importFn) {
|
|
|
487
490
|
}
|
|
488
491
|
const container = div({ class: "sibu-lazy" });
|
|
489
492
|
let disposed = false;
|
|
490
|
-
importFn().then(
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
493
|
+
importFn().then(
|
|
494
|
+
// The component renders after the import resolves, in the owner scope
|
|
495
|
+
// of whoever rendered the placeholder.
|
|
496
|
+
bindOwnerScope((mod) => {
|
|
497
|
+
if (disposed) return;
|
|
498
|
+
cached = mod.default;
|
|
499
|
+
const rendered = cached();
|
|
500
|
+
replaceChildrenSafely(container, rendered);
|
|
501
|
+
})
|
|
502
|
+
).catch((err) => {
|
|
496
503
|
if (disposed) return;
|
|
497
504
|
const errorObj = err instanceof Error ? err : new Error(String(err));
|
|
498
505
|
replaceChildrenSafely(
|
|
@@ -523,7 +530,7 @@ function Suspense({ nodes, fallback }) {
|
|
|
523
530
|
}
|
|
524
531
|
if (childEl && !container.contains(childEl)) dispose(childEl);
|
|
525
532
|
});
|
|
526
|
-
|
|
533
|
+
const renderContent = bindOwnerScope(() => {
|
|
527
534
|
if (suspenseDisposed) return;
|
|
528
535
|
try {
|
|
529
536
|
const el = nodes();
|
|
@@ -551,10 +558,14 @@ function Suspense({ nodes, fallback }) {
|
|
|
551
558
|
dispatchPropagate(container, errorObj);
|
|
552
559
|
}
|
|
553
560
|
});
|
|
561
|
+
queueMicrotask(renderContent);
|
|
554
562
|
return container;
|
|
555
563
|
}
|
|
556
564
|
|
|
557
565
|
// src/core/rendering/lifecycle.ts
|
|
566
|
+
function pinScope(scope, fn) {
|
|
567
|
+
return () => getOwnerScope() === scope ? fn() : runWithOwnerScope(scope, fn);
|
|
568
|
+
}
|
|
558
569
|
function safeCall(cb, hookName) {
|
|
559
570
|
try {
|
|
560
571
|
return cb();
|
|
@@ -564,13 +575,14 @@ function safeCall(cb, hookName) {
|
|
|
564
575
|
return void 0;
|
|
565
576
|
}
|
|
566
577
|
}
|
|
567
|
-
function runMountCallback(callback, hookName, element, isDisposed) {
|
|
568
|
-
const
|
|
569
|
-
if (typeof
|
|
578
|
+
function runMountCallback(callback, hookName, element, isDisposed, scope) {
|
|
579
|
+
const returned = safeCall(callback, hookName);
|
|
580
|
+
if (typeof returned !== "function") return;
|
|
581
|
+
const cleanup = pinScope(scope, returned);
|
|
570
582
|
if (isDisposed() || !element.isConnected) {
|
|
571
583
|
safeCall(cleanup, "onUnmount");
|
|
572
584
|
} else {
|
|
573
|
-
|
|
585
|
+
watchUnmount(cleanup, element);
|
|
574
586
|
}
|
|
575
587
|
}
|
|
576
588
|
var mountWatchers = /* @__PURE__ */ new WeakMap();
|
|
@@ -730,6 +742,8 @@ function registerUnmountWatcher(element, cb) {
|
|
|
730
742
|
}
|
|
731
743
|
function onMount(callback, element) {
|
|
732
744
|
if (typeof document === "undefined") return;
|
|
745
|
+
const scope = getOwnerScope();
|
|
746
|
+
callback = pinScope(scope, callback);
|
|
733
747
|
if (element) {
|
|
734
748
|
let disposed = false;
|
|
735
749
|
const isDisposed = () => disposed;
|
|
@@ -739,19 +753,19 @@ function onMount(callback, element) {
|
|
|
739
753
|
if (element.isConnected) {
|
|
740
754
|
queueMicrotask(() => {
|
|
741
755
|
if (disposed) return;
|
|
742
|
-
runMountCallback(callback, "onMount", element, isDisposed);
|
|
756
|
+
runMountCallback(callback, "onMount", element, isDisposed, scope);
|
|
743
757
|
});
|
|
744
758
|
return;
|
|
745
759
|
}
|
|
746
760
|
queueMicrotask(() => {
|
|
747
761
|
if (disposed) return;
|
|
748
762
|
if (element.isConnected) {
|
|
749
|
-
runMountCallback(callback, "onMount", element, isDisposed);
|
|
763
|
+
runMountCallback(callback, "onMount", element, isDisposed, scope);
|
|
750
764
|
return;
|
|
751
765
|
}
|
|
752
766
|
const unregister = registerMountWatcher(element, () => {
|
|
753
767
|
if (disposed) return;
|
|
754
|
-
runMountCallback(callback, "onMount", element, isDisposed);
|
|
768
|
+
runMountCallback(callback, "onMount", element, isDisposed, scope);
|
|
755
769
|
});
|
|
756
770
|
registerDisposer(element, unregister);
|
|
757
771
|
});
|
|
@@ -763,6 +777,9 @@ function onMount(callback, element) {
|
|
|
763
777
|
}
|
|
764
778
|
function onUnmount(callback, element) {
|
|
765
779
|
if (typeof document === "undefined") return;
|
|
780
|
+
watchUnmount(pinScope(getOwnerScope(), callback), element);
|
|
781
|
+
}
|
|
782
|
+
function watchUnmount(callback, element) {
|
|
766
783
|
let fired = false;
|
|
767
784
|
const fireOnce = () => {
|
|
768
785
|
if (fired) return;
|
|
@@ -1463,11 +1480,15 @@ function ErrorBoundary(optionsOrChildren, maybeChildren) {
|
|
|
1463
1480
|
return;
|
|
1464
1481
|
}
|
|
1465
1482
|
replaceChildrenSafely(asyncContainer, el);
|
|
1466
|
-
}).catch(
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1483
|
+
}).catch(
|
|
1484
|
+
// The fallback is rendered later, in the owner scope of the
|
|
1485
|
+
// render that produced the async child.
|
|
1486
|
+
bindOwnerScope((e) => {
|
|
1487
|
+
if (asyncDisposed) return;
|
|
1488
|
+
const err = handleError(e);
|
|
1489
|
+
replaceChildrenSafely(asyncContainer, tryRenderFallback(err));
|
|
1490
|
+
})
|
|
1491
|
+
);
|
|
1471
1492
|
return asyncContainer;
|
|
1472
1493
|
}
|
|
1473
1494
|
return result;
|
|
@@ -1883,9 +1904,11 @@ function when(condition, thenBranch, elseBranch) {
|
|
|
1883
1904
|
currentNode = null;
|
|
1884
1905
|
});
|
|
1885
1906
|
if (!initialized) {
|
|
1886
|
-
queueMicrotask(
|
|
1887
|
-
|
|
1888
|
-
|
|
1907
|
+
queueMicrotask(
|
|
1908
|
+
bindOwnerScope(() => {
|
|
1909
|
+
if (!disposed && !initialized && anchor.parentNode) update();
|
|
1910
|
+
})
|
|
1911
|
+
);
|
|
1889
1912
|
}
|
|
1890
1913
|
return anchor;
|
|
1891
1914
|
}
|
|
@@ -1924,9 +1947,11 @@ function match(value, cases, fallback) {
|
|
|
1924
1947
|
currentNode = null;
|
|
1925
1948
|
});
|
|
1926
1949
|
if (!initialized) {
|
|
1927
|
-
queueMicrotask(
|
|
1928
|
-
|
|
1929
|
-
|
|
1950
|
+
queueMicrotask(
|
|
1951
|
+
bindOwnerScope(() => {
|
|
1952
|
+
if (!disposed && !initialized && anchor.parentNode) update();
|
|
1953
|
+
})
|
|
1954
|
+
);
|
|
1930
1955
|
}
|
|
1931
1956
|
return anchor;
|
|
1932
1957
|
}
|
|
@@ -2218,11 +2243,13 @@ function each(getArray, render, options) {
|
|
|
2218
2243
|
};
|
|
2219
2244
|
registerDisposer(anchor, disposeRange);
|
|
2220
2245
|
if (!initialized) {
|
|
2221
|
-
queueMicrotask(
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2246
|
+
queueMicrotask(
|
|
2247
|
+
bindOwnerScope(() => {
|
|
2248
|
+
if (!initialized && !rangeDisposed && anchor.parentNode) {
|
|
2249
|
+
update();
|
|
2250
|
+
}
|
|
2251
|
+
})
|
|
2252
|
+
);
|
|
2226
2253
|
}
|
|
2227
2254
|
return anchor;
|
|
2228
2255
|
}
|
|
@@ -2700,9 +2727,11 @@ function KeepAlive(activeKey, cases, options) {
|
|
|
2700
2727
|
};
|
|
2701
2728
|
const untrack = track(update);
|
|
2702
2729
|
if (!initialized) {
|
|
2703
|
-
queueMicrotask(
|
|
2704
|
-
|
|
2705
|
-
|
|
2730
|
+
queueMicrotask(
|
|
2731
|
+
bindOwnerScope(() => {
|
|
2732
|
+
if (!initialized && anchor.parentNode) update();
|
|
2733
|
+
})
|
|
2734
|
+
);
|
|
2706
2735
|
}
|
|
2707
2736
|
registerDisposer(anchor, () => {
|
|
2708
2737
|
disposed = true;
|
|
@@ -2807,7 +2836,7 @@ function Portal(nodes, target) {
|
|
|
2807
2836
|
const container = target || document.body;
|
|
2808
2837
|
let portalContent = null;
|
|
2809
2838
|
let disposed = false;
|
|
2810
|
-
|
|
2839
|
+
const renderContent = bindOwnerScope(() => {
|
|
2811
2840
|
if (disposed) return;
|
|
2812
2841
|
try {
|
|
2813
2842
|
portalContent = nodes();
|
|
@@ -2822,6 +2851,7 @@ function Portal(nodes, target) {
|
|
|
2822
2851
|
});
|
|
2823
2852
|
}
|
|
2824
2853
|
});
|
|
2854
|
+
queueMicrotask(renderContent);
|
|
2825
2855
|
registerDisposer(anchor, () => {
|
|
2826
2856
|
disposed = true;
|
|
2827
2857
|
if (portalContent) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
domBinding
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GVVZPMA5.js";
|
|
4
4
|
import {
|
|
5
5
|
bindAttribute,
|
|
6
6
|
setSafeAttribute
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DS6PFIZK.js";
|
|
8
8
|
import {
|
|
9
9
|
isBlockedElement
|
|
10
10
|
} from "./chunk-3ACAAQIN.js";
|
|
11
11
|
import {
|
|
12
12
|
derived
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LK3VK47W.js";
|
|
14
14
|
import {
|
|
15
15
|
globalSingleton
|
|
16
16
|
} from "./chunk-7ZHH77QA.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
} from "./chunk-5HZXGZ6T.js";
|
|
24
24
|
import {
|
|
25
25
|
signal
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-BNZDDNBR.js";
|
|
27
27
|
import {
|
|
28
28
|
reactiveBinding,
|
|
29
29
|
track
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NROLUUCO.js";
|
|
31
31
|
import {
|
|
32
32
|
dispose,
|
|
33
33
|
disposeNodeOwn,
|
|
@@ -170,7 +170,7 @@ var CDN_ENTRY_POINTS = {
|
|
|
170
170
|
};
|
|
171
171
|
var packageInfo = {
|
|
172
172
|
name: "sibujs",
|
|
173
|
-
version: true ? "4.
|
|
173
|
+
version: true ? "4.10.1" : "dev",
|
|
174
174
|
entryPoints: MODULE_ENTRY_POINTS,
|
|
175
175
|
/**
|
|
176
176
|
* Generate the package.json `exports` map. Module entries resolve to the
|
|
@@ -315,7 +315,7 @@ var env = {
|
|
|
315
315
|
};
|
|
316
316
|
|
|
317
317
|
// src/plugins/versioning.ts
|
|
318
|
-
var VERSION = true ? "4.
|
|
318
|
+
var VERSION = true ? "4.10.1" : "dev";
|
|
319
319
|
var NUM = "(?:0|[1-9]\\d*)";
|
|
320
320
|
var PRE_ID = `(?:${NUM}|\\d*[a-zA-Z-][0-9a-zA-Z-]*)`;
|
|
321
321
|
var BUILD_ID = "[0-9a-zA-Z-]+";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
watch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DA2LJXK3.js";
|
|
4
4
|
import {
|
|
5
5
|
createId,
|
|
6
6
|
domBinding,
|
|
7
7
|
idSegment
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GVVZPMA5.js";
|
|
9
9
|
import {
|
|
10
10
|
derived
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LK3VK47W.js";
|
|
12
12
|
import {
|
|
13
13
|
stripHtml
|
|
14
14
|
} from "./chunk-EXXSN3BW.js";
|
|
15
15
|
import {
|
|
16
16
|
batch,
|
|
17
17
|
signal
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BNZDDNBR.js";
|
|
19
19
|
|
|
20
20
|
// src/widgets/Combobox.ts
|
|
21
21
|
var boundComboboxes = /* @__PURE__ */ new WeakMap();
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
div,
|
|
8
8
|
span
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YNE4FSVX.js";
|
|
10
10
|
import {
|
|
11
11
|
STATIC_VALUE_RESOLVER,
|
|
12
12
|
planHeadElementEntry,
|
|
@@ -17,14 +17,17 @@ import {
|
|
|
17
17
|
} from "./chunk-7ZHH77QA.js";
|
|
18
18
|
import {
|
|
19
19
|
effect
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6DYRY2NF.js";
|
|
21
21
|
import {
|
|
22
22
|
sanitizeUrl
|
|
23
23
|
} from "./chunk-EXXSN3BW.js";
|
|
24
24
|
import {
|
|
25
25
|
batch,
|
|
26
26
|
signal
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BNZDDNBR.js";
|
|
28
|
+
import {
|
|
29
|
+
bindOwnerScope
|
|
30
|
+
} from "./chunk-NROLUUCO.js";
|
|
28
31
|
import {
|
|
29
32
|
registerDisposer,
|
|
30
33
|
replaceChildrenSafely,
|
|
@@ -686,11 +689,15 @@ function defineRemoteComponent(name, loader) {
|
|
|
686
689
|
registerDisposer(container, () => {
|
|
687
690
|
disposed = true;
|
|
688
691
|
});
|
|
689
|
-
loader().then(
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
692
|
+
loader().then(
|
|
693
|
+
// Instantiated after the module resolves, in the owner scope of the
|
|
694
|
+
// render that asked for it — as `lazy()` does.
|
|
695
|
+
bindOwnerScope((mod) => {
|
|
696
|
+
cached = mod.default;
|
|
697
|
+
if (disposed) return;
|
|
698
|
+
replaceChildrenSafely(container, cached());
|
|
699
|
+
})
|
|
700
|
+
).catch((err) => {
|
|
694
701
|
if (disposed) return;
|
|
695
702
|
const message = err instanceof Error ? err.message : String(err);
|
|
696
703
|
replaceChildrenSafely(
|