@duro-app/cli 3.5.0 → 3.7.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 (2) hide show
  1. package/package.json +5 -5
  2. package/registry.json +169 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duro-app/cli",
3
- "version": "3.5.0",
3
+ "version": "3.7.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Machine-queryable docs for the Duro design system: components, props, recipes, tokens and rules as CLI output, JSON, or an MCP server.",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@modelcontextprotocol/sdk": ">=1.0.0",
48
- "@duro-app/ui": "^3.5.0"
48
+ "@duro-app/ui": "^3.7.0"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "@duro-app/ui": {
@@ -60,9 +60,9 @@
60
60
  "@types/node": "^24.0.0",
61
61
  "ts-morph": "^26.0.0",
62
62
  "typescript": "^5.7.0",
63
- "@duro-app/eslint-plugin": "^3.5.0",
64
- "@duro-app/tokens": "^3.5.0",
65
- "@duro-app/ui": "^3.5.0"
63
+ "@duro-app/tokens": "^3.7.0",
64
+ "@duro-app/ui": "^3.7.0",
65
+ "@duro-app/eslint-plugin": "^3.7.0"
66
66
  },
67
67
  "scripts": {
68
68
  "registry": "node scripts/build-registry.mjs",
package/registry.json CHANGED
@@ -2933,6 +2933,22 @@
2933
2933
  "required": false,
2934
2934
  "type": "() => void"
2935
2935
  },
2936
+ {
2937
+ "name": "onFocus",
2938
+ "required": false,
2939
+ "type": "(e: React.FocusEvent<HTMLInputElement>) => void"
2940
+ },
2941
+ {
2942
+ "description": "Keyboard handlers — e.g. Enter to commit, Escape to cancel, arrow-key navigation of a list driven by this field.",
2943
+ "name": "onKeyDown",
2944
+ "required": false,
2945
+ "type": "(e: React.KeyboardEvent<HTMLInputElement>) => void"
2946
+ },
2947
+ {
2948
+ "name": "onKeyUp",
2949
+ "required": false,
2950
+ "type": "(e: React.KeyboardEvent<HTMLInputElement>) => void"
2951
+ },
2936
2952
  {
2937
2953
  "name": "ref",
2938
2954
  "required": false,
@@ -3310,8 +3326,8 @@
3310
3326
  "Item"
3311
3327
  ]
3312
3328
  },
3313
- "description": "Dropdown action menu. Triggers actions (not value selection). Compound component — Root is required (throws without it).",
3314
- "example": "<Menu.Root>\n <Menu.Trigger>\n <Button variant=\"secondary\">Actions</Button>\n </Menu.Trigger>\n <Menu.Popup>\n <Menu.Item onClick={() => console.log('edit')}>Edit</Menu.Item>\n <Menu.Item onClick={() => console.log('duplicate')}>Duplicate</Menu.Item>\n <Menu.LinkItem href=\"/settings\">Settings</Menu.LinkItem>\n </Menu.Popup>\n</Menu.Root>",
3329
+ "description": "Dropdown action menu. Triggers actions (not value selection). Compound component — Root is required (throws without it). Menu.Trigger renders the button itself: give it the label (text, an Icon), never a Button.",
3330
+ "example": "<Menu.Root>\n <Menu.Trigger>Actions</Menu.Trigger>\n <Menu.Popup>\n <Menu.Item onClick={() => console.log('edit')}>Edit</Menu.Item>\n <Menu.Item onClick={() => console.log('duplicate')}>Duplicate</Menu.Item>\n <Menu.LinkItem href=\"/settings\">Settings</Menu.LinkItem>\n </Menu.Popup>\n</Menu.Root>",
3315
3331
  "relatedTo": [
3316
3332
  {
3317
3333
  "component": "Select",
@@ -3320,8 +3336,8 @@
3320
3336
  },
3321
3337
  {
3322
3338
  "component": "Button",
3323
- "kind": "composition",
3324
- "relationship": "Often used as Menu.Trigger content"
3339
+ "kind": "contrast",
3340
+ "relationship": "Button runs one action; Menu opens a list of them. Menu.Trigger is already a button — never put a Button inside it"
3325
3341
  }
3326
3342
  ],
