@ultrst-armada/floks 2.0.4 → 2.0.7

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.
Files changed (39) hide show
  1. package/.krusbl-release-attestation.json +3 -3
  2. package/package.json +3 -3
  3. package/packages/canvas-ui/dist/authoring/authoringOperations.d.ts +41 -0
  4. package/packages/canvas-ui/dist/authoring/authoringOperations.test.d.ts +1 -0
  5. package/packages/canvas-ui/dist/authoring/index.d.ts +1 -0
  6. package/packages/canvas-ui/dist/authoring/index.js +17 -3
  7. package/packages/canvas-ui/dist/{chunk-TS7P3WWH.js → chunk-CI4C6DJR.js} +108 -24
  8. package/packages/canvas-ui/dist/index.js +25 -11
  9. package/packages/canvas-ui/package.json +2 -2
  10. package/packages/ui/dist/chunk-2YP2RPJY.js +54 -0
  11. package/packages/ui/dist/{chunk-4GMTEWLE.js → chunk-6EYOJ4DD.js} +2 -2
  12. package/packages/ui/dist/{chunk-DZTJJOLR.js → chunk-DEKSKDSF.js} +26 -13
  13. package/packages/ui/dist/{chunk-HWYGCCRL.js → chunk-FA6GHJKU.js} +2 -2
  14. package/packages/ui/dist/{chunk-OMNGRMJY.js → chunk-FVOZFKV7.js} +601 -534
  15. package/packages/ui/dist/{chunk-G5CYPT3P.js → chunk-IYBFDSTU.js} +93 -9
  16. package/packages/ui/dist/{chunk-GOUFV3B4.js → chunk-RLM72WKL.js} +1 -1
  17. package/packages/ui/dist/components/auth/index.js +3 -3
  18. package/packages/ui/dist/components/graph/index.js +3 -3
  19. package/packages/ui/dist/components/tiles/index.js +2 -2
  20. package/packages/ui/dist/components/workspace/GoogleDriveWorkspacePicker.d.ts +2 -2
  21. package/packages/ui/dist/components/workspace/WorkspaceCreateDialog.backblaze.test.d.ts +1 -0
  22. package/packages/ui/dist/components/workspace/WorkspaceCreateDialog.d.ts +45 -12
  23. package/packages/ui/dist/components/workspace/WorkspaceCreateDialog.kloks-service.test.d.ts +1 -0
  24. package/packages/ui/dist/components/workspace/WorkspaceGate.d.ts +3 -1
  25. package/packages/ui/dist/components/workspace/WorkspaceTilesMenu.d.ts +1 -1
  26. package/packages/ui/dist/components/workspace/index.d.ts +0 -3
  27. package/packages/ui/dist/components/workspace/index.js +3 -9
  28. package/packages/ui/dist/frnl/frnlPage.d.ts +30 -0
  29. package/packages/ui/dist/frnl/frnlTabWindow.d.ts +21 -0
  30. package/packages/ui/dist/frnl/index.d.ts +3 -1
  31. package/packages/ui/dist/frnl/index.js +7 -3
  32. package/packages/ui/dist/frnl/store.d.ts +7 -18
  33. package/packages/ui/dist/frnl/store.js +3 -1
  34. package/packages/ui/dist/index.js +11 -13
  35. package/packages/ui/package.json +2 -2
  36. package/packages/ui/dist/chunk-B4XTM5TI.js +0 -25
  37. package/packages/ui/dist/components/workspace/SrklBackblazeTile.d.ts +0 -27
  38. package/packages/ui/dist/components/workspace/StorageOptionTiles.d.ts +0 -27
  39. package/packages/ui/dist/components/workspace/StoragePresetTile.d.ts +0 -8
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@ultrst-armada/floks",
4
- "version": "2.0.4",
5
- "sourceCommit": "3c0a2b794d5669eee91e53418da4fdf77b99a3de",
4
+ "version": "2.0.7",
5
+ "sourceCommit": "30e9828c9552718fefa773b3122ffd74b86f84d0",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "43831555360"
7
+ "workflowRunId": "44079620802"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/floks",
3
- "version": "2.0.4",
3
+ "version": "2.0.7",
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.23",
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.23",
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;
@@ -1,4 +1,5 @@
1
1
  export * from './authoringModel.js';
2
+ export * from './authoringOperations.js';
2
3
  export * from './UiAuthoringTree.js';
