diff --git a/src/components/copySvg.svelte b/src/components/copySvg.svelte index c1cabb6..32c8651 100644 --- a/src/components/copySvg.svelte +++ b/src/components/copySvg.svelte @@ -12,7 +12,7 @@ import { copyToClipboard as figmaCopyToClipboard } from '@/figma/copy-to-clipboard'; import { buttonStyles } from '@/ui/styles'; import { cn } from '@/utils/cn'; - import ReactIcon from './reactIcon.svelte'; + import ReactIcon from './icons/reactIcon.svelte'; // Props: export let iconSize = 24; diff --git a/src/components/headerLogoLink.svelte b/src/components/headerLogoLink.svelte new file mode 100644 index 0000000..cd2e943 --- /dev/null +++ b/src/components/headerLogoLink.svelte @@ -0,0 +1,75 @@ + + + + + +
+ + + +
+
+
+ + copyToClipboard()}> + + Copy as SVG + + convertSvgReactComponent(false)}> + + Copy as React JSX Component + + convertSvgReactComponent(true)}> + + Copy as React TSX Component + + +
diff --git a/src/components/navbar.svelte b/src/components/navbar.svelte index 09fa689..d1c4b4f 100644 --- a/src/components/navbar.svelte +++ b/src/components/navbar.svelte @@ -2,12 +2,13 @@ export let currentPath: string; import { cn } from '@/utils/cn'; - import Logo from './logo.svelte'; + import Logo from './icons/logo.svelte'; import Theme from './theme.svelte'; import { ArrowUpRight, CloudyIcon } from 'lucide-svelte'; - import XIcon from './xIcon.svelte'; - import GithubIcon from './githubIcon.svelte'; + import XIcon from './icons/xIcon.svelte'; + import GithubIcon from './icons/githubIcon.svelte'; + import HeaderLogoLink from './headerLogoLink.svelte'; const externalLinks = [ { @@ -42,17 +43,8 @@ 'backdrop-blur-md dark:bg-neutral-900/90 bg-white/90' )} > -
-
- -
- - - -
-
-
+
+ import { browser } from '$app/environment'; + import { buttonStyles } from '@/ui/styles'; + import { cn } from '@/utils/cn'; + import RaycastIcon from './icons/raycastIcon.svelte'; + import { ArrowUpLeft, ArrowUpRight, X } from 'lucide-svelte'; + import XIcon from './icons/xIcon.svelte'; + + let warning = false; + let warningName = 'svgl_warning_raycast_message'; + const initialValue = browser ? window.localStorage.getItem(warningName) : true; + + +{#if !warning && !initialValue} +
+
+ +

+ Update your Raycast extension to the latest version to use the new SVGL API. +

+
+
+ + + How to update + + + +
+
+{/if} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 940052b..b593a9c 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -30,7 +30,7 @@ // Layout: import Navbar from '@/components/navbar.svelte'; - import WarningNewApi from '@/components/warningNewApi.svelte'; + import WarningRaycast from '@/components/warningRaycast.svelte'; @@ -88,7 +88,7 @@
- +