@d34dman/flowdrop 0.0.64 → 1.0.0

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.
@@ -113,7 +113,7 @@
113
113
  features: propFeatures
114
114
  }: Props = $props();
115
115
 
116
- // Merge features with defaults
116
+ // svelte-ignore state_referenced_locally feature flags don't change at runtime
117
117
  const features = mergeFeatures(propFeatures);
118
118
 
119
119
  // Create breadcrumb-style title - at top level to avoid store subscription issues
@@ -1,5 +1,4 @@
1
1
  <script lang="ts">
2
- import { createEventDispatcher } from 'svelte';
3
2
  import type { ConfigSchema, ConfigValues } from '../types';
4
3
  import ConfigForm from './ConfigForm.svelte';
5
4
 
@@ -8,23 +7,20 @@
8
7
  nodeLabel: string;
9
8
  configSchema: ConfigSchema;
10
9
  configValues: ConfigValues;
10
+ onClose?: () => void;
11
+ onSave?: (values: ConfigValues) => void;
12
+ onCancel?: () => void;
11
13
  }
12
14
 
13
- let props: Props = $props();
15
+ let { onClose, onSave, onCancel, ...props }: Props = $props();
14
16
  let localConfigValues = $derived.by(() => ({ ...props.configValues }));
15
17
 
16
- const dispatch = createEventDispatcher<{
17
- close: void;
18
- save: { values: ConfigValues };
19
- cancel: void;
20
- }>();
21
-
22
18
  function handleCancel() {
23
- dispatch('cancel');
19
+ onCancel?.();
24
20
  }
25
21
 
26
22
  function handleClose() {
27
- dispatch('close');
23
+ onClose?.();
28
24
  }
29
25
 
30
26
  // Close modal on escape key
@@ -77,7 +73,7 @@
77
73
  values={localConfigValues}
78
74
  showUIExtensions={false}
79
75
  onSave={(config) => {
80
- dispatch('save', { values: config });
76
+ onSave?.(config);
81
77
  }}
82
78
  onCancel={handleCancel}
83
79
  />
@@ -4,28 +4,10 @@ interface Props {
4
4
  nodeLabel: string;
5
5
  configSchema: ConfigSchema;
6
6
  configValues: ConfigValues;
7
+ onClose?: () => void;
8
+ onSave?: (values: ConfigValues) => void;
9
+ onCancel?: () => void;
7
10
  }
8
- 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> {
9
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
10
- $$bindings?: Bindings;
11
- } & Exports;
12
- (internal: unknown, props: Props & {
13
- $$events?: Events;
14
- $$slots?: Slots;
15
- }): Exports & {
16
- $set?: any;
17
- $on?: any;
18
- };
19
- z_$$bindings?: Bindings;
20
- }
21
- declare const ConfigModal: $$__sveltets_2_IsomorphicComponent<Props, {
22
- close: CustomEvent<void>;
23
- save: CustomEvent<{
24
- values: ConfigValues;
25
- }>;
26
- cancel: CustomEvent<void>;
27
- } & {
28
- [evt: string]: CustomEvent<any>;
29
- }, {}, {}, "">;
30
- type ConfigModal = InstanceType<typeof ConfigModal>;
11
+ declare const ConfigModal: import("svelte").Component<Props, {}, "">;
12
+ type ConfigModal = ReturnType<typeof ConfigModal>;
31
13
  export default ConfigModal;
@@ -7,11 +7,8 @@
7
7
 
8
8
  <script lang="ts">
9
9
  import Icon from '@iconify/svelte';
10
- import { createEventDispatcher } from 'svelte';
11
10
  import type { WorkflowNode as WorkflowNodeType } from '../types/index.js';
12
11
 
13
- const dispatch = createEventDispatcher();
14
-
15
12
  interface LogEntry {
16
13
  timestamp: string;
17
14
  level: string;
@@ -24,19 +21,19 @@
24
21
  logs: LogEntry[];
25
22
  selectedNode?: WorkflowNodeType | null;
26
23
  onClose?: () => void;
24
+ onClear?: () => void;
27
25
  }
28
26
 
29
27
  let props: Props = $props();
30
28
 
29
+ let sidebarRef: HTMLElement | undefined = $state();
30
+
31
31
  // Focus management and body scroll control
