@juicemantics/veloiq-ui 0.2.2 → 0.3.0

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.mts CHANGED
@@ -8,6 +8,36 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  import * as _tanstack_query_core from '@tanstack/query-core';
9
9
  import * as antd from 'antd';
10
10
 
11
+ /** One entry in navigation.config.json — one per module or model. */
12
+ interface NavConfigEntry {
13
+ /** Refine resource key: "module:tasks", "task", "dashboard" */
14
+ key: string;
15
+ /** Human-readable display label */
16
+ label: string;
17
+ /** Ant Design icon component name, e.g. "UserOutlined" */
18
+ icon: string;
19
+ /** Display order — lower numbers appear first; ties keep original registration order */
20
+ sequence: number;
21
+ /** "module" for a top-level group, "model" for a leaf resource */
22
+ type: "module" | "model";
23
+ }
24
+ type NavConfig = NavConfigEntry[];
25
+ /** Guess an Ant Design icon name from a resource name or label. */
26
+ declare function guessIcon(text: string, isModule?: boolean): string;
27
+ /** Resolve an icon name string to a React element using the AntD icon registry. */
28
+ declare function resolveIcon(iconName: string): React__default.ReactNode;
29
+ /** Find a NavConfigEntry by exact resource key. */
30
+ declare function getNavEntry(navConfig: NavConfig, key: string): NavConfigEntry | undefined;
31
+ /**
32
+ * Sort items by the `sequence` values in navConfig.
33
+ * Items without a matching entry sort to the end (sequence = 999).
34
+ * Original array order serves as a stable tiebreaker.
35
+ */
36
+ declare function sortItemsByNavConfig<T extends {
37
+ key?: string;
38
+ name?: string;
39
+ }>(items: T[], navConfig: NavConfig): T[];
40
+
11
41
  interface LayoutWrapperProps {
12
42
  children?: React__default.ReactNode;
13
43
  /** Logo element or image URL shown in header and sider. */
@@ -21,9 +51,18 @@ interface LayoutWrapperProps {
21
51
  icon?: React__default.ReactNode;
22
52
  onClick?: () => void;
23
53
  }>;
54
+ /** Navigation config loaded from navigation.config.json — drives icons and sort order. */
55
+ navConfig?: NavConfig;
24
56
  }
25
57
  declare const LayoutWrapper: React__default.FC<LayoutWrapperProps>;
26
58
 
59
+ interface CommandCenterPortalProps {
60
+ open: boolean;
61
+ onClose: () => void;
62
+ navConfig?: NavConfig;
63
+ }
64
+ declare const CommandCenterPortal: React__default.FC<CommandCenterPortalProps>;
65
+
27
66
  declare const MultiPaneLayout: React__default.FC<{
28
67
  children: React__default.ReactNode;
29
68
  }>;
@@ -44,9 +83,12 @@ declare const CustomSider: React__default.FC<{
44
83
  collapsed?: boolean;
45
84
  logo?: React__default.ReactNode | string;
46
85
  appTitle?: string;
86
+ navConfig?: NavConfig;
47
87
  }>;
48
88
 
49
- declare const HorizontalMenu: React__default.FC;
89
+ declare const HorizontalMenu: React__default.FC<{
90
+ navConfig?: NavConfig;
91
+ }>;
50
92
 
