sibujs 1.3.0 → 1.5.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/README.md +105 -119
- package/dist/browser.cjs +53 -14
- package/dist/browser.d.cts +14 -9
- package/dist/browser.d.ts +14 -9
- package/dist/browser.js +4 -4
- package/dist/build.cjs +125 -135
- package/dist/build.d.cts +1 -1
- package/dist/build.d.ts +1 -1
- package/dist/build.js +11 -91
- package/dist/cdn.global.js +6 -6
- package/dist/chunk-5ZYQ6KDD.js +154 -0
- package/dist/chunk-6BMPXPUW.js +26 -0
- package/dist/chunk-7GRNSCFT.js +1097 -0
- package/dist/chunk-BGTHZHJ5.js +1016 -0
- package/dist/chunk-BMPL52BF.js +654 -0
- package/dist/chunk-CNZ35WI2.js +178 -0
- package/dist/chunk-GJPXRJ45.js +37 -0
- package/dist/chunk-JCDUJN2F.js +2779 -0
- package/dist/chunk-K4G4ZQNR.js +286 -0
- package/dist/chunk-M4NLBH4I.js +725 -0
- package/dist/chunk-MB6QFH3I.js +2776 -0
- package/dist/chunk-MYRV7VDM.js +742 -0
- package/dist/chunk-NZIIMDWI.js +84 -0
- package/dist/chunk-P3XWXJZU.js +282 -0
- package/dist/chunk-PDZQY43A.js +616 -0
- package/dist/chunk-RJ46C3CS.js +1293 -0
- package/dist/chunk-SFKNRVCU.js +292 -0
- package/dist/chunk-TDGZL5CU.js +365 -0
- package/dist/chunk-UHNL42EF.js +2730 -0
- package/dist/chunk-VAPYJN4X.js +368 -0
- package/dist/chunk-VQDZK23A.js +1023 -0
- package/dist/chunk-VQNQZCWJ.js +61 -0
- package/dist/chunk-XHK6BDAJ.js +76 -0
- package/dist/chunk-XUEEGU5O.js +409 -0
- package/dist/chunk-ZWKZCBO6.js +317 -0
- package/dist/contracts-ey_Qh8ef.d.cts +239 -0
- package/dist/contracts-ey_Qh8ef.d.ts +239 -0
- package/dist/contracts-xo5ckdRP.d.cts +240 -0
- package/dist/contracts-xo5ckdRP.d.ts +240 -0
- package/dist/customElement-BL3Uo8dL.d.cts +318 -0
- package/dist/customElement-BL3Uo8dL.d.ts +318 -0
- package/dist/data.cjs +52 -11
- package/dist/data.js +6 -6
- package/dist/devtools.cjs +22 -24
- package/dist/devtools.d.cts +1 -1
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +26 -28
- package/dist/ecosystem.cjs +31 -6
- package/dist/ecosystem.d.cts +4 -4
- package/dist/ecosystem.d.ts +4 -4
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +305 -131
- package/dist/extras.d.cts +3 -3
- package/dist/extras.d.ts +3 -3
- package/dist/extras.js +21 -29
- package/dist/index.cjs +124 -56
- package/dist/index.d.cts +60 -72
- package/dist/index.d.ts +60 -72
- package/dist/index.js +10 -14
- package/dist/motion.cjs +13 -2
- package/dist/motion.d.cts +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +91 -46
- package/dist/patterns.d.cts +46 -60
- package/dist/patterns.d.ts +46 -60
- package/dist/patterns.js +6 -14
- package/dist/performance.cjs +97 -12
- package/dist/performance.d.cts +6 -1
- package/dist/performance.d.ts +6 -1
- package/dist/performance.js +5 -3
- package/dist/plugins.cjs +20 -14
- package/dist/plugins.d.cts +3 -3
- package/dist/plugins.d.ts +3 -3
- package/dist/plugins.js +17 -19
- package/dist/ssr.cjs +9 -0
- package/dist/ssr.d.cts +1 -1
- package/dist/ssr.d.ts +1 -1
- package/dist/ssr.js +7 -7
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +130 -53
- package/dist/ui.d.cts +13 -16
- package/dist/ui.d.ts +13 -16
- package/dist/ui.js +7 -9
- package/dist/widgets.cjs +31 -6
- package/dist/widgets.js +5 -5
- package/package.json +1 -1
package/dist/extras.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { InfiniteQueryOptions, InfiniteQueryResult, LoaderRoute, MutationOptions, MutationResult, OfflineStore, OfflineStoreOptions, QueryOptions, QueryResult, Resource, ResourceOptions, RetryOptions, RouteLoaderFn, SyncAdapter, SyncChange, SyncResult, calculateDelay, clearQueryCache, debounce, executeLoader, getQueryData, infiniteQuery, invalidateQueries, loaderData, mutation, offlineStore, preloadRoute, previous, query, resource, setQueryData, socket, stream, syncAdapter, throttle, withRetry } from './data.cjs';
|
|
2
2
|
export { AnimationFrameOptions, BoundsRect, GamepadSnapshot, ImageLoaderState, KeyboardOptions, MouseOptions, MutationObserverOptions, SpeakOptions, SwipeDirection, SwipeOptions, TextSelectionState, UrlStateOptions, animationFrame, battery, bounds, broadcast, clipboard, colorScheme, draggable, dropZone, favicon, formatCurrency, formatNumber, fullscreen, gamepad, geo, idle, imageLoader, keyboard, media, mouse, mutationObserver, network, online, permissions, pointerLock, resize, scroll, speech, svgFavicon, swipe, textSelection, title, urlState, vibrate, visibility, wakeLock, windowSize } from './browser.cjs';
|
|
3
|
-
export { GlobalStore, MachineConfig, MachineReturn, Middleware,
|
|
4
|
-
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as
|
|
3
|
+
export { GlobalStore, MachineConfig, MachineReturn, Middleware, PersistOptions, Selector, TimeTravelReturn, globalStore, machine, optimistic, optimisticList, persisted, timeline } from './patterns.cjs';
|
|
4
|
+
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-ey_Qh8ef.cjs';
|
|
5
5
|
export { AnimationPreset, PresetOptions, SlideDirection, SpringOptions, TransitionGroup, TransitionGroupOptions, TransitionOptions, animate, bounceIn, bounceOut, fadeIn, fadeOut, flipIn, pulse, reducedMotion, scaleDown, scaleUp, sequence, shake, slideIn, slideOut, spring, springSignal, stagger, transition, viewTransition } from './motion.cjs';
|
|
6
|
-
export { B as BoundFieldProps, C as CustomElementOptions, F as FieldConfig, a as FocusTrap, b as FormConfig, c as FormField, d as FormReturn, I as IntersectionResult, M as MaskOptions, T as Toast, e as ToastInstance, V as ValidatorFn, f as VirtualList, g as VirtualListProps, h as announce, i as aria, j as bindAttrs, k as bindBoolAttr, l as bindData, m as bindField, n as creditCardMask, o as custom, p as dateMask, q as defineElement, r as dialog, s as email, t as eventBus, u as focus, v as form, w as hotkey, x as infiniteScroll, y as inputMask, z as intersection, A as lazyLoad, D as matchesPattern, E as max, G as maxLength, H as min, J as minLength, K as pagination, L as phoneMask, N as removeScopedStyle, O as required, P as scopedStyle, Q as ssnMask, R as svgElement, S as timeMask, U as toast, W as withScopedStyle, X as zipMask } from './customElement-
|
|
6
|
+
export { B as BoundFieldProps, C as CustomElementOptions, F as FieldConfig, a as FocusTrap, b as FormConfig, c as FormField, d as FormReturn, I as IntersectionResult, M as MaskOptions, T as Toast, e as ToastInstance, V as ValidatorFn, f as VirtualList, g as VirtualListProps, h as announce, i as aria, j as bindAttrs, k as bindBoolAttr, l as bindData, m as bindField, n as creditCardMask, o as custom, p as dateMask, q as defineElement, r as dialog, s as email, t as eventBus, u as focus, v as form, w as hotkey, x as infiniteScroll, y as inputMask, z as intersection, A as lazyLoad, D as matchesPattern, E as max, G as maxLength, H as min, J as minLength, K as pagination, L as phoneMask, N as removeScopedStyle, O as required, P as scopedStyle, Q as ssnMask, R as svgElement, S as timeMask, U as toast, W as withScopedStyle, X as zipMask } from './customElement-BL3Uo8dL.cjs';
|
|
7
7
|
export { ChunkConfig, DOMPool, Features, NormalizeResult, NormalizedEntities, NormalizedSchema, NormalizedState, NormalizedStoreActions, Priority, PriorityLevel, block, cloneTemplate, conditional, createChunkRegistry, deferredValue, denormalize, devOnly, domPool, flushScheduler, hoistable, lazyChunk, noSideEffect, normalize, normalizedStore, pendingTasks, precompile, prefetch, preloadImage, preloadModule, preloadModules, preloadResource, processInChunks, pure, resetIdCounter, scheduleUpdate, setIdPrefix, startTransition, staticTemplate, transitionState, uniqueId, yieldToMain } from './performance.cjs';
|
|
8
8
|
export { ActionFn, ActionResult, Head, ISROptions, MicroApp, MicroAppConfig, MiddlewareFn, SSGOptions, SSGResult, ScrollRestorationOptions, ServiceWorkerState, SharedScope, UseWorkerFnReturn, UseWorkerReturn, WasmConfig, WasmModuleState, WorkerPool, clearWasmCache, composeMiddleware, createAction, createISR, createMicroApp, createMiddlewareChain, createSharedScope, createWasmBridge, createWorkerPool, defineRemoteComponent, generateStaticSite, isWasmCached, loadRemoteModule, loadWasmModule, preloadWasm, scrollRestoration, serviceWorker, setCanonical, setStructuredData, wasm, worker, workerFn } from './ssr.cjs';
|
|
9
9
|
export { H as HydrateOptions, a as HydrationMismatch, T as TrustedHTML, c as collectStream, d as deserializeState, e as escapeScriptJson, h as hydrate, b as hydrateIslands, f as hydrateProgressively, i as island, r as renderToDocument, g as renderToReadableStream, j as renderToStream, k as renderToString, l as renderToSuspenseStream, m as resetSSRState, s as serializeState, n as ssrSuspense, o as suspenseSwapScript, t as trustHTML } from './ssr-Do_SiVoL.cjs';
|
package/dist/extras.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { InfiniteQueryOptions, InfiniteQueryResult, LoaderRoute, MutationOptions, MutationResult, OfflineStore, OfflineStoreOptions, QueryOptions, QueryResult, Resource, ResourceOptions, RetryOptions, RouteLoaderFn, SyncAdapter, SyncChange, SyncResult, calculateDelay, clearQueryCache, debounce, executeLoader, getQueryData, infiniteQuery, invalidateQueries, loaderData, mutation, offlineStore, preloadRoute, previous, query, resource, setQueryData, socket, stream, syncAdapter, throttle, withRetry } from './data.js';
|
|
2
2
|
export { AnimationFrameOptions, BoundsRect, GamepadSnapshot, ImageLoaderState, KeyboardOptions, MouseOptions, MutationObserverOptions, SpeakOptions, SwipeDirection, SwipeOptions, TextSelectionState, UrlStateOptions, animationFrame, battery, bounds, broadcast, clipboard, colorScheme, draggable, dropZone, favicon, formatCurrency, formatNumber, fullscreen, gamepad, geo, idle, imageLoader, keyboard, media, mouse, mutationObserver, network, online, permissions, pointerLock, resize, scroll, speech, svgFavicon, swipe, textSelection, title, urlState, vibrate, visibility, wakeLock, windowSize } from './browser.js';
|
|
3
|
-
export { GlobalStore, MachineConfig, MachineReturn, Middleware,
|
|
4
|
-
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as
|
|
3
|
+
export { GlobalStore, MachineConfig, MachineReturn, Middleware, PersistOptions, Selector, TimeTravelReturn, globalStore, machine, optimistic, optimisticList, persisted, timeline } from './patterns.js';
|
|
4
|
+
export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, b as assertType, c as compose, d as createGuard, e as createSlots, f as defineComponent, g as defineSlottedComponent, h as defineStrictComponent, v as validateProps, i as validators, w as withBoundary, j as withDefaults, k as withProps, l as withWrapper } from './contracts-ey_Qh8ef.js';
|
|
5
5
|
export { AnimationPreset, PresetOptions, SlideDirection, SpringOptions, TransitionGroup, TransitionGroupOptions, TransitionOptions, animate, bounceIn, bounceOut, fadeIn, fadeOut, flipIn, pulse, reducedMotion, scaleDown, scaleUp, sequence, shake, slideIn, slideOut, spring, springSignal, stagger, transition, viewTransition } from './motion.js';
|
|
6
|
-
export { B as BoundFieldProps, C as CustomElementOptions, F as FieldConfig, a as FocusTrap, b as FormConfig, c as FormField, d as FormReturn, I as IntersectionResult, M as MaskOptions, T as Toast, e as ToastInstance, V as ValidatorFn, f as VirtualList, g as VirtualListProps, h as announce, i as aria, j as bindAttrs, k as bindBoolAttr, l as bindData, m as bindField, n as creditCardMask, o as custom, p as dateMask, q as defineElement, r as dialog, s as email, t as eventBus, u as focus, v as form, w as hotkey, x as infiniteScroll, y as inputMask, z as intersection, A as lazyLoad, D as matchesPattern, E as max, G as maxLength, H as min, J as minLength, K as pagination, L as phoneMask, N as removeScopedStyle, O as required, P as scopedStyle, Q as ssnMask, R as svgElement, S as timeMask, U as toast, W as withScopedStyle, X as zipMask } from './customElement-
|
|
6
|
+
export { B as BoundFieldProps, C as CustomElementOptions, F as FieldConfig, a as FocusTrap, b as FormConfig, c as FormField, d as FormReturn, I as IntersectionResult, M as MaskOptions, T as Toast, e as ToastInstance, V as ValidatorFn, f as VirtualList, g as VirtualListProps, h as announce, i as aria, j as bindAttrs, k as bindBoolAttr, l as bindData, m as bindField, n as creditCardMask, o as custom, p as dateMask, q as defineElement, r as dialog, s as email, t as eventBus, u as focus, v as form, w as hotkey, x as infiniteScroll, y as inputMask, z as intersection, A as lazyLoad, D as matchesPattern, E as max, G as maxLength, H as min, J as minLength, K as pagination, L as phoneMask, N as removeScopedStyle, O as required, P as scopedStyle, Q as ssnMask, R as svgElement, S as timeMask, U as toast, W as withScopedStyle, X as zipMask } from './customElement-BL3Uo8dL.js';
|
|
7
7
|
export { ChunkConfig, DOMPool, Features, NormalizeResult, NormalizedEntities, NormalizedSchema, NormalizedState, NormalizedStoreActions, Priority, PriorityLevel, block, cloneTemplate, conditional, createChunkRegistry, deferredValue, denormalize, devOnly, domPool, flushScheduler, hoistable, lazyChunk, noSideEffect, normalize, normalizedStore, pendingTasks, precompile, prefetch, preloadImage, preloadModule, preloadModules, preloadResource, processInChunks, pure, resetIdCounter, scheduleUpdate, setIdPrefix, startTransition, staticTemplate, transitionState, uniqueId, yieldToMain } from './performance.js';
|
|
8
8
|
export { ActionFn, ActionResult, Head, ISROptions, MicroApp, MicroAppConfig, MiddlewareFn, SSGOptions, SSGResult, ScrollRestorationOptions, ServiceWorkerState, SharedScope, UseWorkerFnReturn, UseWorkerReturn, WasmConfig, WasmModuleState, WorkerPool, clearWasmCache, composeMiddleware, createAction, createISR, createMicroApp, createMiddlewareChain, createSharedScope, createWasmBridge, createWorkerPool, defineRemoteComponent, generateStaticSite, isWasmCached, loadRemoteModule, loadWasmModule, preloadWasm, scrollRestoration, serviceWorker, setCanonical, setStructuredData, wasm, worker, workerFn } from './ssr.js';
|
|
9
9
|
export { H as HydrateOptions, a as HydrationMismatch, T as TrustedHTML, c as collectStream, d as deserializeState, e as escapeScriptJson, h as hydrate, b as hydrateIslands, f as hydrateProgressively, i as island, r as renderToDocument, g as renderToReadableStream, j as renderToStream, k as renderToString, l as renderToSuspenseStream, m as resetSSRState, s as serializeState, n as ssrSuspense, o as suspenseSwapScript, t as trustHTML } from './ssr-Do_SiVoL.js';
|
package/dist/extras.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createEffect,
|
|
3
|
-
createMemo,
|
|
4
|
-
createSignal,
|
|
5
2
|
globalStore,
|
|
6
3
|
machine,
|
|
7
4
|
optimistic,
|
|
8
5
|
optimisticList,
|
|
9
6
|
persisted,
|
|
10
7
|
timeline
|
|
11
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VAPYJN4X.js";
|
|
12
9
|
import {
|
|
13
10
|
DOMPool,
|
|
14
11
|
Features,
|
|
@@ -44,7 +41,7 @@ import {
|
|
|
44
41
|
transitionState,
|
|
45
42
|
uniqueId,
|
|
46
43
|
yieldToMain
|
|
47
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-BMPL52BF.js";
|
|
48
45
|
import {
|
|
49
46
|
VERSION,
|
|
50
47
|
bundlerMetadata,
|
|
@@ -65,7 +62,7 @@ import {
|
|
|
65
62
|
preloadCritical,
|
|
66
63
|
prerenderRoutes,
|
|
67
64
|
satisfies
|
|
68
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-M4NLBH4I.js";
|
|
69
66
|
import {
|
|
70
67
|
Head,
|
|
71
68
|
clearWasmCache,
|
|
@@ -90,7 +87,7 @@ import {
|
|
|
90
87
|
wasm,
|
|
91
88
|
worker,
|
|
92
89
|
workerFn
|
|
93
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-MYRV7VDM.js";
|
|
94
91
|
import {
|
|
95
92
|
FocusTrap,
|
|
96
93
|
VirtualList,
|
|
@@ -130,11 +127,10 @@ import {
|
|
|
130
127
|
toast,
|
|
131
128
|
withScopedStyle,
|
|
132
129
|
zipMask
|
|
133
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-VQDZK23A.js";
|
|
134
131
|
import {
|
|
135
132
|
RenderProp,
|
|
136
133
|
assertType,
|
|
137
|
-
composable,
|
|
138
134
|
compose,
|
|
139
135
|
createGuard,
|
|
140
136
|
createSlots,
|
|
@@ -147,7 +143,7 @@ import {
|
|
|
147
143
|
withDefaults,
|
|
148
144
|
withProps,
|
|
149
145
|
withWrapper
|
|
150
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-CNZ35WI2.js";
|
|
151
147
|
import {
|
|
152
148
|
accordion,
|
|
153
149
|
combobox,
|
|
@@ -158,7 +154,7 @@ import {
|
|
|
158
154
|
select,
|
|
159
155
|
tabs,
|
|
160
156
|
tooltip
|
|
161
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-PDZQY43A.js";
|
|
162
158
|
import {
|
|
163
159
|
collectStream,
|
|
164
160
|
deserializeState,
|
|
@@ -215,7 +211,7 @@ import {
|
|
|
215
211
|
visibility,
|
|
216
212
|
wakeLock,
|
|
217
213
|
windowSize
|
|
218
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-RJ46C3CS.js";
|
|
219
215
|
import {
|
|
220
216
|
calculateDelay,
|
|
221
217
|
clearQueryCache,
|
|
@@ -237,7 +233,7 @@ import {
|
|
|
237
233
|
syncAdapter,
|
|
238
234
|
throttle,
|
|
239
235
|
withRetry
|
|
240
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-BGTHZHJ5.js";
|
|
241
237
|
import {
|
|
242
238
|
SibuError,
|
|
243
239
|
checkLeaks,
|
|
@@ -273,7 +269,7 @@ import {
|
|
|
273
269
|
trackCleanup,
|
|
274
270
|
walkDependencyGraph,
|
|
275
271
|
withErrorTracking
|
|
276
|
-
} from "./chunk-
|
|
272
|
+
} from "./chunk-7GRNSCFT.js";
|
|
277
273
|
import {
|
|
278
274
|
antdAdapter,
|
|
279
275
|
chakraAdapter,
|
|
@@ -283,7 +279,7 @@ import {
|
|
|
283
279
|
mobXAdapter,
|
|
284
280
|
reduxAdapter,
|
|
285
281
|
zustandAdapter
|
|
286
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-TDGZL5CU.js";
|
|
287
283
|
import {
|
|
288
284
|
createPlugin,
|
|
289
285
|
inject,
|
|
@@ -293,14 +289,14 @@ import {
|
|
|
293
289
|
triggerPluginMount,
|
|
294
290
|
triggerPluginUnmount
|
|
295
291
|
} from "./chunk-K5ZUMYVS.js";
|
|
296
|
-
import "./chunk-
|
|
297
|
-
import "./chunk-
|
|
298
|
-
import "./chunk-
|
|
299
|
-
import "./chunk-
|
|
300
|
-
import "./chunk-
|
|
301
|
-
import "./chunk-
|
|
292
|
+
import "./chunk-P3XWXJZU.js";
|
|
293
|
+
import "./chunk-GJPXRJ45.js";
|
|
294
|
+
import "./chunk-6BMPXPUW.js";
|
|
295
|
+
import "./chunk-SFKNRVCU.js";
|
|
296
|
+
import "./chunk-5ZYQ6KDD.js";
|
|
297
|
+
import "./chunk-XHK6BDAJ.js";
|
|
302
298
|
import "./chunk-CMBFNA7L.js";
|
|
303
|
-
import "./chunk-
|
|
299
|
+
import "./chunk-VQNQZCWJ.js";
|
|
304
300
|
import "./chunk-EUZND3CB.js";
|
|
305
301
|
import {
|
|
306
302
|
TransitionGroup,
|
|
@@ -323,9 +319,9 @@ import {
|
|
|
323
319
|
stagger,
|
|
324
320
|
transition,
|
|
325
321
|
viewTransition
|
|
326
|
-
} from "./chunk-
|
|
327
|
-
import "./chunk-
|
|
328
|
-
import "./chunk-
|
|
322
|
+
} from "./chunk-XUEEGU5O.js";
|
|
323
|
+
import "./chunk-NZIIMDWI.js";
|
|
324
|
+
import "./chunk-K4G4ZQNR.js";
|
|
329
325
|
import "./chunk-5X6PP2UK.js";
|
|
330
326
|
export {
|
|
331
327
|
DOMPool,
|
|
@@ -372,7 +368,6 @@ export {
|
|
|
372
368
|
combobox,
|
|
373
369
|
compareSemVer,
|
|
374
370
|
componentAdapter,
|
|
375
|
-
composable,
|
|
376
371
|
compose,
|
|
377
372
|
composeMiddleware,
|
|
378
373
|
conditional,
|
|
@@ -382,12 +377,10 @@ export {
|
|
|
382
377
|
createBundle,
|
|
383
378
|
createChunkRegistry,
|
|
384
379
|
createDevtoolsOverlay,
|
|
385
|
-
createEffect,
|
|
386
380
|
createErrorReporter,
|
|
387
381
|
createGuard,
|
|
388
382
|
createHMRBoundary,
|
|
389
383
|
createISR,
|
|
390
|
-
createMemo,
|
|
391
384
|
createMicroApp,
|
|
392
385
|
createMiddlewareChain,
|
|
393
386
|
createMigrationRunner,
|
|
@@ -396,7 +389,6 @@ export {
|
|
|
396
389
|
createProfiler,
|
|
397
390
|
createSSRCache,
|
|
398
391
|
createSharedScope,
|
|
399
|
-
createSignal,
|
|
400
392
|
createSlots,
|
|
401
393
|
createTestHarness,
|
|
402
394
|
createTheme,
|
package/dist/index.cjs
CHANGED
|
@@ -134,8 +134,6 @@ __export(index_exports, {
|
|
|
134
134
|
mask: () => mask,
|
|
135
135
|
match: () => match,
|
|
136
136
|
math: () => math,
|
|
137
|
-
memo: () => memo,
|
|
138
|
-
memoFn: () => memoFn,
|
|
139
137
|
menu: () => menu,
|
|
140
138
|
meta: () => meta,
|
|
141
139
|
meter: () => meter,
|
|
@@ -374,12 +372,21 @@ function queueSignalNotification(signal2) {
|
|
|
374
372
|
}
|
|
375
373
|
}
|
|
376
374
|
}
|
|
375
|
+
var MAX_DRAIN_ITERATIONS = 1e3;
|
|
377
376
|
function drainNotificationQueue() {
|
|
378
377
|
if (notifyDepth > 0) return;
|
|
379
378
|
notifyDepth++;
|
|
380
379
|
try {
|
|
381
380
|
let i2 = 0;
|
|
382
381
|
while (i2 < pendingQueue.length) {
|
|
382
|
+
if (i2 >= MAX_DRAIN_ITERATIONS) {
|
|
383
|
+
if (typeof console !== "undefined") {
|
|
384
|
+
console.error(
|
|
385
|
+
`[SibuJS] Notification queue exceeded ${MAX_DRAIN_ITERATIONS} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
383
390
|
safeInvoke(pendingQueue[i2]);
|
|
384
391
|
i2++;
|
|
385
392
|
}
|
|
@@ -709,7 +716,15 @@ function dispose(node) {
|
|
|
709
716
|
const disposers = elementDisposers.get(current);
|
|
710
717
|
if (disposers) {
|
|
711
718
|
if (_isDev5) activeBindingCount -= disposers.length;
|
|
712
|
-
for (const d of disposers)
|
|
719
|
+
for (const d of disposers) {
|
|
720
|
+
try {
|
|
721
|
+
d();
|
|
722
|
+
} catch (err) {
|
|
723
|
+
if (_isDev5 && typeof console !== "undefined") {
|
|
724
|
+
console.warn("[SibuJS] Disposer threw during cleanup:", err);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
713
728
|
elementDisposers.delete(current);
|
|
714
729
|
}
|
|
715
730
|
}
|
|
@@ -1643,19 +1658,16 @@ function Portal(nodes, target) {
|
|
|
1643
1658
|
portalContent = nodes();
|
|
1644
1659
|
container.appendChild(portalContent);
|
|
1645
1660
|
} catch (err) {
|
|
1646
|
-
|
|
1661
|
+
if (typeof console !== "undefined") {
|
|
1662
|
+
console.error("[Portal] Render error:", err);
|
|
1663
|
+
}
|
|
1647
1664
|
}
|
|
1648
1665
|
});
|
|
1649
|
-
|
|
1650
|
-
if (
|
|
1666
|
+
registerDisposer(anchor, () => {
|
|
1667
|
+
if (portalContent) {
|
|
1668
|
+
dispose(portalContent);
|
|
1651
1669
|
portalContent.remove();
|
|
1652
1670
|
portalContent = null;
|
|
1653
|
-
observer.disconnect();
|
|
1654
|
-
}
|
|
1655
|
-
});
|
|
1656
|
-
queueMicrotask(() => {
|
|
1657
|
-
if (anchor.parentNode) {
|
|
1658
|
-
observer.observe(anchor.parentNode, { childList: true });
|
|
1659
1671
|
}
|
|
1660
1672
|
});
|
|
1661
1673
|
return anchor;
|
|
@@ -2122,21 +2134,37 @@ function derived(getter, options) {
|
|
|
2122
2134
|
cs._v = getter();
|
|
2123
2135
|
}, markDirty);
|
|
2124
2136
|
const hook = globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
|
|
2137
|
+
let evaluating = false;
|
|
2125
2138
|
function computedGetter() {
|
|
2139
|
+
if (evaluating) {
|
|
2140
|
+
throw new Error(
|
|
2141
|
+
`[SibuJS] Circular dependency detected in derived${debugName ? ` "${debugName}"` : ""}. A derived signal cannot read itself (directly or through a chain).`
|
|
2142
|
+
);
|
|
2143
|
+
}
|
|
2126
2144
|
if (trackingSuspended) {
|
|
2127
2145
|
if (cs._d) {
|
|
2128
|
-
|
|
2129
|
-
|
|
2146
|
+
evaluating = true;
|
|
2147
|
+
try {
|
|
2148
|
+
cs._d = false;
|
|
2149
|
+
cs._v = getter();
|
|
2150
|
+
} finally {
|
|
2151
|
+
evaluating = false;
|
|
2152
|
+
}
|
|
2130
2153
|
}
|
|
2131
2154
|
return cs._v;
|
|
2132
2155
|
}
|
|
2133
2156
|
recordDependency(cs);
|
|
2134
2157
|
if (cs._d) {
|
|
2135
2158
|
const oldValue = cs._v;
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2159
|
+
evaluating = true;
|
|
2160
|
+
try {
|
|
2161
|
+
track(() => {
|
|
2162
|
+
cs._d = false;
|
|
2163
|
+
cs._v = getter();
|
|
2164
|
+
}, markDirty);
|
|
2165
|
+
} finally {
|
|
2166
|
+
evaluating = false;
|
|
2167
|
+
}
|
|
2140
2168
|
if (hook && oldValue !== cs._v) {
|
|
2141
2169
|
hook.emit("computed:update", { signal: cs, oldValue, newValue: cs._v });
|
|
2142
2170
|
}
|
|
@@ -2267,16 +2295,6 @@ function ref(initial) {
|
|
|
2267
2295
|
};
|
|
2268
2296
|
}
|
|
2269
2297
|
|
|
2270
|
-
// src/core/signals/memo.ts
|
|
2271
|
-
function memo(factory) {
|
|
2272
|
-
return derived(factory);
|
|
2273
|
-
}
|
|
2274
|
-
|
|
2275
|
-
// src/core/signals/memoFn.ts
|
|
2276
|
-
function memoFn(callback) {
|
|
2277
|
-
return derived(callback);
|
|
2278
|
-
}
|
|
2279
|
-
|
|
2280
2298
|
// src/core/signals/array.ts
|
|
2281
2299
|
function array(initial = []) {
|
|
2282
2300
|
const [arr, setArr] = signal([...initial]);
|
|
@@ -2474,21 +2492,67 @@ function deepEqual(a2, b2, seen) {
|
|
|
2474
2492
|
if (a2 == null || b2 == null) return false;
|
|
2475
2493
|
if (typeof a2 !== typeof b2) return false;
|
|
2476
2494
|
if (typeof a2 !== "object") return false;
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
if (
|
|
2480
|
-
if (
|
|
2481
|
-
|
|
2495
|
+
const objA = a2;
|
|
2496
|
+
const objB = b2;
|
|
2497
|
+
if (objA.constructor !== objB.constructor) return false;
|
|
2498
|
+
if (a2 instanceof Date) return a2.getTime() === b2.getTime();
|
|
2499
|
+
if (a2 instanceof RegExp) {
|
|
2500
|
+
const rb = b2;
|
|
2501
|
+
return a2.source === rb.source && a2.flags === rb.flags;
|
|
2502
|
+
}
|
|
2503
|
+
if (!seen) seen = /* @__PURE__ */ new Map();
|
|
2504
|
+
let peers = seen.get(objA);
|
|
2505
|
+
if (peers?.has(objB)) return true;
|
|
2506
|
+
if (!peers) {
|
|
2507
|
+
peers = /* @__PURE__ */ new Set();
|
|
2508
|
+
seen.set(objA, peers);
|
|
2509
|
+
}
|
|
2510
|
+
peers.add(objB);
|
|
2511
|
+
if (a2 instanceof Map) {
|
|
2512
|
+
const mb = b2;
|
|
2513
|
+
if (a2.size !== mb.size) return false;
|
|
2514
|
+
for (const [k, v] of a2) {
|
|
2515
|
+
if (!mb.has(k)) return false;
|
|
2516
|
+
if (!deepEqual(v, mb.get(k), seen)) return false;
|
|
2517
|
+
}
|
|
2518
|
+
return true;
|
|
2519
|
+
}
|
|
2520
|
+
if (a2 instanceof Set) {
|
|
2521
|
+
const sb = b2;
|
|
2522
|
+
if (a2.size !== sb.size) return false;
|
|
2523
|
+
for (const item of a2) {
|
|
2524
|
+
if (!sb.has(item)) return false;
|
|
2525
|
+
}
|
|
2526
|
+
return true;
|
|
2527
|
+
}
|
|
2528
|
+
if (a2 instanceof ArrayBuffer) {
|
|
2529
|
+
const viewA = new Uint8Array(a2);
|
|
2530
|
+
const viewB = new Uint8Array(b2);
|
|
2531
|
+
if (viewA.length !== viewB.length) return false;
|
|
2532
|
+
for (let i2 = 0; i2 < viewA.length; i2++) {
|
|
2533
|
+
if (viewA[i2] !== viewB[i2]) return false;
|
|
2534
|
+
}
|
|
2535
|
+
return true;
|
|
2536
|
+
}
|
|
2537
|
+
if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) {
|
|
2538
|
+
const ta = a2;
|
|
2539
|
+
const tb = b2;
|
|
2540
|
+
if (ta.length !== tb.length) return false;
|
|
2541
|
+
for (let i2 = 0; i2 < ta.length; i2++) {
|
|
2542
|
+
if (ta[i2] !== tb[i2]) return false;
|
|
2543
|
+
}
|
|
2544
|
+
return true;
|
|
2545
|
+
}
|
|
2482
2546
|
if (Array.isArray(a2)) {
|
|
2483
2547
|
if (!Array.isArray(b2)) return false;
|
|
2484
2548
|
if (a2.length !== b2.length) return false;
|
|
2485
2549
|
return a2.every((val, i2) => deepEqual(val, b2[i2], seen));
|
|
2486
2550
|
}
|
|
2487
|
-
const keysA = Object.keys(
|
|
2488
|
-
const keysB = Object.keys(
|
|
2551
|
+
const keysA = Object.keys(objA);
|
|
2552
|
+
const keysB = Object.keys(objB);
|
|
2489
2553
|
if (keysA.length !== keysB.length) return false;
|
|
2490
2554
|
return keysA.every(
|
|
2491
|
-
(key) => deepEqual(
|
|
2555
|
+
(key) => deepEqual(objA[key], objB[key], seen)
|
|
2492
2556
|
);
|
|
2493
2557
|
}
|
|
2494
2558
|
function deepSignal(initial) {
|
|
@@ -2548,29 +2612,35 @@ function asyncDerived(factory, initial) {
|
|
|
2548
2612
|
// src/core/rendering/lifecycle.ts
|
|
2549
2613
|
function safeCall(cb, hookName) {
|
|
2550
2614
|
try {
|
|
2551
|
-
cb();
|
|
2615
|
+
return cb();
|
|
2552
2616
|
} catch (err) {
|
|
2553
2617
|
devWarn(`${hookName}: callback threw: ${err instanceof Error ? err.message : String(err)}`);
|
|
2618
|
+
return void 0;
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
function runMountCallback(callback, hookName, element) {
|
|
2622
|
+
const cleanup2 = safeCall(callback, hookName);
|
|
2623
|
+
if (typeof cleanup2 === "function" && element) {
|
|
2624
|
+
registerDisposer(element, cleanup2);
|
|
2554
2625
|
}
|
|
2555
2626
|
}
|
|
2556
2627
|
function onMount(callback, element) {
|
|
2557
2628
|
if (typeof document === "undefined") return;
|
|
2558
2629
|
if (element) {
|
|
2559
2630
|
if (element.isConnected) {
|
|
2560
|
-
queueMicrotask(() =>
|
|
2561
|
-
safeCall(callback, "onMount");
|
|
2562
|
-
});
|
|
2631
|
+
queueMicrotask(() => runMountCallback(callback, "onMount", element));
|
|
2563
2632
|
return;
|
|
2564
2633
|
}
|
|
2565
2634
|
const observer = new MutationObserver(() => {
|
|
2566
2635
|
if (element.isConnected) {
|
|
2567
2636
|
observer.disconnect();
|
|
2568
|
-
|
|
2637
|
+
runMountCallback(callback, "onMount", element);
|
|
2569
2638
|
}
|
|
2570
2639
|
});
|
|
2640
|
+
registerDisposer(element, () => observer.disconnect());
|
|
2571
2641
|
queueMicrotask(() => {
|
|
2572
2642
|
if (element.isConnected) {
|
|
2573
|
-
|
|
2643
|
+
runMountCallback(callback, "onMount", element);
|
|
2574
2644
|
} else {
|
|
2575
2645
|
observer.observe(document.body, { childList: true, subtree: true });
|
|
2576
2646
|
}
|
|
@@ -2582,6 +2652,7 @@ function onMount(callback, element) {
|
|
|
2582
2652
|
}
|
|
2583
2653
|
}
|
|
2584
2654
|
function onUnmount(callback, element) {
|
|
2655
|
+
registerDisposer(element, () => safeCall(callback, "onUnmount"));
|
|
2585
2656
|
const startObserving = () => {
|
|
2586
2657
|
const observer = new MutationObserver(() => {
|
|
2587
2658
|
if (!element.isConnected) {
|
|
@@ -2590,6 +2661,7 @@ function onUnmount(callback, element) {
|
|
|
2590
2661
|
}
|
|
2591
2662
|
});
|
|
2592
2663
|
observer.observe(document.body, { childList: true, subtree: true });
|
|
2664
|
+
registerDisposer(element, () => observer.disconnect());
|
|
2593
2665
|
};
|
|
2594
2666
|
if (element.isConnected) {
|
|
2595
2667
|
startObserving();
|
|
@@ -2740,26 +2812,24 @@ function lazy(importFn) {
|
|
|
2740
2812
|
if (cached) {
|
|
2741
2813
|
return cached();
|
|
2742
2814
|
}
|
|
2743
|
-
const [_status, setStatus] = signal("loading");
|
|
2744
|
-
const [_error, setError] = signal(null);
|
|
2745
2815
|
const container = div({ class: "sibu-lazy" });
|
|
2816
|
+
let disposed = false;
|
|
2746
2817
|
importFn().then((mod) => {
|
|
2818
|
+
if (disposed) return;
|
|
2747
2819
|
cached = mod.default;
|
|
2748
2820
|
const rendered = cached();
|
|
2749
2821
|
container.replaceChildren(rendered);
|
|
2750
|
-
setStatus("loaded");
|
|
2751
2822
|
}).catch((err) => {
|
|
2823
|
+
if (disposed) return;
|
|
2752
2824
|
const errorObj = err instanceof Error ? err : new Error(String(err));
|
|
2753
|
-
|
|
2754
|
-
setStatus("error");
|
|
2755
|
-
container.replaceChildren(
|
|
2756
|
-
div({
|
|
2757
|
-
class: "sibu-lazy-error",
|
|
2758
|
-
nodes: `Failed to load component: ${errorObj.message}`
|
|
2759
|
-
})
|
|
2760
|
-
);
|
|
2825
|
+
container.replaceChildren(div("sibu-lazy-error", `Failed to load component: ${errorObj.message}`));
|
|
2761
2826
|
});
|
|
2762
|
-
container.appendChild(span(
|
|
2827
|
+
container.appendChild(span("sibu-lazy-loading", "Loading..."));
|
|
2828
|
+
const origRemove = container.remove.bind(container);
|
|
2829
|
+
container.remove = () => {
|
|
2830
|
+
disposed = true;
|
|
2831
|
+
origRemove();
|
|
2832
|
+
};
|
|
2763
2833
|
return container;
|
|
2764
2834
|
};
|
|
2765
2835
|
}
|
|
@@ -3705,8 +3775,6 @@ function Loading(props = {}) {
|
|
|
3705
3775
|
mask,
|
|
3706
3776
|
match,
|
|
3707
3777
|
math,
|
|
3708
|
-
memo,
|
|
3709
|
-
memoFn,
|
|
3710
3778
|
menu,
|
|
3711
3779
|
meta,
|
|
3712
3780
|
meter,
|