@archetypeai/ds-cli 0.17.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archetypeai-design-system",
3
- "version": "0.17.0",
3
+ "version": "0.18.1",
4
4
  "components": [
5
5
  {
6
6
  "name": "alert",
@@ -277,6 +277,32 @@
277
277
  }
278
278
  }
279
279
  },
280
+ {
281
+ "name": "command",
282
+ "import": "@archetypeai/ds-ui-svelte-console/primitives/command",
283
+ "source": "https://design-system-console.archetypeai.workers.dev/r/command.json",
284
+ "description": "Searchable menu: a text field over a filtered, keyboard-navigable list of items, with groups, an empty state and a footer that stays in view. Reads as a DropdownMenu.",
285
+ "usage": [
286
+ "`<Command.Root>` holds a `Command.Input`, a `Command.List` of `Command.Group`s (each a `Command.GroupHeading` and a `Command.GroupItems` of `Command.Item`s, with `Command.Separator`s between), a `Command.Empty`, and an optional `Command.Footer`. Put it in a `Popover.Content class=\"w-120 p-0\"` for a searchable menu, or on the page as a standalone search list.",
287
+ "Filtering: by default Command filters and ranks the items itself against each item's `value` (plus any `keywords`). When the caller filters (its own match rule, a sort, a server search), pass `shouldFilter={false}` and render only the matching items; bind the input with `bind:value` to read the query.",
288
+ "`Command.Input` is an `InputGroup` with the search icon at its start. Controls that belong in the field, such as a sort toggle (`Tabs` `variant=\"toggle\"` with icon-only triggers and an `aria-label` on each), go in as its children and sit at its end.",
289
+ "`Command.Item` takes `onSelect` (Enter or click) and `disabled`, which skips it in arrow-key navigation and dims it; say why in a `title`. The arrow keys move the highlight; pass `loop` on the root to wrap from the last item to the first. It takes DropdownMenu.Item's `variant` (`destructive`), `inset`, `typography` and `justify`, so a row is built the same way in both menus.",
290
+ "Mark the current pick with `data-checked={item.value === current}`: the item's trailing check shows on it, so the menu opens showing what's picked. Every item reserves the check's width, so rows line up whether or not one is checked.",
291
+ "`Command.Empty` shows when no item is left: \"No file matches “report”.\" names the query. With the built-in filter that happens on its own. With `shouldFilter={false}` Command counts every mounted item, so while a query is typed leave out the static rows (an \"All files\" row, the footer) or Empty never shows.",
292
+ "`Command.Footer` sits below the list, outside its scroll, so it stays in view however long the list is (\"Show all 240 files\"). A `Command.Item` in the footer is still reached by the arrow keys; give it `forceMount` if it should stay while a built-in filter runs.",
293
+ "Headings, items and separators take DropdownMenu's own variants (`dropdownMenuGroupHeadingVariants`, `dropdownMenuItemVariants` through `commandItemVariants`, `dropdownMenuSeparatorVariants`), so the two menus can't drift apart. Style an item's row layout with `class`; don't restyle the highlight."
294
+ ],
295
+ "variants": {
296
+ "commandItemVariants": {
297
+ "axes": {
298
+ "variant": [
299
+ "default",
300
+ "destructive"
301
+ ]
302
+ }
303
+ }
304
+ }
305
+ },
280
306
  {
281
307
  "name": "console-utils",
282
308
  "import": "@archetypeai/ds-ui-svelte-console/primitives/utils",
@@ -307,6 +333,7 @@
307
333
  "At least, for a list you cannot size: `Counter value={103} atLeast` renders `103+` when the caller has loaded 103 rows and knows only that more exist (keyset pagination, a capped query). The number is the caller's own, not a rounded threshold, and the accessible label reads \"at least 103\". Past 999 the abbreviation truncates instead of rounding, so `1250` shows `1.2K+` and never claims rows nobody loaded. `atLeast` is ignored on `value={0}`, where it would state nothing.",
308
334
  "Three axes, each one thing: `variant` is the treatment (`pill`, the default, or `bare`), `tone` is colour (`solid` or `muted`, and `muted` still reads as muted on a bare counter), and `size` is the box (`sm` for dense rows like tables and list items). Inside a tab strip use `Tabs.Count`, which re-colors it for the active/inactive trigger.",
309
335
  "A number anywhere, not just a pill: `variant=\"bare\" size=\"inherit\"` drops the pill and the mono face and takes the typography of whatever it sits in, so a headline figure, a table cell or a number in running text can roll. It sits on the surrounding baseline and reserves no width of its own, so it can be dropped mid-sentence: `Processed <Counter value={n} variant=\"bare\" size=\"inherit\" exact /> of 2,000 rows.` Size and weight come from the parent (`<span class=\"text-6xl\">`), and the digit row tracks the line height, so it works at any scale.",
336
+ "Decimals: `decimals={2}` keeps two places (`0.97`, `1.00`) instead of rounding to a whole number, rounding half up like `Math.round(v * 100) / 100`, and is never abbreviated. Use it for a score or a rate; a count stays a whole number.",
310
337
  "Exact digits: `exact` turns off the `1.2K` abbreviation and rolls the whole number. Use it where the reader is meant to read the figure rather than glance at it (a headline, a total in a sentence); leave it off in chrome, where a fifth column would reflow the layout."
311
338
  ],
