@ciridae/ui 1.3.0 → 1.4.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 (60) hide show
  1. package/README.md +2 -2
  2. package/dist/components/app-frame.js +4 -4
  3. package/dist/components/button.d.ts +0 -11
  4. package/dist/components/button.js +1 -26
  5. package/dist/components/color-theme.d.ts +3 -12
  6. package/dist/components/color-theme.js +2 -29
  7. package/dist/components/dropzone.d.ts +0 -4
  8. package/dist/components/dropzone.js +4 -9
  9. package/dist/components/feedback-sheet.d.ts +1 -16
  10. package/dist/components/feedback-sheet.js +7 -144
  11. package/dist/components/hotkeys.d.ts +1 -11
  12. package/dist/components/hotkeys.js +3 -44
  13. package/dist/components/keyboard-shortcuts.d.ts +0 -2
  14. package/dist/components/keyboard-shortcuts.js +2 -46
  15. package/dist/components/locale.d.ts +3 -42
  16. package/dist/components/locale.js +3 -48
  17. package/dist/components/log-list.d.ts +0 -2
  18. package/dist/components/log-list.js +0 -22
  19. package/dist/components/record.d.ts +0 -23
  20. package/dist/components/record.js +2 -80
  21. package/dist/components/sidebar.d.ts +0 -1
  22. package/dist/components/sidebar.js +0 -10
  23. package/dist/components/tabs.d.ts +0 -3
  24. package/dist/components/tabs.js +0 -4
  25. package/dist/feedback/contract.d.ts +1 -25
  26. package/dist/feedback/contract.js +2 -6
  27. package/dist/feedback/operator-controller.d.ts +3 -10
  28. package/dist/feedback/operator-controller.js +1 -28
  29. package/dist/preset.d.ts +0 -6
  30. package/dist/preset.js +0 -5
  31. package/dist/styled-system/styles.css +20 -82
  32. package/dist/theme/options.d.ts +1 -19
  33. package/dist/theme/options.js +0 -1
  34. package/dist/theme/tokens.d.ts +1 -8
  35. package/dist/theme/tokens.js +1 -17
  36. package/package.json +1 -49
  37. package/dist/components/profile-header.d.ts +0 -15
  38. package/dist/components/profile-header.js +0 -40
  39. package/dist/components/recent-items.d.ts +0 -28
  40. package/dist/components/recent-items.js +0 -63
  41. package/dist/components/theme-customizer.d.ts +0 -50
  42. package/dist/components/theme-customizer.js +0 -84
  43. package/dist/components/theme-toggle.d.ts +0 -3
  44. package/dist/components/theme-toggle.js +0 -65
  45. package/dist/feedback/comment-types.d.ts +0 -17
  46. package/dist/feedback/comment-types.js +0 -1
  47. package/dist/feedback/feedback-cache.d.ts +0 -6
  48. package/dist/feedback/feedback-cache.js +0 -58
  49. package/dist/feedback/feedback-center-model.d.ts +0 -8
  50. package/dist/feedback/feedback-center-model.js +0 -37
  51. package/dist/feedback/feedback-composer-types.d.ts +0 -11
  52. package/dist/feedback/feedback-composer-types.js +0 -1
  53. package/dist/feedback/feedback-controller.d.ts +0 -56
  54. package/dist/feedback/feedback-controller.js +0 -181
  55. package/dist/feedback/feedback-tracking-types.d.ts +0 -14
  56. package/dist/feedback/feedback-tracking-types.js +0 -1
  57. package/dist/feedback/submit-feedback-with-attachments.d.ts +0 -10
  58. package/dist/feedback/submit-feedback-with-attachments.js +0 -10
  59. package/dist/theme/index.d.ts +0 -3
  60. package/dist/theme/index.js +0 -7
@@ -3,19 +3,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * The keyboard cheat sheet: `?` opens a dialog of every hotkey registered with a `meta.name`,
4
4
  * grouped by `meta.group`, read from the hotkeys registry, so it lists what the mounted app and
5
5
  * page bind. A row joins the hotkeys that share a name, such as ← and Page Up for the previous page.
6
- * `KeyboardShortcutSettings` lists the app's rebindable hotkeys (`defineAppHotkeys` on the root
7
- * `HotkeysProvider`) and records a new one for each.
8
6
  */
9
- import { useState } from "react";
10
7
  import { css } from "#primitives/css";
11
- import { Button } from "./button.js";
12
8
  import { useControllableState } from "./controllable-state.js";
13
- import { formatForDisplay, useAppHotkeyList, useCustomHotkeys, useHotkey, useHotkeyRecorder, useHotkeyRegistrations, } from "./hotkeys.js";
9
+ import { formatForDisplay, useHotkey, useHotkeyRegistrations, } from "./hotkeys.js";
14
10
  import { ShortcutHint } from "./keycap.js";
15
- import { Cluster, Eyebrow, MutedText } from "./layout.js";
11
+ import { Eyebrow } from "./layout.js";
16
12
  import { useCiridaeLocale } from "./locale.js";
17
13
  import { Dialog } from "./overlays.js";
18
- import { SettingsPanel, SettingsRow } from "./settings.js";
19
14
  const groupStyle = css({ display: "grid", gap: "layout.controlGap", margin: "none" });