32
32
  $effect(() => {
33
33
  if (props.isOpen) {
34
34
  // Focus management - focus the sidebar when it opens
35
35
  setTimeout(() => {
36
- const sidebar = document.querySelector('.logs-sidebar--open');
37
- if (sidebar) {
38
- (sidebar as HTMLElement).focus();
39
- }
36
+ sidebarRef?.focus();
40
37
  }, 100);
41
38
 
42
39
  // Prevent body scroll
@@ -52,7 +49,6 @@
52
49
  */
53
50
  function handleClose(): void {
54
51
  props.onClose?.();
55
- dispatch('close');
56
52
  }
57
53
 
58
54
  /**
@@ -129,7 +125,7 @@
129
125
  * Clear logs
130
126
  */
131
127
  function clearLogs(): void {
132
- dispatch('clear');
128
+ props.onClear?.();
133
129
  }
134
130
 
135
131
  /**
@@ -163,6 +159,7 @@
163
159
 
164
160
  <!-- Sidebar -->
165
161
  <div
162
+ bind:this={sidebarRef}
166
163
  class="logs-sidebar"
167
164
  class:logs-sidebar--open={props.isOpen}
168
165
  role="dialog"
@@ -10,25 +10,8 @@ interface Props {
10
10
  logs: LogEntry[];
11
11
  selectedNode?: WorkflowNodeType | null;
12
12
  onClose?: () => void;
13
+ onClear?: () => void;
13
14
  }
14
- 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> {
15
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
16
- $$bindings?: Bindings;
17
- } & Exports;
18
- (internal: unknown, props: Props & {
19
- $$events?: Events;
20
- $$slots?: Slots;
21
- }): Exports & {
22
- $set?: any;
23
- $on?: any;
24
- };
25
- z_$$bindings?: Bindings;
26
- }
27
- declare const LogsSidebar: $$__sveltets_2_IsomorphicComponent<Props, {
28
- close: CustomEvent<any>;
29
- clear: CustomEvent<any>;
30
- } & {
31
- [evt: string]: CustomEvent<any>;
32
- }, {}, {}, "">;
33
- type LogsSidebar = InstanceType<typeof LogsSidebar>;
15
+ declare const LogsSidebar: import("svelte").Component<Props, {}, "">;
16
+ type LogsSidebar = ReturnType<typeof LogsSidebar>;
34
17
  export default LogsSidebar;
@@ -22,6 +22,7 @@
22
22
 
23
23
  let props: Props = $props();
24
24
  let searchInput = $state('');
25
+ // svelte-ignore state_referenced_locally — initial default, user selects interactively
25
26
  let selectedCategory = $state(props.selectedCategory || 'all');
26
27
 
27
28
  /**
@@ -29,9 +29,9 @@
29
29
  let props: Props = $props();
30
30
 
31
31
  // Default values
32
- let position = $state(props.position || 'top-right');
33
- let size = $state(props.size || 'md');
34
- let showDetails = $state(props.showDetails || false);
32
+ let position = $derived(props.position || 'top-right');
33
+ let size = $derived(props.size || 'md');
34
+ let showDetails = $derived(props.showDetails || false);
35
35
  let isHovered = $state(false);
36
36
 
37
37
  // Size configurations - optimized for larger, centered overlay
@@ -56,7 +56,7 @@
56
56
  }
57
57
  };
58
58
 
59
- const config = sizeConfig[size];
59
+ const config = $derived(sizeConfig[size]);
60
60
 
61
61
  // Position styles - horizontal center aligned with top edge of node
62
62
  const positionStyles = {
@@ -35,6 +35,7 @@
35
35
  $props();
36
36
 
37
37
  // Initialize API client if not provided
38
+ // svelte-ignore state_referenced_locally — client created once from props
38
39
  const client =
39
40
  apiClient ||
40
41
  new EnhancedFlowDropApiClient(
@@ -76,6 +76,7 @@
76
76
  /**
77
77
  * Currently active tab
78
78
  */
79
+ // svelte-ignore state_referenced_locally — initial default, user switches tabs
79
80
  let activeTab = $state<SettingsCategory>(categories[0] ?? 'theme');
80
81
 
81
82
  /**
@@ -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>
@@ -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
  /**
@@ -43,6 +43,7 @@
43
43
  }: Props = $props();
44
44
 
45
45
  /** Local state for form values */
46
+ // svelte-ignore state_referenced_locally — initial default, user fills the form
46
47
  let formValues = $state<Record<string, unknown>>(config.defaultValues ?? {});
47
48
 
48
49
  /** Display values - either resolved or current form values */
@@ -50,11 +50,13 @@
50
50
  }: Props = $props();
51
51
 
52
52
  /** Local state: map of field -> accepted boolean. Default all to true (accept). */
53
+ // svelte-ignore state_referenced_locally — initial default, user toggles during review
53
54
  let decisions = $state<Record<string, boolean>>(
54
55
  Object.fromEntries(config.changes.map((c) => [c.field, true]))
55
56
  );
56
57
 
57
58
  /** Local state: map of field -> HTML view mode ('rendered' or 'raw'). Default to 'rendered'. */
59
+ // svelte-ignore state_referenced_locally
58
60
  let htmlViewMode = $state<Record<string, 'rendered' | 'raw'>>(
59
61
  Object.fromEntries(config.changes.map((c) => [c.field, 'rendered']))
60
62
  );
@@ -42,6 +42,7 @@
42
42
  }: Props = $props();
43
43
 
44
44
  /** Local state for input value */
45
+ // svelte-ignore state_referenced_locally — initial default, user edits the input
45
46
  let inputValue = $state(config.defaultValue ?? '');
46
47
 
47
48
  /** Display value - either resolved or current input */
@@ -103,12 +103,15 @@
103
103
  }: Props = $props();
104
104
 
105
105
  /** Current width of the left sidebar */
106
+ // svelte-ignore state_referenced_locally — initial default, component owns draggable state
106
107
  let leftSidebarWidth = $state(initialLeftWidth);
107
108
 
108
109
  /** Current width of the right sidebar */
110
+ // svelte-ignore state_referenced_locally
109
111
  let rightSidebarWidth = $state(initialRightWidth);
110
112
 
111
113
  /** Current height of the bottom panel */
114
+ // svelte-ignore state_referenced_locally
112
115
  let bottomPanelHeightState = $state(initialBottomHeight);
113
116
 
114
117
  /**
@@ -416,6 +416,7 @@
416
416
  }
417
417
 
418
418
  /** Shared polling callback created from config lifecycle hooks */
419
+ // svelte-ignore state_referenced_locally — config is static
419
420
  const pollingCallback = createPollingCallback(config.isTerminalStatus);
420
421
 
421
422
  /**