frosty 0.0.36 → 0.0.38

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 (77) hide show
  1. package/dist/_native.d.ts +3 -3
  2. package/dist/_native.js +5 -4
  3. package/dist/_native.js.map +1 -1
  4. package/dist/_native.mjs +4 -4
  5. package/dist/dom.d.ts +4 -3
  6. package/dist/dom.js +4 -6
  7. package/dist/dom.js.map +1 -1
  8. package/dist/dom.mjs +4 -6
  9. package/dist/dom.mjs.map +1 -1
  10. package/dist/index.d.ts +5 -50
  11. package/dist/index.js +109 -77
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +99 -62
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/internals/{common-BOZ7LFsB.mjs → common-CFQAs-2w.mjs} +10 -6
  16. package/dist/internals/{common-BOZ7LFsB.mjs.map → common-CFQAs-2w.mjs.map} +1 -1
  17. package/dist/internals/{common-oNHXt-X6.d.ts → common-CUIKizze.d.ts} +6 -6
  18. package/dist/internals/common-CUIKizze.d.ts.map +1 -0
  19. package/dist/internals/{common-CjVBgVnj.js → common-P_QiOxQQ.js} +11 -7
  20. package/dist/internals/{common-CjVBgVnj.js.map → common-P_QiOxQQ.js.map} +1 -1
  21. package/dist/internals/{common-BLDQwvsd.d.ts → common-k6qbeyHu.d.ts} +7 -4
  22. package/dist/internals/common-k6qbeyHu.d.ts.map +1 -0
  23. package/dist/internals/{runtime-PKOt40BM.js → component-BiP3XIPe.js} +1 -33
  24. package/dist/internals/component-BiP3XIPe.js.map +1 -0
  25. package/dist/internals/{runtime-DrGYUphO.mjs → component-BzurKp_J.mjs} +2 -32
  26. package/dist/internals/component-BzurKp_J.mjs.map +1 -0
  27. package/dist/internals/{fragment-BkyAEmoa.d.ts → fragment-50WCFjrW.d.ts} +2 -2
  28. package/dist/internals/fragment-50WCFjrW.d.ts.map +1 -0
  29. package/dist/internals/{renderer-BIGBfQIc.mjs → renderer-ClDlweEF.mjs} +3 -3
  30. package/dist/internals/{renderer-BIGBfQIc.mjs.map → renderer-ClDlweEF.mjs.map} +1 -1
  31. package/dist/internals/{renderer-Bmw8wKAf.d.ts → renderer-DPoACdip.d.ts} +2 -2
  32. package/dist/internals/renderer-DPoACdip.d.ts.map +1 -0
  33. package/dist/internals/{renderer-Ds5Glygc.js → renderer-a9zN1_RB.js} +12 -12
  34. package/dist/internals/{renderer-Ds5Glygc.js.map → renderer-a9zN1_RB.js.map} +1 -1
  35. package/dist/internals/runtime-DCKT7fd6.js +37 -0
  36. package/dist/internals/runtime-DCKT7fd6.js.map +1 -0
  37. package/dist/internals/runtime-DK28Kyy2.mjs +34 -0
  38. package/dist/internals/runtime-DK28Kyy2.mjs.map +1 -0
  39. package/dist/internals/{state-CK2bzUOk.mjs → state-5PNx91ec.mjs} +3 -3
  40. package/dist/internals/{state-CK2bzUOk.mjs.map → state-5PNx91ec.mjs.map} +1 -1
  41. package/dist/internals/{state-CKAt_mTM.js → state-Lf_tbWNd.js} +4 -4
  42. package/dist/internals/{state-CKAt_mTM.js.map → state-Lf_tbWNd.js.map} +1 -1
  43. package/dist/internals/{sync-CyAho2g-.mjs → sync-C4RmxDzS.mjs} +99 -4
  44. package/dist/internals/sync-C4RmxDzS.mjs.map +1 -0
  45. package/dist/internals/{sync-w9XkAX8E.js → sync-e3464vDv.js} +105 -7
  46. package/dist/internals/sync-e3464vDv.js.map +1 -0
  47. package/dist/internals/{utils--X3fYqdu.d.ts → utils-DWp2-G3N.d.ts} +2 -2
  48. package/dist/internals/utils-DWp2-G3N.d.ts.map +1 -0
  49. package/dist/jsx-runtime.d.ts +2 -2
  50. package/dist/jsx-runtime.js +3 -2
  51. package/dist/jsx-runtime.js.map +1 -1
  52. package/dist/jsx-runtime.mjs +2 -1
  53. package/dist/jsx-runtime.mjs.map +1 -1
  54. package/dist/server-dom.d.ts +3 -3
  55. package/dist/server-dom.js +5 -7
  56. package/dist/server-dom.js.map +1 -1
  57. package/dist/server-dom.mjs +5 -7
  58. package/dist/server-dom.mjs.map +1 -1
  59. package/dist/web.d.ts +7 -5
  60. package/dist/web.js +18 -8
  61. package/dist/web.js.map +1 -1
  62. package/dist/web.mjs +18 -9
  63. package/dist/web.mjs.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/internals/common-BLDQwvsd.d.ts.map +0 -1
  66. package/dist/internals/common-oNHXt-X6.d.ts.map +0 -1
  67. package/dist/internals/error-BT7hiUUR.mjs +0 -193
  68. package/dist/internals/error-BT7hiUUR.mjs.map +0 -1
  69. package/dist/internals/error-Cbb2rheX.js +0 -201
  70. package/dist/internals/error-Cbb2rheX.js.map +0 -1
  71. package/dist/internals/fragment-BkyAEmoa.d.ts.map +0 -1
  72. package/dist/internals/renderer-Bmw8wKAf.d.ts.map +0 -1
  73. package/dist/internals/runtime-DrGYUphO.mjs.map +0 -1
  74. package/dist/internals/runtime-PKOt40BM.js.map +0 -1
  75. package/dist/internals/sync-CyAho2g-.mjs.map +0 -1
  76. package/dist/internals/sync-w9XkAX8E.js.map +0 -1
  77. package/dist/internals/utils--X3fYqdu.d.ts.map +0 -1
