sibujs 4.5.0 → 4.7.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.
Files changed (116) hide show
  1. package/README.md +1 -1
  2. package/dist/browser.cjs +326 -133
  3. package/dist/browser.d.cts +46 -14
  4. package/dist/browser.d.ts +46 -14
  5. package/dist/browser.js +8 -6
  6. package/dist/build.cjs +2094 -1033
  7. package/dist/build.d.cts +133 -44
  8. package/dist/build.d.ts +133 -44
  9. package/dist/build.js +1372 -574
  10. package/dist/cdn.dev.global.js +10 -10
  11. package/dist/cdn.full.dev.global.js +11 -11
  12. package/dist/cdn.full.global.js +10 -10
  13. package/dist/cdn.global.js +10 -10
  14. package/dist/{chunk-2DCGACUU.js → chunk-2BPG2XDA.js} +251 -66
  15. package/dist/{chunk-IXKSNWV5.js → chunk-2INLLLMZ.js} +1 -1
  16. package/dist/{chunk-4PMLNECI.js → chunk-3QWBSL5R.js} +98 -29
  17. package/dist/{chunk-KKLW7YWL.js → chunk-4AWA2PVD.js} +275 -144
  18. package/dist/chunk-5HZXGZ6T.js +24 -0
  19. package/dist/{chunk-PCT43HW3.js → chunk-7LUJQAOJ.js} +1 -1
  20. package/dist/{chunk-5DXA2J44.js → chunk-7XHATCIH.js} +5 -2
  21. package/dist/chunk-BC2SECJD.js +44 -0
  22. package/dist/{chunk-TBYTO6BS.js → chunk-BSY63EM6.js} +136 -80
  23. package/dist/{chunk-FTIR4QW2.js → chunk-DKXRACVN.js} +6 -8
  24. package/dist/{chunk-ONOHFDLG.js → chunk-FNJXNGYZ.js} +3 -3
  25. package/dist/{chunk-XZZOBQAY.js → chunk-FQRUXCEE.js} +6 -5
  26. package/dist/{chunk-NIOYEGBQ.js → chunk-HURREPU2.js} +27 -13
  27. package/dist/chunk-J6FW5TV6.js +233 -0
  28. package/dist/{chunk-UGRX3S57.js → chunk-JWKYU5GV.js} +22 -4
  29. package/dist/chunk-NYNYSPK7.js +318 -0
  30. package/dist/{chunk-RBTPLM32.js → chunk-RUSSKG6G.js} +13 -12
  31. package/dist/{chunk-7LN645I6.js → chunk-SLM3IA34.js} +3 -3
  32. package/dist/{chunk-R25EFXXC.js → chunk-TUCPL2HB.js} +3 -3
  33. package/dist/{chunk-B3WHI2QA.js → chunk-UNWRJRKC.js} +55 -31
  34. package/dist/{chunk-KEISJXBU.js → chunk-UOL2ECCS.js} +44 -17
  35. package/dist/{chunk-RJE2BNI4.js → chunk-VZSG24LS.js} +108 -45
  36. package/dist/{chunk-RIXRAYIU.js → chunk-WEQ3DMVL.js} +10 -4
  37. package/dist/{chunk-3JZ4L5TJ.js → chunk-WOLJZUFQ.js} +354 -90
  38. package/dist/{chunk-S373NSMK.js → chunk-XYV3EDB7.js} +283 -123
  39. package/dist/{chunk-VZKNK2V7.js → chunk-XZR4PXRE.js} +296 -38
  40. package/dist/{chunk-GW3SCCZG.js → chunk-Z3OHK6QT.js} +153 -110
  41. package/dist/{chunk-OMJJM3KM.js → chunk-ZVL7TY4K.js} +287 -130
  42. package/dist/{contracts-DBdg9J_a.d.ts → contracts-CLqzJnOV.d.ts} +36 -17
  43. package/dist/{contracts-DBdg9J_a.d.cts → contracts-CTOJXu-x.d.cts} +36 -17
  44. package/dist/{customElement-OB9CIsc5.d.cts → customElement-MmInOW1U.d.cts} +21 -0
  45. package/dist/{customElement-OB9CIsc5.d.ts → customElement-MmInOW1U.d.ts} +21 -0
  46. package/dist/data.cjs +410 -155
  47. package/dist/data.d.cts +166 -12
  48. package/dist/data.d.ts +166 -12
  49. package/dist/data.js +12 -9
  50. package/dist/devtools.cjs +98 -61
  51. package/dist/devtools.js +7 -8
  52. package/dist/dispose-GEIG2KOF.js +28 -0
  53. package/dist/ecosystem.cjs +372 -126
  54. package/dist/ecosystem.d.cts +20 -3
  55. package/dist/ecosystem.d.ts +20 -3
  56. package/dist/ecosystem.js +12 -12
  57. package/dist/extras.cjs +2366 -909
  58. package/dist/extras.d.cts +11 -9
  59. package/dist/extras.d.ts +11 -9
  60. package/dist/extras.js +39 -28
  61. package/dist/index.cjs +421 -158
  62. package/dist/index.d.cts +213 -171
  63. package/dist/index.d.ts +213 -171
  64. package/dist/index.js +24 -27
  65. package/dist/motion.cjs +118 -44
  66. package/dist/motion.js +5 -5
  67. package/dist/patterns.cjs +344 -53
  68. package/dist/patterns.d.cts +28 -9
  69. package/dist/patterns.d.ts +28 -9
  70. package/dist/patterns.js +8 -8
  71. package/dist/performance.cjs +325 -220
  72. package/dist/performance.d.cts +2 -2
  73. package/dist/performance.d.ts +2 -2
  74. package/dist/performance.js +8 -9
  75. package/dist/plugin-DVgSnTfK.d.cts +112 -0
  76. package/dist/plugin-DVgSnTfK.d.ts +112 -0
  77. package/dist/plugins.cjs +664 -233
  78. package/dist/plugins.d.cts +127 -14
  79. package/dist/plugins.d.ts +127 -14
  80. package/dist/plugins.js +96 -42
  81. package/dist/signal-EotCj4hS.d.cts +110 -0
  82. package/dist/signal-EotCj4hS.d.ts +110 -0
  83. package/dist/{ssr-BiPRdZ6n.d.cts → ssr-Bli9XRW5.d.cts} +5 -0
  84. package/dist/{ssr-BiPRdZ6n.d.ts → ssr-Bli9XRW5.d.ts} +5 -0
  85. package/dist/{ssr-Y7XOEPEN.js → ssr-XOTUASDO.js} +4 -5
  86. package/dist/ssr.cjs +229 -84
  87. package/dist/ssr.d.cts +9 -3
  88. package/dist/ssr.d.ts +9 -3
  89. package/dist/ssr.js +11 -12
  90. package/dist/{startup-BMpaiMhP.d.ts → startup-BLfSeL15.d.cts} +73 -22
  91. package/dist/{startup-BMpaiMhP.d.cts → startup-BLfSeL15.d.ts} +73 -22
  92. package/dist/tagFactory-8qL9LCIx.d.cts +156 -0
  93. package/dist/tagFactory-BL2fymez.d.ts +156 -0
  94. package/dist/testing.cjs +2503 -2191
  95. package/dist/testing.d.cts +56 -5
  96. package/dist/testing.d.ts +56 -5
  97. package/dist/testing.js +580 -307
  98. package/dist/types-CJFViL6Q.d.cts +26 -0
  99. package/dist/types-CJFViL6Q.d.ts +26 -0
  100. package/dist/ui.cjs +732 -329
  101. package/dist/ui.d.cts +41 -7
  102. package/dist/ui.d.ts +41 -7
  103. package/dist/ui.js +151 -56
  104. package/dist/widgets.cjs +267 -291
  105. package/dist/widgets.js +9 -10
  106. package/package.json +4 -2
  107. package/dist/chunk-2WLZ6757.js +0 -149
  108. package/dist/chunk-CCSJMTRN.js +0 -15
  109. package/dist/chunk-QKRPLZ2V.js +0 -108
  110. package/dist/chunk-VUF4ALSW.js +0 -60
  111. package/dist/chunk-WWV3SJ3L.js +0 -131
  112. package/dist/dispose-46BOMMQJ.js +0 -19
  113. package/dist/plugin-D30wlGW5.d.cts +0 -71
  114. package/dist/plugin-D30wlGW5.d.ts +0 -71
  115. package/dist/tagFactory-DVoDpHye.d.cts +0 -215
  116. package/dist/tagFactory-DVoDpHye.d.ts +0 -215
