@d34dman/flowdrop 0.0.43 → 0.0.45

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 (97) hide show
  1. package/README.md +8 -8
  2. package/dist/api/enhanced-client.d.ts +3 -1
  3. package/dist/api/enhanced-client.js +35 -5
  4. package/dist/components/App.svelte +68 -34
  5. package/dist/components/ConfigForm.svelte +169 -142
  6. package/dist/components/ConfigForm.svelte.d.ts +4 -2
  7. package/dist/components/ConfigPanel.svelte +42 -15
  8. package/dist/components/LogsSidebar.svelte +20 -19
  9. package/dist/components/Navbar.svelte +150 -80
  10. package/dist/components/Navbar.svelte.d.ts +8 -0
  11. package/dist/components/NodeSidebar.svelte +334 -217
  12. package/dist/components/PipelineStatus.svelte +6 -1
  13. package/dist/components/ReadOnlyDetails.svelte +14 -14
  14. package/dist/components/SchemaForm.svelte +49 -30
  15. package/dist/components/SchemaForm.svelte.d.ts +11 -1
  16. package/dist/components/SettingsModal.svelte +279 -0
  17. package/dist/components/SettingsModal.svelte.d.ts +23 -0
  18. package/dist/components/SettingsPanel.svelte +615 -0
  19. package/dist/components/SettingsPanel.svelte.d.ts +21 -0
  20. package/dist/components/ThemeToggle.svelte +186 -0
  21. package/dist/components/ThemeToggle.svelte.d.ts +14 -0
  22. package/dist/components/WorkflowEditor.svelte +114 -38
  23. package/dist/components/form/FormArray.svelte +81 -81
  24. package/dist/components/form/FormAutocomplete.svelte +1014 -0
  25. package/dist/components/form/FormAutocomplete.svelte.d.ts +25 -0
  26. package/dist/components/form/FormCheckboxGroup.svelte +16 -16
  27. package/dist/components/form/FormCodeEditor.svelte +26 -26
  28. package/dist/components/form/FormField.svelte +52 -21
  29. package/dist/components/form/FormFieldLight.svelte +19 -19
  30. package/dist/components/form/FormFieldWrapper.svelte +4 -4
  31. package/dist/components/form/FormMarkdownEditor.svelte +124 -57
  32. package/dist/components/form/FormNumberField.svelte +13 -13
  33. package/dist/components/form/FormRangeField.svelte +16 -16
  34. package/dist/components/form/FormSelect.svelte +15 -15
  35. package/dist/components/form/FormTemplateEditor.svelte +34 -34
  36. package/dist/components/form/FormTextField.svelte +13 -13
  37. package/dist/components/form/FormTextarea.svelte +13 -13
  38. package/dist/components/form/FormToggle.svelte +8 -8
  39. package/dist/components/form/index.d.ts +1 -0
  40. package/dist/components/form/index.js +1 -0
  41. package/dist/components/form/types.d.ts +133 -8
  42. package/dist/components/form/types.js +50 -1
  43. package/dist/components/interrupt/ChoicePrompt.svelte +45 -38
  44. package/dist/components/interrupt/ConfirmationPrompt.svelte +35 -35
  45. package/dist/components/interrupt/FormPrompt.svelte +27 -20
  46. package/dist/components/interrupt/InterruptBubble.svelte +50 -50
  47. package/dist/components/interrupt/TextInputPrompt.svelte +39 -32
  48. package/dist/components/layouts/MainLayout.svelte +233 -34
  49. package/dist/components/layouts/MainLayout.svelte.d.ts +12 -0
  50. package/dist/components/nodes/GatewayNode.svelte +175 -125
  51. package/dist/components/nodes/IdeaNode.svelte +70 -84
  52. package/dist/components/nodes/NotesNode.svelte +124 -88
  53. package/dist/components/nodes/SimpleNode.svelte +91 -69
  54. package/dist/components/nodes/SquareNode.svelte +102 -75
  55. package/dist/components/nodes/TerminalNode.svelte +127 -113
  56. package/dist/components/nodes/ToolNode.svelte +125 -76
  57. package/dist/components/nodes/WorkflowNode.svelte +164 -108
  58. package/dist/components/playground/ChatPanel.svelte +76 -76
  59. package/dist/components/playground/ExecutionLogs.svelte +71 -69
  60. package/dist/components/playground/InputCollector.svelte +59 -59
  61. package/dist/components/playground/MessageBubble.svelte +111 -112
  62. package/dist/components/playground/Playground.svelte +184 -138
  63. package/dist/components/playground/PlaygroundModal.svelte +18 -19
  64. package/dist/components/playground/SessionManager.svelte +68 -67
  65. package/dist/config/defaultPortConfig.js +22 -22
  66. package/dist/core/index.d.ts +2 -0
  67. package/dist/core/index.js +1 -0
  68. package/dist/form/fieldRegistry.d.ts +17 -1
  69. package/dist/form/fieldRegistry.js +18 -2
  70. package/dist/form/index.d.ts +20 -2
  71. package/dist/form/index.js +19 -1
  72. package/dist/helpers/nodeLayoutHelper.d.ts +14 -0
  73. package/dist/helpers/nodeLayoutHelper.js +19 -0
  74. package/dist/helpers/workflowEditorHelper.js +23 -11
  75. package/dist/index.d.ts +5 -0
  76. package/dist/index.js +13 -0
  77. package/dist/services/autoSaveService.d.ts +112 -0
  78. package/dist/services/autoSaveService.js +223 -0
  79. package/dist/services/settingsService.d.ts +92 -0
  80. package/dist/services/settingsService.js +202 -0
  81. package/dist/services/toastService.d.ts +9 -0
  82. package/dist/services/toastService.js +30 -1
  83. package/dist/stores/settingsStore.d.ts +128 -0
  84. package/dist/stores/settingsStore.js +488 -0
  85. package/dist/stores/themeStore.d.ts +68 -0
  86. package/dist/stores/themeStore.js +215 -0
  87. package/dist/styles/base.css +338 -621
  88. package/dist/styles/toast.css +33 -0
  89. package/dist/styles/tokens.css +402 -0
  90. package/dist/types/index.d.ts +78 -0
  91. package/dist/types/index.js +2 -0
  92. package/dist/types/playground.d.ts +12 -0
  93. package/dist/types/settings.d.ts +185 -0
  94. package/dist/types/settings.js +101 -0
  95. package/dist/utils/colors.d.ts +100 -7
  96. package/dist/utils/colors.js +228 -67
  97. package/package.json +2 -2
