@epicbagel/saas-kit 1.0.0 → 1.1.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.
Files changed (120) hide show
  1. package/README.md +38 -1
  2. package/THIRD_PARTY_NOTICES.md +13 -7
  3. package/dist/chunk-2AU7ZRGX.cjs +96 -0
  4. package/dist/chunk-2BTDBZYN.cjs +154 -0
  5. package/dist/chunk-2HV2KKOE.cjs +38 -0
  6. package/dist/chunk-2KFZQJH5.cjs +29 -0
  7. package/dist/chunk-32Q4XOTU.cjs +204 -0
  8. package/dist/chunk-42RTTHND.js +29 -0
  9. package/dist/chunk-6FC65AZQ.js +38 -0
  10. package/dist/chunk-6V4XMQ6D.js +118 -0
  11. package/dist/chunk-B765DSRG.cjs +66 -0
  12. package/dist/chunk-ELPV44S6.cjs +44 -0
  13. package/dist/chunk-EOUO3ORO.cjs +244 -0
  14. package/dist/chunk-EZCKWTH7.js +204 -0
  15. package/dist/chunk-F366BHWH.js +116 -0
  16. package/dist/chunk-GFG2R5BZ.js +132 -0
  17. package/dist/chunk-HAC32ALJ.js +244 -0
  18. package/dist/chunk-I5UQSBBZ.cjs +118 -0
  19. package/dist/chunk-INNGGLMZ.js +44 -0
  20. package/dist/chunk-IW4ZIXXG.js +66 -0
  21. package/dist/chunk-JZOBIPFC.js +96 -0
  22. package/dist/chunk-KENBU3NV.cjs +27 -0
  23. package/dist/chunk-MHYAVXOE.js +159 -0
  24. package/dist/chunk-RIWLAMME.cjs +159 -0
  25. package/dist/chunk-SUB4BAYE.cjs +73 -0
  26. package/dist/chunk-THWIJG5C.js +73 -0
  27. package/dist/chunk-V4YWTRLD.cjs +116 -0
  28. package/dist/chunk-VY5U4VGV.js +27 -0
  29. package/dist/chunk-XABXUP6L.cjs +132 -0
  30. package/dist/chunk-Z45YKVAM.js +154 -0
  31. package/dist/primitives/action-dock.cjs +8 -0
  32. package/dist/primitives/action-dock.d.cts +10 -0
  33. package/dist/primitives/action-dock.d.ts +10 -0
  34. package/dist/primitives/action-dock.js +8 -0
  35. package/dist/primitives/alert.d.cts +1 -1
  36. package/dist/primitives/alert.d.ts +1 -1
  37. package/dist/primitives/attachment.cjs +25 -203
  38. package/dist/primitives/attachment.d.cts +1 -1
  39. package/dist/primitives/attachment.d.ts +1 -1
  40. package/dist/primitives/attachment.js +12 -190
  41. package/dist/primitives/badge.d.cts +1 -1
  42. package/dist/primitives/badge.d.ts +1 -1
  43. package/dist/primitives/board-view.cjs +3 -3
  44. package/dist/primitives/board-view.js +2 -2
  45. package/dist/primitives/bubble.cjs +14 -0
  46. package/dist/primitives/bubble.d.cts +21 -0
  47. package/dist/primitives/bubble.d.ts +21 -0
  48. package/dist/primitives/bubble.js +14 -0
  49. package/dist/primitives/button.d.cts +2 -2
  50. package/dist/primitives/button.d.ts +2 -2
  51. package/dist/primitives/chat.cjs +864 -0
  52. package/dist/primitives/chat.d.cts +326 -0
  53. package/dist/primitives/chat.d.ts +326 -0
  54. package/dist/primitives/chat.js +864 -0
  55. package/dist/primitives/connection.cjs +6 -6
  56. package/dist/primitives/connection.js +7 -7
  57. package/dist/primitives/file-dropzone.cjs +7 -113
  58. package/dist/primitives/file-dropzone.js +6 -112
  59. package/dist/primitives/input-group.cjs +21 -0
  60. package/dist/primitives/input-group.d.cts +20 -0
  61. package/dist/primitives/input-group.d.ts +20 -0
  62. package/dist/primitives/input-group.js +21 -0
  63. package/dist/primitives/item.cjs +197 -0
  64. package/dist/primitives/item.d.cts +28 -0
  65. package/dist/primitives/item.d.ts +28 -0
  66. package/dist/primitives/item.js +197 -0
  67. package/dist/primitives/lazy-markdown.cjs +10 -0
  68. package/dist/primitives/lazy-markdown.d.cts +20 -0
  69. package/dist/primitives/lazy-markdown.d.ts +20 -0
  70. package/dist/primitives/lazy-markdown.js +10 -0
  71. package/dist/primitives/markdown.cjs +17 -0
  72. package/dist/primitives/markdown.d.cts +32 -0
  73. package/dist/primitives/markdown.d.ts +32 -0
  74. package/dist/primitives/markdown.js +17 -0
  75. package/dist/primitives/marker.cjs +14 -0
  76. package/dist/primitives/marker.d.cts +15 -0
  77. package/dist/primitives/marker.d.ts +15 -0
  78. package/dist/primitives/marker.js +14 -0
  79. package/dist/primitives/message-scroller.cjs +26 -0
  80. package/dist/primitives/message-scroller.d.cts +16 -0
  81. package/dist/primitives/message-scroller.d.ts +16 -0
  82. package/dist/primitives/message-scroller.js +26 -0
  83. package/dist/primitives/message.cjs +7 -84
  84. package/dist/primitives/message.js +8 -85
  85. package/dist/primitives/resource-list.cjs +3 -3
  86. package/dist/primitives/resource-list.js +2 -2
  87. package/dist/primitives/rich-text.cjs +3 -38
  88. package/dist/primitives/rich-text.js +3 -38
  89. package/dist/primitives/section-header.d.cts +1 -1
  90. package/dist/primitives/section-header.d.ts +1 -1
  91. package/dist/primitives/spinner.cjs +23 -0
  92. package/dist/primitives/spinner.d.cts +6 -0
  93. package/dist/primitives/spinner.d.ts +6 -0
  94. package/dist/primitives/spinner.js +23 -0
  95. package/dist/primitives/suggestion.cjs +11 -0
  96. package/dist/primitives/suggestion.d.cts +19 -0
  97. package/dist/primitives/suggestion.d.ts +19 -0
  98. package/dist/primitives/suggestion.js +11 -0
  99. package/dist/primitives/switch-field.cjs +2 -2
  100. package/dist/primitives/switch-field.js +3 -3
  101. package/dist/primitives/textarea.cjs +4 -33
  102. package/dist/primitives/textarea.js +3 -32
  103. package/dist/primitives/toggle-group.d.cts +2 -2
  104. package/dist/primitives/toggle-group.d.ts +2 -2
  105. package/dist/primitives/toggle.d.cts +2 -2
  106. package/dist/primitives/toggle.d.ts +2 -2
  107. package/dist/primitives/trace.cjs +23 -0
  108. package/dist/primitives/trace.d.cts +22 -0
  109. package/dist/primitives/trace.d.ts +22 -0
  110. package/dist/primitives/trace.js +23 -0
  111. package/dist/primitives/voice-dictation-button.cjs +5 -239
  112. package/dist/primitives/voice-dictation-button.js +4 -238
  113. package/package.json +125 -2
  114. package/src/styles/components/bubble.css +81 -0
  115. package/src/styles/components/marker.css +27 -0
  116. package/src/styles/components/message-scroller.css +11 -0
  117. package/src/styles/components.css +3 -0
  118. package/src/styles/utilities.css +3 -2
  119. package/dist/{chunk-UGF2K6NR.js → chunk-HRLP4BHJ.js} +6 -6
  120. package/dist/{chunk-RWWOFWLP.cjs → chunk-IH3COANJ.cjs} +3 -3