@@ -1,4 +1,5 @@
1
- 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-DBdg9J_a.js';
1
+ export { C as ComponentProps, P as PropDef, a as PropSchema, R as RenderProp, V as Validator, W as WithDefaultsProps, 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-CLqzJnOV.js';
2
+ import './types-CJFViL6Q.js';
2
3
 
3
4
  interface MachineConfig<S extends string, E extends string, C extends object = Record<string, unknown>> {
4
5
  initial: S;
@@ -36,10 +37,10 @@ declare function machine<S extends string, E extends string, C extends object =
36
37
  * @param key Storage key
37
38
  * @param initial Default value when no persisted value exists
38
39
  * @param options Storage options
39
- * @returns The same `[getter, setter]` tuple as `signal()`. For localStorage
40
- * (cross-tab sync on), the setter additionally carries a non-enumerable
41
- * `dispose()` method — call `setter.dispose()` on unmount to remove the
42
- * `storage` event listener; otherwise it lives for the page's lifetime.
40
+ * @returns The same `[getter, setter]` tuple as `signal()`. The setter also
41
+ * carries a non-enumerable `dispose()` method — call `setter.dispose()` on
42
+ * unmount to stop persisting and remove the cross-tab `storage` listener;
43
+ * otherwise both live for the page's lifetime.
43
44
  *
44
45
  * @example
45
46
  * ```ts
@@ -94,15 +95,21 @@ interface PersistOptions<T = unknown> {
94
95
  * Must be synchronous — see `encrypt` docs. */
95
96
  decrypt?: (value: string) => string;
96
97
  }
98
+ /** Setter returned by {@link persisted}: writes like a `signal()` setter, released with `dispose()`. */
99
+ type PersistedSetter<T> = ((next: T | ((prev: T) => T)) => void) & {
100
+ /** Stop persisting changes and remove the cross-tab `storage` listener. */
101
+ dispose(): void;
102
+ };
97
103
  /**
98
104
  * A signal mirrored into persistent storage, rehydrated on creation.
99
105
  *
100
106
  * @param key Storage key.
101
107
  * @param initial Value used when storage holds nothing (or holds junk).
102
108
  * @param options Storage backend, serializer and version/migration settings.
103
- * @returns A `[accessor, setter]` pair with the same shape as `signal`.
109
+ * @returns A `[accessor, setter]` pair with the same shape as `signal`; the
110
+ * setter carries `dispose()`.
104
111
  */
105
- declare function persisted<T>(key: string, initial: T, options?: PersistOptions<T>): [() => T, (next: T | ((prev: T) => T)) => void];
112
+ declare function persisted<T>(key: string, initial: T, options?: PersistOptions<T>): [() => T, PersistedSetter<T>];
106
113
 
107
114
  /**
108
115
  * optimistic provides optimistic UI updates that can be reverted on failure.
@@ -210,10 +217,22 @@ interface TimeTravelReturn<T> {
210
217
  }
211
218
  /**
212
219
  * timeline wraps a state value with undo/redo history.
220
+ *
221
+ * @param maxHistory How many entries (including the current one) to keep. Must
222
+ * be a positive safe integer — `0`, negative, fractional, `NaN` or infinite
223
+ * capacities throw a `RangeError`, since they would evict the current value
224
+ * and break the index invariant.
213
225
  */
214
226
  declare function timeline<T>(initial: T, maxHistory?: number): TimeTravelReturn<T>;
215
227
 
216
- type Middleware<S> = (state: S, action: string, payload: unknown, next: () => void) => void;
228
+ /**
229
+ * Store middleware. Call `next()` once to continue the chain — synchronously or
230
+ * later (after an `await`, from a timer). A middleware may be `async`: a
231
+ * rejection is reported through the runtime error handler, and a middleware
232
+ * that fails (throws, or rejects) before calling `next()` never continues —
233
+ * a later `next()` from it is ignored.
234
+ */
235
+ type Middleware<S> = (state: S, action: string, payload: unknown, next: () => void) => void | PromiseLike<void>;
217
236
  type Selector<S, R> = (state: S) => R;
218
237
  /**
219
238
  * Action-map constraint.
@@ -247,4 +266,4 @@ declare function globalStore<S extends object, A extends StoreActionMap<S>>(conf
247
266
  middleware?: Middleware<S>[];
248
267
  }): GlobalStore<S, A>;
249
268
 
250
- export { type GlobalStore, type MachineConfig, type MachineReturn, type Middleware, type PersistOptions, type Selector, type StoreActionMap, type TimeTravelReturn, globalStore, machine, optimistic, optimisticList, persisted, timeline };
269
+ export { type GlobalStore, type MachineConfig, type MachineReturn, type Middleware, type PersistOptions, type PersistedSetter, type Selector, type StoreActionMap, type TimeTravelReturn, globalStore, machine, optimistic, optimisticList, persisted, timeline };
package/dist/patterns.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  optimisticList,
6
6
  persisted,
7
7
  timeline
8
- } from "./chunk-VZKNK2V7.js";
8
+ } from "./chunk-XZR4PXRE.js";
9
9
  import {
10
10
  RenderProp,
11
11
  assertType,
@@ -21,14 +21,14 @@ import {
21
21
  withDefaults,
22
22
  withProps,
23
23
  withWrapper
24
- } from "./chunk-R25EFXXC.js";
24
+ } from "./chunk-TUCPL2HB.js";
25
25
  import "./chunk-H3SRKIYX.js";
26
- import "./chunk-RBTPLM32.js";
27
- import "./chunk-RIXRAYIU.js";
28
- import "./chunk-5DXA2J44.js";
29
- import "./chunk-XZZOBQAY.js";
30
- import "./chunk-UGRX3S57.js";
31
- import "./chunk-2WLZ6757.js";
26
+ import "./chunk-RUSSKG6G.js";
27
+ import "./chunk-WEQ3DMVL.js";
28
+ import "./chunk-7XHATCIH.js";
29
+ import "./chunk-FQRUXCEE.js";
30
+ import "./chunk-JWKYU5GV.js";
31
+ import "./chunk-NYNYSPK7.js";
32
32
  export {
33
33
  RenderProp,
34
34
  assertType,