@kerfjs/ui 5.0.0-beta.125 → 5.0.0-beta.127
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.
- package/README.md +5 -0
- package/ai/application-ui-diagnostic-ids-v1.json +1 -0
- package/ai/component-catalog.json +77 -6
- package/ai/component-catalog.schema.json +14 -1
- package/ai/component-composition.json +27 -6
- package/ai/component-props.json +265 -40
- package/ai/components/combobox.md +1 -1
- package/ai/components/surface-scaffold.md +19 -5
- package/ai/components/tab-bar.md +2 -0
- package/ai/components/toolbar.md +1 -0
- package/ai/public-api-signatures-v1.md +251 -298
- package/ai/skill.md +10 -4
- package/ai/view-document.schema.json +55 -2
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/cli.mjs +60 -24
- package/analyzer/index.mjs +331 -58
- package/catalog-projection-cli.mjs +86 -50
- package/dist/anchored-surface.js +2 -1
- package/dist/browser/editor.js +12 -7
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.js +6 -6
- package/dist/{chunk-VX3YF2UD.js → chunk-3K5V3ZSD.js} +3 -3
- package/dist/{chunk-VX3YF2UD.js.map → chunk-3K5V3ZSD.js.map} +1 -1
- package/dist/{chunk-NHQOX7T4.js → chunk-3ZKUXWAV.js} +4 -4
- package/dist/chunk-3ZKUXWAV.js.map +1 -0
- package/dist/{chunk-ADMWT7FX.js → chunk-3ZWYGGEC.js} +136 -8
- package/dist/chunk-3ZWYGGEC.js.map +1 -0
- package/dist/{chunk-KLR3DCHH.js → chunk-4L5ZIKDZ.js} +1 -1
- package/dist/chunk-4L5ZIKDZ.js.map +1 -0
- package/dist/{chunk-2E7S5C4D.js → chunk-4UWLHKNU.js} +5 -5
- package/dist/chunk-4UWLHKNU.js.map +1 -0
- package/dist/{chunk-EXGDKG7B.js → chunk-5A2DN3LR.js} +5 -5
- package/dist/chunk-5A2DN3LR.js.map +1 -0
- package/dist/{chunk-DJ65XFVN.js → chunk-63TJH2RF.js} +4 -4
- package/dist/chunk-63TJH2RF.js.map +1 -0
- package/dist/{chunk-Q2CLQ3IJ.js → chunk-6PHG2DMG.js} +1 -1
- package/dist/chunk-6PHG2DMG.js.map +1 -0
- package/dist/{chunk-SPI6VMIY.js → chunk-6T7AX365.js} +4 -4
- package/dist/chunk-6T7AX365.js.map +1 -0
- package/dist/{chunk-GVII4JSD.js → chunk-6V6UHPJD.js} +4 -4
- package/dist/chunk-6V6UHPJD.js.map +1 -0
- package/dist/{chunk-NR3ZO4LK.js → chunk-7U65KLDL.js} +1 -1
- package/dist/chunk-7U65KLDL.js.map +1 -0
- package/dist/chunk-BMOZSNDU.js +133 -0
- package/dist/chunk-BMOZSNDU.js.map +1 -0
- package/dist/{chunk-2LM3PYHA.js → chunk-C2TY5DJC.js} +11 -8
- package/dist/chunk-C2TY5DJC.js.map +1 -0
- package/dist/{chunk-3WYREXW4.js → chunk-COMEWURO.js} +8 -6
- package/dist/chunk-COMEWURO.js.map +1 -0
- package/dist/{chunk-VPDSPD76.js → chunk-DB64I3DB.js} +4 -3
- package/dist/chunk-DB64I3DB.js.map +1 -0
- package/dist/{chunk-SBCXWGNP.js → chunk-DBCDYBZP.js} +2 -2
- package/dist/{chunk-SBCXWGNP.js.map → chunk-DBCDYBZP.js.map} +1 -1
- package/dist/{chunk-CNM6ZWP2.js → chunk-DJWBXEF4.js} +4 -2
- package/dist/chunk-DJWBXEF4.js.map +1 -0
- package/dist/{chunk-SVUJIVMR.js → chunk-E2MTHHLS.js} +3 -3
- package/dist/{chunk-SVUJIVMR.js.map → chunk-E2MTHHLS.js.map} +1 -1
- package/dist/{chunk-JG4ONAOI.js → chunk-EI55KWHP.js} +2 -2
- package/dist/chunk-EI55KWHP.js.map +1 -0
- package/dist/{chunk-MVKHSAKE.js → chunk-GE2BQXB3.js} +41 -4
- package/dist/chunk-GE2BQXB3.js.map +1 -0
- package/dist/chunk-GHV36C6I.js +94 -0
- package/dist/chunk-GHV36C6I.js.map +1 -0
- package/dist/{chunk-BCO673YW.js → chunk-GQUDCWOD.js} +10 -4
- package/dist/chunk-GQUDCWOD.js.map +1 -0
- package/dist/chunk-HD7ZLISK.js +808 -0
- package/dist/chunk-HD7ZLISK.js.map +1 -0
- package/dist/{chunk-KELWWCMX.js → chunk-I2K4OQKB.js} +4 -4
- package/dist/chunk-I2K4OQKB.js.map +1 -0
- package/dist/chunk-IFDTSVE6.js +9 -0
- package/dist/chunk-IFDTSVE6.js.map +1 -0
- package/dist/{chunk-TPLVC5BE.js → chunk-IR32NI2O.js} +336 -247
- package/dist/chunk-IR32NI2O.js.map +1 -0
- package/dist/{chunk-ZKKO4MHC.js → chunk-JYKP7TBZ.js} +4 -2
- package/dist/chunk-JYKP7TBZ.js.map +1 -0
- package/dist/{chunk-6OT7FOSA.js → chunk-K3C35KGR.js} +4 -4
- package/dist/chunk-K3C35KGR.js.map +1 -0
- package/dist/{chunk-4RECPEHI.js → chunk-KBS3GP6S.js} +4 -3
- package/dist/chunk-KBS3GP6S.js.map +1 -0
- package/dist/{chunk-YHRJNKD5.js → chunk-KS7EXW4P.js} +6 -4
- package/dist/chunk-KS7EXW4P.js.map +1 -0
- package/dist/{chunk-V6N3YLTM.js → chunk-LTOTL5AS.js} +3 -3
- package/dist/chunk-LTOTL5AS.js.map +1 -0
- package/dist/chunk-M64TAGZY.js +590 -0
- package/dist/chunk-M64TAGZY.js.map +1 -0
- package/dist/{chunk-JZZVWTUB.js → chunk-MMOQR426.js} +2 -2
- package/dist/chunk-MMOQR426.js.map +1 -0
- package/dist/{chunk-SJBMKA4X.js → chunk-OHT2AXER.js} +11 -10
- package/dist/chunk-OHT2AXER.js.map +1 -0
- package/dist/{chunk-TTFW6E6C.js → chunk-OZKBIPXU.js} +2 -2
- package/dist/chunk-OZKBIPXU.js.map +1 -0
- package/dist/{chunk-Q2SLOMN6.js → chunk-RHMY45DK.js} +4 -4
- package/dist/chunk-RHMY45DK.js.map +1 -0
- package/dist/{chunk-BZXA5SSA.js → chunk-S7QB5KMM.js} +2 -2
- package/dist/{chunk-BZXA5SSA.js.map → chunk-S7QB5KMM.js.map} +1 -1
- package/dist/{chunk-HDXUHLTQ.js → chunk-SHECA2N4.js} +8 -2
- package/dist/chunk-SHECA2N4.js.map +1 -0
- package/dist/{chunk-R6FIXYAE.js → chunk-SJEPM5ZU.js} +2 -2
- package/dist/{chunk-R6FIXYAE.js.map → chunk-SJEPM5ZU.js.map} +1 -1
- package/dist/{chunk-FJMABKKV.js → chunk-UQ4FRQ6M.js} +35 -17
- package/dist/chunk-UQ4FRQ6M.js.map +1 -0
- package/dist/{chunk-S4ZGTDSG.js → chunk-UU37OR3D.js} +2 -2
- package/dist/chunk-UU37OR3D.js.map +1 -0
- package/dist/{chunk-SWXWLSUD.js → chunk-WEQNPYVA.js} +1 -1
- package/dist/{chunk-SWXWLSUD.js.map → chunk-WEQNPYVA.js.map} +1 -1
- package/dist/{chunk-5SFHBYEY.js → chunk-WUVHP3UC.js} +97 -24
- package/dist/chunk-WUVHP3UC.js.map +1 -0
- package/dist/{chunk-3S3WXAZ5.js → chunk-X43QQWVC.js} +3 -2
- package/dist/chunk-X43QQWVC.js.map +1 -0
- package/dist/{chunk-Z3T24FX3.js → chunk-YE6KCAIN.js} +3 -2
- package/dist/chunk-YE6KCAIN.js.map +1 -0
- package/dist/{chunk-KQZIC5CA.js → chunk-ZC4KSRAF.js} +7 -7
- package/dist/chunk-ZC4KSRAF.js.map +1 -0
- package/dist/collapsible-panel.d.ts +2 -2
- package/dist/collapsible-panel.js +2 -2
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/column-explorer.d.ts +3 -3
- package/dist/column-explorer.js +16 -138
- package/dist/column-explorer.js.map +1 -1
- package/dist/dialog-surface-controller-BeKZ3e8Z.d.ts +251 -0
- package/dist/editor-frame.d.ts +1 -1
- package/dist/editor-frame.js +1 -1
- package/dist/editor.d.ts +38 -20
- package/dist/editor.js +11651 -7052
- package/dist/editor.js.map +1 -1
- package/dist/file-picker.js +1 -1
- package/dist/help-tags-register.js +2 -1
- package/dist/help-tags-register.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +24 -23
- package/dist/list-action-row.d.ts +1 -1
- package/dist/list-action-row.js +1 -1
- package/dist/list-detail-dialog.d.ts +7 -7
- package/dist/list-detail-dialog.js +6 -5
- package/dist/list-detail-dialog.js.map +1 -1
- package/dist/list-header.d.ts +1 -1
- package/dist/list-header.js +1 -1
- package/dist/list-item.d.ts +1 -1
- package/dist/list-item.js +1 -1
- package/dist/message-composer.js +1 -1
- package/dist/nav-stack.d.ts +6 -6
- package/dist/nav-stack.js +1 -1
- package/dist/popup-menu-register.js +1 -7
- package/dist/popup-menu-register.js.map +1 -1
- package/dist/popup-menu.d.ts +2 -2
- package/dist/popup-menu.js +1 -1
- package/dist/resizable-region.js +1 -1
- package/dist/segmented-control.d.ts +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/select-register.js +17 -23
- package/dist/select-register.js.map +1 -1
- package/dist/split-view.d.ts +6 -6
- package/dist/split-view.js +1 -1
- package/dist/styles/collapsible-panel.css +34 -25
- package/dist/styles/components/actions/popup-menu/popup-menu.css +4 -4
- package/dist/styles/components/actions/toolbar/toolbar.css +34 -1
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +1 -1
- package/dist/styles/components/forms/segmented-control/segmented-control.css +1 -1
- package/dist/styles/components/layout/collapsible-panel/collapsible-panel.css +34 -25
- package/dist/styles/components/layout/split-view/split-view.css +19 -33
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +15 -19
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +30 -29
- package/dist/styles/components/surfaces/editor-frame/editor-frame.css +10 -3
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +291 -4
- package/dist/styles/editor/editor.css +78 -0
- package/dist/styles/editor-frame.css +10 -3
- package/dist/styles/nav-stack.css +15 -19
- package/dist/styles/popup-menu.css +4 -4
- package/dist/styles/segmented-control.css +1 -1
- package/dist/styles/split-view.css +19 -33
- package/dist/styles/surface-scaffold.css +291 -4
- package/dist/styles/tab-navigator.css +30 -29
- package/dist/styles/toolbar-control-group.css +1 -1
- package/dist/styles/toolbar.css +34 -1
- package/dist/styles/webawesome.css +4 -5
- package/dist/surface-scaffold-register.js +2 -1
- package/dist/surface-scaffold-register.js.map +1 -1
- package/dist/surface-scaffold.d.ts +155 -246
- package/dist/surface-scaffold.js +3 -2
- package/dist/toolbar-control-group.d.ts +2 -2
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar.d.ts +6 -1
- package/dist/toolbar.js +1 -1
- package/dist/tree-list.d.ts +4 -4
- package/dist/tree-list.js +2 -2
- package/dist/{tree-rows-eHnnGLGM.d.ts → tree-rows-Bms5QJvG.d.ts} +3 -0
- package/dist/wire-catalog.d.ts +1 -1
- package/dist/wire-catalog.js +3 -2
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-checkboxes.js +2 -1
- package/dist/wire-choice-chips.js +2 -1
- package/dist/wire-color-fields.js +2 -1
- package/dist/wire-color-pickers.js +2 -1
- package/dist/wire-column-explorer.js +1 -92
- package/dist/wire-column-explorer.js.map +1 -1
- package/dist/wire-comboboxes.d.ts +2 -0
- package/dist/wire-comboboxes.js +2 -1
- package/dist/wire-content-items.js +2 -1
- package/dist/wire-corner-status.js +2 -1
- package/dist/wire-nav-stack.js +2 -1
- package/dist/wire-overlay-sheets.js +2 -1
- package/dist/wire-paged-views.js +2 -2
- package/dist/wire-paged-views.js.map +1 -1
- package/dist/wire-resizable-regions.js +2 -1
- package/dist/wire-scroll-dividers.js +1 -1
- package/dist/wire-search-fields.js +2 -1
- package/dist/wire-sidebar.js +2 -1
- package/dist/wire-tab-bars.d.ts +41 -2
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-navigator.js +2 -1
- package/dist/wire-tag-fields.js +2 -1
- package/dist/wire-workbench.js +2 -1
- package/dist/workbench-dialog.d.ts +7 -7
- package/dist/workbench-dialog.js +5 -4
- package/dist/workbench-dialog.js.map +1 -1
- package/dist/workbench.d.ts +1 -1
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +3 -6
- package/docs/component-contract.md +47 -7
- package/docs/component-selection.md +90 -80
- package/docs/design/templates.md +5 -4
- package/docs/editor-frame.md +1 -1
- package/docs/editor-host.md +15 -2
- package/docs/overlay-tooltip.md +1 -1
- package/docs/recipes.md +1 -1
- package/docs/surface-scaffold.md +63 -2
- package/docs/ui-analyzer.md +42 -0
- package/docs/ui-doctor.md +45 -1
- package/docs/ui-evaluator.md +35 -0
- package/docs/ux-demo.md +1 -1
- package/docs/view.md +314 -0
- package/docs/webawesome-theme.md +16 -0
- package/doctor/cli.mjs +36 -31
- package/doctor/index.mjs +349 -162
- package/evaluator/cli.mjs +36 -30
- package/llms.txt +17 -4
- package/package.json +6 -2
- package/props/cli.mjs +47 -21
- package/scripts/lib/cli-args.mjs +98 -0
- package/ux-demo/recipes/app-shell.tsx +48 -141
- package/ux-demo/recipes/collapsible-sidebar.tsx +43 -169
- package/ux-demo/recipes/compact-toolbar.tsx +22 -114
- package/ux-demo/recipes/composer-form.tsx +14 -104
- package/ux-demo/recipes/list-detail-dialog.tsx +38 -84
- package/ux-demo/recipes/list-workspace-states.tsx +29 -152
- package/ux-demo/recipes/loading-inspector.tsx +30 -174
- package/ux-demo/recipes/media-detail.tsx +29 -146
- package/ux-demo/recipes/navigation-sidebar.tsx +24 -113
- package/ux-demo/recipes/navigation-stack.tsx +7 -43
- package/ux-demo/recipes/workspace-header.tsx +2 -66
- package/view/catalog.mjs +229 -0
- package/view/child-kind.mjs +22 -0
- package/view/cli.mjs +142 -119
- package/view/contract.mjs +84 -11
- package/view/css-grammar.mjs +93 -0
- package/view/generate.d.mts +16 -0
- package/view/generate.mjs +155 -56
- package/view/index.d.mts +80 -14
- package/view/index.mjs +5 -9
- package/view/interpret.mjs +104 -36
- package/view/types.mjs +161 -0
- package/view/validate-move.mjs +66 -30
- package/view/validate.mjs +420 -654
- package/vite-editor.d.mts +16 -1
- package/vite-editor.mjs +74 -4
- package/dist/chunk-2E7S5C4D.js.map +0 -1
- package/dist/chunk-2LM3PYHA.js.map +0 -1
- package/dist/chunk-3S3WXAZ5.js.map +0 -1
- package/dist/chunk-3WYREXW4.js.map +0 -1
- package/dist/chunk-4RECPEHI.js.map +0 -1
- package/dist/chunk-5SFHBYEY.js.map +0 -1
- package/dist/chunk-6OT7FOSA.js.map +0 -1
- package/dist/chunk-ADMWT7FX.js.map +0 -1
- package/dist/chunk-BCO673YW.js.map +0 -1
- package/dist/chunk-CNM6ZWP2.js.map +0 -1
- package/dist/chunk-DJ65XFVN.js.map +0 -1
- package/dist/chunk-EXGDKG7B.js.map +0 -1
- package/dist/chunk-FJMABKKV.js.map +0 -1
- package/dist/chunk-GVII4JSD.js.map +0 -1
- package/dist/chunk-HDXUHLTQ.js.map +0 -1
- package/dist/chunk-JG4ONAOI.js.map +0 -1
- package/dist/chunk-JZZVWTUB.js.map +0 -1
- package/dist/chunk-KELWWCMX.js.map +0 -1
- package/dist/chunk-KLR3DCHH.js.map +0 -1
- package/dist/chunk-KQZIC5CA.js.map +0 -1
- package/dist/chunk-LD6A6PYB.js +0 -268
- package/dist/chunk-LD6A6PYB.js.map +0 -1
- package/dist/chunk-MVKHSAKE.js.map +0 -1
- package/dist/chunk-NHQOX7T4.js.map +0 -1
- package/dist/chunk-NR3ZO4LK.js.map +0 -1
- package/dist/chunk-Q2CLQ3IJ.js.map +0 -1
- package/dist/chunk-Q2SLOMN6.js.map +0 -1
- package/dist/chunk-S4ZGTDSG.js.map +0 -1
- package/dist/chunk-SJBMKA4X.js.map +0 -1
- package/dist/chunk-SPI6VMIY.js.map +0 -1
- package/dist/chunk-TPLVC5BE.js.map +0 -1
- package/dist/chunk-TTFW6E6C.js.map +0 -1
- package/dist/chunk-V6N3YLTM.js.map +0 -1
- package/dist/chunk-VNT4MXR5.js +0 -548
- package/dist/chunk-VNT4MXR5.js.map +0 -1
- package/dist/chunk-VPDSPD76.js.map +0 -1
- package/dist/chunk-YHRJNKD5.js.map +0 -1
- package/dist/chunk-Z3T24FX3.js.map +0 -1
- package/dist/chunk-ZKKO4MHC.js.map +0 -1
- package/dist/{nav-stack-DwxpXxqJ.d.ts → nav-stack-vQ3ieerq.d.ts} +3 -3
package/llms.txt
CHANGED
|
@@ -158,7 +158,9 @@ explains when to reuse, compose, extend, or use native HTML.
|
|
|
158
158
|
it; `kerf-ui-view check` fails on hand edits, and `kerf-ui-view diff` lists
|
|
159
159
|
breaking contract changes first. A server-driven app renders documents at
|
|
160
160
|
runtime with `interpretView`, passing the `<name>Contract` from a
|
|
161
|
-
`--declarations-only` module so a changed document fails loudly.
|
|
161
|
+
`--declarations-only` module so a changed document fails loudly. The
|
|
162
|
+
[view documents guide](./docs/view.md) covers the format, the generated
|
|
163
|
+
module and its contract, the CLI, and the `@kerfjs/ui/view` API.
|
|
162
164
|
Load [compile-time contracts](./ai/compile-time-contracts-v1.json) for stable
|
|
163
165
|
`KUI-T###` ids, exact declaration symbols, and the boundary between rejected
|
|
164
166
|
source states and relationships that still require runtime/catalog checks.
|
|
@@ -270,6 +272,11 @@ title-style labels as `KUI-D040`. See
|
|
|
270
272
|
`TabBar`, `LucideIcon`; see
|
|
271
273
|
[webawesome-migration.md](./docs/webawesome-migration.md)), and file a
|
|
272
274
|
component gap rather than dropping to the raw tag.
|
|
275
|
+
- **No network.** No Kerf UI component requests anything at runtime: icons
|
|
276
|
+
are bundled Lucide SVG and no component renders a Web Awesome element. An
|
|
277
|
+
application that renders Web Awesome elements itself registers a local
|
|
278
|
+
icon library, or `wa-icon` fetches from Font Awesome's CDN (see
|
|
279
|
+
[webawesome-theme.md](./docs/webawesome-theme.md)).
|
|
273
280
|
- **Reach for the primitive, not for CSS.** The package is built to look right
|
|
274
281
|
without an application customization layer. Before adding `padding`, `margin`,
|
|
275
282
|
`width`, `height`, `border`, `background`, a wrapper card, or a decoration,
|
|
@@ -561,7 +568,10 @@ headingLevel`, `SearchField clearIcon`, `ContentItem frame="framed"` for a
|
|
|
561
568
|
`icon`, `items`, optional `placement` and `disabled`), which renders a
|
|
562
569
|
`PopupMenu` as the row's sibling trailing control. Do not force a dropdown or button width. Nothing
|
|
563
570
|
wraps inside a group: an icon sits beside its label on one row, and a
|
|
564
|
-
`ToolbarText` is one ellipsized line unless you opt into `wrap`/`maxLines`.
|
|
571
|
+
`ToolbarText` is one ellipsized line unless you opt into `wrap`/`maxLines`.
|
|
572
|
+
For a leading zone made of control groups (no title), set
|
|
573
|
+
`Toolbar responsive="wrap-groups"`: each leading group shares a row with the
|
|
574
|
+
trailing zone while it fits and otherwise moves, whole, to the next row. A
|
|
565
575
|
Select or PopupMenu trigger drops its focus ring while its popup is open and
|
|
566
576
|
the ring follows the control's shape; never add ring CSS. Compact
|
|
567
577
|
mixed groups keep standard item padding and raised selected chrome without an
|
|
@@ -686,8 +696,10 @@ headingLevel`, `SearchField clearIcon`, `ContentItem frame="framed"` for a
|
|
|
686
696
|
them to render. The `wire…` helpers own the _ephemeral_ parts: `wireNavStack` the
|
|
687
697
|
content-slide, per-view top/bottom chrome cross-fade, and focus move/restore
|
|
688
698
|
(mark a preferred new-view target with `data-nav-focus`), `wireTabBars` the
|
|
689
|
-
overflow autoscroll, drag preview,
|
|
690
|
-
replacement focus after controlled automatic tab activation,
|
|
699
|
+
overflow autoscroll, drag preview,
|
|
700
|
+
replacement focus after controlled automatic tab activation, and the
|
|
701
|
+
`onFitChange` tab-fit report (overflow and zone widths) an app reads instead of
|
|
702
|
+
measuring TabBar's parts,
|
|
691
703
|
`wireResizableRegions` the live drag preview, `wireScrollDividers` the
|
|
692
704
|
scroll-state attributes from which a `Pane` draws its chrome dividers and a
|
|
693
705
|
`TabBar` its overflow dividers; they report committed changes via
|
|
@@ -1202,6 +1214,7 @@ Key conditional `StateBanner` siblings with `rootAttributes={{ "data-key": "…"
|
|
|
1202
1214
|
|
|
1203
1215
|
Key sibling `DialogSurface`s that render conditionally with `rootAttributes={{ "data-key": "…" }}` so a re-render morphs each dialog into itself; never wrap one in a keyed app `div`. Modal `DialogSurface` bounds use typed `viewportGutter` and `maxHeight` (`CssLength` or `"viewport"`); explicit caps stay within the dynamic viewport minus both gutters. Omitted props keep the default caps (20px clear of each edge, 80% of the viewport height at 420px wide or narrower). Application render state chooses responsive values, and preview layout remains application-owned. `height` sets a definite bounded modal size and `bodyLayout="fill"` lets one child fill the body; `bodyLayout="fill-last"` keeps leading rows at their height above one filling last child, and `footerPresentation="floating"` (with a typed `footerOffset`) floats a chat composer over the body while the body reserves its measured height; give the transcript `scrollClearance="block-end"` (a `scrollable` `List` or a `Pane`) to let it scroll beneath the composer, with the last message still resting above it, through the published `--kui-scroll-clearance-block-end` context (overlaying chrome publishes `--kui-scroll-clearance-block-start` / `-end`; one scroller per covered edge opts in; a composed Pane opts in through `PaneConfig.scrollClearance` on a Workbench `mainPane` or panel `pane`, a `CollapsiblePanel` `pane`, or a `NavStack` view's `pane`). `headerPresentation="floating"` lays the title bar over the body on the translucent `--kui-chrome-material-raised` (opaque under reduced transparency, increased contrast, and forced colors); the register measures it and the body reserves it, and a `fill` body's only child with `scrollClearance="both"` scrolls beneath both the title bar and a floating composer through the published `--kui-scroll-clearance-block-start`. `presentation="bottom-sheet"` attaches the dialog to the bottom edge with square bottom corners, safe-area and virtual-keyboard clearance behind the panel, and a slide in/out (`enterMotion` / `exitMotion`); `resizable` adds a top grabber separator bounded by `minHeight` and `maxHeight`. `PopoverDialogSurface` is the non-modal, light-dismiss counterpart on the native Popover API, with the same size props and an `embedded` in-flow presentation; `describedBy` sets its `aria-describedby` (usually a title `ToolbarText`'s `descriptionId`).
|
|
1204
1216
|
Render a non-modal dialog as `PopoverDialogSurface`; `dismiss="manual"` keeps a request open until it is answered, and `anchorName` docks it to an app region named with the same CSS `anchor-name`.
|
|
1217
|
+
Render a panel the person can pin and move (a library, a palette) as `PinnablePopoverSurface` and call `wirePinnablePopover(surface, { pinned, placement, onChange })`: transient below its `popoverTarget` control with light dismiss; pinned (its Pin toggle or `pinPopover`, read with `isPopoverPinned`) it stays open, drags by its title, moves with the arrow keys, resizes, and stays in the viewport gutter; the app stores what `onChange` reports.
|
|
1205
1218
|
|
|
1206
1219
|
Render a modal dialog as `DialogSurface` itself, a native `<dialog>` (`alert` renders `role="alertdialog"` for a destructive confirmation; pair it with `describedBy` on the message): `label` (or `labelledBy` with a `heading`, such as an xl `ToolbarText` with a description) names it, `describedBy` (the heading ToolbarText's `descriptionId`, or app-owned summary copy) describes it as `aria-describedby`, `children` is its body, `footer` holds its buttons, and `headerActions` sit before its close button (`withoutHeader` drops the header for content that owns its heading and close control). Open it with `openDialog(dialog)` and close it with `closeDialog(dialog)` from `@kerfjs/ui/surface-scaffold`; never toggle its `open` attribute. The close button, any `data-dialog-close` element inside (a Cancel button), Escape, and, with `lightDismiss`, a backdrop press dispatch a cancelable `kui-request-close` (`detail.source`: `close-button`, `escape`, or `backdrop`); cancel it to keep the dialog open (the panel pulses). The native `close` event fires once it closes. `openDialog` installs the listeners and, while the dialog is open, measures its floating header/footer, follows a bottom sheet's keyboard and grabber, and keeps that state across re-renders; import `@kerfjs/ui/surface-scaffold/register` only when a dialog may open some other way. Do not write `wa-dialog` inside a `DialogSurface`.
|
|
1207
1220
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kerfjs/ui",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.127",
|
|
4
4
|
"description": "Accessible, composable UI primitives for kerf applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"sideEffects": [
|
|
41
41
|
"**/*.css",
|
|
42
42
|
"./dist/browser/*.js",
|
|
43
|
+
"./src/components/actions/popup-menu/register/popup-menu-register.ts",
|
|
43
44
|
"./dist/select-register.js",
|
|
44
45
|
"./dist/popup-menu-register.js",
|
|
45
46
|
"./dist/help-tags-register.js",
|
|
@@ -753,6 +754,7 @@
|
|
|
753
754
|
"vite-ux-review.d.mts",
|
|
754
755
|
"view",
|
|
755
756
|
"props",
|
|
757
|
+
"scripts/lib/cli-args.mjs",
|
|
756
758
|
"scripts/lib/json-schema-subset.mjs",
|
|
757
759
|
"scripts/component-catalog-extension-validation.mjs",
|
|
758
760
|
"analyzer",
|
|
@@ -782,6 +784,8 @@
|
|
|
782
784
|
"lucide-aliases:sync": "node scripts/sync-lucide-aliases.mjs",
|
|
783
785
|
"check:props": "node scripts/sync-component-props.mjs --check",
|
|
784
786
|
"check:view-bundle": "node scripts/check-view-bundle.mjs",
|
|
787
|
+
"catalog:views:generate": "node view/cli.mjs generate ux-demo/views/*.kui.json",
|
|
788
|
+
"check:catalog-views": "node view/cli.mjs check ux-demo/views/*.kui.json",
|
|
785
789
|
"composition:sync": "node scripts/sync-component-composition.mjs && node scripts/sync-component-docs.mjs",
|
|
786
790
|
"check:component-integrations": "node scripts/check-component-integrations.mjs",
|
|
787
791
|
"component-integrations:dry-run": "node scripts/check-component-integrations.mjs --dry-run",
|
|
@@ -824,7 +828,7 @@
|
|
|
824
828
|
"test:e2e": "playwright test",
|
|
825
829
|
"test:webawesome-latest": "npm install --no-save --no-audit --no-fund @awesome.me/webawesome@^3 && node -e \"console.log('Web Awesome', require('@awesome.me/webawesome/package.json').version)\" && vitest run tests/unit && KERF_WEBAWESOME_LATEST=1 playwright test --project=chromium",
|
|
826
830
|
"bench:micro": "vitest bench --run tests/bench",
|
|
827
|
-
"check": "npm run build && npm run check:source-organization && npm run check:catalog && npm run check:props && npm run check:view-bundle && npm run check:component-integrations && npm run check:profile && npm run check:demo-conformance && npm run check:recipes && npm run check:css-ownership && npm run check:guidance && npm run check:ai-compatibility && npm run check:ai-regressions && npm run lint && npm run typecheck && npm run test:built && npm run test:consumer-types:built && npm run check:ai-signatures && npm run demo:build:built && npm run check:design-templates && npm pack --dry-run",
|
|
831
|
+
"check": "npm run build && npm run check:source-organization && npm run check:catalog && npm run check:catalog-views && npm run check:props && npm run check:view-bundle && npm run check:component-integrations && npm run check:profile && npm run check:demo-conformance && npm run check:recipes && npm run check:css-ownership && npm run check:guidance && npm run check:ai-compatibility && npm run check:ai-regressions && npm run lint && npm run typecheck && npm run test:built && npm run test:consumer-types:built && npm run check:ai-signatures && npm run demo:build:built && npm run check:design-templates && npm pack --dry-run",
|
|
828
832
|
"prepublishOnly": "npm run check",
|
|
829
833
|
"check:design-templates": "node scripts/check-design-templates.mjs",
|
|
830
834
|
"check:design-templates:drift": "node scripts/check-design-templates-drift.mjs",
|
package/props/cli.mjs
CHANGED
|
@@ -5,11 +5,18 @@
|
|
|
5
5
|
// Reads package.json#kerfComponentCatalog: `output` (the composition catalog
|
|
6
6
|
// create-kerf-component writes), `propsOutput` (where to write), and an
|
|
7
7
|
// optional `propsOverlay` of inspector hints. Run after the package's build.
|
|
8
|
-
import { existsSync, readFileSync,
|
|
8
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
9
9
|
import { resolve } from 'node:path';
|
|
10
10
|
import process from 'node:process';
|
|
11
11
|
import { fileURLToPath } from 'node:url';
|
|
12
12
|
|
|
13
|
+
import {
|
|
14
|
+
CLI_USAGE_EXIT,
|
|
15
|
+
isMainModule,
|
|
16
|
+
parseCliArguments,
|
|
17
|
+
readJsonFile,
|
|
18
|
+
wantsHelp,
|
|
19
|
+
} from '../scripts/lib/cli-args.mjs';
|
|
13
20
|
import { validateJsonSchemaSubset } from '../scripts/lib/json-schema-subset.mjs';
|
|
14
21
|
import { buildPackageComponentProps } from './component-props.mjs';
|
|
15
22
|
|
|
@@ -18,30 +25,51 @@ const USAGE = `Usage: kerf-ui-props (--write | --check) [--root <package directo
|
|
|
18
25
|
Reads package.json#kerfComponentCatalog.output (composition catalog),
|
|
19
26
|
.propsOutput (destination), and optional .propsOverlay (inspector hints).
|
|
20
27
|
Run it after building the package: it reads the built declarations.
|
|
28
|
+
|
|
29
|
+
Options:
|
|
30
|
+
--write write the props catalog
|
|
31
|
+
--check fail when the props catalog is missing or stale
|
|
32
|
+
--root <path> package directory (default: current directory)
|
|
33
|
+
-h, --help show this help
|
|
34
|
+
|
|
35
|
+
Exit codes: 0 success, 1 stale catalog or schema problems, 2 usage or
|
|
36
|
+
input error.
|
|
21
37
|
`;
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
// Every read names its file on failure (missing, unreadable, invalid JSON).
|
|
40
|
+
const readJson = (path) => readJsonFile(path);
|
|
24
41
|
const schemaPath = fileURLToPath(
|
|
25
42
|
new URL('../ai/component-props.schema.json', import.meta.url),
|
|
26
43
|
);
|
|
27
44
|
|
|
28
45
|
/** Runs one invocation; returns `{ code, output }` instead of exiting, for tests. */
|
|
29
46
|
export function run(argv) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
if (wantsHelp(argv)) return { code: 0, output: USAGE };
|
|
48
|
+
let options;
|
|
49
|
+
try {
|
|
50
|
+
({ options } = parseCliArguments(argv, {
|
|
51
|
+
values: { '--root': 'root' },
|
|
52
|
+
flags: { '--write': 'write', '--check': 'check' },
|
|
53
|
+
}));
|
|
54
|
+
if (options.write === options.check)
|
|
55
|
+
throw new Error('choose exactly one of --write or --check');
|
|
56
|
+
} catch (error) {
|
|
57
|
+
return { code: 2, output: `kerf-ui-props: ${error.message}\n\n${USAGE}` };
|
|
58
|
+
}
|
|
59
|
+
const write = options.write === true;
|
|
60
|
+
const root = resolve(options.root ?? process.cwd());
|
|
61
|
+
try {
|
|
62
|
+
return runIn(root, write);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
return {
|
|
65
|
+
code: CLI_USAGE_EXIT,
|
|
66
|
+
output: `kerf-ui-props: ${error.message}\n`,
|
|
67
|
+
};
|
|
43
68
|
}
|
|
44
|
-
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Writes or checks the props catalog of the package at `root`. */
|
|
72
|
+
function runIn(root, write) {
|
|
45
73
|
const packagePath = resolve(root, 'package.json');
|
|
46
74
|
if (!existsSync(packagePath)) {
|
|
47
75
|
return { code: 2, output: `kerf-ui-props: no package.json in ${root}\n` };
|
|
@@ -105,11 +133,9 @@ export function run(argv) {
|
|
|
105
133
|
};
|
|
106
134
|
}
|
|
107
135
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
realpathSync(resolve(process.argv[1])) === fileURLToPath(import.meta.url)
|
|
112
|
-
) {
|
|
136
|
+
// npm runs bins through symlinks (node_modules/.bin); isMainModule compares
|
|
137
|
+
// real paths.
|
|
138
|
+
if (isMainModule(import.meta.url)) {
|
|
113
139
|
const result = run(process.argv.slice(2));
|
|
114
140
|
(result.code === 0 ? process.stdout : process.stderr).write(result.output);
|
|
115
141
|
process.exitCode = result.code;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// The shared argument contract for every @kerfjs/ui bin (KF-FSCXYT: uniform
|
|
2
|
+
// --help; KF-7NZM4K: missing values and unknown flags are usage errors, and
|
|
3
|
+
// file problems name the file). Each bin prints its usage and exits 0 on
|
|
4
|
+
// --help / -h without doing any work, and reports a usage or input error as
|
|
5
|
+
// `<bin>: <message>` with exit status 2.
|
|
6
|
+
import { readFileSync, realpathSync } from 'node:fs';
|
|
7
|
+
import { resolve } from 'node:path';
|
|
8
|
+
import process from 'node:process';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
|
|
11
|
+
/** Exit status for a usage, configuration, or input-file error. */
|
|
12
|
+
export const CLI_USAGE_EXIT = 2;
|
|
13
|
+
|
|
14
|
+
/** True when `--help` or `-h` appears anywhere in `argv`. */
|
|
15
|
+
export function wantsHelp(argv) {
|
|
16
|
+
return argv.includes('--help') || argv.includes('-h');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Parses `argv` against a declared option set and throws on anything else.
|
|
21
|
+
*
|
|
22
|
+
* - `values` maps a flag that takes a value to its option key.
|
|
23
|
+
* - `repeatable` lists value flags that may repeat (collected into arrays).
|
|
24
|
+
* - `flags` maps a boolean flag to its option key.
|
|
25
|
+
* - `positionals` allows bare arguments (returned in order); otherwise a bare
|
|
26
|
+
* argument is an unknown argument.
|
|
27
|
+
*/
|
|
28
|
+
export function parseCliArguments(
|
|
29
|
+
argv,
|
|
30
|
+
{ values = {}, repeatable = [], flags = {}, positionals = false } = {},
|
|
31
|
+
) {
|
|
32
|
+
const options = {};
|
|
33
|
+
for (const flag of repeatable) options[values[flag]] = [];
|
|
34
|
+
const bare = [];
|
|
35
|
+
const unknown = [];
|
|
36
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
37
|
+
const argument = argv[index];
|
|
38
|
+
if (Object.hasOwn(values, argument)) {
|
|
39
|
+
const value = argv[index + 1];
|
|
40
|
+
if (value === undefined || value === '' || value.startsWith('--'))
|
|
41
|
+
throw new Error(`${argument} requires a value.`);
|
|
42
|
+
index += 1;
|
|
43
|
+
const key = values[argument];
|
|
44
|
+
if (repeatable.includes(argument)) options[key].push(value);
|
|
45
|
+
else options[key] = value;
|
|
46
|
+
} else if (Object.hasOwn(flags, argument)) {
|
|
47
|
+
options[flags[argument]] = true;
|
|
48
|
+
} else if (!argument.startsWith('-') && positionals) {
|
|
49
|
+
bare.push(argument);
|
|
50
|
+
} else {
|
|
51
|
+
unknown.push(argument);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (unknown.length)
|
|
55
|
+
throw new Error(`Unknown arguments: ${unknown.join(' ')}`);
|
|
56
|
+
return { options, positionals: bare };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Reads and parses a JSON file, naming the file in every failure:
|
|
61
|
+
* `<path>: file not found`, `<path>: invalid JSON: …`, or `<path>: <reason>`.
|
|
62
|
+
*/
|
|
63
|
+
export function readJsonFile(path, label = path) {
|
|
64
|
+
let text;
|
|
65
|
+
try {
|
|
66
|
+
text = readFileSync(path, 'utf8');
|
|
67
|
+
} catch (error) {
|
|
68
|
+
throw new Error(
|
|
69
|
+
error?.code === 'ENOENT'
|
|
70
|
+
? `${label}: file not found`
|
|
71
|
+
: `${label}: ${error?.message ?? String(error)}`,
|
|
72
|
+
{ cause: error },
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
return JSON.parse(text);
|
|
77
|
+
} catch (error) {
|
|
78
|
+
throw new Error(`${label}: invalid JSON: ${error.message}`, {
|
|
79
|
+
cause: error,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* True when the module at `moduleUrl` is the process entry point. npm runs
|
|
86
|
+
* bins through `node_modules/.bin` symlinks, so both sides are real paths.
|
|
87
|
+
*/
|
|
88
|
+
export function isMainModule(moduleUrl) {
|
|
89
|
+
const entry = process.argv[1];
|
|
90
|
+
if (!entry) return false;
|
|
91
|
+
try {
|
|
92
|
+
return (
|
|
93
|
+
realpathSync(resolve(entry)) === realpathSync(fileURLToPath(moduleUrl))
|
|
94
|
+
);
|
|
95
|
+
} catch {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -1,33 +1,23 @@
|
|
|
1
1
|
import '@kerfjs/ui/layout.css';
|
|
2
2
|
import '@kerfjs/ui/workbench.css';
|
|
3
3
|
|
|
4
|
-
import { List } from '@kerfjs/ui/list';
|
|
5
|
-
import { ListItem } from '@kerfjs/ui/list-item';
|
|
6
|
-
import { LucideIcon } from '@kerfjs/ui/lucide-icon';
|
|
7
|
-
import { Toolbar } from '@kerfjs/ui/toolbar';
|
|
8
|
-
import {
|
|
9
|
-
ToolbarButton,
|
|
10
|
-
ToolbarControlGroup,
|
|
11
|
-
} from '@kerfjs/ui/toolbar-control-group';
|
|
12
|
-
import { ToolbarText } from '@kerfjs/ui/toolbar-text';
|
|
13
|
-
import { ValueTable, ValueTableRow } from '@kerfjs/ui/value-table';
|
|
14
4
|
import { wireWorkbench } from '@kerfjs/ui/wire-workbench';
|
|
15
|
-
import { Workbench } from '@kerfjs/ui/workbench';
|
|
16
5
|
import { delegate, signal } from 'kerfjs';
|
|
17
|
-
import { Bell, Folder, Inbox, Settings } from 'lucide';
|
|
18
6
|
|
|
7
|
+
import { renderRecipeAppShellBar } from '../views/recipe-app-shell-bar.view.js';
|
|
8
|
+
import { renderRecipeAppShellFrame } from '../views/recipe-app-shell-frame.view.js';
|
|
9
|
+
import { renderRecipeAppShellInspector } from '../views/recipe-app-shell-inspector.view.js';
|
|
10
|
+
import { renderRecipeAppShellMainTitle } from '../views/recipe-app-shell-main-title.view.js';
|
|
11
|
+
import { renderRecipeAppShellNavigation } from '../views/recipe-app-shell-navigation.view.js';
|
|
12
|
+
import { renderRecipeAppShellNewTask } from '../views/recipe-app-shell-new-task.view.js';
|
|
13
|
+
import { renderRecipeAppShellRailTitle } from '../views/recipe-app-shell-rail-title.view.js';
|
|
14
|
+
import { renderRecipeAppShellTasks } from '../views/recipe-app-shell-tasks.view.js';
|
|
15
|
+
import { renderRecipeAppShellWorkbench } from '../views/recipe-app-shell-workbench.view.js';
|
|
19
16
|
import type { RecipeFactory, RecipePresentation } from './types.js';
|
|
20
17
|
|
|
21
18
|
const NAVIGATION_ACTION = 'recipe-shell-toggle-navigation';
|
|
22
19
|
const INSPECTOR_ACTION = 'recipe-shell-toggle-inspector';
|
|
23
20
|
|
|
24
|
-
const tasks = [
|
|
25
|
-
['Release accessibility audit', 'Interface systems · due this week'],
|
|
26
|
-
['Prepare tablet navigation', 'Interface systems · due this week'],
|
|
27
|
-
['Review stale-data states', 'Platform · due next week'],
|
|
28
|
-
['Confirm package boundaries', 'Platform · due next week'],
|
|
29
|
-
] as const;
|
|
30
|
-
|
|
31
21
|
export const presentation: RecipePresentation = {
|
|
32
22
|
viewport: {
|
|
33
23
|
width: 'full',
|
|
@@ -49,133 +39,50 @@ export const createRecipe: RecipeFactory = (announce) => {
|
|
|
49
39
|
|
|
50
40
|
const navigation = () => (
|
|
51
41
|
<nav aria-label="Workspace">
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
label="Inbox"
|
|
57
|
-
icon={<LucideIcon icon={Inbox} name="inbox" />}
|
|
58
|
-
selected={selected.value === 'inbox'}
|
|
59
|
-
/>
|
|
60
|
-
<ListItem
|
|
61
|
-
action="recipe-action"
|
|
62
|
-
itemId="projects"
|
|
63
|
-
label="Projects with a Deliberately Wrapping Title"
|
|
64
|
-
icon={<LucideIcon icon={Folder} name="folder" />}
|
|
65
|
-
selected={selected.value === 'projects'}
|
|
66
|
-
multiline
|
|
67
|
-
/>
|
|
68
|
-
</List>
|
|
42
|
+
{renderRecipeAppShellNavigation({
|
|
43
|
+
inboxSelected: selected.value === 'inbox',
|
|
44
|
+
projectsSelected: selected.value === 'projects',
|
|
45
|
+
})}
|
|
69
46
|
</nav>
|
|
70
47
|
);
|
|
71
48
|
|
|
72
|
-
const render = () =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<ToolbarButton
|
|
85
|
-
ariaLabel="Notifications"
|
|
86
|
-
action="recipe-action"
|
|
87
|
-
rootAttributes={{ 'data-recipe-command': 'notify' }}
|
|
88
|
-
icon={<LucideIcon icon={Bell} name="bell" />}
|
|
89
|
-
/>
|
|
90
|
-
<ToolbarButton
|
|
91
|
-
ariaLabel="Settings"
|
|
92
|
-
action="recipe-action"
|
|
93
|
-
rootAttributes={{ 'data-recipe-command': 'settings' }}
|
|
94
|
-
icon={<LucideIcon icon={Settings} name="settings" />}
|
|
95
|
-
/>
|
|
96
|
-
</ToolbarControlGroup>
|
|
97
|
-
}
|
|
98
|
-
/>
|
|
99
|
-
<List flex>
|
|
100
|
-
<Workbench
|
|
101
|
-
id="recipe-shell"
|
|
102
|
-
label="Atlas Workspace Panes"
|
|
103
|
-
leftRail={{
|
|
104
|
-
label: 'Navigation',
|
|
105
|
-
size: navigationSize.value,
|
|
106
|
-
resizable: { min: 180, max: 320 },
|
|
107
|
-
collapsed: navigationCollapsed.value,
|
|
108
|
-
toolbar: {
|
|
109
|
-
label: 'Navigation',
|
|
110
|
-
title: <ToolbarText text="Workspace" />,
|
|
111
|
-
toggle: { action: NAVIGATION_ACTION, name: 'Navigation' },
|
|
49
|
+
const render = () =>
|
|
50
|
+
renderRecipeAppShellFrame(
|
|
51
|
+
{},
|
|
52
|
+
{
|
|
53
|
+
bar: renderRecipeAppShellBar,
|
|
54
|
+
workbench: () =>
|
|
55
|
+
renderRecipeAppShellWorkbench(
|
|
56
|
+
{
|
|
57
|
+
navigationSize: navigationSize.value,
|
|
58
|
+
inspectorSize: inspectorSize.value,
|
|
59
|
+
navigationCollapsed: navigationCollapsed.value,
|
|
60
|
+
inspectorCollapsed: inspectorCollapsed.value,
|
|
112
61
|
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
single
|
|
134
|
-
>
|
|
135
|
-
<ToolbarButton
|
|
136
|
-
action="recipe-action"
|
|
137
|
-
rootAttributes={{ 'data-recipe-command': 'new' }}
|
|
138
|
-
>
|
|
139
|
-
New Task
|
|
140
|
-
</ToolbarButton>
|
|
141
|
-
</ToolbarControlGroup>
|
|
142
|
-
),
|
|
143
|
-
}}
|
|
144
|
-
main={
|
|
145
|
-
<section aria-label="Tasks">
|
|
146
|
-
{tasks.map(([title, detail]) => (
|
|
147
|
-
<ListItem
|
|
148
|
-
action="recipe-action"
|
|
149
|
-
label={title}
|
|
150
|
-
description={detail}
|
|
151
|
-
multiline
|
|
152
|
-
rootAttributes={{ 'data-recipe-command': 'open-task' }}
|
|
153
|
-
/>
|
|
154
|
-
))}
|
|
155
|
-
</section>
|
|
156
|
-
}
|
|
157
|
-
rightRail={{
|
|
158
|
-
label: 'Inspector',
|
|
159
|
-
size: inspectorSize.value,
|
|
160
|
-
resizable: { min: 200, max: 360 },
|
|
161
|
-
collapsed: inspectorCollapsed.value,
|
|
162
|
-
toolbar: {
|
|
163
|
-
label: 'Inspector',
|
|
164
|
-
title: <ToolbarText text="Inspector" />,
|
|
165
|
-
toggle: { action: INSPECTOR_ACTION, name: 'Inspector' },
|
|
62
|
+
{
|
|
63
|
+
navigationTitle: () =>
|
|
64
|
+
renderRecipeAppShellRailTitle({ text: 'Workspace' }),
|
|
65
|
+
navigation,
|
|
66
|
+
mainTitle: () =>
|
|
67
|
+
renderRecipeAppShellMainTitle({
|
|
68
|
+
text:
|
|
69
|
+
selected.value === 'inbox'
|
|
70
|
+
? 'Inbox Triage'
|
|
71
|
+
: 'Active Projects',
|
|
72
|
+
}),
|
|
73
|
+
newTask: renderRecipeAppShellNewTask,
|
|
74
|
+
main: () => (
|
|
75
|
+
<section aria-label="Tasks">
|
|
76
|
+
{renderRecipeAppShellTasks()}
|
|
77
|
+
</section>
|
|
78
|
+
),
|
|
79
|
+
inspectorTitle: () =>
|
|
80
|
+
renderRecipeAppShellRailTitle({ text: 'Inspector' }),
|
|
81
|
+
inspector: renderRecipeAppShellInspector,
|
|
166
82
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
<ValueTableRow label="Owner" value="Mara Chen" />
|
|
171
|
-
<ValueTableRow label="Priority" value="High" />
|
|
172
|
-
</ValueTable>
|
|
173
|
-
),
|
|
174
|
-
}}
|
|
175
|
-
/>
|
|
176
|
-
</List>
|
|
177
|
-
</List>
|
|
178
|
-
);
|
|
83
|
+
),
|
|
84
|
+
},
|
|
85
|
+
);
|
|
179
86
|
|
|
180
87
|
return {
|
|
181
88
|
render,
|