@fynixorg/ui 1.0.7 → 1.0.8

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fynixorg/ui",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "description": "Core package for Fynix UI framework.",
6
6
  "main": "dist/fynix/index.js",
7
- "types": "dist/runtime.d.ts",
7
+ "types": "runtime.d.ts",
8
8
  "exports": {
9
9
  ".": "./dist/runtime.js",
10
10
  "./context": "./dist/context/context.js",
@@ -59,4 +59,4 @@
59
59
  "scripts": {
60
60
  "build": "node build.js"
61
61
  }
62
- }
62
+ }
package/types/global.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  /**
2
- * Virtual DOM node type for Fynix
2
+ * Virtual DOM node type for Fynix (unified with runtime.d.ts)
3
3
  */
4
4
  type VNode = {
5
- type: any;
6
- props: any;
7
- key: any;
5
+ type: string | symbol | ((props: any) => any);
6
+ props: Record<string, any>;
7
+ key: string | number | null;
8
+ _domNode?: Node;
9
+ _rendered?: VNode;
10
+ _state?: any;
8
11
  };
9
12
  // global.d.ts - Fynix Global Type Declarations
10
13
 
@@ -56,7 +59,7 @@ interface NixFormState<T extends Record<string, any>> {
56
59
  isSubmitting: boolean;
57
60
  errors: { [K in keyof T]?: string };
58
61
  handleSubmit: (
59
- onSubmit: (values: T) => void | Promise<void>
62
+ onSubmit: (values: T) => void | Promise<void>,
60
63
  ) => (e?: Event) => Promise<void>;
61
64
  reset: () => void;
62
65
  setFieldValue: <K extends keyof T>(field: K, value: T[K]) => void;
@@ -170,7 +173,7 @@ interface ImportMeta {
170
173
  as?: "url" | "raw";
171
174
  /** Custom import query */
172
175
  query?: Record<string, string | number | boolean>;
173
- }
176
+ },
174
177
  ) => Record<string, T>;
175
178
 
176
179
  /** Environment variables */
package/types/jsx.d.ts CHANGED
@@ -3,7 +3,8 @@ export {};
3
3
  declare global {
4
4
  namespace JSX {
5
5
  type Element = FynixJSX.Element;
6
- interface ElementChildrenAttribute extends FynixJSX.ElementChildrenAttribute {}
6
+ interface ElementChildrenAttribute
7
+ extends FynixJSX.ElementChildrenAttribute {}
7
8
  interface IntrinsicElements extends FynixJSX.IntrinsicElements {}
8
9
  // Optionally, add more interfaces if needed
9
10
  }
@@ -11,7 +12,8 @@ declare global {
11
12
  // JSX Type Definitions for Fynix
12
13
 
13
14
  declare namespace FynixJSX {
14
- type Element = any;
15
+ // Use the VNode type for JSX elements for better type inference
16
+ type Element = VNode;
15
17
 
16
18
  interface ElementChildrenAttribute {
17
19
  children: {};
@@ -78,7 +80,9 @@ declare namespace FynixJSX {
78
80
  "r-mouseup"?: (this: HTMLElement, event: MouseEvent) => void;
79
81
  "r-mousemove"?: (this: HTMLElement, event: MouseEvent) => void;
80
82
  "r-scroll"?: (this: HTMLElement, event: Event) => void;
81
- "r-class"?: string | { value: string; subscribe: (cb: () => void) => () => void };
83
+ "r-class"?:
84
+ | string
85
+ | { value: string; subscribe: (cb: () => void) => () => void };
82
86
  rc?: string | { value: string; subscribe: (cb: () => void) => () => void };
83
87
 
84
88
  // Data attributes
@@ -115,10 +119,29 @@ declare namespace FynixJSX {
115
119
  }
116
120
 
117
121
  interface InputHTMLAttributes extends HTMLAttributes {
118
- type?: "button" | "checkbox" | "color" | "date" | "datetime-local"
119
- | "email" | "file" | "hidden" | "image" | "month" | "number"
120
- | "password" | "radio" | "range" | "reset" | "search"
121
- | "submit" | "tel" | "text" | "time" | "url" | "week";
122
+ type?:
123
+ | "button"
124
+ | "checkbox"
125
+ | "color"
126
+ | "date"
127
+ | "datetime-local"
128
+ | "email"
129
+ | "file"
130
+ | "hidden"
131
+ | "image"
132
+ | "month"
133
+ | "number"
134
+ | "password"
135
+ | "radio"
136
+ | "range"
137
+ | "reset"
138
+ | "search"
139
+ | "submit"
140
+ | "tel"
141
+ | "text"
142
+ | "time"
143
+ | "url"
144
+ | "week";
122
145
  value?: string | number | readonly string[];
123
146
  placeholder?: string;
124
147
  checked?: boolean;
@@ -450,14 +473,14 @@ declare namespace FynixJSX {
450
473
  strokeOpacity?: string | number;
451
474
  fillOpacity?: string | number;
452
475
  opacity?: string | number;
453
-
476
+
454
477
  // SVG specific
455
478
  viewBox?: string;
456
479
  xmlns?: string;
457
480
  xmlnsXlink?: string;
458
481
  preserveAspectRatio?: string;
459
482
  transform?: string;
460
-
483
+
461
484
  // Geometry
462
485
  width?: string | number;
463
486
  height?: string | number;
@@ -475,11 +498,11 @@ declare namespace FynixJSX {
475
498
  d?: string;
476
499
  points?: string;
477
500
  pathLength?: number;
478
-
501
+
479
502
  // Text
480
503
  textAnchor?: "start" | "middle" | "end";
481
504
  dominantBaseline?: "auto" | "middle" | "hanging" | "alphabetic";
482
-
505
+
483
506
  // Gradient/Filter
484
507
  offset?: string | number;
485
508
  stopColor?: string;