3
4
  export * from './UiAuthoringInspector.js';
4
5
  export * from './UiAuthoringWorkspace.js';
@@ -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
- } from "../chunk-TS7P3WWH.js";
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((node2) => node2.kind === "page") : kind === "component" ? props.session.nodes.find((node2) => node2.kind === "section") : void 0;
223
- const node = {
224
- id: `authoring-${kind}-${Date.now().toString(36)}`,
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
- props: {}
231
- };
232
- props.onChange({ ...props.session, nodes: [...props.session.nodes, node] });
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
- const removedIds = getAuthoringSubtreeIds(selectedNode.id, props.session.nodes);
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,
@@ -45,29 +45,36 @@ import {
45
45
  UiAuthoringTree,
46
46
  UiAuthoringValidationPanel,
47
47
  UiAuthoringWorkspace,
48
+ addAuthoringNode,
49
+ bindAuthoringProperty,
50
+ createAuthoringSession,
48
51
  getAuthoringChildren,
49
52
  getAuthoringDepth,
50
- getAuthoringSubtreeIds
51
- } from "./chunk-TS7P3WWH.js";
52
- import {
53
- CanvasViewport,
54
- InfiniteCanvas,
55
- MiniMap,
56
- useCanvas
57
- } from "./chunk-34YRDZPJ.js";
53
+ getAuthoringSubtreeIds,
54
+ removeAuthoringBinding,
55
+ removeAuthoringNode,
56
+ setAuthoringOperations,
57
+ updateAuthoringNode
58
+ } from "./chunk-CI4C6DJR.js";
58
59
  import {
59
60
  DockBar,
60
61
  DockItem,
61
62
  useDock
62
63
  } from "./chunk-6VB74RCH.js";
63
- import {
64
- FodModule
65
- } from "./chunk-TKOMIUCU.js";
66
64
  import {
67
65
  MonacoEditor,
68
66
  skipoDarkTheme,
69
67
  useMonaco
70
68
  } from "./chunk-KAKAFGVH.js";
69
+ import {
70
+ CanvasViewport,
71
+ InfiniteCanvas,
72
+ MiniMap,
73
+ useCanvas
74
+ } from "./chunk-34YRDZPJ.js";
75
+ import {
76
+ FodModule
77
+ } from "./chunk-TKOMIUCU.js";
71
78
  import {
72
79
  CanvasContextMenu,
73
80
  CompatibleNodePicker,
@@ -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,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@floks/canvas-ui",
3
3
  "version": "1.0.0",
4
- "description": "Floks Canvas UI \u2014 Reusable React Visual Components for Infinite Canvas, Dock, Tile Menus, Code Editor, and Node Graphs",
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.23",
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
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  TilesMenu
3
- } from "./chunk-DZTJJOLR.js";
3
+ } from "./chunk-DEKSKDSF.js";
4
4
  import {
5
5
  useFloksFrnlStore
6
- } from "./chunk-B4XTM5TI.js";
6
+ } from "./chunk-2YP2RPJY.js";
7
7
 
8
8
  // src/components/graph/GraphsMenu.tsx
9
9
  import { GitBranch, Network } from "lucide-react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useFloksFrnlStore
3
- } from "./chunk-B4XTM5TI.js";
3
+ } from "./chunk-2YP2RPJY.js";
4
4
 
5
5
  // src/components/tiles/TilesMenu.tsx
6
6
  import React, { useId, useMemo } from "react";