@@ -5,63 +5,65 @@
5
5
  */
6
6
  import { getPortCompatibilityChecker } from './connections.js';
7
7
  /**
8
- * Category color mapping to reference tokens (CSS variables)
8
+ * Category color mapping to design tokens (CSS variables)
9
+ * Uses --fd-node-* tokens from tokens.css
9
10
  */
10
11
  export const CATEGORY_COLOR_TOKENS = {
11
- triggers: 'var(--color-ref-cyan-500)',
12
- inputs: 'var(--color-ref-emerald-500)',
13
- outputs: 'var(--color-ref-blue-600)',
14
- prompts: 'var(--color-ref-amber-500)',
15
- models: 'var(--color-ref-indigo-500)',
16
- processing: 'var(--color-ref-teal-500)',
17
- logic: 'var(--color-ref-purple-600)',
18
- data: 'var(--color-ref-orange-500)',
19
- helpers: 'var(--color-ref-slate-500)',
20
- tools: 'var(--color-ref-amber-500)',
21
- 'vector stores': 'var(--color-ref-emerald-500)',
22
- embeddings: 'var(--color-ref-indigo-500)',
23
- memories: 'var(--color-ref-blue-600)',
24
- agents: 'var(--color-ref-teal-500)',
25
- ai: 'var(--color-ref-purple-500)',
26
- bundles: 'var(--color-ref-slate-500)'
12
+ triggers: 'var(--fd-node-cyan)',
13
+ inputs: 'var(--fd-node-emerald)',
14
+ outputs: 'var(--fd-node-blue)',
15
+ prompts: 'var(--fd-node-amber)',
16
+ models: 'var(--fd-node-indigo)',
17
+ processing: 'var(--fd-node-teal)',
18
+ logic: 'var(--fd-node-purple)',
19
+ data: 'var(--fd-node-orange)',
20
+ helpers: 'var(--fd-node-slate)',
21
+ tools: 'var(--fd-node-amber)',
22
+ 'vector stores': 'var(--fd-node-emerald)',
23
+ embeddings: 'var(--fd-node-indigo)',
24
+ memories: 'var(--fd-node-blue)',
25
+ agents: 'var(--fd-node-teal)',
26
+ ai: 'var(--fd-node-purple)',
27
+ bundles: 'var(--fd-node-slate)'
27
28
  };
28
29
  /**
29
30
  * Default data type colors for fallback when port configuration is not available
31
+ * Uses --fd-node-* tokens from tokens.css
30
32
  */
