@flowdrop/flowdrop 1.2.0 → 1.2.1

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,13 +1,13 @@
1
1
  <script lang="ts">
2
- import Icon from "@iconify/svelte";
2
+ import type { Snippet } from "svelte";
3
3
  let {
4
4
  title,
5
5
  description,
6
- iconName,
6
+ icon,
7
7
  }: {
8
8
  title: string;
9
9
  description: string;
10
- iconName?: string;
10
+ icon?: Snippet;
11
11
  } = $props();
12
12
  </script>
13
13
 
@@ -15,8 +15,8 @@
15
15
  <div class="flowdrop-card">
16
16
  <div class="flowdrop-card__body flowdrop-text--center">
17
17
  <div class="flowdrop-canvas-banner__icon">
18
- {#if iconName}
19
- <Icon icon={iconName} class="flowdrop-canvas-banner__icon-svg" />
18
+ {#if icon}
19
+ {@render icon()}
20
20
  {/if}
21
21
  </div>
22
22
  <h3 class="flowdrop-canvas-banner__title">{title}</h3>
@@ -47,6 +47,7 @@
47
47
  display: flex;
48
48
  justify-content: center;
49
49
  align-items: center;
50
+ color: var(--fd-muted-foreground);
50
51
  }
51
52
 
52
53
  .flowdrop-canvas-banner__title {
@@ -1,7 +1,8 @@
1
+ import type { Snippet } from "svelte";
1
2
  type $$ComponentProps = {
2
3
  title: string;
3
4
  description: string;
4
- iconName?: string;
5
+ icon?: Snippet;
5
6
  };
6
7
  declare const CanvasBanner: import("svelte").Component<$$ComponentProps, {}, "">;
7
8
  type CanvasBanner = ReturnType<typeof CanvasBanner>;
@@ -275,7 +275,13 @@
275
275
  <LoadingSpinner size="md" text="Loading from server..." />
276
276
  </div>
277
277
  {:else}
278
- <div class="flowdrop-hero__icon">📦</div>
278
+ <div class="flowdrop-hero__icon">
279
+ <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
280
+ <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/>
281
+ <polyline points="3.27 6.96 12 12.01 20.73 6.96"/>
282
+ <line x1="12" y1="22.08" x2="12" y2="12"/>
283
+ </svg>
284
+ </div>
279
285
  <h3 class="flowdrop-hero__title">No node types available</h3>
280
286
  <p class="flowdrop-hero__description">
281
287
  Node type definitions will appear here
@@ -292,12 +298,17 @@
292
298
  {#if filteredNodes.length === 0}
293
299
  <div class="flowdrop-hero">
294
300
  <div class="flowdrop-hero__content">
295
- <div class="flowdrop-hero__icon">🔍</div>
301
+ <div class="flowdrop-hero__icon">
302
+ <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
303
+ <circle cx="11" cy="11" r="8"/>
304
+ <line x1="21" y1="21" x2="16.65" y2="16.65"/>
305
+ </svg>
306
+ </div>
296
307
  <h3 class="flowdrop-hero__title">No components found</h3>
297
308
  <p class="flowdrop-hero__description">
298
309
  Try adjusting your search
299
310
  </p>
300
- {#if props.nodes?.length === 0}
311
+ {#if props.loading}
301
312
  <div class="flowdrop-mb--4">
302
313
  <LoadingSpinner size="sm" text="Loading components..." />
303
314
  </div>
@@ -477,7 +488,7 @@
477
488
  <div class="flowdrop-sidebar__footer">
478
489
  <div class="flowdrop-flex flowdrop-gap--4">
479
490
  <div class="flowdrop-flex flowdrop-gap--4">
480
- {#if props.nodes?.length === 0}
491
+ {#if props.loading && props.nodes?.length === 0}
481
492
  <span class="flowdrop-text--xs flowdrop-text--gray"
482
493
  >Loading components...</span
483
494
  >
@@ -857,8 +857,17 @@
857
857
  <CanvasBanner
858
858
  title="Drag components here to start building"
859
859
  description="Use the sidebar to add components to your workflow"
860
- iconName="mdi:graph"
861
- />
860
+ >
861
+ {#snippet icon()}
862
+ <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
863
+ <circle cx="18" cy="5" r="3"/>
864
+ <circle cx="6" cy="12" r="3"/>
865
+ <circle cx="18" cy="19" r="3"/>
866
+ <line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/>
867
+ <line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/>
868
+ </svg>
869
+ {/snippet}
870
+ </CanvasBanner>
862
871
  {/if}
863
872
  </FlowDropZone>
864
873
  </div>
@@ -333,6 +333,7 @@
333
333
  .flowdrop-hero__icon {
334
334
  font-size: 3.75rem;
335
335
  margin-bottom: var(--fd-space-xl);
336
+ color: var(--fd-muted-foreground);
336
337
  }
337
338
 
338
339
  .flowdrop-hero__title {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A drop-in visual workflow editor for any web application. You own the backend. You own the data. You own the orchestration.",
4
4
  "license": "MIT",
5
5
  "private": false,
6
- "version": "1.2.0",
6
+ "version": "1.2.1",
7
7
  "author": "Shibin Das (D34dMan)",
8
8
  "bugs": {
9
9
  "url": "https://github.com/flowdrop-io/flowdrop/issues"