@ultrst-armada/floks 1.11.1 → 1.12.2

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@ultrst-armada/floks",
4
- "version": "1.11.1",
5
- "sourceCommit": "128bffd61555d9ce872eb6f85ca328674deaa44c",
4
+ "version": "1.12.2",
5
+ "sourceCommit": "f80d6d20684475959ef2a78cd1a6d17664d853b6",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "41059467350"
7
+ "workflowRunId": "41195216012"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/floks",
3
- "version": "1.11.1",
3
+ "version": "1.12.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -74,12 +74,12 @@
74
74
  "clean": "pnpm -r run clean"
75
75
  },
76
76
  "dependencies": {
77
- "@ultrst-armada/frnlts": "^0.3.0",
77
+ "@ultrst-armada/frnlts": "^0.4.1",
78
78
  "@xyflow/react": "^12.8.6",
79
79
  "d3-force": "^3.0.0",
80
80
  "zod": "^3.24.1",
81
81
  "zustand": "^5.0.3",
82
- "@dinilmusick/gutts": "^1.1.0"
82
+ "@dinilmusick/gutts": "^1.2.1"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "@ultrst-armada/kloks": "^1.17.0",
@@ -93,8 +93,8 @@
93
93
  "@types/node": "^22.0.0",
94
94
  "@types/react": "^19.0.0",
95
95
  "@types/react-dom": "^19.0.0",
96
- "@ultrst-armada/kloks": "^1.21.1",
97
- "@ultrst-armada/frnlts": "^0.3.0",
96
+ "@ultrst-armada/kloks": "^1.22.2",
97
+ "@ultrst-armada/frnlts": "^0.4.1",
98
98
  "happy-dom": "^21.0.3",
99
99
  "lucide-react": "^1.55.0",
100
100
  "react": "^19.0.1",
@@ -50,21 +50,21 @@ import {
50
50
  getAuthoringSubtreeIds
51
51
  } from "./chunk-TS7P3WWH.js";
52
52
  import {
53
- CanvasViewport,
54
- InfiniteCanvas,
55
- MiniMap,
56
- useCanvas
57
- } from "./chunk-34YRDZPJ.js";
53
+ DockBar,
54
+ DockItem,
55
+ useDock
56
+ } from "./chunk-6VB74RCH.js";
58
57
  import {
59
58
  MonacoEditor,
60
59
  skipoDarkTheme,
61
60
  useMonaco
62
61
  } from "./chunk-ZJXRL74D.js";
63
62
  import {
64
- DockBar,
65
- DockItem,
66
- useDock
67
- } from "./chunk-6VB74RCH.js";
63
+ CanvasViewport,
64
+ InfiniteCanvas,
65
+ MiniMap,
66
+ useCanvas
67
+ } from "./chunk-34YRDZPJ.js";
68
68
  import {
69
69
  FodModule
70
70
  } from "./chunk-7CYX3B6O.js";
@@ -75,8 +75,8 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@floks/ui": "workspace:*",
78
- "@ultrst-armada/frnlts": "^0.3.0",
79
- "@ultrst-armada/kloks": "^1.21.1"
78
+ "@ultrst-armada/frnlts": "^0.4.1",
79
+ "@ultrst-armada/kloks": "^1.22.2"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "@dnd-kit/core": "^6.0.0",
@@ -215,6 +215,7 @@ frnlButton.displayName = "frnlButton";
215
215
  import { useId as useId2, useMemo as useMemo2 } from "react";
216
216
  import { defineFrnlComponent as defineFrnlComponent2 } from "@ultrst-armada/frnlts";
217
217
  import { useFrnlComponent as useFrnlComponent2 } from "@ultrst-armada/frnlts/react";
