sibujs 1.0.0 → 1.0.2

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 (52) hide show
  1. package/dist/browser.js +4 -3
  2. package/dist/build.cjs +11 -3
  3. package/dist/build.js +10 -9
  4. package/dist/cdn.global.js +4 -4
  5. package/dist/chunk-24WSRM54.js +2002 -0
  6. package/dist/chunk-3CRQALYP.js +877 -0
  7. package/dist/chunk-6HLLIF3K.js +398 -0
  8. package/dist/chunk-7TQKR4PP.js +294 -0
  9. package/dist/chunk-CZUGLNJS.js +37 -0
  10. package/dist/chunk-DTCOOBMX.js +725 -0
  11. package/dist/chunk-FGOEVHY3.js +60 -0
  12. package/dist/chunk-HGMJFBC7.js +654 -0
  13. package/dist/chunk-HS6OOE3Q.js +365 -0
  14. package/dist/chunk-L36YN45V.js +949 -0
  15. package/dist/chunk-MJ4LVHGX.js +712 -0
  16. package/dist/chunk-N6IZB6KJ.js +567 -0
  17. package/dist/chunk-NMRUZALC.js +1097 -0
  18. package/dist/chunk-OHQQWZ7P.js +969 -0
  19. package/dist/chunk-ONCYDOK6.js +466 -0
  20. package/dist/chunk-OWLQ4HZI.js +282 -0
  21. package/dist/chunk-PZEGYCF5.js +61 -0
  22. package/dist/chunk-QVKGGB2S.js +300 -0
  23. package/dist/chunk-SDLZDHKP.js +107 -0
  24. package/dist/chunk-Y6GP4QGG.js +276 -0
  25. package/dist/chunk-YECR7UIA.js +347 -0
  26. package/dist/chunk-Z65KYU7I.js +26 -0
  27. package/dist/data.cjs +24 -4
  28. package/dist/data.js +6 -5
  29. package/dist/devtools.cjs +1 -1
  30. package/dist/devtools.js +4 -3
  31. package/dist/ecosystem.cjs +9 -2
  32. package/dist/ecosystem.js +7 -6
  33. package/dist/extras.cjs +68 -24
  34. package/dist/extras.js +21 -20
  35. package/dist/index.cjs +11 -3
  36. package/dist/index.js +10 -9
  37. package/dist/motion.js +3 -2
  38. package/dist/patterns.cjs +7 -2
  39. package/dist/patterns.d.cts +15 -0
  40. package/dist/patterns.d.ts +15 -0
  41. package/dist/patterns.js +5 -4
  42. package/dist/performance.js +3 -2
  43. package/dist/plugins.cjs +65 -29
  44. package/dist/plugins.js +9 -8
  45. package/dist/ssr-WKUPVSSK.js +36 -0
  46. package/dist/ssr.cjs +60 -41
  47. package/dist/ssr.d.cts +9 -3
  48. package/dist/ssr.d.ts +9 -3
  49. package/dist/ssr.js +8 -7
  50. package/dist/ui.js +6 -5
  51. package/dist/widgets.js +5 -4
  52. package/package.json +1 -1
package/dist/ssr.d.cts CHANGED
@@ -108,7 +108,7 @@ declare function ssrSuspense(props: {
108
108
  * Generate an inline script that swaps a suspense fallback with resolved content.
109
109
  * The id is escaped for both JS string and HTML attribute contexts to prevent injection.
110
110
  */
111
- declare function suspenseSwapScript(id: string): string;
111
+ declare function suspenseSwapScript(id: string, nonce?: string): string;
112
112
  /**
113
113
  * Renders a component tree with suspense boundaries as a stream.
114
114
  * Yields the main tree HTML first (including fallback content for suspended
@@ -123,11 +123,17 @@ declare function renderToSuspenseStream(element: HTMLElement | DocumentFragment
123
123
  * The serialized data is embedded in the document and picked up
124
124
  * on the client with `deserializeState()`.
125
125
  */
126
- declare function serializeState(state: Record<string, unknown>): string;
126
+ declare function serializeState(state: Record<string, unknown>, nonce?: string): string;
127
127
  /**
128
128
  * Retrieve state that was embedded by `serializeState()` during SSR.
129
+ *
130
+ * When a `validate` function is provided, it acts as a type guard —
131
+ * only data that passes validation is returned. This prevents
132
+ * tampered SSR payloads from being trusted by the client.
133
+ *
134
+ * @param validate Optional type guard to verify data integrity
129
135
  */
130
- declare function deserializeState<T = Record<string, unknown>>(): T | undefined;
136
+ declare function deserializeState<T = Record<string, unknown>>(validate?: (data: unknown) => data is T): T | undefined;
131
137
 
132
138
  interface UseWorkerReturn<TInput, TOutput> {
133
139
  post(data: TInput): void;
package/dist/ssr.d.ts CHANGED
@@ -108,7 +108,7 @@ declare function ssrSuspense(props: {
108
108
  * Generate an inline script that swaps a suspense fallback with resolved content.
109
109
  * The id is escaped for both JS string and HTML attribute contexts to prevent injection.
110
110
  */
111
- declare function suspenseSwapScript(id: string): string;
111
+ declare function suspenseSwapScript(id: string, nonce?: string): string;
112
112
  /**
113
113
  * Renders a component tree with suspense boundaries as a stream.
114
114
  * Yields the main tree HTML first (including fallback content for suspended
@@ -123,11 +123,17 @@ declare function renderToSuspenseStream(element: HTMLElement | DocumentFragment
123
123
  * The serialized data is embedded in the document and picked up
124
124
  * on the client with `deserializeState()`.
125
125
  */
126
- declare function serializeState(state: Record<string, unknown>): string;
126
+ declare function serializeState(state: Record<string, unknown>, nonce?: string): string;
127
127
  /**
128
128
  * Retrieve state that was embedded by `serializeState()` during SSR.
129
+ *
130
+ * When a `validate` function is provided, it acts as a type guard —
131
+ * only data that passes validation is returned. This prevents
132
+ * tampered SSR payloads from being trusted by the client.
133
+ *
134
+ * @param validate Optional type guard to verify data integrity
129
135
  */
130
- declare function deserializeState<T = Record<string, unknown>>(): T | undefined;
136
+ declare function deserializeState<T = Record<string, unknown>>(validate?: (data: unknown) => data is T): T | undefined;
131
137
 
132
138
  interface UseWorkerReturn<TInput, TOutput> {
133
139
  post(data: TInput): void;
package/dist/ssr.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  wasm,
23
23
  worker,
24
24
  workerFn
25
- } from "./chunk-FYIGTFXO.js";
25
+ } from "./chunk-MJ4LVHGX.js";
26
26
  import {
27
27
  collectStream,
28
28
  deserializeState,
@@ -39,13 +39,14 @@ import {
39
39
  serializeState,
40
40
  ssrSuspense,
41
41
  suspenseSwapScript
42
- } from "./chunk-UATXXETW.js";
43
- import "./chunk-MGYRVG2A.js";
44
- import "./chunk-LHNJSLC6.js";
45
- import "./chunk-NMTRH4Q3.js";
46
- import "./chunk-OZS4YOOP.js";
42
+ } from "./chunk-7TQKR4PP.js";
43
+ import "./chunk-OWLQ4HZI.js";
44
+ import "./chunk-QVKGGB2S.js";
45
+ import "./chunk-SDLZDHKP.js";
46
+ import "./chunk-PZEGYCF5.js";
47
47
  import "./chunk-CHJ27IGK.js";
48
- import "./chunk-KKUV25KB.js";
48
+ import "./chunk-YECR7UIA.js";
49
+ import "./chunk-4MYMUBRS.js";
49
50
  import "./chunk-MLKGABMK.js";
50
51
  export {
51
52
  Head,
package/dist/ui.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  toast,
37
37
  withScopedStyle,
38
38
  zipMask
39
- } from "./chunk-DB243LB7.js";
39
+ } from "./chunk-3CRQALYP.js";
40
40
  import {
41
41
  RenderProp,
42
42
  assertType,
@@ -54,13 +54,14 @@ import {
54
54
  withProps,
55
55
  withWrapper
56
56
  } from "./chunk-XYU6TZOW.js";
57
- import "./chunk-NMTRH4Q3.js";
58
- import "./chunk-SU63HSUU.js";
57
+ import "./chunk-SDLZDHKP.js";
58
+ import "./chunk-FGOEVHY3.js";
59
59
  import {
60
60
  effect
61
- } from "./chunk-OZS4YOOP.js";
61
+ } from "./chunk-PZEGYCF5.js";
62
62
  import "./chunk-CHJ27IGK.js";
63
- import "./chunk-KKUV25KB.js";
63
+ import "./chunk-YECR7UIA.js";
64
+ import "./chunk-4MYMUBRS.js";
64
65
  import "./chunk-MLKGABMK.js";
65
66
 
66
67
  // src/ui/lazyEffect.ts
package/dist/widgets.js CHANGED
@@ -8,11 +8,12 @@ import {
8
8
  select,
9
9
  tabs,
10
10
  tooltip
11
- } from "./chunk-2GLUWW3D.js";
12
- import "./chunk-MBINISSE.js";
13
- import "./chunk-SU63HSUU.js";
11
+ } from "./chunk-N6IZB6KJ.js";
12
+ import "./chunk-CZUGLNJS.js";
13
+ import "./chunk-FGOEVHY3.js";
14
14
  import "./chunk-CHJ27IGK.js";
15
- import "./chunk-KKUV25KB.js";
15
+ import "./chunk-YECR7UIA.js";
16
+ import "./chunk-4MYMUBRS.js";
16
17
  import "./chunk-MLKGABMK.js";
17
18
  export {
18
19
  accordion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sibujs",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A lightweight, function-based frontend framework that combines the best of React, Svelte, and Vue — with zero VDOM and maximum simplicity. Designed for developers who want fine-grained reactivity and full control without compilation or magic.",
5
5
  "keywords": [
6
6
  "frontend",