@@ -0,0 +1,66 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-G6SRSWXB.js";
5
+
6
+ // src/primitives/marker.tsx
7
+ import { cva } from "class-variance-authority";
8
+ import { Slot } from "radix-ui";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var markerVariants = cva(
11
+ "cn-marker group/marker relative flex w-full items-center",
12
+ {
13
+ variants: {
14
+ variant: {
15
+ default: "cn-marker-variant-default",
16
+ separator: "cn-marker-variant-separator",
17
+ border: "cn-marker-variant-border"
18
+ }
19
+ }
20
+ }
21
+ );
22
+ function Marker({
23
+ className,
24
+ variant = "default",
25
+ asChild = false,
26
+ ...props
27
+ }) {
28
+ const Comp = asChild ? Slot.Root : "div";
29
+ return /* @__PURE__ */ jsx(
30
+ Comp,
31
+ {
32
+ "data-slot": "marker",
33
+ "data-variant": variant,
34
+ className: cn(markerVariants({ variant, className })),
35
+ ...props
36
+ }
37
+ );
38
+ }
39
+ function MarkerIcon({ className, ...props }) {
40
+ return /* @__PURE__ */ jsx(
41
+ "span",
42
+ {
43
+ "data-slot": "marker-icon",
44
+ "aria-hidden": "true",
45
+ className: cn("cn-marker-icon shrink-0", className),
46
+ ...props
47
+ }
48
+ );
49
+ }
50
+ function MarkerContent({ className, ...props }) {
51
+ return /* @__PURE__ */ jsx(
52
+ "span",
53
+ {
54
+ "data-slot": "marker-content",
55
+ className: cn("cn-marker-content min-w-0 wrap-break-word", className),
56
+ ...props
57
+ }
58
+ );
59
+ }
60
+
61
+ export {
62
+ markerVariants,
63
+ Marker,
64
+ MarkerIcon,
65
+ MarkerContent
66
+ };
@@ -0,0 +1,96 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-G6SRSWXB.js";
5
+
6
+ // src/primitives/message.tsx
7
+ import { jsx } from "react/jsx-runtime";
8
+ function MessageGroup({ className, ...props }) {
9
+ return /* @__PURE__ */ jsx(
10
+ "div",
11
+ {
12
+ "data-slot": "message-group",
13
+ className: cn("cn-message-group flex min-w-0 flex-col", className),
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ function Message({
19
+ className,
20
+ align = "start",
21
+ ...props
22
+ }) {
23
+ return /* @__PURE__ */ jsx(
24
+ "div",
25
+ {
26
+ "data-slot": "message",
27
+ "data-align": align,
28
+ className: cn(
29
+ "cn-message group/message relative flex w-full min-w-0 data-[align=end]:flex-row-reverse",
30
+ className
31
+ ),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ function MessageAvatar({ className, ...props }) {
37
+ return /* @__PURE__ */ jsx(
38
+ "div",
39
+ {
40
+ "data-slot": "message-avatar",
41
+ className: cn(
42
+ "cn-message-avatar flex w-fit shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ );
48
+ }
49
+ function MessageContent({ className, ...props }) {
50
+ return /* @__PURE__ */ jsx(
51
+ "div",
52
+ {
53
+ "data-slot": "message-content",
54
+ className: cn(
55
+ "cn-message-content flex w-full min-w-0 flex-col wrap-break-word",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ );
61
+ }
62
+ function MessageHeader({ className, ...props }) {
63
+ return /* @__PURE__ */ jsx(
64
+ "div",
65
+ {
66
+ "data-slot": "message-header",
67
+ className: cn(
68
+ "cn-message-header flex max-w-full min-w-0 items-center",
69
+ className
70
+ ),
71
+ ...props
72
+ }
73
+ );
74
+ }
75
+ function MessageFooter({ className, ...props }) {
76
+ return /* @__PURE__ */ jsx(
77
+ "div",
78
+ {
79
+ "data-slot": "message-footer",
80
+ className: cn(
81
+ "cn-message-footer flex max-w-full min-w-0 items-center group-data-[align=end]/message:justify-end",
82
+ className
83
+ ),
84
+ ...props
85
+ }
86
+ );
87
+ }
88
+
89
+ export {
90
+ MessageGroup,
91
+ Message,
92
+ MessageAvatar,
93
+ MessageContent,
94
+ MessageHeader,
95
+ MessageFooter
96
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
+
3
+
4
+ var _chunkELPV44S6cjs = require('./chunk-ELPV44S6.cjs');
5
+
6
+
7
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
8
+
9
+ // src/primitives/lazy-markdown.tsx
10
+ var _react = require('react');
11
+ var _jsxruntime = require('react/jsx-runtime');
12
+ var Markdown = _react.lazy.call(void 0,
13
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./primitives/markdown.cjs"))).then((module) => ({ default: module.Markdown }))
14
+ );
15
+ function LazyMarkdown({ children, components, className, ...props }) {
16
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
17
+ _react.Suspense,
18
+ {
19
+ fallback: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkELPV44S6cjs.RichText, { ...props, className: _chunkKWLSBTB2cjs.cn.call(void 0, "whitespace-pre-wrap", className), children }),
20
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Markdown, { ...props, className, components, children })
21
+ }
22
+ );
23
+ }
24
+
25
+
26
+
27
+ exports.LazyMarkdown = LazyMarkdown;
@@ -0,0 +1,159 @@
1
+ "use client";
2
+ import {
3
+ Textarea
4
+ } from "./chunk-6FC65AZQ.js";
5
+ import {
6
+ Input
7
+ } from "./chunk-QMA3WVB7.js";
8
+ import {
9
+ Button
10
+ } from "./chunk-HQRWRRZJ.js";
11
+ import {
12
+ cn
13
+ } from "./chunk-G6SRSWXB.js";
14
+
15
+ // src/primitives/input-group.tsx
16
+ import { cva } from "class-variance-authority";
17
+ import { jsx } from "react/jsx-runtime";
18
+ function InputGroup({ className, ...props }) {
19
+ return /* @__PURE__ */ jsx(
20
+ "div",
21
+ {
22
+ "data-slot": "input-group",
23
+ role: "group",
24
+ className: cn(
25
+ "group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
26
+ className
27
+ ),
28
+ ...props
29
+ }
30
+ );
31
+ }
32
+ var inputGroupAddonVariants = cva(
33
+ "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
34
+ {
35
+ variants: {
36
+ align: {
37
+ "inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
38
+ "inline-end": "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
39
+ "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
40
+ "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
41
+ }
42
+ },
43
+ defaultVariants: {
44
+ align: "inline-start"
45
+ }
46
+ }
47
+ );
48
+ function InputGroupAddon({
49
+ className,
50
+ align = "inline-start",
51
+ ...props
52
+ }) {
53
+ return /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ role: "group",
57
+ "data-slot": "input-group-addon",
58
+ "data-align": align,
59
+ className: cn(inputGroupAddonVariants({ align }), className),
60
+ onClick: (e) => {
61
+ if (e.target.closest("button")) {
62
+ return;
63
+ }
64
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
65
+ },
66
+ ...props
67
+ }
68
+ );
69
+ }
70
+ var inputGroupButtonVariants = cva(
71
+ "flex items-center gap-2 text-sm shadow-none",
72
+ {
73
+ variants: {
74
+ size: {
75
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
76
+ sm: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
77
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
78
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
79
+ }
80
+ },
81
+ defaultVariants: {
82
+ size: "xs"
83
+ }
84
+ }
85
+ );
86
+ function InputGroupButton({
87
+ className,
88
+ type = "button",
89
+ variant = "ghost",
90
+ size = "xs",
91
+ ...props
92
+ }) {
93
+ return /* @__PURE__ */ jsx(
94
+ Button,
95
+ {
96
+ type,
97
+ size: "bare",
98
+ "data-size": size,
99
+ variant,
100
+ className: cn(inputGroupButtonVariants({ size }), className),
101
+ ...props
102
+ }
103
+ );
104
+ }
105
+ function InputGroupText({ className, ...props }) {
106
+ return /* @__PURE__ */ jsx(
107
+ "span",
108
+ {
109
+ className: cn(
110
+ "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
111
+ className
112
+ ),
113
+ ...props
114
+ }
115
+ );
116
+ }
117
+ function InputGroupInput({
118
+ className,
119
+ ...props
120
+ }) {
121
+ return /* @__PURE__ */ jsx(
122
+ Input,
123
+ {
124
+ "data-slot": "input-group-control",
125
+ controlSize: "sm",
126
+ surface: "ghost",
127
+ className: cn(
128
+ "min-w-0 flex-1 rounded-none border-0 bg-transparent px-2.5 py-1 shadow-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 aria-invalid:ring-0 dark:bg-transparent",
129
+ className
130
+ ),
131
+ ...props
132
+ }
133
+ );
134
+ }
135
+ function InputGroupTextarea({
136
+ className,
137
+ ...props
138
+ }) {
139
+ return /* @__PURE__ */ jsx(
140
+ Textarea,
141
+ {
142
+ "data-slot": "input-group-control",
143
+ className: cn(
144
+ "field-sizing-content min-h-16 flex-1 resize-none rounded-none border-0 bg-transparent px-2.5 py-2 shadow-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 aria-invalid:ring-0 dark:bg-transparent",
145
+ className
146
+ ),
147
+ ...props
148
+ }
149
+ );
150
+ }
151
+
152
+ export {
153
+ InputGroup,
154
+ InputGroupAddon,
155
+ InputGroupButton,
156
+ InputGroupText,
157
+ InputGroupInput,
158
+ InputGroupTextarea
159
+ };
@@ -0,0 +1,159 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
+
3
+
4
+ var _chunk2HV2KKOEcjs = require('./chunk-2HV2KKOE.cjs');
5
+
6
+
7
+ var _chunkPQUSJEXLcjs = require('./chunk-PQUSJEXL.cjs');
8
+
9
+
10
+ var _chunkL4DH72UFcjs = require('./chunk-L4DH72UF.cjs');
11
+
12
+
13
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
14
+
15
+ // src/primitives/input-group.tsx
16
+ var _classvarianceauthority = require('class-variance-authority');
17
+ var _jsxruntime = require('react/jsx-runtime');
18
+ function InputGroup({ className, ...props }) {
19
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
20
+ "div",
21
+ {
22
+ "data-slot": "input-group",
23
+ role: "group",
24
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
25
+ "group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
26
+ className
27
+ ),
28
+ ...props
29
+ }
30
+ );
31
+ }
32
+ var inputGroupAddonVariants = _classvarianceauthority.cva.call(void 0,
33
+ "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
34
+ {
35
+ variants: {
36
+ align: {
37
+ "inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
38
+ "inline-end": "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
39
+ "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
40
+ "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
41
+ }
42
+ },
43
+ defaultVariants: {
44
+ align: "inline-start"
45
+ }
46
+ }
47
+ );
48
+ function InputGroupAddon({
49
+ className,
50
+ align = "inline-start",
51
+ ...props
52
+ }) {
53
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
54
+ "div",
55
+ {
56
+ role: "group",
57
+ "data-slot": "input-group-addon",
58
+ "data-align": align,
59
+ className: _chunkKWLSBTB2cjs.cn.call(void 0, inputGroupAddonVariants({ align }), className),
60
+ onClick: (e) => {
61
+ if (e.target.closest("button")) {
62
+ return;
63
+ }
64
+ _optionalChain([e, 'access', _ => _.currentTarget, 'access', _2 => _2.parentElement, 'optionalAccess', _3 => _3.querySelector, 'call', _4 => _4("input"), 'optionalAccess', _5 => _5.focus, 'call', _6 => _6()]);
65
+ },
66
+ ...props
67
+ }
68
+ );
69
+ }
70
+ var inputGroupButtonVariants = _classvarianceauthority.cva.call(void 0,
71
+ "flex items-center gap-2 text-sm shadow-none",
72
+ {
73
+ variants: {
74
+ size: {
75
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
76
+ sm: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
77
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
78
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
79
+ }
80
+ },
81
+ defaultVariants: {
82
+ size: "xs"
83
+ }
84
+ }
85
+ );
86
+ function InputGroupButton({
87
+ className,
88
+ type = "button",
89
+ variant = "ghost",
90
+ size = "xs",
91
+ ...props
92
+ }) {
93
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
94
+ _chunkL4DH72UFcjs.Button,
95
+ {
96
+ type,
97
+ size: "bare",
98
+ "data-size": size,
99
+ variant,
100
+ className: _chunkKWLSBTB2cjs.cn.call(void 0, inputGroupButtonVariants({ size }), className),
101
+ ...props
102
+ }
103
+ );
104
+ }
105
+ function InputGroupText({ className, ...props }) {
106
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
107
+ "span",
108
+ {
109
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
110
+ "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
111
+ className
112
+ ),
113
+ ...props
114
+ }
115
+ );
116
+ }
117
+ function InputGroupInput({
118
+ className,
119
+ ...props
120
+ }) {
121
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
122
+ _chunkPQUSJEXLcjs.Input,
123
+ {
124
+ "data-slot": "input-group-control",
125
+ controlSize: "sm",
126
+ surface: "ghost",
127
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
128
+ "min-w-0 flex-1 rounded-none border-0 bg-transparent px-2.5 py-1 shadow-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 aria-invalid:ring-0 dark:bg-transparent",
129
+ className
130
+ ),
131
+ ...props
132
+ }
133
+ );
134
+ }
135
+ function InputGroupTextarea({
136
+ className,
137
+ ...props
138
+ }) {
139
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
140
+ _chunk2HV2KKOEcjs.Textarea,
141
+ {
142
+ "data-slot": "input-group-control",
143
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
144
+ "field-sizing-content min-h-16 flex-1 resize-none rounded-none border-0 bg-transparent px-2.5 py-2 shadow-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 aria-invalid:ring-0 dark:bg-transparent",
145
+ className
146
+ ),
147
+ ...props
148
+ }
149
+ );
150
+ }
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea;
@@ -0,0 +1,73 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
+
3
+
4
+ var _chunkL4DH72UFcjs = require('./chunk-L4DH72UF.cjs');
5
+
6
+
7
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
8
+
9
+ // src/primitives/suggestion.tsx
10
+ var _classvarianceauthority = require('class-variance-authority');
11
+ var _jsxruntime = require('react/jsx-runtime');
12
+ var suggestionsVariants = _classvarianceauthority.cva.call(void 0, "group/suggestions", {
13
+ variants: {
14
+ layout: {
15
+ row: "flex scroll-fade-x scrollbar-none gap-2 overflow-x-auto overscroll-x-contain",
16
+ wrap: "flex flex-wrap gap-2",
17
+ grid: "grid grid-cols-2 gap-2"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ layout: "row"
22
+ }
23
+ });
24
+ function Suggestions({
25
+ className,
26
+ layout = "row",
27
+ ...props
28
+ }) {
29
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
30
+ "div",
31
+ {
32
+ "data-slot": "suggestions",
33
+ "data-layout": layout,
34
+ className: _chunkKWLSBTB2cjs.cn.call(void 0, suggestionsVariants({ layout }), className),
35
+ ...props
36
+ }
37
+ );
38
+ }
39
+ function Suggestion({
40
+ suggestion,
41
+ onClick,
42
+ className,
43
+ children,
44
+ type = "button",
45
+ variant = "outline",
46
+ size = "sm",
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
50
+ _chunkL4DH72UFcjs.Button,
51
+ {
52
+ type,
53
+ "data-slot": "suggestion",
54
+ variant,
55
+ size,
56
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
57
+ "shrink-0 group-data-[layout=grid]/suggestions:justify-start group-data-[layout=grid]/suggestions:text-left group-data-[layout=grid]/suggestions:leading-snug group-data-[layout=grid]/suggestions:whitespace-normal",
58
+ // A prompt longer than the line wraps inside its chip rather than
59
+ // running out of the row.
60
+ "group-data-[layout=wrap]/suggestions:max-w-full group-data-[layout=wrap]/suggestions:text-left group-data-[layout=wrap]/suggestions:whitespace-normal",
61
+ className
62
+ ),
63
+ onClick: () => _optionalChain([onClick, 'optionalCall', _ => _(suggestion)]),
64
+ ...props,
65
+ children: _nullishCoalesce(children, () => ( suggestion))
66
+ }
67
+ );
68
+ }
69
+
70
+
71
+
72
+
73
+ exports.Suggestions = Suggestions; exports.Suggestion = Suggestion;
@@ -0,0 +1,73 @@
1
+ "use client";
2
+ import {
3
+ Button
4
+ } from "./chunk-HQRWRRZJ.js";
5
+ import {
6
+ cn
7
+ } from "./chunk-G6SRSWXB.js";
8
+
9
+ // src/primitives/suggestion.tsx
10
+ import { cva } from "class-variance-authority";
11
+ import { jsx } from "react/jsx-runtime";
12
+ var suggestionsVariants = cva("group/suggestions", {
13
+ variants: {
14
+ layout: {
15
+ row: "flex scroll-fade-x scrollbar-none gap-2 overflow-x-auto overscroll-x-contain",
16
+ wrap: "flex flex-wrap gap-2",
17
+ grid: "grid grid-cols-2 gap-2"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ layout: "row"
22
+ }
23
+ });
24
+ function Suggestions({
25
+ className,
26
+ layout = "row",
27
+ ...props
28
+ }) {
29
+ return /* @__PURE__ */ jsx(
30
+ "div",
31
+ {
32
+ "data-slot": "suggestions",
33
+ "data-layout": layout,
34
+ className: cn(suggestionsVariants({ layout }), className),
35
+ ...props
36
+ }
37
+ );
38
+ }
39
+ function Suggestion({
40
+ suggestion,
41
+ onClick,
42
+ className,
43
+ children,
44
+ type = "button",
45
+ variant = "outline",
46
+ size = "sm",
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ jsx(
50
+ Button,
51
+ {
52
+ type,
53
+ "data-slot": "suggestion",
54
+ variant,
55
+ size,
56
+ className: cn(
57
+ "shrink-0 group-data-[layout=grid]/suggestions:justify-start group-data-[layout=grid]/suggestions:text-left group-data-[layout=grid]/suggestions:leading-snug group-data-[layout=grid]/suggestions:whitespace-normal",
58
+ // A prompt longer than the line wraps inside its chip rather than
59
+ // running out of the row.
60
+ "group-data-[layout=wrap]/suggestions:max-w-full group-data-[layout=wrap]/suggestions:text-left group-data-[layout=wrap]/suggestions:whitespace-normal",
61
+ className
62
+ ),
63
+ onClick: () => onClick?.(suggestion),
64
+ ...props,
65
+ children: children ?? suggestion
66
+ }
67
+ );
68
+ }
69
+
70
+ export {
71
+ Suggestions,
72
+ Suggestion
73
+ };