218
+ import { createDefaultFrnlInputContract, resolveFrnlInput, useFrnlSemanticInputContext } from "@ultrst-armada/frnlts";
218
219
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
219
220
  var frnlTextInputDefinition = defineFrnlComponent2({
220
221
  name: "frnlTextInput",
@@ -223,7 +224,8 @@ var frnlTextInputDefinition = defineFrnlComponent2({
223
224
  name: "idle",
224
225
  events: {
225
226
  change: { functionId: "frnlTextInput.idle.change" },
226
- focus: { functionId: "frnlTextInput.idle.focus" }
227
+ focus: { functionId: "frnlTextInput.idle.focus" },
228
+ blur: { functionId: "frnlTextInput.idle.blur" }
227
229
  },
228
230
  visualParameters: { borderColor: "var(--skipo-border-subtle, #334155)" },
229
231
  phases: {
@@ -278,8 +280,12 @@ var frnlTextInput = ({
278
280
  leadingIcon,
279
281
  trailingIcon,
280
282
  onClear,
283
+ semanticInput,
284
+ onSemanticValue,
281
285
  disabled = false,
282
286
  value,
287
+ name,
288
+ type = "text",
283
289
  onChange,
284
290
  onFocus,
285
291
  onBlur,
@@ -290,14 +296,26 @@ var frnlTextInput = ({
290
296
  ...rest
291
297
  }) => {
292
298
  const store = useFloksFrnlStore();
299
+ const semanticContext = useFrnlSemanticInputContext();
293
300
  const { setInspectionText } = useBottomStrip();
294
301
  const generatedId = useId2().replace(/[:/]/g, "");
295
302
  const componentId = id ?? `frnlTextInput.${label ? label.toLowerCase().replace(/[^a-z0-9]/g, "-") : generatedId}`;
303
+ const effectiveSemanticInput = useMemo2(() => {
304
+ if (semanticInput === null) return void 0;
305
+ return semanticInput ?? createDefaultFrnlInputContract({
306
+ name: name ?? componentId,
307
+ label: label ?? name ?? componentId,
308
+ description,
309
+ inputType: type,
310
+ context: semanticContext
311
+ });
312
+ }, [semanticInput, name, componentId, label, description, type, semanticContext]);
296
313
  const resolvedState = disabled ? "disabled" : error ? "error" : "idle";
297
314
  const handlers = useMemo2(
298
315
  () => ({
299
316
  "frnlTextInput.idle.change": (payload) => onChange?.(payload),
300
317
  "frnlTextInput.idle.focus": (payload) => onFocus?.(payload),
318
+ "frnlTextInput.idle.blur": (payload) => onBlur?.(payload),
301
319
  "frnlTextInput.focused.change": (payload) => onChange?.(payload),
302
320
  "frnlTextInput.focused.blur": (payload) => onBlur?.(payload),
303
321
  "frnlTextInput.error.change": (payload) => onChange?.(payload)
@@ -318,6 +336,18 @@ var frnlTextInput = ({
318
336
  setInspectionText(label || null, description || null);
319
337
  }
320
338
  };
339
+ const handleSemanticBlur = async () => {
340
+ if (!effectiveSemanticInput || typeof value !== "string" || !value.trim()) return;
341
+ const result = await resolveFrnlInput(effectiveSemanticInput, value, semanticContext);
342
+ if (result && result.status === "resolved" && result.value !== void 0) {
343
+ onSemanticValue?.(result.value, result.rawInput);
344
+ const strVal = typeof result.value === "string" ? result.value : String(result.value);
345
+ if (strVal !== value) {
346
+ const syntheticEvent = { target: { value: strVal } };
347
+ onChange?.(syntheticEvent);
348
+ }
349
+ }
350
+ };
321
351
  const handleLeave = (e) => {
322
352
  onMouseLeave?.(e);
323
353
  setInspectionText(null);
@@ -344,9 +374,12 @@ var frnlTextInput = ({
344
374
  {
345
375
  ...rest,
346
376
  id: componentId,
377
+ name,
378
+ type,
347
379
  value,
348
380
  disabled,
349
381
  "data-frnl-component": "frnlTextInput",
382
+ "data-semantic-input": effectiveSemanticInput ? "true" : "false",
350
383
  "data-frnl-state": frnl.state,
351
384
  onChange: (e) => {
352
385
  onChange?.(e);
@@ -359,6 +392,7 @@ var frnlTextInput = ({
359
392
  },
360
393
  onBlur: (e) => {
361
394
  onBlur?.(e);
395
+ void handleSemanticBlur();
362
396
  frnl.events.blur?.(e);
363
397
  setInspectionText(null);
364
398
  },
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  frnlButton,
3
3
  frnlTextInput
4
- } from "./chunk-Z5YEBR6R.js";
4
+ } from "./chunk-2US2HKL6.js";
5
5
  import {
6
6
  useFloksFrnlStore
7
7
  } from "./chunk-B4XTM5TI.js";
@@ -4,8 +4,8 @@ import {
4
4
  GoogleSignInButton,
5
5
  LoginModal,
6
6
  authPageDefinition
7
- } from "../../chunk-LL745D7M.js";
8
- import "../../chunk-Z5YEBR6R.js";
7
+ } from "../../chunk-BYEKOTEG.js";
8
+ import "../../chunk-2US2HKL6.js";
9
9
  import "../../chunk-5ZMXFCD4.js";
10
10
  import "../../chunk-C3L53YN4.js";
11
11
  import "../../chunk-B4XTM5TI.js";
@@ -1,6 +1,6 @@
1
1
  export { FrnlStoreProvider, FrnlStoreProviderProps, floksFrnlFrontendApi, floksFrnlStore, getFloksFrnlStore, useFloksFrnlStore } from './store.js';
2
- import { FrnlOrchestrationDefinition } from '@ultrst-armada/frnlts';
3
- export { FrnlComponentControl, FrnlComponentSnapshot, FrnlFrontendApi, FrnlFrontendSnapshot, FrnlStore } from '@ultrst-armada/frnlts';
2
+ import { FrnlInputContract, FrnlOrchestrationDefinition } from '@ultrst-armada/frnlts';
3
+ export { FrnlComponentControl, FrnlComponentSnapshot, FrnlFrontendApi, FrnlFrontendSnapshot, FrnlInputContract, FrnlStore } from '@ultrst-armada/frnlts';
4
4
  import React__default from 'react';
5
5
 
6
6
  type FrnlButtonVariant = 'primary' | 'secondary' | 'accent' | 'dock' | 'danger' | 'success' | 'ghost' | 'outline';
@@ -172,6 +172,9 @@ interface FrnlTextInputProps extends Omit<React__default.InputHTMLAttributes<HTM
172
172
  leadingIcon?: React__default.ReactNode;
173
173
  trailingIcon?: React__default.ReactNode;
174
174
  onClear?: () => void;
175
+ /** undefined = framework auto contract; null = explicitly disable semantic resolution. */
176
+ semanticInput?: FrnlInputContract<any> | null;
177
+ onSemanticValue?: (value: any, rawInput?: string) => void;
175
178
  }
176
179
  declare const frnlTextInputDefinition: {
177
180
  name: string;
@@ -185,6 +188,9 @@ declare const frnlTextInputDefinition: {
185
188
  focus: {
186
189
  functionId: string;
187
190
  };
191
+ blur: {
192
+ functionId: string;
193
+ };
188
194
  };
189
195
  visualParameters: {
190
196
  borderColor: string;
@@ -15,7 +15,7 @@ import {
15
15
  frnlButtonDefinition,
16
16
  frnlTextInput,
17
17
  frnlTextInputDefinition
18
- } from "../chunk-Z5YEBR6R.js";
18
+ } from "../chunk-2US2HKL6.js";
19
19
  import "../chunk-5ZMXFCD4.js";
20
20
  import "../chunk-C3L53YN4.js";
21
21
  import {
@@ -15,7 +15,7 @@ export { AIKeyEntry, AIKeyUsageStats, AIModelMeta, AIModelPicker, AIModelPickerP
15
15
  export { DEFAULT_PALETTE_ID, THEME_STORAGE_KEY, ThemeContextValue, ThemeProvider, ThemeProviderProps, applyPaletteToDocument, getActivePalette, paletteToSkipoThemePack, subscribeToPalette, usePalette, useTheme } from './palette/index.js';
16
16
  export { ActionButton, Badge, BadgeProps, BadgeTone, ButtonParent, ButtonParentProps, ButtonProps, ButtonSize, ButtonVariant, CardPanel, CategoryCardTile, ChannelStripTile, ClipCardTile, DangerButton, GhostButton, IconButton, InspectorPanel, ModalPanel, PanelParent, PanelParentProps, PanelProps, PanelVariant, SelectInput, SelectInputProps, SliderInput, SliderInputProps, SpawnOptionTile, SplitButton, SplitButtonProps, StatusDot, StatusDotProps, TelemetryPill, TelemetryPillProps, TextInput, TextInputProps, TileParent, TileParentProps, TileVariant, ToggleButton, ToggleInput, ToggleInputProps, ToolbarPanel, TooltipDirection, UIBaseProps, UIInteractionState, UIParent, UIParentProps, UIProps, UIRole, UISize, UIStyleTokens, UIVariant } from './hierarchy/index.js';
17
17
  export { FrnlStoreProvider, FrnlStoreProviderProps, floksFrnlFrontendApi, floksFrnlStore, getFloksFrnlStore, useFloksFrnlStore } from './frnl/store.js';
18
- export { FrnlComponentControl, FrnlComponentSnapshot, FrnlFrontendApi, FrnlFrontendSnapshot, FrnlStore } from '@ultrst-armada/frnlts';
18
+ export { FrnlComponentControl, FrnlComponentSnapshot, FrnlFrontendApi, FrnlFrontendSnapshot, FrnlInputContract, FrnlStore } from '@ultrst-armada/frnlts';
19
19
  export { FrnlApiRequestLog, FrnlBadgeProps, FrnlBottomBarProps, FrnlBreadcrumbItem, FrnlButtonProps, FrnlButtonSize, FrnlButtonVariant, FrnlPageProps, FrnlPageTab, FrnlSelectOption, FrnlSelectProps, FrnlSliderProps, FrnlTabItem, FrnlTabWindowProps, FrnlTextInputProps, FrnlToggleProps, FrnlTopBarProps, FrnlTopBarTab, FrnlUserProfile, frnlBadge, frnlBottomBar, frnlButton, frnlButtonDefinition, frnlPage, frnlSelect, frnlSelectDefinition, frnlSlider, frnlTabWindow, frnlTextInput, frnlTextInputDefinition, frnlToggle, frnlToggleDefinition, frnlTopBar } from './frnl/index.js';
20
20
  import 'zod';
21
21
  import 'react';
@@ -210,13 +210,13 @@ import {
210
210
  GoogleSignInButton,
211
211
  LoginModal,
212
212
  authPageDefinition
213
- } from "./chunk-LL745D7M.js";
213
+ } from "./chunk-BYEKOTEG.js";
214
214
  import {
215
215
  frnlButton,
216
216
  frnlButtonDefinition,
217
217
  frnlTextInput,
218
218
  frnlTextInputDefinition
219
- } from "./chunk-Z5YEBR6R.js";
219
+ } from "./chunk-2US2HKL6.js";
220
220
  import "./chunk-5ZMXFCD4.js";
221
221
  import {
222
222
  ApiCallIndicator,
@@ -103,7 +103,7 @@
103
103
  },
104
104
  "dependencies": {
105
105
  "zod": "^3.24.1",
106
- "@ultrst-armada/frnlts": "^0.3.0",
106
+ "@ultrst-armada/frnlts": "^0.4.1",
107
107
  "zustand": "^5.0.3",
108
108
  "@xyflow/react": "^12.8.6",
109
109
  "d3-force": "^3.0.0"