@fynixorg/ui 1.0.10 → 1.0.12

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 (127) hide show
  1. package/LICENSE +21 -0
  2. package/dist/README.md +36 -0
  3. package/dist/context/context.d.ts +19 -0
  4. package/dist/context/context.d.ts.map +1 -0
  5. package/dist/context/context.js +3 -11
  6. package/dist/context/context.js.map +3 -3
  7. package/dist/custom/button.d.ts +2 -0
  8. package/dist/custom/button.d.ts.map +1 -0
  9. package/dist/custom/button.js +2 -9
  10. package/dist/custom/button.js.map +3 -3
  11. package/dist/custom/index.d.ts +3 -0
  12. package/dist/custom/index.d.ts.map +1 -0
  13. package/dist/custom/index.js +2 -7
  14. package/dist/custom/index.js.map +3 -3
  15. package/dist/custom/path.d.ts +14 -0
  16. package/dist/custom/path.d.ts.map +1 -0
  17. package/dist/custom/path.js +17 -34
  18. package/dist/custom/path.js.map +3 -3
  19. package/dist/error/errorOverlay.d.ts +3 -0
  20. package/dist/error/errorOverlay.d.ts.map +1 -0
  21. package/dist/error/errorOverlay.js +82 -91
  22. package/dist/error/errorOverlay.js.map +3 -3
  23. package/dist/fynix/index.d.ts +5 -0
  24. package/dist/fynix/index.d.ts.map +1 -0
  25. package/dist/fynix/index.js +2 -7
  26. package/dist/fynix/index.js.map +3 -3
  27. package/dist/hooks/nixAsync.d.ts +14 -0
  28. package/dist/hooks/nixAsync.d.ts.map +1 -0
  29. package/dist/hooks/nixAsync.js +38 -43
  30. package/dist/hooks/nixAsync.js.map +3 -3
  31. package/dist/hooks/nixAsyncCache.d.ts +14 -0
  32. package/dist/hooks/nixAsyncCache.d.ts.map +1 -0
  33. package/dist/hooks/nixAsyncCache.js +57 -59
  34. package/dist/hooks/nixAsyncCache.js.map +3 -3
  35. package/dist/hooks/nixAsyncDebounce.d.ts +22 -0
  36. package/dist/hooks/nixAsyncDebounce.d.ts.map +1 -0
  37. package/dist/hooks/nixAsyncDebounce.js +74 -85
  38. package/dist/hooks/nixAsyncDebounce.js.map +3 -3
  39. package/dist/hooks/nixAsyncQuery.d.ts +16 -0
  40. package/dist/hooks/nixAsyncQuery.d.ts.map +1 -0
  41. package/dist/hooks/nixAsyncQuery.js +85 -79
  42. package/dist/hooks/nixAsyncQuery.js.map +3 -3
  43. package/dist/hooks/nixCallback.d.ts +2 -0
  44. package/dist/hooks/nixCallback.d.ts.map +1 -0
  45. package/dist/hooks/nixCallback.js +30 -40
  46. package/dist/hooks/nixCallback.js.map +3 -3
  47. package/dist/hooks/nixComputed.d.ts +16 -0
  48. package/dist/hooks/nixComputed.d.ts.map +1 -0
  49. package/dist/hooks/nixComputed.js +166 -198
  50. package/dist/hooks/nixComputed.js.map +4 -4
  51. package/dist/hooks/nixDebounce.d.ts +11 -0
  52. package/dist/hooks/nixDebounce.d.ts.map +1 -0
  53. package/dist/hooks/nixDebounce.js +53 -58
  54. package/dist/hooks/nixDebounce.js.map +3 -3
  55. package/dist/hooks/nixEffect.d.ts +4 -0
  56. package/dist/hooks/nixEffect.d.ts.map +1 -0
  57. package/dist/hooks/nixEffect.js +65 -75
  58. package/dist/hooks/nixEffect.js.map +3 -3
  59. package/dist/hooks/nixForm.d.ts +33 -0
  60. package/dist/hooks/nixForm.d.ts.map +1 -0
  61. package/dist/hooks/nixForm.js +110 -120
  62. package/dist/hooks/nixForm.js.map +3 -3
  63. package/dist/hooks/nixFormAsync.d.ts +42 -0
  64. package/dist/hooks/nixFormAsync.d.ts.map +1 -0
  65. package/dist/hooks/nixFormAsync.js +158 -167
  66. package/dist/hooks/nixFormAsync.js.map +3 -3
  67. package/dist/hooks/nixInterval.d.ts +2 -0
  68. package/dist/hooks/nixInterval.d.ts.map +1 -0
  69. package/dist/hooks/nixInterval.js +21 -27
  70. package/dist/hooks/nixInterval.js.map +3 -3
  71. package/dist/hooks/nixLazy.d.ts +8 -0
  72. package/dist/hooks/nixLazy.d.ts.map +1 -0
  73. package/dist/hooks/nixLazy.js +53 -58
  74. package/dist/hooks/nixLazy.js.map +3 -3
  75. package/dist/hooks/nixLazyAsync.d.ts +10 -0
  76. package/dist/hooks/nixLazyAsync.d.ts.map +1 -0
  77. package/dist/hooks/nixLazyAsync.js +65 -71
  78. package/dist/hooks/nixLazyAsync.js.map +3 -3
  79. package/dist/hooks/nixLazyFormAsync.d.ts +50 -0
  80. package/dist/hooks/nixLazyFormAsync.d.ts.map +1 -0
  81. package/dist/hooks/nixLazyFormAsync.js +209 -213
  82. package/dist/hooks/nixLazyFormAsync.js.map +3 -3
  83. package/dist/hooks/nixLocalStorage.d.ts +5 -0
  84. package/dist/hooks/nixLocalStorage.d.ts.map +1 -0
  85. package/dist/hooks/nixLocalStorage.js +21 -25
  86. package/dist/hooks/nixLocalStorage.js.map +3 -3
  87. package/dist/hooks/nixMemo.d.ts +2 -0
  88. package/dist/hooks/nixMemo.d.ts.map +1 -0
  89. package/dist/hooks/nixMemo.js +27 -31
  90. package/dist/hooks/nixMemo.js.map +3 -3
  91. package/dist/hooks/nixPrevious.d.ts +2 -0
  92. package/dist/hooks/nixPrevious.d.ts.map +1 -0
  93. package/dist/hooks/nixPrevious.js +13 -19
  94. package/dist/hooks/nixPrevious.js.map +3 -3
  95. package/dist/hooks/nixRef.d.ts +4 -0
  96. package/dist/hooks/nixRef.d.ts.map +1 -0
  97. package/dist/hooks/nixRef.js +14 -20
  98. package/dist/hooks/nixRef.js.map +3 -3
  99. package/dist/hooks/nixState.d.ts +15 -0
  100. package/dist/hooks/nixState.d.ts.map +1 -0
  101. package/dist/hooks/nixState.js +120 -173
  102. package/dist/hooks/nixState.js.map +3 -3
  103. package/dist/hooks/nixStore.d.ts +7 -0
  104. package/dist/hooks/nixStore.d.ts.map +1 -0
  105. package/dist/hooks/nixStore.js +48 -54
  106. package/dist/hooks/nixStore.js.map +3 -3
  107. package/dist/package.json +213 -0
  108. package/dist/plugins/vite-plugin-res.d.ts +41 -0
  109. package/dist/plugins/vite-plugin-res.d.ts.map +1 -0
  110. package/dist/plugins/vite-plugin-res.js +620 -33
  111. package/dist/plugins/vite-plugin-res.js.map +4 -4
  112. package/dist/router/router.d.ts +35 -0
  113. package/dist/router/router.d.ts.map +1 -0
  114. package/dist/router/router.js +520 -486
  115. package/dist/router/router.js.map +3 -3
  116. package/dist/runtime.d.ts +62 -0
  117. package/dist/runtime.d.ts.map +1 -0
  118. package/dist/runtime.js +833 -820
  119. package/dist/runtime.js.map +4 -4
  120. package/package.json +226 -43
  121. package/types/fnx.d.ts +72 -0
  122. package/types/fynix-ui.d.ts +323 -0
  123. package/types/global.d.ts +46 -6
  124. package/types/index.d.ts +37 -0
  125. package/types/vite-env.d.ts +553 -0
  126. package/runtime.d.ts +0 -83
  127. package/types/jsx.d.ts +0 -692
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Resty Gonzales
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Fynix Core
2
+
3
+ This is the core package for the Fynix UI framework. It contains the essential runtime, hooks, context, and utilities for building Fynix-based applications.
4
+
5
+ ## Structure
6
+ - `runtime.js`: Main runtime logic
7
+ - `context/`: Context management
8
+ - `custom/`: Custom UI elements
9
+ - `error/`: Error overlays and handling
10
+ - `fynix/`: Fynix core logic
11
+ - `hooks/`: Reactivity and utility hooks
12
+ - `plugins/`: Plugins (e.g., Vite integration)
13
+ - `router/`: Routing logic
14
+ - `types/`: TypeScript type definitions
15
+ - `global.d.ts`: Global type extensions
16
+
17
+ ## Usage
18
+ Install via npm after publishing:
19
+
20
+ ```sh
21
+ npm install fynix-core
22
+ ```
23
+
24
+ Then import in your project:
25
+
26
+ ```js
27
+ import { ... } from 'fynix-core';
28
+ ```
29
+
30
+ ## Development
31
+ - Ensure all files are included in `package.json`.
32
+ - Update type definitions in `global.d.ts` as needed.
33
+ - Export all public APIs via the `exports` field in `package.json`.
34
+
35
+ ## License
36
+ MIT
@@ -0,0 +1,19 @@
1
+ export interface ComponentContext {
2
+ hooks: any[];
3
+ hookIndex: number;
4
+ effects: Function[];
5
+ cleanups: Function[];
6
+ stateCleanups?: Function[];
7
+ _vnode: object;
8
+ _accessedStates: Set<any>;
9
+ _subscriptions: Set<any>;
10
+ _subscriptionCleanups: Function[];
11
+ version: number;
12
+ rerender: (() => void) | null;
13
+ Component: Function;
14
+ _isMounted: boolean;
15
+ _isRerendering: boolean;
16
+ }
17
+ export declare let activeContext: ComponentContext | null;
18
+ export declare function setActiveContext(ctx: ComponentContext | null): void;
19
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../context/context.ts"],"names":[],"mappings":"AA8CA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,cAAc,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,qBAAqB,EAAE,QAAQ,EAAE,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,QAAQ,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;CACzB;AAMD,eAAO,IAAI,aAAa,EAAE,gBAAgB,GAAG,IAAW,CAAC;AASzD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAEnE"}
@@ -1,12 +1,4 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- let activeContext = null;
4
- function setActiveContext(ctx) {
5
- activeContext = ctx;
1
+ export let activeContext = null;
2
+ export function setActiveContext(ctx) {
3
+ activeContext = ctx;
6
4
  }
7
- __name(setActiveContext, "setActiveContext");
8
- export {
9
- activeContext,
10
- setActiveContext
11
- };
12
- //# sourceMappingURL=context.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../context/context.js"],
4
- "sourcesContent": ["/**\r\n * @fileoverview Component context management for Fynix framework.\r\n * Tracks the currently rendering component to enable hooks to access component state.\r\n */\r\n\r\n/**\r\n * @typedef {Object} ComponentContext\r\n * @property {Array<any>} hooks - Array of hook states\r\n * @property {number} hookIndex - Current hook index during render\r\n * @property {Array<Function>} effects - Array of effect cleanup functions\r\n * @property {Array<Function>} cleanups - Array of cleanup functions\r\n * @property {Array<Function>} [stateCleanups] - Array of state cleanup functions\r\n * @property {Object} _vnode - Associated virtual node\r\n * @property {Set<any>} _accessedStates - Set of states accessed during render\r\n * @property {Set<any>} _subscriptions - Set of active subscriptions\r\n * @property {Array<Function>} _subscriptionCleanups - Array of subscription cleanup functions\r\n * @property {number} version - Component version for tracking updates\r\n * @property {Function|null} rerender - Function to trigger component re-render\r\n * @property {Function} Component - Component function\r\n * @property {boolean} _isMounted - Whether component is mounted\r\n * @property {boolean} _isRerendering - Whether component is currently re-rendering\r\n */\r\n\r\n/**\r\n * The currently active component context.\r\n * This is set during component rendering to allow hooks to access the component's state.\r\n * @type {ComponentContext|null}\r\n */\r\nexport let activeContext = null;\r\n\r\n/**\r\n * Set the active component context.\r\n * Called internally by the runtime when entering/exiting component rendering.\r\n * \r\n * @param {ComponentContext|null} ctx - The component context to set as active, or null to clear\r\n * @returns {void}\r\n * \r\n * @example\r\n * // Internal usage in runtime\r\n * setActiveContext(componentContext);\r\n * const result = Component(props);\r\n * setActiveContext(null);\r\n */\r\nexport function setActiveContext(ctx) {\r\n activeContext = ctx;\r\n}\r\n"],
5
- "mappings": ";;AA4BO,IAAI,gBAAgB;AAepB,SAAS,iBAAiB,KAAK;AACpC,kBAAgB;AAClB;AAFgB;",
3
+ "sources": ["../../context/context.ts"],
4
+ "sourcesContent": ["/* MIT License\r\n\r\n* Copyright (c) 2026 Resty Gonzales\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n* SOFTWARE.\r\n */\r\n/**\r\n * @fileoverview Component context management for Fynix framework.\r\n * Tracks the currently rendering component to enable hooks to access component state.\r\n */\r\n\r\n/**\r\n * @typedef {Object} ComponentContext\r\n * @property {Array<any>} hooks - Array of hook states\r\n * @property {number} hookIndex - Current hook index during render\r\n * @property {Array<Function>} effects - Array of effect cleanup functions\r\n * @property {Array<Function>} cleanups - Array of cleanup functions\r\n * @property {Array<Function>} [stateCleanups] - Array of state cleanup functions\r\n * @property {Object} _vnode - Associated virtual node\r\n * @property {Set<any>} _accessedStates - Set of states accessed during render\r\n * @property {Set<any>} _subscriptions - Set of active subscriptions\r\n * @property {Array<Function>} _subscriptionCleanups - Array of subscription cleanup functions\r\n * @property {number} version - Component version for tracking updates\r\n * @property {Function|null} rerender - Function to trigger component re-render\r\n * @property {Function} Component - Component function\r\n * @property {boolean} _isMounted - Whether component is mounted\r\n * @property {boolean} _isRerendering - Whether component is currently re-rendering\r\n */\r\n\r\n// TypeScript interface for ComponentContext\r\nexport interface ComponentContext {\r\n hooks: any[];\r\n hookIndex: number;\r\n effects: Function[];\r\n cleanups: Function[];\r\n stateCleanups?: Function[];\r\n _vnode: object;\r\n _accessedStates: Set<any>;\r\n _subscriptions: Set<any>;\r\n _subscriptionCleanups: Function[];\r\n version: number;\r\n rerender: (() => void) | null;\r\n Component: Function;\r\n _isMounted: boolean;\r\n _isRerendering: boolean;\r\n}\r\n\r\n/**\r\n * The currently active component context.\r\n * This is set during component rendering to allow hooks to access the component's state.\r\n */\r\nexport let activeContext: ComponentContext | null = null;\r\n\r\n/**\r\n * Set the active component context.\r\n * Called internally by the runtime when entering/exiting component rendering.\r\n *\r\n * @param ctx - The component context to set as active, or null to clear\r\n * @returns void\r\n */\r\nexport function setActiveContext(ctx: ComponentContext | null): void {\r\n activeContext = ctx;\r\n}\r\n"],
5
+ "mappings": ";;AAmEO,IAAI,gBAAyC;AAS7C,SAAS,iBAAiB,KAAoC;AACnE,kBAAgB;AAClB;AAFgB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,2 @@
1
+ export declare function Button({ value, ...props }: Record<string, any>): any;
2
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../custom/button.ts"],"names":[],"mappings":"AAkEA,wBAAgB,MAAM,CAAC,EAAE,KAAU,EAAE,GAAG,KAAK,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAEzE"}
@@ -1,11 +1,4 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import { Fynix } from "../runtime.js";
4
- function Button({ value = "", ...props }) {
5
- return Fynix("button", props, value);
2
+ export function Button({ value = "", ...props }) {
3
+ return Fynix("button", props, value);
6
4
  }
7
- __name(Button, "Button");
8
- export {
9
- Button
10
- };
11
- //# sourceMappingURL=button.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../custom/button.js"],
4
- "sourcesContent": ["/**\r\n * @fileoverview Button component for Fynix applications.\r\n * Simple wrapper around native button element with Fynix integration.\r\n */\r\n\r\nimport { Fynix } from \"../runtime.js\";\r\n\r\n/**\r\n * @typedef {Object} ButtonProps\r\n * @property {string} [value=\"\"] - Button text content\r\n * @property {string} [type=\"button\"] - Button type (button, submit, reset)\r\n * @property {boolean} [disabled=false] - Whether button is disabled\r\n * @property {string} [rc] - Reactive class attribute (Fynix-specific)\r\n * @property {string} [class] - CSS class names\r\n * @property {(this: HTMLElement, event: MouseEvent) => void} [r-click] - Click event handler\r\n */\r\n\r\n/**\r\n * Button component for Fynix applications.\r\n * Renders a native HTML button element with Fynix event handling.\r\n * \r\n * @param {ButtonProps & Record<string, any>} props - Component props\r\n * @returns {VNode} Button element virtual node\r\n * \r\n * @example\r\n * // Basic button\r\n * <Button value=\"Click Me\" />\r\n * \r\n * @example\r\n * // With click handler\r\n * <Button \r\n * value=\"Submit\"\r\n * r-click={() => console.log('Clicked!')}\r\n * />\r\n * \r\n * @example\r\n * // Submit button with styling\r\n * <Button\r\n * value=\"Save\"\r\n * type=\"submit\"\r\n * rc=\"px-4 py-2 bg-blue-500 text-white rounded\"\r\n * />\r\n */\r\nexport function Button({ value = \"\", ...props }) {\r\n return Fynix(\"button\", props, value);\r\n}\r\n"],
5
- "mappings": ";;AAKA,SAAS,aAAa;AAsCf,SAAS,OAAO,EAAE,QAAQ,IAAI,GAAG,MAAM,GAAG;AAC/C,SAAO,MAAM,UAAU,OAAO,KAAK;AACrC;AAFgB;",
3
+ "sources": ["../../custom/button.ts"],
4
+ "sourcesContent": ["/* MIT License\r\n\r\n* Copyright (c) 2026 Resty Gonzales\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n* SOFTWARE.\r\n */\r\n/**\r\n * @fileoverview Button component for Fynix applications.\r\n * Simple wrapper around native button element with Fynix integration.\r\n */\r\n\r\nimport { Fynix } from \"../runtime.js\";\r\n\r\n/**\r\n * @typedef {Object} ButtonProps\r\n * @property {string} [value=\"\"] - Button text content\r\n * @property {string} [type=\"button\"] - Button type (button, submit, reset)\r\n * @property {boolean} [disabled=false] - Whether button is disabled\r\n * @property {string} [rc] - Reactive class attribute (Fynix-specific)\r\n * @property {string} [class] - CSS class names\r\n * @property {(this: HTMLElement, event: MouseEvent) => void} [r-click] - Click event handler\r\n */\r\n\r\n/**\r\n * Button component for Fynix applications.\r\n * Renders a native HTML button element with Fynix event handling.\r\n *\r\n * @param {ButtonProps & Record<string, any>} props - Component props\r\n * @returns {VNode} Button element virtual node\r\n *\r\n * @example\r\n * // Basic button\r\n * <Button value=\"Click Me\" />\r\n *\r\n * @example\r\n * // With click handler\r\n * <Button\r\n * value=\"Submit\"\r\n * r-click={() => console.log('Clicked!')}\r\n * />\r\n *\r\n * @example\r\n * // Submit button with styling\r\n * <Button\r\n * value=\"Save\"\r\n * type=\"submit\"\r\n * rc=\"px-4 py-2 bg-blue-500 text-white rounded\"\r\n * />\r\n */\r\n// Use 'any' as the return type to avoid the VNode type export error\r\nexport function Button({ value = \"\", ...props }: Record<string, any>): any {\r\n return Fynix(\"button\", props, value);\r\n}\r\n"],
5
+ "mappings": ";;AA2BA,SAAS,aAAa;AAuCf,SAAS,OAAO,EAAE,QAAQ,IAAI,GAAG,MAAM,GAA6B;AACzE,SAAO,MAAM,UAAU,OAAO,KAAK;AACrC;AAFgB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,3 @@
1
+ export { Button } from "./button";
2
+ export { Path } from "./path";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../custom/index.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,7 +1,2 @@
1
- import { Button } from "./button";
2
- import { Path } from "./path";
3
- export {
4
- Button,
5
- Path
6
- };
7
- //# sourceMappingURL=index.js.map
1
+ export { Button } from "./button";
2
+ export { Path } from "./path";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../custom/index.js"],
4
- "sourcesContent": ["/**\r\n * @fileoverview Custom Fynix components export module.\r\n * Re-exports Button and Path components for convenient importing.\r\n * \r\n * @example\r\n * import { Button, Path } from '@fynixorg/ui/custom';\r\n */\r\n\r\nexport { Button } from \"./button\";\r\nexport { Path } from \"./path\";\r\n"],
5
- "mappings": "AAQA,SAAS,cAAc;AACvB,SAAS,YAAY;",
3
+ "sources": ["../../custom/index.ts"],
4
+ "sourcesContent": ["/* MIT License\r\n\r\n* Copyright (c) 2026 Resty Gonzales\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n* SOFTWARE.\r\n */\r\n/**\r\n * @fileoverview Custom Fynix components export module.\r\n * Re-exports Button and Path components for convenient importing.\r\n *\r\n * @example\r\n * import { Button, Path } from '@fynixorg/ui/custom';\r\n */\r\n\r\nexport { Button } from \"./button\";\r\n\r\nexport { Path } from \"./path\";\r\n"],
5
+ "mappings": "AA8BA,SAAS,cAAc;AAEvB,SAAS,YAAY;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,14 @@
1
+ declare global {
2
+ interface Window {
3
+ __fynixLinkProps__?: Record<string, any>;
4
+ }
5
+ }
6
+ export declare function Path({ to, value, props: routeProps, ...attrs }: {
7
+ to?: string;
8
+ value?: string;
9
+ props?: {
10
+ [key: string]: any;
11
+ };
12
+ [key: string]: any;
13
+ }): any;
14
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../custom/path.ts"],"names":[],"mappings":"AA0CA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC1C;CACF;AA0CD,wBAAgB,IAAI,CAAC,EACnB,EAAQ,EACR,KAAU,EACV,KAAK,EAAE,UAAe,EACtB,GAAG,KAAK,EACT,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,GAAG,CAoCN"}
@@ -1,37 +1,20 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import { Fynix, nixState } from "../runtime.js";
4
2
  let propsCounter = 0;
5
- function Path({
6
- to = "#",
7
- value = "",
8
- props: routeProps = {},
9
- ...attrs
10
- }) {
11
- const wrappedProps = {};
12
- for (const [k, v] of Object.entries(routeProps)) {
13
- wrappedProps[k] = v && v._isNixState ? v : nixState(v);
14
- }
15
- const propsKey = `fynixProp_${Date.now()}_${propsCounter++}`;
16
- if (!window.__fynixLinkProps__) {
17
- window.__fynixLinkProps__ = {};
18
- }
19
- window.__fynixLinkProps__[propsKey] = wrappedProps;
20
- const el = Fynix(
21
- "a",
22
- {
23
- href: to,
24
- "data-fynix-link": true,
25
- // SPA link detection
26
- "data-props-key": propsKey,
27
- ...attrs
28
- },
29
- value
30
- );
31
- return el;
3
+ export function Path({ to = "#", value = "", props: routeProps = {}, ...attrs }) {
4
+ const wrappedProps = {};
5
+ for (const [k, v] of Object.entries(routeProps)) {
6
+ wrappedProps[k] = v && v._isNixState ? v : nixState(v);
7
+ }
8
+ const propsKey = `fynixProp_${Date.now()}_${propsCounter++}`;
9
+ if (!window.__fynixLinkProps__) {
10
+ window.__fynixLinkProps__ = {};
11
+ }
12
+ window.__fynixLinkProps__[propsKey] = wrappedProps;
13
+ const el = Fynix("a", {
14
+ href: to,
15
+ "data-fynix-link": true,
16
+ "data-props-key": propsKey,
17
+ ...attrs,
18
+ }, value);
19
+ return el;
32
20
  }
33
- __name(Path, "Path");
34
- export {
35
- Path
36
- };
37
- //# sourceMappingURL=path.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../custom/path.js"],
4
- "sourcesContent": ["/**\r\n * @fileoverview Path component for SPA navigation in Fynix applications.\r\n * Provides client-side routing with prop passing between routes.\r\n */\r\n\r\nimport { Fynix, nixState } from \"../runtime.js\";\r\n\r\n/**\r\n * @typedef {Object} PathProps\r\n * @property {string} [to=\"#\"] - URL to navigate to (relative or absolute)\r\n * @property {string} [value=\"\"] - Link text content\r\n * @property {Record<string, any>} [props={}] - Props to pass to the destination route component\r\n * @property {string} [target] - Link target (_blank, _self, etc.)\r\n * @property {string} [rel] - Link relationship (noopener, noreferrer, etc.)\r\n * @property {string} [rc] - Reactive class attribute (Fynix-specific)\r\n * @property {string} [class] - CSS class names\r\n * @property {string} [id] - Element ID\r\n */\r\n\r\n/** Unique counter for props keys */\r\nlet propsCounter = 0;\r\n\r\n/**\r\n * SPA navigation link component for Fynix router.\r\n * Automatically handles client-side navigation and prop passing between routes.\r\n * \r\n * @param {PathProps & Record<string, any>} options - Component props\r\n * @returns {VNode} Anchor element virtual node\r\n * \r\n * @example\r\n * // Basic navigation\r\n * <Path to=\"/about\" value=\"About Us\" />\r\n * \r\n * @example\r\n * // Navigate with props\r\n * <Path \r\n * to=\"/user/123\" \r\n * value=\"View Profile\"\r\n * props={{ userId: 123, fromSearch: true }}\r\n * />\r\n * \r\n * @example\r\n * // External link\r\n * <Path\r\n * to=\"https://github.com\"\r\n * value=\"GitHub\"\r\n * target=\"_blank\"\r\n * rel=\"noopener noreferrer\"\r\n * />\r\n * \r\n * @example\r\n * // With styling\r\n * <Path\r\n * to=\"/dashboard\"\r\n * value=\"Dashboard\"\r\n * rc=\"px-4 py-2 bg-blue-500 text-white rounded\"\r\n * />\r\n */\r\nexport function Path({\r\n to = \"#\",\r\n value = \"\",\r\n props: routeProps = {},\r\n ...attrs\r\n}) {\r\n ///console.log(\"[Path Component] Received routeProps:\", routeProps);\r\n\r\n // Wrap plain props in nixState if not already\r\n const wrappedProps = {};\r\n for (const [k, v] of Object.entries(routeProps)) {\r\n wrappedProps[k] = v && v._isNixState ? v : nixState(v);\r\n }\r\n\r\n // Generate a unique key for this props object\r\n // FIX: Do not use __ prefix as router blocks it for security\r\n const propsKey = `fynixProp_${Date.now()}_${propsCounter++}`;\r\n\r\n // FIX: Store props in the namespace expected by the router\r\n if (!window.__fynixLinkProps__) {\r\n window.__fynixLinkProps__ = {};\r\n }\r\n\r\n // Debug log\r\n // console.log(\"[Path] Storage props:\", propsKey, wrappedProps);\r\n\r\n window.__fynixLinkProps__[propsKey] = wrappedProps;\r\n\r\n // Create the anchor element\r\n const el = Fynix(\r\n \"a\",\r\n {\r\n href: to,\r\n \"data-fynix-link\": true, // SPA link detection\r\n \"data-props-key\": propsKey,\r\n ...attrs,\r\n },\r\n value\r\n );\r\n\r\n return el;\r\n}\r\n"],
5
- "mappings": ";;AAKA,SAAS,OAAO,gBAAgB;AAehC,IAAI,eAAe;AAsCZ,SAAS,KAAK;AAAA,EACnB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,OAAO,aAAa,CAAC;AAAA,EACrB,GAAG;AACL,GAAG;AAID,QAAM,eAAe,CAAC;AACtB,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,UAAU,GAAG;AAC/C,iBAAa,CAAC,IAAI,KAAK,EAAE,cAAc,IAAI,SAAS,CAAC;AAAA,EACvD;AAIA,QAAM,WAAW,aAAa,KAAK,IAAI,CAAC,IAAI,cAAc;AAG1D,MAAI,CAAC,OAAO,oBAAoB;AAC9B,WAAO,qBAAqB,CAAC;AAAA,EAC/B;AAKA,SAAO,mBAAmB,QAAQ,IAAI;AAGtC,QAAM,KAAK;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,mBAAmB;AAAA;AAAA,MACnB,kBAAkB;AAAA,MAClB,GAAG;AAAA,IACL;AAAA,IACA;AAAA,EACF;AAEA,SAAO;AACT;AAzCgB;",
3
+ "sources": ["../../custom/path.ts"],
4
+ "sourcesContent": ["/* MIT License\r\n\r\n* Copyright (c) 2026 Resty Gonzales\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n* SOFTWARE.\r\n */\r\n/**\r\n * @fileoverview Path component for SPA navigation in Fynix applications.\r\n * Provides client-side routing with prop passing between routes.\r\n */\r\n\r\nimport { Fynix, nixState } from \"../runtime.js\";\r\n\r\n/**\r\n * @typedef {Object} PathProps\r\n * @property {string} [to=\"#\"] - URL to navigate to (relative or absolute)\r\n * @property {string} [value=\"\"] - Link text content\r\n * @property {Record<string, any>} [props={}] - Props to pass to the destination route component\r\n * @property {string} [target] - Link target (_blank, _self, etc.)\r\n * @property {string} [rel] - Link relationship (noopener, noreferrer, etc.)\r\n * @property {string} [rc] - Reactive class attribute (Fynix-specific)\r\n * @property {string} [class] - CSS class names\r\n * @property {string} [id] - Element ID\r\n */\r\n\r\n/** Extend Window interface for __fynixLinkProps__ */\r\ndeclare global {\r\n interface Window {\r\n __fynixLinkProps__?: Record<string, any>;\r\n }\r\n}\r\n\r\n/** Unique counter for props keys */\r\nlet propsCounter = 0;\r\n\r\n/**\r\n * SPA navigation link component for Fynix router.\r\n * Automatically handles client-side navigation and prop passing between routes.\r\n *\r\n * @param {PathProps & Record<string, any>} options - Component props\r\n * @returns {VNode} Anchor element virtual node\r\n *\r\n * @example\r\n * // Basic navigation\r\n * <Path to=\"/about\" value=\"About Us\" />\r\n *\r\n * @example\r\n * // Navigate with props\r\n * <Path\r\n * to=\"/user/123\"\r\n * value=\"View Profile\"\r\n * props={{ userId: 123, fromSearch: true }}\r\n * />\r\n *\r\n * @example\r\n * // External link\r\n * <Path\r\n * to=\"https://github.com\"\r\n * value=\"GitHub\"\r\n * target=\"_blank\"\r\n * rel=\"noopener noreferrer\"\r\n * />\r\n *\r\n * @example\r\n * // With styling\r\n * <Path\r\n * to=\"/dashboard\"\r\n * value=\"Dashboard\"\r\n * rc=\"px-4 py-2 bg-blue-500 text-white rounded\"\r\n * />\r\n */\r\n// Use 'any' as the return type to avoid the VNode type export error\r\nexport function Path({\r\n to = \"#\",\r\n value = \"\",\r\n props: routeProps = {},\r\n ...attrs\r\n}: {\r\n to?: string;\r\n value?: string;\r\n props?: { [key: string]: any };\r\n [key: string]: any;\r\n}): any {\r\n ///console.log(\"[Path Component] Received routeProps:\", routeProps);\r\n\r\n // Wrap plain props in nixState if not already\r\n const wrappedProps: { [key: string]: any } = {};\r\n for (const [k, v] of Object.entries(routeProps as { [key: string]: any })) {\r\n wrappedProps[k] = v && v._isNixState ? v : nixState(v);\r\n }\r\n\r\n // Generate a unique key for this props object\r\n // FIX: Do not use __ prefix as router blocks it for security\r\n const propsKey = `fynixProp_${Date.now()}_${propsCounter++}`;\r\n\r\n // FIX: Store props in the namespace expected by the router\r\n if (!window.__fynixLinkProps__) {\r\n window.__fynixLinkProps__ = {};\r\n }\r\n\r\n // Debug log\r\n // console.log(\"[Path] Storage props:\", propsKey, wrappedProps);\r\n\r\n window.__fynixLinkProps__[propsKey] = wrappedProps;\r\n\r\n // Create the anchor element\r\n const el = Fynix(\r\n \"a\",\r\n {\r\n href: to,\r\n \"data-fynix-link\": true, // SPA link detection\r\n \"data-props-key\": propsKey,\r\n ...attrs,\r\n },\r\n value\r\n );\r\n\r\n return el;\r\n}\r\n"],
5
+ "mappings": ";;AA2BA,SAAS,OAAO,gBAAgB;AAsBhC,IAAI,eAAe;AAuCZ,SAAS,KAAK;AAAA,EACnB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,OAAO,aAAa,CAAC;AAAA,EACrB,GAAG;AACL,GAKQ;AAIN,QAAM,eAAuC,CAAC;AAC9C,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,UAAoC,GAAG;AACzE,iBAAa,CAAC,IAAI,KAAK,EAAE,cAAc,IAAI,SAAS,CAAC;AAAA,EACvD;AAIA,QAAM,WAAW,aAAa,KAAK,IAAI,CAAC,IAAI,cAAc;AAG1D,MAAI,CAAC,OAAO,oBAAoB;AAC9B,WAAO,qBAAqB,CAAC;AAAA,EAC/B;AAKA,SAAO,mBAAmB,QAAQ,IAAI;AAGtC,QAAM,KAAK;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,mBAAmB;AAAA;AAAA,MACnB,kBAAkB;AAAA,MAClB,GAAG;AAAA,IACL;AAAA,IACA;AAAA,EACF;AAEA,SAAO;AACT;AA9CgB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,3 @@
1
+ export declare function showErrorOverlay(error: Error): void;
2
+ export declare function removeErrorOverlay(): void;
3
+ //# sourceMappingURL=errorOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorOverlay.d.ts","sourceRoot":"","sources":["../../error/errorOverlay.ts"],"names":[],"mappings":"AAyCA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CA2FnD;AAQD,wBAAgB,kBAAkB,IAAI,IAAI,CAMzC"}
@@ -1,93 +1,84 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- function showErrorOverlay(error) {
4
- removeErrorOverlay();
5
- const overlay = document.createElement("div");
6
- overlay.id = "dev-error-overlay";
7
- Object.assign(overlay.style, {
8
- position: "fixed",
9
- inset: 0,
10
- width: "100%",
11
- height: "100%",
12
- backgroundColor: "rgba(0, 0, 0, 0.9)",
13
- color: "#fff",
14
- fontFamily: "Consolas, monospace",
15
- padding: "30px",
16
- zIndex: 99999,
17
- overflowY: "auto",
18
- transition: "opacity 0.25s ease",
19
- opacity: "0"
20
- });
21
- const container = document.createElement("div");
22
- container.style.position = "relative";
23
- container.style.maxWidth = "900px";
24
- container.style.margin = "50px auto";
25
- container.style.background = "rgba(255, 255, 255, 0.05)";
26
- container.style.borderRadius = "8px";
27
- container.style.padding = "20px 30px";
28
- container.style.boxShadow = "0 0 10px rgba(255, 0, 0, 0.3)";
29
- const closeBtn = document.createElement("button");
30
- closeBtn.textContent = "\xD7 Close";
31
- Object.assign(closeBtn.style, {
32
- position: "absolute",
33
- top: "10px",
34
- right: "10px",
35
- background: "#ff5555",
36
- color: "#fff",
37
- border: "none",
38
- padding: "6px 12px",
39
- fontSize: "16px",
40
- borderRadius: "4px",
41
- cursor: "pointer",
42
- zIndex: 10
43
- });
44
- closeBtn.addEventListener("click", () => removeErrorOverlay());
45
- container.appendChild(closeBtn);
46
- const title = document.createElement("h1");
47
- title.textContent = "Runtime Error";
48
- Object.assign(title.style, {
49
- color: "#ff5555",
50
- fontSize: "24px",
51
- marginBottom: "10px"
52
- });
53
- const message = document.createElement("pre");
54
- message.textContent = error?.message || "Unknown error";
55
- Object.assign(message.style, {
56
- whiteSpace: "pre-wrap",
57
- background: "rgba(255, 255, 255, 0.1)",
58
- padding: "10px",
59
- borderRadius: "6px",
60
- marginTop: "10px",
61
- color: "#ffaaaa"
62
- });
63
- const stack = document.createElement("pre");
64
- stack.textContent = error?.stack || "";
65
- Object.assign(stack.style, {
66
- whiteSpace: "pre-wrap",
67
- marginTop: "15px",
68
- color: "#ccc"
69
- });
70
- container.appendChild(title);
71
- container.appendChild(message);
72
- container.appendChild(stack);
73
- overlay.appendChild(container);
74
- document.body.appendChild(overlay);
75
- requestAnimationFrame(() => {
76
- overlay.style.opacity = "1";
77
- });
78
- console.error("FynixJS Runtime Error]", error);
1
+ export function showErrorOverlay(error) {
2
+ removeErrorOverlay();
3
+ const overlay = document.createElement("div");
4
+ overlay.id = "dev-error-overlay";
5
+ Object.assign(overlay.style, {
6
+ position: "fixed",
7
+ inset: 0,
8
+ width: "100%",
9
+ height: "100%",
10
+ backgroundColor: "rgba(0, 0, 0, 0.9)",
11
+ color: "#fff",
12
+ fontFamily: "Consolas, monospace",
13
+ padding: "30px",
14
+ zIndex: 99999,
15
+ overflowY: "auto",
16
+ transition: "opacity 0.25s ease",
17
+ opacity: "0",
18
+ });
19
+ const container = document.createElement("div");
20
+ container.style.position = "relative";
21
+ container.style.maxWidth = "900px";
22
+ container.style.margin = "50px auto";
23
+ container.style.background = "rgba(255, 255, 255, 0.05)";
24
+ container.style.borderRadius = "8px";
25
+ container.style.padding = "20px 30px";
26
+ container.style.boxShadow = "0 0 10px rgba(255, 0, 0, 0.3)";
27
+ const closeBtn = document.createElement("button");
28
+ closeBtn.textContent = "× Close";
29
+ Object.assign(closeBtn.style, {
30
+ position: "absolute",
31
+ top: "10px",
32
+ right: "10px",
33
+ background: "#ff5555",
34
+ color: "#fff",
35
+ border: "none",
36
+ padding: "6px 12px",
37
+ fontSize: "16px",
38
+ borderRadius: "4px",
39
+ cursor: "pointer",
40
+ zIndex: 10,
41
+ });
42
+ closeBtn.addEventListener("click", () => removeErrorOverlay());
43
+ container.appendChild(closeBtn);
44
+ const title = document.createElement("h1");
45
+ title.textContent = "Runtime Error";
46
+ Object.assign(title.style, {
47
+ color: "#ff5555",
48
+ fontSize: "24px",
49
+ marginBottom: "10px",
50
+ });
51
+ const message = document.createElement("pre");
52
+ message.textContent = error?.message || "Unknown error";
53
+ Object.assign(message.style, {
54
+ whiteSpace: "pre-wrap",
55
+ background: "rgba(255, 255, 255, 0.1)",
56
+ padding: "10px",
57
+ borderRadius: "6px",
58
+ marginTop: "10px",
59
+ color: "#ffaaaa",
60
+ });
61
+ const stack = document.createElement("pre");
62
+ stack.textContent = error?.stack || "";
63
+ Object.assign(stack.style, {
64
+ whiteSpace: "pre-wrap",
65
+ marginTop: "15px",
66
+ color: "#ccc",
67
+ });
68
+ container.appendChild(title);
69
+ container.appendChild(message);
70
+ container.appendChild(stack);
71
+ overlay.appendChild(container);
72
+ document.body.appendChild(overlay);
73
+ requestAnimationFrame(() => {
74
+ overlay.style.opacity = "1";
75
+ });
76
+ console.error("[FynixJS Runtime Error]", error);
79
77
  }
80
- __name(showErrorOverlay, "showErrorOverlay");
81
- function removeErrorOverlay() {
82
- const existing = document.getElementById("dev-error-overlay");
83
- if (existing) {
84
- existing.style.opacity = "0";
85
- setTimeout(() => existing.remove(), 200);
86
- }
78
+ export function removeErrorOverlay() {
79
+ const existing = document.getElementById("dev-error-overlay");
80
+ if (existing) {
81
+ existing.style.opacity = "0";
82
+ setTimeout(() => existing.remove(), 200);
83
+ }
87
84
  }
88
- __name(removeErrorOverlay, "removeErrorOverlay");
89
- export {
90
- removeErrorOverlay,
91
- showErrorOverlay
92
- };
93
- //# sourceMappingURL=errorOverlay.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../error/errorOverlay.js"],
4
- "sourcesContent": ["/**\r\n * @fileoverview Development error overlay for Fynix applications.\r\n * Displays runtime errors in a user-friendly overlay during development.\r\n */\r\n\r\n/**\r\n * Display an error overlay with error details.\r\n * Shows error message, stack trace, and a close button.\r\n * \r\n * @param {Error} error - The error object to display\r\n * @returns {void}\r\n * \r\n * @example\r\n * try {\r\n * // some code\r\n * } catch (err) {\r\n * showErrorOverlay(err);\r\n * }\r\n */\r\nexport function showErrorOverlay(error) {\r\n removeErrorOverlay();\r\n\r\n const overlay = document.createElement(\"div\");\r\n overlay.id = \"dev-error-overlay\";\r\n Object.assign(overlay.style, {\r\n position: \"fixed\",\r\n inset: 0,\r\n width: \"100%\",\r\n height: \"100%\",\r\n backgroundColor: \"rgba(0, 0, 0, 0.9)\",\r\n color: \"#fff\",\r\n fontFamily: \"Consolas, monospace\",\r\n padding: \"30px\",\r\n zIndex: 99999,\r\n overflowY: \"auto\",\r\n transition: \"opacity 0.25s ease\",\r\n opacity: \"0\",\r\n });\r\n\r\n const container = document.createElement(\"div\");\r\n container.style.position = \"relative\"; // important for absolute button\r\n container.style.maxWidth = \"900px\";\r\n container.style.margin = \"50px auto\";\r\n container.style.background = \"rgba(255, 255, 255, 0.05)\";\r\n container.style.borderRadius = \"8px\";\r\n container.style.padding = \"20px 30px\";\r\n container.style.boxShadow = \"0 0 10px rgba(255, 0, 0, 0.3)\";\r\n\r\n // Close Button\r\n const closeBtn = document.createElement(\"button\");\r\n closeBtn.textContent = \"\u00D7 Close\";\r\n Object.assign(closeBtn.style, {\r\n position: \"absolute\",\r\n top: \"10px\",\r\n right: \"10px\",\r\n background: \"#ff5555\",\r\n color: \"#fff\",\r\n border: \"none\",\r\n padding: \"6px 12px\",\r\n fontSize: \"16px\",\r\n borderRadius: \"4px\",\r\n cursor: \"pointer\",\r\n zIndex: 10,\r\n });\r\n closeBtn.addEventListener(\"click\", () => removeErrorOverlay());\r\n container.appendChild(closeBtn);\r\n\r\n // Title\r\n const title = document.createElement(\"h1\");\r\n title.textContent = \"Runtime Error\";\r\n Object.assign(title.style, {\r\n color: \"#ff5555\",\r\n fontSize: \"24px\",\r\n marginBottom: \"10px\",\r\n });\r\n\r\n // Message\r\n const message = document.createElement(\"pre\");\r\n message.textContent = error?.message || \"Unknown error\";\r\n Object.assign(message.style, {\r\n whiteSpace: \"pre-wrap\",\r\n background: \"rgba(255, 255, 255, 0.1)\",\r\n padding: \"10px\",\r\n borderRadius: \"6px\",\r\n marginTop: \"10px\",\r\n color: \"#ffaaaa\",\r\n });\r\n\r\n // Stack trace\r\n const stack = document.createElement(\"pre\");\r\n stack.textContent = error?.stack || \"\";\r\n Object.assign(stack.style, {\r\n whiteSpace: \"pre-wrap\",\r\n marginTop: \"15px\",\r\n color: \"#ccc\",\r\n });\r\n\r\n container.appendChild(title);\r\n container.appendChild(message);\r\n container.appendChild(stack);\r\n overlay.appendChild(container);\r\n document.body.appendChild(overlay);\r\n\r\n // Smooth fade-in\r\n requestAnimationFrame(() => {\r\n overlay.style.opacity = \"1\";\r\n });\r\n\r\n // Console log\r\n console.error(\"FynixJS Runtime Error]\", error);\r\n}\r\n\r\n/**\r\n * Remove the error overlay from the DOM.\r\n * Fades out the overlay before removing it.\r\n * \r\n * @returns {void}\r\n */\r\nexport function removeErrorOverlay() {\r\n const existing = document.getElementById(\"dev-error-overlay\");\r\n if (existing) {\r\n existing.style.opacity = \"0\";\r\n setTimeout(() => existing.remove(), 200);\r\n }\r\n}\r\n"],
5
- "mappings": ";;AAmBO,SAAS,iBAAiB,OAAO;AACtC,qBAAmB;AAEnB,QAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,UAAQ,KAAK;AACb,SAAO,OAAO,QAAQ,OAAO;AAAA,IAC3B,UAAU;AAAA,IACV,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,EACX,CAAC;AAED,QAAM,YAAY,SAAS,cAAc,KAAK;AAC9C,YAAU,MAAM,WAAW;AAC3B,YAAU,MAAM,WAAW;AAC3B,YAAU,MAAM,SAAS;AACzB,YAAU,MAAM,aAAa;AAC7B,YAAU,MAAM,eAAe;AAC/B,YAAU,MAAM,UAAU;AAC1B,YAAU,MAAM,YAAY;AAG5B,QAAM,WAAW,SAAS,cAAc,QAAQ;AAChD,WAAS,cAAc;AACvB,SAAO,OAAO,SAAS,OAAO;AAAA,IAC5B,UAAU;AAAA,IACV,KAAK;AAAA,IACL,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,cAAc;AAAA,IACd,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV,CAAC;AACD,WAAS,iBAAiB,SAAS,MAAM,mBAAmB,CAAC;AAC7D,YAAU,YAAY,QAAQ;AAG9B,QAAM,QAAQ,SAAS,cAAc,IAAI;AACzC,QAAM,cAAc;AACpB,SAAO,OAAO,MAAM,OAAO;AAAA,IACzB,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,EAChB,CAAC;AAGD,QAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,UAAQ,cAAc,OAAO,WAAW;AACxC,SAAO,OAAO,QAAQ,OAAO;AAAA,IAC3B,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,cAAc;AAAA,IACd,WAAW;AAAA,IACX,OAAO;AAAA,EACT,CAAC;AAGD,QAAM,QAAQ,SAAS,cAAc,KAAK;AAC1C,QAAM,cAAc,OAAO,SAAS;AACpC,SAAO,OAAO,MAAM,OAAO;AAAA,IACzB,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,OAAO;AAAA,EACT,CAAC;AAED,YAAU,YAAY,KAAK;AAC3B,YAAU,YAAY,OAAO;AAC7B,YAAU,YAAY,KAAK;AAC3B,UAAQ,YAAY,SAAS;AAC7B,WAAS,KAAK,YAAY,OAAO;AAGjC,wBAAsB,MAAM;AAC1B,YAAQ,MAAM,UAAU;AAAA,EAC1B,CAAC;AAGD,UAAQ,MAAM,0BAA0B,KAAK;AAC/C;AA3FgB;AAmGT,SAAS,qBAAqB;AACnC,QAAM,WAAW,SAAS,eAAe,mBAAmB;AAC5D,MAAI,UAAU;AACZ,aAAS,MAAM,UAAU;AACzB,eAAW,MAAM,SAAS,OAAO,GAAG,GAAG;AAAA,EACzC;AACF;AANgB;",
3
+ "sources": ["../../error/errorOverlay.ts"],
4
+ "sourcesContent": ["/* MIT License\r\n\r\n* Copyright (c) 2026 Resty Gonzales\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n* SOFTWARE.\r\n */\r\n/**\r\n * @fileoverview Development error overlay for Fynix applications.\r\n * Displays runtime errors in a user-friendly overlay during development.\r\n */\r\n\r\n/**\r\n * Display an error overlay with error details.\r\n * Shows error message, stack trace, and a close button.\r\n *\r\n * @param {Error} error - The error object to display\r\n * @returns {void}\r\n *\r\n * @example\r\n * try {\r\n * // some code\r\n * } catch (err) {\r\n * showErrorOverlay(err);\r\n * }\r\n */\r\nexport function showErrorOverlay(error: Error): void {\r\n removeErrorOverlay();\r\n\r\n const overlay = document.createElement(\"div\");\r\n overlay.id = \"dev-error-overlay\";\r\n Object.assign(overlay.style, {\r\n position: \"fixed\",\r\n inset: 0,\r\n width: \"100%\",\r\n height: \"100%\",\r\n backgroundColor: \"rgba(0, 0, 0, 0.9)\",\r\n color: \"#fff\",\r\n fontFamily: \"Consolas, monospace\",\r\n padding: \"30px\",\r\n zIndex: 99999,\r\n overflowY: \"auto\",\r\n transition: \"opacity 0.25s ease\",\r\n opacity: \"0\",\r\n });\r\n\r\n const container = document.createElement(\"div\");\r\n container.style.position = \"relative\"; // important for absolute button\r\n container.style.maxWidth = \"900px\";\r\n container.style.margin = \"50px auto\";\r\n container.style.background = \"rgba(255, 255, 255, 0.05)\";\r\n container.style.borderRadius = \"8px\";\r\n container.style.padding = \"20px 30px\";\r\n container.style.boxShadow = \"0 0 10px rgba(255, 0, 0, 0.3)\";\r\n\r\n // Close Button\r\n const closeBtn = document.createElement(\"button\");\r\n closeBtn.textContent = \"\u00D7 Close\";\r\n Object.assign(closeBtn.style, {\r\n position: \"absolute\",\r\n top: \"10px\",\r\n right: \"10px\",\r\n background: \"#ff5555\",\r\n color: \"#fff\",\r\n border: \"none\",\r\n padding: \"6px 12px\",\r\n fontSize: \"16px\",\r\n borderRadius: \"4px\",\r\n cursor: \"pointer\",\r\n zIndex: 10,\r\n });\r\n closeBtn.addEventListener(\"click\", () => removeErrorOverlay());\r\n container.appendChild(closeBtn);\r\n\r\n // Title\r\n const title = document.createElement(\"h1\");\r\n title.textContent = \"Runtime Error\";\r\n Object.assign(title.style, {\r\n color: \"#ff5555\",\r\n fontSize: \"24px\",\r\n marginBottom: \"10px\",\r\n });\r\n\r\n // Message\r\n const message = document.createElement(\"pre\");\r\n message.textContent = error?.message || \"Unknown error\";\r\n Object.assign(message.style, {\r\n whiteSpace: \"pre-wrap\",\r\n background: \"rgba(255, 255, 255, 0.1)\",\r\n padding: \"10px\",\r\n borderRadius: \"6px\",\r\n marginTop: \"10px\",\r\n color: \"#ffaaaa\",\r\n });\r\n\r\n // Stack trace\r\n const stack = document.createElement(\"pre\");\r\n stack.textContent = error?.stack || \"\";\r\n Object.assign(stack.style, {\r\n whiteSpace: \"pre-wrap\",\r\n marginTop: \"15px\",\r\n color: \"#ccc\",\r\n });\r\n\r\n container.appendChild(title);\r\n container.appendChild(message);\r\n container.appendChild(stack);\r\n overlay.appendChild(container);\r\n document.body.appendChild(overlay);\r\n\r\n // Smooth fade-in\r\n requestAnimationFrame(() => {\r\n overlay.style.opacity = \"1\";\r\n });\r\n\r\n // Console log\r\n console.error(\"[FynixJS Runtime Error]\", error);\r\n}\r\n\r\n/**\r\n * Remove the error overlay from the DOM.\r\n * Fades out the overlay before removing it.\r\n *\r\n * @returns {void}\r\n */\r\nexport function removeErrorOverlay(): void {\r\n const existing = document.getElementById(\"dev-error-overlay\");\r\n if (existing) {\r\n existing.style.opacity = \"0\";\r\n setTimeout(() => existing.remove(), 200);\r\n }\r\n}\r\n"],
5
+ "mappings": ";;AAyCO,SAAS,iBAAiB,OAAoB;AACnD,qBAAmB;AAEnB,QAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,UAAQ,KAAK;AACb,SAAO,OAAO,QAAQ,OAAO;AAAA,IAC3B,UAAU;AAAA,IACV,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,EACX,CAAC;AAED,QAAM,YAAY,SAAS,cAAc,KAAK;AAC9C,YAAU,MAAM,WAAW;AAC3B,YAAU,MAAM,WAAW;AAC3B,YAAU,MAAM,SAAS;AACzB,YAAU,MAAM,aAAa;AAC7B,YAAU,MAAM,eAAe;AAC/B,YAAU,MAAM,UAAU;AAC1B,YAAU,MAAM,YAAY;AAG5B,QAAM,WAAW,SAAS,cAAc,QAAQ;AAChD,WAAS,cAAc;AACvB,SAAO,OAAO,SAAS,OAAO;AAAA,IAC5B,UAAU;AAAA,IACV,KAAK;AAAA,IACL,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,cAAc;AAAA,IACd,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV,CAAC;AACD,WAAS,iBAAiB,SAAS,MAAM,mBAAmB,CAAC;AAC7D,YAAU,YAAY,QAAQ;AAG9B,QAAM,QAAQ,SAAS,cAAc,IAAI;AACzC,QAAM,cAAc;AACpB,SAAO,OAAO,MAAM,OAAO;AAAA,IACzB,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,EAChB,CAAC;AAGD,QAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,UAAQ,cAAc,OAAO,WAAW;AACxC,SAAO,OAAO,QAAQ,OAAO;AAAA,IAC3B,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,cAAc;AAAA,IACd,WAAW;AAAA,IACX,OAAO;AAAA,EACT,CAAC;AAGD,QAAM,QAAQ,SAAS,cAAc,KAAK;AAC1C,QAAM,cAAc,OAAO,SAAS;AACpC,SAAO,OAAO,MAAM,OAAO;AAAA,IACzB,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,OAAO;AAAA,EACT,CAAC;AAED,YAAU,YAAY,KAAK;AAC3B,YAAU,YAAY,OAAO;AAC7B,YAAU,YAAY,KAAK;AAC3B,UAAQ,YAAY,SAAS;AAC7B,WAAS,KAAK,YAAY,OAAO;AAGjC,wBAAsB,MAAM;AAC1B,YAAQ,MAAM,UAAU;AAAA,EAC1B,CAAC;AAGD,UAAQ,MAAM,2BAA2B,KAAK;AAChD;AA3FgB;AAmGT,SAAS,qBAA2B;AACzC,QAAM,WAAW,SAAS,eAAe,mBAAmB;AAC5D,MAAI,UAAU;AACZ,aAAS,MAAM,UAAU;AACzB,eAAW,MAAM,SAAS,OAAO,GAAG,GAAG;AAAA,EACzC;AACF;AANgB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,5 @@
1
+ export * from "../runtime.js";
2
+ export * from "../router/router.js";
3
+ export { default as createFynix } from "../router/router.js";
4
+ export { Fynix } from "../runtime.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../fynix/index.ts"],"names":[],"mappings":"AAuBA,cAAc,eAAe,CAAC;AAE9B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC"}
@@ -1,9 +1,4 @@
1
1
  export * from "../runtime.js";
2
- import { Fynix } from "../runtime.js";
3
2
  export * from "../router/router.js";
4
- import { default as default2 } from "../router/router.js";
5
- export {
6
- Fynix,
7
- default2 as createFynix
8
- };
9
- //# sourceMappingURL=index.js.map
3
+ export { default as createFynix } from "../router/router.js";
4
+ export { Fynix } from "../runtime.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../fynix/index.js"],
4
- "sourcesContent": ["// fynix/index.js - Single entry point for all core functionality\r\nexport * from \"../runtime.js\";\r\n// Re-export Fynix namespace and hooks under new names\r\nexport { Fynix} from \"../runtime.js\";\r\nexport * from \"../router/router.js\";\r\nexport { default as createFynix } from \"../router/router.js\";\r\n"],
5
- "mappings": "AACA,cAAc;AAEd,SAAS,aAAY;AACrB,cAAc;AACd,SAAoB,WAAXA,gBAA8B;",
3
+ "sources": ["../../fynix/index.ts"],
4
+ "sourcesContent": ["/* MIT License\r\n\r\n* Copyright (c) 2026 Resty Gonzales\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n* SOFTWARE.\r\n */\r\n// fynix/index.js - Single entry point for all core functionality\r\nexport * from \"../runtime.js\";\r\n// Re-export Fynix namespace and hooks under new names\r\nexport * from \"../router/router.js\";\r\nexport { default as createFynix } from \"../router/router.js\";\r\nexport { Fynix } from \"../runtime.js\";\r\n"],
5
+ "mappings": "AAuBA,cAAc;AAEd,cAAc;AACd,SAAoB,WAAXA,gBAA8B;AACvC,SAAS,aAAa;",
6
6
  "names": ["default"]
7
7
  }
@@ -0,0 +1,14 @@
1
+ export declare function nixAsync<T>(promiseFactory: (signal: AbortSignal) => Promise<T>): {
2
+ data: {
3
+ value: T | null;
4
+ };
5
+ error: {
6
+ value: Error | null;
7
+ };
8
+ loading: {
9
+ value: boolean;
10
+ };
11
+ run: () => Promise<void>;
12
+ cancel: () => void;
13
+ };
14
+ //# sourceMappingURL=nixAsync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nixAsync.d.ts","sourceRoot":"","sources":["../../hooks/nixAsync.ts"],"names":[],"mappings":"AA+BA,wBAAgB,QAAQ,CAAC,CAAC,EACxB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAClD;IACD,IAAI,EAAE;QAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;IAC1B,KAAK,EAAE;QAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;KAAE,CAAC;IAC/B,OAAO,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IAC5B,GAAG,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAwCA"}