@d34dman/flowdrop 0.0.63 → 0.0.65

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 (125) hide show
  1. package/README.md +2 -0
  2. package/dist/adapters/agentspec/AgentSpecAdapter.js +1 -40
  3. package/dist/api/enhanced-client.d.ts +19 -0
  4. package/dist/api/enhanced-client.js +9 -0
  5. package/dist/components/App.svelte +32 -36
  6. package/dist/components/CanvasBanner.stories.svelte +12 -8
  7. package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
  8. package/dist/components/ConfigModal.svelte +7 -11
  9. package/dist/components/ConfigModal.svelte.d.ts +5 -23
  10. package/dist/components/ConfigPanel.stories.svelte +35 -26
  11. package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
  12. package/dist/components/LoadingSpinner.stories.svelte +13 -13
  13. package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
  14. package/dist/components/Logo.stories.svelte +4 -4
  15. package/dist/components/Logo.stories.svelte.d.ts +1 -1
  16. package/dist/components/LogsSidebar.svelte +6 -9
  17. package/dist/components/LogsSidebar.svelte.d.ts +3 -20
  18. package/dist/components/MarkdownDisplay.stories.svelte +25 -10
  19. package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
  20. package/dist/components/Navbar.stories.svelte +42 -30
  21. package/dist/components/Navbar.stories.svelte.d.ts +1 -1
  22. package/dist/components/Navbar.svelte +6 -3
  23. package/dist/components/NodeSidebar.svelte +1 -0
  24. package/dist/components/NodeStatusOverlay.stories.svelte +61 -50
  25. package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
  26. package/dist/components/NodeStatusOverlay.svelte +4 -4
  27. package/dist/components/PipelineStatus.svelte +10 -12
  28. package/dist/components/PipelineStatus.svelte.d.ts +2 -2
  29. package/dist/components/SchemaForm.stories.svelte +97 -82
  30. package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
  31. package/dist/components/SchemaForm.svelte +6 -2
  32. package/dist/components/SettingsPanel.svelte +6 -1
  33. package/dist/components/StatusIcon.stories.svelte +15 -15
  34. package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
  35. package/dist/components/StatusIcon.svelte +1 -1
  36. package/dist/components/StatusLabel.stories.svelte +8 -8
  37. package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
  38. package/dist/components/ThemeToggle.stories.svelte +10 -10
  39. package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
  40. package/dist/components/WorkflowEditor.svelte +23 -5
  41. package/dist/components/form/FormAutocomplete.svelte +2 -0
  42. package/dist/components/form/FormCheckboxGroup.stories.svelte +13 -13
  43. package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
  44. package/dist/components/form/FormField.svelte +2 -2
  45. package/dist/components/form/FormFieldLight.svelte +4 -4
  46. package/dist/components/form/FormFieldWrapper.stories.svelte +38 -16
  47. package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
  48. package/dist/components/form/FormNumberField.stories.svelte +21 -18
  49. package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
  50. package/dist/components/form/FormRangeField.stories.svelte +13 -13
  51. package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
  52. package/dist/components/form/FormSelect.stories.svelte +21 -21
  53. package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
  54. package/dist/components/form/FormTemplateEditor.svelte +0 -13
  55. package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -7
  56. package/dist/components/form/FormTextField.stories.svelte +17 -17
  57. package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
  58. package/dist/components/form/FormTextarea.stories.svelte +21 -18
  59. package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
  60. package/dist/components/form/FormToggle.stories.svelte +13 -13
  61. package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
  62. package/dist/components/form/index.d.ts +2 -1
  63. package/dist/components/form/index.js +1 -2
  64. package/dist/components/form/types.d.ts +8 -20
  65. package/dist/components/form/types.js +3 -8
  66. package/dist/components/interrupt/ChoicePrompt.stories.svelte +37 -28
  67. package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
  68. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +57 -35
  69. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
  70. package/dist/components/interrupt/FormPrompt.svelte +1 -0
  71. package/dist/components/interrupt/ReviewPrompt.stories.svelte +52 -31
  72. package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
  73. package/dist/components/interrupt/ReviewPrompt.svelte +44 -25
  74. package/dist/components/interrupt/TextInputPrompt.stories.svelte +32 -19
  75. package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
  76. package/dist/components/interrupt/TextInputPrompt.svelte +1 -0
  77. package/dist/components/layouts/MainLayout.svelte +3 -0
  78. package/dist/components/nodes/GatewayNode.stories.svelte +96 -64
  79. package/dist/components/nodes/IdeaNode.stories.svelte +40 -36
  80. package/dist/components/nodes/NotesNode.stories.svelte +61 -54
  81. package/dist/components/nodes/SimpleNode.stories.svelte +141 -83
  82. package/dist/components/nodes/SquareNode.stories.svelte +70 -44
  83. package/dist/components/nodes/TerminalNode.stories.svelte +10 -10
  84. package/dist/components/nodes/TerminalNode.svelte +6 -2
  85. package/dist/components/nodes/ToolNode.stories.svelte +177 -59
  86. package/dist/components/nodes/WorkflowNode.stories.svelte +43 -38
  87. package/dist/components/playground/MessageBubble.stories.svelte +51 -38
  88. package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
  89. package/dist/components/playground/Playground.svelte +2 -4
  90. package/dist/config/constants.d.ts +21 -0
  91. package/dist/config/constants.js +9 -0
  92. package/dist/core/index.d.ts +7 -5
  93. package/dist/core/index.js +5 -5
  94. package/dist/editor/index.d.ts +4 -4
  95. package/dist/editor/index.js +3 -4
  96. package/dist/form/code.js +16 -4
  97. package/dist/form/fieldRegistry.d.ts +8 -82
  98. package/dist/form/fieldRegistry.js +9 -101
  99. package/dist/form/full.d.ts +4 -1
  100. package/dist/form/full.js +6 -1
  101. package/dist/form/index.d.ts +1 -1
  102. package/dist/form/index.js +0 -2
  103. package/dist/form/markdown.js +11 -3
  104. package/dist/helpers/workflowEditorHelper.d.ts +0 -3
  105. package/dist/helpers/workflowEditorHelper.js +7 -26
  106. package/dist/index.js +3 -0
  107. package/dist/services/apiVariableService.d.ts +1 -3
  108. package/dist/services/apiVariableService.js +3 -4
  109. package/dist/services/dynamicSchemaService.js +3 -4
  110. package/dist/stories/CanvasDecorator.svelte +7 -8
  111. package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
  112. package/dist/stories/NodeDecorator.svelte +13 -14
  113. package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
  114. package/dist/stories/utils.d.ts +2 -2
  115. package/dist/stories/utils.js +55 -55
  116. package/dist/styles/base.css +12 -4
  117. package/dist/styles/tokens.css +138 -130
  118. package/dist/types/interrupt.d.ts +1 -4
  119. package/dist/utils/errors.d.ts +28 -0
  120. package/dist/utils/errors.js +44 -0
  121. package/dist/utils/handleIds.d.ts +35 -0
  122. package/dist/utils/handleIds.js +58 -0
  123. package/package.json +53 -12
  124. package/dist/api/client.d.ts +0 -110
  125. package/dist/api/client.js +0 -240
