fynixui 1.0.10

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 (129) hide show
  1. package/LICENSE +21 -0
  2. package/dist/context/context.d.ts +19 -0
  3. package/dist/context/context.d.ts.map +1 -0
  4. package/dist/context/context.js +4 -0
  5. package/dist/context/context.js.map +7 -0
  6. package/dist/custom/button.d.ts +2 -0
  7. package/dist/custom/button.d.ts.map +1 -0
  8. package/dist/custom/button.js +4 -0
  9. package/dist/custom/button.js.map +7 -0
  10. package/dist/custom/index.d.ts +3 -0
  11. package/dist/custom/index.d.ts.map +1 -0
  12. package/dist/custom/index.js +2 -0
  13. package/dist/custom/index.js.map +7 -0
  14. package/dist/custom/path.d.ts +14 -0
  15. package/dist/custom/path.d.ts.map +1 -0
  16. package/dist/custom/path.js +20 -0
  17. package/dist/custom/path.js.map +7 -0
  18. package/dist/error/errorOverlay.d.ts +3 -0
  19. package/dist/error/errorOverlay.d.ts.map +1 -0
  20. package/dist/error/errorOverlay.js +84 -0
  21. package/dist/error/errorOverlay.js.map +7 -0
  22. package/dist/fynix/index.d.ts +6 -0
  23. package/dist/fynix/index.d.ts.map +1 -0
  24. package/dist/fynix/index.js +5 -0
  25. package/dist/fynix/index.js.map +7 -0
  26. package/dist/hooks/nixAsync.d.ts +20 -0
  27. package/dist/hooks/nixAsync.d.ts.map +1 -0
  28. package/dist/hooks/nixAsync.js +114 -0
  29. package/dist/hooks/nixAsync.js.map +7 -0
  30. package/dist/hooks/nixAsyncCache.d.ts +19 -0
  31. package/dist/hooks/nixAsyncCache.d.ts.map +1 -0
  32. package/dist/hooks/nixAsyncCache.js +137 -0
  33. package/dist/hooks/nixAsyncCache.js.map +7 -0
  34. package/dist/hooks/nixAsyncDebounce.d.ts +22 -0
  35. package/dist/hooks/nixAsyncDebounce.d.ts.map +1 -0
  36. package/dist/hooks/nixAsyncDebounce.js +77 -0
  37. package/dist/hooks/nixAsyncDebounce.js.map +7 -0
  38. package/dist/hooks/nixAsyncQuery.d.ts +16 -0
  39. package/dist/hooks/nixAsyncQuery.d.ts.map +1 -0
  40. package/dist/hooks/nixAsyncQuery.js +87 -0
  41. package/dist/hooks/nixAsyncQuery.js.map +7 -0
  42. package/dist/hooks/nixCallback.d.ts +2 -0
  43. package/dist/hooks/nixCallback.d.ts.map +1 -0
  44. package/dist/hooks/nixCallback.js +34 -0
  45. package/dist/hooks/nixCallback.js.map +7 -0
  46. package/dist/hooks/nixComputed.d.ts +16 -0
  47. package/dist/hooks/nixComputed.d.ts.map +1 -0
  48. package/dist/hooks/nixComputed.js +175 -0
  49. package/dist/hooks/nixComputed.js.map +7 -0
  50. package/dist/hooks/nixDebounce.d.ts +11 -0
  51. package/dist/hooks/nixDebounce.d.ts.map +1 -0
  52. package/dist/hooks/nixDebounce.js +55 -0
  53. package/dist/hooks/nixDebounce.js.map +7 -0
  54. package/dist/hooks/nixEffect.d.ts +4 -0
  55. package/dist/hooks/nixEffect.d.ts.map +1 -0
  56. package/dist/hooks/nixEffect.js +75 -0
  57. package/dist/hooks/nixEffect.js.map +7 -0
  58. package/dist/hooks/nixFor.d.ts +13 -0
  59. package/dist/hooks/nixFor.d.ts.map +1 -0
  60. package/dist/hooks/nixFor.js +43 -0
  61. package/dist/hooks/nixFor.js.map +7 -0
  62. package/dist/hooks/nixForm.d.ts +33 -0
  63. package/dist/hooks/nixForm.d.ts.map +1 -0
  64. package/dist/hooks/nixForm.js +123 -0
  65. package/dist/hooks/nixForm.js.map +7 -0
  66. package/dist/hooks/nixFormAsync.d.ts +42 -0
  67. package/dist/hooks/nixFormAsync.d.ts.map +1 -0
  68. package/dist/hooks/nixFormAsync.js +169 -0
  69. package/dist/hooks/nixFormAsync.js.map +7 -0
  70. package/dist/hooks/nixInterval.d.ts +2 -0
  71. package/dist/hooks/nixInterval.d.ts.map +1 -0
  72. package/dist/hooks/nixInterval.js +23 -0
  73. package/dist/hooks/nixInterval.js.map +7 -0
  74. package/dist/hooks/nixLazy.d.ts +8 -0
  75. package/dist/hooks/nixLazy.d.ts.map +1 -0
  76. package/dist/hooks/nixLazy.js +58 -0
  77. package/dist/hooks/nixLazy.js.map +7 -0
  78. package/dist/hooks/nixLazyAsync.d.ts +10 -0
  79. package/dist/hooks/nixLazyAsync.d.ts.map +1 -0
  80. package/dist/hooks/nixLazyAsync.js +71 -0
  81. package/dist/hooks/nixLazyAsync.js.map +7 -0
  82. package/dist/hooks/nixLazyFormAsync.d.ts +50 -0
  83. package/dist/hooks/nixLazyFormAsync.d.ts.map +1 -0
  84. package/dist/hooks/nixLazyFormAsync.js +221 -0
  85. package/dist/hooks/nixLazyFormAsync.js.map +7 -0
  86. package/dist/hooks/nixLocalStorage.d.ts +8 -0
  87. package/dist/hooks/nixLocalStorage.d.ts.map +1 -0
  88. package/dist/hooks/nixLocalStorage.js +136 -0
  89. package/dist/hooks/nixLocalStorage.js.map +7 -0
  90. package/dist/hooks/nixMemo.d.ts +2 -0
  91. package/dist/hooks/nixMemo.d.ts.map +1 -0
  92. package/dist/hooks/nixMemo.js +30 -0
  93. package/dist/hooks/nixMemo.js.map +7 -0
  94. package/dist/hooks/nixPrevious.d.ts +2 -0
  95. package/dist/hooks/nixPrevious.d.ts.map +1 -0
  96. package/dist/hooks/nixPrevious.js +15 -0
  97. package/dist/hooks/nixPrevious.js.map +7 -0
  98. package/dist/hooks/nixRef.d.ts +4 -0
  99. package/dist/hooks/nixRef.d.ts.map +1 -0
  100. package/dist/hooks/nixRef.js +17 -0
  101. package/dist/hooks/nixRef.js.map +7 -0
  102. package/dist/hooks/nixState.d.ts +15 -0
  103. package/dist/hooks/nixState.d.ts.map +1 -0
  104. package/dist/hooks/nixState.js +127 -0
  105. package/dist/hooks/nixState.js.map +7 -0
  106. package/dist/hooks/nixStore.d.ts +10 -0
  107. package/dist/hooks/nixStore.d.ts.map +1 -0
  108. package/dist/hooks/nixStore.js +103 -0
  109. package/dist/hooks/nixStore.js.map +7 -0
  110. package/dist/package.json +221 -0
  111. package/dist/plugins/vite-plugin-res.d.ts +38 -0
  112. package/dist/plugins/vite-plugin-res.d.ts.map +1 -0
  113. package/dist/plugins/vite-plugin-res.js +106 -0
  114. package/dist/plugins/vite-plugin-res.js.map +7 -0
  115. package/dist/router/router.d.ts +48 -0
  116. package/dist/router/router.d.ts.map +1 -0
  117. package/dist/router/router.js +872 -0
  118. package/dist/router/router.js.map +7 -0
  119. package/dist/runtime.d.ts +124 -0
  120. package/dist/runtime.d.ts.map +1 -0
  121. package/dist/runtime.js +1361 -0
  122. package/dist/runtime.js.map +7 -0
  123. package/package.json +254 -0
  124. package/types/fnx.d.ts +34 -0
  125. package/types/fynix-ui.d.ts +323 -0
  126. package/types/global.d.ts +279 -0
  127. package/types/index.d.ts +37 -0
  128. package/types/jsx.d.ts +993 -0
  129. package/types/vite-env.d.ts +545 -0