20
15
  const rowStyle = css({
21
16
  display: "flex",
@@ -50,42 +45,3 @@ export function KeyboardShortcuts({ hotkey = "Mod+/", open: ownOpen, onOpenChang
50
45
  const groups = useShortcutGroups(labels.keyboard.general);
51
46
  return (_jsx(Dialog, { open: open, onOpenChange: (next) => setOpen(next), kind: "info", title: labels.keyboard.shortcuts, children: [...groups].map(([group, rows]) => (_jsxs("section", { className: groupStyle, children: [_jsx(Eyebrow, { render: _jsx("h3", {}), children: group }), _jsx("dl", { className: groupStyle, children: [...rows].map(([name, hotkeys]) => (_jsxs("div", { className: rowStyle, children: [_jsx("dt", { children: name }), _jsx("dd", { children: [...hotkeys].map(([key, rowHotkey]) => (_jsx(ShortcutHint, { hotkey: rowHotkey }, key))) })] }, name))) })] }, group))) }));
52
47
  }
53
- /** A row's hotkey, recorded anew on Change: a chord, or two steps such as G then I. */
54
- function ShortcutSettingRow({ appHotkey, isCustom }) {
55
- const { labels } = useCiridaeLocale();
56
- const { findConflicts, setCustomHotkey, resetCustomHotkey } = useCustomHotkeys();
57
- const [problem, setProblem] = useState(null);
58
- const recorder = useHotkeyRecorder({
59
- maxSteps: 2,
60
- // By the key's character, as the defaults are written, so conflicts compare like with like.
61
- recordBy: "key",
62
- validate: (hotkey) => {
63
- const [conflict] = findConflicts(appHotkey.id, hotkey);
64
- return conflict ? labels.keyboard.usedBy(conflict.meta?.name ?? conflict.id) : true;
65
- },
66
- onReject: (rejection) => setProblem(rejection.message),
67
- onRecord: (hotkey) => {
68
- setProblem(null);
69
- setCustomHotkey(appHotkey.id, hotkey);
70
- },
71
- });
72
- return (_jsx(SettingsRow, { label: appHotkey.meta?.name ?? appHotkey.id, children: _jsxs(Cluster, { gap: "8", children: [problem && _jsx(MutedText, { children: problem }), recorder.isRecording ? (_jsx(MutedText, { children: recorder.steps.length > 0
73
- ? formatForDisplay(recorder.steps)
74
- : labels.keyboard.pressKeys })) : appHotkey.hotkey ? (_jsx(ShortcutHint, { hotkey: appHotkey.hotkey })) : (_jsx(MutedText, { children: labels.keyboard.unassigned })), _jsx(Button, { variant: "secondary", onClick: () => {
75
- setProblem(null);
76
- if (recorder.isRecording)
77
- recorder.cancelRecording();
78
- else
79
- recorder.startRecording();
80
- }, children: recorder.isRecording ? labels.common.cancel : labels.keyboard.change }), isCustom && (_jsx(Button, { variant: "ghost", onClick: () => resetCustomHotkey(appHotkey.id), children: labels.keyboard.reset }))] }) }));
81
- }
82
- /** The app's rebindable hotkeys under their groups, each with Change and, once changed, Reset. */
83
- export function KeyboardShortcutSettings() {
84
- const { labels } = useCiridaeLocale();
85
- const groups = new Map();
86
- for (const item of useAppHotkeyList()) {
87
- const group = item.appHotkey.meta?.group ?? labels.keyboard.general;
88
- groups.set(group, [...(groups.get(group) ?? []), item]);
89
- }
90
- return [...groups].map(([group, items]) => (_jsx(SettingsPanel, { title: group, children: items.map((item) => (_jsx(ShortcutSettingRow, { appHotkey: item.appHotkey, isCustom: item.isCustom }, item.appHotkey.id))) }, group)));
91
- }
@@ -101,12 +101,6 @@ export declare const englishLabels: {
101
101
  closePanel: string;
102
102
  record: string;
103
103
  editField: string;
104
- /** `KeyboardShortcutSettings`. */
105
- change: string;
106
- reset: string;
107
- unassigned: string;
108
- pressKeys: string;
109
- usedBy: (name: string) => string;
110
104
  };
111
105
  dates: {
112
106
  today: string;
@@ -245,18 +239,6 @@ export declare const englishLabels: {
245
239
  pointerNote: (index: number) => string;
246
240
  removePointer: (index: number) => string;
247
241
  };
248
- /** The feedback sheet's Tickets tab, for the people who answer feedback. */
249
- feedbackOperator: {
250
- allTitle: string;
251
- mine: string;
252
- search: string;
253
- status: string;
254
- type: string;
255
- reporter: string;
256
- noneReceived: string;
257
- noMatches: string;
258
- statusFailed: string;
259
- };
260
242
  lightbox: {
261
243
  previous: string;
262
244
  next: string;
@@ -307,13 +289,6 @@ export declare const englishLabels: {
307
289
  reading: string;
308
290
  scrollToLatest: string;
309
291
  };
310
- projectCard: {
311
- default: string;
312
- dedicated: string;
313
- archived: string;
314
- created: (when: ReactNode) => ReactNode;
315
- lastEdited: (when: ReactNode) => ReactNode;
316
- };
317
292
  table: {
318
293
  nothingToShow: string;
319
294
  noResults: string;
@@ -491,17 +466,12 @@ export declare const englishLabels: {
491
466
  menu: string;
492
467
  signOut: string;
493
468
  };
494
- themeCustomizer: {
495
- colorTheme: string;
469
+ /** The account menu's Color theme item and its three choices. */
470
+ colorTheme: {
471
+ title: string;
496
472
  system: string;
497
473
  light: string;
498
474
  dark: string;
499
- displayFont: string;
500
- sansFont: string;
501
- monoFont: string;
502
- };
503
- profileHeader: {
504
- email: string;
505
475
  };
506
476
  editableField: {
507
477
  edit: (label: string) => string;
@@ -521,14 +491,6 @@ export type CiridaeLabelOverrides = {
521
491
  export type DateInput = Date | number | string;
522
492
  /** Epoch milliseconds, a Date, or an ISO string; a string without a zone is UTC. */
523
493
  export declare function toDate(value: DateInput): Date;
524
- export type MoneyFormatOptions = {
525
- /** An ISO 4217 code: "USD", "EUR", "JPY", ... Defaults to USD. */
526
- currency?: string;
527
- /** Abbreviate to K, M and B. */
528
- compact?: boolean;
529
- /** Show minor units; defaults to true unless compact. */
530
- cents?: boolean;
531
- };
532
494
  /** Plural forms keyed by `Intl.PluralRules` category; `#` stands for the formatted count. */
533
495
  export type PluralForms = Partial<Record<Intl.LDMLPluralRule, string>> & {
534
496
  other: string;
@@ -546,7 +508,6 @@ export type CiridaeLocale = {
546
508
  /** "3 hours ago", "in 2 days", "yesterday", against `now`. */
547
509
  formatRelative: (value: DateInput, now?: number) => string;
548
510
  formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;
549
- formatMoney: (amount: number, options?: MoneyFormatOptions) => string;
550
511
  /** `12 kB`, `1.4 MB`, in units of 1024. */
551
512
  formatFileSize: (bytes: number) => string;
552
513
  /** Items as a list, joined by the `common.listSeparator` label, keeping each item's content. */
@@ -89,12 +89,6 @@ export const englishLabels = {
89
89
  closePanel: "Close panel",
90
90
  record: "Record",
91
91
  editField: "Edit field",
92
- /** `KeyboardShortcutSettings`. */
93
- change: "Change",
94
- reset: "Reset",
95
- unassigned: "Unassigned",
96
- pressKeys: "Press keys…",
97
- usedBy: (name) => `Used by ${name}`,
98
92
  },
99
93
  dates: { today: "Today", yesterday: "Yesterday", earlier: "Earlier" },
100
94
  dropzone: {
@@ -218,18 +212,6 @@ export const englishLabels = {
218
212
  pointerNote: (index) => `Pointer ${index} note`,
219
213
  removePointer: (index) => `Remove pointer ${index}`,
220
214
  },
221
- /** The feedback sheet's Tickets tab, for the people who answer feedback. */
222
- feedbackOperator: {
223
- allTitle: "All feedback",
224
- mine: "Mine",
225
- search: "Search feedback",
226
- status: "Status",
227
- type: "Type",
228
- reporter: "Reporter",
229
- noneReceived: "No feedback yet",
230
- noMatches: "No feedback matches",
231
- statusFailed: "Couldn't change the status",
232
- },
233
215
  lightbox: {
234
216
  previous: "Previous file",
235
217
  next: "Next file",
@@ -276,13 +258,6 @@ export const englishLabels = {
276
258
  reading: "Reading",
277
259
  scrollToLatest: "Scroll to latest",
278
260
  },
279
- projectCard: {
280
- default: "Default",
281
- dedicated: "Dedicated",
282
- archived: "Archived",
283
- created: (when) => _jsxs(_Fragment, { children: ["Created: ", when] }),
284
- lastEdited: (when) => _jsxs(_Fragment, { children: ["Last edited: ", when] }),
285
- },
286
261
  table: {
287
262
  nothingToShow: "Nothing to show.",
288
263
  noResults: "No results",
@@ -436,16 +411,8 @@ export const englishLabels = {
436
411
  /** Read before a `ValueChange`'s old and new values, which a screen reader does not mark as struck. */
437
412
  valueChange: { from: "from", to: "to" },
438
413
  accountMenu: { menu: "Account menu", signOut: "Sign out" },
439
- themeCustomizer: {
440
- colorTheme: "Color theme",
441
- system: "System",
442
- light: "Light",
443
- dark: "Dark",
444
- displayFont: "Display font",
445
- sansFont: "Body font",
446
- monoFont: "Mono font",
447
- },
448
- profileHeader: { email: "email" },
414
+ /** The account menu's Color theme item and its three choices. */
415
+ colorTheme: { title: "Color theme", system: "System", light: "Light", dark: "Dark" },
449
416
  editableField: {
450
417
  edit: (label) => `Change ${label}`,
451
418
  saving: "Saving",
@@ -507,7 +474,6 @@ function mergeLabels(overrides) {
507
474
  feedback: { ...englishLabels.feedback, ...overrides.feedback },
508
475
  chat: { ...englishLabels.chat, ...overrides.chat },
509
476
  lightbox: { ...englishLabels.lightbox, ...overrides.lightbox },
510
- projectCard: { ...englishLabels.projectCard, ...overrides.projectCard },
511
477
  table: { ...englishLabels.table, ...overrides.table },
512
478
  sidePanel: { ...englishLabels.sidePanel, ...overrides.sidePanel },
513
479
  checklist: { ...englishLabels.checklist, ...overrides.checklist },
@@ -519,11 +485,9 @@ function mergeLabels(overrides) {
519
485
  settings: { ...englishLabels.settings, ...overrides.settings },
520
486
  navigation: { ...englishLabels.navigation, ...overrides.navigation },
521
487
  documentViewer: { ...englishLabels.documentViewer, ...overrides.documentViewer },
522
- themeCustomizer: { ...englishLabels.themeCustomizer, ...overrides.themeCustomizer },
523
- profileHeader: { ...englishLabels.profileHeader, ...overrides.profileHeader },
524
- feedbackOperator: { ...englishLabels.feedbackOperator, ...overrides.feedbackOperator },
525
488
  clipboard: { ...englishLabels.clipboard, ...overrides.clipboard },
526
489
  accountMenu: { ...englishLabels.accountMenu, ...overrides.accountMenu },
490
+ colorTheme: { ...englishLabels.colorTheme, ...overrides.colorTheme },
527
491
  appFrame: { ...englishLabels.appFrame, ...overrides.appFrame },
528
492
  priority: { ...englishLabels.priority, ...overrides.priority },
529
493
  objectiveHeader: { ...englishLabels.objectiveHeader, ...overrides.objectiveHeader },
@@ -552,15 +516,6 @@ export function createCiridaeLocale(locale, { labels, dir = "ltr" } = {}) {
552
516
  return relativeFormat.format(unit === "second" ? 0 : Math.round(seconds / size), unit);
553
517
  },
554
518
  formatNumber,
555
- formatMoney: (amount, { currency = "USD", compact = false, cents = !compact } = {}) => formatNumber(amount, {
556
- style: "currency",
557
- currency,
558
- ...(compact
559
- ? { notation: "compact", compactDisplay: "short", maximumFractionDigits: 1 }
560
- : cents
561
- ? {}
562
- : { maximumFractionDigits: 0 }),
563
- }),
564
519
  formatFileSize: (bytes) => {
565
520
  if (bytes < 1024)
566
521
  return formatNumber(bytes, { style: "unit", unit: "byte", unitDisplay: "short" });
@@ -16,5 +16,3 @@ export declare function LogOutput({ tone, framed, className, ref, ...props }: Co
16
16
  framed?: boolean;
17
17
  ref?: Ref<HTMLPreElement>;
18
18
  }): import("react").JSX.Element;
19
- /** Placeholder for plain monospace output such as Docker Compose logs. */
20
- export declare function LogOutputSkeleton(): import("react").JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { css, cx } from "#primitives/css";
3
- import { Skeleton } from "./skeleton.js";
4
3
  // The frame below is repeated per composition rather than layered with `cx`, so that each
5
4
  // variant's own `overflow` wins regardless of the order Panda emits its utilities in.
6
5
  const list = css({
@@ -55,21 +54,6 @@ const errorTone = css({
55
54
  borderRadius: "inset",
56
55
  color: "accent.red",
57
56
  });
58
- const skeletonOutput = css({
59
- containerType: "inline-size",
60
- height: "table.scroll",
61
- minHeight: "log.minimum",
62
- margin: "none",
63
- padding: "panel.default",
64
- overflow: "hidden",
65
- whiteSpace: "pre-wrap",
66
- overflowWrap: "anywhere",
67
- border: "1px solid token(colors.border.subtle)",
68
- background: "bg.panel",
69
- fontFamily: "numeric",
70
- fontSize: "log.body",
71
- lineHeight: "body",
72
- });
73
57
  /**
74
58
  * Scroll frame holding a deployment's log rows. `fill` grows it to the rest of a flex column, such
75
59
  * as an overlay, instead of a fixed height.
@@ -84,9 +68,3 @@ export function LogList({ fill = false, className, ref, ...props }) {
84
68
  export function LogOutput({ tone, framed = false, className, ref, ...props }) {
85
69
  return (_jsx("pre", { ...props, ref: ref, className: cx(framed ? framedOutput : output, tone === "error" && errorTone, className) }));
86
70
  }
87
- const rows = Array.from({ length: 40 }, (_, index) => index);
88
- const messageWidths = ["82%", "64%", "91%", "48%", "73%", "57%"];
89
- /** Placeholder for plain monospace output such as Docker Compose logs. */
90
- export function LogOutputSkeleton() {
91
- return (_jsx("div", { className: skeletonOutput, children: rows.map((index) => (_jsx(Skeleton, { shape: "text", style: { width: messageWidths[index % messageWidths.length] } }, index))) }));
92
- }
@@ -40,29 +40,6 @@ export type RelatedTabsProps = Omit<ComponentProps<typeof TabsRoot>, "children"
40
40
  onValueChange?: (value: string) => void;
41
41
  };
42
42
  export declare function RelatedTabs({ tabs, value, defaultValue, onValueChange, className, ...props }: RelatedTabsProps): import("react").JSX.Element | null;
43
- export type ItemCardField = {
44
- label: ReactNode;
45
- value: ReactNode;
46
- /** The column's share of the row, as a grid `fr`. Defaults to 1. */
47
- weight?: number;
48
- };
49
- export type ItemCardProps = Omit<useRender.ComponentProps<"button">, "children" | "onSelect"> & {
50
- title: ReactNode;
51
- progress?: readonly StepStatus[];
52
- fields: readonly ItemCardField[];
53
- /** The footer's start: the stage the item is at. */
54
- status: {
55
- label: ReactNode;
56
- status: StepStatus;
57
- };
58
- /** The footer's end, such as what comes next. */
59
- footer?: ReactNode;
60
- selected?: boolean;
61
- /** Makes the card a button; `href` or a router link as `render` makes it a link. */
62
- onSelect?: () => void;
63
- href?: string;
64
- };
65
- export declare function ItemCard({ title, progress, fields, status, footer, selected, onSelect, onClick, href, render, className, style, ...props }: ItemCardProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
66
43
  export type PartRowProps = Omit<ComponentProps<"div">, "children" | "onSelect"> & {
67
44
  /** `wide` is one line, as in a table; `compact` stacks for a narrow column. */
68
45
  layout?: "wide" | "compact";
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  /*
3
3
  * The pieces a record's page is laid out with. `DetailLayout` splits it into the work and a side
4
4
  * column; `PageHeading` (also exported here) is the record's title row; `RelatedTabs` is the tabbed card of what the
5
- * record holds; `ItemCard` is one of a record's parts, such as a shipment or a draw, as a card and
6
- * `PartRow` as a row; `RelatedList` lists the records and documents it points at.
5
+ * record holds; `PartRow` is one of a record's parts, such as a shipment or a draw, as a row;
6
+ * `RelatedList` lists the records and documents it points at.
7
7
  */
8
8
  import { useRender } from "@base-ui/react/use-render";
9
9
  import { CaretRightIcon } from "@phosphor-icons/react";
@@ -14,7 +14,6 @@ import { useControllableState } from "./controllable-state.js";
14
14
  import { directional, icon } from "./icon.js";
15
15
  import { MutedText } from "./layout.js";
16
16
  import { useCiridaeLocale } from "./locale.js";
17
- import { cardSurface } from "./panel.js";
18
17
  import { StepDot } from "./stages.js";
19
18
  import { TabsList, TabsPanel, TabsRoot, TabsTab } from "./tabs.js";
20
19
  /*
@@ -111,33 +110,6 @@ export function RelatedTabs({ tabs, value, defaultValue, onValueChange, classNam
111
110
  return null;
112
111
  return (_jsxs(TabsRoot, { value: open.value, onValueChange: (next) => setChosen(String(next)), ...props, className: cx(relatedCard, className), "data-ciridae-ui": "", children: [_jsxs("div", { className: relatedHeader, children: [_jsx(TabsList, { variant: "contained", children: tabs.map((tab) => (_jsx(TabsTab, { value: tab.value, count: tab.count, children: tab.label }, tab.value))) }), open.meta !== undefined && _jsx(MutedText, { className: relatedMeta, children: open.meta })] }), tabs.map((tab) => (_jsx(TabsPanel, { value: tab.value, children: tab.content }, tab.value)))] }));
113
112
  }
114
- const itemCard = css(cardSurface, {
115
- display: "grid",
116
- gap: "layout.clusterGap",
117
- padding: "panel.comfortable",
118
- textAlign: "start",
119
- color: "fg.primary",
120
- font: "inherit",
121
- letterSpacing: "compact",
122
- textDecoration: "none",
123
- "&:is(button, a)": { cursor: "pointer", _hover: { borderColor: "border.glass" } },
124
- "&[data-selected]": {
125
- borderColor: "accent.green",
126
- boxShadow: "soft",
127
- _hover: { borderColor: "accent.green" },
128
- },
129
- _focusVisible: { focusRing: "outer" },
130
- });
131
- const itemHeader = css({
132
- display: "flex",
133
- alignItems: "center",
134
- justifyContent: "space-between",
135
- gap: "layout.controlGap",
136
- fontSize: "body",
137
- fontWeight: "medium",
138
- lineHeight: "tight",
139
- whiteSpace: "nowrap",
140
- });
141
113
  const progressStrip = css({
142
114
  display: "inline-flex",
143
115
  flexShrink: "0",
@@ -154,56 +126,6 @@ const progressConnector = css({
154
126
  function MiniStrip({ progress }) {
155
127
  return (_jsx("span", { className: progressStrip, "aria-hidden": "true", children: progress.map((step, index) => (_jsxs(Fragment, { children: [index > 0 && (_jsx("span", { className: progressConnector, "data-after": progress[index - 1] === "done" ? "done" : undefined })), _jsx(StepDot, { status: step, size: "chip" })] }, index))) }));
156
128
  }
157
- const itemFields = css({
158
- display: "grid",
159
- gap: "layout.controlGap",
160
- paddingBottom: "panel.default",
161
- fontSize: "code",
162
- fontWeight: "medium",
163
- });
164
- const itemFieldLabel = css({
165
- display: "block",
166
- marginBottom: "layout.controlGap",
167
- color: "fg.subtle",
168
- fontWeight: "regular",
169
- letterSpacing: "[normal]",
170
- });
171
- const itemFooter = css({
172
- display: "flex",
173
- alignItems: "center",
174
- justifyContent: "space-between",
175
- gap: "layout.controlGap",
176
- paddingTop: "panel.default",
177
- borderTop: "1px solid token(colors.border.panel)",
178
- color: "fg.muted",
179
- fontSize: "code",
180
- fontWeight: "medium",
181
- });
182
- const itemStatus = css({ display: "inline-flex", alignItems: "center", gap: "layout.tightGap" });
183
- export function ItemCard({ title, progress, fields, status, footer, selected = false, onSelect, onClick, href, render, className, style, ...props }) {
184
- const interactive = onSelect !== undefined || href !== undefined || render !== undefined;
185
- const columns = {
186
- gridTemplateColumns: fields.map((field) => `minmax(0, ${field.weight ?? 1}fr)`).join(" "),
187
- };
188
- return useRender({
189
- defaultTagName: href !== undefined ? "a" : interactive ? "button" : "div",
190
- render,
191
- props: {
192
- ...(href !== undefined ? { href } : interactive ? { type: "button" } : {}),
193
- ...props,
194
- style,
195
- onClick: (event) => {
196
- onClick?.(event);
197
- onSelect?.();
198
- },
199
- className: cx(itemCard, className),
200
- "data-ciridae-ui": "",
201
- "data-selected": selected || undefined,
202
- "aria-pressed": onSelect !== undefined && href === undefined ? selected : undefined,
203
- children: (_jsxs(_Fragment, { children: [_jsxs("span", { className: itemHeader, children: [title, progress && _jsx(MiniStrip, { progress: progress })] }), _jsxs("span", { className: css({ display: "grid" }), children: [_jsx("span", { className: itemFields, style: columns, children: fields.map((field, index) => (_jsxs("span", { children: [_jsx("span", { className: itemFieldLabel, children: field.label }), field.value] }, index))) }), _jsxs("span", { className: itemFooter, children: [_jsxs("span", { className: itemStatus, children: [_jsx(StepDot, { status: status.status, size: "small" }), status.label] }), footer] })] })] })),
204
- },
205
- });
206
- }
207
129
  const partRow = css({
208
130
  position: "relative",
209
131
  display: "flex",
@@ -1,7 +1,6 @@
1
1
  import { useRender } from "@base-ui/react/use-render";
2
2
  import type { ComponentProps, ReactNode } from "react";
3
3
  export declare function SidebarNavigation({ className, ...props }: ComponentProps<"nav">): import("react").JSX.Element;
4
- export declare function SidebarDivider({ className, ...props }: ComponentProps<"hr">): import("react").JSX.Element;
5
4
  export declare function SidebarRailRule({ className, ...props }: ComponentProps<"hr">): import("react").JSX.Element;
6
5
  export declare function SidebarPanel({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
7
6
  export declare function SidebarSection({ label, action, iconTone, className, children, ...props }: ComponentProps<"div"> & {
@@ -44,13 +44,6 @@ const railRule = css({
44
44
  border: "0",
45
45
  background: "border.divider",
46
46
  });
47
- const divider = css({
48
- width: "full",
49
- height: "border.hairline",
50
- margin: "none",
51
- border: "0",
52
- background: "border.hairline",
53
- });
54
47
  // A hover is a faint wash in light and the selected glass in dark.
55
48
  const item = css({
56
49
  display: "flex",
@@ -182,9 +175,6 @@ const headingName = css({
182
175
  export function SidebarNavigation({ className, ...props }) {
183
176
  return _jsx("nav", { ...props, className: cx(navigation, className), "data-ciridae-ui": "" });
184
177
  }
185
- export function SidebarDivider({ className, ...props }) {
186
- return _jsx("hr", { ...props, className: cx(divider, className), "data-ciridae-ui": "" });
187
- }
188
178
  export function SidebarRailRule({ className, ...props }) {
189
179
  return _jsx("hr", { ...props, className: cx(railRule, className), "data-ciridae-ui": "" });
190
180
  }
@@ -4,9 +4,6 @@ export declare function TabsRoot({ className, ...props }: Omit<ComponentProps<ty
4
4
  className?: string;
5
5
  }): import("react").JSX.Element;
6
6
  export declare const TabsPanel: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").TabsPanelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
- export declare function TabsGroup({ border, className, ...props }: ComponentProps<"span"> & {
8
- border?: "control" | "glass";
9
- }): import("react").JSX.Element;
10
7
  export declare function TabsList({ className, variant, overflow: ownOverflow, children, ...props }: Omit<ComponentProps<typeof BaseTabs.List>, "className"> & {
11
8
  className?: string;
12
9
  /**
@@ -134,10 +134,6 @@ const tab = css({
134
134
  fontSize: "caption",
135
135
  },
136
136
  });
137
- const group = css({ display: "flex", flexShrink: "0", borderRadius: "pill" });
138
- export function TabsGroup({ border = "control", className, ...props }) {
139
- return _jsx("span", { ...props, className: cx(group, className), "data-ciridae-ui": "", "data-edge": border });
140
- }
141
137
  const InTabsBarContext = createContext(false);
142
138
  /*
143
139
  * Moves the tabs that do not fit the row's width into a trailing "more" menu, measuring every tab
@@ -1,9 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import type { FeedbackCreateRequest, FeedbackAttachment, FeedbackErrorDetail, FeedbackItem, FeedbackMessage, FeedbackMessageCreateRequest, FeedbackStatusEvent, FeedbackSummary, FeedbackUpdateRequest } from "./generated/types.gen.js";
3
- declare const feedbackCreateHeadersSchema: z.ZodObject<{
4
- 'Idempotency-Key': z.ZodUUID;
5
- 'X-POSTHOG-SESSION-ID': z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
- }, z.core.$strip>;
7
3
  declare const feedbackAttachmentSchema: z.ZodObject<{
8
4
  id: z.ZodString;
9
5
  name: z.ZodString;
@@ -151,9 +147,6 @@ declare const feedbackListResponseSchema: z.ZodObject<{
151
147
  updatedAt_epoch_milliseconds: z.ZodInt;
152
148
  }, z.core.$strip>>;
153
149
  }, z.core.$strip>;
154
- declare const feedbackMessageCreateInputSchema: z.ZodObject<{
155
- body: z.ZodString;
156
- }, z.core.$strict>;
157
150
  declare const feedbackMessageSchema: z.ZodObject<{
158
151
  id: z.ZodString;
159
152
  author: z.ZodObject<{
@@ -169,19 +162,6 @@ declare const feedbackMessageSchema: z.ZodObject<{
169
162
  createdAt_epoch_milliseconds: z.ZodInt;
170
163
  editedAt_epoch_milliseconds: z.ZodNullable<z.ZodInt>;
171
164
  }, z.core.$strip>;
172
- declare const feedbackStatusEventSchema: z.ZodObject<{
173
- id: z.ZodString;
174
- status: z.ZodEnum<{
175
- received: "received";
176
- in_progress: "in_progress";
177
- discussion_required: "discussion_required";
178
- completed: "completed";
179
- no_action: "no_action";
180
- withdrawn: "withdrawn";
181
- }>;
182
- createdAt: z.ZodISODateTime;
183
- createdAt_epoch_milliseconds: z.ZodInt;
184
- }, z.core.$strip>;
185
165
  declare const feedbackStatusSchema: z.ZodEnum<{
186
166
  received: "received";
187
167
  in_progress: "in_progress";
@@ -230,10 +210,6 @@ declare const feedbackTypeSchema: z.ZodEnum<{
230
210
  bug: "bug";
231
211
  feature: "feature";
232
212
  }>;
233
- declare const feedbackUpdateInputSchema: z.ZodObject<{
234
- subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
- }, z.core.$strict>;
237
213
  declare const feedbackMaxLengths: {
238
214
  readonly description: number;
239
215
  readonly subject: number;
@@ -251,4 +227,4 @@ type FeedbackStatus = FeedbackSummary["status"];
251
227
  type FeedbackType = FeedbackSummary["type"];
252
228
  type FeedbackUrgency = FeedbackSummary["urgency"];
253
229
  type FeedbackUpdateInput = FeedbackUpdateRequest;
254
- export { feedbackAttachmentLimits, feedbackAttachmentSchema, type FeedbackAttachment, feedbackCreateHeadersSchema, feedbackCreateInputSchema, feedbackErrorResponseSchema, feedbackItemSchema, feedbackListResponseSchema, feedbackMessageCreateInputSchema, feedbackMessageSchema, feedbackMaxLengths, feedbackStatusEventSchema, feedbackStatusSchema, feedbackSummarySchema, feedbackTypeSchema, feedbackUpdateInputSchema, type FeedbackAffectedScope, type FeedbackCreateInput, type FeedbackErrorCode, type FeedbackItem, type FeedbackMessage, type FeedbackMessageCreateInput, type FeedbackStatus, type FeedbackStatusEvent, type FeedbackSummary, type FeedbackType, type FeedbackUrgency, type FeedbackUpdateInput, };
230
+ export { feedbackAttachmentLimits, feedbackAttachmentSchema, type FeedbackAttachment, feedbackCreateInputSchema, feedbackErrorResponseSchema, feedbackItemSchema, feedbackListResponseSchema, feedbackMessageSchema, feedbackMaxLengths, feedbackStatusSchema, feedbackSummarySchema, feedbackTypeSchema, type FeedbackAffectedScope, type FeedbackCreateInput, type FeedbackErrorCode, type FeedbackItem, type FeedbackMessage, type FeedbackMessageCreateInput, type FeedbackStatus, type FeedbackStatusEvent, type FeedbackSummary, type FeedbackType, type FeedbackUrgency, type FeedbackUpdateInput, };
@@ -1,18 +1,14 @@
1
1
  import { z } from "zod";
2
- import { zBodyCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPost, zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostHeaders, zFeedbackCreateRequest, zFeedbackAttachment, zFeedbackErrorResponse, zFeedbackItem, zFeedbackListResponse, zFeedbackMessage, zFeedbackMessageCreateRequest, zFeedbackStatusEvent, zFeedbackSummary, zFeedbackUpdateRequest, } from "./generated/zod.gen.js";
3
- const feedbackCreateHeadersSchema = zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostHeaders;
2
+ import { zBodyCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPost, zFeedbackCreateRequest, zFeedbackAttachment, zFeedbackErrorResponse, zFeedbackItem, zFeedbackListResponse, zFeedbackMessage, zFeedbackSummary, } from "./generated/zod.gen.js";
4
3
  const feedbackAttachmentSchema = zFeedbackAttachment;
5
4
  const feedbackCreateInputSchema = zFeedbackCreateRequest;
6
5
  const feedbackErrorResponseSchema = zFeedbackErrorResponse;
7
6
  const feedbackItemSchema = zFeedbackItem;
8
7
  const feedbackListResponseSchema = zFeedbackListResponse;
9
- const feedbackMessageCreateInputSchema = zFeedbackMessageCreateRequest;
10
8
  const feedbackMessageSchema = zFeedbackMessage;
11
- const feedbackStatusEventSchema = zFeedbackStatusEvent;
12
9
  const feedbackStatusSchema = zFeedbackSummary.shape.status;
13
10
  const feedbackSummarySchema = zFeedbackSummary;
14
11
  const feedbackTypeSchema = zFeedbackCreateRequest.shape.type;
15
- const feedbackUpdateInputSchema = zFeedbackUpdateRequest;
16
12
  const feedbackMaxLengths = {
17
13
  description: requireMaximum(zFeedbackCreateRequest.shape.description.maxLength, "description"),
18
14
  subject: requireMaximum(zFeedbackCreateRequest.shape.subject.maxLength, "subject"),
@@ -32,4 +28,4 @@ function requireMaximum(value, field) {
32
28
  throw new Error(`Feedback contract is missing the ${field} maximum.`);
33
29
  return value;
34
30
  }
35
- export { feedbackAttachmentLimits, feedbackAttachmentSchema, feedbackCreateHeadersSchema, feedbackCreateInputSchema, feedbackErrorResponseSchema, feedbackItemSchema, feedbackListResponseSchema, feedbackMessageCreateInputSchema, feedbackMessageSchema, feedbackMaxLengths, feedbackStatusEventSchema, feedbackStatusSchema, feedbackSummarySchema, feedbackTypeSchema, feedbackUpdateInputSchema, };
31
+ export { feedbackAttachmentLimits, feedbackAttachmentSchema, feedbackCreateInputSchema, feedbackErrorResponseSchema, feedbackItemSchema, feedbackListResponseSchema, feedbackMessageSchema, feedbackMaxLengths, feedbackStatusSchema, feedbackSummarySchema, feedbackTypeSchema, };
@@ -1,7 +1,5 @@
1
- import { type UseQueryResult } from "@tanstack/react-query";
2
1
  import { type FeedbackOperatorClientConfig } from "./operator-client.js";
3
2
  import type { FeedbackTriageStatus } from "./operator-contract.js";
4
- import type { FeedbackOperatorProps } from "../components/feedback-sheet.js";
5
3
  type FeedbackOperatorControllerConfig = FeedbackOperatorClientConfig & {
6
4
  /** Keeps one operator's cached feedback apart from another's, such as their user id. */
7
5
  cacheScope: string;
@@ -12,7 +10,7 @@ type FeedbackOperatorControllerConfig = FeedbackOperatorClientConfig & {
12
10
  */
13
11
  declare function useFeedbackOperatorController(config: FeedbackOperatorControllerConfig, openFeedbackId: string | undefined, active?: boolean): {
14
12
  getAttachmentUrl: (feedbackId: string, attachmentId: string) => Promise<string>;
15
- itemQuery: UseQueryResult<NoInfer<{
13
+ itemQuery: import("@tanstack/react-query").UseQueryResult<NoInfer<{
16
14
  status: "received" | "in_progress" | "discussion_required" | "completed" | "no_action" | "withdrawn";
17
15
  type: "general" | "bug" | "feature";
18
16
  description: string;
@@ -42,7 +40,7 @@ declare function useFeedbackOperatorController(config: FeedbackOperatorControlle
42
40
  editedAt_epoch_milliseconds: number | null;
43
41
  }[];
44
42
  }>, Error>;
45
- itemsQuery: UseQueryResult<NoInfer<{
43
+ itemsQuery: import("@tanstack/react-query").UseQueryResult<NoInfer<{
46
44
  status: "received" | "in_progress" | "discussion_required" | "completed" | "no_action" | "withdrawn";
47
45
  type: "general" | "bug" | "feature";
48
46
  description: string;
@@ -91,9 +89,4 @@ declare function useFeedbackOperatorController(config: FeedbackOperatorControlle
91
89
  status: FeedbackTriageStatus;
92
90
  }, unknown>;
93
91
  };
94
- /**
95
- * The feedback sheet's `operator` tab, run against the API: pass it while the viewer answers
96
- * feedback, with `active` while the sheet is open.
97
- */
98
- declare function useFeedbackOperatorSheet(config: FeedbackOperatorControllerConfig, active: boolean): FeedbackOperatorProps;
99
- export { type FeedbackOperatorControllerConfig, useFeedbackOperatorController, useFeedbackOperatorSheet, };
92
+ export { type FeedbackOperatorControllerConfig, useFeedbackOperatorController };