@@ -1,34 +1,34 @@
1
1
  <script module>
2
- import { defineMeta } from "@storybook/addon-svelte-csf";
3
- import StatusIcon from "./StatusIcon.svelte";
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import StatusIcon from './StatusIcon.svelte';
4
4
 
5
5
  const { Story } = defineMeta({
6
- title: "Display/StatusIcon",
6
+ title: 'Display/StatusIcon',
7
7
  component: StatusIcon,
8
- tags: ["autodocs"],
8
+ tags: ['autodocs'],
9
9
  argTypes: {
10
10
  status: {
11
- control: { type: "select" },
12
- options: ["idle", "pending", "running", "completed", "failed", "cancelled", "skipped"],
11
+ control: { type: 'select' },
12
+ options: ['idle', 'pending', 'running', 'completed', 'failed', 'cancelled', 'skipped']
13
13
  },
14
14
  size: {
15
- control: { type: "select" },
16
- options: ["sm", "md", "lg", "xl"],
15
+ control: { type: 'select' },
16
+ options: ['sm', 'md', 'lg', 'xl']
17
17
  },
18
- showBackground: { control: "boolean" },
19
- },
18
+ showBackground: { control: 'boolean' }
19
+ }
20
20
  });
21
21
  </script>
22
22
 
23
- <Story name="Idle" args={{ status: "idle" }} />
23
+ <Story name="Idle" args={{ status: 'idle' }} />
24
24
 