@@ -36,26 +36,42 @@ function TilesMenu({
36
36
  const [query, setQuery] = React.useState("");
37
37
  const [selectedId, setSelectedId] = React.useState(null);
38
38
  const state = error ? "error" : loading ? "loading" : "idle";
39
+ const filtered = useMemo(() => {
40
+ if (loading) return [];
41
+ const search = query.trim().toLowerCase();
42
+ return tiles.filter((tile) => !search || tile.title.toLowerCase().includes(search) || (tile.description ?? "").toLowerCase().includes(search));
43
+ }, [loading, query, tiles]);
44
+ const properties = useMemo(() => ({
45
+ role: "region",
46
+ label: title,
47
+ title,
48
+ tileCount: tiles.length,
49
+ query,
50
+ selectedId,
51
+ visibleTiles: filtered.map(({ id: id2, title: title2 }) => ({ id: id2, title: title2 }))
52
+ }), [filtered, query, selectedId, tiles.length, title]);
39
53
  const handlers = useMemo(() => ({
40
54
  "tilesMenu.idle.search": (value) => setQuery(String(value ?? "")),
41
- "tilesMenu.idle.select": (tile) => onSelect(tile),
55
+ "tilesMenu.idle.select": (value) => {
56
+ const id2 = typeof value === "string" ? value : value?.id;
57
+ const tile = filtered.find((entry) => entry.id === id2);
58
+ if (!tile) throw new Error("The requested tile is not visible in this menu.");
59
+ setSelectedId(tile.id);
60
+ onSelect(tile);
61
+ },
42
62
  "tilesMenu.idle.create": () => onCreate?.(),
43
63
  "tilesMenu.error.dismiss": () => {
44
64
  }
45
- }), [onCreate, onSelect]);
65
+ }), [filtered, onCreate, onSelect]);
46
66
  const frnl = useFrnlComponent({
47
67
  id: componentId,
48
68
  definition: tilesMenuDefinition,
49
69
  store,
50
70
  state,
51
- properties: { title, tileCount: tiles.length, query },
71
+ properties,
52
72
  handlers
53
73
  });
54
- const filtered = tiles.filter((tile) => {
55
- const q = query.trim().toLowerCase();
56
- return !q || tile.title.toLowerCase().includes(q) || (tile.description ?? "").toLowerCase().includes(q);
57
- });
58
- return /* @__PURE__ */ jsxs("section", { id: componentId, "data-frnl-component": "tilesMenu", "data-frnl-state": frnl.state, className: "w-full font-mono text-[var(--skipo-text)]", children: [
74
+ return /* @__PURE__ */ jsxs("section", { id: componentId, "data-frnl-component": "tilesMenu", "data-frnl-state": frnl.state, "aria-label": title, className: "w-full font-mono text-[var(--skipo-text)]", children: [
59
75
  /* @__PURE__ */ jsxs("header", { className: "flex flex-wrap items-center gap-3 mb-4", children: [
60
76
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-[220px]", children: [
61
77
  /* @__PURE__ */ jsx("h2", { className: "text-sm font-black uppercase tracking-wider", children: title }),
@@ -78,10 +94,7 @@ function TilesMenu({
78
94
  error && /* @__PURE__ */ jsx("div", { className: "mb-3 border border-red-500/70 bg-red-500/10 p-3 text-xs text-red-300", children: error }),
79
95
  loading ? /* @__PURE__ */ jsx("div", { className: "border border-dashed border-[var(--skipo-border-color)] p-8 text-center text-xs text-[var(--skipo-text-muted)]", children: "LOADING..." }) : filtered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "border border-dashed border-[var(--skipo-border-color)] p-8 text-center text-xs text-[var(--skipo-text-muted)]", children: emptyText }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3", children: filtered.map((tile) => {
80
96
  const selected = selectedId === tile.id;
81
- return /* @__PURE__ */ jsx("button", { type: "button", onClick: () => {
82
- setSelectedId(tile.id);
83
- frnl.events.select(tile);
84
- }, className: `text-left p-4 border-2 bg-[var(--skipo-surface)] transition-colors ${selected ? "border-[var(--skipo-accent)]" : "border-[var(--skipo-border-color)] hover:border-[var(--skipo-accent)]"}`, children: renderTile ? renderTile(tile, selected) : /* @__PURE__ */ jsxs(Fragment, { children: [
97
+ return /* @__PURE__ */ jsx("button", { type: "button", onClick: () => frnl.events.select(tile.id), className: `text-left p-4 border-2 bg-[var(--skipo-surface)] transition-colors ${selected ? "border-[var(--skipo-accent)]" : "border-[var(--skipo-border-color)] hover:border-[var(--skipo-accent)]"}`, children: renderTile ? renderTile(tile, selected) : /* @__PURE__ */ jsxs(Fragment, { children: [
85
98
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs font-black uppercase", children: [
86
99
  tile.icon,
87
100
  tile.title
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  frnlButton,
3
3
  frnlTextInput
4
- } from "./chunk-GOUFV3B4.js";
4
+ } from "./chunk-RLM72WKL.js";
5
5
  import {
6
6
  useFloksFrnlStore
7
- } from "./chunk-B4XTM5TI.js";
7
+ } from "./chunk-2YP2RPJY.js";
8
8
  import {
9
9
  BaseInput
10
10
  } from "./chunk-W42SJGOJ.js";