sibujs 4.13.1 → 4.14.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/README.md +1 -1
- package/dist/browser.cjs +15 -2
- package/dist/browser.js +9 -7
- package/dist/build.cjs +880 -281
- package/dist/build.d.cts +68 -3
- package/dist/build.d.ts +68 -3
- package/dist/build.js +88 -30
- package/dist/cdn.dev.global.js +12 -12
- package/dist/cdn.full.dev.global.js +13 -13
- package/dist/cdn.full.global.js +12 -12
- package/dist/cdn.global.js +12 -12
- package/dist/{chunk-J6FW5TV6.js → chunk-3HEX6QJQ.js} +5 -3
- package/dist/chunk-3HZOSMPX.js +90 -0
- package/dist/{chunk-K4LNUT5L.js → chunk-3T7TWMSD.js} +8 -6
- package/dist/{chunk-ADZHPN2B.js → chunk-4XCWNGRY.js} +3 -3
- package/dist/{chunk-2NC56RGY.js → chunk-55TAOW5M.js} +2 -2
- package/dist/{chunk-G3Z2FEBR.js → chunk-B2NLNZ3E.js} +119 -26
- package/dist/{chunk-EXXSN3BW.js → chunk-B3HOT4TK.js} +1 -1
- package/dist/{chunk-QKFVMIAV.js → chunk-FCWOMATN.js} +11 -3
- package/dist/{chunk-QC3NP47A.js → chunk-FFXZ6ELZ.js} +10 -6
- package/dist/{chunk-TUCPL2HB.js → chunk-GIJ33UJZ.js} +1 -1
- package/dist/chunk-KTJC7QPA.js +195 -0
- package/dist/chunk-L2IPKGUJ.js +2596 -0
- package/dist/{chunk-4UTGDVSA.js → chunk-LAHX7XFG.js} +7 -14
- package/dist/{chunk-PBJYCE2Z.js → chunk-LJ2LR5P4.js} +5 -5
- package/dist/{chunk-AM6DZLBM.js → chunk-LJMX4SQ7.js} +2 -2
- package/dist/{chunk-5RIBLY2N.js → chunk-LUZXFMKH.js} +6 -6
- package/dist/{chunk-VFPLWUT7.js → chunk-LZKKMDQF.js} +151 -86
- package/dist/{chunk-J4X7ICH4.js → chunk-NIHGSXOX.js} +8 -6
- package/dist/chunk-NT3ZYB5S.js +167 -0
- package/dist/{chunk-2O6JJCUR.js → chunk-OLMZF4RU.js} +49 -8
- package/dist/{chunk-22OPSWMF.js → chunk-OPRQW4LI.js} +2 -2
- package/dist/chunk-R5U7XKVJ.js +16 -0
- package/dist/{chunk-KC62VURU.js → chunk-RBRITLFL.js} +10 -8
- package/dist/{chunk-F2UWOZ6J.js → chunk-RVWJGWCL.js} +2 -2
- package/dist/{chunk-NYNYSPK7.js → chunk-S37PZD6I.js} +30 -45
- package/dist/chunk-TOV4PN3P.js +2015 -0
- package/dist/{chunk-C73VBPEF.js → chunk-TS6JDK7Y.js} +8 -8
- package/dist/{chunk-EU7T7EB3.js → chunk-TZNR6E6D.js} +4 -4
- package/dist/chunk-UYTYNCMZ.js +199 -0
- package/dist/{chunk-OIKD7YDY.js → chunk-VIAVYBNQ.js} +6 -5
- package/dist/{chunk-QZ47OZ25.js → chunk-WFMMSMA5.js} +8 -6
- package/dist/chunk-YIXMS546.js +1901 -0
- package/dist/{chunk-5XUGJM3J.js → chunk-YPLQQTWS.js} +1 -1
- package/dist/{chunk-CPQKWCJ2.js → chunk-ZKI4SDZ2.js} +16 -10
- package/dist/{chunk-YFTBCCVH.js → chunk-ZYK4NZZA.js} +5 -3
- package/dist/data.cjs +265 -35
- package/dist/data.d.cts +31 -1
- package/dist/data.d.ts +31 -1
- package/dist/data.js +16 -10
- package/dist/devtools.cjs +15 -2
- package/dist/devtools.js +9 -7
- package/dist/{dispose-GEIG2KOF.js → dispose-EIHHHDC7.js} +3 -1
- package/dist/ecosystem.cjs +62 -23
- package/dist/ecosystem.js +14 -12
- package/dist/extras.cjs +3562 -270
- package/dist/extras.d.cts +3 -3
- package/dist/extras.d.ts +3 -3
- package/dist/extras.js +39 -29
- package/dist/index.cjs +442 -253
- package/dist/index.d.cts +93 -283
- package/dist/index.d.ts +93 -283
- package/dist/index.js +26 -16
- package/dist/motion.cjs +12 -1
- package/dist/motion.js +6 -4
- package/dist/patterns.cjs +15 -2
- package/dist/patterns.js +10 -8
- package/dist/performance.cjs +36 -2
- package/dist/performance.d.cts +2 -2
- package/dist/performance.d.ts +2 -2
- package/dist/performance.js +14 -10
- package/dist/plugins.cjs +5267 -1807
- package/dist/plugins.d.cts +8 -834
- package/dist/plugins.d.ts +8 -834
- package/dist/plugins.js +64 -2329
- package/dist/prerenderServer-MXJEVWA3.js +350 -0
- package/dist/renderRoute-DP20XwMS.d.cts +86 -0
- package/dist/renderRoute-fxgsm2Ir.d.ts +86 -0
- package/dist/routeHead-CE9SV-cH.d.cts +995 -0
- package/dist/routeHead-DzVxPviY.d.ts +995 -0
- package/dist/{routeMiddleware-B1sp4P7a.d.ts → routeMiddleware-BySbueoE.d.ts} +0 -25
- package/dist/{routeMiddleware-CedQTsLK.d.cts → routeMiddleware-CijZD5eW.d.cts} +0 -25
- package/dist/{ssr-VBM6J5SJ.js → ssr-HHU3DAD2.js} +15 -6
- package/dist/ssr-JpGpHnpC.d.cts +841 -0
- package/dist/ssr-JpGpHnpC.d.ts +841 -0
- package/dist/ssr-dom.cjs +1904 -0
- package/dist/ssr-dom.d.cts +343 -0
- package/dist/ssr-dom.d.ts +343 -0
- package/dist/ssr-dom.js +19 -0
- package/dist/ssr.cjs +7677 -2069
- package/dist/ssr.d.cts +63 -5
- package/dist/ssr.d.ts +63 -5
- package/dist/ssr.js +136 -14
- package/dist/testing.cjs +6585 -87
- package/dist/testing.d.cts +80 -1
- package/dist/testing.d.ts +80 -1
- package/dist/testing.js +117 -4
- package/dist/ui.cjs +36 -2
- package/dist/ui.js +17 -14
- package/dist/widgets.cjs +14 -1
- package/dist/widgets.js +11 -9
- package/package.json +9 -2
- package/dist/chunk-2F4PSJ5Z.js +0 -765
- package/dist/chunk-7XHATCIH.js +0 -121
- package/dist/chunk-B36ADEIR.js +0 -21
- package/dist/ssr-Db0Sgdu3.d.cts +0 -245
- package/dist/ssr-Db0Sgdu3.d.ts +0 -245
package/dist/data.d.ts
CHANGED
|
@@ -222,6 +222,14 @@ interface QueryOptions<T> {
|
|
|
222
222
|
* Also applied to this observer's `select` output.
|
|
223
223
|
*/
|
|
224
224
|
structuralSharing?: StructuralSharingOption<T>;
|
|
225
|
+
/**
|
|
226
|
+
* Fetch during a server render (default `true`). The server render waits for
|
|
227
|
+
* the fetch and transfers the result to the browser, which then does not
|
|
228
|
+
* fetch it again while it is fresh (`staleTime`). `false` leaves the query
|
|
229
|
+
* idle on the server — it renders its loading state — and keeps its data out
|
|
230
|
+
* of the transferred state; the browser fetches it after takeover.
|
|
231
|
+
*/
|
|
232
|
+
ssr?: boolean;
|
|
225
233
|
}
|
|
226
234
|
interface QueryResult<T> {
|
|
227
235
|
/** Reactive getter for the cached data */
|
|
@@ -452,6 +460,14 @@ declare function debounce<T>(getter: () => T, delay: number): DisposableAccessor
|
|
|
452
460
|
*/
|
|
453
461
|
declare function throttle<T>(getter: () => T, interval: number): DisposableAccessor<T>;
|
|
454
462
|
|
|
463
|
+
/**
|
|
464
|
+
* Keep `key` out of this request's transferred state, whatever is or will be
|
|
465
|
+
* stored under it: the browser then fetches it itself. For a key whose owner
|
|
466
|
+
* is ambiguous (two loaders resolved to it). Server only; a no-op outside a
|
|
467
|
+
* request.
|
|
468
|
+
* @internal
|
|
469
|
+
*/
|
|
470
|
+
declare function withholdTransfer(key: string): void;
|
|
455
471
|
/**
|
|
456
472
|
* Lifecycle callbacks follow the shared data-layer contract: an exception
|
|
457
473
|
* thrown by `onStart`, `onSuccess`, `onError`, or `onSettled` never changes the
|
|
@@ -497,6 +513,13 @@ interface ResourceOptions<T> {
|
|
|
497
513
|
* unshared.
|
|
498
514
|
*/
|
|
499
515
|
structuralSharing?: StructuralSharingOption<T>;
|
|
516
|
+
/**
|
|
517
|
+
* Transfer key. With a key, the value a server render fetched is embedded in
|
|
518
|
+
* the document, and the browser starts from it instead of fetching again
|
|
519
|
+
* (its initial fetch is skipped; `refetch()` and source changes still
|
|
520
|
+
* fetch). Must be unique per page; the data must be JSON-serializable.
|
|
521
|
+
*/
|
|
522
|
+
key?: string;
|
|
500
523
|
}
|
|
501
524
|
interface Resource<T> {
|
|
502
525
|
/** Reactive getter for the fetched data */
|
|
@@ -676,6 +699,13 @@ interface LoaderRoute {
|
|
|
676
699
|
/**
|
|
677
700
|
* Execute a route loader and wrap its result in a reactive Resource.
|
|
678
701
|
*
|
|
702
|
+
* The result is transferred from a server render to the browser under the key
|
|
703
|
+
* `loader:<path>:<loader name>` (or `options.key`), so the browser does not run
|
|
704
|
+
* the loader again on takeover. Two different loader functions with the same
|
|
705
|
+
* name for the same path (two `loader: async () => …` properties, two
|
|
706
|
+
* anonymous loaders) cannot be told apart: neither transfers, and both fetch in
|
|
707
|
+
* the browser, unless they have explicit keys.
|
|
708
|
+
*
|
|
679
709
|
* Executing a loader does not make its data visible to `loaderData()`; render
|
|
680
710
|
* the route's component inside {@link renderWithLoader} (or use
|
|
681
711
|
* {@link withLoader}) so the component reads its own route's data.
|
|
@@ -777,4 +807,4 @@ declare function stream(url: string, options?: {
|
|
|
777
807
|
dispose: () => void;
|
|
778
808
|
};
|
|
779
809
|
|
|
780
|
-
export { type ConflictStrategy, type InfiniteQueryOptions, type InfiniteQueryResult, type LoaderRoute, type MutationOptions, type MutationResult, type OfflineStore, type OfflineStoreOptions, type QueryOptions, type QueryResult, type Resource, type ResourceOptions, type RetryOptions, type RouteLoaderFn, type SyncAdapter, type SyncChange, type SyncConflict, type SyncResult, __resetQueryCache, calculateDelay, clearQueryCache, debounce, executeLoader, getQueryData, infiniteQuery, invalidateQueries, loaderData, mutation, offlineStore, preloadRoute, previous, query, renderWithLoader, resource, setQueryData, socket, stream, syncAdapter, throttle, withLoader, withRetry };
|
|
810
|
+
export { type ConflictStrategy, type InfiniteQueryOptions, type InfiniteQueryResult, type LoaderRoute, type MutationOptions, type MutationResult, type OfflineStore, type OfflineStoreOptions, type QueryOptions, type QueryResult, type Resource, type ResourceOptions, type RetryOptions, type RouteLoaderFn, type SyncAdapter, type SyncChange, type SyncConflict, type SyncResult, __resetQueryCache, calculateDelay, clearQueryCache, debounce, executeLoader, getQueryData, infiniteQuery, invalidateQueries, loaderData, mutation, offlineStore, preloadRoute, previous, query, renderWithLoader, resource, setQueryData, socket, stream, syncAdapter, throttle, withLoader, withRetry, withholdTransfer };
|
package/dist/data.js
CHANGED
|
@@ -21,16 +21,21 @@ import {
|
|
|
21
21
|
syncAdapter,
|
|
22
22
|
throttle,
|
|
23
23
|
withLoader,
|
|
24
|
-
withRetry
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
withRetry,
|
|
25
|
+
withholdTransfer
|
|
26
|
+
} from "./chunk-B2NLNZ3E.js";
|
|
27
|
+
import "./chunk-3HZOSMPX.js";
|
|
28
|
+
import "./chunk-62BDYGAG.js";
|
|
29
|
+
import "./chunk-ZYK4NZZA.js";
|
|
27
30
|
import "./chunk-7ZHH77QA.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-FFXZ6ELZ.js";
|
|
32
|
+
import "./chunk-B3HOT4TK.js";
|
|
33
|
+
import "./chunk-UYTYNCMZ.js";
|
|
34
|
+
import "./chunk-FCWOMATN.js";
|
|
35
|
+
import "./chunk-LAHX7XFG.js";
|
|
36
|
+
import "./chunk-S37PZD6I.js";
|
|
37
|
+
import "./chunk-NT3ZYB5S.js";
|
|
38
|
+
import "./chunk-R5U7XKVJ.js";
|
|
34
39
|
export {
|
|
35
40
|
__resetQueryCache,
|
|
36
41
|
calculateDelay,
|
|
@@ -54,5 +59,6 @@ export {
|
|
|
54
59
|
syncAdapter,
|
|
55
60
|
throttle,
|
|
56
61
|
withLoader,
|
|
57
|
-
withRetry
|
|
62
|
+
withRetry,
|
|
63
|
+
withholdTransfer
|
|
58
64
|
};
|
package/dist/devtools.cjs
CHANGED
|
@@ -256,10 +256,21 @@ function defaultReport(error, context) {
|
|
|
256
256
|
if (typeof console === "undefined") return;
|
|
257
257
|
console.error(`[SibuJS] Uncaught error during ${describe(context)}: ${error.message}`, error);
|
|
258
258
|
}
|
|
259
|
+
function requestErrorSink() {
|
|
260
|
+
const shared = globalThis[/* @__PURE__ */ Symbol.for("sibujs.ssr.v1")];
|
|
261
|
+
if (!shared) return void 0;
|
|
262
|
+
const store = shared.als ? shared.als.getStore() : shared.fallbackDepth > 0 ? shared.fallbackStore : void 0;
|
|
263
|
+
return store?.errors;
|
|
264
|
+
}
|
|
259
265
|
function reportError(error, context) {
|
|
260
266
|
const err = normalizeError(error);
|
|
261
267
|
untrackedRun(() => {
|
|
262
268
|
if (claimedByBoundary(err, context)) return;
|
|
269
|
+
const sink = requestErrorSink();
|
|
270
|
+
if (sink) {
|
|
271
|
+
sink.push({ error: err, context });
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
263
274
|
const s = state();
|
|
264
275
|
const handler = s.handler;
|
|
265
276
|
if (handler && s.handlerDepth === 0) {
|
|
@@ -921,7 +932,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
921
932
|
}
|
|
922
933
|
|
|
923
934
|
// src/reactivity/track.ts
|
|
924
|
-
var _runtimeVersion = true ? "4.
|
|
935
|
+
var _runtimeVersion = true ? "4.14.1" : "dev";
|
|
925
936
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
926
937
|
function resolveReactiveApi() {
|
|
927
938
|
const g = globalThis;
|
|
@@ -2118,6 +2129,8 @@ function detectSSRShared() {
|
|
|
2118
2129
|
}
|
|
2119
2130
|
if (mod) detected = new mod.AsyncLocalStorage();
|
|
2120
2131
|
}
|
|
2132
|
+
const globalAls = globalThis.AsyncLocalStorage;
|
|
2133
|
+
if (!detected && typeof globalAls === "function") detected = new globalAls();
|
|
2121
2134
|
} catch {
|
|
2122
2135
|
detected = null;
|
|
2123
2136
|
}
|
|
@@ -2206,7 +2219,7 @@ function disposeEffect(ctx) {
|
|
|
2206
2219
|
}
|
|
2207
2220
|
function effect(effectFn, options) {
|
|
2208
2221
|
devAssert(typeof effectFn === "function", "effect: argument must be a function.");
|
|
2209
|
-
if (isSSR()) return () => {
|
|
2222
|
+
if (isSSR() && !options?.server) return () => {
|
|
2210
2223
|
};
|
|
2211
2224
|
const ctx = {
|
|
2212
2225
|
fn: effectFn,
|
package/dist/devtools.js
CHANGED
|
@@ -35,16 +35,18 @@ import {
|
|
|
35
35
|
trackCleanup,
|
|
36
36
|
walkDependencyGraph,
|
|
37
37
|
withErrorTracking
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-NIHGSXOX.js";
|
|
39
39
|
import "./chunk-7ZHH77QA.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-FFXZ6ELZ.js";
|
|
41
|
+
import "./chunk-B3HOT4TK.js";
|
|
42
|
+
import "./chunk-UYTYNCMZ.js";
|
|
43
|
+
import "./chunk-FCWOMATN.js";
|
|
44
|
+
import "./chunk-LAHX7XFG.js";
|
|
45
|
+
import "./chunk-S37PZD6I.js";
|
|
45
46
|
import {
|
|
46
47
|
isDev
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-NT3ZYB5S.js";
|
|
49
|
+
import "./chunk-R5U7XKVJ.js";
|
|
48
50
|
|
|
49
51
|
// src/devtools/signalGraph.ts
|
|
50
52
|
function getHook() {
|
|
@@ -11,7 +11,9 @@ import {
|
|
|
11
11
|
reportDrainRunaway,
|
|
12
12
|
unregisterDisposer,
|
|
13
13
|
withDisposerRollback
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-S37PZD6I.js";
|
|
15
|
+
import "./chunk-NT3ZYB5S.js";
|
|
16
|
+
import "./chunk-R5U7XKVJ.js";
|
|
15
17
|
export {
|
|
16
18
|
MAX_DRAIN_TEARDOWNS,
|
|
17
19
|
beginDisposerCapture,
|
package/dist/ecosystem.cjs
CHANGED
|
@@ -103,12 +103,12 @@ function claimedByBoundary(error, context) {
|
|
|
103
103
|
}
|
|
104
104
|
function resolveEventTarget(node) {
|
|
105
105
|
const ELEMENT_NODE = 1;
|
|
106
|
-
let
|
|
107
|
-
while (
|
|
108
|
-
if (
|
|
109
|
-
return
|
|
106
|
+
let current2 = node;
|
|
107
|
+
while (current2) {
|
|
108
|
+
if (current2.nodeType === ELEMENT_NODE && typeof current2.dispatchEvent === "function") {
|
|
109
|
+
return current2;
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
current2 = current2.parentNode;
|
|
112
112
|
}
|
|
113
113
|
const self = node;
|
|
114
114
|
return typeof self.dispatchEvent === "function" ? self : null;
|
|
@@ -117,10 +117,21 @@ function defaultReport(error, context) {
|
|
|
117
117
|
if (typeof console === "undefined") return;
|
|
118
118
|
console.error(`[SibuJS] Uncaught error during ${describe(context)}: ${error.message}`, error);
|
|
119
119
|
}
|
|
120
|
+
function requestErrorSink() {
|
|
121
|
+
const shared = globalThis[/* @__PURE__ */ Symbol.for("sibujs.ssr.v1")];
|
|
122
|
+
if (!shared) return void 0;
|
|
123
|
+
const store = shared.als ? shared.als.getStore() : shared.fallbackDepth > 0 ? shared.fallbackStore : void 0;
|
|
124
|
+
return store?.errors;
|
|
125
|
+
}
|
|
120
126
|
function reportError(error, context) {
|
|
121
127
|
const err = normalizeError(error);
|
|
122
128
|
untrackedRun(() => {
|
|
123
129
|
if (claimedByBoundary(err, context)) return;
|
|
130
|
+
const sink = requestErrorSink();
|
|
131
|
+
if (sink) {
|
|
132
|
+
sink.push({ error: err, context });
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
124
135
|
const s = state();
|
|
125
136
|
const handler = s.handler;
|
|
126
137
|
if (handler && s.handlerDepth === 0) {
|
|
@@ -141,6 +152,31 @@ function reportError(error, context) {
|
|
|
141
152
|
});
|
|
142
153
|
}
|
|
143
154
|
|
|
155
|
+
// src/core/rendering/adoptScope.ts
|
|
156
|
+
var current = null;
|
|
157
|
+
function createScopedElement(tag, ns) {
|
|
158
|
+
const c = current;
|
|
159
|
+
if (c?.s.on) {
|
|
160
|
+
const el = c.s.el(tag, ns, c.p + (c.n++).toString(36));
|
|
161
|
+
if (el) return el;
|
|
162
|
+
}
|
|
163
|
+
return ns ? document.createElementNS(ns, tag) : document.createElement(tag);
|
|
164
|
+
}
|
|
165
|
+
function captureScope() {
|
|
166
|
+
const c = current;
|
|
167
|
+
return c?.s.on ? { p: `${c.p}${(c.n++).toString(36)}.`, n: 0, s: c.s } : null;
|
|
168
|
+
}
|
|
169
|
+
function inScope(scope, fn) {
|
|
170
|
+
const prev = current;
|
|
171
|
+
if (!scope && !prev) return fn();
|
|
172
|
+
current = scope?.s.on ? { p: scope.p, n: 0, s: scope.s } : null;
|
|
173
|
+
try {
|
|
174
|
+
return fn();
|
|
175
|
+
} finally {
|
|
176
|
+
current = prev;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
144
180
|
// src/core/rendering/dispose.ts
|
|
145
181
|
var elementDisposers = /* @__PURE__ */ new WeakMap();
|
|
146
182
|
var MAX_DRAIN_TEARDOWNS = 1e4;
|
|
@@ -184,9 +220,9 @@ function dispose(node) {
|
|
|
184
220
|
const stack = [node];
|
|
185
221
|
const order = [];
|
|
186
222
|
while (stack.length > 0) {
|
|
187
|
-
const
|
|
188
|
-
order.push(
|
|
189
|
-
const children = Array.from(
|
|
223
|
+
const current2 = stack.pop();
|
|
224
|
+
order.push(current2);
|
|
225
|
+
const children = Array.from(current2.childNodes);
|
|
190
226
|
for (let i = 0; i < children.length; i++) {
|
|
191
227
|
stack.push(children[i]);
|
|
192
228
|
}
|
|
@@ -793,7 +829,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
793
829
|
}
|
|
794
830
|
|
|
795
831
|
// src/reactivity/track.ts
|
|
796
|
-
var _runtimeVersion = true ? "4.
|
|
832
|
+
var _runtimeVersion = true ? "4.14.1" : "dev";
|
|
797
833
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
798
834
|
function resolveReactiveApi() {
|
|
799
835
|
const g = globalThis;
|
|
@@ -880,6 +916,8 @@ function detectSSRShared() {
|
|
|
880
916
|
}
|
|
881
917
|
if (mod) detected = new mod.AsyncLocalStorage();
|
|
882
918
|
}
|
|
919
|
+
const globalAls = globalThis.AsyncLocalStorage;
|
|
920
|
+
if (!detected && typeof globalAls === "function") detected = new globalAls();
|
|
883
921
|
} catch {
|
|
884
922
|
detected = null;
|
|
885
923
|
}
|
|
@@ -968,7 +1006,7 @@ function disposeEffect(ctx) {
|
|
|
968
1006
|
}
|
|
969
1007
|
function effect(effectFn, options) {
|
|
970
1008
|
devAssert(typeof effectFn === "function", "effect: argument must be a function.");
|
|
971
|
-
if (isSSR()) return () => {
|
|
1009
|
+
if (isSSR() && !options?.server) return () => {
|
|
972
1010
|
};
|
|
973
1011
|
const ctx = {
|
|
974
1012
|
fn: effectFn,
|
|
@@ -1628,19 +1666,19 @@ function sanitizeSrcset(value) {
|
|
|
1628
1666
|
if (url.endsWith(",")) {
|
|
1629
1667
|
url = url.replace(/,+$/, "");
|
|
1630
1668
|
} else {
|
|
1631
|
-
let
|
|
1669
|
+
let current2 = "";
|
|
1632
1670
|
let inParens = false;
|
|
1633
1671
|
while (i < n) {
|
|
1634
1672
|
const ch = input[i];
|
|
1635
1673
|
if (inParens) {
|
|
1636
|
-
|
|
1674
|
+
current2 += ch;
|
|
1637
1675
|
if (ch === ")") inParens = false;
|
|
1638
1676
|
i++;
|
|
1639
1677
|
continue;
|
|
1640
1678
|
}
|
|
1641
1679
|
if (isSrcsetWhitespace(ch)) {
|
|
1642
|
-
if (
|
|
1643
|
-
|
|
1680
|
+
if (current2) descriptors.push(current2);
|
|
1681
|
+
current2 = "";
|
|
1644
1682
|
i++;
|
|
1645
1683
|
continue;
|
|
1646
1684
|
}
|
|
@@ -1649,10 +1687,10 @@ function sanitizeSrcset(value) {
|
|
|
1649
1687
|
break;
|
|
1650
1688
|
}
|
|
1651
1689
|
if (ch === "(") inParens = true;
|
|
1652
|
-
|
|
1690
|
+
current2 += ch;
|
|
1653
1691
|
i++;
|
|
1654
1692
|
}
|
|
1655
|
-
if (
|
|
1693
|
+
if (current2) descriptors.push(current2);
|
|
1656
1694
|
}
|
|
1657
1695
|
if (url === "") continue;
|
|
1658
1696
|
if (descriptors.length > 1) continue;
|
|
@@ -2221,8 +2259,8 @@ function commitSafeAttribute(el, name, value, options) {
|
|
|
2221
2259
|
else el.removeAttribute(name);
|
|
2222
2260
|
return true;
|
|
2223
2261
|
}
|
|
2224
|
-
const
|
|
2225
|
-
if (
|
|
2262
|
+
const current2 = ns ? el.getAttributeNS(ns, localName) : el.getAttribute(name);
|
|
2263
|
+
if (current2 === safe) return true;
|
|
2226
2264
|
if (ns) el.setAttributeNS(ns, name, safe);
|
|
2227
2265
|
else el.setAttribute(name, safe);
|
|
2228
2266
|
return true;
|
|
@@ -2353,10 +2391,11 @@ function restoreFocusWithin(snapshot, nodes, where, policy) {
|
|
|
2353
2391
|
// src/reactivity/bindChildNode.ts
|
|
2354
2392
|
function bindChildNode(placeholder, getter) {
|
|
2355
2393
|
let lastNodes = [];
|
|
2394
|
+
const scope = captureScope();
|
|
2356
2395
|
function commit() {
|
|
2357
2396
|
let result;
|
|
2358
2397
|
try {
|
|
2359
|
-
result = getter
|
|
2398
|
+
result = inScope(scope, getter);
|
|
2360
2399
|
} catch (err) {
|
|
2361
2400
|
reportError(err, { phase: "binding", name: "bindChildNode", node: placeholder });
|
|
2362
2401
|
return;
|
|
@@ -2611,7 +2650,7 @@ function tagFactory(tag, ns) {
|
|
|
2611
2650
|
throw new Error(`tagFactory: refusing to create <${tag}> \u2014 tag is blocked for security reasons.`);
|
|
2612
2651
|
}
|
|
2613
2652
|
if (typeof document === "undefined") noDocument();
|
|
2614
|
-
const el =
|
|
2653
|
+
const el = createScopedElement(tag, ns);
|
|
2615
2654
|
if (first === void 0) return el;
|
|
2616
2655
|
if (typeof first === "string") {
|
|
2617
2656
|
if (second !== void 0) {
|
|
@@ -2802,9 +2841,9 @@ function componentAdapter(config) {
|
|
|
2802
2841
|
components[name] = (props = {}, children) => {
|
|
2803
2842
|
const { variant, size, class: userClass, ...rest } = props;
|
|
2804
2843
|
const themeClasses = () => {
|
|
2805
|
-
const
|
|
2806
|
-
const overrides =
|
|
2807
|
-
const pick = (key, fallback) => Object.hasOwn(overrides, key) ? overrides[key] : reprefix(fallback,
|
|
2844
|
+
const current2 = theme.config();
|
|
2845
|
+
const overrides = current2.classOverrides ?? {};
|
|
2846
|
+
const pick = (key, fallback) => Object.hasOwn(overrides, key) ? overrides[key] : reprefix(fallback, current2.prefix);
|
|
2808
2847
|
const classes = [pick(name, mapping.baseClass)];
|
|
2809
2848
|
const variantClass = ownString(mapping.variants, variant);
|
|
2810
2849
|
if (variant && variantClass) {
|
package/dist/ecosystem.js
CHANGED
|
@@ -7,20 +7,22 @@ import {
|
|
|
7
7
|
mobXAdapter,
|
|
8
8
|
reduxAdapter,
|
|
9
9
|
zustandAdapter
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-LUZXFMKH.js";
|
|
11
|
+
import "./chunk-3HEX6QJQ.js";
|
|
12
|
+
import "./chunk-ZKI4SDZ2.js";
|
|
13
|
+
import "./chunk-3T7TWMSD.js";
|
|
14
|
+
import "./chunk-RVWJGWCL.js";
|
|
15
|
+
import "./chunk-ZYK4NZZA.js";
|
|
16
16
|
import "./chunk-7ZHH77QA.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-FFXZ6ELZ.js";
|
|
18
|
+
import "./chunk-B3HOT4TK.js";
|
|
19
|
+
import "./chunk-UYTYNCMZ.js";
|
|
20
20
|
import "./chunk-5HZXGZ6T.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-FCWOMATN.js";
|
|
22
|
+
import "./chunk-LAHX7XFG.js";
|
|
23
|
+
import "./chunk-S37PZD6I.js";
|
|
24
|
+
import "./chunk-NT3ZYB5S.js";
|
|
25
|
+
import "./chunk-R5U7XKVJ.js";
|
|
24
26
|
export {
|
|
25
27
|
antdAdapter,
|
|
26
28
|
chakraAdapter,
|