31
33
  const DEFAULT_DATA_TYPE_COLORS = {
32
- string: 'var(--color-ref-emerald-500)',
33
- text: 'var(--color-ref-emerald-500)',
34
- number: 'var(--color-ref-blue-600)',
35
- integer: 'var(--color-ref-blue-600)',
36
- float: 'var(--color-ref-blue-600)',
37
- boolean: 'var(--color-ref-purple-600)',
38
- array: 'var(--color-ref-amber-500)',
39
- list: 'var(--color-ref-amber-500)',
40
- object: 'var(--color-ref-orange-500)',
41
- json: 'var(--color-ref-orange-500)',
42
- mixed: 'var(--color-ref-orange-500)',
43
- file: 'var(--color-ref-red-500)',
44
- document: 'var(--color-ref-red-500)',
45
- image: 'var(--color-ref-pink-500)',
46
- picture: 'var(--color-ref-pink-500)',
47
- audio: 'var(--color-ref-indigo-500)',
48
- sound: 'var(--color-ref-indigo-500)',
49
- video: 'var(--color-ref-teal-500)',
50
- movie: 'var(--color-ref-teal-500)',
51
- url: 'var(--color-ref-cyan-500)',
52
- email: 'var(--color-ref-cyan-500)',
53
- date: 'var(--color-ref-lime-500)',
54
- datetime: 'var(--color-ref-lime-500)',
55
- time: 'var(--color-ref-lime-500)',
56
- tool: 'var(--color-ref-amber-500)',
57
- trigger: 'var(--color-ref-gray-950)',
58
- branch: 'var(--color-ref-purple-500)'
34
+ string: 'var(--fd-node-emerald)',
35
+ text: 'var(--fd-node-emerald)',
36
+ number: 'var(--fd-node-blue)',
37
+ integer: 'var(--fd-node-blue)',
38
+ float: 'var(--fd-node-blue)',
39
+ boolean: 'var(--fd-node-purple)',
40
+ array: 'var(--fd-node-amber)',
41
+ list: 'var(--fd-node-amber)',
42
+ object: 'var(--fd-node-orange)',
43
+ json: 'var(--fd-node-orange)',
44
+ mixed: 'var(--fd-node-orange)',
45
+ file: 'var(--fd-node-red)',
46
+ document: 'var(--fd-node-red)',
47
+ image: 'var(--fd-node-pink)',
48
+ picture: 'var(--fd-node-pink)',
49
+ audio: 'var(--fd-node-indigo)',
50
+ sound: 'var(--fd-node-indigo)',
51
+ video: 'var(--fd-node-teal)',
52
+ movie: 'var(--fd-node-teal)',
53
+ url: 'var(--fd-node-cyan)',
54
+ email: 'var(--fd-node-cyan)',
55
+ date: 'var(--fd-node-lime)',
56
+ datetime: 'var(--fd-node-lime)',
57
+ time: 'var(--fd-node-lime)',
58
+ tool: 'var(--fd-node-amber)',
59
+ trigger: 'var(--fd-edge-trigger)',
60
+ branch: 'var(--fd-node-purple)'
59
61
  };
60
62
  /**
61
- * Get the reference color token for a category
63
+ * Get the design token for a category color
62
64
  */
63
65
  export function getCategoryColorToken(category) {
64
- return CATEGORY_COLOR_TOKENS[category] || 'var(--color-ref-slate-500)';
66
+ return CATEGORY_COLOR_TOKENS[category] || 'var(--fd-node-slate)';
65
67
  }
66
68
  /**
67
69
  * Get the reference color token for a data type (configurable version)
@@ -78,7 +80,7 @@ export function getDataTypeColorToken(dataType) {
78
80
  // Fallback to static color mapping if port checker not initialized
79
81
  // console.warn("Port compatibility checker not initialized, using fallback colors");
80
82
  }
81
- return DEFAULT_DATA_TYPE_COLORS[dataType.toLowerCase()] || 'var(--color-ref-slate-500)';
83
+ return DEFAULT_DATA_TYPE_COLORS[dataType.toLowerCase()] || 'var(--fd-node-slate)';
82
84
  }
83
85
  /**
84
86
  * Get data type configuration from port config
@@ -121,7 +123,7 @@ export const DEFAULT_COLORS = {
121
123
  * @returns The color configuration for the category
122
124
  */