312
339
  "variants": {
@@ -741,7 +768,7 @@
741
768
  "description": "Indeterminate loading bar for route/navigation transitions.",
742
769
  "usage": [
743
770
  "Mount once in the root layout and gate on navigation: `{#if navigating.to}<LoadingBar />{/if}` (SvelteKit `navigating` from `$app/state`). Presentational only — it does not read navigation state itself.",
744
- "`position=\"bottom\"` pins it to the viewport bottom; always fixed + full-width. Indeterminate only — for a determinate value bar use `progress`."
771
+ "`position=\"bottom\"` pins it to the viewport bottom; always fixed + full-width. For navigation only. Work inside a page uses `Progress`: a value when the total is known, `value={null}` when it is not."
745
772
  ],
746
773
  "variants": {
747
774
  "loadingBarVariants": {
@@ -796,15 +823,30 @@
796
823
  "Top of every dashboard shell; children render as right-side actions — `Button variant=\"link\" class=\"text-muted-foreground no-underline hover:underline\"`."
797
824
  ]
798
825
  },
826
+ {
827
+ "name": "popover",
828
+ "import": "@archetypeai/ds-ui-svelte-console/primitives/popover",
829
+ "source": "https://design-system-console.archetypeai.workers.dev/r/popover.json",
830
+ "description": "A floating panel anchored to a trigger, on DropdownMenu's surface and motion. Padded by default; hosts a Command for a searchable menu.",
831
+ "usage": [
832
+ "DropdownMenu vs Popover + Command: a plain list of actions or choices is a `DropdownMenu`. Reach for `Popover` + `Command` only when the list needs a search field, which DropdownMenu can't host (its typeahead takes the keystrokes), or a footer that stays in view while the list scrolls.",
833
+ "`<Popover.Root bind:open>` with a `Popover.Trigger` and a `Popover.Content`. The trigger is unstyled: pass a `Button` through its `child` snippet (`{#snippet child({ props })}<Button variant=\"outline\" {...props}>…</Button>{/snippet}`) so it looks like every other trigger.",
834
+ "`Popover.Content` is portalled, offset 4px, `w-72` and padded (`p-4`, children `gap-4`) for free-form content. For a searchable menu, put a `Command` inside and pass `class=\"w-120 p-0\"` (any width, no padding) so the Command sits flush. `align=\"start\"` lines it up with a trigger at the start of a row.",
835
+ "A searchable menu's trigger is a combobox: give the `Button` `role=\"combobox\"`, `aria-expanded={open}` and an `aria-label` naming what it picks (a combobox isn't named by its text, unlike a button), and bind its `ref`. On a pick, close and hand focus back to the trigger: `open = false; tick().then(() => triggerRef?.focus())`. `Popover.Close` wraps a control that should close it directly."
836
+ ]
837
+ },
799
838
  {
800
839
  "name": "progress",
801
840
  "import": "@archetypeai/ds-ui-svelte-console/primitives/progress",
802
841
  "source": "https://design-system-console.archetypeai.workers.dev/r/progress.json",
803
- "description": "Determinate progress bar.",
842
+ "description": "Progress bar: fills to a known value, or sweeps while the total is unknown.",
804
843
  "usage": [
805
844
  "A rolling percentage above the bar is composed, not a prop: wrap a bare Counter and the bar in a `flex flex-col gap-2.5`, with the figure as `<span class=\"font-mono text-6xl\"><Counter value={pct} variant=\"bare\" size=\"inherit\" exact /></span>` and a `text-muted-foreground text-lg` unit beside it. Mark the whole figure row `aria-hidden`: the bar already announces the value through `aria-valuenow`, so the number drawn beside it is presentation, not a second thing to read out.",
806
845
  "Pair with a large mono readout: `<span class=\"font-mono text-4xl\">{value}</span><span class=\"text-muted-foreground text-sm\">%</span>` beside the bar.",
807
- "`size=\"sm\"` for compact/inline progress (upload rows); always aria-label."
846
+ "`size=\"sm\"` for compact/inline progress (upload rows); always aria-label.",
847
+ "Unknown total vs not started: `value={null}` is work whose total isn't known (a running eval that reports rows scored but no row count). The bar sweeps, drops `aria-valuenow`, sets `aria-busy` and marks `data-indeterminate`. Pass `value={0}` for work with a known total that hasn't moved yet. Show what is known beside the bar (`1,276 rows scored`), never a made-up percentage.",
848
+ "Reduced motion holds the sweep still in the centre of the track, so it can't be read as partly done.",
849
+ "`variant=\"running\"` paints the bar in `atai-neutral`, the colour the console uses for a running job (see Badge's status recipe). `success` and `critical` are for finished work."
808
850
  ],
809
851
  "variants": {
810
852
  "progressVariants": {
@@ -822,6 +864,7 @@
822
864
  "axes": {
823
865
  "variant": [
824
866
  "default",
867
+ "running",
825
868
  "success",
826
869
  "critical"
827
870
  ]
@@ -842,6 +885,92 @@
842
885
  "Streaming: append rows and set `maxPoints` for a sliding window."
843
886
  ]
844
887
  },
888
+ {
889
+ "name": "score-bento",
890
+ "import": "@archetypeai/ds-ui-svelte-console/primitives/score-bento",
891
+ "source": "https://design-system-console.archetypeai.workers.dev/r/score-bento.json",
892
+ "description": "Score hero: a 0..1 score as a field of one hundred cells painted in the tone, revealed from the bottom-right corner while the figure rolls up to its value.",
893
+ "usage": [
894
+ "`ScoreBento value={0.97} label=\"Macro F1\"` paints the whole field and rolls the figure to `0.97` (a bare `Counter` with `decimals={2}`). The value is 0..1 and shown to two decimals; round the same way (`Math.round(v * 100) / 100`) anywhere else the page prints this score, so the hero and a list can't disagree on a digit.",
895
+ "Unscored vs in flight vs scored: `value={null}` renders the empty field and an em dash (no score yet, or a failed run). While the run is going, pass `status=\"running\"` with `value={null}`: a single diagonal sweeps the empty field back and forth without claiming a score, and `valueText` + `meta` carry what is known (`valueText=\"1,276\" meta=\"rows scored\"`). `status=\"completed\"` with a value reveals the field from the corner on first paint and lands the `eyebrow` once the last cell does.",
896
+ "`status` takes the agent service's eval and optimization statuses as they come (`pending`, `running`, `completed`, `failed`, `cancelled`); only `running` and `completed` move, the rest are still. Reduced motion stills both.",
897
+ "`tone` picks the colour: `neutral` (the default) paints from the theme's foreground and works for any score; `babyblue` and `yellow` are brand fills; `warning` is the system's warning colour, for a score that needs attention; `slate` is graded, so the score picks its step (below). Which tone a score wears is the caller's decision, e.g. a band map kept beside the thresholds. A score paints every cell in the tone's token at full strength in both themes, so the colour and the figure carry it, not an amount of cells; with no score the cells show the bento's background. A new colour is a new tone in `scoreBentoFieldVariants` and `scoreBentoInkVariants`, not a call-site override.",
898
+ "`tone=\"slate\"` is the one graded tone: the score's tenth picks a step on the slate scale, 50 at 0.05 up to 900 at 0.95, run the other way in dark (950 up to 100) so a high score still stands furthest from the page, with the ink flipping to white from 500. Use it where the score itself should colour the bento; the fixed tones paint the same colour at every score.",
899
+ "Around the figure: `eyebrow` is a short line above it (a verdict such as \"Great\"), `meta` a line under it, `valueText` replaces the two-decimal figure with a caller-formatted string, and `trailing` is a top-right line such as a delta against the previous run. `help` is a plain-words explanation of the label, behind an info disc in the top-right corner. `help` renders a Tooltip, so the page needs a `Tooltip.Provider` above it; put one in the app layout rather than wrapping each bento.",
900
+ "`size=\"compact\"` fits a side panel or another narrow column (a shorter field, `text-7xl` figure); `default` is the page hero. The bento sets no width or grid placement of its own: lay it out with `class` (`md:col-span-7 md:row-span-2` beside two `StatBento`s at `md:col-span-2`)."
901
+ ],
902
+ "variants": {
903
+ "scoreBentoVariants": {
904
+ "axes": {
905
+ "size": [
906
+ "default",
907
+ "compact"
908
+ ]
909
+ },
910
+ "defaults": {
911
+ "size": "default"
912
+ }
913
+ },
914
+ "scoreBentoFieldVariants": {
915
+ "axes": {
916
+ "tone": [
917
+ "neutral",
918
+ "babyblue",
919
+ "yellow",
920
+ "warning",
921
+ "slate"
922
+ ]
923
+ },
924
+ "defaults": {
925
+ "tone": "neutral"
926
+ }
927
+ },
928
+ "scoreBentoInkVariants": {
929
+ "axes": {
930
+ "tone": [
931
+ "neutral",
932
+ "babyblue",
933
+ "yellow",
934
+ "warning",
935
+ "slate"
936
+ ]
937
+ },
938
+ "defaults": {
939
+ "tone": "neutral"
940
+ }
941
+ },
942
+ "scoreBentoSlateVariants": {
943
+ "axes": {
944
+ "step": [
945
+ "0",
946
+ "1",
947
+ "2",
948
+ "3",
949
+ "4",
950
+ "5",
951
+ "6",
952
+ "7",
953
+ "8",
954
+ "9"
955
+ ]
956
+ },
957
+ "defaults": {
958
+ "step": "0"
959
+ }
960
+ },
961
+ "scoreBentoValueVariants": {
962
+ "axes": {
963
+ "size": [
964
+ "default",
965
+ "compact"
966
+ ]
967
+ },
968
+ "defaults": {
969
+ "size": "default"
970
+ }
971
+ }
972
+ }
973
+ },
845
974
  {
846
975
  "name": "select",
847
976
  "import": "@archetypeai/ds-ui-svelte-console/primitives/select",
@@ -928,7 +1057,7 @@
928
1057
  "It never renders an overlay or scrim and never traps focus or scroll: the list behind stays fully interactive, clicking outside does nothing, Escape closes. If the task needs the page blocked, use Dialog instead.",
929
1058
  "One panel at a time. Drilling in replaces Body's content and adds an in-panel back; it never opens a second SidePanel.",
930
1059
  "Read-mostly: actions inside are fine, but destructive confirmations spawn a Dialog over the panel. The panel does not own confirmation.",
931
- "`size=\"sm\"` (384px) for a record and its fields; `size=\"md\"` (576px) when Body carries a preview, a chart or a code block. `side=\"left\"` only when the list itself lives on the right.",
1060
+ "`size=\"sm\"` (384px) for a record and its fields; `size=\"md\"` (576px) when Body carries a preview, a chart or a code block; `size=\"lg\"` (768px, capped at the window's width) when Body holds a full-size page section such as a scorecard or a confusion grid. `side=\"left\"` only when the list itself lives on the right.",
932
1061
  "Header layout follows Dialog: a `space-y-2` block, so `SidePanel.Title` and then either `SidePanel.Description` (plain text) or `SidePanel.Meta` (badges, a status line, key/value metadata) stack full width. The `actions` cluster and the close sit absolutely at the top right, so the header reserves right padding and a long Title truncates rather than running under them. Give header actions the same bare icon treatment as the close via `sidePanelCloseButtonVariants`; keep `Description` when the subtitle is text, because it is what wires `aria-describedby` and `Meta` cannot.",
933
1062
  "Content renders in place (no portal) so Tab reaches it after the list; do not mount it inside a transformed ancestor, where `fixed` misplaces. Focus does not move on open. Header renders an outline icon Close by default (`showCloseButton={false}` to place `SidePanel.Close` yourself). `SidePanel.Footer` is optional: it holds the actions on the data being viewed, never Close or the full-page handoff. One primary action sits right; with `justify=\"between\"` secondary actions (copy an id, compare) go first and land left."
934
1063
  ],
@@ -941,7 +1070,8 @@
941
1070
  ],
942
1071
  "size": [
943
1072
  "sm",
944
- "md"
1073
+ "md",
1074
+ "so it still fits a window narrower than the panel\n lg"
945
1075
  ],
946
1076
  "mode": [
947
1077
  "overlay"
@@ -1012,6 +1142,19 @@
1012
1142
  }
1013
1143
  }
1014
1144
  },