3327
3343
  "whenNotToUse": [
@@ -5505,6 +5521,22 @@
5505
5521
  "required": false,
5506
5522
  "type": "() => void"
5507
5523
  },
5524
+ {
5525
+ "name": "onFocus",
5526
+ "required": false,
5527
+ "type": "(e: React.FocusEvent<HTMLTextAreaElement>) => void"
5528
+ },
5529
+ {
5530
+ "description": "Keyboard handlers — e.g. Enter to commit, Escape to cancel, arrow-key navigation of a list driven by this field.",
5531
+ "name": "onKeyDown",
5532
+ "required": false,
5533
+ "type": "(e: React.KeyboardEvent<HTMLTextAreaElement>) => void"
5534
+ },
5535
+ {
5536
+ "name": "onKeyUp",
5537
+ "required": false,
5538
+ "type": "(e: React.KeyboardEvent<HTMLTextAreaElement>) => void"
5539
+ },
5508
5540
  {
5509
5541
  "name": "ref",
5510
5542
  "required": false,
@@ -5845,6 +5877,138 @@
5845
5877
  "props": null,
5846
5878
  "sourcePath": "packages/ui/src/components/Tooltip/Tooltip.tsx"
5847
5879
  },
5880
+ "Tree": {
5881
+ "importPath": "@duro-app/ui",
5882
+ "kind": "compound",
5883
+ "meta": {
5884
+ "anatomy": {
5885
+ "required": [
5886
+ "Root",
5887
+ "Item"
5888
+ ]
5889
+ },
5890
+ "description": "Hierarchy of items with single selection and expandable branches (the WAI-ARIA tree pattern): one tab stop, arrow keys, Home/End, typeahead. Compound component — Root is required.",
5891
+ "example": "<Tree.Root aria-label=\"Blocs\" defaultExpanded={['energy']} onValueChange={setSelected}>\n <Tree.Item value=\"energy\" label=\"Core business — Energy\">\n <Tree.Item value=\"generation\" label=\"Generation\" meta=\"4 apps\" />\n <Tree.Item value=\"network\" label=\"Network operations\">\n <Tree.Item value=\"scada\" label=\"SCADA supervision\" />\n </Tree.Item>\n </Tree.Item>\n <Tree.Item value=\"finance\" label=\"Finance & steering\" />\n</Tree.Root>",
5892
+ "relatedTo": [
5893
+ {
5894
+ "component": "SideNav",
5895
+ "kind": "contrast",
5896
+ "relationship": "SideNav is navigation between pages; Tree browses arbitrary-depth data. Never nest SideNav to fake a tree"
5897
+ },
5898
+ {
5899
+ "component": "split-pane",
5900
+ "kind": "composition",
5901
+ "relationship": "A Tree in the list column of the split-pane recipe, the selection’s details beside it"
5902
+ }
5903
+ ],
5904
+ "whenNotToUse": [
5905
+ "Site or app navigation — use SideNav (a rail advertises destinations; a tree browses data)",
5906
+ "A flat list of choices — use List or RadioGroup",
5907
+ "Choosing several nodes at once — not supported (single selection)"
5908
+ ],
5909
+ "whenToUse": [
5910
+ "Browsing data that nests to any depth — a file tree, zones › services › capabilities, namespace › resource",
5911
+ "Picking one node of a hierarchy to show its details beside the tree"
5912
+ ]
5913
+ },
5914
+ "name": "Tree",
5915
+ "parts": {
5916
+ "Item": {
5917
+ "name": "Item",
5918
+ "props": [
5919
+ {
5920
+ "description": "unique within the tree",
5921
+ "name": "value",
5922
+ "required": true,
5923
+ "type": "string"
5924
+ },
5925
+ {
5926
+ "description": "what the row shows",
5927
+ "name": "label",
5928
+ "required": true,
5929
+ "type": "ReactNode"
5930
+ },
5931
+ {
5932
+ "description": "plain text for typeahead when `label` isn't a string",
5933
+ "name": "textValue",
5934
+ "required": false,
5935
+ "type": "string"
5936
+ },
5937
+ {
5938
+ "description": "nested items: the branch's children (none = a leaf)",
5939
+ "name": "children",
5940
+ "required": false,
5941
+ "type": "ReactNode"
5942
+ },
5943
+ {
5944
+ "description": "trailing content on the row (a count, a status)",
5945
+ "name": "meta",
5946
+ "required": false,
5947
+ "type": "ReactNode"
5948
+ }
5949
+ ],
5950
+ "sourcePath": "packages/ui/src/components/Tree/Tree.tsx"
5951
+ },
5952
+ "Root": {
5953
+ "name": "Root",
5954
+ "props": [
5955
+ {
5956
+ "name": "children",
5957
+ "required": true,
5958
+ "type": "ReactNode"
5959
+ },
5960
+ {
5961
+ "description": "accessible name of the tree (or give `aria-labelledby`)",
5962
+ "name": "aria-label",
5963
+ "required": false,
5964
+ "type": "string"
5965
+ },
5966
+ {
5967
+ "name": "aria-labelledby",
5968
+ "required": false,
5969
+ "type": "string"
5970
+ },
5971
+ {
5972
+ "description": "the selected item (controlled)",
5973
+ "name": "value",
5974
+ "required": false,
5975
+ "type": "string | null"
5976
+ },
5977
+ {
5978
+ "default": "null",
5979
+ "name": "defaultValue",
5980
+ "required": false,
5981
+ "type": "string | null"
5982
+ },
5983
+ {
5984
+ "name": "onValueChange",
5985
+ "required": false,
5986
+ "type": "(value: string) => void"
5987
+ },
5988
+ {
5989
+ "description": "the open branches (controlled)",
5990
+ "name": "expanded",
5991
+ "required": false,
5992
+ "type": "ReadonlyArray<string>"
5993
+ },
5994
+ {
5995
+ "default": "[]",
5996
+ "name": "defaultExpanded",
5997
+ "required": false,
5998
+ "type": "ReadonlyArray<string>"
5999
+ },
6000
+ {
6001
+ "name": "onExpandedChange",
6002
+ "required": false,
6003
+ "type": "(expanded: string[]) => void"
6004
+ }
6005
+ ],
6006
+ "sourcePath": "packages/ui/src/components/Tree/Tree.tsx"
6007
+ }
6008
+ },
6009
+ "props": null,
6010
+ "sourcePath": "packages/ui/src/components/Tree/Tree.tsx"
6011
+ },
5848
6012
  "VirtualTable": {
5849
6013
  "importPath": "@duro-app/ui/table",
5850
6014
  "kind": "component",
@@ -6325,11 +6489,10 @@
6325
6489
  },