@@ -0,0 +1,323 @@
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.
22
+ */
23
+
24
+ declare module "fynixui" {
25
+ // ============================================
26
+ // Core Types
27
+ // ============================================
28
+
29
+ export type VNode = {
30
+ type: string | symbol | ((props: any) => any);
31
+ props: Record<string, any>;
32
+ key: string | number | null;
33
+ _domNode?: Node;
34
+ _rendered?: VNode;
35
+ _state?: any;
36
+ };
37
+
38
+ // ============================================
39
+ // State Management Types
40
+ // ============================================
41
+
42
+ export type NixState<T> = {
43
+ value: T;
44
+ subscribe: (fn: (value: T) => void) => () => void;
45
+ cleanup: () => void;
46
+ getSubscriberCount: () => number;
47
+ isDestroyed: () => boolean;
48
+ asReadOnly: () => {
49
+ value: T;
50
+ subscribe: (fn: (value: T) => void) => () => void;
51
+ _isNixState: true;
52
+ _isReadOnly: true;
53
+ };
54
+ _isNixState: true;
55
+ };
56
+
57
+ export interface NixStore<T extends Record<string, any>> {
58
+ _isNixStore: true;
59
+ subscribe(callback: () => void): () => void;
60
+ getState(): T;
61
+ setState(updates: Partial<T> | ((state: T) => Partial<T>)): void;
62
+ [key: string]: any;
63
+ }
64
+
65
+ export interface NixAsyncResult<T> {
66
+ data: T | null;
67
+ loading: boolean;
68
+ error: Error | null;
69
+ refetch: () => Promise<void>;
70
+ }
71
+
72
+ export interface NixFormField<T = any> {
73
+ value: T;
74
+ error: string | null;
75
+ touched: boolean;
76
+ }
77
+
78
+ export interface NixFormState<T extends Record<string, any>> {
79
+ values: { [K in keyof T]: NixFormField<T[K]> };
80
+ isValid: boolean;
81
+ isSubmitting: boolean;
82
+ errors: { [K in keyof T]?: string };
83
+ handleSubmit: (
84
+ onSubmit: (values: T) => void | Promise<void>
85
+ ) => (e?: Event) => Promise<void>;
86
+ reset: () => void;
87
+ setFieldValue: <K extends keyof T>(field: K, value: T[K]) => void;
88
+ setFieldError: <K extends keyof T>(field: K, error: string) => void;
89
+ }
90
+
91
+ export interface NixLazyComponent {
92
+ Component: any;
93
+ loading: boolean;
94
+ error: Error | null;
95
+ }
96
+
97
+ // ============================================
98
+ // Hook Functions
99
+ // ============================================
100
+
101
+ /**
102
+ * Creates a reactive state that automatically updates the UI when changed.
103
+ * @param initialValue - The initial value for the state
104
+ * @returns A reactive state object with value getter/setter
105
+ * @example
106
+ * const count = nixState(0);
107
+ * count.value++; // Updates UI automatically
108
+ */
109
+ export function nixState<T>(initialValue: T): NixState<T>;
110
+
111
+ /**
112
+ * Creates a reactive store for managing multiple related state values.
113
+ * @param initialState - The initial state object
114
+ * @returns A reactive store with direct property access
115
+ * @example
116
+ * const user = nixStore({ name: 'John', age: 30 });
117
+ * user.name = 'Jane'; // Updates UI automatically
118
+ */
119
+ export function nixStore<T extends Record<string, any>>(
120
+ initialState: T
121
+ ): NixStore<T>;
122
+
123
+ /**
124
+ * Manages async operations with loading and error states.
125
+ * @param fn - Async function to execute
126
+ * @returns Object with data, loading, error, and refetch
127
+ * @example
128
+ * const result = nixAsync(() => fetch('/api/data').then(r => r.json()));
129
+ */
130
+ export function nixAsync<T>(fn: () => Promise<T>): NixAsyncResult<T>;
131
+
132
+ /**
133
+ * Runs side effects when dependencies change.
134
+ * @param fn - Effect function, can return cleanup function
135
+ * @param deps - Array of dependencies
136
+ * @example
137
+ * nixEffect(() => {
138
+ * console.log('Count changed:', count.value);
139
+ * return () => console.log('Cleanup');
140
+ * }, [count]);
141
+ */
142
+ export function nixEffect(fn: () => void | (() => void), deps?: any[]): void;
143
+
144
+ /**
145
+ * Creates a computed value that updates when dependencies change.
146
+ * @param fn - Computation function
147
+ * @param deps - Array of dependencies
148
+ * @returns Reactive state with computed value
149
+ * @example
150
+ * const doubled = nixComputed(() => count.value * 2, [count]);
151
+ */
152
+ export function nixComputed<T>(fn: () => T, deps: any[]): NixState<T>;
153
+
154
+ /**
155
+ * Creates a form state manager with validation.
156
+ * @param config - Form configuration
157
+ * @returns Form state manager
158
+ * @example
159
+ * const form = nixForm({
160
+ * initialValues: { email: '', password: '' },
161
+ * onSubmit: (values) => console.log(values),
162
+ * validate: (values) => ({
163
+ * email: !values.email ? 'Required' : null
164
+ * })
165
+ * });
166
+ */
167
+ export function nixForm<T extends Record<string, any>>(config: {
168
+ initialValues: T;
169
+ onSubmit: (values: T) => void | Promise<void>;
170
+ validate?: (values: T) => { [K in keyof T]?: string };
171
+ }): NixFormState<T>;
172
+
173
+ /**
174
+ * Memoizes a computed value to prevent unnecessary recalculations.
175
+ */
176
+ export function nixMemo<T>(fn: () => T, deps: any[]): T;
177
+
178
+ /**
179
+ * Creates a memoized callback function.
180
+ */
181
+ export function nixCallback<T extends (...args: any[]) => any>(
182
+ callback: T,
183
+ deps: any[]
184
+ ): T;
185
+
186
+ /**
187
+ * Creates a reference to a DOM element or value.
188
+ */
189
+ export function nixRef<T = any>(
190
+ initialValue?: T
191
+ ): {
192
+ current: T;
193
+ };
194
+
195
+ /**
196
+ * Returns the previous value of a state or variable.
197
+ */
198
+ export function nixPrevious<T>(value: T): T | undefined;
199
+
200
+ /**
201
+ * Debounces a value update.
202
+ */
203
+ export function nixDebounce<T>(value: T, delay: number): NixState<T>;
204
+
205
+ /**
206
+ * Manages intervals within component lifecycle.
207
+ */
208
+ export function nixInterval(callback: () => void, delay: number | null): void;
209
+
210
+ /**
211
+ * Manages localStorage with reactive updates.
212
+ */
213
+ export function nixLocalStorage<T>(key: string, initialValue: T): NixState<T>;
214
+
215
+ /**
216
+ * Lazy loads a component.
217
+ */
218
+ export function nixLazy(
219
+ loader: () => Promise<{ default: any }>
220
+ ): NixLazyComponent;
221
+
222
+ /**
223
+ * Effect that runs only once on mount.
224
+ */
225
+ export function nixEffectOnce(fn: () => void | (() => void)): void;
226
+
227
+ /**
228
+ * Effect that runs on every render.
229
+ */
230
+ export function nixEffectAlways(fn: () => void | (() => void)): void;
231
+
232
+ /**
233
+ * Async with caching support.
234
+ */
235
+ export function nixAsyncCached<T>(
236
+ key: string,
237
+ fn: () => Promise<T>
238
+ ): NixAsyncResult<T>;
239
+
240
+ /**
241
+ * Async with debouncing.
242
+ */
243
+ export function nixAsyncDebounce<T>(
244
+ fn: () => Promise<T>,
245
+ delay: number
246
+ ): NixAsyncResult<T>;
247
+
248
+ /**
249
+ * Async with query parameters.
250
+ */
251
+ export function nixAsyncQuery<T>(
252
+ fn: (query: any) => Promise<T>,
253
+ query: any
254
+ ): NixAsyncResult<T>;
255
+
256
+ /**
257
+ * Form with async validation.
258
+ */
259
+ export function nixFormAsync<T extends Record<string, any>>(config: {
260
+ initialValues: T;
261
+ onSubmit: (values: T) => Promise<void>;
262
+ validate?: (values: T) => Promise<{ [K in keyof T]?: string }>;
263
+ }): NixFormState<T>;
264
+
265
+ /**
266
+ * Lazy async operation.
267
+ */
268
+ export function nixLazyAsync<T>(loader: () => Promise<T>): NixAsyncResult<T>;
269
+
270
+ /**
271
+ * Lazy form with async operations.
272
+ */
273
+ export function nixLazyFormAsync<T extends Record<string, any>>(config: {
274
+ initialValues: T;
275
+ onSubmit: (values: T) => Promise<void>;
276
+ }): NixFormState<T>;
277
+
278
+ // ============================================
279
+ // JSX Factory
280
+ // ============================================
281
+
282
+ export namespace Fynix {
283
+ export function Fragment(props: { children?: any }): VNode;
284
+ }
285
+
286
+ export function Fynix(
287
+ type: string | symbol | ((props: any) => any),
288
+ props: any,
289
+ ...children: any[]
290
+ ): VNode;
291
+
292
+ // ============================================
293
+ // Router
294
+ // ============================================
295
+
296
+ export interface FynixRouter {
297
+ mountRouter(selector?: string): void;
298
+ navigate(path: string, props?: Record<string, any>): void;
299
+ replace(path: string, props?: Record<string, any>): void;
300
+ back(): void;
301
+ cleanup(): void;
302
+ }
303
+
304
+ // Fixed: createFynix can accept optional routes or no arguments
305
+ export function createFynix(routes?: Record<string, any>): FynixRouter;
306
+ export default createFynix;
307
+
308
+ // ============================================
309
+ // Components
310
+ // ============================================
311
+
312
+ export function Suspense(props: { fallback: any; children: any }): VNode;
313
+
314
+ export function Button(props: any): VNode;
315
+ export function Path(props: any): VNode;
316
+
317
+ // ============================================
318
+ // Utilities
319
+ // ============================================
320
+
321
+ export const TEXT: unique symbol;
322
+ export const Fragment: unique symbol;
323
+ }
@@ -0,0 +1,279 @@
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.
22
+ */
23
+ /**
24
+ * Virtual DOM node type - re-exported from fnx.d.ts (single source of truth)
25
+ */
26
+ export type { VNode } from "./fnx";
27
+
28
+ // global.d.ts - Fynix Global Type Declarations
29
+
30
+ /**
31
+ * Reactive state object - references actual nixState return type
32
+ */
33
+ export type NixState<T> = {
34
+ value: T;
35
+ subscribe: (fn: (value: T) => void) => () => void;
36
+ cleanup: () => void;
37
+ getSubscriberCount: () => number;
38
+ isDestroyed: () => boolean;
39
+ asReadOnly: () => {
40
+ value: T;
41
+ subscribe: (fn: (value: T) => void) => () => void;
42
+ _isNixState: true;
43
+ _isReadOnly: true;
44
+ };
45
+ _isNixState: true;
46
+ };
47
+
48
+ /**
49
+ * Reactive store object
50
+ */
51
+ interface NixStore<T extends Record<string, any>> {
52
+ _isNixStore: true;
53
+ subscribe(callback: () => void): () => void;
54
+ getState(): T;
55
+ setState(updates: Partial<T> | ((state: T) => Partial<T>)): void;
56
+ [key: string]: any;
57
+ }
58
+
59
+ /**
60
+ * Async state result
61
+ */
62
+ interface NixAsyncResult<T> {
63
+ data: T | null;
64
+ loading: boolean;
65
+ error: Error | null;
66
+ refetch: () => Promise<void>;
67
+ }
68
+
69
+ /**
70
+ * Form field
71
+ */
72
+ interface NixFormField<T = any> {
73
+ value: T;
74
+ error: string | null;
75
+ touched: boolean;
76
+ }
77
+
78
+ /**
79
+ * Form state
80
+ */
81
+ interface NixFormState<T extends Record<string, any>> {
82
+ values: { [K in keyof T]: NixFormField<T[K]> };
83
+ isValid: boolean;
84
+ isSubmitting: boolean;
85
+ errors: { [K in keyof T]?: string };
86
+ handleSubmit: (
87
+ onSubmit: (values: T) => void | Promise<void>
88
+ ) => (e?: Event) => Promise<void>;
89
+ reset: () => void;
90
+ setFieldValue: <K extends keyof T>(field: K, value: T[K]) => void;
91
+ setFieldError: <K extends keyof T>(field: K, error: string) => void;
92
+ }
93
+
94
+ /**
95
+ * Lazy component result
96
+ */
97
+ interface NixLazyComponent {
98
+ Component: any;
99
+ loading: boolean;
100
+ error: Error | null;
101
+ }
102
+
103
+ /**
104
+ * Fynix Router instance
105
+ */
106
+ interface FynixRouter {
107
+ mountRouter(selector?: string): void;
108
+ navigate(path: string, props?: Record<string, any>): void;
109
+ replace(path: string, props?: Record<string, any>): void;
110
+ back(): void;
111
+ cleanup(): void;
112
+ routes: Record<string, any>;
113
+ dynamicRoutes: Array<{
114
+ pattern: string;
115
+ regex: RegExp;
116
+ component: any;
117
+ params: string[];
118
+ }>;
119
+ }
120
+
121
+ /**
122
+ * Window object extensions for Fynix framework
123
+ */
124
+ interface Window {
125
+ /** Cache for router props to prevent memory leaks */
126
+ __fynixPropsCache?: Map<string, any>;
127
+
128
+ /** Link props namespace for router navigation */
129
+ __fynixLinkProps__?: Record<string, any>;
130
+
131
+ /** Last route props passed to components */
132
+ __lastRouteProps?: any;
133
+
134
+ /** Fynix global state and utilities */
135
+ __fynix__?: {
136
+ /** Current route props */
137
+ lastRouteProps?: any;
138
+ /** Force re-render function */
139
+ rerender?: () => void;
140
+ /** Hot Module Replacement handler */
141
+ hmr?: (ctx: { mod: any }) => void;
142
+ };
143
+ }
144
+
145
+ /**
146
+ * HTMLElement extensions for event delegation and Fynix internals
147
+ */
148
+ interface HTMLElement {
149
+ /** Event delegation ID for r-* event handlers */
150
+ _rest_eid?: number;
151
+
152
+ /** Fynix internal data storage */
153
+ _fynix_?: any;
154
+ }
155
+
156
+ /**
157
+ * Node extensions for Fynix virtual DOM
158
+ */
159
+ interface Node {
160
+ /** Event delegation ID */
161
+ _rest_eid?: number;
162
+ /** Fynix cleanup functions */
163
+ _fynixCleanups?: Array<() => void>;
164
+ }
165
+
166
+ /**
167
+ * Text node type with nodeValue
168
+ */
169
+ interface Text {
170
+ nodeValue: string | null;
171
+ }
172
+
173
+ /**
174
+ * Vite-specific import.meta extensions
175
+ */
176
+ interface ImportMeta {
177
+ /** Vite Hot Module Replacement API */
178
+ readonly hot?: {
179
+ /** Accept HMR updates */
180
+ accept: (cb?: (mod: any) => void) => void;
181
+ /** Cleanup before module disposal */
182
+ dispose: (cb: () => void) => void;
183
+ /** Decline HMR for this module */
184
+ decline?: () => void;
185
+ /** Invalidate and force full reload */
186
+ invalidate?: () => void;
187
+ /** Custom HMR event handling */
188
+ on?: (event: string, cb: (...args: any[]) => void) => void;
189
+ };
190
+
191
+ /** Vite glob import function */
192
+ readonly glob: <T = any>(
193
+ pattern: string,
194
+ options?: {
195
+ /** Load modules eagerly (at build time) */
196
+ eager?: boolean;
197
+ /** Import as URL strings */
198
+ as?: "url" | "raw";
199
+ /** Custom import query */
200
+ query?: Record<string, string | number | boolean>;
201
+ }
202
+ ) => Record<string, T>;
203
+
204
+ /** Environment variables */
205
+ readonly env: {
206
+ MODE: string;
207
+ BASE_URL: string;
208
+ PROD: boolean;
209
+ DEV: boolean;
210
+ SSR: boolean;
211
+ [key: string]: any;
212
+ };
213
+ }
214
+
215
+ /**
216
+ * Module declarations for non-TypeScript files
217
+ */
218
+ declare module "*.css" {
219
+ const content: string;
220
+ export default content;
221
+ }
222
+
223
+ declare module "*.scss" {
224
+ const content: string;
225
+ export default content;
226
+ }
227
+
228
+ declare module "*.svg" {
229
+ const content: string;
230
+ export default content;
231
+ }
232
+
233
+ declare module "*.png" {
234
+ const content: string;
235
+ export default content;
236
+ }
237
+
238
+ declare module "*.jpg" {
239
+ const content: string;
240
+ export default content;
241
+ }
242
+
243
+ declare module "*.jpeg" {
244
+ const content: string;
245
+ export default content;
246
+ }
247
+
248
+ declare module "*.gif" {
249
+ const content: string;
250
+ export default content;
251
+ }
252
+
253
+ declare module "*.webp" {
254
+ const content: string;
255
+ export default content;
256
+ }
257
+
258
+ /**
259
+ * Fynix-specific module patterns
260
+ */
261
+
262
+
263
+ declare module "*.js" {
264
+ const Component: any;
265
+ export default Component;
266
+ }
267
+ declare module "*.fnx" {
268
+ const Component: any;
269
+ export default Component;
270
+ }
271
+ declare module "*.ts" {
272
+ const Component: any;
273
+ export default Component;
274
+ }
275
+ /**
276
+ * Vite client types
277
+ */
278
+ /// <reference types="vite/client" />
279
+
@@ -0,0 +1,37 @@
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.
22
+ */
23
+ // Core type exports from @fynixorg/ui
24
+ export * from "./global";
25
+ export * from "./jsx";
26
+ export * from "./fnx";
27
+
28
+ // Re-export from runtime
29
+ export type {
30
+ VNode,
31
+ NixState,
32
+ NixStore,
33
+ NixAsyncResult,
34
+ NixFormState,
35
+ NixLazyComponent,
36
+ FynixRouter,
37
+ } from "./global";