orbital-ds 0.30.0 → 0.35.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 (156) hide show
  1. package/AGENTS.md +1 -1
  2. package/components.manifest.json +3216 -3160
  3. package/dist/hooks/use-ds-messages.d.ts +39 -0
  4. package/dist/lib/i18n.d.ts +39 -0
  5. package/dist/lib/i18n.js +117 -0
  6. package/dist/lib/template-syntax.d.ts +22 -0
  7. package/dist/lib/template-syntax.js +66 -0
  8. package/dist/motion.css +146 -0
  9. package/dist/styles.css +1699 -0
  10. package/dist/themes/chocolate.css +259 -0
  11. package/dist/themes/chocolate.fonts.css +2 -0
  12. package/dist/themes/chocolate.guide.md +30 -0
  13. package/dist/themes/chocolate.meta.json +61 -0
  14. package/dist/themes/chocolate.scoped.css +259 -0
  15. package/dist/themes/chocolate.tokens.json +49 -0
  16. package/dist/themes/fractalia.css +556 -0
  17. package/dist/themes/fractalia.fonts.css +3 -0
  18. package/dist/themes/fractalia.guide.md +86 -0
  19. package/dist/themes/fractalia.meta.json +112 -0
  20. package/dist/themes/fractalia.scoped.css +556 -0
  21. package/dist/themes/fractalia.tokens.json +39 -0
  22. package/dist/themes/friendly.css +375 -0
  23. package/dist/themes/friendly.fonts.css +2 -0
  24. package/dist/themes/friendly.guide.md +38 -0
  25. package/dist/themes/friendly.meta.json +82 -0
  26. package/dist/themes/friendly.scoped.css +375 -0
  27. package/dist/themes/friendly.tokens.json +45 -0
  28. package/dist/themes/lagoon.css +359 -0
  29. package/dist/themes/lagoon.fonts.css +2 -0
  30. package/dist/themes/lagoon.guide.md +47 -0
  31. package/dist/themes/lagoon.meta.json +85 -0
  32. package/dist/themes/lagoon.scoped.css +359 -0
  33. package/dist/themes/lagoon.tokens.json +49 -0
  34. package/dist/themes/liquid.css +510 -0
  35. package/dist/themes/liquid.fonts.css +7 -0
  36. package/dist/themes/liquid.guide.md +82 -0
  37. package/dist/themes/liquid.meta.json +134 -0
  38. package/dist/themes/liquid.scoped.css +510 -0
  39. package/dist/themes/liquid.tokens.json +47 -0
  40. package/dist/themes/matcha.css +259 -0
  41. package/dist/themes/matcha.fonts.css +2 -0
  42. package/dist/themes/matcha.guide.md +30 -0
  43. package/dist/themes/matcha.meta.json +61 -0
  44. package/dist/themes/matcha.scoped.css +259 -0
  45. package/dist/themes/matcha.tokens.json +49 -0
  46. package/dist/themes/qratia.css +264 -0
  47. package/dist/themes/qratia.fonts.css +2 -0
  48. package/dist/themes/qratia.guide.md +34 -0
  49. package/dist/themes/qratia.meta.json +49 -0
  50. package/dist/themes/qratia.scoped.css +264 -0
  51. package/dist/themes/qratia.tokens.json +49 -0
  52. package/dist/themes/stone.css +263 -0
  53. package/dist/themes/stone.fonts.css +2 -0
  54. package/dist/themes/stone.guide.md +30 -0
  55. package/dist/themes/stone.meta.json +47 -0
  56. package/dist/themes/stone.scoped.css +263 -0
  57. package/dist/themes/stone.tokens.json +49 -0
  58. package/dist/themes/tactile.css +596 -0
  59. package/dist/themes/tactile.fonts.css +3 -0
  60. package/dist/themes/tactile.guide.md +82 -0
  61. package/dist/themes/tactile.meta.json +182 -0
  62. package/dist/themes/tactile.scoped.css +596 -0
  63. package/dist/themes/tactile.tokens.json +42 -0
  64. package/dist/themes/twitter.css +364 -0
  65. package/dist/themes/twitter.fonts.css +6 -0
  66. package/dist/themes/twitter.guide.md +35 -0
  67. package/dist/themes/twitter.meta.json +90 -0
  68. package/dist/themes/twitter.scoped.css +364 -0
  69. package/dist/themes/twitter.tokens.json +45 -0
  70. package/dist/themes/y2k.css +259 -0
  71. package/dist/themes/y2k.fonts.css +2 -0
  72. package/dist/themes/y2k.guide.md +30 -0
  73. package/dist/themes/y2k.meta.json +59 -0
  74. package/dist/themes/y2k.scoped.css +259 -0
  75. package/dist/themes/y2k.tokens.json +49 -0
  76. package/dist/themes/zyro.css +442 -0
  77. package/dist/themes/zyro.fonts.css +2 -0
  78. package/dist/themes/zyro.guide.md +33 -0
  79. package/dist/themes/zyro.meta.json +74 -0
  80. package/dist/themes/zyro.scoped.css +442 -0
  81. package/dist/themes/zyro.tokens.json +46 -0
  82. package/dist/ui/accordion.js +1 -1
  83. package/dist/ui/alert-dialog.js +1 -1
  84. package/dist/ui/alert.js +2 -2
  85. package/dist/ui/attachment.js +1 -1
  86. package/dist/ui/auth-form.js +4 -4
  87. package/dist/ui/auth-layout.d.ts +3 -1
  88. package/dist/ui/auth-layout.js +7 -4
  89. package/dist/ui/auth-parts.js +4 -4
  90. package/dist/ui/avatar.js +1 -1
  91. package/dist/ui/ayuda.js +1 -1
  92. package/dist/ui/badge.d.ts +1 -1
  93. package/dist/ui/badge.js +1 -1
  94. package/dist/ui/banner.js +1 -1
  95. package/dist/ui/bottom-nav.js +1 -1
  96. package/dist/ui/breadcrumb.js +1 -1
  97. package/dist/ui/bubble.d.ts +1 -1
  98. package/dist/ui/bubble.js +3 -3
  99. package/dist/ui/button-group.js +1 -1
  100. package/dist/ui/button.d.ts +1 -1
  101. package/dist/ui/button.js +4 -4
  102. package/dist/ui/calendar.js +6 -6
  103. package/dist/ui/carousel.js +4 -4
  104. package/dist/ui/choice-card.js +1 -1
  105. package/dist/ui/combobox.js +4 -4
  106. package/dist/ui/command.js +2 -2
  107. package/dist/ui/content-card.js +2 -2
  108. package/dist/ui/context-menu.js +9 -9
  109. package/dist/ui/data-table.d.ts +13 -3
  110. package/dist/ui/data-table.js +164 -71
  111. package/dist/ui/date-picker.js +1 -1
  112. package/dist/ui/dialog.js +1 -1
  113. package/dist/ui/drawer.js +5 -5
  114. package/dist/ui/dropdown-menu.js +9 -9
  115. package/dist/ui/field.js +3 -3
  116. package/dist/ui/heatmap-grid.js +2 -2
  117. package/dist/ui/input-group.js +3 -3
  118. package/dist/ui/input-otp.js +1 -1
  119. package/dist/ui/instruction-editor.d.ts +51 -0
  120. package/dist/ui/instruction-editor.js +263 -0
  121. package/dist/ui/item.d.ts +1 -1
  122. package/dist/ui/item.js +1 -1
  123. package/dist/ui/marker.d.ts +1 -1
  124. package/dist/ui/marker.js +2 -2
  125. package/dist/ui/menubar.js +8 -8
  126. package/dist/ui/mfa-challenge.js +3 -3
  127. package/dist/ui/mfa-setup.js +1 -1
  128. package/dist/ui/navigation-menu.js +2 -2
  129. package/dist/ui/oauth-consent.js +3 -3
  130. package/dist/ui/pagination.js +2 -2
  131. package/dist/ui/panel.d.ts +1 -1
  132. package/dist/ui/panel.js +1 -0
  133. package/dist/ui/passkey-list.js +1 -1
  134. package/dist/ui/resizable.js +1 -1
  135. package/dist/ui/scroll-area.js +1 -1
  136. package/dist/ui/session-timeout.js +1 -1
  137. package/dist/ui/sheet.js +2 -2
  138. package/dist/ui/sidebar.js +7 -7
  139. package/dist/ui/sign-out-dialog.js +1 -1
  140. package/dist/ui/sparkline.d.ts +1 -1
  141. package/dist/ui/status-badge.d.ts +2 -2
  142. package/dist/ui/switch.js +1 -1
  143. package/dist/ui/table.js +2 -2
  144. package/dist/ui/tabs.d.ts +1 -1
  145. package/dist/ui/tabs.js +2 -2
  146. package/dist/ui/toast.js +3 -3
  147. package/dist/ui/toggle-group.js +1 -1
  148. package/dist/ui/toggle.js +3 -3
  149. package/dist/ui/tooltip.js +2 -2
  150. package/docs/CONTRACT.md +224 -224
  151. package/package.json +218 -188
  152. package/scripts/brand-core.mjs +20 -1
  153. package/scripts/cli.mjs +457 -457
  154. package/scripts/doctor.mjs +2 -0
  155. package/scripts/init.mjs +1 -1
  156. package/scripts/manifest.mjs +100 -100