25
- <Story name="Running" args={{ status: "running" }} />
25
+ <Story name="Running" args={{ status: 'running' }} />
26
26
 
27
- <Story name="Completed" args={{ status: "completed" }} />
27
+ <Story name="Completed" args={{ status: 'completed' }} />
28
28
 
29
- <Story name="Failed" args={{ status: "failed" }} />
29
+ <Story name="Failed" args={{ status: 'failed' }} />
30
30
 
31
- <Story name="With Background" args={{ status: "completed", showBackground: true }} />
31
+ <Story name="With Background" args={{ status: 'completed', showBackground: true }} />
32
32
 
33
33
  <Story name="All Statuses">
34
34
  <div style="display: flex; flex-direction: column; gap: 1.5rem;">
@@ -11,7 +11,7 @@ declare const StatusIcon: $$__sveltets_2_IsomorphicComponent<{
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {}, {}, string>;
14
- import StatusIcon from "./StatusIcon.svelte";
14
+ import StatusIcon from './StatusIcon.svelte';
15
15
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
16
  new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
17
  $$bindings?: Bindings;
@@ -42,7 +42,7 @@
42
42
  }
43
43
  };
44
44
 
45
- const config = sizeConfig[props.size || 'md'];
45
+ const config = $derived(sizeConfig[props.size || 'md']);
46
46
  const statusColor = $derived(getStatusColor(props.status));
47
47
  const statusIcon = $derived(getStatusIcon(props.status));
48
48
  </script>
@@ -1,17 +1,17 @@
1
1
  <script module>
2
- import { defineMeta } from "@storybook/addon-svelte-csf";
3
- import StatusLabel from "./StatusLabel.svelte";
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import StatusLabel from './StatusLabel.svelte';
4
4
 
5
5
  const { Story } = defineMeta({
6
- title: "Display/StatusLabel",
6
+ title: 'Display/StatusLabel',
7
7
  component: StatusLabel,
8
- tags: ["autodocs"],
8
+ tags: ['autodocs'],
9
9
  argTypes: {
10
- label: { control: "text" },
11
- },
10
+ label: { control: 'text' }
11
+ }
12
12
  });
13
13
  </script>
14
14
 
15
- <Story name="Default" args={{ label: "Ready" }} />
15
+ <Story name="Default" args={{ label: 'Ready' }} />
16
16
 
17
- <Story name="Long Text" args={{ label: "Processing workflow execution..." }} />
17
+ <Story name="Long Text" args={{ label: 'Processing workflow execution...' }} />
@@ -11,7 +11,7 @@ declare const StatusLabel: $$__sveltets_2_IsomorphicComponent<{
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {}, {}, string>;
14
- import StatusLabel from "./StatusLabel.svelte";
14
+ import StatusLabel from './StatusLabel.svelte';
15
15
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
16
  new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
17
  $$bindings?: Bindings;
@@ -1,25 +1,25 @@
1
1
  <script module>
2
- import { defineMeta } from "@storybook/addon-svelte-csf";
3
- import ThemeToggle from "./ThemeToggle.svelte";
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import ThemeToggle from './ThemeToggle.svelte';
4
4
 
5
5
  const { Story } = defineMeta({
6
- title: "Display/ThemeToggle",
6
+ title: 'Display/ThemeToggle',
7
7
  component: ThemeToggle,
8
- tags: ["autodocs"],
8
+ tags: ['autodocs'],
9
9
  argTypes: {
10
10
  size: {
11
- control: { type: "select" },
12
- options: ["sm", "md", "lg"],
11
+ control: { type: 'select' },
12
+ options: ['sm', 'md', 'lg']
13
13
  },
14
- showLabel: { control: "boolean" },
15
- },
14
+ showLabel: { control: 'boolean' }
15
+ }
16
16
  });
17
17
  </script>
18
18
 