51
93
  type ExecutableHtmlProps = {
52
94
  html?: string;
@@ -537,4 +579,4 @@ declare const getModelTone: (modelLike?: string | {
537
579
 
538
580
  declare const authSystemModels: ModelDef[];
539
581
 
540
- export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, httpClient, normalizeToneKey, renderRelationBlock, setColorSchemas, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
582
+ export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CommandCenterPortal, type CommandCenterPortalProps, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, type NavConfig, type NavConfigEntry, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, getNavEntry, guessIcon, httpClient, normalizeToneKey, renderRelationBlock, resolveIcon, setColorSchemas, sortItemsByNavConfig, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
package/dist/index.d.ts CHANGED
@@ -8,6 +8,36 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  import * as _tanstack_query_core from '@tanstack/query-core';
9
9
  import * as antd from 'antd';
10
10
 
11
+ /** One entry in navigation.config.json — one per module or model. */
12
+ interface NavConfigEntry {
13
+ /** Refine resource key: "module:tasks", "task", "dashboard" */
14
+ key: string;
15
+ /** Human-readable display label */
16
+ label: string;
17
+ /** Ant Design icon component name, e.g. "UserOutlined" */
18
+ icon: string;
19
+ /** Display order — lower numbers appear first; ties keep original registration order */
20
+ sequence: number;
21
+ /** "module" for a top-level group, "model" for a leaf resource */
22
+ type: "module" | "model";
23
+ }
24
+ type NavConfig = NavConfigEntry[];
25
+ /** Guess an Ant Design icon name from a resource name or label. */
26
+ declare function guessIcon(text: string, isModule?: boolean): string;
27
+ /** Resolve an icon name string to a React element using the AntD icon registry. */
28
+ declare function resolveIcon(iconName: string): React__default.ReactNode;
29
+ /** Find a NavConfigEntry by exact resource key. */
30
+ declare function getNavEntry(navConfig: NavConfig, key: string): NavConfigEntry | undefined;
31
+ /**
32
+ * Sort items by the `sequence` values in navConfig.
33
+ * Items without a matching entry sort to the end (sequence = 999).
34
+ * Original array order serves as a stable tiebreaker.
35
+ */
36
+ declare function sortItemsByNavConfig<T extends {
37
+ key?: string;
38
+ name?: string;
39
+ }>(items: T[], navConfig: NavConfig): T[];
40
+
11
41
  interface LayoutWrapperProps {
12
42
  children?: React__default.ReactNode;
13
43
  /** Logo element or image URL shown in header and sider. */
@@ -21,9 +51,18 @@ interface LayoutWrapperProps {
21
51
  icon?: React__default.ReactNode;
22
52
  onClick?: () => void;
23
53
  }>;
54
+ /** Navigation config loaded from navigation.config.json — drives icons and sort order. */
55
+ navConfig?: NavConfig;
24
56
  }
25
57
  declare const LayoutWrapper: React__default.FC<LayoutWrapperProps>;
26
58
 
59
+ interface CommandCenterPortalProps {
60
+ open: boolean;
61
+ onClose: () => void;
62
+ navConfig?: NavConfig;
63
+ }
64
+ declare const CommandCenterPortal: React__default.FC<CommandCenterPortalProps>;
65
+
27
66
  declare const MultiPaneLayout: React__default.FC<{
28
67
  children: React__default.ReactNode;
29
68
  }>;
@@ -44,9 +83,12 @@ declare const CustomSider: React__default.FC<{
44
83
  collapsed?: boolean;
45
84
  logo?: React__default.ReactNode | string;
46
85
  appTitle?: string;
86
+ navConfig?: NavConfig;
47
87
  }>;
48
88
 
49
- declare const HorizontalMenu: React__default.FC;
89
+ declare const HorizontalMenu: React__default.FC<{
90
+ navConfig?: NavConfig;
91
+ }>;
50
92
 
51
93
  type ExecutableHtmlProps = {
52
94
  html?: string;
@@ -537,4 +579,4 @@ declare const getModelTone: (modelLike?: string | {
537
579
 
538
580
  declare const authSystemModels: ModelDef[];
539
581
 
540
- export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, httpClient, normalizeToneKey, renderRelationBlock, setColorSchemas, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
582
+ export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CommandCenterPortal, type CommandCenterPortalProps, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, type NavConfig, type NavConfigEntry, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, getNavEntry, guessIcon, httpClient, normalizeToneKey, renderRelationBlock, resolveIcon, setColorSchemas, sortItemsByNavConfig, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };