diff --git a/apps/desktop/package.json b/apps/desktop/package.json index af98d66..717ed17 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -14,6 +14,7 @@ }, "license": "MIT", "dependencies": { + "@formkit/auto-animate": "^0.8.2", "@kksh/extension": "workspace:*", "@kksh/supabase": "workspace:*", "@kksh/ui": "workspace:*", @@ -22,6 +23,7 @@ "@tauri-apps/api": "^2", "@tauri-apps/plugin-shell": "^2", "bits-ui": "1.0.0-next.36", + "gsap": "^3.12.5", "lucide-svelte": "^0.454.0", "lz-string": "^1.5.0", "mode-watcher": "^0.4.1", diff --git a/apps/desktop/src/lib/components/dance/dance-transition.svelte b/apps/desktop/src/lib/components/dance/dance-transition.svelte new file mode 100644 index 0000000..850d9cc --- /dev/null +++ b/apps/desktop/src/lib/components/dance/dance-transition.svelte @@ -0,0 +1,34 @@ + + +{#if show} +
+ +
+{/if} diff --git a/apps/desktop/src/lib/components/dance.svelte b/apps/desktop/src/lib/components/dance/dance.svelte similarity index 100% rename from apps/desktop/src/lib/components/dance.svelte rename to apps/desktop/src/lib/components/dance/dance.svelte diff --git a/apps/desktop/src/routes/+layout.svelte b/apps/desktop/src/routes/+layout.svelte index 99c8d80..d590564 100644 --- a/apps/desktop/src/routes/+layout.svelte +++ b/apps/desktop/src/routes/+layout.svelte @@ -11,6 +11,7 @@ updateTheme, type ThemeConfig } from "@kksh/svelte5" + import { ViewTransition } from "@kksh/ui" import type { UnlistenFn } from "@tauri-apps/api/event" import { attachConsole } from "@tauri-apps/plugin-log" import { onDestroy, onMount } from "svelte" @@ -32,6 +33,7 @@ }) + diff --git a/apps/desktop/src/routes/dance/+page.svelte b/apps/desktop/src/routes/dance/+page.svelte index 032a071..a364d05 100644 --- a/apps/desktop/src/routes/dance/+page.svelte +++ b/apps/desktop/src/routes/dance/+page.svelte @@ -1,9 +1,9 @@ diff --git a/apps/desktop/src/routes/extension/store/+layout.svelte b/apps/desktop/src/routes/extension/store/+layout.svelte new file mode 100644 index 0000000..f1c04bd --- /dev/null +++ b/apps/desktop/src/routes/extension/store/+layout.svelte @@ -0,0 +1,31 @@ + + +{@render children?.()} diff --git a/apps/desktop/src/routes/extension/store/+page.svelte b/apps/desktop/src/routes/extension/store/+page.svelte index 8726781..74f3680 100644 --- a/apps/desktop/src/routes/extension/store/+page.svelte +++ b/apps/desktop/src/routes/extension/store/+page.svelte @@ -46,7 +46,6 @@ } async function onExtItemInstall(ext: SBExt) { - console.log("onExtItemInstall", ext) const res = await supabaseAPI.getLatestExtPublish(ext.identifier) if (res.error) return toast.error("Fail to get latest extension", { @@ -77,5 +76,6 @@ {onExtItemUpgrade} {onExtItemInstall} {isUpgradable} + bind:searchTerm={$appState.searchTerm} onGoBack={goBack} /> diff --git a/apps/desktop/src/routes/extension/store/+page.ts b/apps/desktop/src/routes/extension/store/+page.ts index c737f8b..e0dc5af 100644 --- a/apps/desktop/src/routes/extension/store/+page.ts +++ b/apps/desktop/src/routes/extension/store/+page.ts @@ -33,7 +33,6 @@ export const load: PageLoad = async (): Promise<{ }) ) ) - console.log(get(upgradableExpsMap)) return { storeExtList, diff --git a/apps/desktop/src/routes/extension/store/[identifier]/+page.svelte b/apps/desktop/src/routes/extension/store/[identifier]/+page.svelte index 78ed467..23d82af 100644 --- a/apps/desktop/src/routes/extension/store/[identifier]/+page.svelte +++ b/apps/desktop/src/routes/extension/store/[identifier]/+page.svelte @@ -1,27 +1,55 @@ {#if icon.type === IconEnum.RemoteUrl} - + {:else if icon.type === IconEnum.Iconify} - + {:else if icon.type === IconEnum.Base64PNG} - + {:else if icon.type === IconEnum.Text} - {:else if icon.type === IconEnum.Svg} - {@html icon.value} + {@html icon.value} {:else} - + {/if} diff --git a/packages/ui/src/components/custom/draggable-command-group.svelte b/packages/ui/src/components/custom/draggable-command-group.svelte index 67ffa27..37adbeb 100644 --- a/packages/ui/src/components/custom/draggable-command-group.svelte +++ b/packages/ui/src/components/custom/draggable-command-group.svelte @@ -14,7 +14,7 @@ diff --git a/packages/ui/src/components/extension/ExtListItem.svelte b/packages/ui/src/components/extension/ExtListItem.svelte index 3860d65..091c4c0 100644 --- a/packages/ui/src/components/extension/ExtListItem.svelte +++ b/packages/ui/src/components/extension/ExtListItem.svelte @@ -3,8 +3,8 @@ import { Icon as TIcon } from "@kksh/api/models" import { SBExt } from "@kksh/api/supabase" import { Button, Command } from "@kksh/svelte5" - import { IconMultiplexer } from "@kksh/ui" - import { humanReadableNumber } from "@kksh/ui/utils" + import { Constants, IconMultiplexer } from "@kksh/ui" + import { cn, humanReadableNumber } from "@kksh/ui/utils" import { greaterThan, parse as parseSemver } from "@std/semver" import { CircleCheckBigIcon, MoveRightIcon } from "lucide-svelte" import { parse } from "valibot" @@ -15,8 +15,10 @@ onSelect, onUpgrade, onInstall, - isUpgradable + isUpgradable, + class: className }: { + class?: string ext: SBExt installedVersion?: string onSelect: () => void @@ -26,11 +28,17 @@ } = $props() - + - + + + -
{ext.name}
+
{ext.name}
{ext.short_description}
@@ -74,3 +82,9 @@ {humanReadableNumber(ext.downloads)}
+ + diff --git a/packages/ui/src/components/extension/StoreExtDetail.svelte b/packages/ui/src/components/extension/StoreExtDetail.svelte index b0d9baf..9ef7d0c 100644 --- a/packages/ui/src/components/extension/StoreExtDetail.svelte +++ b/packages/ui/src/components/extension/StoreExtDetail.svelte @@ -1,10 +1,11 @@ @@ -40,7 +44,7 @@ autofocus placeholder="Type a command or search..." leftSlot={leftSlot as Snippet} - bind:value={$appState.searchTerm} + bind:value={searchTerm} /> No results found. diff --git a/packages/ui/src/components/main/GlobalCommandPaletteFooter.svelte b/packages/ui/src/components/main/GlobalCommandPaletteFooter.svelte index 6774f30..a19c341 100644 --- a/packages/ui/src/components/main/GlobalCommandPaletteFooter.svelte +++ b/packages/ui/src/components/main/GlobalCommandPaletteFooter.svelte @@ -5,7 +5,7 @@ const { class: className }: { class?: string } = $props() -