@ultrst-armada/floks 2.0.4 → 2.0.6
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/.krusbl-release-attestation.json +3 -3
- package/package.json +3 -3
- package/packages/canvas-ui/dist/authoring/authoringOperations.d.ts +41 -0
- package/packages/canvas-ui/dist/authoring/authoringOperations.test.d.ts +1 -0
- package/packages/canvas-ui/dist/authoring/index.d.ts +1 -0
- package/packages/canvas-ui/dist/authoring/index.js +17 -3
- package/packages/canvas-ui/dist/{chunk-TS7P3WWH.js → chunk-CI4C6DJR.js} +108 -24
- package/packages/canvas-ui/dist/index.js +55 -41
- package/packages/canvas-ui/dist/predictive/index.js +1 -1
- package/packages/canvas-ui/package.json +2 -2
- package/packages/ui/dist/chunk-2YP2RPJY.js +54 -0
- package/packages/ui/dist/{chunk-HWYGCCRL.js → chunk-FA6GHJKU.js} +2 -2
- package/packages/ui/dist/{chunk-G5CYPT3P.js → chunk-IYBFDSTU.js} +93 -9
- package/packages/ui/dist/{chunk-DZTJJOLR.js → chunk-NKFSUEAH.js} +1 -1
- package/packages/ui/dist/{chunk-OMNGRMJY.js → chunk-QFUPODK6.js} +601 -534
- package/packages/ui/dist/{chunk-GOUFV3B4.js → chunk-RLM72WKL.js} +1 -1
- package/packages/ui/dist/{chunk-4GMTEWLE.js → chunk-SFD2LWCU.js} +2 -2
- package/packages/ui/dist/components/auth/index.js +3 -3
- package/packages/ui/dist/components/graph/index.js +3 -3
- package/packages/ui/dist/components/layout/index.js +2 -2
- package/packages/ui/dist/components/tiles/index.js +2 -2
- package/packages/ui/dist/components/workspace/GoogleDriveWorkspacePicker.d.ts +2 -2
- package/packages/ui/dist/components/workspace/WorkspaceCreateDialog.backblaze.test.d.ts +1 -0
- package/packages/ui/dist/components/workspace/WorkspaceCreateDialog.d.ts +45 -12
- package/packages/ui/dist/components/workspace/WorkspaceCreateDialog.kloks-service.test.d.ts +1 -0
- package/packages/ui/dist/components/workspace/WorkspaceGate.d.ts +3 -1
- package/packages/ui/dist/components/workspace/WorkspaceTilesMenu.d.ts +1 -1
- package/packages/ui/dist/components/workspace/index.d.ts +0 -3
- package/packages/ui/dist/components/workspace/index.js +3 -9
- package/packages/ui/dist/frnl/frnlPage.d.ts +30 -0
- package/packages/ui/dist/frnl/frnlTabWindow.d.ts +21 -0
- package/packages/ui/dist/frnl/index.d.ts +3 -1
- package/packages/ui/dist/frnl/index.js +7 -3
- package/packages/ui/dist/frnl/store.d.ts +7 -18
- package/packages/ui/dist/frnl/store.js +3 -1
- package/packages/ui/dist/index.js +49 -51
- package/packages/ui/package.json +2 -2
- package/packages/ui/dist/chunk-B4XTM5TI.js +0 -25
- package/packages/ui/dist/components/workspace/SrklBackblazeTile.d.ts +0 -27
- package/packages/ui/dist/components/workspace/StorageOptionTiles.d.ts +0 -27
- package/packages/ui/dist/components/workspace/StoragePresetTile.d.ts +0 -8
- package/packages/ui/dist/{chunk-MYXPGPI3.js → chunk-GWW3BGOB.js} +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"packageName": "@ultrst-armada/floks",
|
|
4
|
-
"version": "2.0.
|
|
5
|
-
"sourceCommit": "
|
|
4
|
+
"version": "2.0.6",
|
|
5
|
+
"sourceCommit": "f749bdb6416d8d441fda7567cd96ccd9b6a504d9",
|
|
6
6
|
"releaseWorkflow": "npm Release",
|
|
7
|
-
"workflowRunId": "
|
|
7
|
+
"workflowRunId": "44026031976"
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultrst-armada/floks",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"@dinilmusick/gutts": "^2.1.1",
|
|
105
|
-
"@ultrst-armada/frnlts": "^0.5.
|
|
105
|
+
"@ultrst-armada/frnlts": "^0.5.24",
|
|
106
106
|
"zod": "^3.24.1"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@types/node": "^22.0.0",
|
|
121
121
|
"@types/react": "^19.0.0",
|
|
122
122
|
"@types/react-dom": "^19.0.0",
|
|
123
|
-
"@ultrst-armada/frnlts": "^0.5.
|
|
123
|
+
"@ultrst-armada/frnlts": "^0.5.24",
|
|
124
124
|
"happy-dom": "^21.0.3",
|
|
125
125
|
"lucide-react": "^1.55.0",
|
|
126
126
|
"react": "^19.0.1",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AuthoringAssetRef, UIAuthoringContext, UIAuthoringNode, UIAuthoringSession } from './types.js';
|
|
2
|
+
export interface CreateAuthoringSessionInput {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
context: UIAuthoringContext;
|
|
5
|
+
operations?: UIAuthoringSession['operations'];
|
|
6
|
+
metadata?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
export interface AddAuthoringNodeInput {
|
|
9
|
+
id: string;
|
|
10
|
+
kind: UIAuthoringNode['kind'];
|
|
11
|
+
name?: string;
|
|
12
|
+
componentId?: string;
|
|
13
|
+
assetRef?: AuthoringAssetRef;
|
|
14
|
+
parentId?: string;
|
|
15
|
+
props?: UIAuthoringNode['props'];
|
|
16
|
+
slots?: UIAuthoringNode['slots'];
|
|
17
|
+
states?: UIAuthoringNode['states'];
|
|
18
|
+
events?: UIAuthoringNode['events'];
|
|
19
|
+
}
|
|
20
|
+
export interface AuthoringBindingInput {
|
|
21
|
+
componentId: string;
|
|
22
|
+
property: string;
|
|
23
|
+
target: {
|
|
24
|
+
kind: string;
|
|
25
|
+
apiId: string;
|
|
26
|
+
field: string;
|
|
27
|
+
fieldType?: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Pure, render-free API for constructing and mutating a Floks UI authoring session.
|
|
32
|
+
* Consumers can use this API from agents, generators, tests, or other UI tooling
|
|
33
|
+
* without mounting React components.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createAuthoringSession(input: CreateAuthoringSessionInput): UIAuthoringSession;
|
|
36
|
+
export declare function addAuthoringNode(session: UIAuthoringSession, input: AddAuthoringNodeInput): UIAuthoringSession;
|
|
37
|
+
export declare function updateAuthoringNode(session: UIAuthoringSession, nodeId: string, patch: Partial<Omit<UIAuthoringNode, 'id'>>): UIAuthoringSession;
|
|
38
|
+
export declare function removeAuthoringNode(session: UIAuthoringSession, nodeId: string): UIAuthoringSession;
|
|
39
|
+
export declare function bindAuthoringProperty(session: UIAuthoringSession, input: AuthoringBindingInput): UIAuthoringSession;
|
|
40
|
+
export declare function removeAuthoringBinding(session: UIAuthoringSession, componentId: string, property: string): UIAuthoringSession;
|
|
41
|
+
export declare function setAuthoringOperations(session: UIAuthoringSession, operations: UIAuthoringSession['operations']): UIAuthoringSession;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,10 +5,17 @@ import {
|
|
|
5
5
|
UiAuthoringTree,
|
|
6
6
|
UiAuthoringValidationPanel,
|
|
7
7
|
UiAuthoringWorkspace,
|
|
8
|
+
addAuthoringNode,
|
|
9
|
+
bindAuthoringProperty,
|
|
10
|
+
createAuthoringSession,
|
|
8
11
|
getAuthoringChildren,
|
|
9
12
|
getAuthoringDepth,
|
|
10
|
-
getAuthoringSubtreeIds
|
|
11
|
-
|
|
13
|
+
getAuthoringSubtreeIds,
|
|
14
|
+
removeAuthoringBinding,
|
|
15
|
+
removeAuthoringNode,
|
|
16
|
+
setAuthoringOperations,
|
|
17
|
+
updateAuthoringNode
|
|
18
|
+
} from "../chunk-CI4C6DJR.js";
|
|
12
19
|
export {
|
|
13
20
|
UiAuthoringBindingEditor,
|
|
14
21
|
UiAuthoringInspector,
|
|
@@ -16,7 +23,14 @@ export {
|
|
|
16
23
|
UiAuthoringTree,
|
|
17
24
|
UiAuthoringValidationPanel,
|
|
18
25
|
UiAuthoringWorkspace,
|
|
26
|
+
addAuthoringNode,
|
|
27
|
+
bindAuthoringProperty,
|
|
28
|
+
createAuthoringSession,
|
|
19
29
|
getAuthoringChildren,
|
|
20
30
|
getAuthoringDepth,
|
|
21
|
-
getAuthoringSubtreeIds
|
|
31
|
+
getAuthoringSubtreeIds,
|
|
32
|
+
removeAuthoringBinding,
|
|
33
|
+
removeAuthoringNode,
|
|
34
|
+
setAuthoringOperations,
|
|
35
|
+
updateAuthoringNode
|
|
22
36
|
};
|
|
@@ -28,6 +28,97 @@ function getAuthoringSubtreeIds(nodeId, nodes) {
|
|
|
28
28
|
return ids;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
// src/authoring/authoringOperations.ts
|
|
32
|
+
function createAuthoringSession(input) {
|
|
33
|
+
return {
|
|
34
|
+
sessionId: input.sessionId,
|
|
35
|
+
context: input.context,
|
|
36
|
+
nodes: [],
|
|
37
|
+
bindings: [],
|
|
38
|
+
operations: [...input.operations ?? []],
|
|
39
|
+
metadata: { ...input.metadata ?? {} }
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function addAuthoringNode(session, input) {
|
|
43
|
+
if (session.nodes.some((node2) => node2.id === input.id)) {
|
|
44
|
+
throw new Error(`Authoring node '${input.id}' already exists.`);
|
|
45
|
+
}
|
|
46
|
+
if (input.parentId && !session.nodes.some((node2) => node2.id === input.parentId)) {
|
|
47
|
+
throw new Error(`Authoring parent '${input.parentId}' does not exist.`);
|
|
48
|
+
}
|
|
49
|
+
const node = {
|
|
50
|
+
id: input.id,
|
|
51
|
+
kind: input.kind,
|
|
52
|
+
name: input.name ?? (input.kind === "component" ? input.componentId ?? "Component" : input.kind[0].toUpperCase() + input.kind.slice(1)),
|
|
53
|
+
componentId: input.componentId,
|
|
54
|
+
assetRef: input.assetRef,
|
|
55
|
+
parentId: input.parentId,
|
|
56
|
+
props: { ...input.props ?? {} },
|
|
57
|
+
slots: input.slots ? { ...input.slots } : void 0,
|
|
58
|
+
states: input.states ? { ...input.states } : void 0,
|
|
59
|
+
events: input.events ? { ...input.events } : void 0
|
|
60
|
+
};
|
|
61
|
+
return { ...session, nodes: [...session.nodes, node] };
|
|
62
|
+
}
|
|
63
|
+
function updateAuthoringNode(session, nodeId, patch) {
|
|
64
|
+
if (!session.nodes.some((node) => node.id === nodeId)) {
|
|
65
|
+
throw new Error(`Authoring node '${nodeId}' does not exist.`);
|
|
66
|
+
}
|
|
67
|
+
if (patch.parentId && !session.nodes.some((node) => node.id === patch.parentId)) {
|
|
68
|
+
throw new Error(`Authoring parent '${patch.parentId}' does not exist.`);
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
...session,
|
|
72
|
+
nodes: session.nodes.map((node) => node.id === nodeId ? { ...node, ...patch } : node)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function removeAuthoringNode(session, nodeId) {
|
|
76
|
+
if (!session.nodes.some((node) => node.id === nodeId)) {
|
|
77
|
+
throw new Error(`Authoring node '${nodeId}' does not exist.`);
|
|
78
|
+
}
|
|
79
|
+
const removedIds = getAuthoringSubtreeIds(nodeId, session.nodes);
|
|
80
|
+
return {
|
|
81
|
+
...session,
|
|
82
|
+
nodes: session.nodes.filter((node) => !removedIds.has(node.id)).map((node) => ({
|
|
83
|
+
...node,
|
|
84
|
+
slots: node.slots ? Object.fromEntries(Object.entries(node.slots).map(([slot, children]) => [
|
|
85
|
+
slot,
|
|
86
|
+
children.filter((childId) => !removedIds.has(childId))
|
|
87
|
+
])) : void 0
|
|
88
|
+
})),
|
|
89
|
+
bindings: session.bindings.filter((binding) => !removedIds.has(binding.componentId))
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function bindAuthoringProperty(session, input) {
|
|
93
|
+
if (!session.nodes.some((node) => node.id === input.componentId)) {
|
|
94
|
+
throw new Error(`Authoring component '${input.componentId}' does not exist.`);
|
|
95
|
+
}
|
|
96
|
+
if (!input.property.trim()) {
|
|
97
|
+
throw new Error("Authoring binding property cannot be empty.");
|
|
98
|
+
}
|
|
99
|
+
const property = input.property.trim();
|
|
100
|
+
return {
|
|
101
|
+
...session,
|
|
102
|
+
bindings: [
|
|
103
|
+
...session.bindings.filter(
|
|
104
|
+
(binding) => binding.componentId !== input.componentId || binding.property !== property
|
|
105
|
+
),
|
|
106
|
+
{ ...input, property }
|
|
107
|
+
]
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function removeAuthoringBinding(session, componentId, property) {
|
|
111
|
+
return {
|
|
112
|
+
...session,
|
|
113
|
+
bindings: session.bindings.filter(
|
|
114
|
+
(binding) => binding.componentId !== componentId || binding.property !== property
|
|
115
|
+
)
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function setAuthoringOperations(session, operations) {
|
|
119
|
+
return { ...session, operations: operations.map((operation) => ({ ...operation })) };
|
|
120
|
+
}
|
|
121
|
+
|
|
31
122
|
// src/authoring/UiAuthoringTree.tsx
|
|
32
123
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
124
|
function UiAuthoringTree(props) {
|
|
@@ -219,40 +310,26 @@ function UiAuthoringWorkspace(props) {
|
|
|
219
310
|
const [selectedNodeId, setSelectedNodeId] = React3.useState();
|
|
220
311
|
const selectedNode = props.session.nodes.find((node) => node.id === selectedNodeId);
|
|
221
312
|
const addNode = (kind, assetRef) => {
|
|
222
|
-
const parent = kind === "section" ? props.session.nodes.find((
|
|
223
|
-
const
|
|
224
|
-
|
|
313
|
+
const parent = kind === "section" ? props.session.nodes.find((node) => node.kind === "page") : kind === "component" ? props.session.nodes.find((node) => node.kind === "section") : void 0;
|
|
314
|
+
const id = `authoring-${kind}-${Date.now().toString(36)}`;
|
|
315
|
+
const session = addAuthoringNode(props.session, {
|
|
316
|
+
id,
|
|
225
317
|
kind,
|
|
226
318
|
name: kind === "component" ? assetRef?.assetId || "Component" : kind[0].toUpperCase() + kind.slice(1),
|
|
227
319
|
componentId: kind === "component" ? assetRef?.assetId : void 0,
|
|
228
320
|
assetRef,
|
|
229
|
-
parentId: parent?.id
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
setSelectedNodeId(node.id);
|
|
321
|
+
parentId: parent?.id
|
|
322
|
+
});
|
|
323
|
+
props.onChange(session);
|
|
324
|
+
setSelectedNodeId(id);
|
|
234
325
|
};
|
|
235
326
|
const updateSelected = (patch) => {
|
|
236
327
|
if (!selectedNode) return;
|
|
237
|
-
props.onChange(
|
|
238
|
-
...props.session,
|
|
239
|
-
nodes: props.session.nodes.map((node) => node.id === selectedNode.id ? { ...node, ...patch } : node)
|
|
240
|
-
});
|
|
328
|
+
props.onChange(updateAuthoringNode(props.session, selectedNode.id, patch));
|
|
241
329
|
};
|
|
242
330
|
const removeSelected = () => {
|
|
243
331
|
if (!selectedNode) return;
|
|
244
|
-
|
|
245
|
-
props.onChange({
|
|
246
|
-
...props.session,
|
|
247
|
-
nodes: props.session.nodes.filter((node) => !removedIds.has(node.id)).map((node) => ({
|
|
248
|
-
...node,
|
|
249
|
-
slots: node.slots ? Object.fromEntries(Object.entries(node.slots).map(([slot, children]) => [
|
|
250
|
-
slot,
|
|
251
|
-
children.filter((childId) => !removedIds.has(childId))
|
|
252
|
-
])) : void 0
|
|
253
|
-
})),
|
|
254
|
-
bindings: props.session.bindings.filter((binding) => !removedIds.has(binding.componentId))
|
|
255
|
-
});
|
|
332
|
+
props.onChange(removeAuthoringNode(props.session, selectedNode.id));
|
|
256
333
|
setSelectedNodeId(void 0);
|
|
257
334
|
};
|
|
258
335
|
const contextLabel = {
|
|
@@ -347,6 +424,13 @@ export {
|
|
|
347
424
|
getAuthoringDepth,
|
|
348
425
|
getAuthoringChildren,
|
|
349
426
|
getAuthoringSubtreeIds,
|
|
427
|
+
createAuthoringSession,
|
|
428
|
+
addAuthoringNode,
|
|
429
|
+
updateAuthoringNode,
|
|
430
|
+
removeAuthoringNode,
|
|
431
|
+
bindAuthoringProperty,
|
|
432
|
+
removeAuthoringBinding,
|
|
433
|
+
setAuthoringOperations,
|
|
350
434
|
UiAuthoringTree,
|
|
351
435
|
UiAuthoringInspector,
|
|
352
436
|
UiAuthoringBindingEditor,
|
|
@@ -1,34 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ContainerNode2D,
|
|
7
|
-
EffectNode2D,
|
|
8
|
-
MagneticTraces2D,
|
|
9
|
-
ModuleNode2D,
|
|
10
|
-
NODE_CARD_WIDTH,
|
|
11
|
-
Node2DBase,
|
|
12
|
-
NodeRenderer2D,
|
|
13
|
-
RecorderWaveformDisplay,
|
|
14
|
-
RotaryKnob,
|
|
15
|
-
SOCKET_ROW_HEIGHT,
|
|
16
|
-
Socket2D,
|
|
17
|
-
TriggerNode2D,
|
|
18
|
-
Wire2D,
|
|
19
|
-
renderSpriteIcon,
|
|
20
|
-
useCanvas2DCoordinates,
|
|
21
|
-
useCanvas2DMagnetic
|
|
22
|
-
} from "./chunk-ZDADZVQ2.js";
|
|
2
|
+
DockBar,
|
|
3
|
+
DockItem,
|
|
4
|
+
useDock
|
|
5
|
+
} from "./chunk-6VB74RCH.js";
|
|
23
6
|
import {
|
|
24
7
|
PredictiveGhostNodeCard,
|
|
25
8
|
PredictiveHudToolbar,
|
|
26
9
|
PredictiveLayer2D
|
|
27
10
|
} from "./chunk-A7BSZ5QO.js";
|
|
28
|
-
import {
|
|
29
|
-
getSocketLocalOffset,
|
|
30
|
-
getSocketScreenPosition
|
|
31
|
-
} from "./chunk-FPRATI44.js";
|
|
32
11
|
import {
|
|
33
12
|
Tile,
|
|
34
13
|
TileCreateButton,
|
|
@@ -45,29 +24,25 @@ import {
|
|
|
45
24
|
UiAuthoringTree,
|
|
46
25
|
UiAuthoringValidationPanel,
|
|
47
26
|
UiAuthoringWorkspace,
|
|
27
|
+
addAuthoringNode,
|
|
28
|
+
bindAuthoringProperty,
|
|
29
|
+
createAuthoringSession,
|
|
48
30
|
getAuthoringChildren,
|
|
49
31
|
getAuthoringDepth,
|
|
50
|
-
getAuthoringSubtreeIds
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
useCanvas
|
|
57
|
-
} from "./chunk-34YRDZPJ.js";
|
|
58
|
-
import {
|
|
59
|
-
DockBar,
|
|
60
|
-
DockItem,
|
|
61
|
-
useDock
|
|
62
|
-
} from "./chunk-6VB74RCH.js";
|
|
63
|
-
import {
|
|
64
|
-
FodModule
|
|
65
|
-
} from "./chunk-TKOMIUCU.js";
|
|
32
|
+
getAuthoringSubtreeIds,
|
|
33
|
+
removeAuthoringBinding,
|
|
34
|
+
removeAuthoringNode,
|
|
35
|
+
setAuthoringOperations,
|
|
36
|
+
updateAuthoringNode
|
|
37
|
+
} from "./chunk-CI4C6DJR.js";
|
|
66
38
|
import {
|
|
67
39
|
MonacoEditor,
|
|
68
40
|
skipoDarkTheme,
|
|
69
41
|
useMonaco
|
|
70
42
|
} from "./chunk-KAKAFGVH.js";
|
|
43
|
+
import {
|
|
44
|
+
FodModule
|
|
45
|
+
} from "./chunk-TKOMIUCU.js";
|
|
71
46
|
import {
|
|
72
47
|
CanvasContextMenu,
|
|
73
48
|
CompatibleNodePicker,
|
|
@@ -80,6 +55,38 @@ import {
|
|
|
80
55
|
import {
|
|
81
56
|
usePredictiveGraph2D
|
|
82
57
|
} from "./chunk-ZSVXR3HU.js";
|
|
58
|
+
import {
|
|
59
|
+
BIOME_CONFIGS,
|
|
60
|
+
COORD_SCALE,
|
|
61
|
+
CanvasBackground2D,
|
|
62
|
+
CanvasErrorBoundary,
|
|
63
|
+
ContainerNode2D,
|
|
64
|
+
EffectNode2D,
|
|
65
|
+
MagneticTraces2D,
|
|
66
|
+
ModuleNode2D,
|
|
67
|
+
NODE_CARD_WIDTH,
|
|
68
|
+
Node2DBase,
|
|
69
|
+
NodeRenderer2D,
|
|
70
|
+
RecorderWaveformDisplay,
|
|
71
|
+
RotaryKnob,
|
|
72
|
+
SOCKET_ROW_HEIGHT,
|
|
73
|
+
Socket2D,
|
|
74
|
+
TriggerNode2D,
|
|
75
|
+
Wire2D,
|
|
76
|
+
renderSpriteIcon,
|
|
77
|
+
useCanvas2DCoordinates,
|
|
78
|
+
useCanvas2DMagnetic
|
|
79
|
+
} from "./chunk-ZDADZVQ2.js";
|
|
80
|
+
import {
|
|
81
|
+
getSocketLocalOffset,
|
|
82
|
+
getSocketScreenPosition
|
|
83
|
+
} from "./chunk-FPRATI44.js";
|
|
84
|
+
import {
|
|
85
|
+
CanvasViewport,
|
|
86
|
+
InfiniteCanvas,
|
|
87
|
+
MiniMap,
|
|
88
|
+
useCanvas
|
|
89
|
+
} from "./chunk-34YRDZPJ.js";
|
|
83
90
|
|
|
84
91
|
// src/node-graph-ui/widgets/MidpointWidgets.tsx
|
|
85
92
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -757,6 +764,9 @@ export {
|
|
|
757
764
|
UiAuthoringWorkspace,
|
|
758
765
|
Viewer2DNodes,
|
|
759
766
|
Wire2D,
|
|
767
|
+
addAuthoringNode,
|
|
768
|
+
bindAuthoringProperty,
|
|
769
|
+
createAuthoringSession,
|
|
760
770
|
frnlEditableNodeGraphDefinition,
|
|
761
771
|
getAuthoringChildren,
|
|
762
772
|
getAuthoringDepth,
|
|
@@ -765,8 +775,12 @@ export {
|
|
|
765
775
|
getSocketScreenPosition,
|
|
766
776
|
menuCategory,
|
|
767
777
|
menuHidden,
|
|
778
|
+
removeAuthoringBinding,
|
|
779
|
+
removeAuthoringNode,
|
|
768
780
|
renderSpriteIcon,
|
|
781
|
+
setAuthoringOperations,
|
|
769
782
|
skipoDarkTheme,
|
|
783
|
+
updateAuthoringNode,
|
|
770
784
|
useCanvas,
|
|
771
785
|
useCanvas2DCoordinates,
|
|
772
786
|
useCanvas2DMagnetic,
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
PredictiveHudToolbar,
|
|
4
4
|
PredictiveLayer2D
|
|
5
5
|
} from "../chunk-A7BSZ5QO.js";
|
|
6
|
-
import "../chunk-FPRATI44.js";
|
|
7
6
|
import {
|
|
8
7
|
usePredictiveGraph2D
|
|
9
8
|
} from "../chunk-ZSVXR3HU.js";
|
|
9
|
+
import "../chunk-FPRATI44.js";
|
|
10
10
|
export {
|
|
11
11
|
PredictiveGhostNodeCard,
|
|
12
12
|
PredictiveHudToolbar,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floks/canvas-ui",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"description": "Floks Canvas UI
|
|
4
|
+
"description": "Floks Canvas UI — Reusable React Visual Components for Infinite Canvas, Dock, Tile Menus, Code Editor, and Node Graphs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"publishConfig": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@floks/ui": "workspace:*",
|
|
79
|
-
"@ultrst-armada/frnlts": "^0.5.
|
|
79
|
+
"@ultrst-armada/frnlts": "^0.5.24",
|
|
80
80
|
"@floks/contracts": "workspace:*"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/frnl/store.ts
|
|
2
|
+
import React, { createContext, useContext, useMemo } from "react";
|
|
3
|
+
import {
|
|
4
|
+
createFrnlFrontendApi,
|
|
5
|
+
createFrnlDomMeasurementAdapter,
|
|
6
|
+
installFrnlFrontendApi,
|
|
7
|
+
createFrnlStore
|
|
8
|
+
} from "@ultrst-armada/frnlts";
|
|
9
|
+
var floksFrnlStore = createFrnlStore();
|
|
10
|
+
var floksFrnlFrontendApi = createFrnlFrontendApi(floksFrnlStore, {
|
|
11
|
+
applicationId: "floks",
|
|
12
|
+
measurementAdapter: createFrnlDomMeasurementAdapter()
|
|
13
|
+
});
|
|
14
|
+
installFrnlFrontendApi(floksFrnlFrontendApi);
|
|
15
|
+
function getFloksFrnlStore() {
|
|
16
|
+
return floksFrnlStore;
|
|
17
|
+
}
|
|
18
|
+
function getFloksFrnlFrontendApi() {
|
|
19
|
+
return floksFrnlFrontendApi;
|
|
20
|
+
}
|
|
21
|
+
var FrnlStoreContext = createContext(null);
|
|
22
|
+
var FrnlStoreProvider = ({
|
|
23
|
+
store,
|
|
24
|
+
children,
|
|
25
|
+
applicationId,
|
|
26
|
+
route
|
|
27
|
+
}) => {
|
|
28
|
+
const api = useMemo(
|
|
29
|
+
() => createFrnlFrontendApi(store, {
|
|
30
|
+
applicationId,
|
|
31
|
+
route,
|
|
32
|
+
measurementAdapter: createFrnlDomMeasurementAdapter()
|
|
33
|
+
}),
|
|
34
|
+
[store, applicationId, route]
|
|
35
|
+
);
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
installFrnlFrontendApi(api);
|
|
38
|
+
return () => api.dispose();
|
|
39
|
+
}, [api]);
|
|
40
|
+
return React.createElement(FrnlStoreContext.Provider, { value: store }, children);
|
|
41
|
+
};
|
|
42
|
+
function useFloksFrnlStore() {
|
|
43
|
+
const contextStore = useContext(FrnlStoreContext);
|
|
44
|
+
return contextStore ?? floksFrnlStore;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
floksFrnlStore,
|
|
49
|
+
floksFrnlFrontendApi,
|
|
50
|
+
getFloksFrnlStore,
|
|
51
|
+
getFloksFrnlFrontendApi,
|
|
52
|
+
FrnlStoreProvider,
|
|
53
|
+
useFloksFrnlStore
|
|
54
|
+
};
|