@fynixorg/ui 1.0.9 → 1.0.11
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../plugins/vite-plugin-res.js"],
|
|
4
|
-
"sourcesContent": ["import { transform } from \"esbuild\";\r\
|
|
5
|
-
"mappings": ";;AAAA,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { transform } from \"esbuild\";\r\nexport default function fynix() {\r\n return {\r\n name: \"vite-plugin-res\",\r\n enforce: \"pre\",\r\n async transform(code, id) {\r\n if (!id.includes(\"/src/\")) return null;\r\n if (!id.endsWith(\".ts\") && !id.endsWith(\".js\") && !id.endsWith(\".fnx\"))\r\n return null;\r\n this.addWatchFile(id);\r\n const result = await transform(code, {\r\n loader: \"jsx\",\r\n jsxFactory: \"Fynix\",\r\n jsxFragment: \"Fynix.Fragment\",\r\n sourcemap: true,\r\n sourcefile: id,\r\n });\r\n return {\r\n code: result.code,\r\n map: result.map,\r\n };\r\n },\r\n handleHotUpdate({ file, server }) {\r\n if (\r\n file.endsWith(\".ts\") ||\r\n file.endsWith(\".js\") ||\r\n file.endsWith(\".fnx\")\r\n ) {\r\n server.ws.send({ type: \"full-reload\" });\r\n return [];\r\n }\r\n },\r\n };\r\n}\r\n"],
|
|
5
|
+
"mappings": ";;AAAA,SAAS,iBAAiB;AACX,SAAR,QAAyB;AAC9B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM,UAAU,MAAM,IAAI;AACxB,UAAI,CAAC,GAAG,SAAS,OAAO;AAAG,eAAO;AAClC,UAAI,CAAC,GAAG,SAAS,KAAK,KAAK,CAAC,GAAG,SAAS,KAAK,KAAK,CAAC,GAAG,SAAS,MAAM;AACnE,eAAO;AACT,WAAK,aAAa,EAAE;AACpB,YAAM,SAAS,MAAM,UAAU,MAAM;AAAA,QACnC,QAAQ;AAAA,QACR,YAAY;AAAA,QACZ,aAAa;AAAA,QACb,WAAW;AAAA,QACX,YAAY;AAAA,MACd,CAAC;AACD,aAAO;AAAA,QACL,MAAM,OAAO;AAAA,QACb,KAAK,OAAO;AAAA,MACd;AAAA,IACF;AAAA,IACA,gBAAgB,EAAE,MAAM,OAAO,GAAG;AAChC,UACE,KAAK,SAAS,KAAK,KACnB,KAAK,SAAS,KAAK,KACnB,KAAK,SAAS,MAAM,GACpB;AACA,eAAO,GAAG,KAAK,EAAE,MAAM,cAAc,CAAC;AACtC,eAAO,CAAC;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;AAhCwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fynixorg/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core package for Fynix UI framework.",
|
|
6
6
|
"main": "dist/fynix/index.js",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"dist/",
|
|
43
|
-
"types/"
|
|
43
|
+
"types/",
|
|
44
|
+
"runtime.d.ts"
|
|
44
45
|
],
|
|
45
46
|
"keywords": [
|
|
46
47
|
"fynix",
|
|
@@ -59,4 +60,4 @@
|
|
|
59
60
|
"scripts": {
|
|
60
61
|
"build": "node build.js"
|
|
61
62
|
}
|
|
62
|
-
}
|
|
63
|
+
}
|
package/runtime.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
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;
|