@almadar/ui 1.0.33 → 2.0.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/LICENSE +21 -72
- package/dist/components/index.css +11 -9
- package/dist/components/index.js +2 -2
- package/dist/providers/index.css +11 -9
- package/dist/providers/index.js +1 -1
- package/package.json +9 -8
- package/dist/ThemeContext-D9xUORq5.d.ts +0 -105
- package/dist/cn-BoBXsxuX.d.ts +0 -194
- package/dist/components/index.d.ts +0 -6950
- package/dist/components/organisms/game/three/index.d.ts +0 -1162
- package/dist/context/index.d.ts +0 -208
- package/dist/event-bus-types-CjJduURa.d.ts +0 -73
- package/dist/hooks/index.d.ts +0 -1091
- package/dist/isometric-ynNHVPZx.d.ts +0 -111
- package/dist/lib/index.d.ts +0 -427
- package/dist/locales/index.d.ts +0 -22
- package/dist/offline-executor-CHr4uAhf.d.ts +0 -401
- package/dist/providers/index.d.ts +0 -465
- package/dist/renderer/index.d.ts +0 -525
- package/dist/stores/index.d.ts +0 -151
- package/dist/useUISlots-D0mttBSP.d.ts +0 -85
- /package/dist/{chunk-FZJ73RDM.js → chunk-YNP2OBK4.js} +0 -0
package/LICENSE
CHANGED
|
@@ -1,72 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
23
|
-
available distribution of a specific version of the Licensed Work under this
|
|
24
|
-
License, whichever comes first, the Licensor hereby grants you rights under
|
|
25
|
-
the terms of the Change License, and the rights granted in the paragraph
|
|
26
|
-
above terminate.
|
|
27
|
-
|
|
28
|
-
If your use of the Licensed Work does not comply with the requirements
|
|
29
|
-
currently in effect as described in this License, you must purchase a
|
|
30
|
-
commercial license from the Licensor, its affiliated entities, or authorized
|
|
31
|
-
resellers, or you must refrain from using the Licensed Work.
|
|
32
|
-
|
|
33
|
-
All copies of the original and modified Licensed Work, and derivative works
|
|
34
|
-
of the Licensed Work, are subject to this License. This License applies
|
|
35
|
-
separately for each version of the Licensed Work and the Change Date may vary
|
|
36
|
-
for each version of the Licensed Work released by Licensor.
|
|
37
|
-
|
|
38
|
-
You must conspicuously display this License on each original or modified copy
|
|
39
|
-
of the Licensed Work. If you receive the Licensed Work in original or
|
|
40
|
-
modified form from a third party, the terms and conditions set forth in this
|
|
41
|
-
License apply to your use of that work.
|
|
42
|
-
|
|
43
|
-
Any use of the Licensed Work in violation of this License will automatically
|
|
44
|
-
terminate your rights under this License for the current and all other
|
|
45
|
-
versions of the Licensed Work.
|
|
46
|
-
|
|
47
|
-
This License does not grant you any right in any trademark or logo of
|
|
48
|
-
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
49
|
-
Licensor as expressly required by this License).
|
|
50
|
-
|
|
51
|
-
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
52
|
-
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
53
|
-
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
54
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
55
|
-
TITLE.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
60
|
-
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
61
|
-
|
|
62
|
-
ADDITIONAL TERMS:
|
|
63
|
-
|
|
64
|
-
Documentation (builder/packages/website/docs/) is licensed under CC BY 4.0.
|
|
65
|
-
|
|
66
|
-
TRADEMARKS:
|
|
67
|
-
|
|
68
|
-
"Orbital", "KFlow", "Almadar", and the Almadar logo are trademarks of
|
|
69
|
-
Almadar FZE. You may not use these trademarks without prior written
|
|
70
|
-
permission from Almadar FZE.
|
|
71
|
-
|
|
72
|
-
For licensing inquiries: licensing@almadar.io
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Almadar Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* node_modules/.pnpm/katex@0.16.33/node_modules/katex/dist/katex.min.css */
|
|
2
2
|
@font-face {
|
|
3
3
|
font-display: block;
|
|
4
4
|
font-family: KaTeX_AMS;
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
border-color: currentColor;
|
|
214
214
|
}
|
|
215
215
|
.katex .katex-version:after {
|
|
216
|
-
content: "0.16.
|
|
216
|
+
content: "0.16.33";
|
|
217
217
|
}
|
|
218
218
|
.katex .katex-mathml {
|
|
219
219
|
clip: rect(1px, 1px, 1px, 1px);
|
|
@@ -988,6 +988,15 @@
|
|
|
988
988
|
.katex svg {
|
|
989
989
|
fill: currentColor;
|
|
990
990
|
stroke: currentColor;
|
|
991
|
+
display: block;
|
|
992
|
+
height: inherit;
|
|
993
|
+
position: absolute;
|
|
994
|
+
width: 100%;
|
|
995
|
+
}
|
|
996
|
+
.katex svg path {
|
|
997
|
+
stroke: none;
|
|
998
|
+
}
|
|
999
|
+
.katex svg {
|
|
991
1000
|
fill-rule: nonzero;
|
|
992
1001
|
fill-opacity: 1;
|
|
993
1002
|
stroke-width: 1;
|
|
@@ -997,13 +1006,6 @@
|
|
|
997
1006
|
stroke-dasharray: none;
|
|
998
1007
|
stroke-dashoffset: 0;
|
|
999
1008
|
stroke-opacity: 1;
|
|
1000
|
-
display: block;
|
|
1001
|
-
height: inherit;
|
|
1002
|
-
position: absolute;
|
|
1003
|
-
width: 100%;
|
|
1004
|
-
}
|
|
1005
|
-
.katex svg path {
|
|
1006
|
-
stroke: none;
|
|
1007
1009
|
}
|
|
1008
1010
|
.katex img {
|
|
1009
1011
|
border-style: none;
|
package/dist/components/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { useAuthContext } from '../chunk-BKC4XU44.js';
|
|
|
2
2
|
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-BKC4XU44.js';
|
|
3
3
|
import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments } from '../chunk-N6DJVKZ6.js';
|
|
4
4
|
import '../chunk-XSEDIUM6.js';
|
|
5
|
-
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, Stack, Drawer, Toast, Tabs, Input, ThemeToggle, HealthBar, ScoreDisplay, StateIndicator, Container, EntityDisplayEvents } from '../chunk-
|
|
6
|
-
export { Accordion, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DataTable, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FloatingActionButton, Form, FormField, FormSectionHeader, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LoadingState, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-
|
|
5
|
+
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, Stack, Drawer, Toast, Tabs, Input, ThemeToggle, HealthBar, ScoreDisplay, StateIndicator, Container, EntityDisplayEvents } from '../chunk-YNP2OBK4.js';
|
|
6
|
+
export { Accordion, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DataTable, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FloatingActionButton, Form, FormField, FormSectionHeader, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LoadingState, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-YNP2OBK4.js';
|
|
7
7
|
import '../chunk-BTXQJGFB.js';
|
|
8
8
|
import { useTranslate } from '../chunk-PE2H3NAW.js';
|
|
9
9
|
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useQuerySingleton, useTranslate } from '../chunk-PE2H3NAW.js';
|
package/dist/providers/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* node_modules/.pnpm/katex@0.16.33/node_modules/katex/dist/katex.min.css */
|
|
2
2
|
@font-face {
|
|
3
3
|
font-display: block;
|
|
4
4
|
font-family: KaTeX_AMS;
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
border-color: currentColor;
|
|
214
214
|
}
|
|
215
215
|
.katex .katex-version:after {
|
|
216
|
-
content: "0.16.
|
|
216
|
+
content: "0.16.33";
|
|
217
217
|
}
|
|
218
218
|
.katex .katex-mathml {
|
|
219
219
|
clip: rect(1px, 1px, 1px, 1px);
|
|
@@ -988,6 +988,15 @@
|
|
|
988
988
|
.katex svg {
|
|
989
989
|
fill: currentColor;
|
|
990
990
|
stroke: currentColor;
|
|
991
|
+
display: block;
|
|
992
|
+
height: inherit;
|
|
993
|
+
position: absolute;
|
|
994
|
+
width: 100%;
|
|
995
|
+
}
|
|
996
|
+
.katex svg path {
|
|
997
|
+
stroke: none;
|
|
998
|
+
}
|
|
999
|
+
.katex svg {
|
|
991
1000
|
fill-rule: nonzero;
|
|
992
1001
|
fill-opacity: 1;
|
|
993
1002
|
stroke-width: 1;
|
|
@@ -997,13 +1006,6 @@
|
|
|
997
1006
|
stroke-dasharray: none;
|
|
998
1007
|
stroke-dashoffset: 0;
|
|
999
1008
|
stroke-opacity: 1;
|
|
1000
|
-
display: block;
|
|
1001
|
-
height: inherit;
|
|
1002
|
-
position: absolute;
|
|
1003
|
-
width: 100%;
|
|
1004
|
-
}
|
|
1005
|
-
.katex svg path {
|
|
1006
|
-
stroke: none;
|
|
1007
1009
|
}
|
|
1008
1010
|
.katex img {
|
|
1009
1011
|
border-style: none;
|
package/dist/providers/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SuspenseConfigProvider } from '../chunk-
|
|
1
|
+
import { SuspenseConfigProvider } from '../chunk-YNP2OBK4.js';
|
|
2
2
|
import { ThemeProvider } from '../chunk-BTXQJGFB.js';
|
|
3
3
|
import { SelectionProvider, EntityDataProvider } from '../chunk-PE2H3NAW.js';
|
|
4
4
|
export { SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-PE2H3NAW.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/components/index.js",
|
|
@@ -70,6 +70,9 @@
|
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
+
"@almadar/core": ">=2.0.0",
|
|
74
|
+
"@almadar/evaluator": ">=2.0.0",
|
|
75
|
+
"@almadar/patterns": ">=2.0.0",
|
|
73
76
|
"clsx": "^2.1.0",
|
|
74
77
|
"tailwind-merge": "^2.2.0",
|
|
75
78
|
"lucide-react": "^0.344.0",
|
|
@@ -77,10 +80,7 @@
|
|
|
77
80
|
"remark-gfm": "^4.0.0",
|
|
78
81
|
"remark-math": "^6.0.0",
|
|
79
82
|
"rehype-katex": "^7.0.0",
|
|
80
|
-
"react-syntax-highlighter": "^15.6.1"
|
|
81
|
-
"@almadar/evaluator": "1.0.16",
|
|
82
|
-
"@almadar/core": "1.0.18",
|
|
83
|
-
"@almadar/patterns": "1.1.1"
|
|
83
|
+
"react-syntax-highlighter": "^15.6.1"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"react": ">=18.0.0",
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"@storybook/react-vite": "^10.2.6",
|
|
106
106
|
"storybook": "^10.2.6",
|
|
107
107
|
"@vitejs/plugin-react": "^4.2.0",
|
|
108
|
-
"babel-plugin-react-compiler": "
|
|
109
|
-
"react-compiler-runtime": "
|
|
108
|
+
"babel-plugin-react-compiler": "19.0.0-beta-af1b7da-20250417",
|
|
109
|
+
"react-compiler-runtime": "19.0.0-beta-af1b7da-20250417",
|
|
110
110
|
"autoprefixer": "^10.4.0",
|
|
111
111
|
"postcss": "^8.4.35",
|
|
112
112
|
"tailwindcss": "^3.4.0",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"repository": {
|
|
127
127
|
"type": "git",
|
|
128
128
|
"url": "https://github.com/almadar-io/almadar.git",
|
|
129
|
-
"directory": "packages/
|
|
129
|
+
"directory": "docs/packages/ui"
|
|
130
130
|
},
|
|
131
131
|
"license": "MIT",
|
|
132
132
|
"keywords": [
|
|
@@ -136,6 +136,7 @@
|
|
|
136
136
|
"components",
|
|
137
137
|
"hooks"
|
|
138
138
|
],
|
|
139
|
+
"homepage": "https://github.com/almadar-io/almadar#readme",
|
|
139
140
|
"scripts": {
|
|
140
141
|
"build": "tsup",
|
|
141
142
|
"build:watch": "tsup --watch",
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Unified ThemeContext - Single provider for theme and color mode
|
|
5
|
-
*
|
|
6
|
-
* Combines design theme selection (ocean, wireframe, etc.) with
|
|
7
|
-
* color mode (light/dark) into a single, simple system.
|
|
8
|
-
*
|
|
9
|
-
* Uses a single data attribute: data-theme="ocean-light" or data-theme="ocean-dark"
|
|
10
|
-
*
|
|
11
|
-
* @packageDocumentation
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/** Color mode preference */
|
|
15
|
-
type ColorMode = "light" | "dark" | "system";
|
|
16
|
-
/** Resolved color mode (what's actually applied) */
|
|
17
|
-
type ResolvedMode = "light" | "dark";
|
|
18
|
-
/** Theme definition */
|
|
19
|
-
interface ThemeDefinition {
|
|
20
|
-
/** Theme identifier (e.g., "ocean", "wireframe") */
|
|
21
|
-
name: string;
|
|
22
|
-
/** Display name for UI (e.g., "Ocean Blue") */
|
|
23
|
-
displayName?: string;
|
|
24
|
-
/** Whether this theme has light mode styles */
|
|
25
|
-
hasLightMode?: boolean;
|
|
26
|
-
/** Whether this theme has dark mode styles */
|
|
27
|
-
hasDarkMode?: boolean;
|
|
28
|
-
}
|
|
29
|
-
/** Built-in themes available in the design system */
|
|
30
|
-
declare const BUILT_IN_THEMES: ThemeDefinition[];
|
|
31
|
-
/** Theme context value */
|
|
32
|
-
interface ThemeContextValue {
|
|
33
|
-
/** Current theme name */
|
|
34
|
-
theme: string;
|
|
35
|
-
/** Current color mode setting (may be 'system') */
|
|
36
|
-
mode: ColorMode;
|
|
37
|
-
/** Resolved color mode (always 'light' or 'dark') */
|
|
38
|
-
resolvedMode: ResolvedMode;
|
|
39
|
-
/** Set the theme */
|
|
40
|
-
setTheme: (theme: string) => void;
|
|
41
|
-
/** Set the color mode */
|
|
42
|
-
setMode: (mode: ColorMode) => void;
|
|
43
|
-
/** Toggle between light and dark modes */
|
|
44
|
-
toggleMode: () => void;
|
|
45
|
-
/** Available themes */
|
|
46
|
-
availableThemes: ThemeDefinition[];
|
|
47
|
-
/** The full theme string applied to data-theme (e.g., "ocean-light") */
|
|
48
|
-
appliedTheme: string;
|
|
49
|
-
}
|
|
50
|
-
declare const ThemeContext: React__default.Context<ThemeContextValue | undefined>;
|
|
51
|
-
interface ThemeProviderProps {
|
|
52
|
-
children: React__default.ReactNode;
|
|
53
|
-
/** Available themes (will be merged with built-in themes) */
|
|
54
|
-
themes?: readonly ThemeDefinition[] | ThemeDefinition[];
|
|
55
|
-
/** Default theme name */
|
|
56
|
-
defaultTheme?: string;
|
|
57
|
-
/** Default color mode */
|
|
58
|
-
defaultMode?: ColorMode;
|
|
59
|
-
/** Optional target element ref — when provided, theme attributes are applied to this element instead of document.documentElement */
|
|
60
|
-
targetRef?: React__default.RefObject<HTMLElement>;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Unified ThemeProvider component
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```tsx
|
|
67
|
-
* // Basic usage with built-in themes
|
|
68
|
-
* <ThemeProvider defaultTheme="wireframe" defaultMode="light">
|
|
69
|
-
* <App />
|
|
70
|
-
* </ThemeProvider>
|
|
71
|
-
*
|
|
72
|
-
* // With custom themes from orbital schema
|
|
73
|
-
* import { THEMES } from './generated/theme-manifest';
|
|
74
|
-
* <ThemeProvider themes={THEMES} defaultTheme="ocean" defaultMode="system">
|
|
75
|
-
* <App />
|
|
76
|
-
* </ThemeProvider>
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
80
|
-
/**
|
|
81
|
-
* Hook for accessing theme context
|
|
82
|
-
*
|
|
83
|
-
* @returns Theme context value
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* ```tsx
|
|
87
|
-
* const { theme, resolvedMode, toggleMode, setTheme } = useTheme();
|
|
88
|
-
*
|
|
89
|
-
* // Toggle dark mode
|
|
90
|
-
* <button onClick={toggleMode}>
|
|
91
|
-
* {resolvedMode === 'dark' ? 'Light' : 'Dark'}
|
|
92
|
-
* </button>
|
|
93
|
-
*
|
|
94
|
-
* // Change theme
|
|
95
|
-
* <select value={theme} onChange={(e) => setTheme(e.target.value)}>
|
|
96
|
-
* {availableThemes.map(t => (
|
|
97
|
-
* <option key={t.name} value={t.name}>{t.displayName || t.name}</option>
|
|
98
|
-
* ))}
|
|
99
|
-
* </select>
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
declare function useTheme(): ThemeContextValue;
|
|
103
|
-
type DesignTheme = ThemeDefinition;
|
|
104
|
-
|
|
105
|
-
export { BUILT_IN_THEMES as B, type ColorMode as C, type DesignTheme as D, type ResolvedMode as R, type ThemeProviderProps as T, ThemeContext as a, type ThemeDefinition as b, ThemeProvider as c, useTheme as u };
|
package/dist/cn-BoBXsxuX.d.ts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Orbital State Machine Visualizer
|
|
5
|
-
*
|
|
6
|
-
* Renders SVG diagrams from Orbital schemas and Trait definitions.
|
|
7
|
-
* Can be used in documentation, IDE previews, and other tools.
|
|
8
|
-
*/
|
|
9
|
-
interface VisualizerConfig {
|
|
10
|
-
nodeRadius: number;
|
|
11
|
-
nodeSpacing: number;
|
|
12
|
-
initialIndicatorOffset: number;
|
|
13
|
-
arrowSize: number;
|
|
14
|
-
colors: {
|
|
15
|
-
background: string;
|
|
16
|
-
node: string;
|
|
17
|
-
nodeBorder: string;
|
|
18
|
-
nodeText: string;
|
|
19
|
-
initialNode: string;
|
|
20
|
-
finalNode: string;
|
|
21
|
-
arrow: string;
|
|
22
|
-
arrowText: string;
|
|
23
|
-
effectText: string;
|
|
24
|
-
guardText: string;
|
|
25
|
-
initial: string;
|
|
26
|
-
};
|
|
27
|
-
fonts: {
|
|
28
|
-
node: string;
|
|
29
|
-
event: string;
|
|
30
|
-
effect: string;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
interface StateDefinition {
|
|
34
|
-
name: string;
|
|
35
|
-
isInitial?: boolean;
|
|
36
|
-
isFinal?: boolean;
|
|
37
|
-
description?: string;
|
|
38
|
-
}
|
|
39
|
-
interface TransitionDefinition {
|
|
40
|
-
from: string;
|
|
41
|
-
to: string;
|
|
42
|
-
event: string;
|
|
43
|
-
guard?: unknown;
|
|
44
|
-
effects?: unknown[];
|
|
45
|
-
}
|
|
46
|
-
interface StateMachineDefinition {
|
|
47
|
-
states: StateDefinition[];
|
|
48
|
-
transitions: TransitionDefinition[];
|
|
49
|
-
}
|
|
50
|
-
interface EntityDefinition {
|
|
51
|
-
name: string;
|
|
52
|
-
fields?: (string | {
|
|
53
|
-
name: string;
|
|
54
|
-
})[];
|
|
55
|
-
}
|
|
56
|
-
interface RenderOptions {
|
|
57
|
-
title?: string;
|
|
58
|
-
entity?: EntityDefinition;
|
|
59
|
-
}
|
|
60
|
-
/** Position data for a state node in DOM layout */
|
|
61
|
-
interface DomStateNode {
|
|
62
|
-
id: string;
|
|
63
|
-
name: string;
|
|
64
|
-
x: number;
|
|
65
|
-
y: number;
|
|
66
|
-
radius: number;
|
|
67
|
-
isInitial: boolean;
|
|
68
|
-
isFinal: boolean;
|
|
69
|
-
description?: string;
|
|
70
|
-
}
|
|
71
|
-
/** Position data for a transition arrow */
|
|
72
|
-
interface DomTransitionPath {
|
|
73
|
-
id: string;
|
|
74
|
-
from: string;
|
|
75
|
-
to: string;
|
|
76
|
-
/** SVG path data for the curved arrow */
|
|
77
|
-
pathData: string;
|
|
78
|
-
/** Midpoint for label positioning */
|
|
79
|
-
labelX: number;
|
|
80
|
-
labelY: number;
|
|
81
|
-
}
|
|
82
|
-
/** Position data for a transition label with guard/effect details */
|
|
83
|
-
interface DomTransitionLabel {
|
|
84
|
-
id: string;
|
|
85
|
-
from: string;
|
|
86
|
-
to: string;
|
|
87
|
-
event: string;
|
|
88
|
-
x: number;
|
|
89
|
-
y: number;
|
|
90
|
-
/** Human-readable guard text (e.g., "if amount > 100") */
|
|
91
|
-
guardText?: string;
|
|
92
|
-
/** Human-readable effect texts */
|
|
93
|
-
effectTexts: string[];
|
|
94
|
-
/** Whether this transition has details to show in tooltip */
|
|
95
|
-
hasDetails: boolean;
|
|
96
|
-
}
|
|
97
|
-
/** Entity input box data */
|
|
98
|
-
interface DomEntityBox {
|
|
99
|
-
name: string;
|
|
100
|
-
fields: string[];
|
|
101
|
-
x: number;
|
|
102
|
-
y: number;
|
|
103
|
-
width: number;
|
|
104
|
-
height: number;
|
|
105
|
-
}
|
|
106
|
-
/** Output effects box data */
|
|
107
|
-
interface DomOutputsBox {
|
|
108
|
-
outputs: string[];
|
|
109
|
-
x: number;
|
|
110
|
-
y: number;
|
|
111
|
-
width: number;
|
|
112
|
-
height: number;
|
|
113
|
-
}
|
|
114
|
-
/** Complete DOM layout data for rendering */
|
|
115
|
-
interface DomLayoutData {
|
|
116
|
-
width: number;
|
|
117
|
-
height: number;
|
|
118
|
-
title?: string;
|
|
119
|
-
states: DomStateNode[];
|
|
120
|
-
paths: DomTransitionPath[];
|
|
121
|
-
labels: DomTransitionLabel[];
|
|
122
|
-
entity?: DomEntityBox;
|
|
123
|
-
outputs?: DomOutputsBox;
|
|
124
|
-
config: VisualizerConfig;
|
|
125
|
-
}
|
|
126
|
-
declare const DEFAULT_CONFIG: VisualizerConfig;
|
|
127
|
-
declare function formatGuard(guard: unknown): string;
|
|
128
|
-
declare function getEffectSummary(effects: unknown[]): string;
|
|
129
|
-
declare function extractOutputsFromTransitions(transitions: TransitionDefinition[]): string[];
|
|
130
|
-
/**
|
|
131
|
-
* Render a state machine to an SVG string.
|
|
132
|
-
* Works in both browser and Node.js environments.
|
|
133
|
-
*/
|
|
134
|
-
declare function renderStateMachineToSvg(stateMachine: StateMachineDefinition, options?: RenderOptions, config?: VisualizerConfig): string;
|
|
135
|
-
/**
|
|
136
|
-
* Extract state machine from various data formats (Trait, Orbital, or raw)
|
|
137
|
-
*/
|
|
138
|
-
declare function extractStateMachine(data: unknown): StateMachineDefinition | null;
|
|
139
|
-
/**
|
|
140
|
-
* Render a state machine to DOM layout data.
|
|
141
|
-
* This is used by the DOM-based visualizer component for hybrid SVG/DOM rendering.
|
|
142
|
-
* Unlike renderStateMachineToSvg, this returns structured data instead of an SVG string.
|
|
143
|
-
*/
|
|
144
|
-
declare function renderStateMachineToDomData(stateMachine: StateMachineDefinition, options?: RenderOptions, config?: VisualizerConfig): DomLayoutData;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Content Segment Parsing Utilities
|
|
148
|
-
*
|
|
149
|
-
* Parses rich content with code blocks and quiz tags into structured
|
|
150
|
-
* segments for rendering. Detects orbital schemas in JSON code blocks
|
|
151
|
-
* and marks them for JazariStateMachine rendering.
|
|
152
|
-
*/
|
|
153
|
-
/** Segment types for content rendering */
|
|
154
|
-
type ContentSegment = {
|
|
155
|
-
type: 'markdown';
|
|
156
|
-
content: string;
|
|
157
|
-
} | {
|
|
158
|
-
type: 'code';
|
|
159
|
-
language: string;
|
|
160
|
-
content: string;
|
|
161
|
-
} | {
|
|
162
|
-
type: 'orbital';
|
|
163
|
-
language: string;
|
|
164
|
-
content: string;
|
|
165
|
-
schema: unknown;
|
|
166
|
-
} | {
|
|
167
|
-
type: 'quiz';
|
|
168
|
-
question: string;
|
|
169
|
-
answer: string;
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* Parse markdown content to extract code blocks.
|
|
173
|
-
*
|
|
174
|
-
* Splits markdown into segments of plain markdown and fenced code blocks.
|
|
175
|
-
* JSON/orb code blocks containing orbital schemas are tagged as 'orbital'.
|
|
176
|
-
*/
|
|
177
|
-
declare function parseMarkdownWithCodeBlocks(content: string | undefined | null): ContentSegment[];
|
|
178
|
-
/**
|
|
179
|
-
* Parse content to extract all segments including quiz tags and code blocks.
|
|
180
|
-
*
|
|
181
|
-
* Supported tags:
|
|
182
|
-
* - <question>q</question><answer>a</answer> — Quiz Q&A
|
|
183
|
-
*
|
|
184
|
-
* Also handles fenced code blocks (```language...```) with orbital detection.
|
|
185
|
-
*/
|
|
186
|
-
declare function parseContentSegments(content: string | undefined | null): ContentSegment[];
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Utility function to merge Tailwind CSS classes
|
|
190
|
-
* Combines clsx for conditional classes with tailwind-merge to handle conflicts
|
|
191
|
-
*/
|
|
192
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
193
|
-
|
|
194
|
-
export { type ContentSegment as C, DEFAULT_CONFIG as D, type EntityDefinition as E, type RenderOptions as R, type StateDefinition as S, type TransitionDefinition as T, type VisualizerConfig as V, type DomEntityBox as a, type DomLayoutData as b, type DomOutputsBox as c, type DomStateNode as d, type DomTransitionLabel as e, type DomTransitionPath as f, type StateMachineDefinition as g, cn as h, extractOutputsFromTransitions as i, extractStateMachine as j, formatGuard as k, getEffectSummary as l, parseMarkdownWithCodeBlocks as m, renderStateMachineToSvg as n, parseContentSegments as p, renderStateMachineToDomData as r };
|