6326
6490
  "name": "action-menu",
6327
6491
  "peerDeps": [],
6328
- "source": "import {Menu, Button} from '@duro-app/ui'\n\nexport function ActionMenuRecipe() {\n return (\n <Menu.Root>\n <Menu.Trigger>\n <Button variant=\"secondary\">Actions</Button>\n </Menu.Trigger>\n <Menu.Popup>\n <Menu.Item onClick={() => console.log('edit')}>Edit</Menu.Item>\n <Menu.Item onClick={() => console.log('duplicate')}>Duplicate</Menu.Item>\n <Menu.Item onClick={() => console.log('archive')}>Archive</Menu.Item>\n <Menu.LinkItem href=\"/settings\">Settings</Menu.LinkItem>\n </Menu.Popup>\n </Menu.Root>\n )\n}\n",
6492
+ "source": "import {Menu} from '@duro-app/ui'\n\nexport function ActionMenuRecipe() {\n return (\n <Menu.Root>\n {/* Menu.Trigger is the button: give it the label, not a <Button>. */}\n <Menu.Trigger>Actions</Menu.Trigger>\n <Menu.Popup>\n <Menu.Item onClick={() => console.log('edit')}>Edit</Menu.Item>\n <Menu.Item onClick={() => console.log('duplicate')}>Duplicate</Menu.Item>\n <Menu.Item onClick={() => console.log('archive')}>Archive</Menu.Item>\n <Menu.LinkItem href=\"/settings\">Settings</Menu.LinkItem>\n </Menu.Popup>\n </Menu.Root>\n )\n}\n",
6329
6493
  "sourcePath": "docs/ai/recipes/action-menu.recipe.tsx",
6330
6494
  "title": "Action Menu",
6331
6495
  "usesComponents": [
6332
- "Button",
6333
6496
  "Menu"
6334
6497
  ]
6335
6498
  },