@heyramzi/ui 3.5.0 → 3.7.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.
- package/COMPONENTS.md +1 -0
- package/dist/ai/chat-window/icons.js +43 -0
- package/dist/ai/chat-window/index.js +5 -0
- package/dist/ai/chat-window/labels.js +16 -0
- package/dist/ai/chat-window/reveal.svelte.js +106 -0
- package/dist/ai/chat-window/types.js +4 -0
- package/package.json +1 -1
- package/src/ai/chat-window/ChatGlyph.svelte +38 -0
- package/src/ai/chat-window/ChatGlyph.svelte.d.ts +9 -0
- package/src/ai/chat-window/ChatGptWindow.svelte +636 -0
- package/src/ai/chat-window/ChatGptWindow.svelte.d.ts +25 -0
- package/src/ai/chat-window/ClaudeWindow.svelte +668 -0
- package/src/ai/chat-window/ClaudeWindow.svelte.d.ts +25 -0
- package/src/ai/chat-window/chat-window.test.ts +80 -0
- package/src/ai/chat-window/icons/LICENSE +24 -0
- package/src/ai/chat-window/icons/chatgpt-chevron.svg +2 -0
- package/src/ai/chat-window/icons/chatgpt-copy.svg +2 -0
- package/src/ai/chat-window/icons/chatgpt-mic.svg +2 -0
- package/src/ai/chat-window/icons/chatgpt-more.svg +2 -0
- package/src/ai/chat-window/icons/chatgpt-plus.svg +2 -0
- package/src/ai/chat-window/icons/chatgpt-regenerate.svg +2 -0
- package/src/ai/chat-window/icons/chatgpt-share.svg +2 -0
- package/src/ai/chat-window/icons/chatgpt-sidebar.svg +1 -0
- package/src/ai/chat-window/icons/chatgpt-thumb.svg +2 -0
- package/src/ai/chat-window/icons/chatgpt-voice.svg +2 -0
- package/src/ai/chat-window/icons/claude-chevron.svg +1 -0
- package/src/ai/chat-window/icons/claude-copy.svg +1 -0
- package/src/ai/chat-window/icons/claude-plus.svg +1 -0
- package/src/ai/chat-window/icons/claude-retry.svg +1 -0
- package/src/ai/chat-window/icons/claude-send.svg +1 -0
- package/src/ai/chat-window/icons/claude-sidebar.svg +1 -0
- package/src/ai/chat-window/icons/claude-sliders.svg +1 -0
- package/src/ai/chat-window/icons/claude-spark.svg +1 -0
- package/src/ai/chat-window/icons/claude-thumb.svg +1 -0
- package/src/ai/chat-window/icons.ts +46 -0
- package/src/ai/chat-window/index.ts +26 -0
- package/src/ai/chat-window/labels.ts +39 -0
- package/src/ai/chat-window/reveal.svelte.ts +106 -0
- package/src/ai/chat-window/types.ts +42 -0
- package/src/components/open-in/open-in.svelte +14 -15
- package/src/components/open-in/open-in.svelte.d.ts +2 -2
- package/src/effects/interactive-hover-button/InteractiveHoverButton.svelte +39 -15
- package/src/effects/interactive-hover-button/InteractiveHoverButton.svelte.d.ts +2 -1
- package/src/shadcn/sidebar/sidebar-provider.svelte +9 -2
- package/src/shadcn/sidebar/sidebar-provider.svelte.d.ts +5 -0
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
ref = $bindable(null),
|
|
15
15
|
open = $bindable(true),
|
|
16
16
|
onOpenChange = () => {},
|
|
17
|
+
persist = true,
|
|
17
18
|
class: className,
|
|
18
19
|
style,
|
|
19
20
|
children,
|
|
@@ -21,6 +22,11 @@
|
|
|
21
22
|
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
22
23
|
open?: boolean;
|
|
23
24
|
onOpenChange?: (open: boolean) => void;
|
|
25
|
+
/**
|
|
26
|
+
* False for a sidebar that isn't the app's shell, such as a docs demo: it then
|
|
27
|
+
* writes no state cookie and takes no Cmd+B, so it can't fold the real one.
|
|
28
|
+
*/
|
|
29
|
+
persist?: boolean;
|
|
24
30
|
} = $props();
|
|
25
31
|
|
|
26
32
|
let openState = $state(open);
|
|
@@ -40,12 +46,13 @@
|
|
|
40
46
|
onOpenChange(value);
|
|
41
47
|
|
|
42
48
|
// This sets the cookie to keep the sidebar state.
|
|
43
|
-
|
|
49
|
+
if (persist)
|
|
50
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${value}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
44
51
|
},
|
|
45
52
|
});
|
|
46
53
|
</script>
|
|
47
54
|
|
|
48
|
-
<svelte:window onkeydown={sidebar.handleShortcutKeydown} />
|
|
55
|
+
<svelte:window onkeydown={persist ? sidebar.handleShortcutKeydown : undefined} />
|
|
49
56
|
|
|
50
57
|
<Tooltip.Provider delayDuration={0}>
|
|
51
58
|
<!-- An h-svh frame that never scrolls: the app puts its page in a
|
|
@@ -3,6 +3,11 @@ import type { HTMLAttributes } from "svelte/elements";
|
|
|
3
3
|
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
/**
|
|
7
|
+
* False for a sidebar that isn't the app's shell, such as a docs demo: it then
|
|
8
|
+
* writes no state cookie and takes no Cmd+B, so it can't fold the real one.
|
|
9
|
+
*/
|
|
10
|
+
persist?: boolean;
|
|
6
11
|
};
|
|
7
12
|
declare const $$Component: import("svelte").Component<$$ComponentProps, {}, "ref" | "open">;
|
|
8
13
|
type $$Component = ReturnType<typeof $$Component>;
|