@mastra/playground-ui 45.0.0 → 45.1.0-alpha.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/CommandPalette.css +135 -0
  3. package/dist/command-Duq1xsiS.js +168 -0
  4. package/dist/command-Duq1xsiS.js.map +1 -0
  5. package/dist/command-qsEykgml.cjs +197 -0
  6. package/dist/command-qsEykgml.cjs.map +1 -0
  7. package/dist/components/ChatShell.cjs.js +96 -0
  8. package/dist/components/ChatShell.cjs.js.map +1 -0
  9. package/dist/components/ChatShell.d.ts +2 -0
  10. package/dist/components/ChatShell.es.js +92 -0
  11. package/dist/components/ChatShell.es.js.map +1 -0
  12. package/dist/components/Command.cjs.js +10 -191
  13. package/dist/components/Command.cjs.js.map +1 -1
  14. package/dist/components/Command.es.js +1 -167
  15. package/dist/components/Command.es.js.map +1 -1
  16. package/dist/components/CommandPalette.cjs.js +180 -0
  17. package/dist/components/CommandPalette.cjs.js.map +1 -0
  18. package/dist/components/CommandPalette.d.ts +2 -0
  19. package/dist/components/CommandPalette.es.js +169 -0
  20. package/dist/components/CommandPalette.es.js.map +1 -0
  21. package/dist/components/Kbd.cjs.js +3 -24
  22. package/dist/components/Kbd.cjs.js.map +1 -1
  23. package/dist/components/Kbd.es.js +1 -26
  24. package/dist/components/Kbd.es.js.map +1 -1
  25. package/dist/components/MessageScroller.cjs.js +8 -524
  26. package/dist/components/MessageScroller.cjs.js.map +1 -1
  27. package/dist/components/MessageScroller.es.js +2 -504
  28. package/dist/components/MessageScroller.es.js.map +1 -1
  29. package/dist/components/ThreadRail.cjs.js +1 -1
  30. package/dist/components/ThreadRail.es.js +1 -1
  31. package/dist/kbd-Br7kdwaB.cjs +34 -0
  32. package/dist/kbd-Br7kdwaB.cjs.map +1 -0
  33. package/dist/kbd-DE0nj4DL.js +32 -0
  34. package/dist/kbd-DE0nj4DL.js.map +1 -0
  35. package/dist/message-scroller-BQpwFsqj.js +563 -0
  36. package/dist/message-scroller-BQpwFsqj.js.map +1 -0
  37. package/dist/message-scroller-DIgCd5n3.cjs +589 -0
  38. package/dist/message-scroller-DIgCd5n3.cjs.map +1 -0
  39. package/dist/{message-scroller-hooks-DdXqrmC2.cjs → message-scroller-context-_VfCYFBU.cjs} +6 -48
  40. package/dist/message-scroller-context-_VfCYFBU.cjs.map +1 -0
  41. package/dist/message-scroller-context-tTA6jxho.js +23 -0
  42. package/dist/message-scroller-context-tTA6jxho.js.map +1 -0
  43. package/dist/message-scroller-hooks-BxAf8k0Y.cjs +72 -0
  44. package/dist/message-scroller-hooks-BxAf8k0Y.cjs.map +1 -0
  45. package/dist/{message-scroller-hooks-CdsHnth6.js → message-scroller-hooks-D5yxCon2.js} +3 -19
  46. package/dist/message-scroller-hooks-D5yxCon2.js.map +1 -0
  47. package/dist/src/ds/components/ChatShell/chat-shell.d.ts +46 -0
  48. package/dist/src/ds/components/ChatShell/chat-shell.stories.d.ts +8 -0
  49. package/dist/src/ds/components/ChatShell/index.d.ts +11 -0
  50. package/dist/src/ds/components/CommandPalette/command-palette.d.ts +37 -0
  51. package/dist/src/ds/components/CommandPalette/command-palette.stories.d.ts +12 -0
  52. package/dist/src/ds/components/CommandPalette/index.d.ts +1 -0
  53. package/dist/src/ds/components/Kbd/kbd.d.ts +2 -1
  54. package/dist/src/ds/components/MessageScroller/message-scroller-context.d.ts +4 -0
  55. package/dist/src/ds/components/MessageScroller/message-scroller.d.ts +8 -7
  56. package/dist/style.css +343 -2
  57. package/package.json +6 -6
  58. package/dist/message-scroller-hooks-CdsHnth6.js.map +0 -1
  59. package/dist/message-scroller-hooks-DdXqrmC2.cjs.map +0 -1