123
125
  export function getCategoryColors(category) {
124
- return CATEGORY_COLOR_TOKENS[category] || 'var(--color-ref-slate-500)';
126
+ return CATEGORY_COLOR_TOKENS[category] || 'var(--fd-node-slate)';
125
127
  }
126
128
  /**
127
129
  * Get category background color
@@ -167,32 +169,32 @@ export function getNodeColors(category, isError = false, isProcessing = false, i
167
169
  const baseColor = getCategoryColors(category);
168
170
  if (isError) {
169
171
  return {
170
- background: 'var(--color-ref-red-50)',
171
- accent: 'var(--color-ref-red-500)',
172
- text: 'var(--color-ref-red-900)',
173
- border: 'var(--color-ref-red-200)'
172
+ background: 'var(--fd-error-muted)',
173
+ accent: 'var(--fd-error)',
174
+ text: 'var(--fd-error-hover)',
175
+ border: 'var(--fd-error)'
174
176
  };
175
177
  }
176
178
  if (isProcessing) {
177
179
  return {
178
- background: 'var(--color-ref-blue-50)',
179
- accent: 'var(--color-ref-blue-500)',
180
- text: 'var(--color-ref-blue-900)',
181
- border: 'var(--color-ref-blue-200)'
180
+ background: 'var(--fd-info-muted)',
181
+ accent: 'var(--fd-info)',
182
+ text: 'var(--fd-primary-hover)',
183
+ border: 'var(--fd-primary)'
182
184
  };
183
185
  }
184
186
  if (isSelected) {
185
187
  return {
186
- background: 'var(--color-ref-indigo-50)',
187
- accent: 'var(--color-ref-indigo-500)',
188
- text: 'var(--color-ref-indigo-900)',
189
- border: 'var(--color-ref-indigo-200)'
188
+ background: 'var(--fd-accent-muted)',
189
+ accent: 'var(--fd-accent)',
190
+ text: 'var(--fd-accent-hover)',
191
+ border: 'var(--fd-accent)'
190
192
  };
191
193
  }
192
194
  return {
193
195
  background: baseColor,
194
196
  accent: baseColor,
195
- text: 'var(--color-ref-slate-900)',
197
+ text: 'var(--fd-foreground)',
196
198
  border: baseColor
197
199
  };
198
200
  }
@@ -318,6 +320,109 @@ export function hexToRgb(hex) {
318
320
  const b = parseInt(cleanHex.substring(4, 6), 16);
319
321
  return { r, g, b };
320
322
  }
323
+ /**
324
+ * Calculate the relative luminance of a color
325
+ * Based on WCAG 2.1 guidelines for contrast calculations
326
+ * @param r - Red component (0-255)
327
+ * @param g - Green component (0-255)
328
+ * @param b - Blue component (0-255)
329
+ * @returns Relative luminance value (0-1)
330
+ */
331
+ export function getRelativeLuminance(r, g, b) {
332
+ const toLinear = (value) => {
333
+ const srgb = value / 255;
334
+ return srgb <= 0.03928 ? srgb / 12.92 : Math.pow((srgb + 0.055) / 1.055, 2.4);
335
+ };
336
+ return 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);
337
+ }
338
+ /**
339
+ * Determine if a background color is considered "light" (needs dark text)
340
+ * @param hex - Hex color string
341
+ * @returns True if the color is light and needs dark text for contrast
342
+ */
343
+ export function isLightColor(hex) {
344
+ const rgb = hexToRgb(hex);
345
+ if (!rgb) {
346
+ return false; // Default to dark background assumption
347
+ }
348
+ const luminance = getRelativeLuminance(rgb.r, rgb.g, rgb.b);
349
+ // WCAG recommends contrast ratio of 4.5:1 for normal text
350
+ // Luminance > 0.179 generally requires dark text for good contrast
351
+ return luminance > 0.179;
352
+ }
353
+ /**
354
+ * Get the appropriate contrast text color (black or white) for a background
355
+ * @param backgroundColor - Hex color string of the background
356
+ * @returns CSS color value for text that provides good contrast
357
+ */
358
+ export function getContrastTextColor(backgroundColor) {
359
+ return isLightColor(backgroundColor) ? "#18181b" : "#ffffff";
360
+ }
361
+ /**
362
+ * Mapping of CSS variable tokens to their resolved hex values
363
+ * Used for contrast calculations when working with design tokens
364
+ */
365
+ const TOKEN_TO_HEX = {
366
+ "var(--fd-node-cyan)": "#06b6d4",
367
+ "var(--fd-node-emerald)": "#10b981",
368
+ "var(--fd-node-blue)": "#3b82f6",
369
+ "var(--fd-node-amber)": "#f59e0b",
370
+ "var(--fd-node-indigo)": "#6366f1",
371
+ "var(--fd-node-teal)": "#14b8a6",
372
+ "var(--fd-node-purple)": "#8b5cf6",
373
+ "var(--fd-node-orange)": "#f97316",
374
+ "var(--fd-node-slate)": "#64748b",
375
+ "var(--fd-node-red)": "#ef4444",
376
+ "var(--fd-node-pink)": "#ec4899",
377
+ "var(--fd-node-lime)": "#84cc16"
378
+ };
379
+ /**
380
+ * Resolve a CSS variable token to its hex value
381
+ * @param token - CSS variable token (e.g., "var(--fd-node-amber)")
382
+ * @returns Hex color value or the original value if not a known token
383
+ */
384
+ export function resolveColorToken(token) {
385
+ return TOKEN_TO_HEX[token] || token;
386
+ }
387
+ /**
388
+ * Get the appropriate contrast text color for a data type badge
389
+ * @param dataType - The data type (e.g., "array", "string", "number")
390
+ * @returns CSS color value for text that provides good contrast on the data type's background
391
+ */
392
+ export function getContrastTextColorForDataType(dataType) {
393
+ const colorToken = getDataTypeColorToken(dataType);
394
+ const hexColor = resolveColorToken(colorToken);
395
+ return getContrastTextColor(hexColor);
396
+ }
397
+ /**
398
+ * Get the appropriate contrast text color for a category badge
399
+ * @param category - The node category
400
+ * @returns CSS color value for text that provides good contrast on the category's background
401
+ */
402
+ export function getContrastTextColorForCategory(category) {
403
+ const colorToken = getCategoryColorToken(category);
404
+ const hexColor = resolveColorToken(colorToken);
405
+ return getContrastTextColor(hexColor);
406
+ }
407
+ /**
408
+ * Get a semi-transparent tinted background color for ports
409
+ * Creates a cohesive look with the icon wrapper styling
410
+ * @param dataType - The data type
411
+ * @param opacity - Opacity percentage (default 25%)
412
+ * @returns CSS color-mix expression for the tinted background
413
+ */
414
+ export function getPortBackgroundColor(dataType, opacity = 25) {
415
+ const colorToken = getDataTypeColorToken(dataType);
416
+ return `color-mix(in srgb, ${colorToken} ${opacity}%, transparent)`;
417
+ }
418
+ /**
419
+ * Get the border color for ports (solid data type color)
420
+ * @param dataType - The data type
421
+ * @returns CSS color value for the port border
422
+ */
423
+ export function getPortBorderColor(dataType) {
424
+ return getDataTypeColorToken(dataType);
425
+ }
321
426
  /**
322
427
  * Convert RGB components to hex color string
323
428
  * @param r - Red component (0-255)
@@ -334,14 +439,14 @@ export function rgbToHex(r, g, b) {
334
439
  }
335
440
  /**
336
441
  * Generate a light tint of a color (similar to Tailwind's -50 shade)
337
- * Creates a very light background-friendly version of the color
442
+ * Creates a very light background-friendly version of the color for light mode
338
443
  * @param hex - Base hex color string
339
444
  * @returns Light tint hex color string
340
445
  */