1145
+ {
1146
+ "name": "stat-bento",
1147
+ "import": "@archetypeai/ds-ui-svelte-console/primitives/stat-bento",
1148
+ "source": "https://design-system-console.archetypeai.workers.dev/r/stat-bento.json",
1149
+ "description": "Small figure bento: a label top-left, the value bottom-right, one line of context bottom-left. ScoreBento's quiet sibling.",
1150
+ "usage": [
1151
+ "`StatBento label=\"Accuracy\" value=\"0.94\" meta=\"1,203 of 1,276\"`. `value` is a string the caller formats (`0.94`, `12%`, `3m 20s`), so the bento never guesses at precision or units.",
1152
+ "Missing vs pending: pass `value=\"—\"` when the figure does not exist, and say why in `meta` while it is still coming (`meta=\"when complete\"`). Omit `meta` when there is nothing to add; the value keeps its bottom-right place either way.",
1153
+ "Where the bento is too narrow for `meta` and the value side by side, the value wraps under the context line instead of widening the bento, so the bento can go in a two- or three-up grid of any width.",
1154
+ "It sits on the card surface, not a tone, so a coloured `ScoreBento` beside it stays the only coloured thing. It sets no height or grid placement: size and lay it out with `class` (`min-h-28` in a side panel, `md:col-span-2` beside a bento).",
1155
+ "`help` renders a Tooltip info disc in the top-right corner, so the page needs a `Tooltip.Provider` above it; put one in the app layout."
1156
+ ]
1157
+ },
1015
1158
  {
1016
1159
  "name": "switch",
1017
1160
  "import": "@archetypeai/ds-ui-svelte-labs/primitives/switch",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archetypeai/ds-cli",
3
- "version": "0.17.0",
3
+ "version": "0.18.1",
4
4
  "description": "Archetype AI Design System CLI Tool",
5
5
  "type": "module",
6
6
  "bin": {