@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.
- package/LICENSE +21 -0
- package/dist/README.md +36 -0
- package/dist/context/context.d.ts +19 -0
- package/dist/context/context.d.ts.map +1 -0
- package/dist/context/context.js +3 -11
- package/dist/context/context.js.map +3 -3
- package/dist/custom/button.d.ts +2 -0
- package/dist/custom/button.d.ts.map +1 -0
- package/dist/custom/button.js +2 -9
- package/dist/custom/button.js.map +3 -3
- package/dist/custom/index.d.ts +3 -0
- package/dist/custom/index.d.ts.map +1 -0
- package/dist/custom/index.js +2 -7
- package/dist/custom/index.js.map +3 -3
- package/dist/custom/path.d.ts +14 -0
- package/dist/custom/path.d.ts.map +1 -0
- package/dist/custom/path.js +17 -34
- package/dist/custom/path.js.map +3 -3
- package/dist/error/errorOverlay.d.ts +3 -0
- package/dist/error/errorOverlay.d.ts.map +1 -0
- package/dist/error/errorOverlay.js +82 -91
- package/dist/error/errorOverlay.js.map +3 -3
- package/dist/fynix/index.d.ts +5 -0
- package/dist/fynix/index.d.ts.map +1 -0
- package/dist/fynix/index.js +2 -7
- package/dist/fynix/index.js.map +3 -3
- package/dist/hooks/nixAsync.d.ts +14 -0
- package/dist/hooks/nixAsync.d.ts.map +1 -0
- package/dist/hooks/nixAsync.js +38 -43
- package/dist/hooks/nixAsync.js.map +3 -3
- package/dist/hooks/nixAsyncCache.d.ts +14 -0
- package/dist/hooks/nixAsyncCache.d.ts.map +1 -0
- package/dist/hooks/nixAsyncCache.js +57 -59
- package/dist/hooks/nixAsyncCache.js.map +3 -3
- package/dist/hooks/nixAsyncDebounce.d.ts +22 -0
- package/dist/hooks/nixAsyncDebounce.d.ts.map +1 -0
- package/dist/hooks/nixAsyncDebounce.js +74 -85
- package/dist/hooks/nixAsyncDebounce.js.map +3 -3
- package/dist/hooks/nixAsyncQuery.d.ts +16 -0
- package/dist/hooks/nixAsyncQuery.d.ts.map +1 -0
- package/dist/hooks/nixAsyncQuery.js +85 -79
- package/dist/hooks/nixAsyncQuery.js.map +3 -3
- package/dist/hooks/nixCallback.d.ts +2 -0
- package/dist/hooks/nixCallback.d.ts.map +1 -0
- package/dist/hooks/nixCallback.js +30 -40
- package/dist/hooks/nixCallback.js.map +3 -3
- package/dist/hooks/nixComputed.d.ts +16 -0
- package/dist/hooks/nixComputed.d.ts.map +1 -0
- package/dist/hooks/nixComputed.js +166 -198
- package/dist/hooks/nixComputed.js.map +4 -4
- package/dist/hooks/nixDebounce.d.ts +11 -0
- package/dist/hooks/nixDebounce.d.ts.map +1 -0
- package/dist/hooks/nixDebounce.js +53 -58
- package/dist/hooks/nixDebounce.js.map +3 -3
- package/dist/hooks/nixEffect.d.ts +4 -0
- package/dist/hooks/nixEffect.d.ts.map +1 -0
- package/dist/hooks/nixEffect.js +65 -75
- package/dist/hooks/nixEffect.js.map +3 -3
- package/dist/hooks/nixForm.d.ts +33 -0
- package/dist/hooks/nixForm.d.ts.map +1 -0
- package/dist/hooks/nixForm.js +110 -120
- package/dist/hooks/nixForm.js.map +3 -3
- package/dist/hooks/nixFormAsync.d.ts +42 -0
- package/dist/hooks/nixFormAsync.d.ts.map +1 -0
- package/dist/hooks/nixFormAsync.js +158 -167
- package/dist/hooks/nixFormAsync.js.map +3 -3
- package/dist/hooks/nixInterval.d.ts +2 -0
- package/dist/hooks/nixInterval.d.ts.map +1 -0
- package/dist/hooks/nixInterval.js +21 -27
- package/dist/hooks/nixInterval.js.map +3 -3
- package/dist/hooks/nixLazy.d.ts +8 -0
- package/dist/hooks/nixLazy.d.ts.map +1 -0
- package/dist/hooks/nixLazy.js +53 -58
- package/dist/hooks/nixLazy.js.map +3 -3
- package/dist/hooks/nixLazyAsync.d.ts +10 -0
- package/dist/hooks/nixLazyAsync.d.ts.map +1 -0
- package/dist/hooks/nixLazyAsync.js +65 -71
- package/dist/hooks/nixLazyAsync.js.map +3 -3
- package/dist/hooks/nixLazyFormAsync.d.ts +50 -0
- package/dist/hooks/nixLazyFormAsync.d.ts.map +1 -0
- package/dist/hooks/nixLazyFormAsync.js +209 -213
- package/dist/hooks/nixLazyFormAsync.js.map +3 -3
- package/dist/hooks/nixLocalStorage.d.ts +5 -0
- package/dist/hooks/nixLocalStorage.d.ts.map +1 -0
- package/dist/hooks/nixLocalStorage.js +21 -25
- package/dist/hooks/nixLocalStorage.js.map +3 -3
- package/dist/hooks/nixMemo.d.ts +2 -0
- package/dist/hooks/nixMemo.d.ts.map +1 -0
- package/dist/hooks/nixMemo.js +27 -31
- package/dist/hooks/nixMemo.js.map +3 -3
- package/dist/hooks/nixPrevious.d.ts +2 -0
- package/dist/hooks/nixPrevious.d.ts.map +1 -0
- package/dist/hooks/nixPrevious.js +13 -19
- package/dist/hooks/nixPrevious.js.map +3 -3
- package/dist/hooks/nixRef.d.ts +4 -0
- package/dist/hooks/nixRef.d.ts.map +1 -0
- package/dist/hooks/nixRef.js +14 -20
- package/dist/hooks/nixRef.js.map +3 -3
- package/dist/hooks/nixState.d.ts +15 -0
- package/dist/hooks/nixState.d.ts.map +1 -0
- package/dist/hooks/nixState.js +120 -173
- package/dist/hooks/nixState.js.map +3 -3
- package/dist/hooks/nixStore.d.ts +7 -0
- package/dist/hooks/nixStore.d.ts.map +1 -0
- package/dist/hooks/nixStore.js +48 -54
- package/dist/hooks/nixStore.js.map +3 -3
- package/dist/package.json +213 -0
- package/dist/plugins/vite-plugin-res.d.ts +41 -0
- package/dist/plugins/vite-plugin-res.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-res.js +620 -33
- package/dist/plugins/vite-plugin-res.js.map +4 -4
- package/dist/router/router.d.ts +35 -0
- package/dist/router/router.d.ts.map +1 -0
- package/dist/router/router.js +520 -486
- package/dist/router/router.js.map +3 -3
- package/dist/runtime.d.ts +62 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +833 -820
- package/dist/runtime.js.map +4 -4
- package/package.json +226 -43
- package/types/fnx.d.ts +72 -0
- package/types/fynix-ui.d.ts +323 -0
- package/types/global.d.ts +46 -6
- package/types/index.d.ts +37 -0
- package/types/vite-env.d.ts +553 -0
- package/runtime.d.ts +0 -83
- package/types/jsx.d.ts +0 -692
|
@@ -0,0 +1,553 @@
|
|
|
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
|
+
// =====================================================
|
|
25
|
+
// types/vite-env.d.ts - Complete Vite Environment Types
|
|
26
|
+
// =====================================================
|
|
27
|
+
/// <reference types="vite/client" />
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Environment variables available in import.meta.env
|
|
31
|
+
* Add your custom VITE_ prefixed variables here
|
|
32
|
+
*/
|
|
33
|
+
interface ImportMetaEnv {
|
|
34
|
+
// Vite built-in env variables
|
|
35
|
+
readonly MODE: string;
|
|
36
|
+
readonly BASE_URL: string;
|
|
37
|
+
readonly PROD: boolean;
|
|
38
|
+
readonly DEV: boolean;
|
|
39
|
+
readonly SSR: boolean;
|
|
40
|
+
|
|
41
|
+
// Custom Fynix environment variables
|
|
42
|
+
readonly VITE_APP_TITLE?: string;
|
|
43
|
+
readonly VITE_APP_VERSION?: string;
|
|
44
|
+
readonly VITE_API_URL?: string;
|
|
45
|
+
readonly VITE_API_KEY?: string;
|
|
46
|
+
readonly VITE_PUBLIC_PATH?: string;
|
|
47
|
+
readonly VITE_ROUTER_BASE?: string;
|
|
48
|
+
|
|
49
|
+
// Add more custom env variables as needed
|
|
50
|
+
// Example:
|
|
51
|
+
// readonly VITE_STRIPE_PUBLIC_KEY?: string;
|
|
52
|
+
// readonly VITE_FIREBASE_API_KEY?: string;
|
|
53
|
+
// readonly VITE_ANALYTICS_ID?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Extended ImportMeta interface for Vite
|
|
58
|
+
*/
|
|
59
|
+
interface ImportMeta {
|
|
60
|
+
/** Environment variables */
|
|
61
|
+
readonly env: ImportMetaEnv;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Vite Hot Module Replacement API
|
|
65
|
+
* @see https://vitejs.dev/guide/api-hmr.html
|
|
66
|
+
*/
|
|
67
|
+
readonly hot?: ViteHotContext;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Vite glob import - imports multiple modules
|
|
71
|
+
* @see https://vitejs.dev/guide/features.html#glob-import
|
|
72
|
+
*/
|
|
73
|
+
readonly glob: {
|
|
74
|
+
<T = any>(
|
|
75
|
+
pattern: string | string[],
|
|
76
|
+
options?: GlobOptions<true>
|
|
77
|
+
): Record<string, T>;
|
|
78
|
+
<T = any>(
|
|
79
|
+
pattern: string | string[],
|
|
80
|
+
options: GlobOptions<false>
|
|
81
|
+
): Record<string, () => Promise<T>>;
|
|
82
|
+
<T = any>(
|
|
83
|
+
pattern: string | string[],
|
|
84
|
+
options?: GlobOptions<boolean>
|
|
85
|
+
): Record<string, T | (() => Promise<T>)>;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Vite URL imports - import assets as URLs
|
|
90
|
+
* @see https://vitejs.dev/guide/assets.html#explicit-url-imports
|
|
91
|
+
*/
|
|
92
|
+
readonly url?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Vite HMR API Context
|
|
97
|
+
*/
|
|
98
|
+
interface ViteHotContext {
|
|
99
|
+
/**
|
|
100
|
+
* Accept hot updates for this module
|
|
101
|
+
* @param callback - Optional callback when module is updated
|
|
102
|
+
*/
|
|
103
|
+
accept(callback?: (newModule: any) => void): void;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Accept hot updates with specific dependencies
|
|
107
|
+
* @param deps - Array of dependency paths
|
|
108
|
+
* @param callback - Callback when dependencies are updated
|
|
109
|
+
*/
|
|
110
|
+
accept(
|
|
111
|
+
deps: string | string[],
|
|
112
|
+
callback: (newModules: any | any[]) => void
|
|
113
|
+
): void;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Cleanup before this module is replaced
|
|
117
|
+
* @param callback - Cleanup function
|
|
118
|
+
*/
|
|
119
|
+
dispose(callback: (data: any) => void): void;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Decline HMR for this module (forces full reload)
|
|
123
|
+
*/
|
|
124
|
+
decline(): void;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Invalidate this module and trigger a full reload
|
|
128
|
+
*/
|
|
129
|
+
invalidate(): void;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Listen for custom HMR events
|
|
133
|
+
* @param event - Event name
|
|
134
|
+
* @param callback - Event handler
|
|
135
|
+
*/
|
|
136
|
+
on<T = any>(event: string, callback: (payload: T) => void): void;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Send custom HMR event to all clients
|
|
140
|
+
* @param event - Event name
|
|
141
|
+
* @param data - Event payload
|
|
142
|
+
*/
|
|
143
|
+
send<T = any>(event: string, data?: T): void;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Data object persisted across hot updates
|
|
147
|
+
*/
|
|
148
|
+
data: any;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Prune accepted modules that are no longer imported
|
|
152
|
+
*/
|
|
153
|
+
prune(callback: (data: any) => void): void;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Glob import options
|
|
158
|
+
*/
|
|
159
|
+
interface GlobOptions<Eager extends boolean = boolean> {
|
|
160
|
+
/**
|
|
161
|
+
* Import modules eagerly (at build time)
|
|
162
|
+
* @default false
|
|
163
|
+
*/
|
|
164
|
+
eager?: Eager;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Import as specific type
|
|
168
|
+
* - 'url': Import as URL string
|
|
169
|
+
* - 'raw': Import as raw string
|
|
170
|
+
* - undefined: Import as module (default)
|
|
171
|
+
*/
|
|
172
|
+
as?: "url" | "raw";
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Custom import query parameters
|
|
176
|
+
*/
|
|
177
|
+
query?: string | Record<string, string | number | boolean> | URLSearchParams;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Import default export only
|
|
181
|
+
* @default true
|
|
182
|
+
*/
|
|
183
|
+
import?: string;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Glob patterns are case-sensitive
|
|
187
|
+
* @default true
|
|
188
|
+
*/
|
|
189
|
+
caseSensitive?: boolean;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Restrict glob to specific number of results
|
|
193
|
+
*/
|
|
194
|
+
exhaustive?: boolean;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Asset URL with query parameters
|
|
199
|
+
*/
|
|
200
|
+
type AssetUrl = string & {
|
|
201
|
+
/** Mark as asset URL type */
|
|
202
|
+
readonly __assetUrl: unique symbol;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Module declarations for asset imports
|
|
207
|
+
*/
|
|
208
|
+
declare module "*.svg" {
|
|
209
|
+
const content: string;
|
|
210
|
+
export default content;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare module "*.svg?component" {
|
|
214
|
+
import { FunctionalComponent, SVGAttributes } from "vue";
|
|
215
|
+
const component: FunctionalComponent<SVGAttributes>;
|
|
216
|
+
export default component;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
declare module "*.svg?url" {
|
|
220
|
+
const url: AssetUrl;
|
|
221
|
+
export default url;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
declare module "*.svg?raw" {
|
|
225
|
+
const content: string;
|
|
226
|
+
export default content;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
declare module "*.png" {
|
|
230
|
+
const url: AssetUrl;
|
|
231
|
+
export default url;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare module "*.jpg" {
|
|
235
|
+
const url: AssetUrl;
|
|
236
|
+
export default url;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
declare module "*.jpeg" {
|
|
240
|
+
const url: AssetUrl;
|
|
241
|
+
export default url;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
declare module "*.gif" {
|
|
245
|
+
const url: AssetUrl;
|
|
246
|
+
export default url;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
declare module "*.webp" {
|
|
250
|
+
const url: AssetUrl;
|
|
251
|
+
export default url;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
declare module "*.avif" {
|
|
255
|
+
const url: AssetUrl;
|
|
256
|
+
export default url;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
declare module "*.ico" {
|
|
260
|
+
const url: AssetUrl;
|
|
261
|
+
export default url;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
declare module "*.bmp" {
|
|
265
|
+
const url: AssetUrl;
|
|
266
|
+
export default url;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* CSS Modules
|
|
271
|
+
*/
|
|
272
|
+
declare module "*.module.css" {
|
|
273
|
+
const classes: Readonly<Record<string, string>>;
|
|
274
|
+
export default classes;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
declare module "*.module.scss" {
|
|
278
|
+
const classes: Readonly<Record<string, string>>;
|
|
279
|
+
export default classes;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
declare module "*.module.sass" {
|
|
283
|
+
const classes: Readonly<Record<string, string>>;
|
|
284
|
+
export default classes;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
declare module "*.module.less" {
|
|
288
|
+
const classes: Readonly<Record<string, string>>;
|
|
289
|
+
export default classes;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
declare module "*.module.styl" {
|
|
293
|
+
const classes: Readonly<Record<string, string>>;
|
|
294
|
+
export default classes;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Regular CSS imports
|
|
299
|
+
*/
|
|
300
|
+
declare module "*.css" {
|
|
301
|
+
const content: string;
|
|
302
|
+
export default content;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
declare module "*.scss" {
|
|
306
|
+
const content: string;
|
|
307
|
+
export default content;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
declare module "*.sass" {
|
|
311
|
+
const content: string;
|
|
312
|
+
export default content;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
declare module "*.less" {
|
|
316
|
+
const content: string;
|
|
317
|
+
export default content;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare module "*.styl" {
|
|
321
|
+
const content: string;
|
|
322
|
+
export default content;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Web Worker imports
|
|
327
|
+
*/
|
|
328
|
+
declare module "*?worker" {
|
|
329
|
+
const WorkerFactory: new () => Worker;
|
|
330
|
+
export default WorkerFactory;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
declare module "*?worker&inline" {
|
|
334
|
+
const WorkerFactory: new () => Worker;
|
|
335
|
+
export default WorkerFactory;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
declare module "*?worker&url" {
|
|
339
|
+
const url: AssetUrl;
|
|
340
|
+
export default url;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Shared Worker imports
|
|
345
|
+
*/
|
|
346
|
+
declare module "*?sharedworker" {
|
|
347
|
+
const SharedWorkerFactory: new () => SharedWorker;
|
|
348
|
+
export default SharedWorkerFactory;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
declare module "*?sharedworker&inline" {
|
|
352
|
+
const SharedWorkerFactory: new () => SharedWorker;
|
|
353
|
+
export default SharedWorkerFactory;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
declare module "*?sharedworker&url" {
|
|
357
|
+
const url: AssetUrl;
|
|
358
|
+
export default url;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* JSON imports
|
|
363
|
+
*/
|
|
364
|
+
declare module "*.json" {
|
|
365
|
+
const value: any;
|
|
366
|
+
export default value;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* WebAssembly imports
|
|
371
|
+
*/
|
|
372
|
+
declare module "*.wasm" {
|
|
373
|
+
const initWasm: (
|
|
374
|
+
imports?: WebAssembly.Imports
|
|
375
|
+
) => Promise<WebAssembly.Instance>;
|
|
376
|
+
export default initWasm;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
declare module "*.wasm?init" {
|
|
380
|
+
const initWasm: (
|
|
381
|
+
imports?: WebAssembly.Imports
|
|
382
|
+
) => Promise<WebAssembly.Instance>;
|
|
383
|
+
export default initWasm;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
declare module "*.wasm?url" {
|
|
387
|
+
const url: AssetUrl;
|
|
388
|
+
export default url;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Font file imports
|
|
393
|
+
*/
|
|
394
|
+
declare module "*.woff" {
|
|
395
|
+
const url: AssetUrl;
|
|
396
|
+
export default url;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
declare module "*.woff2" {
|
|
400
|
+
const url: AssetUrl;
|
|
401
|
+
export default url;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
declare module "*.ttf" {
|
|
405
|
+
const url: AssetUrl;
|
|
406
|
+
export default url;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
declare module "*.otf" {
|
|
410
|
+
const url: AssetUrl;
|
|
411
|
+
export default url;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
declare module "*.eot" {
|
|
415
|
+
const url: AssetUrl;
|
|
416
|
+
export default url;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Video file imports
|
|
421
|
+
*/
|
|
422
|
+
declare module "*.mp4" {
|
|
423
|
+
const url: AssetUrl;
|
|
424
|
+
export default url;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
declare module "*.webm" {
|
|
428
|
+
const url: AssetUrl;
|
|
429
|
+
export default url;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
declare module "*.ogg" {
|
|
433
|
+
const url: AssetUrl;
|
|
434
|
+
export default url;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
declare module "*.mp3" {
|
|
438
|
+
const url: AssetUrl;
|
|
439
|
+
export default url;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
declare module "*.wav" {
|
|
443
|
+
const url: AssetUrl;
|
|
444
|
+
export default url;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
declare module "*.flac" {
|
|
448
|
+
const url: AssetUrl;
|
|
449
|
+
export default url;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
declare module "*.aac" {
|
|
453
|
+
const url: AssetUrl;
|
|
454
|
+
export default url;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Document imports
|
|
459
|
+
*/
|
|
460
|
+
declare module "*.pdf" {
|
|
461
|
+
const url: AssetUrl;
|
|
462
|
+
export default url;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
declare module "*.txt" {
|
|
466
|
+
const content: string;
|
|
467
|
+
export default content;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
declare module "*.md" {
|
|
471
|
+
const content: string;
|
|
472
|
+
export default content;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Raw imports (bypass loaders)
|
|
477
|
+
*/
|
|
478
|
+
declare module "*?raw" {
|
|
479
|
+
const content: string;
|
|
480
|
+
export default content;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* URL imports (get asset URL)
|
|
485
|
+
*/
|
|
486
|
+
declare module "*?url" {
|
|
487
|
+
const url: AssetUrl;
|
|
488
|
+
export default url;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Inline imports (inline as base64)
|
|
493
|
+
*/
|
|
494
|
+
declare module "*?inline" {
|
|
495
|
+
const content: string;
|
|
496
|
+
export default content;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Fynix-specific module patterns
|
|
501
|
+
*/
|
|
502
|
+
declare module "*.fnx" {
|
|
503
|
+
const Component: any;
|
|
504
|
+
export default Component;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* TypeScript/JavaScript module re-declarations
|
|
509
|
+
* (already in global.d.ts but keeping for completeness)
|
|
510
|
+
*/
|
|
511
|
+
declare module "*.ts" {
|
|
512
|
+
const content: any;
|
|
513
|
+
export default content;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
declare module "*.tsx" {
|
|
517
|
+
const content: any;
|
|
518
|
+
export default content;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
declare module "*.js" {
|
|
522
|
+
const content: any;
|
|
523
|
+
export default content;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
declare module "*.jsx" {
|
|
527
|
+
const content: any;
|
|
528
|
+
export default content;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
declare module "*.mjs" {
|
|
532
|
+
const content: any;
|
|
533
|
+
export default content;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Global augmentation for Vite client types
|
|
538
|
+
*/
|
|
539
|
+
declare global {
|
|
540
|
+
/**
|
|
541
|
+
* Client-side HMR WebSocket connection
|
|
542
|
+
*/
|
|
543
|
+
interface ViteWebSocket extends WebSocket {
|
|
544
|
+
send(data: string): void;
|
|
545
|
+
addEventListener(
|
|
546
|
+
type: "message",
|
|
547
|
+
listener: (event: MessageEvent<any>) => void
|
|
548
|
+
): void;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
// Ensure this is treated as a module
|
|
553
|
+
export {};
|
package/runtime.d.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// Type definitions for Fynix Runtime
|
|
2
|
-
// This file provides TypeScript support for the Fynix framework
|
|
3
|
-
|
|
4
|
-
/// <reference path="./types/jsx.d.ts" />
|
|
5
|
-
/// <reference path="./types/global.d.ts" />
|
|
6
|
-
|
|
7
|
-
export const TEXT: unique symbol;
|
|
8
|
-
export const Fragment: unique symbol;
|
|
9
|
-
|
|
10
|
-
export interface VNode {
|
|
11
|
-
type: string | symbol | ((props: any) => any);
|
|
12
|
-
props: Record<string, any>;
|
|
13
|
-
key: string | number | null;
|
|
14
|
-
_domNode?: Node;
|
|
15
|
-
_rendered?: VNode;
|
|
16
|
-
_state?: any;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type Element =
|
|
20
|
-
| VNode
|
|
21
|
-
| string
|
|
22
|
-
| number
|
|
23
|
-
| boolean
|
|
24
|
-
| null
|
|
25
|
-
| undefined
|
|
26
|
-
| Element[];
|
|
27
|
-
|
|
28
|
-
export type ComponentFunction<P = {}> = (props: P) => Element;
|
|
29
|
-
|
|
30
|
-
export function Fynix(
|
|
31
|
-
type: string | symbol | ComponentFunction,
|
|
32
|
-
props?: Record<string, any> | null,
|
|
33
|
-
...children: any[]
|
|
34
|
-
): VNode;
|
|
35
|
-
|
|
36
|
-
export namespace Fynix {
|
|
37
|
-
export function Fragment(props: { children?: any }): any;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const h: typeof Fynix;
|
|
41
|
-
|
|
42
|
-
export function createTextVNode(text: string | number | any): VNode;
|
|
43
|
-
|
|
44
|
-
export function mount(
|
|
45
|
-
AppComponent: ComponentFunction,
|
|
46
|
-
root: string | Element,
|
|
47
|
-
hydrate?: boolean,
|
|
48
|
-
props?: Record<string, any>
|
|
49
|
-
): void;
|
|
50
|
-
|
|
51
|
-
export function renderComponent(
|
|
52
|
-
Component: ComponentFunction,
|
|
53
|
-
props?: Record<string, any>
|
|
54
|
-
): VNode;
|
|
55
|
-
|
|
56
|
-
// Hooks
|
|
57
|
-
export function nixState<T>(initialValue: T): any;
|
|
58
|
-
export function nixStore<T extends Record<string, any>>(initialState: T): any;
|
|
59
|
-
export function nixComputed<T>(fn: () => T): any;
|
|
60
|
-
export function nixRef<T = any>(initial?: T): { current: T };
|
|
61
|
-
export function nixEffect(fn: () => void | (() => void), deps?: any[]): void;
|
|
62
|
-
export function nixEffectAlways(fn: () => void | (() => void)): void;
|
|
63
|
-
export function nixEffectOnce(fn: () => void | (() => void)): void;
|
|
64
|
-
export function nixInterval(callback: () => void, delay: number): void;
|
|
65
|
-
export function nixMemo<T>(fn: () => T, deps?: any[]): T;
|
|
66
|
-
export function nixCallback<T extends (...args: any[]) => any>(fn: T, deps?: any[]): T;
|
|
67
|
-
export function nixPrevious<T>(value: T): T | undefined;
|
|
68
|
-
export function nixAsync<T>(fn: (signal: AbortSignal) => Promise<T>): any;
|
|
69
|
-
export function nixAsyncCached<T>(fn: () => Promise<T>, cacheKey?: string): any;
|
|
70
|
-
export function nixAsyncDebounce<T>(fn: () => Promise<T>, delay: number): any;
|
|
71
|
-
export function nixAsyncQuery<T>(queryKey: any, queryFn: () => Promise<T>, options?: any): any;
|
|
72
|
-
export function nixDebounce<T extends (...args: any[]) => any>(fn: T, delay: number): T;
|
|
73
|
-
export function nixLocalStorage<T>(key: string, initialValue: T): any;
|
|
74
|
-
export function nixLazy(loader: () => Promise<any>): any;
|
|
75
|
-
export function nixLazyAsync(loader: () => Promise<any>): any;
|
|
76
|
-
export function nixForm<T extends Record<string, any>>(initialValues: T, options?: any): any;
|
|
77
|
-
export function nixFormAsync<T extends Record<string, any>>(initialValues: T, options?: any): any;
|
|
78
|
-
export function nixLazyFormAsync<T extends Record<string, any>>(loader: () => Promise<any>, options?: any): any;
|
|
79
|
-
|
|
80
|
-
// Components
|
|
81
|
-
export const Suspense: any;
|
|
82
|
-
export const Path: any;
|
|
83
|
-
export const Button: any;
|