341
446
  export function getLightTint(hex) {
342
447
  const rgb = hexToRgb(hex);
343
448
  if (!rgb) {
344
- return '#fffbeb'; // Fallback to amber-50
449
+ return "#fffbeb"; // Fallback to amber-50
345
450
  }
346
451
  // Mix with white at 95% to create a very light tint
347
452
  const mixRatio = 0.95;
@@ -350,16 +455,35 @@ export function getLightTint(hex) {
350
455
  const b = rgb.b + (255 - rgb.b) * mixRatio;
351
456
  return rgbToHex(r, g, b);
352
457
  }
458
+ /**
459
+ * Generate a dark tint of a color for dark mode backgrounds
460
+ * Creates a subtle, muted version of the color that works well on dark backgrounds
461
+ * @param hex - Base hex color string
462
+ * @param opacity - Optional opacity for the color overlay (default 0.15)
463
+ * @returns Dark tint hex color string
464
+ */
465
+ export function getDarkTint(hex, opacity = 0.15) {
466
+ const rgb = hexToRgb(hex);
467
+ if (!rgb) {
468
+ return "#2a2518"; // Fallback dark amber tint
469
+ }
470
+ // Mix with dark background (#1a1a1e) to create a subtle dark tint
471
+ const darkBg = { r: 26, g: 26, b: 30 };
472
+ const r = darkBg.r + (rgb.r - darkBg.r) * opacity;
473
+ const g = darkBg.g + (rgb.g - darkBg.g) * opacity;
474
+ const b = darkBg.b + (rgb.b - darkBg.b) * opacity;
475
+ return rgbToHex(r, g, b);
476
+ }
353
477
  /**
354
478
  * Generate a border tint of a color (similar to Tailwind's -300 shade)
355
- * Creates a medium-light version suitable for borders
479
+ * Creates a medium-light version suitable for borders in light mode
356
480
  * @param hex - Base hex color string
357
481
  * @returns Border tint hex color string
358
482
  */
359
483
  export function getBorderTint(hex) {
360
484
  const rgb = hexToRgb(hex);
361
485
  if (!rgb) {
362
- return '#fcd34d'; // Fallback to amber-300
486
+ return "#fcd34d"; // Fallback to amber-300
363
487
  }
364
488
  // Mix with white at 60% to create a medium-light tint
365
489
  const mixRatio = 0.6;
@@ -368,15 +492,52 @@ export function getBorderTint(hex) {
368
492
  const b = rgb.b + (255 - rgb.b) * mixRatio;
369
493
  return rgbToHex(r, g, b);
370
494
  }
495
+ /**
496
+ * Generate a dark border tint of a color for dark mode
497
+ * Creates a medium-dark version suitable for borders in dark mode
498
+ * @param hex - Base hex color string
499
+ * @returns Dark border tint hex color string
500
+ */
501
+ export function getDarkBorderTint(hex) {
502
+ const rgb = hexToRgb(hex);
503
+ if (!rgb) {
504
+ return "#5c4a1e"; // Fallback dark amber border
505
+ }
506
+ // Mix with dark background to create a muted but visible border
507
+ const darkBg = { r: 26, g: 26, b: 30 };
508
+ const mixRatio = 0.35;
509
+ const r = darkBg.r + (rgb.r - darkBg.r) * mixRatio;
510
+ const g = darkBg.g + (rgb.g - darkBg.g) * mixRatio;
511
+ const b = darkBg.b + (rgb.b - darkBg.b) * mixRatio;
512
+ return rgbToHex(r, g, b);
513
+ }
371
514
  /**
372
515
  * Generate color variants for theming a component
516
+ * Returns variants for both light and dark modes
373
517
  * @param baseColor - Base hex color string
374
- * @returns Object with base, light, and border color variants
518
+ * @returns Object with base, light, border, darkLight, and darkBorder color variants
375
519
  */
376
520
  export function getColorVariants(baseColor) {
377
521
  return {
378
522
  base: baseColor,
379
523
  light: getLightTint(baseColor),
380
- border: getBorderTint(baseColor)
524
+ border: getBorderTint(baseColor),
525
+ darkLight: getDarkTint(baseColor),
526
+ darkBorder: getDarkBorderTint(baseColor)
527
+ };
528
+ }
529
+ /**
530
+ * Get theme-aware color variants
531
+ * Returns the appropriate light or dark variants based on the theme
532
+ * @param baseColor - Base hex color string
533
+ * @param isDarkMode - Whether dark mode is active
534
+ * @returns Object with base, background, and border colors appropriate for the theme
535
+ */
536
+ export function getThemeAwareColorVariants(baseColor, isDarkMode) {
537
+ const variants = getColorVariants(baseColor);
538
+ return {
539
+ base: variants.base,
540
+ background: isDarkMode ? variants.darkLight : variants.light,
541
+ border: isDarkMode ? variants.darkBorder : variants.border
381
542
  };
382
543
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@d34dman/flowdrop",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.0.43",
5
+ "version": "0.0.45",
6
6
  "scripts": {
7
7
  "dev": "vite dev",
8
8
  "build": "vite build && npm run prepack",
@@ -150,7 +150,7 @@
150
150
  "@eslint/js": "^9.18.0",
151
151
  "@iconify/svelte": "^5.0.0",
152
152
  "@playwright/test": "^1.49.1",
153
- "@redocly/cli": "^2.14.9",
153
+ "@redocly/cli": "^1.31.0",
154
154
  "@storybook/addon-docs": "^9.0.15",
155
155
  "@storybook/addon-svelte-csf": "^5.0.4",
156
156
  "@storybook/addon-vitest": "^9.0.15",