19
19
  <Story name="Default" />
20
20
 
21
- <Story name="Small" args={{ size: "sm" }} />
21
+ <Story name="Small" args={{ size: 'sm' }} />
22
22
 
23
- <Story name="Large" args={{ size: "lg" }} />
23
+ <Story name="Large" args={{ size: 'lg' }} />
24
24
 
25
25
  <Story name="With Label" args={{ showLabel: true }} />
@@ -11,7 +11,7 @@ declare const ThemeToggle: $$__sveltets_2_IsomorphicComponent<{
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {}, {}, string>;
14
- import ThemeToggle from "./ThemeToggle.svelte";
14
+ import ThemeToggle from './ThemeToggle.svelte';
15
15
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
16
  new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
17
  $$bindings?: Bindings;
@@ -16,7 +16,11 @@
16
16
  type ColorMode
17
17
  } from '@xyflow/svelte';
18
18
  import '@xyflow/svelte/dist/style.css';
19
- import { getResolvedTheme, getEditorSettings, getBehaviorSettings } from '../stores/settingsStore.svelte.js';
19
+ import {
20
+ getResolvedTheme,
21
+ getEditorSettings,
22
+ getBehaviorSettings
23
+ } from '../stores/settingsStore.svelte.js';
20
24
  import type {
21
25
  WorkflowNode as WorkflowNodeType,
22
26
  NodeMetadata,
@@ -40,7 +44,11 @@
40
44
  } from '../helpers/workflowEditorHelper.js';
41
45
  import type { NodeExecutionInfo } from '../types/index.js';
42
46
  import { Toaster } from 'svelte-5-french-toast';