@@ -0,0 +1,96 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const jsxRuntime = require('react/jsx-runtime');
6
+ const messageScroller = require('../message-scroller-DIgCd5n3.cjs');
7
+ const utils_cn = require('../cn-vA5sWo9W.cjs');
8
+
9
+ function ChatShellRoot({ className, scroller, ...props }) {
10
+ return /* @__PURE__ */ jsxRuntime.jsx(messageScroller.MessageScrollerProvider, { ...scroller, children: /* @__PURE__ */ jsxRuntime.jsx(
11
+ "div",
12
+ {
13
+ "data-slot": "chat-shell",
14
+ className: utils_cn.cn(
15
+ "@container relative isolate flex min-h-0 min-w-0 flex-col bg-(--chat-surface)",
16
+ "[--chat-column:48rem] [--chat-gutter:0.75rem] [--chat-inset-end:0px]",
17
+ "[--chat-surface:var(--color-surface2)]",
18
+ "[--chat-veil:color-mix(in_oklab,var(--chat-surface)_70%,transparent)]",
19
+ className
20
+ ),
21
+ ...props
22
+ }
23
+ ) });
24
+ }
25
+ function ChatShellBar({ className, ...props }) {
26
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "chat-shell-bar", className: utils_cn.cn("min-w-0 shrink-0", className), ...props });
27
+ }
28
+ function ChatShellStage({ className, ...props }) {
29
+ return /* @__PURE__ */ jsxRuntime.jsx(messageScroller.MessageScroller, { className: utils_cn.cn("h-auto min-h-0 flex-1", className), ...props });
30
+ }
31
+ function ChatShellViewport({ className, children, ...props }) {
32
+ return /* @__PURE__ */ jsxRuntime.jsx(
33
+ messageScroller.MessageScrollerViewport,
34
+ {
35
+ className: utils_cn.cn(
36
+ "h-auto min-h-0 flex-1 pe-(--chat-inset-end)",
37
+ "transition-[padding] duration-360 ease-out-custom motion-reduce:transition-none",
38
+ className
39
+ ),
40
+ ...props,
41
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "chat-shell-track", className: "flex min-h-full min-w-0 flex-col", children })
42
+ }
43
+ );
44
+ }
45
+ function ChatShellContent({ className, ...props }) {
46
+ return /* @__PURE__ */ jsxRuntime.jsx(messageScroller.MessageScrollerContent, { className: utils_cn.cn("flex-1 pb-(--chat-gutter)", className), ...props });
47
+ }
48
+ function ChatShellColumn({ className, ...props }) {
49
+ return /* @__PURE__ */ jsxRuntime.jsx(
50
+ "div",
51
+ {
52
+ "data-slot": "chat-shell-column",
53
+ className: utils_cn.cn("mx-auto flex w-full max-w-(--chat-column) min-w-0 flex-col px-3 md:px-5", className),
54
+ ...props
55
+ }
56
+ );
57
+ }
58
+ function ChatShellDock({ className, ...props }) {
59
+ return /* @__PURE__ */ jsxRuntime.jsx(
60
+ "div",
61
+ {
62
+ "data-slot": "chat-shell-dock",
63
+ className: utils_cn.cn("sticky bottom-0 z-10 shrink-0 bg-(--chat-veil) pb-(--chat-gutter)", className),
64
+ ...props
65
+ }
66
+ );
67
+ }
68
+ function ChatShellScrollButton({ className, ...props }) {
69
+ return /* @__PURE__ */ jsxRuntime.jsx(
70
+ "div",
71
+ {
72
+ "data-slot": "chat-shell-scroll-button",
73
+ className: "pointer-events-none absolute inset-x-0 bottom-[calc(100%+0.5rem)] flex",
74
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChatShellColumn, { className: "flex-row justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
75
+ messageScroller.MessageScrollerButton,
76
+ {
77
+ className: utils_cn.cn("pointer-events-auto static translate-x-0 rtl:translate-x-0", className),
78
+ ...props
79
+ }
80
+ ) })
81
+ }
82
+ );
83
+ }
84
+
85
+ const ChatShell = Object.assign(ChatShellRoot, {
86
+ Bar: ChatShellBar,
87
+ Column: ChatShellColumn,
88
+ Content: ChatShellContent,
89
+ Dock: ChatShellDock,
90
+ ScrollButton: ChatShellScrollButton,
91
+ Stage: ChatShellStage,
92
+ Viewport: ChatShellViewport
93
+ });
94
+
95
+ exports.ChatShell = ChatShell;
96
+ //# sourceMappingURL=ChatShell.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatShell.cjs.js","sources":["../../src/ds/components/ChatShell/chat-shell.tsx","../../src/ds/components/ChatShell/index.ts"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\n\nimport {\n MessageScroller,\n MessageScrollerButton,\n MessageScrollerContent,\n MessageScrollerProvider,\n MessageScrollerViewport,\n} from '../MessageScroller';\nimport type {\n MessageScrollerButtonProps,\n MessageScrollerContentProps,\n MessageScrollerProviderProps,\n MessageScrollerViewportProps,\n} from '../MessageScroller';\n\nimport { cn } from '@/lib/utils';\n\nexport type ChatShellProps = ComponentPropsWithoutRef<'div'> & {\n scroller?: Omit<MessageScrollerProviderProps, 'children'>;\n};\n\n/**\n * A chat page frame with exactly one scroll container. Bars sit above it, the\n * composer docks inside it, every region shares one column.\n *\n * Tuned through custom properties, all defaulted here: `--chat-column` (column\n * width), `--chat-surface` (page colour), `--chat-gutter` (room above and below\n * the composer), `--chat-veil` (what the dock paints with), `--chat-inset-end`\n * (room an overlay panel claims on the end edge).\n */\nexport function ChatShellRoot({ className, scroller, ...props }: ChatShellProps) {\n return (\n <MessageScrollerProvider {...scroller}>\n <div\n data-slot=\"chat-shell\"\n className={cn(\n '@container relative isolate flex min-h-0 min-w-0 flex-col bg-(--chat-surface)',\n '[--chat-column:48rem] [--chat-gutter:0.75rem] [--chat-inset-end:0px]',\n '[--chat-surface:var(--color-surface2)]',\n '[--chat-veil:color-mix(in_oklab,var(--chat-surface)_70%,transparent)]',\n className,\n )}\n {...props}\n />\n </MessageScrollerProvider>\n );\n}\n\n/**\n * Full-width row above the scroller (session header, goal bar). No end inset: the\n * overlay panel it would dodge floats inside the stage, below the bars.\n */\nexport function ChatShellBar({ className, ...props }: ComponentPropsWithoutRef<'div'>) {\n return <div data-slot=\"chat-shell-bar\" className={cn('min-w-0 shrink-0', className)} {...props} />;\n}\n\n/** Positioned region holding the scroller plus anything overlaying it. */\nexport function ChatShellStage({ className, ...props }: ComponentPropsWithoutRef<'div'>) {\n return <MessageScroller className={cn('h-auto min-h-0 flex-1', className)} {...props} />;\n}\n\n/**\n * The one scroll container. It takes the end inset itself — on an ancestor the\n * same room would drag the scrollbar inward, off the true edge.\n */\nexport function ChatShellViewport({ className, children, ...props }: MessageScrollerViewportProps) {\n return (\n <MessageScrollerViewport\n className={cn(\n 'h-auto min-h-0 flex-1 pe-(--chat-inset-end)',\n 'transition-[padding] duration-360 ease-out-custom motion-reduce:transition-none',\n className,\n )}\n {...props}\n >\n {/* Sticky against the scroller itself is clamped to its box, not the\n scrolled height, and strands the dock mid-transcript. */}\n <div data-slot=\"chat-shell-track\" className=\"flex min-h-full min-w-0 flex-col\">\n {children}\n </div>\n </MessageScrollerViewport>\n );\n}\n\n/** Scrolling content. Its bottom padding is the unveiled air above the composer. */\nexport function ChatShellContent({ className, ...props }: MessageScrollerContentProps) {\n return <MessageScrollerContent className={cn('flex-1 pb-(--chat-gutter)', className)} {...props} />;\n}\n\n/** The shared reading column. Every chat region must go through it. */\nexport function ChatShellColumn({ className, ...props }: ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n data-slot=\"chat-shell-column\"\n className={cn('mx-auto flex w-full max-w-(--chat-column) min-w-0 flex-col px-3 md:px-5', className)}\n {...props}\n />\n );\n}\n\n/**\n * Composer region, sticky but left in flow: its own height reserves the room the\n * transcript scrolls behind, so nothing measures it and a composer growing under\n * the cursor resizes no box the scroller watches.\n *\n * The veil is a background, not an overlay, so it passes behind the composer card\n * and dims the transcript in its rounded corners too.\n */\nexport function ChatShellDock({ className, ...props }: ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n data-slot=\"chat-shell-dock\"\n className={cn('sticky bottom-0 z-10 shrink-0 bg-(--chat-veil) pb-(--chat-gutter)', className)}\n {...props}\n />\n );\n}\n\n/**\n * Jump-to-latest, floating just above the dock. It belongs inside the dock:\n * anywhere else it centres on a box the scrollbar has not narrowed, landing off\n * the composer's axis.\n */\nexport function ChatShellScrollButton({ className, ...props }: MessageScrollerButtonProps) {\n return (\n <div\n data-slot=\"chat-shell-scroll-button\"\n className=\"pointer-events-none absolute inset-x-0 bottom-[calc(100%+0.5rem)] flex\"\n >\n <ChatShellColumn className=\"flex-row justify-center\">\n <MessageScrollerButton\n className={cn('pointer-events-auto static translate-x-0 rtl:translate-x-0', className)}\n {...props}\n />\n </ChatShellColumn>\n </div>\n );\n}\n","import {\n ChatShellBar,\n ChatShellColumn,\n ChatShellContent,\n ChatShellDock,\n ChatShellRoot,\n ChatShellScrollButton,\n ChatShellStage,\n ChatShellViewport,\n} from './chat-shell';\n\nexport type { ChatShellProps } from './chat-shell';\n\nexport const ChatShell = Object.assign(ChatShellRoot, {\n Bar: ChatShellBar,\n Column: ChatShellColumn,\n Content: ChatShellContent,\n Dock: ChatShellDock,\n ScrollButton: ChatShellScrollButton,\n Stage: ChatShellStage,\n Viewport: ChatShellViewport,\n});\n"],"names":["jsx","MessageScrollerProvider","cn","MessageScroller","MessageScrollerViewport","MessageScrollerContent","MessageScrollerButton"],"mappings":";;;;;;;;AA+BO,SAAS,cAAc,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAmB;AAC/E,EAAA,uBACEA,cAAA,CAACC,uCAAA,EAAA,EAAyB,GAAG,QAAA,EAC3B,QAAA,kBAAAD,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,YAAA;AAAA,MACV,SAAA,EAAWE,WAAA;AAAA,QACT,+EAAA;AAAA,QACA,sEAAA;AAAA,QACA,wCAAA;AAAA,QACA,uEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN,EACF,CAAA;AAEJ;AAMO,SAAS,YAAA,CAAa,EAAE,SAAA,EAAW,GAAG,OAAM,EAAoC;AACrF,EAAA,uBAAOF,cAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,gBAAA,EAAiB,SAAA,EAAWE,YAAG,kBAAA,EAAoB,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAClG;AAGO,SAAS,cAAA,CAAe,EAAE,SAAA,EAAW,GAAG,OAAM,EAAoC;AACvF,EAAA,uBAAOF,cAAA,CAACG,mCAAgB,SAAA,EAAWD,WAAA,CAAG,yBAAyB,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACxF;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,MAEV,QAAA,kBAAAA,cAAA,CAAC,eAAA,EAAA,EAAgB,SAAA,EAAU,yBAAA,EACzB,QAAA,kBAAAA,cAAA;AAAA,QAACM,qCAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAWJ,WAAA,CAAG,4DAAA,EAA8D,SAAS,CAAA;AAAA,UACpF,GAAG;AAAA;AAAA,OACN,EACF;AAAA;AAAA,GACF;AAEJ;;AC7HO,MAAM,SAAA,GAAY,MAAA,CAAO,MAAA,CAAO,aAAA,EAAe;AAAA,EACpD,GAAA,EAAK,YAAA;AAAA,EACL,MAAA,EAAQ,eAAA;AAAA,EACR,OAAA,EAAS,gBAAA;AAAA,EACT,IAAA,EAAM,aAAA;AAAA,EACN,YAAA,EAAc,qBAAA;AAAA,EACd,KAAA,EAAO,cAAA;AAAA,EACP,QAAA,EAAU;AACZ,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ export * from '../src/ds/components/ChatShell/index'
2
+ export {}
@@ -0,0 +1,92 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { d as MessageScrollerProvider, e as MessageScrollerViewport, M as MessageScroller, a as MessageScrollerButton, b as MessageScrollerContent } from '../message-scroller-BQpwFsqj.js';
3
+ import { c as cn } from '../cn-BakJzhuv.js';
4
+
5
+ function ChatShellRoot({ className, scroller, ...props }) {
6
+ return /* @__PURE__ */ jsx(MessageScrollerProvider, { ...scroller, children: /* @__PURE__ */ jsx(
7
+ "div",
8
+ {
9
+ "data-slot": "chat-shell",
10
+ className: cn(
11
+ "@container relative isolate flex min-h-0 min-w-0 flex-col bg-(--chat-surface)",
12
+ "[--chat-column:48rem] [--chat-gutter:0.75rem] [--chat-inset-end:0px]",
13
+ "[--chat-surface:var(--color-surface2)]",
14
+ "[--chat-veil:color-mix(in_oklab,var(--chat-surface)_70%,transparent)]",
15
+ className
16
+ ),
17
+ ...props
18
+ }
19
+ ) });
20
+ }
21
+ function ChatShellBar({ className, ...props }) {
22
+ return /* @__PURE__ */ jsx("div", { "data-slot": "chat-shell-bar", className: cn("min-w-0 shrink-0", className), ...props });
23
+ }
24
+ function ChatShellStage({ className, ...props }) {
25
+ return /* @__PURE__ */ jsx(MessageScroller, { className: cn("h-auto min-h-0 flex-1", className), ...props });
26
+ }
27
+ function ChatShellViewport({ className, children, ...props }) {
28
+ return /* @__PURE__ */ jsx(
29
+ MessageScrollerViewport,
30
+ {
31
+ className: cn(
32
+ "h-auto min-h-0 flex-1 pe-(--chat-inset-end)",
33
+ "transition-[padding] duration-360 ease-out-custom motion-reduce:transition-none",
34
+ className
35
+ ),
36
+ ...props,
37
+ children: /* @__PURE__ */ jsx("div", { "data-slot": "chat-shell-track", className: "flex min-h-full min-w-0 flex-col", children })
38
+ }
39
+ );
40
+ }
41
+ function ChatShellContent({ className, ...props }) {
42
+ return /* @__PURE__ */ jsx(MessageScrollerContent, { className: cn("flex-1 pb-(--chat-gutter)", className), ...props });
43
+ }
44
+ function ChatShellColumn({ className, ...props }) {
45
+ return /* @__PURE__ */ jsx(
46
+ "div",
47
+ {
48
+ "data-slot": "chat-shell-column",
49
+ className: cn("mx-auto flex w-full max-w-(--chat-column) min-w-0 flex-col px-3 md:px-5", className),
50
+ ...props
51
+ }
52
+ );
53
+ }
54
+ function ChatShellDock({ className, ...props }) {
55
+ return /* @__PURE__ */ jsx(
56
+ "div",
57
+ {
58
+ "data-slot": "chat-shell-dock",
59
+ className: cn("sticky bottom-0 z-10 shrink-0 bg-(--chat-veil) pb-(--chat-gutter)", className),
60
+ ...props
61
+ }
62
+ );
63
+ }
64
+ function ChatShellScrollButton({ className, ...props }) {
65
+ return /* @__PURE__ */ jsx(
66
+ "div",
67
+ {
68
+ "data-slot": "chat-shell-scroll-button",
69
+ className: "pointer-events-none absolute inset-x-0 bottom-[calc(100%+0.5rem)] flex",
70
+ children: /* @__PURE__ */ jsx(ChatShellColumn, { className: "flex-row justify-center", children: /* @__PURE__ */ jsx(
71
+ MessageScrollerButton,
72
+ {
73
+ className: cn("pointer-events-auto static translate-x-0 rtl:translate-x-0", className),
74
+ ...props
75
+ }
76
+ ) })
77
+ }
78
+ );
79
+ }
80
+
81
+ const ChatShell = Object.assign(ChatShellRoot, {
82
+ Bar: ChatShellBar,
83
+ Column: ChatShellColumn,
84
+ Content: ChatShellContent,
85
+ Dock: ChatShellDock,
86
+ ScrollButton: ChatShellScrollButton,
87
+ Stage: ChatShellStage,
88
+ Viewport: ChatShellViewport
89
+ });
90
+
91
+ export { ChatShell };
92
+ //# sourceMappingURL=ChatShell.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatShell.es.js","sources":["../../src/ds/components/ChatShell/chat-shell.tsx","../../src/ds/components/ChatShell/index.ts"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\n\nimport {\n MessageScroller,\n MessageScrollerButton,\n MessageScrollerContent,\n MessageScrollerProvider,\n MessageScrollerViewport,\n} from '../MessageScroller';\nimport type {\n MessageScrollerButtonProps,\n MessageScrollerContentProps,\n MessageScrollerProviderProps,\n MessageScrollerViewportProps,\n} from '../MessageScroller';\n\nimport { cn } from '@/lib/utils';\n\nexport type ChatShellProps = ComponentPropsWithoutRef<'div'> & {\n scroller?: Omit<MessageScrollerProviderProps, 'children'>;\n};\n\n/**\n * A chat page frame with exactly one scroll container. Bars sit above it, the\n * composer docks inside it, every region shares one column.\n *\n * Tuned through custom properties, all defaulted here: `--chat-column` (column\n * width), `--chat-surface` (page colour), `--chat-gutter` (room above and below\n * the composer), `--chat-veil` (what the dock paints with), `--chat-inset-end`\n * (room an overlay panel claims on the end edge).\n */\nexport function ChatShellRoot({ className, scroller, ...props }: ChatShellProps) {\n return (\n <MessageScrollerProvider {...scroller}>\n <div\n data-slot=\"chat-shell\"\n className={cn(\n '@container relative isolate flex min-h-0 min-w-0 flex-col bg-(--chat-surface)',\n '[--chat-column:48rem] [--chat-gutter:0.75rem] [--chat-inset-end:0px]',\n '[--chat-surface:var(--color-surface2)]',\n '[--chat-veil:color-mix(in_oklab,var(--chat-surface)_70%,transparent)]',\n className,\n )}\n {...props}\n />\n </MessageScrollerProvider>\n );\n}\n\n/**\n * Full-width row above the scroller (session header, goal bar). No end inset: the\n * overlay panel it would dodge floats inside the stage, below the bars.\n */\nexport function ChatShellBar({ className, ...props }: ComponentPropsWithoutRef<'div'>) {\n return <div data-slot=\"chat-shell-bar\" className={cn('min-w-0 shrink-0', className)} {...props} />;\n}\n\n/** Positioned region holding the scroller plus anything overlaying it. */\nexport function ChatShellStage({ className, ...props }: ComponentPropsWithoutRef<'div'>) {\n return <MessageScroller className={cn('h-auto min-h-0 flex-1', className)} {...props} />;\n}\n\n/**\n * The one scroll container. It takes the end inset itself — on an ancestor the\n * same room would drag the scrollbar inward, off the true edge.\n */\nexport function ChatShellViewport({ className, children, ...props }: MessageScrollerViewportProps) {\n return (\n <MessageScrollerViewport\n className={cn(\n 'h-auto min-h-0 flex-1 pe-(--chat-inset-end)',\n 'transition-[padding] duration-360 ease-out-custom motion-reduce:transition-none',\n className,\n )}\n {...props}\n >\n {/* Sticky against the scroller itself is clamped to its box, not the\n scrolled height, and strands the dock mid-transcript. */}\n <div data-slot=\"chat-shell-track\" className=\"flex min-h-full min-w-0 flex-col\">\n {children}\n </div>\n </MessageScrollerViewport>\n );\n}\n\n/** Scrolling content. Its bottom padding is the unveiled air above the composer. */\nexport function ChatShellContent({ className, ...props }: MessageScrollerContentProps) {\n return <MessageScrollerContent className={cn('flex-1 pb-(--chat-gutter)', className)} {...props} />;\n}\n\n/** The shared reading column. Every chat region must go through it. */\nexport function ChatShellColumn({ className, ...props }: ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n data-slot=\"chat-shell-column\"\n className={cn('mx-auto flex w-full max-w-(--chat-column) min-w-0 flex-col px-3 md:px-5', className)}\n {...props}\n />\n );\n}\n\n/**\n * Composer region, sticky but left in flow: its own height reserves the room the\n * transcript scrolls behind, so nothing measures it and a composer growing under\n * the cursor resizes no box the scroller watches.\n *\n * The veil is a background, not an overlay, so it passes behind the composer card\n * and dims the transcript in its rounded corners too.\n */\nexport function ChatShellDock({ className, ...props }: ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n data-slot=\"chat-shell-dock\"\n className={cn('sticky bottom-0 z-10 shrink-0 bg-(--chat-veil) pb-(--chat-gutter)', className)}\n {...props}\n />\n );\n}\n\n/**\n * Jump-to-latest, floating just above the dock. It belongs inside the dock:\n * anywhere else it centres on a box the scrollbar has not narrowed, landing off\n * the composer's axis.\n */\nexport function ChatShellScrollButton({ className, ...props }: MessageScrollerButtonProps) {\n return (\n <div\n data-slot=\"chat-shell-scroll-button\"\n className=\"pointer-events-none absolute inset-x-0 bottom-[calc(100%+0.5rem)] flex\"\n >\n <ChatShellColumn className=\"flex-row justify-center\">\n <MessageScrollerButton\n className={cn('pointer-events-auto static translate-x-0 rtl:translate-x-0', className)}\n {...props}\n />\n </ChatShellColumn>\n </div>\n );\n}\n","import {\n ChatShellBar,\n ChatShellColumn,\n ChatShellContent,\n ChatShellDock,\n ChatShellRoot,\n ChatShellScrollButton,\n ChatShellStage,\n ChatShellViewport,\n} from './chat-shell';\n\nexport type { ChatShellProps } from './chat-shell';\n\nexport const ChatShell = Object.assign(ChatShellRoot, {\n Bar: ChatShellBar,\n Column: ChatShellColumn,\n Content: ChatShellContent,\n Dock: ChatShellDock,\n ScrollButton: ChatShellScrollButton,\n Stage: ChatShellStage,\n Viewport: ChatShellViewport,\n});\n"],"names":[],"mappings":";;;;AA+BO,SAAS,cAAc,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAmB;AAC/E,EAAA,uBACE,GAAA,CAAC,uBAAA,EAAA,EAAyB,GAAG,QAAA,EAC3B,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,YAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,+EAAA;AAAA,QACA,sEAAA;AAAA,QACA,wCAAA;AAAA,QACA,uEAAA;AAAA,QACA;AAAA,OACF;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AAEJ;AAUO,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAoC;AACtF,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,iBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,mEAAA,EAAqE,SAAS,CAAA;AAAA,MAC3F,GAAG;AAAA;AAAA,GACN;AAEJ;AAOO,SAAS,qBAAA,CAAsB,EAAE,SAAA,EAAW,GAAG,OAAM,EAA+B;AACzF,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,0BAAA;AAAA,MACV,SAAA,EAAU,wEAAA;AAAA,MAEV,QAAA,kBAAA,GAAA,CAAC,eAAA,EAAA,EAAgB,SAAA,EAAU,yBAAA,EACzB,QAAA,kBAAA,GAAA;AAAA,QAAC,qBAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,EAAA,CAAG,4DAAA,EAA8D,SAAS,CAAA;AAAA,UACpF,GAAG;AAAA;AAAA,OACN,EACF;AAAA;AAAA,GACF;AAEJ;;AC7HO,MAAM,SAAA,GAAY,MAAA,CAAO,MAAA,CAAO,aAAA,EAAe;AAAA,EACpD,GAAA,EAAK,YAAA;AAAA,EACL,MAAA,EAAQ,eAAA;AAAA,EACR,OAAA,EAAS,gBAAA;AAAA,EACT,IAAA,EAAM,aAAA;AAAA,EACN,YAAA,EAAc,qBAAA;AAAA,EACd,KAAA,EAAO,cAAA;AAAA,EACP,QAAA,EAAU;AACZ,CAAC;;;;"}
@@ -2,198 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const jsxRuntime = require('react/jsx-runtime');
6
- const cmdk = require('cmdk');
7
- const lucideReact = require('lucide-react');
8
- const React = require('react');
9
- const dialog = require('../dialog-ClItuCFY.cjs');
10
- const scrollArea = require('../scroll-area-Dv6QagXt.cjs');
11
- const primitives_transitions = require('../primitives/transitions.cjs.js');
12
- const utils_cn = require('../cn-vA5sWo9W.cjs');
5
+ const command = require('../command-qsEykgml.cjs');
13
6
 
