@almadar/ui 1.0.14 → 1.0.16
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
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Parameters
|
|
4
|
+
|
|
5
|
+
Licensor: Almadar FZE
|
|
6
|
+
Licensed Work: KFlow Builder / Almadar
|
|
7
|
+
The Licensed Work is (c) 2025-2026 Almadar FZE.
|
|
8
|
+
Additional Use Grant: You may make production use of the Licensed Work for
|
|
9
|
+
non-commercial purposes and for internal evaluation.
|
|
10
|
+
Production use for commercial purposes requires a
|
|
11
|
+
commercial license from the Licensor.
|
|
12
|
+
Change Date: 2030-02-01
|
|
13
|
+
Change License: Apache License, Version 2.0
|
|
14
|
+
|
|
15
|
+
Terms
|
|
16
|
+
|
|
17
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
18
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
19
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
20
|
+
production use.
|
|
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,30 +1,7 @@
|
|
|
1
1
|
import { useUISlotManager } from './chunk-7NEWMNNU.js';
|
|
2
|
-
import { createContext, useMemo,
|
|
2
|
+
import { createContext, useMemo, useState, useEffect, useCallback, useContext } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var UISlotContext = createContext(null);
|
|
6
|
-
function UISlotProvider({ children }) {
|
|
7
|
-
const slotManager = useUISlotManager();
|
|
8
|
-
const contextValue = useMemo(() => slotManager, [slotManager]);
|
|
9
|
-
return /* @__PURE__ */ jsx(UISlotContext.Provider, { value: contextValue, children });
|
|
10
|
-
}
|
|
11
|
-
function useUISlots() {
|
|
12
|
-
const context = useContext(UISlotContext);
|
|
13
|
-
if (!context) {
|
|
14
|
-
throw new Error(
|
|
15
|
-
"useUISlots must be used within a UISlotProvider. Make sure your component tree is wrapped with <UISlotProvider>."
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
return context;
|
|
19
|
-
}
|
|
20
|
-
function useSlotContent(slot) {
|
|
21
|
-
const { getContent } = useUISlots();
|
|
22
|
-
return getContent(slot);
|
|
23
|
-
}
|
|
24
|
-
function useSlotHasContent(slot) {
|
|
25
|
-
const { hasContent } = useUISlots();
|
|
26
|
-
return hasContent(slot);
|
|
27
|
-
}
|
|
28
5
|
var BUILT_IN_THEMES = [
|
|
29
6
|
{
|
|
30
7
|
name: "wireframe",
|
|
@@ -186,5 +163,28 @@ function useTheme() {
|
|
|
186
163
|
return context;
|
|
187
164
|
}
|
|
188
165
|
var ThemeContext_default = ThemeContext;
|
|
166
|
+
var UISlotContext = createContext(null);
|
|
167
|
+
function UISlotProvider({ children }) {
|
|
168
|
+
const slotManager = useUISlotManager();
|
|
169
|
+
const contextValue = useMemo(() => slotManager, [slotManager]);
|
|
170
|
+
return /* @__PURE__ */ jsx(UISlotContext.Provider, { value: contextValue, children });
|
|
171
|
+
}
|
|
172
|
+
function useUISlots() {
|
|
173
|
+
const context = useContext(UISlotContext);
|
|
174
|
+
if (!context) {
|
|
175
|
+
throw new Error(
|
|
176
|
+
"useUISlots must be used within a UISlotProvider. Make sure your component tree is wrapped with <UISlotProvider>."
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
return context;
|
|
180
|
+
}
|
|
181
|
+
function useSlotContent(slot) {
|
|
182
|
+
const { getContent } = useUISlots();
|
|
183
|
+
return getContent(slot);
|
|
184
|
+
}
|
|
185
|
+
function useSlotHasContent(slot) {
|
|
186
|
+
const { hasContent } = useUISlots();
|
|
187
|
+
return hasContent(slot);
|
|
188
|
+
}
|
|
189
189
|
|
|
190
190
|
export { BUILT_IN_THEMES, ThemeContext_default, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots };
|
package/dist/components/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useDesignTheme } from '../chunk-
|
|
2
|
-
import { useQuerySingleton, usePaginatedEntityList, useEntityList, useSelectedEntity, useEntityDetail, useAuthContext } from '../chunk-MLS5KU5U.js';
|
|
3
|
-
export { ENTITY_EVENTS, entityDataKeys, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity, useEntity2 as useEntityById, useEntityDetail, useEntityList, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-MLS5KU5U.js';
|
|
1
|
+
import { useDesignTheme } from '../chunk-QFAKJLOK.js';
|
|
4
2
|
import { cn, debugGroup, debug, debugGroupEnd, getNestedValue, isDebugEnabled } from '../chunk-KKCVDUK7.js';
|
|
5
3
|
export { cn } from '../chunk-KKCVDUK7.js';
|
|
4
|
+
import { useQuerySingleton, usePaginatedEntityList, useEntityList, useSelectedEntity, useEntityDetail, useAuthContext } from '../chunk-MLS5KU5U.js';
|
|
5
|
+
export { ENTITY_EVENTS, entityDataKeys, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity, useEntity2 as useEntityById, useEntityDetail, useEntityList, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-MLS5KU5U.js';
|
|
6
6
|
import '../chunk-XSEDIUM6.js';
|
|
7
|
-
import { useTheme, useUISlots } from '../chunk-
|
|
7
|
+
import { useTheme, useUISlots } from '../chunk-DTKTZ3UR.js';
|
|
8
8
|
import { useEventBus } from '../chunk-TTXKOHDO.js';
|
|
9
9
|
export { useEmitEvent, useEventBus, useEventListener } from '../chunk-TTXKOHDO.js';
|
|
10
10
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-7NEWMNNU.js';
|
|
@@ -9760,8 +9760,9 @@ var TabbedContainer = ({
|
|
|
9760
9760
|
position = "top",
|
|
9761
9761
|
className
|
|
9762
9762
|
}) => {
|
|
9763
|
+
const safeTabs = tabs || [];
|
|
9763
9764
|
const [internalActiveTab, setInternalActiveTab] = useState(
|
|
9764
|
-
defaultTab ||
|
|
9765
|
+
defaultTab || safeTabs[0]?.id || ""
|
|
9765
9766
|
);
|
|
9766
9767
|
const activeTab = controlledActiveTab !== void 0 ? controlledActiveTab : internalActiveTab;
|
|
9767
9768
|
const handleTabChange = useCallback(
|
|
@@ -9773,7 +9774,7 @@ var TabbedContainer = ({
|
|
|
9773
9774
|
},
|
|
9774
9775
|
[controlledActiveTab, onTabChange]
|
|
9775
9776
|
);
|
|
9776
|
-
const activeTabDef =
|
|
9777
|
+
const activeTabDef = safeTabs.find((tab) => tab.id === activeTab);
|
|
9777
9778
|
const activeContent = activeTabDef?.content || (activeTabDef?.sectionId ? /* @__PURE__ */ jsxs("div", { className: "p-4 text-[var(--color-muted-foreground)]", children: [
|
|
9778
9779
|
"Section: ",
|
|
9779
9780
|
activeTabDef.sectionId
|
|
@@ -9796,7 +9797,7 @@ var TabbedContainer = ({
|
|
|
9796
9797
|
"flex flex-shrink-0",
|
|
9797
9798
|
isVertical ? "flex-col border-r-2 border-[var(--color-border)]" : "flex-row border-b-2 border-[var(--color-border)]"
|
|
9798
9799
|
),
|
|
9799
|
-
children:
|
|
9800
|
+
children: safeTabs.map((tab) => {
|
|
9800
9801
|
const isActive = tab.id === activeTab;
|
|
9801
9802
|
const isDisabled = tab.disabled;
|
|
9802
9803
|
return /* @__PURE__ */ jsxs(
|
package/dist/context/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DesignThemeProvider, useDesignTheme } from '../chunk-
|
|
2
|
-
export { BUILT_IN_THEMES, ThemeContext_default as ThemeContext, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots } from '../chunk-
|
|
1
|
+
export { DesignThemeProvider, useDesignTheme } from '../chunk-QFAKJLOK.js';
|
|
2
|
+
export { BUILT_IN_THEMES, ThemeContext_default as ThemeContext, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots } from '../chunk-DTKTZ3UR.js';
|
|
3
3
|
import '../chunk-7NEWMNNU.js';
|
|
4
4
|
import '../chunk-PKBMQBKP.js';
|
|
5
5
|
import { createContext, useCallback, useMemo, useContext } from 'react';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ThemeProvider, UISlotProvider } from '../chunk-
|
|
1
|
+
import { ThemeProvider, UISlotProvider } from '../chunk-DTKTZ3UR.js';
|
|
2
2
|
import { EventBusProvider, SelectionProvider } from '../chunk-TTXKOHDO.js';
|
|
3
3
|
export { EventBusContext, EventBusProvider, SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-TTXKOHDO.js';
|
|
4
4
|
import '../chunk-7NEWMNNU.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/components/index.js",
|
|
@@ -49,18 +49,7 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"scripts": {
|
|
53
|
-
"build": "tsup",
|
|
54
|
-
"build:watch": "tsup --watch",
|
|
55
|
-
"storybook": "storybook dev -p 6006",
|
|
56
|
-
"build-storybook": "storybook build -o storybook-static",
|
|
57
|
-
"typecheck": "tsc --noEmit",
|
|
58
|
-
"prepublishOnly": "pnpm run build"
|
|
59
|
-
},
|
|
60
52
|
"dependencies": {
|
|
61
|
-
"@almadar/core": "workspace:*",
|
|
62
|
-
"@almadar/evaluator": "workspace:*",
|
|
63
|
-
"@almadar/patterns": "workspace:*",
|
|
64
53
|
"clsx": "^2.1.0",
|
|
65
54
|
"tailwind-merge": "^2.2.0",
|
|
66
55
|
"lucide-react": "^0.344.0",
|
|
@@ -71,7 +60,10 @@
|
|
|
71
60
|
"rehype-raw": "^7.0.0",
|
|
72
61
|
"remark-gfm": "^4.0.1",
|
|
73
62
|
"remark-math": "^6.0.0",
|
|
74
|
-
"react-force-graph-2d": "^1.28.0"
|
|
63
|
+
"react-force-graph-2d": "^1.28.0",
|
|
64
|
+
"@almadar/core": "1.0.13",
|
|
65
|
+
"@almadar/evaluator": "1.0.13",
|
|
66
|
+
"@almadar/patterns": "1.0.14"
|
|
75
67
|
},
|
|
76
68
|
"peerDependencies": {
|
|
77
69
|
"react": "^18.0.0",
|
|
@@ -119,5 +111,12 @@
|
|
|
119
111
|
"react",
|
|
120
112
|
"components",
|
|
121
113
|
"hooks"
|
|
122
|
-
]
|
|
123
|
-
|
|
114
|
+
],
|
|
115
|
+
"scripts": {
|
|
116
|
+
"build": "tsup",
|
|
117
|
+
"build:watch": "tsup --watch",
|
|
118
|
+
"storybook": "storybook dev -p 6006",
|
|
119
|
+
"build-storybook": "storybook build -o storybook-static",
|
|
120
|
+
"typecheck": "tsc --noEmit"
|
|
121
|
+
}
|
|
122
|
+
}
|