43
- import { flowdropToastOptions, FLOWDROP_TOASTER_CLASS, apiToasts } from '../services/toastService.js';
47
+ import {
48
+ flowdropToastOptions,
49
+ FLOWDROP_TOASTER_CLASS,
50
+ apiToasts
51
+ } from '../services/toastService.js';
44
52
  import {
45
53
  ProximityConnectHelper,
46
54
  type ProximityEdgeCandidate
@@ -351,7 +359,12 @@
351
359
  nodes: WorkflowNodeType[];
352
360
  event: MouseEvent | TouchEvent;
353
361
  }): void {
354
- if (!getEditorSettings().proximityConnect || !targetNode || props.readOnly || props.lockWorkflow) {
362
+ if (
363
+ !getEditorSettings().proximityConnect ||
364
+ !targetNode ||
365
+ props.readOnly ||
366
+ props.lockWorkflow
367
+ ) {
355
368
  if (currentProximityCandidates.length > 0) {
356
369
  flowEdges = ProximityConnectHelper.removePreviewEdges(flowEdges);
357
370
  currentProximityCandidates = [];
@@ -747,7 +760,13 @@
747
760
  bind:edges={flowEdges}
748
761
  {nodeTypes}
749
762
  {defaultEdgeOptions}
750
- onconnect={(connection) => void handleConnect({ source: connection.source, target: connection.target, sourceHandle: connection.sourceHandle ?? undefined, targetHandle: connection.targetHandle ?? undefined })}
763
+ onconnect={(connection) =>
764
+ void handleConnect({
765
+ source: connection.source,
766
+ target: connection.target,
767
+ sourceHandle: connection.sourceHandle ?? undefined,
768
+ targetHandle: connection.targetHandle ?? undefined
769
+ })}
751
770
  onbeforedelete={handleBeforeDelete}
752
771
  ondelete={handleNodesDelete}
753
772
  onnodedragstart={handleNodeDragStart}
@@ -905,7 +924,6 @@
905
924
  cursor: pointer;
906
925
  }
907
926
 
908
-
909
927
  /* Handle size/position only; colors come from inline --fd-handle-fill and base.css ::before */
910
928
  :global(.flowdrop-workflow-editor .svelte-flow__handle) {
911
929
  width: var(--fd-handle-size);
@@ -98,7 +98,9 @@
98
98
  let labelCache = $state<Map<string, string>>(new Map());
99
99
 
100
100
  // Generate unique IDs for accessibility
101
+ // svelte-ignore state_referenced_locally — id prop never changes
101
102
  const listboxId = `${id}-listbox`;
103
+ // svelte-ignore state_referenced_locally
102
104
  const getOptionId = (index: number): string => `${id}-option-${index}`;
103
105
 
104
106
  /**
@@ -1,28 +1,28 @@
1
1
  <script module>
2
- import { defineMeta } from "@storybook/addon-svelte-csf";
3
- import FormCheckboxGroup from "./FormCheckboxGroup.svelte";
4
- import { fn } from "storybook/test";
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import FormCheckboxGroup from './FormCheckboxGroup.svelte';
4
+ import { fn } from 'storybook/test';
5
5
 
6
6
  const { Story } = defineMeta({
7
- title: "Form/FormCheckboxGroup",
7
+ title: 'Form/FormCheckboxGroup',
8
8
  component: FormCheckboxGroup,
9
- tags: ["autodocs"],
9
+ tags: ['autodocs'],
10
10
  argTypes: {
11
- disabled: { control: "boolean" },
11
+ disabled: { control: 'boolean' }
12
12
  },
13
13
  args: {
14
- id: "demo-checkbox-group",
15
- options: ["Email", "SMS", "Push Notification", "Webhook"],
14
+ id: 'demo-checkbox-group',
15
+ options: ['Email', 'SMS', 'Push Notification', 'Webhook'],
16
16
  value: [],
17
- onChange: fn(),
18
- },
17
+ onChange: fn()
18
+ }
19
19
  });
20
20
  </script>
21
21
 
22
22
  <Story name="No Selection" args={{ value: [] }} />
23
23
 
24
- <Story name="Pre-selected" args={{ value: ["Email", "Push Notification"] }} />
24
+ <Story name="Pre-selected" args={{ value: ['Email', 'Push Notification'] }} />
25
25
 
26
- <Story name="All Selected" args={{ value: ["Email", "SMS", "Push Notification", "Webhook"] }} />
26
+ <Story name="All Selected" args={{ value: ['Email', 'SMS', 'Push Notification', 'Webhook'] }} />
27
27
 
28
- <Story name="Disabled" args={{ value: ["Email"], disabled: true }} />
28
+ <Story name="Disabled" args={{ value: ['Email'], disabled: true }} />
@@ -11,7 +11,7 @@ declare const FormCheckboxGroup: $$__sveltets_2_IsomorphicComponent<{
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {}, {}, string>;
14
- import FormCheckboxGroup from "./FormCheckboxGroup.svelte";
14
+ import FormCheckboxGroup from './FormCheckboxGroup.svelte';
15
15
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
16
  new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
17
  $$bindings?: Bindings;
@@ -146,9 +146,9 @@
146
146
  return 'select-enum';
147
147
  }
148
148
 
149
- // oneOf with labeled options (standard JSON Schema) or legacy options -> select
149
+ // oneOf with labeled options (standard JSON Schema) -> select
150
150
  // Must be checked before basic type checks since oneOf schemas often have type: 'string'
151
- if ((schema.oneOf && schema.oneOf.length > 0) || schema.options) {
151
+ if (schema.oneOf && schema.oneOf.length > 0) {
152
152
  return 'select-options';
153
153
  }
154
154
 
@@ -42,7 +42,7 @@
42
42
  import FormSelect from './FormSelect.svelte';
43
43
  import FormCheckboxGroup from './FormCheckboxGroup.svelte';
44
44
  import FormArray from './FormArray.svelte';
45
- import { resolveFieldComponent } from '../../form/fieldRegistry.js';
45
+ import { fieldComponentRegistry } from '../../form/fieldRegistry.js';
46
46
  import { getResolvedTheme } from '../../stores/settingsStore.svelte.js';
47
47
  import type { FieldSchema } from './types.js';
48
48
  import { getSchemaOptions } from './types.js';
@@ -84,7 +84,7 @@
84
84
  /**
85
85
  * Check if there's a registered custom component for this schema
86
86
  */
87
- const registeredComponent = $derived(resolveFieldComponent(schema));
87
+ const registeredComponent = $derived(fieldComponentRegistry.resolveFieldComponent(schema));
88
88
 
89
89
  /**
90
90
  * Determine the field type to render (for non-registered components)
@@ -128,9 +128,9 @@
128
128
  return 'select-enum';
129
129
  }
130
130
 
131
- // oneOf with labeled options (standard JSON Schema) or legacy options -> select
131
+ // oneOf with labeled options (standard JSON Schema) -> select
132
132
  // Must be checked before basic type checks since oneOf schemas often have type: 'string'
133
- if ((schema.oneOf && schema.oneOf.length > 0) || schema.options) {
133
+ if (schema.oneOf && schema.oneOf.length > 0) {
134
134
  return 'select-options';
135
135
  }
136
136
 
@@ -1,31 +1,53 @@
1
1
  <script module>
2
- import { defineMeta } from "@storybook/addon-svelte-csf";
3
- import FormFieldWrapper from "./FormFieldWrapper.svelte";
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import FormFieldWrapper from './FormFieldWrapper.svelte';
4
4
 
5
5
  const { Story } = defineMeta({
6
- title: "Form/FormFieldWrapper",
6
+ title: 'Form/FormFieldWrapper',
7
7
  component: FormFieldWrapper,
8
- tags: ["autodocs"],
8
+ tags: ['autodocs'],
9
9
  argTypes: {
10
- label: { control: "text" },
11
- required: { control: "boolean" },
12
- description: { control: "text" },
10
+ label: { control: 'text' },
11
+ required: { control: 'boolean' },
12
+ description: { control: 'text' }
13
13
  },
14
14
  args: {
15
- id: "demo-wrapper",
16
- label: "Field Label",
17
- },
15
+ id: 'demo-wrapper',
16
+ label: 'Field Label'
17
+ }
18
18
  });
19
19
  </script>
20
20
 
21
- <Story name="Default" args={{ label: "Username" }}>
22
- <input type="text" id="demo-wrapper" placeholder="Enter username" style="width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--fd-border); border-radius: var(--fd-radius-lg); font-size: var(--fd-text-sm);" />
21
+ <Story name="Default" args={{ label: 'Username' }}>
22
+ <input
23
+ type="text"
24
+ id="demo-wrapper"
25
+ placeholder="Enter username"
26
+ style="width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--fd-border); border-radius: var(--fd-radius-lg); font-size: var(--fd-text-sm);"
27
+ />
23
28
  </Story>
24
29
 
25
- <Story name="With Description" args={{ label: "Email", description: "We'll never share your email with anyone.", required: true }}>
26
- <input type="email" id="demo-wrapper" placeholder="email@example.com" style="width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--fd-border); border-radius: var(--fd-radius-lg); font-size: var(--fd-text-sm);" />
30
+ <Story
31
+ name="With Description"
32
+ args={{
33
+ label: 'Email',
34
+ description: "We'll never share your email with anyone.",
35
+ required: true
36
+ }}
37
+ >
38
+ <input
39
+ type="email"
40
+ id="demo-wrapper"
41
+ placeholder="email@example.com"
42
+ style="width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--fd-border); border-radius: var(--fd-radius-lg); font-size: var(--fd-text-sm);"
43
+ />
27
44
  </Story>
28
45
 
29
- <Story name="Required" args={{ label: "Password", required: true }}>
30
- <input type="password" id="demo-wrapper" placeholder="Enter password" style="width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--fd-border); border-radius: var(--fd-radius-lg); font-size: var(--fd-text-sm);" />
46
+ <Story name="Required" args={{ label: 'Password', required: true }}>
47
+ <input
48
+ type="password"
49
+ id="demo-wrapper"
50
+ placeholder="Enter password"
51
+ style="width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--fd-border); border-radius: var(--fd-radius-lg); font-size: var(--fd-text-sm);"
52
+ />
31
53
  </Story>
@@ -11,7 +11,7 @@ declare const FormFieldWrapper: $$__sveltets_2_IsomorphicComponent<{
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {}, {}, string>;
14
- import FormFieldWrapper from "./FormFieldWrapper.svelte";
14
+ import FormFieldWrapper from './FormFieldWrapper.svelte';
15
15
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
16
  new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
17
  $$bindings?: Bindings;
@@ -1,33 +1,36 @@
1
1
  <script module>
2
- import { defineMeta } from "@storybook/addon-svelte-csf";
3
- import FormNumberField from "./FormNumberField.svelte";
4
- import { fn } from "storybook/test";
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import FormNumberField from './FormNumberField.svelte';
4
+ import { fn } from 'storybook/test';
5
5
 
6
6
  const { Story } = defineMeta({
7
- title: "Form/FormNumberField",
7
+ title: 'Form/FormNumberField',
8
8
  component: FormNumberField,
9
- tags: ["autodocs"],
9
+ tags: ['autodocs'],
10
10
  argTypes: {
11
- value: { control: "number" },
12
- placeholder: { control: "text" },
13
- min: { control: "number" },
14
- max: { control: "number" },
15
- step: { control: "number" },
16
- required: { control: "boolean" },
17
- disabled: { control: "boolean" },
11
+ value: { control: 'number' },
12
+ placeholder: { control: 'text' },
13
+ min: { control: 'number' },
14
+ max: { control: 'number' },
15
+ step: { control: 'number' },
16
+ required: { control: 'boolean' },
17
+ disabled: { control: 'boolean' }
18
18
  },
19
19
  args: {
20
- id: "demo-number-field",
21
- value: "",
22
- onChange: fn(),
23
- },
20
+ id: 'demo-number-field',
21
+ value: '',
22
+ onChange: fn()
23
+ }
24
24
  });
25
25
  </script>
26
26
 
27
- <Story name="Default" args={{ placeholder: "Enter a number..." }} />
27
+ <Story name="Default" args={{ placeholder: 'Enter a number...' }} />
28
28
 
29
29
  <Story name="With Value" args={{ value: 42 }} />
30
30
 
31
- <Story name="With Constraints" args={{ value: 50, min: 0, max: 100, step: 5, placeholder: "0-100, step 5" }} />
31
+ <Story
32
+ name="With Constraints"
33
+ args={{ value: 50, min: 0, max: 100, step: 5, placeholder: '0-100, step 5' }}
34
+ />
32
35
 
33
36
  <Story name="Disabled" args={{ value: 10, disabled: true }} />
@@ -11,7 +11,7 @@ declare const FormNumberField: $$__sveltets_2_IsomorphicComponent<{
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {}, {}, string>;
14
- import FormNumberField from "./FormNumberField.svelte";
14
+ import FormNumberField from './FormNumberField.svelte';
15
15
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
16
  new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
17
  $$bindings?: Bindings;
@@ -1,24 +1,24 @@
1
1
  <script module>
2
- import { defineMeta } from "@storybook/addon-svelte-csf";
3
- import FormRangeField from "./FormRangeField.svelte";
4
- import { fn } from "storybook/test";
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import FormRangeField from './FormRangeField.svelte';
4
+ import { fn } from 'storybook/test';
5
5
 
6
6
  const { Story } = defineMeta({
7
- title: "Form/FormRangeField",
7
+ title: 'Form/FormRangeField',
8
8
  component: FormRangeField,
9
- tags: ["autodocs"],
9
+ tags: ['autodocs'],
10
10
  argTypes: {
11
- value: { control: { type: "number" } },
12
- min: { control: "number" },
13
- max: { control: "number" },
14
- step: { control: "number" },
15
- disabled: { control: "boolean" },
11
+ value: { control: { type: 'number' } },
12
+ min: { control: 'number' },
13
+ max: { control: 'number' },
14
+ step: { control: 'number' },
15
+ disabled: { control: 'boolean' }
16
16
  },
17
17
  args: {
18
- id: "demo-range-field",
18
+ id: 'demo-range-field',
19
19
  value: 50,
20
- onChange: fn(),
21
- },
20
+ onChange: fn()
21
+ }
22
22
  });
23
23
  </script>
24
24
 
@@ -11,7 +11,7 @@ declare const FormRangeField: $$__sveltets_2_IsomorphicComponent<{
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {}, {}, string>;
14
- import FormRangeField from "./FormRangeField.svelte";
14
+ import FormRangeField from './FormRangeField.svelte';
15
15
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
16
  new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
17
  $$bindings?: Bindings;
@@ -1,30 +1,30 @@
1
1
  <script module>
2
- import { defineMeta } from "@storybook/addon-svelte-csf";
3
- import FormSelect from "./FormSelect.svelte";
4
- import { fn } from "storybook/test";
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import FormSelect from './FormSelect.svelte';
4
+ import { fn } from 'storybook/test';
5
5
 
6
6
  const { Story } = defineMeta({
7
- title: "Form/FormSelect",
7
+ title: 'Form/FormSelect',
8
8
  component: FormSelect,
9
- tags: ["autodocs"],
9
+ tags: ['autodocs'],
10
10
  argTypes: {
11
- value: { control: "text" },
12
- required: { control: "boolean" },
13
- disabled: { control: "boolean" },
11
+ value: { control: 'text' },
12
+ required: { control: 'boolean' },
13
+ disabled: { control: 'boolean' }
14
14
  },
15
15
  args: {
16
- id: "demo-select",
17
- value: "",
18
- onChange: fn(),
19
- },
16
+ id: 'demo-select',
17
+ value: '',
18
+ onChange: fn()
19
+ }
20
20
  });
21
21
  </script>
22
22
 
23
23
  <Story
24
24
  name="String Options"
25
25
  args={{
26
- options: ["Option A", "Option B", "Option C"],
27
- value: "Option A",
26
+ options: ['Option A', 'Option B', 'Option C'],
27
+ value: 'Option A'
28
28
  }}
29
29
  />
30
30
 
@@ -32,19 +32,19 @@
32
32
  name="FieldOption Objects"
33
33
  args={{
34
34
  options: [
35
- { value: "gpt-4", label: "GPT-4" },
36
- { value: "gpt-3.5", label: "GPT-3.5 Turbo" },
37
- { value: "claude-3", label: "Claude 3 Opus" },
35
+ { value: 'gpt-4', label: 'GPT-4' },
36
+ { value: 'gpt-3.5', label: 'GPT-3.5 Turbo' },
37
+ { value: 'claude-3', label: 'Claude 3 Opus' }
38
38
  ],
39
- value: "gpt-4",
39
+ value: 'gpt-4'
40
40
  }}
41
41
  />
42
42
 
43
43
  <Story
44
44
  name="Disabled"
45
45
  args={{
46
- options: ["Read", "Write", "Admin"],
47
- value: "Read",
48
- disabled: true,
46
+ options: ['Read', 'Write', 'Admin'],
47
+ value: 'Read',
48
+ disabled: true
49
49
  }}
50
50
  />
@@ -11,7 +11,7 @@ declare const FormSelect: $$__sveltets_2_IsomorphicComponent<{
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {}, {}, string>;
14
- import FormSelect from "./FormSelect.svelte";
14
+ import FormSelect from './FormSelect.svelte';
15
15
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
16
  new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
17
  $$bindings?: Bindings;
@@ -65,12 +65,6 @@
65
65
  * Controls which variables are available and how they are displayed.
66
66
  */
67
67
  variables?: TemplateVariablesConfig;
68
- /**
69
- * Variable schema for advanced autocomplete with nested drilling.
70
- * When provided, enables dot notation (user.name) and array access (items[0]).
71
- * @deprecated Use `variables.schema` instead
72
- */
73
- variableSchema?: VariableSchema;
74
68
  /** Placeholder variable example for the hint */
75
69
  placeholderExample?: string;
76
70
  /** Whether the field is disabled (read-only) */
@@ -99,7 +93,6 @@
99
93
  darkTheme = false,
100
94
  height = '250px',
101
95
  variables,
102
- variableSchema,
103
96
  placeholderExample = 'Hello {{ name }}, your order #{{ order_id }} is ready!',
104
97
  disabled = false,
105
98
  ariaDescribedBy,
@@ -128,12 +121,6 @@
128
121
  // Reset error state
129
122
  variableLoadError = null;
130
123
 
131
- // If we have deprecated variableSchema prop, use it directly
132
- if (variableSchema && Object.keys(variableSchema.variables).length > 0) {
133
- effectiveVariableSchema = variableSchema;
134
- return;
135
- }
136
-
137
124
  // If no variables config, clear schema
138
125
  if (!variables) {
139
126
  effectiveVariableSchema = undefined;