@fluix-ui/vanilla 0.0.6 → 0.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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { FluixToasterConfig, NotchTrigger, NotchPosition, SpringConfig, NotchTheme } from '@fluix-ui/core';
2
- export { FluixPosition, FluixToastOptions, FluixToastPromiseOptions, FluixToastState, FluixToasterConfig, NotchConfig, NotchPosition, NotchTheme, NotchTrigger, fluix } from '@fluix-ui/core';
1
+ import { FluixToasterConfig, NotchTrigger, NotchPosition, SpringConfig, NotchTheme, MenuOrientation, MenuVariant, MenuTheme } from '@fluix-ui/core';
2
+ export { FluixPosition, FluixToastOptions, FluixToastPromiseOptions, FluixToastState, FluixToasterConfig, MenuOrientation, MenuTheme, MenuVariant, NotchConfig, NotchPosition, NotchTheme, NotchTrigger, fluix } from '@fluix-ui/core';
3
3
 
4
4
  /**
5
5
  * Vanilla JS Toaster — imperative DOM adapter for the Fluix toast system.
@@ -47,4 +47,36 @@ interface NotchInstance {
47
47
  }
48
48
  declare function createNotch(container: HTMLElement, options: NotchOptions): NotchInstance;
49
49
 
50
- export { type NotchOptions, createNotch, createToaster };
50
+ /**
51
+ * Vanilla JS Menu — imperative DOM adapter for the Fluix Menu component.
52
+ *
53
+ * Creates all DOM elements (nav, item buttons, SVG canvas with indicator),
54
+ * subscribes to the core menu machine, and drives the indicator animation
55
+ * via connectMenu.
56
+ */
57
+
58
+ interface MenuItemConfig {
59
+ id: string;
60
+ label: string;
61
+ disabled?: boolean;
62
+ }
63
+ interface MenuOptions {
64
+ orientation?: MenuOrientation;
65
+ variant?: MenuVariant;
66
+ theme?: MenuTheme;
67
+ activeId?: string | null;
68
+ onActiveChange?: (id: string) => void;
69
+ spring?: SpringConfig;
70
+ roundness?: number;
71
+ blur?: number;
72
+ fill?: string;
73
+ items: MenuItemConfig[];
74
+ }
75
+ interface MenuInstance {
76
+ setActive(id: string | null): void;
77
+ update(opts: Partial<MenuOptions>): void;
78
+ destroy(): void;
79
+ }
80
+ declare function createMenu(container: HTMLElement, options: MenuOptions): MenuInstance;
81
+
82
+ export { type MenuInstance, type MenuItemConfig, type MenuOptions, type NotchOptions, createMenu, createNotch, createToaster };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { FluixToasterConfig, NotchTrigger, NotchPosition, SpringConfig, NotchTheme } from '@fluix-ui/core';
2
- export { FluixPosition, FluixToastOptions, FluixToastPromiseOptions, FluixToastState, FluixToasterConfig, NotchConfig, NotchPosition, NotchTheme, NotchTrigger, fluix } from '@fluix-ui/core';
1
+ import { FluixToasterConfig, NotchTrigger, NotchPosition, SpringConfig, NotchTheme, MenuOrientation, MenuVariant, MenuTheme } from '@fluix-ui/core';
2
+ export { FluixPosition, FluixToastOptions, FluixToastPromiseOptions, FluixToastState, FluixToasterConfig, MenuOrientation, MenuTheme, MenuVariant, NotchConfig, NotchPosition, NotchTheme, NotchTrigger, fluix } from '@fluix-ui/core';
3
3
 
4
4
  /**
5
5
  * Vanilla JS Toaster — imperative DOM adapter for the Fluix toast system.
@@ -47,4 +47,36 @@ interface NotchInstance {
47
47
  }
48
48
  declare function createNotch(container: HTMLElement, options: NotchOptions): NotchInstance;
49
49
 
50
- export { type NotchOptions, createNotch, createToaster };
50
+ /**
51
+ * Vanilla JS Menu — imperative DOM adapter for the Fluix Menu component.
52
+ *
53
+ * Creates all DOM elements (nav, item buttons, SVG canvas with indicator),
54
+ * subscribes to the core menu machine, and drives the indicator animation
55
+ * via connectMenu.
56
+ */
57
+
58
+ interface MenuItemConfig {
59
+ id: string;
60
+ label: string;
61
+ disabled?: boolean;
62
+ }
63
+ interface MenuOptions {
64
+ orientation?: MenuOrientation;
65
+ variant?: MenuVariant;
66
+ theme?: MenuTheme;
67
+ activeId?: string | null;
68
+ onActiveChange?: (id: string) => void;
69
+ spring?: SpringConfig;
70
+ roundness?: number;
71
+ blur?: number;
72
+ fill?: string;
73
+ items: MenuItemConfig[];
74
+ }
75
+ interface MenuInstance {
76
+ setActive(id: string | null): void;
77
+ update(opts: Partial<MenuOptions>): void;
78
+ destroy(): void;
79
+ }
80
+ declare function createMenu(container: HTMLElement, options: MenuOptions): MenuInstance;
81
+
82
+ export { type MenuInstance, type MenuItemConfig, type MenuOptions, type NotchOptions, createMenu, createNotch, createToaster };