@@ -0,0 +1,263 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { EditorContent, useEditor } from "@tiptap/react";
5
+ import StarterKit from "@tiptap/starter-kit";
6
+ import { Markdown } from "@tiptap/markdown";
7
+ import Placeholder from "@tiptap/extension-placeholder";
8
+ import {
9
+ BoldIcon,
10
+ CodeIcon,
11
+ Heading2Icon,
12
+ ItalicIcon,
13
+ ListIcon,
14
+ ListOrderedIcon,
15
+ QuoteIcon,
16
+ Redo2Icon,
17
+ SquareCodeIcon,
18
+ StrikethroughIcon,
19
+ Undo2Icon
20
+ } from "lucide-react";
21
+ import { useDsMessages } from "../hooks/use-ds-messages.js";
22
+ import { dsFormat } from "../lib/i18n.js";
23
+ import { dsWarn } from "../lib/presets.js";
24
+ import { analyzeTemplate, TEMPLATE_SNIPPETS } from "../lib/template-syntax.js";
25
+ import { cn } from "../lib/utils.js";
26
+ import { Button } from "./button.js";
27
+ import { Separator } from "./separator.js";
28
+ import { Tabs, TabsList, TabsTrigger } from "./tabs.js";
29
+ import { Textarea } from "./textarea.js";
30
+ import { Toggle } from "./toggle.js";
31
+ const PRESET_DEFAULTS = {
32
+ prompt: { modes: ["visual", "markdown", "preview"], tools: ["history", "heading", "marks", "lists", "blocks"], showCount: true, density: "default" },
33
+ document: { modes: ["visual", "markdown", "html", "preview"], tools: ["history", "heading", "marks", "lists", "blocks"], showCount: true, density: "default" },
34
+ compact: { modes: ["visual"], tools: ["marks", "lists"], showCount: false, density: "compact" }
35
+ };
36
+ const PROSE = cn(
37
+ "min-h-(--ds-editor-min-h) max-h-(--ds-editor-max-h) overflow-y-auto p-(--ds-editor-p) text-sm outline-none",
38
+ "[&_p]:my-2 [&_h1]:my-3 [&_h1]:text-xl [&_h1]:font-(--ds-heading-weight) [&_h2]:my-3 [&_h2]:text-lg [&_h2]:font-(--ds-title-weight) [&_h3]:my-2 [&_h3]:font-(--ds-title-weight)",
39
+ "[&_ul]:my-2 [&_ul]:list-disc [&_ul]:ps-6 [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:ps-6",
40
+ "[&_blockquote]:my-2 [&_blockquote]:border-s-2 [&_blockquote]:border-border [&_blockquote]:ps-3 [&_blockquote]:text-muted-foreground",
41
+ "[&_code]:rounded-sm [&_code]:bg-muted [&_code]:px-1 [&_code]:font-mono [&_pre]:my-2 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-inset [&_pre]:p-3 [&_pre_code]:bg-transparent [&_pre_code]:p-0",
42
+ "[&_p.is-editor-empty:first-child]:before:pointer-events-none [&_p.is-editor-empty:first-child]:before:float-start [&_p.is-editor-empty:first-child]:before:h-0 [&_p.is-editor-empty:first-child]:before:text-muted-foreground [&_p.is-editor-empty:first-child]:before:content-[attr(data-placeholder)]"
43
+ );
44
+ function ToolButton({
45
+ label,
46
+ pressed,
47
+ onPress,
48
+ disabled,
49
+ children
50
+ }) {
51
+ return /* @__PURE__ */ jsx(Toggle, { size: "sm", "aria-label": label, title: label, pressed: !!pressed, onPressedChange: onPress, disabled, children });
52
+ }
53
+ function Toolbar({ editor, tools, disabled }) {
54
+ const t = useDsMessages();
55
+ const run = () => editor.chain().focus();
56
+ const groups = [];
57
+ if (tools.includes("history"))
58
+ groups.push(
59
+ /* @__PURE__ */ jsxs(React.Fragment, { children: [
60
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorUndo, disabled: disabled || !editor.can().undo(), onPress: () => run().undo().run(), children: /* @__PURE__ */ jsx(Undo2Icon, {}) }),
61
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorRedo, disabled: disabled || !editor.can().redo(), onPress: () => run().redo().run(), children: /* @__PURE__ */ jsx(Redo2Icon, {}) })
62
+ ] }, "history")
63
+ );
64
+ if (tools.includes("heading"))
65
+ groups.push(
66
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorHeading, disabled, pressed: editor.isActive("heading", { level: 2 }), onPress: () => run().toggleHeading({ level: 2 }).run(), children: /* @__PURE__ */ jsx(Heading2Icon, {}) }, "heading")
67
+ );
68
+ if (tools.includes("marks"))
69
+ groups.push(
70
+ /* @__PURE__ */ jsxs(React.Fragment, { children: [
71
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorBold, disabled, pressed: editor.isActive("bold"), onPress: () => run().toggleBold().run(), children: /* @__PURE__ */ jsx(BoldIcon, {}) }),
72
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorItalic, disabled, pressed: editor.isActive("italic"), onPress: () => run().toggleItalic().run(), children: /* @__PURE__ */ jsx(ItalicIcon, {}) }),
73
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorStrike, disabled, pressed: editor.isActive("strike"), onPress: () => run().toggleStrike().run(), children: /* @__PURE__ */ jsx(StrikethroughIcon, {}) }),
74
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorCode, disabled, pressed: editor.isActive("code"), onPress: () => run().toggleCode().run(), children: /* @__PURE__ */ jsx(CodeIcon, {}) })
75
+ ] }, "marks")
76
+ );
77
+ if (tools.includes("lists"))
78
+ groups.push(
79
+ /* @__PURE__ */ jsxs(React.Fragment, { children: [
80
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorBulletList, disabled, pressed: editor.isActive("bulletList"), onPress: () => run().toggleBulletList().run(), children: /* @__PURE__ */ jsx(ListIcon, {}) }),
81
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorOrderedList, disabled, pressed: editor.isActive("orderedList"), onPress: () => run().toggleOrderedList().run(), children: /* @__PURE__ */ jsx(ListOrderedIcon, {}) })
82
+ ] }, "lists")
83
+ );
84
+ if (tools.includes("blocks"))
85
+ groups.push(
86
+ /* @__PURE__ */ jsxs(React.Fragment, { children: [
87
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorQuote, disabled, pressed: editor.isActive("blockquote"), onPress: () => run().toggleBlockquote().run(), children: /* @__PURE__ */ jsx(QuoteIcon, {}) }),
88
+ /* @__PURE__ */ jsx(ToolButton, { label: t.editorCodeBlock, disabled, pressed: editor.isActive("codeBlock"), onPress: () => run().toggleCodeBlock().run(), children: /* @__PURE__ */ jsx(SquareCodeIcon, {}) })
89
+ ] }, "blocks")
90
+ );
91
+ return /* @__PURE__ */ jsx("div", { role: "toolbar", "aria-label": t.editorToolbar, "data-slot": "instruction-editor-toolbar", className: "flex flex-wrap items-center gap-1", children: groups.map((g, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
92
+ i > 0 ? /* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "mx-1 h-4" }) : null,
93
+ g
94
+ ] }, i)) });
95
+ }
96
+ function InstructionEditor({
97
+ preset = "prompt",
98
+ value,
99
+ defaultValue = "",
100
+ onChange,
101
+ modes,
102
+ mode: modeProp,
103
+ defaultMode,
104
+ onModeChange,
105
+ variables,
106
+ syntax = "plain",
107
+ renderPreview,
108
+ placeholder,
109
+ readOnly = false,
110
+ tools,
111
+ showCount,
112
+ className,
113
+ "aria-label": ariaLabel,
114
+ ...props
115
+ }) {
116
+ const t = useDsMessages();
117
+ const d = PRESET_DEFAULTS[preset];
118
+ const availableModes = modes ?? d.modes;
119
+ const toolList = tools ?? d.tools;
120
+ const withCount = showCount ?? d.showCount;
121
+ const [inner, setInner] = React.useState(defaultMode ?? availableModes[0] ?? "visual");
122
+ const mode = modeProp ?? inner;
123
+ if (!availableModes.includes(mode)) dsWarn("InstructionEditor", `mode="${mode}" is not in modes.`);
124
+ const setMode = (m) => {
125
+ setInner(m);
126
+ onModeChange?.(m);
127
+ };
128
+ const [markdown, setMarkdown] = React.useState(value ?? defaultValue);
129
+ const current = value ?? markdown;
130
+ const onChangeRef = React.useRef(onChange);
131
+ onChangeRef.current = onChange;
132
+ const editor = useEditor({
133
+ extensions: [StarterKit, Markdown, Placeholder.configure({ placeholder: placeholder ?? t.editorPlaceholder })],
134
+ content: current,
135
+ contentType: "markdown",
136
+ editable: !readOnly,
137
+ immediatelyRender: false,
138
+ shouldRerenderOnTransaction: true,
139
+ editorProps: {
140
+ attributes: { class: PROSE, role: "textbox", "aria-multiline": "true", ...ariaLabel ? { "aria-label": ariaLabel } : {} }
141
+ },
142
+ onUpdate: ({ editor: ed }) => {
143
+ const md = ed.getMarkdown();
144
+ setMarkdown(md);
145
+ onChangeRef.current?.(md);
146
+ }
147
+ });
148
+ React.useEffect(() => {
149
+ editor?.setEditable(!readOnly && mode === "visual");
150
+ }, [editor, readOnly, mode]);
151
+ React.useEffect(() => {
152
+ if (!editor || value === void 0) return;
153
+ if (value !== editor.getMarkdown()) editor.commands.setContent(value, { contentType: "markdown", emitUpdate: false });
154
+ }, [editor, value]);
155
+ const fromSource = (md) => {
156
+ setMarkdown(md);
157
+ onChangeRef.current?.(md);
158
+ editor?.commands.setContent(md, { contentType: "markdown", emitUpdate: false });
159
+ };
160
+ const textareaRef = React.useRef(null);
161
+ const insertText = (text) => {
162
+ if (mode === "markdown") {
163
+ const el = textareaRef.current;
164
+ const a = el?.selectionStart ?? current.length;
165
+ const b = el?.selectionEnd ?? current.length;
166
+ fromSource(current.slice(0, a) + text + current.slice(b));
167
+ } else editor?.chain().focus().insertContent(text).run();
168
+ };
169
+ const insertVariable = (name) => insertText(`{{${name}}}`);
170
+ const isTemplate = syntax === "template";
171
+ const issues = React.useMemo(() => isTemplate ? analyzeTemplate(current, variables) : [], [isTemplate, current, variables]);
172
+ const issueText = (i) => {
173
+ const msg = { condition: t.editorIssueCondition, unclosed: t.editorIssueUnclosed, stray: t.editorIssueStray, syntax: t.editorIssueSyntax, variable: t.editorIssueVariable }[i.code];
174
+ return dsFormat(msg, { line: i.line, text: i.text });
175
+ };
176
+ const snippetLabels = {
177
+ default: t.editorSnippetDefault,
178
+ ternary: t.editorSnippetTernary,
179
+ if: t.editorSnippetIf,
180
+ ifElse: t.editorSnippetIfElse,
181
+ unless: t.editorSnippetUnless
182
+ };
183
+ const preview = React.useMemo(() => {
184
+ if (mode !== "preview" || !renderPreview) return null;
185
+ const r = renderPreview(current);
186
+ return typeof r === "string" ? { text: r } : r;
187
+ }, [mode, renderPreview, current]);
188
+ const editingSource = (mode === "visual" || mode === "markdown") && !readOnly;
189
+ const showVisual = mode === "visual" || mode === "preview" && !renderPreview;
190
+ const html = mode === "html" && editor ? editor.getHTML() : "";
191
+ return /* @__PURE__ */ jsxs(
192
+ "div",
193
+ {
194
+ "data-slot": "instruction-editor",
195
+ "data-preset": preset,
196
+ "data-mode": mode,
197
+ "data-density": d.density,
198
+ className: cn("flex min-w-0 flex-col gap-2 data-[density=compact]:[--ds-editor-min-h:var(--ds-editor-min-h-compact)] rounded-card border border-border bg-card text-card-foreground", className),
199
+ ...props,
200
+ children: [
201
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 border-b border-border p-2", children: [
202
+ mode === "visual" && editor && !readOnly ? /* @__PURE__ */ jsx(Toolbar, { editor, tools: toolList, disabled: false }) : /* @__PURE__ */ jsx("span", {}),
203
+ availableModes.length > 1 ? /* @__PURE__ */ jsx(Tabs, { value: mode, onValueChange: (v) => setMode(v), children: /* @__PURE__ */ jsx(TabsList, { "aria-label": t.editorModes, children: availableModes.map((m) => /* @__PURE__ */ jsx(TabsTrigger, { value: m, children: { visual: t.editorModeVisual, markdown: t.editorModeMarkdown, html: t.editorModeHtml, preview: t.editorModePreview }[m] }, m)) }) }) : null
204
+ ] }),
205
+ variables?.length && editingSource ? /* @__PURE__ */ jsxs("div", { "data-slot": "instruction-editor-variables", className: "flex flex-wrap items-center gap-1 px-2", children: [
206
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t.editorVariables }),
207
+ variables.map((v) => /* @__PURE__ */ jsx(Button, { variant: "outline", size: "xs", onClick: () => insertVariable(v), children: /* @__PURE__ */ jsx("code", { children: `{{${v}}}` }) }, v))
208
+ ] }) : null,
209
+ isTemplate && editingSource ? /* @__PURE__ */ jsxs("div", { "data-slot": "instruction-editor-snippets", className: "flex flex-wrap items-center gap-1 px-2", children: [
210
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t.editorSnippets }),
211
+ Object.keys(TEMPLATE_SNIPPETS).map((k) => /* @__PURE__ */ jsx(Button, { variant: "outline", size: "xs", onClick: () => insertText(TEMPLATE_SNIPPETS[k]), children: snippetLabels[k] }, k))
212
+ ] }) : null,
213
+ /* @__PURE__ */ jsxs("div", { "data-slot": "instruction-editor-body", className: "min-w-0", children: [
214
+ showVisual ? /* @__PURE__ */ jsx(EditorContent, { editor }) : null,
215
+ mode === "markdown" ? /* @__PURE__ */ jsx(
216
+ Textarea,
217
+ {
218
+ ref: textareaRef,
219
+ "aria-label": ariaLabel ?? t.editorModeMarkdown,
220
+ value: current,
221
+ readOnly,
222
+ spellCheck: false,
223
+ onChange: (e) => fromSource(e.target.value),
224
+ className: "min-h-(--ds-editor-min-h) max-h-(--ds-editor-max-h) rounded-none border-0 font-mono"
225
+ }
226
+ ) : null,
227
+ preview ? /* @__PURE__ */ jsxs("div", { "data-slot": "instruction-editor-preview", className: "flex flex-col gap-2 p-(--ds-editor-p)", children: [
228
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t.editorPreviewSent }),
229
+ /* @__PURE__ */ jsx(
230
+ "pre",
231
+ {
232
+ tabIndex: 0,
233
+ className: "min-h-(--ds-editor-min-h) max-h-(--ds-editor-max-h) overflow-auto rounded-md bg-inset p-3 font-mono text-sm whitespace-pre-wrap",
234
+ children: preview.text || t.editorPreviewEmpty
235
+ }
236
+ ),
237
+ preview.stats?.length ? /* @__PURE__ */ jsx("dl", { "data-slot": "instruction-editor-stats", "aria-label": t.editorStats, className: "flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground tabular-nums", children: preview.stats.map((st) => /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
238
+ /* @__PURE__ */ jsxs("dt", { children: [
239
+ st.label,
240
+ ":"
241
+ ] }),
242
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: st.value })
243
+ ] }, st.label)) }) : null
244
+ ] }) : null,
245
+ mode === "html" ? /* @__PURE__ */ jsx(
246
+ "pre",
247
+ {
248
+ tabIndex: 0,
249
+ "aria-label": t.editorModeHtml,
250
+ className: "min-h-(--ds-editor-min-h) max-h-(--ds-editor-max-h) overflow-auto p-(--ds-editor-p) font-mono text-sm whitespace-pre-wrap",
251
+ children: html
252
+ }
253
+ ) : null
254
+ ] }),
255
+ issues.length ? /* @__PURE__ */ jsx("ul", { "data-slot": "instruction-editor-issues", "aria-label": t.editorIssues, className: "flex flex-col gap-1 px-2 text-xs text-warning", children: issues.map((i, n) => /* @__PURE__ */ jsx("li", { children: issueText(i) }, n)) }) : null,
256
+ withCount ? /* @__PURE__ */ jsx("div", { "data-slot": "instruction-editor-count", className: "px-2 pb-2 text-end text-xs text-muted-foreground tabular-nums", children: dsFormat(t.editorCount, { count: current.length }) }) : null
257
+ ]
258
+ }
259
+ );
260
+ }
261
+ export {
262
+ InstructionEditor
263
+ };
package/dist/ui/item.d.ts CHANGED
@@ -13,7 +13,7 @@ declare const itemVariants: (props?: ({
13
13
  } & class_variance_authority_types.ClassProp) | undefined) => string;