14
- function _interopNamespaceDefault(e) {
15
- const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
16
- if (e) {
17
- for (const k in e) {
18
- if (k !== 'default') {
19
- const d = Object.getOwnPropertyDescriptor(e, k);
20
- Object.defineProperty(n, k, d.get ? d : {
21
- enumerable: true,
22
- get: () => e[k]
23
- });
24
- }
25
- }
26
- }
27
- n.default = e;
28
- return Object.freeze(n);
29
- }
30
7
 
31
- const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
32
8
 
33
- const Command = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
34
- cmdk.Command,
35
- {
36
- ref,
37
- className: utils_cn.cn("flex size-full flex-col overflow-hidden rounded-xl bg-surface3 text-neutral4", className),
38
- ...props
39
- }
40
- ));
41
- Command.displayName = cmdk.Command.displayName;
42
- const CommandDialog = ({
43
- children,
44
- title = "Command Palette",
45
- description = "Search for commands and actions",
46
- contentClassName,
47
- commandClassName,
48
- commandLabel,
49
- showOverlay = false,
50
- overlayClassName,
51
- ...props
52
- }) => {
53
- const filter = React__namespace.useCallback((value, search) => {
54
- const normalizedValue = value.toLowerCase();
55
- const normalizedSearch = search.toLowerCase();
56
- const searchTerms = normalizedSearch.split(/\s+/).filter(Boolean);
57
- const matches = searchTerms.every((term) => normalizedValue.includes(term));
58
- return matches ? 1 : 0;
59
- }, []);
60
- const handleKeyDown = React__namespace.useCallback((e) => {
61
- if (e.key === "Escape") return;
62
- e.stopPropagation();
63
- }, []);
64
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
65
- dialog.DialogContent,
66
- {
67
- showOverlay,
68
- overlayClassName,
69
- className: utils_cn.cn("overflow-hidden p-0", contentClassName),
70
- children: [
71
- /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { className: "sr-only", children: title }),
72
- /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogDescription, { className: "sr-only", children: description }),
73
- /* @__PURE__ */ jsxRuntime.jsx(
74
- Command,
75
- {
76
- label: commandLabel,
77
- loop: true,
78
- filter,
79
- onKeyDown: handleKeyDown,
80
- className: utils_cn.cn(
81
- "[&_[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:text-neutral3",
82
- "[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2",
83
- "[&_[data-slot=command-input-wrapper]_svg]:size-5",
84
- "**:[[cmdk-input]]:h-12",
85
- "**:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3",
86
- "[&_[cmdk-item]_svg]:size-5",
87
- commandClassName
88
- ),
89
- children
90
- }
91
- )
92
- ]
93
- }
94
- ) });
95
- };
96
- const CommandInput = React__namespace.forwardRef(
97
- ({ className, rightSlot, wrapperClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
98
- "div",
99
- {
100
- "data-slot": "command-input-wrapper",
101
- className: utils_cn.cn("flex items-center border-b border-border1 px-3", primitives_transitions.transitions.colors, wrapperClassName),
102
- children: [
103
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: utils_cn.cn("mr-2 size-4 shrink-0 text-neutral3", primitives_transitions.transitions.colors) }),
104
- /* @__PURE__ */ jsxRuntime.jsx(
105
- cmdk.Command.Input,
106
- {
107
- ref,
108
- className: utils_cn.cn(
109
- "flex h-10 min-w-0 flex-1 rounded-md bg-transparent py-3 text-ui-smd leading-ui-sm text-neutral6",
110
- "placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50",
111
- "outline-none focus:outline-none focus-visible:outline-none",
112
- primitives_transitions.transitions.colors,
113
- className
114
- ),
115
- ...props
116
- }
117
- ),
118
- rightSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "command-input-right-slot", className: "text-neutral3 ml-2 flex shrink-0 items-center", children: rightSlot })
119
- ]
120
- }
121
- )
122
- );
123
- CommandInput.displayName = cmdk.Command.Input.displayName;
124
- const CommandList = React__namespace.forwardRef(
125
- ({ className, scrollArea: scrollArea$1 = false, scrollAreaClassName, scrollAreaViewportClassName, scrollAreaMask, ...props }, ref) => {
126
- const list = /* @__PURE__ */ jsxRuntime.jsx(
127
- cmdk.Command.List,
128
- {
129
- ref,
130
- className: utils_cn.cn(
131
- "outline-none focus:outline-none focus-visible:outline-none",
132
- scrollArea$1 ? "overflow-visible" : "max-h-dropdown-max-height overflow-x-hidden overflow-y-auto",
133
- className
134
- ),
135
- ...props
136
- }
137
- );
138
- if (!scrollArea$1) return list;
139
- return /* @__PURE__ */ jsxRuntime.jsx(
140
- scrollArea.ScrollArea,
141
- {
142
- className: utils_cn.cn("min-h-0", scrollAreaClassName),
143
- viewPortClassName: scrollAreaViewportClassName,
144
- mask: scrollAreaMask,
145
- children: list
146
- }
147
- );
148
- }
149
- );
150
- CommandList.displayName = cmdk.Command.List.displayName;
151
- const CommandEmpty = React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { ref, className: "text-ui-smd text-neutral3 py-6 text-center", ...props }));
152
- CommandEmpty.displayName = cmdk.Command.Empty.displayName;
153
- const CommandGroup = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
154
- cmdk.Command.Group,
155
- {
156
- ref,
157
- className: utils_cn.cn(
158
- "overflow-hidden p-1 text-neutral4",
159
- "[&_[cmdk-group-heading]]:text-ui-xs [&_[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:pt-1.5 **:[[cmdk-group-heading]]:pb-1 **:[[cmdk-group-heading]]:tracking-wider **:[[cmdk-group-heading]]:text-neutral3 **:[[cmdk-group-heading]]:uppercase",
160
- className
161
- ),
162
- ...props
163
- }
164
- ));
165
- CommandGroup.displayName = cmdk.Command.Group.displayName;
166
- const CommandSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Separator, { ref, className: utils_cn.cn("-mx-1 h-px bg-border1", className), ...props }));
167
- CommandSeparator.displayName = cmdk.Command.Separator.displayName;
168
- const CommandItem = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
169
- cmdk.Command.Item,
170
- {
171
- ref,
172
- className: utils_cn.cn(
173
- "relative flex cursor-pointer items-center gap-2.5 rounded-lg px-2 py-1.5 text-ui-smd leading-ui-sm text-neutral4 select-none",
174
- "outline-none focus:outline-none focus-visible:outline-none",
175
- primitives_transitions.transitions.colors,
176
- "data-[selected=true]:bg-surface4 data-[selected=true]:text-neutral6",
177
- "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
178
- "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-neutral3 data-[selected=true]:[&_svg]:text-neutral6",
179
- className
180
- ),
181
- ...props
182
- }
183
- ));
184
- CommandItem.displayName = cmdk.Command.Item.displayName;
185
- const CommandShortcut = ({ className, ...props }) => {
186
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: utils_cn.cn("ml-auto text-ui-xs tracking-wider text-neutral3 tabular-nums", className), ...props });
187
- };
188
- CommandShortcut.displayName = "CommandShortcut";
189
-
190
- exports.Command = Command;
191
- exports.CommandDialog = CommandDialog;
192
- exports.CommandEmpty = CommandEmpty;
193
- exports.CommandGroup = CommandGroup;
194
- exports.CommandInput = CommandInput;
195
- exports.CommandItem = CommandItem;
196
- exports.CommandList = CommandList;
197
- exports.CommandSeparator = CommandSeparator;
198
- exports.CommandShortcut = CommandShortcut;
9
+ exports.Command = command.Command;
10
+ exports.CommandDialog = command.CommandDialog;
11
+ exports.CommandEmpty = command.CommandEmpty;
12
+ exports.CommandGroup = command.CommandGroup;
13
+ exports.CommandInput = command.CommandInput;
14
+ exports.CommandItem = command.CommandItem;
15
+ exports.CommandList = command.CommandList;
16
+ exports.CommandSeparator = command.CommandSeparator;
17
+ exports.CommandShortcut = command.CommandShortcut;
199
18
  //# sourceMappingURL=Command.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Command.cjs.js","sources":["../../src/ds/components/Command/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from '@/ds/components/Dialog';\nimport { ScrollArea } from '@/ds/components/ScrollArea';\nimport type { ScrollAreaMask } from '@/ds/components/ScrollArea';\nimport { transitions } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn('flex size-full flex-col overflow-hidden rounded-xl bg-surface3 text-neutral4', className)}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ntype CommandDialogProps = Omit<React.ComponentPropsWithoutRef<typeof Dialog>, 'children'> & {\n children?: React.ReactNode;\n title?: string;\n description?: string;\n contentClassName?: string;\n commandClassName?: string;\n commandLabel?: string;\n showOverlay?: boolean;\n overlayClassName?: string;\n};\n\nconst CommandDialog = ({\n children,\n title = 'Command Palette',\n description = 'Search for commands and actions',\n contentClassName,\n commandClassName,\n commandLabel,\n showOverlay = false,\n overlayClassName,\n ...props\n}: CommandDialogProps) => {\n // Custom filter that preserves DOM order by returning 1 for all matches\n // This prevents cmdk from reordering items by match score\n const filter = React.useCallback((value: string, search: string) => {\n const normalizedValue = value.toLowerCase();\n const normalizedSearch = search.toLowerCase();\n const searchTerms = normalizedSearch.split(/\\s+/).filter(Boolean);\n\n // All search terms must be found in the value\n const matches = searchTerms.every(term => normalizedValue.includes(term));\n return matches ? 1 : 0;\n }, []);\n\n // Stop propagation to prevent keyboard events from reaching\n // global document-level listeners (e.g., table keyboard nav)\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Escape') return;\n\n e.stopPropagation();\n }, []);\n\n return (\n <Dialog {...props}>\n <DialogContent\n showOverlay={showOverlay}\n overlayClassName={overlayClassName}\n className={cn('overflow-hidden p-0', contentClassName)}\n >\n <DialogTitle className=\"sr-only\">{title}</DialogTitle>\n <DialogDescription className=\"sr-only\">{description}</DialogDescription>\n <Command\n label={commandLabel}\n loop\n filter={filter}\n onKeyDown={handleKeyDown}\n className={cn(\n '[&_[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:text-neutral3',\n '[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2',\n '[&_[data-slot=command-input-wrapper]_svg]:size-5',\n '**:[[cmdk-input]]:h-12',\n '**:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3',\n '[&_[cmdk-item]_svg]:size-5',\n commandClassName,\n )}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\ntype CommandInputProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & {\n rightSlot?: React.ReactNode;\n wrapperClassName?: string;\n};\n\nconst CommandInput = React.forwardRef<React.ElementRef<typeof CommandPrimitive.Input>, CommandInputProps>(\n ({ className, rightSlot, wrapperClassName, ...props }, ref) => (\n <div\n data-slot=\"command-input-wrapper\"\n className={cn('flex items-center border-b border-border1 px-3', transitions.colors, wrapperClassName)}\n >\n <Search className={cn('mr-2 size-4 shrink-0 text-neutral3', transitions.colors)} />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-10 min-w-0 flex-1 rounded-md bg-transparent py-3 text-ui-smd leading-ui-sm text-neutral6',\n 'placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50',\n 'outline-none focus:outline-none focus-visible:outline-none',\n transitions.colors,\n className,\n )}\n {...props}\n />\n {rightSlot && (\n <div data-slot=\"command-input-right-slot\" className=\"text-neutral3 ml-2 flex shrink-0 items-center\">\n {rightSlot}\n </div>\n )}\n </div>\n ),\n);\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\ntype CommandListProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> & {\n scrollArea?: boolean;\n scrollAreaClassName?: string;\n scrollAreaViewportClassName?: string;\n scrollAreaMask?: ScrollAreaMask;\n};\n\nconst CommandList = React.forwardRef<React.ElementRef<typeof CommandPrimitive.List>, CommandListProps>(\n (\n { className, scrollArea = false, scrollAreaClassName, scrollAreaViewportClassName, scrollAreaMask, ...props },\n ref,\n ) => {\n const list = (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\n 'outline-none focus:outline-none focus-visible:outline-none',\n scrollArea ? 'overflow-visible' : 'max-h-dropdown-max-height overflow-x-hidden overflow-y-auto',\n className,\n )}\n {...props}\n />\n );\n\n if (!scrollArea) return list;\n\n return (\n <ScrollArea\n className={cn('min-h-0', scrollAreaClassName)}\n viewPortClassName={scrollAreaViewportClassName}\n mask={scrollAreaMask}\n >\n {list}\n </ScrollArea>\n );\n },\n);\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"text-ui-smd text-neutral3 py-6 text-center\" {...props} />\n));\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral4',\n '[&_[cmdk-group-heading]]:text-ui-xs [&_[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:pt-1.5 **:[[cmdk-group-heading]]:pb-1 **:[[cmdk-group-heading]]:tracking-wider **:[[cmdk-group-heading]]:text-neutral3 **:[[cmdk-group-heading]]:uppercase',\n className,\n )}\n {...props}\n />\n));\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('-mx-1 h-px bg-border1', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-pointer items-center gap-2.5 rounded-lg px-2 py-1.5 text-ui-smd leading-ui-sm text-neutral4 select-none',\n 'outline-none focus:outline-none focus-visible:outline-none',\n transitions.colors,\n 'data-[selected=true]:bg-surface4 data-[selected=true]:text-neutral6',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-neutral3 data-[selected=true]:[&_svg]:text-neutral6',\n className,\n )}\n {...props}\n />\n));\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-ui-xs tracking-wider text-neutral3 tabular-nums', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandSeparator,\n CommandShortcut,\n};\n"],"names":["React","jsx","CommandPrimitive","c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A,0EAAA;AAAA,MACA,8HAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,WAAA,CAAY,WAAA,GAAcP,aAAiB,IAAA,CAAK,WAAA;AAEhD,MAAM,kBAAkB,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,KAA6C;AAC1F,EAAA,uBAAOD,cAAA,CAAC,UAAK,SAAA,EAAWE,WAAA,CAAG,gEAAgE,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACpH;AACA,eAAA,CAAgB,WAAA,GAAc,iBAAA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Command.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -1,168 +1,2 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { Command as Command$1 } from 'cmdk';
