@almadar/ui 2.0.0 → 2.0.1
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/components/atoms/Avatar.d.ts +58 -0
- package/dist/components/atoms/Badge.d.ts +8 -0
- package/dist/components/atoms/Box.d.ts +57 -0
- package/dist/components/atoms/Button.d.ts +24 -0
- package/dist/components/atoms/Card.d.ts +18 -0
- package/dist/components/atoms/Center.d.ts +33 -0
- package/dist/components/atoms/Checkbox.d.ts +5 -0
- package/dist/components/atoms/ConditionalWrapper.d.ts +68 -0
- package/dist/components/atoms/Divider.d.ts +29 -0
- package/dist/components/atoms/Icon.d.ts +38 -0
- package/dist/components/atoms/Input.d.ts +26 -0
- package/dist/components/atoms/Label.d.ts +5 -0
- package/dist/components/atoms/LawReferenceTooltip.d.ts +48 -0
- package/dist/components/atoms/Overlay.d.ts +16 -0
- package/dist/components/atoms/ProgressBar.d.ts +63 -0
- package/dist/components/atoms/Radio.d.ts +26 -0
- package/dist/components/atoms/Select.d.ts +12 -0
- package/dist/components/atoms/Spacer.d.ts +25 -0
- package/dist/components/atoms/Spinner.d.ts +6 -0
- package/dist/components/atoms/Stack.d.ts +64 -0
- package/dist/components/atoms/Switch.d.ts +12 -0
- package/dist/components/atoms/TextHighlight.d.ts +53 -0
- package/dist/components/atoms/Textarea.d.ts +5 -0
- package/dist/components/atoms/ThemeSelector.d.ts +21 -0
- package/dist/components/atoms/ThemeToggle.d.ts +33 -0
- package/dist/components/atoms/Typography.d.ts +57 -0
- package/dist/components/atoms/game/ControlButton.d.ts +31 -0
- package/dist/components/atoms/game/HealthBar.d.ts +18 -0
- package/dist/components/atoms/game/ScoreDisplay.d.ts +21 -0
- package/dist/components/atoms/game/Sprite.d.ts +63 -0
- package/dist/components/atoms/game/StateIndicator.d.ts +31 -0
- package/dist/components/atoms/game/index.d.ts +12 -0
- package/dist/components/atoms/index.d.ts +27 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +5 -5
- package/dist/components/molecules/Accordion.d.ts +67 -0
- package/dist/components/molecules/Alert.d.ts +24 -0
- package/dist/components/molecules/Breadcrumb.d.ts +55 -0
- package/dist/components/molecules/ButtonGroup.d.ts +67 -0
- package/dist/components/molecules/Card.d.ts +44 -0
- package/dist/components/molecules/Container.d.ts +30 -0
- package/dist/components/molecules/Drawer.d.ts +46 -0
- package/dist/components/molecules/EmptyState.d.ts +25 -0
- package/dist/components/molecules/ErrorBoundary.d.ts +55 -0
- package/dist/components/molecules/ErrorState.d.ts +13 -0
- package/dist/components/molecules/FilterGroup.d.ts +54 -0
- package/dist/components/molecules/Flex.d.ts +43 -0
- package/dist/components/molecules/FloatingActionButton.d.ts +69 -0
- package/dist/components/molecules/FormField.d.ts +16 -0
- package/dist/components/molecules/FormSectionHeader.d.ts +30 -0
- package/dist/components/molecules/Grid.d.ts +54 -0
- package/dist/components/molecules/InputGroup.d.ts +24 -0
- package/dist/components/molecules/LoadingState.d.ts +7 -0
- package/dist/components/molecules/Menu.d.ts +40 -0
- package/dist/components/molecules/Modal.d.ts +26 -0
- package/dist/components/molecules/Pagination.d.ts +66 -0
- package/dist/components/molecules/Popover.d.ts +39 -0
- package/dist/components/molecules/QuizBlock.d.ts +20 -0
- package/dist/components/molecules/RelationSelect.d.ts +48 -0
- package/dist/components/molecules/RepeatableFormSection.d.ts +58 -0
- package/dist/components/molecules/ScaledDiagram.d.ts +20 -0
- package/dist/components/molecules/SearchInput.d.ts +60 -0
- package/dist/components/molecules/SidePanel.d.ts +47 -0
- package/dist/components/molecules/SimpleGrid.d.ts +27 -0
- package/dist/components/molecules/Skeleton.d.ts +35 -0
- package/dist/components/molecules/Tabs.d.ts +45 -0
- package/dist/components/molecules/Toast.d.ts +35 -0
- package/dist/components/molecules/Tooltip.d.ts +25 -0
- package/dist/components/molecules/ViolationAlert.d.ts +49 -0
- package/dist/components/molecules/WizardNavigation.d.ts +51 -0
- package/dist/components/molecules/WizardProgress.d.ts +42 -0
- package/dist/components/molecules/game/StatBadge.d.ts +27 -0
- package/dist/components/molecules/index.d.ts +38 -0
- package/dist/components/molecules/markdown/CodeBlock.d.ts +25 -0
- package/dist/components/molecules/markdown/MarkdownContent.d.ts +26 -0
- package/dist/components/organisms/CardGrid.d.ts +72 -0
- package/dist/components/organisms/Chart.d.ts +59 -0
- package/dist/components/organisms/CodeViewer.d.ts +67 -0
- package/dist/components/organisms/ComponentPatterns.d.ts +441 -0
- package/dist/components/organisms/ConfirmDialog.d.ts +50 -0
- package/dist/components/organisms/ContentRenderer.d.ts +23 -0
- package/dist/components/organisms/CustomPattern.d.ts +104 -0
- package/dist/components/organisms/DataTable.d.ts +63 -0
- package/dist/components/organisms/DetailPanel.d.ts +71 -0
- package/dist/components/organisms/DocumentViewer.d.ts +60 -0
- package/dist/components/organisms/DrawerSlot.d.ts +39 -0
- package/dist/components/organisms/Form.d.ts +203 -0
- package/dist/components/organisms/FormSection.d.ts +59 -0
- package/dist/components/organisms/GraphCanvas.d.ts +69 -0
- package/dist/components/organisms/Header.d.ts +110 -0
- package/dist/components/organisms/JazariStateMachine.d.ts +60 -0
- package/dist/components/organisms/LayoutPatterns.d.ts +181 -0
- package/dist/components/organisms/List.d.ts +76 -0
- package/dist/components/organisms/MasterDetail.d.ts +43 -0
- package/dist/components/organisms/MediaGallery.d.ts +66 -0
- package/dist/components/organisms/Meter.d.ts +58 -0
- package/dist/components/organisms/ModalSlot.d.ts +35 -0
- package/dist/components/organisms/Navigation.d.ts +68 -0
- package/dist/components/organisms/OrbitalVisualization.d.ts +48 -0
- package/dist/components/organisms/PageHeader.d.ts +59 -0
- package/dist/components/organisms/Section.d.ts +44 -0
- package/dist/components/organisms/Sidebar.d.ts +65 -0
- package/dist/components/organisms/SignaturePad.d.ts +44 -0
- package/dist/components/organisms/Split.d.ts +42 -0
- package/dist/components/organisms/StatCard.d.ts +66 -0
- package/dist/components/organisms/StateMachineView.d.ts +36 -0
- package/dist/components/organisms/Table.d.ts +99 -0
- package/dist/components/organisms/Timeline.d.ts +58 -0
- package/dist/components/organisms/ToastSlot.d.ts +38 -0
- package/dist/components/organisms/UISlotRenderer.d.ts +112 -0
- package/dist/components/organisms/WizardContainer.d.ts +160 -0
- package/dist/components/organisms/book/BookChapterView.d.ts +17 -0
- package/dist/components/organisms/book/BookCoverPage.d.ts +19 -0
- package/dist/components/organisms/book/BookNavBar.d.ts +18 -0
- package/dist/components/organisms/book/BookTableOfContents.d.ts +18 -0
- package/dist/components/organisms/book/BookViewer.d.ts +28 -0
- package/dist/components/organisms/book/index.d.ts +7 -0
- package/dist/components/organisms/book/types.d.ts +77 -0
- package/dist/components/organisms/game/BattleBoard.d.ts +167 -0
- package/dist/components/organisms/game/CanvasEffect.d.ts +68 -0
- package/dist/components/organisms/game/CastleBoard.d.ts +85 -0
- package/dist/components/organisms/game/DialogueBox.d.ts +73 -0
- package/dist/components/organisms/game/GameAudioProvider.d.ts +47 -0
- package/dist/components/organisms/game/GameAudioToggle.d.ts +28 -0
- package/dist/components/organisms/game/GameHud.d.ts +40 -0
- package/dist/components/organisms/game/GameMenu.d.ts +43 -0
- package/dist/components/organisms/game/GameOverScreen.d.ts +56 -0
- package/dist/components/organisms/game/InventoryPanel.d.ts +67 -0
- package/dist/components/organisms/game/IsometricCanvas.d.ts +123 -0
- package/dist/components/organisms/game/TraitSlot.d.ts +86 -0
- package/dist/components/organisms/game/TraitStateViewer.d.ts +53 -0
- package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +26 -0
- package/dist/components/organisms/game/WorldMapBoard.d.ts +147 -0
- package/dist/components/organisms/game/editor/editorUtils.d.ts +109 -0
- package/dist/components/organisms/game/editor/index.d.ts +9 -0
- package/dist/components/organisms/game/hooks/useBattleState.d.ts +35 -0
- package/dist/components/organisms/game/hooks/useCamera.d.ts +41 -0
- package/dist/components/organisms/game/hooks/useGameAudio.d.ts +47 -0
- package/dist/components/organisms/game/hooks/useImageCache.d.ts +16 -0
- package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +45 -0
- package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +43 -0
- package/dist/components/organisms/game/index.d.ts +36 -0
- package/dist/components/organisms/game/managers/PhysicsManager.d.ts +103 -0
- package/dist/components/organisms/game/types/effects.d.ts +253 -0
- package/dist/components/organisms/game/types/isometric.d.ts +109 -0
- package/dist/components/organisms/game/types/spriteAnimation.d.ts +73 -0
- package/dist/components/organisms/game/utils/canvasEffects.d.ts +50 -0
- package/dist/components/organisms/game/utils/combatPresets.d.ts +15 -0
- package/dist/components/organisms/game/utils/isometric.d.ts +61 -0
- package/dist/components/organisms/game/utils/spriteAnimation.d.ts +57 -0
- package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +16 -0
- package/dist/components/organisms/index.d.ts +37 -0
- package/dist/components/organisms/layout/DashboardGrid.d.ts +34 -0
- package/dist/components/organisms/layout/MasterDetail.d.ts +32 -0
- package/dist/components/organisms/layout/SplitPane.d.ts +34 -0
- package/dist/components/organisms/layout/TabbedContainer.d.ts +42 -0
- package/dist/components/organisms/layout/index.d.ts +9 -0
- package/dist/components/organisms/types.d.ts +65 -0
- package/dist/components/templates/AuthLayout.d.ts +14 -0
- package/dist/components/templates/BattleTemplate.d.ts +25 -0
- package/dist/components/templates/CastleTemplate.d.ts +23 -0
- package/dist/components/templates/CounterTemplate.d.ts +44 -0
- package/dist/components/templates/DashboardLayout.d.ts +32 -0
- package/dist/components/templates/GameShell.d.ts +33 -0
- package/dist/components/templates/GameTemplate.d.ts +36 -0
- package/dist/components/templates/GenericAppTemplate.d.ts +30 -0
- package/dist/components/templates/WorldMapTemplate.d.ts +29 -0
- package/dist/components/templates/index.d.ts +10 -0
- package/dist/components/templates/types.d.ts +17 -0
- package/dist/context/DesignThemeContext.d.ts +21 -0
- package/dist/context/ThemeContext.d.ts +104 -0
- package/dist/context/UISlotContext.d.ts +75 -0
- package/dist/context/UserContext.d.ts +111 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/hooks/event-bus-types.d.ts +71 -0
- package/dist/hooks/index.d.ts +25 -0
- package/dist/hooks/useAgentChat.d.ts +104 -0
- package/dist/hooks/useAuthContext.d.ts +25 -0
- package/dist/hooks/useCompile.d.ts +22 -0
- package/dist/hooks/useDeepAgentGeneration.d.ts +46 -0
- package/dist/hooks/useEntities.d.ts +52 -0
- package/dist/hooks/useEntityData.d.ts +155 -0
- package/dist/hooks/useEntityMutations.d.ts +80 -0
- package/dist/hooks/useEventBus.d.ts +96 -0
- package/dist/hooks/useExtensions.d.ts +32 -0
- package/dist/hooks/useFileEditor.d.ts +32 -0
- package/dist/hooks/useFileSystem.d.ts +40 -0
- package/dist/hooks/useGitHub.d.ts +58 -0
- package/dist/hooks/useOrbitalHistory.d.ts +39 -0
- package/dist/hooks/useOrbitalMutations.d.ts +95 -0
- package/dist/hooks/usePreview.d.ts +57 -0
- package/dist/hooks/useQuerySingleton.d.ts +78 -0
- package/dist/hooks/useResolvedEntity.d.ts +32 -0
- package/dist/hooks/useTranslate.d.ts +35 -0
- package/dist/hooks/useUIEvents.d.ts +35 -0
- package/dist/hooks/useUISlots.d.ts +84 -0
- package/dist/hooks/useValidation.d.ts +46 -0
- package/dist/lib/api-client.d.ts +42 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/debug.d.ts +43 -0
- package/dist/lib/debugRegistry.d.ts +29 -0
- package/dist/lib/debugUtils.d.ts +27 -0
- package/dist/lib/entityDebug.d.ts +38 -0
- package/dist/lib/getNestedValue.d.ts +33 -0
- package/dist/lib/guardRegistry.d.ts +32 -0
- package/dist/lib/index.d.ts +18 -0
- package/dist/lib/jazari/svg-paths.d.ts +61 -0
- package/dist/lib/parseContentSegments.d.ts +41 -0
- package/dist/lib/tickRegistry.d.ts +40 -0
- package/dist/lib/traitRegistry.d.ts +34 -0
- package/dist/lib/verificationRegistry.d.ts +107 -0
- package/dist/lib/visualizer/index.d.ts +143 -0
- package/dist/locales/index.d.ts +20 -0
- package/dist/providers/EventBusProvider.d.ts +60 -0
- package/dist/providers/FetchedDataProvider.d.ts +105 -0
- package/dist/providers/OfflineModeProvider.d.ts +79 -0
- package/dist/providers/OrbitalProvider.d.ts +101 -0
- package/dist/providers/SelectionProvider.d.ts +81 -0
- package/dist/providers/VerificationProvider.d.ts +63 -0
- package/dist/providers/index.d.ts +17 -0
- package/dist/providers/index.js +3 -3
- package/dist/renderer/client-effect-executor.d.ts +68 -0
- package/dist/renderer/data-resolver.d.ts +68 -0
- package/dist/renderer/index.d.ts +28 -0
- package/dist/renderer/index.js +1 -1
- package/dist/renderer/init.d.ts +14 -0
- package/dist/renderer/navigation.d.ts +142 -0
- package/dist/renderer/offline-executor.d.ts +238 -0
- package/dist/renderer/pattern-resolver.d.ts +91 -0
- package/dist/renderer/slot-definitions.d.ts +45 -0
- package/dist/renderer/types.d.ts +160 -0
- package/dist/renderer/useClientEffects.d.ts +88 -0
- package/dist/stores/entityStore.d.ts +99 -0
- package/dist/stores/filtering.d.ts +51 -0
- package/dist/stores/index.d.ts +7 -0
- package/package.json +4 -3
- package/dist/{chunk-YNP2OBK4.js → chunk-RIZ76XRF.js} +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query state for filters and search
|
|
3
|
+
*/
|
|
4
|
+
export interface QueryState {
|
|
5
|
+
search?: string;
|
|
6
|
+
filters?: Record<string, unknown>;
|
|
7
|
+
sortField?: string;
|
|
8
|
+
sortDirection?: 'asc' | 'desc';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Query singleton entity reference
|
|
12
|
+
*/
|
|
13
|
+
export interface QuerySingletonEntity {
|
|
14
|
+
name: string;
|
|
15
|
+
fields: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Query singleton result type
|
|
19
|
+
*/
|
|
20
|
+
export interface QuerySingletonResult {
|
|
21
|
+
state: QueryState;
|
|
22
|
+
setState: (state: Partial<QueryState>) => void;
|
|
23
|
+
reset: () => void;
|
|
24
|
+
}
|
|
25
|
+
export interface QuerySingletonState {
|
|
26
|
+
/** Current search term */
|
|
27
|
+
search: string;
|
|
28
|
+
/** Set search term */
|
|
29
|
+
setSearch: (value: string) => void;
|
|
30
|
+
/** Current filters */
|
|
31
|
+
filters: Record<string, unknown>;
|
|
32
|
+
/** Set a filter value */
|
|
33
|
+
setFilter: (key: string, value: unknown) => void;
|
|
34
|
+
/** Clear all filters */
|
|
35
|
+
clearFilters: () => void;
|
|
36
|
+
/** Current sort field */
|
|
37
|
+
sortField?: string;
|
|
38
|
+
/** Current sort direction */
|
|
39
|
+
sortDirection?: 'asc' | 'desc';
|
|
40
|
+
/** Set sort */
|
|
41
|
+
setSort: (field: string, direction: 'asc' | 'desc') => void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Hook for accessing a query singleton by name
|
|
45
|
+
*
|
|
46
|
+
* @param query - Query singleton name (e.g., "@TaskQuery")
|
|
47
|
+
* @returns Query singleton state or null if no query provided
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* const queryState = useQuerySingleton('@TaskQuery');
|
|
52
|
+
*
|
|
53
|
+
* // Use search state
|
|
54
|
+
* queryState?.search
|
|
55
|
+
* queryState?.setSearch('new search term')
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function useQuerySingleton(query?: string): QuerySingletonState | null;
|
|
59
|
+
/**
|
|
60
|
+
* Parse a query binding string to extract the query singleton name
|
|
61
|
+
*
|
|
62
|
+
* @param binding - Binding string like "@TaskQuery.search" or "@TaskQuery"
|
|
63
|
+
* @returns Object with query name and optional field path
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* parseQueryBinding('@TaskQuery.search')
|
|
68
|
+
* // { query: 'TaskQuery', field: 'search' }
|
|
69
|
+
*
|
|
70
|
+
* parseQueryBinding('@TaskQuery')
|
|
71
|
+
* // { query: 'TaskQuery', field: undefined }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function parseQueryBinding(binding: string): {
|
|
75
|
+
query: string;
|
|
76
|
+
field?: string;
|
|
77
|
+
};
|
|
78
|
+
export default useQuerySingleton;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ResolvedEntity<T> {
|
|
2
|
+
/** Resolved data array */
|
|
3
|
+
data: T[];
|
|
4
|
+
/** True when data was provided directly via props (not fetched) */
|
|
5
|
+
isLocal: boolean;
|
|
6
|
+
/** Loading state — always false for local data */
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
/** Error state — always null for local data */
|
|
9
|
+
error: Error | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Resolves entity data from either a direct `data` prop or an `entity` string.
|
|
13
|
+
*
|
|
14
|
+
* When `data` is provided, it is used directly (isLocal: true).
|
|
15
|
+
* When only `entity` (string) is provided, data is fetched via useEntityList.
|
|
16
|
+
* Direct `data` always takes precedence over auto-fetch.
|
|
17
|
+
*
|
|
18
|
+
* @param entity - Entity name string for auto-fetch, or undefined
|
|
19
|
+
* @param data - Direct data array from trait render-ui, or undefined
|
|
20
|
+
* @returns Normalized { data, isLocal, isLoading, error }
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* function MyOrganism({ entity, data, isLoading, error }: MyProps) {
|
|
25
|
+
* const resolved = useResolvedEntity<Item>(entity, data);
|
|
26
|
+
* // resolved.data is always T[] regardless of source
|
|
27
|
+
* // resolved.isLocal tells you if data came from props
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function useResolvedEntity<T = Record<string, unknown>>(entity: string | undefined, data: readonly T[] | T[] | undefined): ResolvedEntity<T>;
|
|
32
|
+
export default useResolvedEntity;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type TranslateFunction = (key: string, params?: Record<string, string | number>) => string;
|
|
2
|
+
export interface I18nContextValue {
|
|
3
|
+
/** Current locale code (e.g. 'en', 'ar', 'sl') */
|
|
4
|
+
locale: string;
|
|
5
|
+
/** Text direction for the current locale */
|
|
6
|
+
direction: 'ltr' | 'rtl';
|
|
7
|
+
/** Translate a key, with optional interpolation params */
|
|
8
|
+
t: TranslateFunction;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Provider component — wrap your app or Storybook decorator with this.
|
|
12
|
+
*
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <I18nProvider value={{ locale: 'ar', direction: 'rtl', t: createTranslate(arMessages) }}>
|
|
15
|
+
* <App />
|
|
16
|
+
* </I18nProvider>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const I18nProvider: import("react").Provider<I18nContextValue>;
|
|
20
|
+
/**
|
|
21
|
+
* Hook to access the current locale and translate function.
|
|
22
|
+
* Safe to call without a provider — returns passthrough t().
|
|
23
|
+
*/
|
|
24
|
+
export declare function useTranslate(): I18nContextValue;
|
|
25
|
+
/**
|
|
26
|
+
* Create a translate function from a flat messages object.
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* const t = createTranslate({ 'common.save': 'Save', 'table.showing': 'Showing {{count}} of {{total}}' });
|
|
30
|
+
* t('common.save') // → 'Save'
|
|
31
|
+
* t('table.showing', { count: 5, total: 20 }) // → 'Showing 5 of 20'
|
|
32
|
+
* t('missing.key') // → 'missing.key' (fallback)
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function createTranslate(messages: Record<string, string>): TranslateFunction;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useEventBus } from "./useEventBus";
|
|
2
|
+
/**
|
|
3
|
+
* Hook to bridge UI events to state machine dispatch
|
|
4
|
+
*
|
|
5
|
+
* @param dispatch - The state machine dispatch function
|
|
6
|
+
* @param validEvents - Optional array of valid event names (filters which events to handle)
|
|
7
|
+
* @param eventBusInstance - Optional event bus instance (for testing, uses hook if not provided)
|
|
8
|
+
*/
|
|
9
|
+
export declare function useUIEvents<E extends string>(dispatch: (event: E, payload?: unknown) => void, validEvents?: readonly E[], eventBusInstance?: ReturnType<typeof useEventBus>): void;
|
|
10
|
+
/**
|
|
11
|
+
* Hook for selected entity tracking
|
|
12
|
+
* Many list UIs need to track which item is selected.
|
|
13
|
+
*
|
|
14
|
+
* This hook uses SelectionProvider if available (preferred),
|
|
15
|
+
* otherwise falls back to listening to events directly.
|
|
16
|
+
*
|
|
17
|
+
* @example Using with SelectionProvider (recommended)
|
|
18
|
+
* ```tsx
|
|
19
|
+
* function MyPage() {
|
|
20
|
+
* return (
|
|
21
|
+
* <EventBusProvider>
|
|
22
|
+
* <SelectionProvider>
|
|
23
|
+
* <MyComponent />
|
|
24
|
+
* </SelectionProvider>
|
|
25
|
+
* </EventBusProvider>
|
|
26
|
+
* );
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* function MyComponent() {
|
|
30
|
+
* const [selected, setSelected] = useSelectedEntity<Order>();
|
|
31
|
+
* // selected is automatically updated when UI:VIEW/UI:SELECT events fire
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function useSelectedEntity<T>(eventBusInstance?: ReturnType<typeof useEventBus>): [T | null, (entity: T | null) => void];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Valid UI slot names
|
|
3
|
+
*/
|
|
4
|
+
export type UISlot = 'main' | 'sidebar' | 'modal' | 'drawer' | 'overlay' | 'center' | 'toast' | 'hud-top' | 'hud-bottom' | 'floating';
|
|
5
|
+
/**
|
|
6
|
+
* Animation types for slot transitions
|
|
7
|
+
*/
|
|
8
|
+
export type SlotAnimation = 'fade' | 'slide' | 'scale' | 'none';
|
|
9
|
+
/**
|
|
10
|
+
* Content rendered in a slot
|
|
11
|
+
*/
|
|
12
|
+
export interface SlotContent {
|
|
13
|
+
/** Unique ID for this content */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Pattern/component type to render */
|
|
16
|
+
pattern: string;
|
|
17
|
+
/** Props to pass to the pattern component */
|
|
18
|
+
props: Record<string, unknown>;
|
|
19
|
+
/** Priority for conflict resolution (higher wins) */
|
|
20
|
+
priority: number;
|
|
21
|
+
/** Animation for showing/hiding */
|
|
22
|
+
animation?: SlotAnimation;
|
|
23
|
+
/** Auto-dismiss timestamp (for toasts) */
|
|
24
|
+
autoDismissAt?: number;
|
|
25
|
+
/** Callback when dismissed */
|
|
26
|
+
onDismiss?: () => void;
|
|
27
|
+
/** Source trait that rendered this content */
|
|
28
|
+
sourceTrait?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Configuration for render_ui effect
|
|
32
|
+
*/
|
|
33
|
+
export interface RenderUIConfig {
|
|
34
|
+
/** Target slot */
|
|
35
|
+
target: UISlot;
|
|
36
|
+
/** Pattern/component to render */
|
|
37
|
+
pattern: string;
|
|
38
|
+
/** Props for the pattern */
|
|
39
|
+
props?: Record<string, unknown>;
|
|
40
|
+
/** Priority (default: 0) */
|
|
41
|
+
priority?: number;
|
|
42
|
+
/** Animation type */
|
|
43
|
+
animation?: SlotAnimation;
|
|
44
|
+
/** Auto-dismiss after ms (for toasts) */
|
|
45
|
+
autoDismissMs?: number;
|
|
46
|
+
/** Callback on dismiss */
|
|
47
|
+
onDismiss?: () => void;
|
|
48
|
+
/** Source trait name */
|
|
49
|
+
sourceTrait?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Callback for slot changes
|
|
53
|
+
*/
|
|
54
|
+
export type SlotChangeCallback = (slot: UISlot, content: SlotContent | null) => void;
|
|
55
|
+
/**
|
|
56
|
+
* UI Slot Manager interface
|
|
57
|
+
*/
|
|
58
|
+
export interface UISlotManager {
|
|
59
|
+
/** Current content for each slot */
|
|
60
|
+
slots: Record<UISlot, SlotContent | null>;
|
|
61
|
+
/** Render content to a slot */
|
|
62
|
+
render: (config: RenderUIConfig) => string;
|
|
63
|
+
/** Clear a specific slot */
|
|
64
|
+
clear: (slot: UISlot) => void;
|
|
65
|
+
/** Clear content by ID */
|
|
66
|
+
clearById: (id: string) => void;
|
|
67
|
+
/** Clear all slots */
|
|
68
|
+
clearAll: () => void;
|
|
69
|
+
/** Subscribe to slot changes */
|
|
70
|
+
subscribe: (callback: SlotChangeCallback) => () => void;
|
|
71
|
+
/** Check if a slot has content */
|
|
72
|
+
hasContent: (slot: UISlot) => boolean;
|
|
73
|
+
/** Get content for a slot */
|
|
74
|
+
getContent: (slot: UISlot) => SlotContent | null;
|
|
75
|
+
}
|
|
76
|
+
declare const DEFAULT_SLOTS: Record<UISlot, SlotContent | null>;
|
|
77
|
+
/**
|
|
78
|
+
* Create a UI Slot Manager instance.
|
|
79
|
+
*
|
|
80
|
+
* This is the internal hook that creates the manager.
|
|
81
|
+
* Use `useUISlots()` from context in components.
|
|
82
|
+
*/
|
|
83
|
+
export declare function useUISlotManager(): UISlotManager;
|
|
84
|
+
export { DEFAULT_SLOTS };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface LLMErrorContext {
|
|
2
|
+
rawValuePreview?: string;
|
|
3
|
+
expectedType?: string;
|
|
4
|
+
actualType?: string;
|
|
5
|
+
source?: {
|
|
6
|
+
agent: 'requirements' | 'builder' | 'view-planner';
|
|
7
|
+
operation: string;
|
|
8
|
+
promptHash?: string;
|
|
9
|
+
};
|
|
10
|
+
tokenUsage?: {
|
|
11
|
+
prompt: number;
|
|
12
|
+
completion: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface ValidationError {
|
|
16
|
+
code: string;
|
|
17
|
+
message: string;
|
|
18
|
+
path?: string;
|
|
19
|
+
severity: 'error' | 'warning';
|
|
20
|
+
suggestion?: string;
|
|
21
|
+
validValues?: string[];
|
|
22
|
+
expectedShape?: string;
|
|
23
|
+
fixGuidance?: string;
|
|
24
|
+
llmContext?: LLMErrorContext;
|
|
25
|
+
}
|
|
26
|
+
export interface ValidationResult {
|
|
27
|
+
valid: boolean;
|
|
28
|
+
errors: ValidationError[];
|
|
29
|
+
warnings: ValidationError[];
|
|
30
|
+
}
|
|
31
|
+
export type ValidationStage = 'idle' | 'validating' | 'fixing' | 'complete';
|
|
32
|
+
export interface UseValidationResult {
|
|
33
|
+
result: ValidationResult | null;
|
|
34
|
+
isValidating: boolean;
|
|
35
|
+
error: string | null;
|
|
36
|
+
stage: ValidationStage;
|
|
37
|
+
isFixing: boolean;
|
|
38
|
+
progressMessage: string | null;
|
|
39
|
+
errors: ValidationError[];
|
|
40
|
+
warnings: ValidationError[];
|
|
41
|
+
isValid: boolean;
|
|
42
|
+
validate: (appId: string) => Promise<ValidationResult>;
|
|
43
|
+
clearResult: () => void;
|
|
44
|
+
reset: () => void;
|
|
45
|
+
}
|
|
46
|
+
export declare function useValidation(): UseValidationResult;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Client - HTTP client for backend API calls
|
|
3
|
+
*
|
|
4
|
+
* Provides typed methods for making API requests.
|
|
5
|
+
* All requests go through the backend server, NOT directly to Firestore.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* API Error class for handling HTTP errors
|
|
11
|
+
*/
|
|
12
|
+
export declare class ApiError extends Error {
|
|
13
|
+
status: number;
|
|
14
|
+
statusText: string;
|
|
15
|
+
constructor(status: number, statusText: string, message?: string);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* API client with typed methods
|
|
19
|
+
*/
|
|
20
|
+
export declare const apiClient: {
|
|
21
|
+
/**
|
|
22
|
+
* GET request
|
|
23
|
+
*/
|
|
24
|
+
get<T>(endpoint: string): Promise<T>;
|
|
25
|
+
/**
|
|
26
|
+
* POST request
|
|
27
|
+
*/
|
|
28
|
+
post<T>(endpoint: string, data?: unknown): Promise<T>;
|
|
29
|
+
/**
|
|
30
|
+
* PUT request
|
|
31
|
+
*/
|
|
32
|
+
put<T>(endpoint: string, data?: unknown): Promise<T>;
|
|
33
|
+
/**
|
|
34
|
+
* PATCH request
|
|
35
|
+
*/
|
|
36
|
+
patch<T>(endpoint: string, data?: unknown): Promise<T>;
|
|
37
|
+
/**
|
|
38
|
+
* DELETE request
|
|
39
|
+
*/
|
|
40
|
+
delete<T = void>(endpoint: string): Promise<T>;
|
|
41
|
+
};
|
|
42
|
+
export default apiClient;
|
package/dist/lib/cn.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug utilities for development
|
|
3
|
+
*/
|
|
4
|
+
export declare function isDebugEnabled(): boolean;
|
|
5
|
+
export declare function debug(...args: unknown[]): void;
|
|
6
|
+
export declare function debugGroup(label: string): void;
|
|
7
|
+
export declare function debugGroupEnd(): void;
|
|
8
|
+
export declare function debugWarn(...args: unknown[]): void;
|
|
9
|
+
export declare function debugError(...args: unknown[]): void;
|
|
10
|
+
export declare function debugTable(data: unknown): void;
|
|
11
|
+
export declare function debugTime(label: string): void;
|
|
12
|
+
export declare function debugTimeEnd(label: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Debug input events (keyboard, mouse, touch)
|
|
15
|
+
* @param inputType - Type of input (e.g., 'keydown', 'keyup', 'mouse')
|
|
16
|
+
* @param data - Input data to log
|
|
17
|
+
*/
|
|
18
|
+
export declare function debugInput(inputType: string, data: unknown): void;
|
|
19
|
+
/**
|
|
20
|
+
* Debug collision events between entities
|
|
21
|
+
* @param entityA - First entity in collision
|
|
22
|
+
* @param entityB - Second entity in collision
|
|
23
|
+
* @param details - Additional collision details
|
|
24
|
+
*/
|
|
25
|
+
export declare function debugCollision(entityA: {
|
|
26
|
+
id?: string;
|
|
27
|
+
type?: string;
|
|
28
|
+
}, entityB: {
|
|
29
|
+
id?: string;
|
|
30
|
+
type?: string;
|
|
31
|
+
}, details?: unknown): void;
|
|
32
|
+
/**
|
|
33
|
+
* Debug physics updates (position, velocity)
|
|
34
|
+
* @param entityId - Entity identifier
|
|
35
|
+
* @param physics - Physics data to log
|
|
36
|
+
*/
|
|
37
|
+
export declare function debugPhysics(entityId: string, physics: unknown): void;
|
|
38
|
+
/**
|
|
39
|
+
* Debug game state changes
|
|
40
|
+
* @param stateName - Name of the state that changed
|
|
41
|
+
* @param value - New state value
|
|
42
|
+
*/
|
|
43
|
+
export declare function debugGameState(stateName: string, value: unknown): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug Registry - Central event log for debugging
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export type DebugEventType = 'state-change' | 'event-fired' | 'effect-executed' | 'guard-evaluated' | 'error' | 'warning' | 'info';
|
|
7
|
+
export interface DebugEvent {
|
|
8
|
+
id: string;
|
|
9
|
+
type: DebugEventType;
|
|
10
|
+
source: string;
|
|
11
|
+
message: string;
|
|
12
|
+
data?: Record<string, unknown>;
|
|
13
|
+
timestamp: number;
|
|
14
|
+
}
|
|
15
|
+
type ChangeListener = () => void;
|
|
16
|
+
export declare function logDebugEvent(type: DebugEventType, source: string, message: string, data?: Record<string, unknown>): void;
|
|
17
|
+
export declare function logStateChange(source: string, from: string, to: string, event?: string): void;
|
|
18
|
+
export declare function logEventFired(source: string, eventName: string, payload?: unknown): void;
|
|
19
|
+
export declare function logEffectExecuted(source: string, effectType: string, details?: unknown): void;
|
|
20
|
+
export declare function logError(source: string, message: string, error?: unknown): void;
|
|
21
|
+
export declare function logWarning(source: string, message: string, data?: Record<string, unknown>): void;
|
|
22
|
+
export declare function logInfo(source: string, message: string, data?: Record<string, unknown>): void;
|
|
23
|
+
export declare function getDebugEvents(): DebugEvent[];
|
|
24
|
+
export declare function getRecentEvents(count: number): DebugEvent[];
|
|
25
|
+
export declare function getEventsByType(type: DebugEventType): DebugEvent[];
|
|
26
|
+
export declare function getEventsBySource(source: string): DebugEvent[];
|
|
27
|
+
export declare function subscribeToDebugEvents(listener: ChangeListener): () => void;
|
|
28
|
+
export declare function clearDebugEvents(): void;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug Utilities - Functions for toggling and checking debug mode
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
type DebugToggleListener = (enabled: boolean) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Check if debug mode is enabled
|
|
9
|
+
*/
|
|
10
|
+
export declare function isDebugEnabled(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Enable or disable debug mode
|
|
13
|
+
*/
|
|
14
|
+
export declare function setDebugEnabled(enabled: boolean): void;
|
|
15
|
+
/**
|
|
16
|
+
* Toggle debug mode
|
|
17
|
+
*/
|
|
18
|
+
export declare function toggleDebug(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Subscribe to debug mode changes
|
|
21
|
+
*/
|
|
22
|
+
export declare function onDebugToggle(listener: DebugToggleListener): () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Initialize debug mode from keyboard shortcut (Ctrl+Shift+D)
|
|
25
|
+
*/
|
|
26
|
+
export declare function initDebugShortcut(): () => void;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entity Debug - Provides entity state snapshots for debugging
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export interface EntityState {
|
|
7
|
+
id: string;
|
|
8
|
+
type: string;
|
|
9
|
+
fields: Record<string, unknown>;
|
|
10
|
+
lastUpdated: number;
|
|
11
|
+
}
|
|
12
|
+
export interface RuntimeEntity {
|
|
13
|
+
id: string;
|
|
14
|
+
type: string;
|
|
15
|
+
data: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface PersistentEntityInfo {
|
|
18
|
+
loaded: boolean;
|
|
19
|
+
count: number;
|
|
20
|
+
}
|
|
21
|
+
export interface EntitySnapshot {
|
|
22
|
+
entities: EntityState[];
|
|
23
|
+
timestamp: number;
|
|
24
|
+
totalCount: number;
|
|
25
|
+
/** Singleton entities by name */
|
|
26
|
+
singletons: Record<string, unknown>;
|
|
27
|
+
/** Runtime entities (in-memory) */
|
|
28
|
+
runtime: RuntimeEntity[];
|
|
29
|
+
/** Persistent entities info by type */
|
|
30
|
+
persistent: Record<string, PersistentEntityInfo>;
|
|
31
|
+
}
|
|
32
|
+
type EntityProvider = () => EntityState[];
|
|
33
|
+
export declare function setEntityProvider(provider: EntityProvider): void;
|
|
34
|
+
export declare function clearEntityProvider(): void;
|
|
35
|
+
export declare function getEntitySnapshot(): EntitySnapshot | null;
|
|
36
|
+
export declare function getEntityById(id: string): EntityState | undefined;
|
|
37
|
+
export declare function getEntitiesByType(type: string): EntityState[];
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Nested Value Utility
|
|
3
|
+
*
|
|
4
|
+
* Safely retrieves nested values from objects using dot-notation paths.
|
|
5
|
+
* Used by display components to support relation field access like "company.name".
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Get a nested value from an object using dot-notation path.
|
|
11
|
+
*
|
|
12
|
+
* @param obj - The object to traverse
|
|
13
|
+
* @param path - Dot-notation path (e.g., "company.name", "address.city")
|
|
14
|
+
* @returns The value at the path, or undefined if not found
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const data = { company: { name: "Acme Corp", address: { city: "NYC" } } };
|
|
18
|
+
* getNestedValue(data, "company.name"); // => "Acme Corp"
|
|
19
|
+
* getNestedValue(data, "company.address.city"); // => "NYC"
|
|
20
|
+
* getNestedValue(data, "company.missing"); // => undefined
|
|
21
|
+
*/
|
|
22
|
+
export declare function getNestedValue(obj: Record<string, unknown> | null | undefined, path: string): unknown;
|
|
23
|
+
/**
|
|
24
|
+
* Format a nested field path as a human-readable label.
|
|
25
|
+
*
|
|
26
|
+
* @param path - Dot-notation path (e.g., "company.name")
|
|
27
|
+
* @returns Formatted label (e.g., "Company Name")
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* formatFieldLabel("company.name"); // => "Company Name"
|
|
31
|
+
* formatFieldLabel("address.zipCode"); // => "Address Zip Code"
|
|
32
|
+
*/
|
|
33
|
+
export declare function formatNestedFieldLabel(path: string): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Guard Registry - Tracks guard evaluations for debugging
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export interface GuardContext {
|
|
7
|
+
traitName?: string;
|
|
8
|
+
type?: "transition" | "tick";
|
|
9
|
+
transitionFrom?: string;
|
|
10
|
+
transitionTo?: string;
|
|
11
|
+
tickName?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface GuardEvaluation {
|
|
15
|
+
id: string;
|
|
16
|
+
traitName: string;
|
|
17
|
+
guardName: string;
|
|
18
|
+
expression: string;
|
|
19
|
+
result: boolean;
|
|
20
|
+
context: GuardContext;
|
|
21
|
+
timestamp: number;
|
|
22
|
+
/** Input values used in guard evaluation */
|
|
23
|
+
inputs: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
type ChangeListener = () => void;
|
|
26
|
+
export declare function recordGuardEvaluation(evaluation: Omit<GuardEvaluation, "id" | "timestamp">): void;
|
|
27
|
+
export declare function getGuardHistory(): GuardEvaluation[];
|
|
28
|
+
export declare function getRecentGuardEvaluations(count: number): GuardEvaluation[];
|
|
29
|
+
export declare function getGuardEvaluationsForTrait(traitName: string): GuardEvaluation[];
|
|
30
|
+
export declare function subscribeToGuardChanges(listener: ChangeListener): () => void;
|
|
31
|
+
export declare function clearGuardHistory(): void;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lib - Utility functions and registries
|
|
3
|
+
*
|
|
4
|
+
* Core utilities for the Almadar UI library.
|
|
5
|
+
*/
|
|
6
|
+
export { cn } from './cn';
|
|
7
|
+
export * from './api-client';
|
|
8
|
+
export * from './debug';
|
|
9
|
+
export { setDebugEnabled, toggleDebug, onDebugToggle, initDebugShortcut, } from './debugUtils';
|
|
10
|
+
export * from './entityDebug';
|
|
11
|
+
export * from './debugRegistry';
|
|
12
|
+
export * from './guardRegistry';
|
|
13
|
+
export * from './tickRegistry';
|
|
14
|
+
export * from './traitRegistry';
|
|
15
|
+
export * from './verificationRegistry';
|
|
16
|
+
export * from './getNestedValue';
|
|
17
|
+
export * from './visualizer';
|
|
18
|
+
export * from './parseContentSegments';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG path generators for the Al-Jazari state machine visualization.
|
|
3
|
+
* Pure TypeScript — zero React/DOM dependencies.
|
|
4
|
+
*
|
|
5
|
+
* Generates paths for gear teeth, arabesque borders, pipe shapes, and lock icons.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Generate an SVG path for gear teeth around a circle.
|
|
9
|
+
*
|
|
10
|
+
* @param cx - Center X
|
|
11
|
+
* @param cy - Center Y
|
|
12
|
+
* @param innerRadius - Inner radius (base circle)
|
|
13
|
+
* @param outerRadius - Outer radius (tip of teeth)
|
|
14
|
+
* @param numTeeth - Number of teeth around the gear
|
|
15
|
+
* @returns SVG path d attribute string
|
|
16
|
+
*/
|
|
17
|
+
export declare function gearTeethPath(cx: number, cy: number, innerRadius: number, outerRadius: number, numTeeth: number): string;
|
|
18
|
+
/**
|
|
19
|
+
* Generate an SVG path for a small gear-shaped lock icon.
|
|
20
|
+
*
|
|
21
|
+
* @param cx - Center X
|
|
22
|
+
* @param cy - Center Y
|
|
23
|
+
* @param size - Overall size of the lock icon
|
|
24
|
+
* @returns SVG path d attribute for the lock body + shackle
|
|
25
|
+
*/
|
|
26
|
+
export declare function lockIconPath(cx: number, cy: number, size: number): string;
|
|
27
|
+
/**
|
|
28
|
+
* Generate a simple brain-like icon path.
|
|
29
|
+
*
|
|
30
|
+
* @param cx - Center X
|
|
31
|
+
* @param cy - Center Y
|
|
32
|
+
* @param size - Overall size
|
|
33
|
+
* @returns SVG path d attribute
|
|
34
|
+
*/
|
|
35
|
+
export declare function brainIconPath(cx: number, cy: number, size: number): string;
|
|
36
|
+
/**
|
|
37
|
+
* Generate a simple pipe/tube icon path.
|
|
38
|
+
*
|
|
39
|
+
* @param cx - Center X
|
|
40
|
+
* @param cy - Center Y
|
|
41
|
+
* @param size - Overall size
|
|
42
|
+
* @returns SVG path d attribute
|
|
43
|
+
*/
|
|
44
|
+
export declare function pipeIconPath(cx: number, cy: number, size: number): string;
|
|
45
|
+
/**
|
|
46
|
+
* Generate a single 8-pointed star path for the arabesque border pattern.
|
|
47
|
+
*
|
|
48
|
+
* @param cx - Center X
|
|
49
|
+
* @param cy - Center Y
|
|
50
|
+
* @param outerR - Outer radius (star tips)
|
|
51
|
+
* @param innerR - Inner radius (star valleys)
|
|
52
|
+
* @returns SVG path d attribute
|
|
53
|
+
*/
|
|
54
|
+
export declare function eightPointedStarPath(cx: number, cy: number, outerR: number, innerR: number): string;
|
|
55
|
+
/**
|
|
56
|
+
* Generate a simple arrowhead path for transition arm endpoints.
|
|
57
|
+
*
|
|
58
|
+
* @param size - Arrow size
|
|
59
|
+
* @returns SVG path d attribute
|
|
60
|
+
*/
|
|
61
|
+
export declare function arrowheadPath(size: number): string;
|