@@ -1,8 +1,68 @@
1
1
  'use strict';
2
2
 
3
3
  var _ = require('lodash');
4
- var error = require('./error-Cbb2rheX.js');
5
- var state = require('./state-CKAt_mTM.js');
4
+ var state = require('./state-Lf_tbWNd.js');
5
+
6
+ //
7
+ // index.ts
8
+ //
9
+ // The MIT License
10
+ // Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
11
+ //
12
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ // of this software and associated documentation files (the "Software"), to deal
14
+ // in the Software without restriction, including without limitation the rights
15
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ // copies of the Software, and to permit persons to whom the Software is
17
+ // furnished to do so, subject to the following conditions:
18
+ //
19
+ // The above copyright notice and this permission notice shall be included in
20
+ // all copies or substantial portions of the Software.
21
+ //
22
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
+ // THE SOFTWARE.
29
+ //
30
+ const _useHookState = (hook) => {
31
+ const state$1 = state.reconciler.currentHookState;
32
+ if (!state$1)
33
+ throw Error(`${hook} must be used within a render function.`);
34
+ const { prevState, state: newState } = state$1;
35
+ if (prevState && prevState[newState.length]?.hook !== hook) {
36
+ console.warn([
37
+ `Hook "${hook}" is called conditionally.`,
38
+ 'Hooks must be called in the exact same order in every component render.',
39
+ 'Did you accidentally call a hook after an early return?'
40
+ ].join(' '));
41
+ }
42
+ return state$1;
43
+ };
44
+ const _useEffect = (hook, effect, deps) => {
45
+ const state = _useHookState(hook);
46
+ const { state: newState } = state;
47
+ newState.push({
48
+ mount: () => effect(state),
49
+ deps,
50
+ hook,
51
+ });
52
+ };
53
+ const _useMemo = (hook, factory, deps) => {
54
+ const state$1 = _useHookState(hook);
55
+ const { prevState, state: newState } = state$1;
56
+ const idx = newState.length;
57
+ const changed = prevState?.[idx]?.hook !== hook || !state.equalDeps(prevState[idx].deps, deps);
58
+ const data = changed ? factory(state$1) : prevState[idx].data;
59
+ newState.push({
60
+ deps,
61
+ hook,
62
+ data
63
+ });
64
+ return data;
65
+ };
6
66
 
7
67
  //
8
68
  // memo.ts
@@ -48,8 +108,8 @@ var state = require('./state-CKAt_mTM.js');
48
108
  */
49
109
  const useCallback = (callback, deps) => {
50
110
  if (!_.isUndefined(deps))
51
- return error._useMemo('useCallback', callback, deps);
52
- const store = error._useMemo('useCallback', () => {
111
+ return _useMemo('useCallback', callback, deps);
112
+ const store = _useMemo('useCallback', () => {
53
113
  const store = {
54
114
  current: callback,
55
115
  stable: (...args) => store.current(...args),
@@ -113,7 +173,7 @@ const useCallback = (callback, deps) => {
113
173
  * };
114
174
  * }, []);
115
175
  */
116
- const useEffect = (effect, deps) => error._useEffect('useEffect', () => {
176
+ const useEffect = (effect, deps) => _useEffect('useEffect', () => {
117
177
  const abort = new AbortController();
118
178
  try {
119
179
  const destructor = effect(abort.signal);
@@ -137,6 +197,41 @@ const useEffect = (effect, deps) => error._useEffect('useEffect', () => {
137
197
  }
138
198
  }, deps);
139
199
 
200
+ //
201
+ // memo.ts
202
+ //
203
+ // The MIT License
204
+ // Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
205
+ //
206
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
207
+ // of this software and associated documentation files (the "Software"), to deal
208
+ // in the Software without restriction, including without limitation the rights
209
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
210
+ // copies of the Software, and to permit persons to whom the Software is
211
+ // furnished to do so, subject to the following conditions:
212
+ //
213
+ // The above copyright notice and this permission notice shall be included in
214
+ // all copies or substantial portions of the Software.
215
+ //
216
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
217
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
218
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
219
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
220
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
221
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
222
+ // THE SOFTWARE.
223
+ //
224
+ /**
225
+ * A utility function that memoizes the result of a factory function.
226
+ *
227
+ * @template T The type of the value returned by the factory function.
228
+ * @param factory A function that produces a value to be memoized.
229
+ * @param deps An optional dependency array. The memoized value is recalculated
230
+ * only when the dependencies change.
231
+ * @returns The memoized value produced by the factory function.
232
+ */
233
+ const useMemo = (factory, deps) => _useMemo('useMemo', factory, deps);
234
+
140
235
  //
141
236
  // sync.ts
142
237
  //
@@ -180,7 +275,7 @@ const useSyncExternalStore = (subscribe, getSnapshot, getServerSnapshot) => {
180
275
  const state$1 = state.reconciler.currentHookState;
181
276
  if (!state$1)
182
277
  throw Error('useSyncExternalStore must be used within a render function.');
183
- error._useEffect('useSyncExternalStore', ({ node }) => {
278
+ _useEffect('useSyncExternalStore', ({ node }) => {
184
279
  const abort = new AbortController();
185
280
  try {
186
281
  const destructor = subscribe(() => { node?._setDirty(); }, abort.signal);
@@ -209,7 +304,10 @@ const useSyncExternalStore = (subscribe, getSnapshot, getServerSnapshot) => {
209
304
  return getSnapshot();
210
305
  };
211
306
 
307
+ exports._useEffect = _useEffect;
308
+ exports._useMemo = _useMemo;
212
309
  exports.useCallback = useCallback;
213
310
  exports.useEffect = useEffect;
311
+ exports.useMemo = useMemo;
214
312
  exports.useSyncExternalStore = useSyncExternalStore;
215
- //# sourceMappingURL=sync-w9XkAX8E.js.map
313
+ //# sourceMappingURL=sync-e3464vDv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-e3464vDv.js","sources":["../../../src/core/reconciler/hooks.ts","../../../src/core/hooks/callback.ts","../../../src/core/hooks/effect.ts","../../../src/core/hooks/memo.ts","../../../src/core/hooks/sync.ts"],"sourcesContent":["//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { reconciler } from './state';\nimport { equalDeps } from './utils';\n\nconst _useHookState = (hook: string) => {\n const state = reconciler.currentHookState;\n if (!state) throw Error(`${hook} must be used within a render function.`);\n const { prevState, state: newState } = state;\n if (prevState && prevState[newState.length]?.hook !== hook) {\n console.warn([\n `Hook \"${hook}\" is called conditionally.`,\n 'Hooks must be called in the exact same order in every component render.',\n 'Did you accidentally call a hook after an early return?'\n ].join(' '));\n }\n return state;\n};\n\nexport const _useEffect = (\n hook: string,\n effect: (state: ReturnType<typeof _useHookState>) => () => void,\n deps?: any\n) => {\n const state = _useHookState(hook);\n const { state: newState } = state;\n newState.push({\n mount: () => effect(state),\n deps,\n hook,\n });\n};\n\nexport const _useMemo = <T>(\n hook: string,\n factory: (state: ReturnType<typeof _useHookState>) => T,\n deps?: any\n): T => {\n const state = _useHookState(hook);\n const { prevState, state: newState } = state;\n const idx = newState.length;\n const changed = prevState?.[idx]?.hook !== hook || !equalDeps(prevState[idx].deps, deps);\n const data = changed ? factory(state) : prevState[idx].data;\n newState.push({\n deps,\n hook,\n data\n });\n return data;\n};\n","//\n// memo.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { _useMemo } from '../reconciler/hooks';\n\n/**\n * A hook that memoizes a callback function, ensuring that it only changes\n * if its dependencies change. This is useful for optimizing performance by preventing\n * unnecessary re-creations of functions.\n *\n * @template T - The type of the callback function.\n * @param callback - The callback function to be memoized.\n * @param deps - An optional dependencies. If provided, the callback\n * will only be updated when one of these dependencies changes.\n * If not provided, the callback will remain stable.\n * @returns - A stable version of the callback function that will not change unless\n * its dependencies change.\n *\n * @example\n * const memoizedCallback = useCallback(() => {\n * console.log('This function is memoized!');\n * }, [dependency]);\n */\nexport const useCallback = <T extends (...args: any) => any>(\n callback: T,\n deps?: any\n): T => {\n if (!_.isUndefined(deps)) return _useMemo('useCallback', callback, deps);\n const store = _useMemo('useCallback', () => {\n const store = {\n current: callback,\n stable: (...args: Parameters<T>): ReturnType<T> => store.current(...args),\n };\n return store;\n }, null);\n store.current = callback;\n return store.stable as T;\n}\n","//\n// effect.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { Awaitable } from '@o2ter/utils-js';\nimport { _useEffect } from '../reconciler/hooks';\n\n/**\n * A hook that manages side effects with support for an `AbortSignal`.\n * It ensures proper cleanup logic and handles asynchronous operations effectively.\n *\n * @param effect - \n * A function that receives an `AbortSignal` and performs side effects. \n * It can optionally return a cleanup function or a promise that resolves to a cleanup function.\n *\n * @param deps - \n * An optional dependencies that determines when the effect should be re-executed.\n *\n * @example\n * useEffect((signal) => {\n * fetch('/api/data', { signal })\n * .then(response => response.json())\n * .then(data => console.log(data))\n * .catch(err => {\n * if (err.name === 'AbortError') {\n * console.log('Fetch aborted');\n * } else {\n * console.error(err);\n * }\n * });\n * \n * return () => {\n * console.log('Cleanup logic here');\n * };\n * }, []);\n */\nexport const useEffect = (\n effect: (\n signal: AbortSignal,\n ) => Awaitable<void | (() => Awaitable<void>)>,\n deps?: any,\n) => _useEffect('useEffect', () => {\n const abort = new AbortController();\n try {\n const destructor = effect(abort.signal);\n return () => {\n abort.abort();\n (async () => {\n try {\n const _destructor = await destructor;\n if (_.isFunction(_destructor)) _destructor();\n } catch (e) {\n console.error(e);\n }\n })();\n };\n } catch (e) {\n console.error(e);\n return () => abort.abort();\n }\n}, deps);","//\n// memo.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { _useMemo } from '../reconciler/hooks';\n\n/**\n * A utility function that memoizes the result of a factory function.\n * \n * @template T The type of the value returned by the factory function.\n * @param factory A function that produces a value to be memoized.\n * @param deps An optional dependency array. The memoized value is recalculated \n * only when the dependencies change.\n * @returns The memoized value produced by the factory function.\n */\nexport const useMemo = <T>(\n factory: () => T,\n deps?: any,\n) => _useMemo('useMemo', factory, deps);\n","//\n// sync.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { Awaitable } from '@o2ter/utils-js';\nimport { _useEffect } from '../reconciler/hooks';\nimport { reconciler } from '../reconciler/state';\n\n/**\n * A hook utility for synchronizing with an external store.\n *\n * @template Snapshot - The type of the snapshot returned by the store.\n * @param subscribe - A function that sets up a subscription to the external store.\n * - `onStoreChange`: A callback to invoke when the store changes.\n * - `signal`: An `AbortSignal` to handle cleanup when the subscription is no longer needed.\n * - Returns an optional cleanup function or a promise resolving to one.\n * @param getSnapshot - A function that retrieves the current snapshot of the store.\n * @param getServerSnapshot - (Optional) A function that retrieves the snapshot of the store\n * in a server environment.\n * @returns The current snapshot of the store.\n *\n * @throws Will throw an error if used outside of a valid render context.\n */\nexport const useSyncExternalStore = <Snapshot>(\n subscribe: (\n onStoreChange: () => void,\n signal: AbortSignal,\n ) => Awaitable<void | (() => Awaitable<void>)>,\n getSnapshot: () => Snapshot,\n getServerSnapshot?: () => Snapshot,\n) => {\n const state = reconciler.currentHookState;\n if (!state) throw Error('useSyncExternalStore must be used within a render function.');\n _useEffect('useSyncExternalStore', ({ node }) => {\n const abort = new AbortController();\n try {\n const destructor = subscribe(() => { node?._setDirty(); }, abort.signal);\n return () => {\n abort.abort();\n (async () => {\n try {\n const _destructor = await destructor;\n if (_.isFunction(_destructor)) _destructor();\n } catch (e) {\n console.error(e);\n }\n })();\n };\n } catch (e) {\n console.error(e);\n return () => abort.abort();\n }\n }, null);\n if (getServerSnapshot && state.renderer._server) {\n return getServerSnapshot();\n }\n return getSnapshot();\n};"],"names":["state","reconciler","equalDeps"],"mappings":"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"}
@@ -1,7 +1,7 @@
1
- import { a as Ref } from './common-oNHXt-X6.js';
1
+ import { a as Ref } from './common-CUIKizze.js';
2
2
 
3
3
  declare const mergeRefs: <T>(...refs: Ref<T>[]) => (x: T) => void;
4
4
  declare const uniqueId: () => string;
5
5
 
6
6
  export { mergeRefs as m, uniqueId as u };
7
- //# sourceMappingURL=utils--X3fYqdu.d.ts.map
7
+ //# sourceMappingURL=utils-DWp2-G3N.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-DWp2-G3N.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
- import { l as _IntrinsicElements, m as _IntrinsicAttributes, _ as _ElementType, b as ComponentNode, c as PropsType } from './internals/common-oNHXt-X6.js';
2
- export { F as Fragment } from './internals/fragment-BkyAEmoa.js';
1
+ import { n as _IntrinsicElements, o as _IntrinsicAttributes, _ as _ElementType, b as ComponentNode, c as PropsType } from './internals/common-CUIKizze.js';
2
+ export { F as Fragment } from './internals/fragment-50WCFjrW.js';
3
3
  import '@o2ter/utils-js';
4
4
  import 'lodash';
5
5
  import 'csstype';
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var runtime = require('./internals/runtime-PKOt40BM.js');
3
+ var component = require('./internals/component-BiP3XIPe.js');
4
+ var runtime = require('./internals/runtime-DCKT7fd6.js');
4
5
 
5
6
  //
6
7
  // index.ts
@@ -55,7 +56,7 @@ const Fragment = ({ children }) => {
55
56
  // THE SOFTWARE.
56
57
  //
57
58
  const JSX = Object.freeze({
58
- Element: runtime.ComponentNode,
59
+ Element: component.ComponentNode,
59
60
  });
60
61
  function jsx(type, props, key) {
61
62
  return runtime._createElement(type, { ...props, key });
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.js","sources":["../../src/core/types/fragment.ts","../../src/jsx-runtime.ts"],"sourcesContent":["//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport { ComponentType, PropsWithChildren } from './common';\n\nexport const Fragment: ComponentType<PropsWithChildren<{}>> = ({ children }) => {\n return children;\n}\n","//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport { ComponentNode } from './core/types/component';\nimport { _createElement, _ElementType, _IntrinsicAttributes, _IntrinsicElements, PropsType } from './core/types/runtime';\n\nexport { Fragment } from './core/types/fragment';\n\nexport declare namespace JSX {\n type IntrinsicElements = _IntrinsicElements;\n type IntrinsicAttributes = _IntrinsicAttributes;\n type ElementType = _ElementType;\n type Element = ComponentNode;\n type ElementChildrenAttribute = { children: {}; };\n};\n\nexport const JSX = Object.freeze({\n Element: ComponentNode,\n});\n\nexport function jsx(\n type: _ElementType,\n props: PropsType,\n key?: string | number\n): ComponentNode {\n return _createElement(type, { ...props, key });\n}\n\nexport const jsxs = jsx;\n"],"names":["ComponentNode","_createElement"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MAIa,QAAQ,GAAyC,CAAC,EAAE,QAAQ,EAAE,KAAI;AAC7E,IAAA,OAAO,QAAQ;AACjB;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAea,MAAA,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/B,IAAA,OAAO,EAAEA,qBAAa;AACvB,CAAA;SAEe,GAAG,CACjB,IAAkB,EAClB,KAAgB,EAChB,GAAqB,EAAA;IAErB,OAAOC,sBAAc,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC;AAChD;AAEO,MAAM,IAAI,GAAG;;;;;;;"}
1
+ {"version":3,"file":"jsx-runtime.js","sources":["../../src/core/types/fragment.ts","../../src/jsx-runtime.ts"],"sourcesContent":["//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport { ComponentType, PropsWithChildren } from './common';\n\nexport const Fragment: ComponentType<PropsWithChildren<{}>> = ({ children }) => {\n return children;\n}\n","//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport { ComponentNode } from './core/types/component';\nimport { _createElement, _ElementType, _IntrinsicAttributes, _IntrinsicElements, PropsType } from './core/types/runtime';\n\nexport { Fragment } from './core/types/fragment';\n\nexport declare namespace JSX {\n type IntrinsicElements = _IntrinsicElements;\n type IntrinsicAttributes = _IntrinsicAttributes;\n type ElementType = _ElementType;\n type Element = ComponentNode;\n type ElementChildrenAttribute = { children: {}; };\n};\n\nexport const JSX = Object.freeze({\n Element: ComponentNode,\n});\n\nexport function jsx(\n type: _ElementType,\n props: PropsType,\n key?: string | number\n): ComponentNode {\n return _createElement(type, { ...props, key });\n}\n\nexport const jsxs = jsx;\n"],"names":["ComponentNode","_createElement"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MAIa,QAAQ,GAAyC,CAAC,EAAE,QAAQ,EAAE,KAAI;AAC7E,IAAA,OAAO,QAAQ;AACjB;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAea,MAAA,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/B,IAAA,OAAO,EAAEA,uBAAa;AACvB,CAAA;SAEe,GAAG,CACjB,IAAkB,EAClB,KAAgB,EAChB,GAAqB,EAAA;IAErB,OAAOC,sBAAc,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC;AAChD;AAEO,MAAM,IAAI,GAAG;;;;;;;"}
@@ -1,4 +1,5 @@
1
- import { C as ComponentNode, _ as _createElement } from './internals/runtime-DrGYUphO.mjs';
1
+ import { C as ComponentNode } from './internals/component-BzurKp_J.mjs';
2
+ import { _ as _createElement } from './internals/runtime-DK28Kyy2.mjs';
2
3
 
3
4
  //
4
5
  // index.ts
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.mjs","sources":["../../src/core/types/fragment.ts","../../src/jsx-runtime.ts"],"sourcesContent":["//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport { ComponentType, PropsWithChildren } from './common';\n\nexport const Fragment: ComponentType<PropsWithChildren<{}>> = ({ children }) => {\n return children;\n}\n","//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport { ComponentNode } from './core/types/component';\nimport { _createElement, _ElementType, _IntrinsicAttributes, _IntrinsicElements, PropsType } from './core/types/runtime';\n\nexport { Fragment } from './core/types/fragment';\n\nexport declare namespace JSX {\n type IntrinsicElements = _IntrinsicElements;\n type IntrinsicAttributes = _IntrinsicAttributes;\n type ElementType = _ElementType;\n type Element = ComponentNode;\n type ElementChildrenAttribute = { children: {}; };\n};\n\nexport const JSX = Object.freeze({\n Element: ComponentNode,\n});\n\nexport function jsx(\n type: _ElementType,\n props: PropsType,\n key?: string | number\n): ComponentNode {\n return _createElement(type, { ...props, key });\n}\n\nexport const jsxs = jsx;\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MAIa,QAAQ,GAAyC,CAAC,EAAE,QAAQ,EAAE,KAAI;AAC7E,IAAA,OAAO,QAAQ;AACjB;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAea,MAAA,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/B,IAAA,OAAO,EAAE,aAAa;AACvB,CAAA;SAEe,GAAG,CACjB,IAAkB,EAClB,KAAgB,EAChB,GAAqB,EAAA;IAErB,OAAO,cAAc,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC;AAChD;AAEO,MAAM,IAAI,GAAG;;;;"}
1
+ {"version":3,"file":"jsx-runtime.mjs","sources":["../../src/core/types/fragment.ts","../../src/jsx-runtime.ts"],"sourcesContent":["//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport { ComponentType, PropsWithChildren } from './common';\n\nexport const Fragment: ComponentType<PropsWithChildren<{}>> = ({ children }) => {\n return children;\n}\n","//\n// index.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport { ComponentNode } from './core/types/component';\nimport { _createElement, _ElementType, _IntrinsicAttributes, _IntrinsicElements, PropsType } from './core/types/runtime';\n\nexport { Fragment } from './core/types/fragment';\n\nexport declare namespace JSX {\n type IntrinsicElements = _IntrinsicElements;\n type IntrinsicAttributes = _IntrinsicAttributes;\n type ElementType = _ElementType;\n type Element = ComponentNode;\n type ElementChildrenAttribute = { children: {}; };\n};\n\nexport const JSX = Object.freeze({\n Element: ComponentNode,\n});\n\nexport function jsx(\n type: _ElementType,\n props: PropsType,\n key?: string | number\n): ComponentNode {\n return _createElement(type, { ...props, key });\n}\n\nexport const jsxs = jsx;\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MAIa,QAAQ,GAAyC,CAAC,EAAE,QAAQ,EAAE,KAAI;AAC7E,IAAA,OAAO,QAAQ;AACjB;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAea,MAAA,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/B,IAAA,OAAO,EAAE,aAAa;AACvB,CAAA;SAEe,GAAG,CACjB,IAAkB,EAClB,KAAgB,EAChB,GAAqB,EAAA;IAErB,OAAO,cAAc,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC;AAChD;AAEO,MAAM,IAAI,GAAG;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { JSDOM } from 'jsdom';
2
2
  export * from 'jsdom';
3
- import { _ as _DOMRenderer } from './internals/common-BLDQwvsd.js';
4
- import './internals/common-oNHXt-X6.js';
3
+ import { _ as _DOMRenderer } from './internals/common-k6qbeyHu.js';
4
+ import './internals/common-CUIKizze.js';
5
5
  import '@o2ter/utils-js';
6
6
  import 'lodash';
7
7
  import 'csstype';
8
- import './internals/renderer-Bmw8wKAf.js';
8
+ import './internals/renderer-DPoACdip.js';
9
9
 
10
10
  declare class ServerDOMRenderer extends _DOMRenderer {
11
11
  constructor(dom?: JSDOM);
@@ -1,19 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  var jsdom = require('jsdom');
4
- var common = require('./internals/common-CjVBgVnj.js');
4
+ var common = require('./internals/common-P_QiOxQQ.js');
5
5
  require('lodash');
6
6
  require('myers.js');
7
- require('./internals/runtime-PKOt40BM.js');
8
- require('./internals/renderer-Ds5Glygc.js');
9
- require('./internals/state-CKAt_mTM.js');
7
+ require('./internals/component-BiP3XIPe.js');
8
+ require('./internals/renderer-a9zN1_RB.js');
9
+ require('./internals/state-Lf_tbWNd.js');
10
10
  require('nextick');
11
11
  require('postcss');
12
12
  require('postcss-js');
13
13
  require('postcss-nested');
14
14
  require('autoprefixer');
15
- require('./internals/error-Cbb2rheX.js');
16
- require('./jsx-runtime.js');
17
15
 
18
16
  //
19
17
  // dom.ts
@@ -41,7 +39,7 @@ require('./jsx-runtime.js');
41
39
  //
42
40
  class ServerDOMRenderer extends common._DOMRenderer {
43
41
  constructor(dom = new jsdom.JSDOM()) {
44
- super(dom.window.document);
42
+ super(dom.window.document, dom.window);
45
43
  }
46
44
  /** @internal */
47
45
  get _server() {
@@ -1 +1 @@
1
- {"version":3,"file":"server-dom.js","sources":["../../src/renderer/server-dom.ts"],"sourcesContent":["//\n// dom.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { JSDOM } from 'jsdom';\nimport { _DOMRenderer } from './common';\n\nexport * from 'jsdom';\n\nexport class ServerDOMRenderer extends _DOMRenderer {\n\n constructor(dom = new JSDOM()) {\n super(dom.window.document);\n }\n\n /** @internal */\n get _server(): boolean {\n return true;\n }\n}\n"],"names":["_DOMRenderer","JSDOM"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQM,MAAO,iBAAkB,SAAQA,mBAAY,CAAA;AAEjD,IAAA,WAAA,CAAY,GAAG,GAAG,IAAIC,WAAK,EAAE,EAAA;AAC3B,QAAA,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC;;;AAI5B,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI;;AAEd;;;;;;;;;;"}
1
+ {"version":3,"file":"server-dom.js","sources":["../../src/renderer/server-dom.ts"],"sourcesContent":["//\n// dom.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { JSDOM } from 'jsdom';\nimport { _DOMRenderer } from './common';\n\nexport * from 'jsdom';\n\nexport class ServerDOMRenderer extends _DOMRenderer {\n\n constructor(dom = new JSDOM()) {\n super(dom.window.document, dom.window);\n }\n\n /** @internal */\n get _server(): boolean {\n return true;\n }\n}\n"],"names":["_DOMRenderer","JSDOM"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQM,MAAO,iBAAkB,SAAQA,mBAAY,CAAA;AAEjD,IAAA,WAAA,CAAY,GAAG,GAAG,IAAIC,WAAK,EAAE,EAAA;QAC3B,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC;;;AAIxC,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI;;AAEd;;;;;;;;;;"}
@@ -1,18 +1,16 @@
1
1
  import { JSDOM } from 'jsdom';
2
2
  export * from 'jsdom';
3
- import { _ as _DOMRenderer } from './internals/common-BOZ7LFsB.mjs';
3
+ import { _ as _DOMRenderer } from './internals/common-CFQAs-2w.mjs';
4
4
  import 'lodash';
5
5
  import 'myers.js';
6
- import './internals/runtime-DrGYUphO.mjs';
7
- import './internals/renderer-BIGBfQIc.mjs';
8
- import './internals/state-CK2bzUOk.mjs';
6
+ import './internals/component-BzurKp_J.mjs';
7
+ import './internals/renderer-ClDlweEF.mjs';
8
+ import './internals/state-5PNx91ec.mjs';
9
9
  import 'nextick';
10
10
  import 'postcss';
11
11
  import 'postcss-js';
12
12
  import 'postcss-nested';
13
13
  import 'autoprefixer';
14
- import './internals/error-BT7hiUUR.mjs';
15
- import './jsx-runtime.mjs';
16
14
 
17
15
  //
18
16
  // dom.ts
@@ -40,7 +38,7 @@ import './jsx-runtime.mjs';
40
38
  //
41
39
  class ServerDOMRenderer extends _DOMRenderer {
42
40
  constructor(dom = new JSDOM()) {
43
- super(dom.window.document);
41
+ super(dom.window.document, dom.window);
44
42
  }
45
43
  /** @internal */
46
44
  get _server() {
@@ -1 +1 @@
1
- {"version":3,"file":"server-dom.mjs","sources":["../../src/renderer/server-dom.ts"],"sourcesContent":["//\n// dom.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { JSDOM } from 'jsdom';\nimport { _DOMRenderer } from './common';\n\nexport * from 'jsdom';\n\nexport class ServerDOMRenderer extends _DOMRenderer {\n\n constructor(dom = new JSDOM()) {\n super(dom.window.document);\n }\n\n /** @internal */\n get _server(): boolean {\n return true;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQM,MAAO,iBAAkB,SAAQ,YAAY,CAAA;AAEjD,IAAA,WAAA,CAAY,GAAG,GAAG,IAAI,KAAK,EAAE,EAAA;AAC3B,QAAA,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC;;;AAI5B,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI;;AAEd;;;;"}
1
+ {"version":3,"file":"server-dom.mjs","sources":["../../src/renderer/server-dom.ts"],"sourcesContent":["//\n// dom.ts\n//\n// The MIT License\n// Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\nimport _ from 'lodash';\nimport { JSDOM } from 'jsdom';\nimport { _DOMRenderer } from './common';\n\nexport * from 'jsdom';\n\nexport class ServerDOMRenderer extends _DOMRenderer {\n\n constructor(dom = new JSDOM()) {\n super(dom.window.document, dom.window);\n }\n\n /** @internal */\n get _server(): boolean {\n return true;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQM,MAAO,iBAAkB,SAAQ,YAAY,CAAA;AAEjD,IAAA,WAAA,CAAY,GAAG,GAAG,IAAI,KAAK,EAAE,EAAA;QAC3B,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC;;;AAIxC,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI;;AAEd;;;;"}
package/dist/web.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { S as SetStateAction } from './internals/common-oNHXt-X6.js';
2
- export { D as DOMNativeNode, _ as _DOMRenderer } from './internals/common-BLDQwvsd.js';
1
+ import { S as SetStateAction } from './internals/common-CUIKizze.js';
2
+ import * as jsdom from 'jsdom';
3
+ export { D as DOMNativeNode, _ as _DOMRenderer } from './internals/common-k6qbeyHu.js';
3
4
  import '@o2ter/utils-js';
4
5
  import 'lodash';
5
6
  import 'csstype';
6
- import './internals/renderer-Bmw8wKAf.js';
7
+ import './internals/renderer-DPoACdip.js';
7
8
 
8
9
  declare const useDocument: () => Document;
9
10
 
@@ -41,10 +42,10 @@ declare const useLocation: () => {
41
42
  replaceState: (data: any, url?: string | URL | null) => void;
42
43
  search: string;
43
44
  href: string;
45
+ origin: string;
44
46
  hash: string;
45
47
  host: string;
46
48
  hostname: string;
47
- origin: string;
48
49
  pathname: string;
49
50
  port: string;
50
51
  protocol: string;
@@ -77,6 +78,7 @@ declare const useOnline: () => boolean;
77
78
  declare const useLocalStorage: (key: string, initialValue?: string | null) => readonly [string | null, (v: SetStateAction<string | null | undefined>) => void];
78
79
  declare const useSessionStorage: (key: string, initialValue?: string | null) => readonly [string | null, (v: SetStateAction<string | null | undefined>) => void];
79
80
 
81
+ declare const useWindow: () => Window | jsdom.DOMWindow;
80
82
  declare const useWindowMetrics: () => {
81
83
  safeAreaInsets: {
82
84
  top: number;
@@ -96,5 +98,5 @@ declare const useWindowScroll: () => {
96
98
  };
97
99
  declare const useColorScheme: () => string;
98
100
 
99
- export { useColorScheme, useDocument, useIntersectionObserver, useLocalStorage, useLocation, useMutationObserver, useOnline, usePerformanceObserver, useResizeObserver, useSearchParams, useSessionStorage, useWindowMetrics, useWindowScroll };
101
+ export { useColorScheme, useDocument, useIntersectionObserver, useLocalStorage, useLocation, useMutationObserver, useOnline, usePerformanceObserver, useResizeObserver, useSearchParams, useSessionStorage, useWindow, useWindowMetrics, useWindowScroll };
100
102
  //# sourceMappingURL=web.d.ts.map
package/dist/web.js CHANGED
@@ -1,19 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var state = require('./internals/state-CKAt_mTM.js');
4
- var common = require('./internals/common-CjVBgVnj.js');
3
+ var state = require('./internals/state-Lf_tbWNd.js');
4
+ var common = require('./internals/common-P_QiOxQQ.js');
5
5
  var _ = require('lodash');
6
- var error = require('./internals/error-Cbb2rheX.js');
7
- var sync = require('./internals/sync-w9XkAX8E.js');
8
- require('./internals/runtime-PKOt40BM.js');
6
+ var sync = require('./internals/sync-e3464vDv.js');
7
+ require('./internals/component-BiP3XIPe.js');
9
8
  require('myers.js');
10
- require('./internals/renderer-Ds5Glygc.js');
9
+ require('./internals/renderer-a9zN1_RB.js');
11
10
  require('nextick');
12
11
  require('postcss');
13
12
  require('postcss-js');
14
13
  require('postcss-nested');
15
14
  require('autoprefixer');
16
- require('./jsx-runtime.js');
17
15
 
18
16
  //
19
17
  // document.ts
@@ -155,7 +153,7 @@ const useLocation = () => {
155
153
  */
156
154
  const useSearchParams = () => {
157
155
  const location = useLocation();
158
- const searchParams = error.useMemo(() => new URLSearchParams(location.search), [location.search]);
156
+ const searchParams = sync.useMemo(() => new URLSearchParams(location.search), [location.search]);
159
157
  const setSearchParams = sync.useCallback((params) => {
160
158
  const newParams = new URLSearchParams(params);
161
159
  location.pushState(location.state, `?${newParams.toString()}`);
@@ -384,6 +382,17 @@ const useSessionStorage = (key, initialValue) => _useStorage(() => window.sessio
384
382
  // THE SOFTWARE.
385
383
  //
386
384
  const colorSchemeDark = typeof window !== 'undefined' ? window.matchMedia?.('(prefers-color-scheme: dark)') : undefined;
385
+ const useWindow = () => {
386
+ const state$1 = state.reconciler.currentHookState;
387
+ if (!state$1)
388
+ throw Error('useWindow must be used within a render function.');
389
+ if (state$1.renderer instanceof common._DOMRenderer) {
390
+ return state$1.renderer.window;
391
+ }
392
+ else {
393
+ throw Error('Unsupported renderer.');
394
+ }
395
+ };
387
396
  const emptyInsets = { top: 0, left: 0, right: 0, bottom: 0 };
388
397
  const safeAreaInsets = () => {
389
398
  let support;
@@ -469,6 +478,7 @@ exports.usePerformanceObserver = usePerformanceObserver;
469
478
  exports.useResizeObserver = useResizeObserver;
470
479
  exports.useSearchParams = useSearchParams;
471
480
  exports.useSessionStorage = useSessionStorage;
481
+ exports.useWindow = useWindow;
472
482
  exports.useWindowMetrics = useWindowMetrics;
473
483
  exports.useWindowScroll = useWindowScroll;
474
484
  //# sourceMappingURL=web.js.map