3
- import { Search } from 'lucide-react';
4
- import * as React from 'react';
5
- import { D as Dialog, c as DialogContent, i as DialogTitle, d as DialogDescription } from '../dialog-bnt6epW2.js';
6
- import { S as ScrollArea } from '../scroll-area-DZrEuKjC.js';
7
- import { transitions } from '../primitives/transitions.es.js';
8
- import { c as cn } from '../cn-BakJzhuv.js';
9
-
10
- const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
11
- Command$1,
12
- {
13
- ref,
14
- className: cn("flex size-full flex-col overflow-hidden rounded-xl bg-surface3 text-neutral4", className),
15
- ...props
16
- }
17
- ));
18
- Command.displayName = Command$1.displayName;
19
- const CommandDialog = ({
20
- children,
21
- title = "Command Palette",
22
- description = "Search for commands and actions",
23
- contentClassName,
24
- commandClassName,
25
- commandLabel,
26
- showOverlay = false,
27
- overlayClassName,
28
- ...props
29
- }) => {
30
- const filter = React.useCallback((value, search) => {
31
- const normalizedValue = value.toLowerCase();
32
- const normalizedSearch = search.toLowerCase();
33
- const searchTerms = normalizedSearch.split(/\s+/).filter(Boolean);
34
- const matches = searchTerms.every((term) => normalizedValue.includes(term));
35
- return matches ? 1 : 0;
36
- }, []);
37
- const handleKeyDown = React.useCallback((e) => {
38
- if (e.key === "Escape") return;
39
- e.stopPropagation();
40
- }, []);
41
- return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxs(
42
- DialogContent,
43
- {
44
- showOverlay,
45
- overlayClassName,
46
- className: cn("overflow-hidden p-0", contentClassName),
47
- children: [
48
- /* @__PURE__ */ jsx(DialogTitle, { className: "sr-only", children: title }),
49
- /* @__PURE__ */ jsx(DialogDescription, { className: "sr-only", children: description }),
50
- /* @__PURE__ */ jsx(
51
- Command,
52
- {
53
- label: commandLabel,
54
- loop: true,
55
- filter,
56
- onKeyDown: handleKeyDown,
57
- className: cn(
58
- "[&_[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:text-neutral3",
59
- "[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2",
60
- "[&_[data-slot=command-input-wrapper]_svg]:size-5",
61
- "**:[[cmdk-input]]:h-12",
62
- "**:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3",
63
- "[&_[cmdk-item]_svg]:size-5",
64
- commandClassName
65
- ),
66
- children
67
- }
68
- )
69
- ]
70
- }
71
- ) });
72
- };
73
- const CommandInput = React.forwardRef(
74
- ({ className, rightSlot, wrapperClassName, ...props }, ref) => /* @__PURE__ */ jsxs(
75
- "div",
76
- {
77
- "data-slot": "command-input-wrapper",
78
- className: cn("flex items-center border-b border-border1 px-3", transitions.colors, wrapperClassName),
79
- children: [
80
- /* @__PURE__ */ jsx(Search, { className: cn("mr-2 size-4 shrink-0 text-neutral3", transitions.colors) }),
81
- /* @__PURE__ */ jsx(
82
- Command$1.Input,
83
- {
84
- ref,
85
- className: cn(
86
- "flex h-10 min-w-0 flex-1 rounded-md bg-transparent py-3 text-ui-smd leading-ui-sm text-neutral6",
87
- "placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50",
88
- "outline-none focus:outline-none focus-visible:outline-none",
89
- transitions.colors,
90
- className
91
- ),
92
- ...props
93
- }
94
- ),
95
- rightSlot && /* @__PURE__ */ jsx("div", { "data-slot": "command-input-right-slot", className: "text-neutral3 ml-2 flex shrink-0 items-center", children: rightSlot })
96
- ]
97
- }
98
- )
99
- );
100
- CommandInput.displayName = Command$1.Input.displayName;
101
- const CommandList = React.forwardRef(
102
- ({ className, scrollArea = false, scrollAreaClassName, scrollAreaViewportClassName, scrollAreaMask, ...props }, ref) => {
103
- const list = /* @__PURE__ */ jsx(
104
- Command$1.List,
105
- {
106
- ref,
107
- className: cn(
108
- "outline-none focus:outline-none focus-visible:outline-none",
109
- scrollArea ? "overflow-visible" : "max-h-dropdown-max-height overflow-x-hidden overflow-y-auto",
110
- className
111
- ),
112
- ...props
113
- }
114
- );
115
- if (!scrollArea) return list;
116
- return /* @__PURE__ */ jsx(
117
- ScrollArea,
118
- {
119
- className: cn("min-h-0", scrollAreaClassName),
120
- viewPortClassName: scrollAreaViewportClassName,
121
- mask: scrollAreaMask,
122
- children: list
123
- }
124
- );
125
- }
126
- );
127
- CommandList.displayName = Command$1.List.displayName;
128
- const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(Command$1.Empty, { ref, className: "text-ui-smd text-neutral3 py-6 text-center", ...props }));
129
- CommandEmpty.displayName = Command$1.Empty.displayName;
130
- const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
131
- Command$1.Group,
132
- {
133
- ref,
134
- className: cn(
135
- "overflow-hidden p-1 text-neutral4",
136
- "[&_[cmdk-group-heading]]:text-ui-xs [&_[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:pt-1.5 **:[[cmdk-group-heading]]:pb-1 **:[[cmdk-group-heading]]:tracking-wider **:[[cmdk-group-heading]]:text-neutral3 **:[[cmdk-group-heading]]:uppercase",
137
- className
138
- ),
139
- ...props
140
- }
141
- ));
142
- CommandGroup.displayName = Command$1.Group.displayName;
143
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Separator, { ref, className: cn("-mx-1 h-px bg-border1", className), ...props }));
144
- CommandSeparator.displayName = Command$1.Separator.displayName;
145
- const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
146
- Command$1.Item,
147
- {
148
- ref,
149
- className: cn(
150
- "relative flex cursor-pointer items-center gap-2.5 rounded-lg px-2 py-1.5 text-ui-smd leading-ui-sm text-neutral4 select-none",
151
- "outline-none focus:outline-none focus-visible:outline-none",
152
- transitions.colors,
153
- "data-[selected=true]:bg-surface4 data-[selected=true]:text-neutral6",
154
- "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
155
- "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-neutral3 data-[selected=true]:[&_svg]:text-neutral6",
156
- className
157
- ),
158
- ...props
159
- }
160
- ));
161
- CommandItem.displayName = Command$1.Item.displayName;
162
- const CommandShortcut = ({ className, ...props }) => {
163
- return /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-xs tracking-wider text-neutral3 tabular-nums", className), ...props });
164
- };
165
- CommandShortcut.displayName = "CommandShortcut";
166
-
167
- export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
1
+ export { C as Command, a as CommandDialog, b as CommandEmpty, c as CommandGroup, d as CommandInput, e as CommandItem, f as CommandList, g as CommandSeparator, h as CommandShortcut } from '../command-Duq1xsiS.js';
168
2
  //# sourceMappingURL=Command.es.js.map