14
14
  declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React.JSX.Element;
15
15
  declare const itemMediaVariants: (props?: ({
16
- variant?: "image" | "default" | "icon" | null | undefined;
16
+ variant?: "default" | "image" | "icon" | null | undefined;
17
17
  } & class_variance_authority_types.ClassProp) | undefined) => string;
18
18
  declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
19
19
  declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
package/dist/ui/item.js CHANGED
@@ -148,7 +148,7 @@ function ItemDescription({ className, ...props }) {
148
148
  {
149
149
  "data-slot": "item-description",
150
150
  className: cn(
151
- "line-clamp-2 text-left text-sm font-normal text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
151
+ "line-clamp-2 text-start text-sm font-(--ds-normal-weight) text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
152
152
  className
153
153
  ),
154
154
  ...props
@@ -4,7 +4,7 @@ import { useRender } from '@base-ui/react/use-render';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const markerVariants: (props?: ({
7
- variant?: "separator" | "default" | "border" | null | undefined;
7
+ variant?: "default" | "separator" | "border" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
10
10
  declare function MarkerIcon({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
package/dist/ui/marker.js CHANGED
@@ -4,12 +4,12 @@ import { useRender } from "@base-ui/react/use-render";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { cn } from "../lib/utils.js";
6
6
  const markerVariants = cva(
7
- "group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground",
7
+ "group/marker relative flex min-h-4 w-full items-center gap-2 text-start text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground",
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
11
  default: "",
12
- separator: "before:mr-1 before:h-(--ds-rule-w) before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-(--ds-rule-w) after:min-w-0 after:flex-1 after:bg-border",
12
+ separator: "before:me-1 before:h-(--ds-rule-w) before:min-w-0 before:flex-1 before:bg-border after:ms-1 after:h-(--ds-rule-w) after:min-w-0 after:flex-1 after:bg-border",
13
13
  border: "border-b-(length:--ds-rule-w) border-border pb-2"
14
14
  }
15
15
  }
@@ -90,7 +90,7 @@ function MenubarItem({
90
90
  "data-inset": inset,
91
91
  "data-variant": variant,
92
92
  className: cn(
93
- "group/menubar-item gap-2.5 rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-disabled:opacity-(--ds-disabled-opacity) [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
93
+ "group/menubar-item gap-2.5 rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-inset:ps-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-disabled:opacity-(--ds-disabled-opacity) [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
94
94
  className
95
95
  ),
96
96
  ...props
@@ -110,13 +110,13 @@ function MenubarCheckboxItem({
110
110
  "data-slot": "menubar-checkbox-item",
111
111
  "data-inset": inset,
112
112
  className: cn(
113
- "relative flex cursor-default items-center gap-2.5 rounded-item py-(--ds-menu-item-py) pr-(--ds-menu-item-px) pl-9.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0",
113
+ "relative flex cursor-default items-center gap-2.5 rounded-item py-(--ds-menu-item-py) pe-(--ds-menu-item-px) ps-9.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:**:text-accent-foreground data-inset:ps-9.5 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0",
114
114
  className
115
115
  ),
116
116
  checked,
117
117
  ...props,
118
118
  children: [
119
- /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
119
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute start-3 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
120
120
  CheckIcon,
121
121
  {}
122
122
  ) }) }),
@@ -142,12 +142,12 @@ function MenubarRadioItem({
142
142
  "data-slot": "menubar-radio-item",
143
143
  "data-inset": inset,
144
144
  className: cn(
145
- "relative flex cursor-default items-center gap-2.5 rounded-item py-(--ds-menu-item-py) pr-(--ds-menu-item-px) pl-9.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
145
+ "relative flex cursor-default items-center gap-2.5 rounded-item py-(--ds-menu-item-py) pe-(--ds-menu-item-px) ps-9.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:**:text-accent-foreground data-inset:ps-9.5 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
146
146
  className
147
147
  ),
148
148
  ...props,
149
149
  children: [
150
- /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(MenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
150
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute start-3 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(MenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
151
151
  CheckIcon,
152
152
  {}
153
153
  ) }) }),
@@ -167,7 +167,7 @@ function MenubarLabel({
167
167
  "data-slot": "menubar-label",
168
168
  "data-inset": inset,
169
169
  className: cn(
170
- "px-3.5 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
170
+ "px-3.5 py-2.5 text-xs text-muted-foreground data-inset:ps-9.5",
171
171
  className
172
172
  ),
173
173
  ...props
@@ -196,7 +196,7 @@ function MenubarShortcut({
196
196
  {
197
197
  "data-slot": "menubar-shortcut",
198
198
  className: cn(
199
- "ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
199
+ "ms-auto text-xs tracking-(--ds-widest-tracking) text-muted-foreground group-focus/menubar-item:text-accent-foreground",
200
200
  className
201
201
  ),
202
202
  ...props
@@ -219,7 +219,7 @@ function MenubarSubTrigger({
219
219
  "data-slot": "menubar-sub-trigger",
220
220
  "data-inset": inset,
221
221
  className: cn(
222
- "gap-2 rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
222
+ "gap-2 rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:ps-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
223
223
  className
224
224
  ),
225
225
  ...props
@@ -101,7 +101,7 @@ function MfaChallenge({
101
101
  {
102
102
  type: "button",
103
103
  onClick: () => pick(m),
104
- className: "flex w-full items-center gap-3 rounded-(--ds-auth-radius) border border-(--ds-auth-border) p-3 text-start text-sm font-medium outline-none transition-colors duration-(--ds-motion-fast) hover:bg-(--ds-field-bg-hover) focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color)",
104
+ className: "flex w-full items-center gap-3 rounded-(--ds-auth-radius) border border-(--ds-auth-border) p-3 text-start text-sm font-(--ds-medium-weight) outline-none transition-colors duration-(--ds-motion-fast) hover:bg-(--ds-field-bg-hover) focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color)",
105
105
  children: [
106
106
  /* @__PURE__ */ jsx(IconTile, { size: "sm", tone: "neutral", children: ICONS[m] }),
107
107
  label[m]
@@ -141,7 +141,7 @@ function MfaChallenge({
141
141
  autoCapitalize: "none",
142
142
  spellCheck: false,
143
143
  autoFocus: true,
144
- className: "font-mono tracking-widest",
144
+ className: "font-mono tracking-(--ds-widest-tracking)",
145
145
  value: code,
146
146
  onChange: (e) => setCode(e.target.value),
147
147
  "aria-invalid": error ? true : void 0
@@ -180,7 +180,7 @@ function MfaChallenge({
180
180
  ] }, fails),
181
181
  trustDevice ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
182
182
  /* @__PURE__ */ jsx(Checkbox, { id: `${uid}-trust`, checked: trust, onCheckedChange: (v) => setTrust(v === true) }),
183
- /* @__PURE__ */ jsx(Label, { htmlFor: `${uid}-trust`, className: "text-sm font-normal", children: t.authMfaTrustDevice })
183
+ /* @__PURE__ */ jsx(Label, { htmlFor: `${uid}-trust`, className: "text-sm font-(--ds-normal-weight)", children: t.authMfaTrustDevice })
184
184
  ] }) : null,
185
185
  /* @__PURE__ */ jsxs(Button, { type: "submit", className: "w-full", disabled: pending || method !== "passkey" && (isBackup ? !code.trim() : code.length < codeLength), children: [
186
186
  pending ? /* @__PURE__ */ jsx(Spinner, {}) : method === "passkey" ? ICONS.passkey : null,
@@ -118,7 +118,7 @@ function MfaSetup({
118
118
  ] }),
119
119
  /* @__PURE__ */ jsxs(AuthStagger, { index: 2, className: "flex items-start gap-2.5", children: [
120
120
  /* @__PURE__ */ jsx(Checkbox, { id: `${uid}-saved`, checked: saved, onCheckedChange: (v) => setSaved(v === true), className: "mt-0.5" }),
121
- /* @__PURE__ */ jsx(Label, { htmlFor: `${uid}-saved`, className: "text-sm font-normal", children: t.authMfaBackupConfirm })
121
+ /* @__PURE__ */ jsx(Label, { htmlFor: `${uid}-saved`, className: "text-sm font-(--ds-normal-weight)", children: t.authMfaBackupConfirm })
122
122
  ] }),
123
123
  actions(
124
124
  /* @__PURE__ */ jsx(Button, { type: "button", className: "w-full", disabled: !saved, onClick: onDone, children: t.authDone })
@@ -71,7 +71,7 @@ function NavigationMenuTrigger({
71
71
  children: [
72
72
  children,
73
73
  " ",
74
- /* @__PURE__ */ jsx(ChevronDownIcon, { className: "relative top-px ml-1 size-3 transition duration-(--ds-motion-slow) group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180", "aria-hidden": "true" })
74
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "relative top-px ms-1 size-3 transition duration-(--ds-motion-slow) group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180", "aria-hidden": "true" })
75
75
  ]
76
76
  }
77
77
  );
@@ -85,7 +85,7 @@ function NavigationMenuContent({
85
85
  {
86
86
  "data-slot": "navigation-menu-content",
87
87
  className: cn(
88
- "data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] isolate z-(--ds-z-overlay) h-full w-auto p-2.5 pr-3 transition-[opacity,transform,translate] duration-(--ds-motion-layout) ease-(--ds-ease-standard) group-data-[viewport=false]/navigation-menu:rounded-popover group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-popover group-data-[viewport=false]/navigation-menu:ring-(length:--ds-layer-ring-w) group-data-[viewport=false]/navigation-menu:ring-(--ds-layer-ring) group-data-[viewport=false]/navigation-menu:duration-(--ds-motion-slow) data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
88
+ "data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] isolate z-(--ds-z-overlay) h-full w-auto p-2.5 pe-3 transition-[opacity,transform,translate] duration-(--ds-motion-layout) ease-(--ds-ease-standard) group-data-[viewport=false]/navigation-menu:rounded-popover group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-popover group-data-[viewport=false]/navigation-menu:ring-(length:--ds-layer-ring-w) group-data-[viewport=false]/navigation-menu:ring-(--ds-layer-ring) group-data-[viewport=false]/navigation-menu:duration-(--ds-motion-slow) data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
89
89
  className
90
90
  ),
91
91
  ...props
@@ -140,7 +140,7 @@ function OAuthConsent({
140
140
  /* @__PURE__ */ jsx(AvatarFallback, { children: (account.name ?? account.email).slice(0, 1).toUpperCase() })
141
141
  ] }),
142
142
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 text-sm", children: [
143
- account.name ? /* @__PURE__ */ jsx("p", { className: "truncate font-medium", children: account.name }) : null,
143
+ account.name ? /* @__PURE__ */ jsx("p", { className: "truncate font-(--ds-medium-weight)", children: account.name }) : null,
144
144
  /* @__PURE__ */ jsx("p", { className: "truncate text-muted-foreground", children: account.email })
145
145
  ] }),
146
146
  onSwitchAccount ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: onSwitchAccount, children: t.authOauthSwitchAccount }) : null
@@ -151,14 +151,14 @@ function OAuthConsent({
151
151
  ] }) : null,
152
152
  /* @__PURE__ */ jsx(AuthError, { error: errorProp ?? error }),
153
153
  scopes.length ? /* @__PURE__ */ jsxs(AuthStagger, { index: 2, className: "flex flex-col gap-2", children: [
154
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: dsFormat(t.authOauthPermissions, { client: client.name }) }),
154
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-(--ds-medium-weight)", children: dsFormat(t.authOauthPermissions, { client: client.name }) }),
155
155
  /* @__PURE__ */ jsx("ul", { "data-slot": "oauth-consent-scopes", className: "flex flex-col divide-y divide-(--ds-auth-border) rounded-(--ds-auth-radius) border border-(--ds-auth-border)", children: scopes.map((s) => {
156
156
  const optional = selectable && !s.required;
157
157
  const on = granted.has(s.id);
158
158
  const body = /* @__PURE__ */ jsxs(Fragment, { children: [
159
159
  /* @__PURE__ */ jsx("span", { className: "flex size-7 shrink-0 items-center justify-center rounded-control bg-muted text-muted-foreground [&_svg]:size-4", children: s.icon ?? /* @__PURE__ */ jsx(CheckIcon, {}) }),
160
160
  /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
161
- /* @__PURE__ */ jsxs("span", { className: "flex flex-wrap items-center gap-2 text-sm font-medium", children: [
161
+ /* @__PURE__ */ jsxs("span", { className: "flex flex-wrap items-center gap-2 text-sm font-(--ds-medium-weight)", children: [
162
162
  s.label,
163
163
  s.sensitive ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-warning-soft px-1.5 text-xs leading-5 text-[color:var(--ds-on-soft,var(--warning))]", children: t.authOauthSensitive }) : null
164
164
  ] }),
@@ -70,7 +70,7 @@ function PaginationPrevious({
70
70
  "aria-label": t.paginationPreviousLabel,
71
71
  size: "default",
72
72
  "data-direction": "previous",
73
- className: cn("pl-2", className),
73
+ className: cn("ps-2", className),
74
74
  ...props,
75
75
  children: [
76
76
  /* @__PURE__ */ jsx(ChevronLeftIcon, { "data-icon": "inline-start" }),
@@ -91,7 +91,7 @@ function PaginationNext({
91
91
  "aria-label": t.paginationNextLabel,
92
92
  size: "default",
93
93
  "data-direction": "next",
94
- className: cn("pr-2", className),
94
+ className: cn("pe-2", className),
95
95
  ...props,
96
96
  children: [
97
97
  /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: text ?? t.paginationNext }),
@@ -4,7 +4,7 @@ import { useRender } from '@base-ui/react/use-render';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const panelVariants: (props?: ({
7
- variant?: "default" | "outline" | "ghost" | "muted" | null | undefined;
7
+ variant?: "default" | "outline" | "ghost" | "glass" | "muted" | null | undefined;
8
8
  size?: "sm" | "lg" | "md" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  declare function Panel({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof panelVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
package/dist/ui/panel.js CHANGED
@@ -8,6 +8,7 @@ const panelVariants = cva("group/panel min-w-0 rounded-card text-sm", {
8
8
  default: "border border-border bg-card text-card-foreground shadow-card",
9
9
  muted: "bg-inset text-inset-foreground",
10
10
  outline: "border border-border",
11
+ glass: "border border-(--ds-panel-glass-border) bg-(--ds-panel-glass-bg) text-card-foreground shadow-(--ds-panel-glass-shadow) backdrop-blur-(--ds-panel-glass-blur) backdrop-saturate-(--ds-panel-glass-saturate) motion-safe:transition-shadow",
11
12
  ghost: ""
12
13
  },
13
14
  size: {
@@ -42,7 +42,7 @@ function PasskeyList({
42
42
  return /* @__PURE__ */ jsx("div", { "data-slot": "passkey-list", className: cn("flex flex-col gap-3", className), ...props, children: /* @__PURE__ */ jsxs("div", { "data-slot": "passkey-list-empty", className: "flex flex-col items-start gap-3 rounded-(--ds-auth-radius) border border-dashed border-(--ds-auth-border) p-(--ds-auth-p-sm)", children: [
43
43
  /* @__PURE__ */ jsx(IconTile, { tone: "primary", children: /* @__PURE__ */ jsx(KeyRoundIcon, {}) }),
44
44
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
45
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: t.authPasskeysEmptyTitle }),
45
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-(--ds-medium-weight)", children: t.authPasskeysEmptyTitle }),
46
46
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t.authPasskeysEmptyBody })
47
47
  ] }),
48
48
  add
@@ -31,7 +31,7 @@ function ResizableHandle({
31
31
  {
32
32
  "data-slot": "resizable-handle",
33
33
  className: cn(
34
- "relative flex w-(--ds-rule-w) items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-(--ds-rule-w) aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
34
+ "relative flex w-(--ds-rule-w) items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-(--ds-rule-w) aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
35
35
  className
36
36
  ),
37
37
  ...props,
@@ -39,7 +39,7 @@ function ScrollBar({
39
39
  "data-orientation": orientation,
40
40
  orientation,
41
41
  className: cn(
42
- "flex touch-none p-px transition-colors duration-(--ds-motion-snap) select-none data-[orientation=horizontal]:h-(--ds-scrollbar-w) data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-(--ds-scrollbar-w) data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent",
42
+ "flex touch-none p-px transition-colors duration-(--ds-motion-snap) select-none data-[orientation=horizontal]:h-(--ds-scrollbar-w) data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-(--ds-scrollbar-w) data-[orientation=vertical]:border-s data-[orientation=vertical]:border-s-transparent",
43
43
  className
44
44
  ),
45
45
  ...props,
@@ -55,7 +55,7 @@ function SessionTimeout({
55
55
  /* @__PURE__ */ jsx(AlertDialogMedia, { children: /* @__PURE__ */ jsx(ClockIcon, {}) }),
56
56
  /* @__PURE__ */ jsx(AlertDialogTitle, { children: t.authSessionTimeoutTitle }),
57
57
  /* @__PURE__ */ jsx(AlertDialogDescription, { children: t.authSessionTimeoutBody }),
58
- /* @__PURE__ */ jsx("p", { "data-slot": "session-timeout-time", "aria-hidden": "true", className: "text-(length:--ds-auth-title-size) font-semibold text-foreground tabular-nums", children: time }),
58
+ /* @__PURE__ */ jsx("p", { "data-slot": "session-timeout-time", "aria-hidden": "true", className: "text-(length:--ds-auth-title-size) font-(--ds-title-weight) text-foreground tabular-nums", children: time }),
59
59
  /* @__PURE__ */ jsx("span", { role: "status", className: "sr-only", children: dsFormat(t.authSessionTimeoutLeft, { time: spoken }) })
60
60
  ] }),
61
61
  /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
package/dist/ui/sheet.js CHANGED
@@ -46,7 +46,7 @@ function SheetContent({
46
46
  "data-slot": "sheet-content",
47
47
  "data-side": side,
48
48
  className: cn(
49
- "fixed z-(--ds-z-overlay) flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-overlay transition duration-(--ds-motion-base) ease-(--ds-ease-panel) data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t-(length:--ds-rule-w) data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r-(length:--ds-rule-w) data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l-(length:--ds-rule-w) data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b-(length:--ds-rule-w) data-[side=left]:sm:max-w-(--ds-sheet-w) data-[side=right]:sm:max-w-(--ds-sheet-w) data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
49
+ "fixed z-(--ds-z-overlay) flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-overlay transition duration-(--ds-motion-base) ease-(--ds-ease-panel) data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t-(length:--ds-rule-w) data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e-(length:--ds-rule-w) data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s-(length:--ds-rule-w) data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b-(length:--ds-rule-w) data-[side=left]:sm:max-w-(--ds-sheet-w) data-[side=right]:sm:max-w-(--ds-sheet-w) data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
50
50
  className
51
51
  ),
52
52
  ...props,
@@ -60,7 +60,7 @@ function SheetContent({
60
60
  Button,
61
61
  {
62
62
  variant: "ghost",
63
- className: "absolute top-4 right-4",
63
+ className: "absolute top-4 end-4",
64
64
  size: "icon-sm"
65
65
  }
66
66
  ),