@jskit-ai/agent-docs 0.1.116 → 0.1.118
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.
|
@@ -675,6 +675,21 @@ The closed presentation is adaptive and uses Vuetify's Material navigation
|
|
|
675
675
|
components. On compact/mobile layouts the temporary drawer closes completely.
|
|
676
676
|
On medium and expanded layouts it collapses to a navigation rail by default,
|
|
677
677
|
so primary navigation remains visible. Opening it restores the full drawer.
|
|
678
|
+
Escape and outside dismissal close only the compact temporary drawer and return
|
|
679
|
+
focus to the shell navigation toggle. They do not collapse permanent desktop
|
|
680
|
+
navigation.
|
|
681
|
+
|
|
682
|
+
The open drawer is content-aware by default. After the visible semantic
|
|
683
|
+
placements and fonts settle, `ShellLayout` measures the rendered labels and
|
|
684
|
+
uses one `navigationItemSpacing` value for the icon-to-label gap and the space
|
|
685
|
+
between the widest label and the drawer edge. It defaults to 12 CSS pixels and
|
|
686
|
+
can be set from 8–24px. The shell remeasures when placements, localization,
|
|
687
|
+
fonts, spacing, the active surface, or the window layout change, and clamps
|
|
688
|
+
unusually long labels to a safe range. The
|
|
689
|
+
closed desktop rail remains 80 CSS pixels wide by default, with every icon and
|
|
690
|
+
its Material selected-state indicator centred in the rail. Rail tooltips use
|
|
691
|
+
one explicit opaque theme color pair and open on pointer hover or keyboard
|
|
692
|
+
focus.
|
|
678
693
|
|
|
679
694
|
The app-owned `ShellLayout` can opt into a fully hidden wide drawer when the
|
|
680
695
|
product has another discoverable navigation affordance:
|
|
@@ -688,6 +703,23 @@ product has another discoverable navigation affordance:
|
|
|
688
703
|
The default is `desktop-drawer-closed-mode="rail"`. Prefer that Material 3
|
|
689
704
|
pattern; do not imitate a rail with custom CSS or a second menu registry.
|
|
690
705
|
|
|
706
|
+
Applications that need product-specific dimensions or spacing can use the
|
|
707
|
+
public props instead of overriding Vuetify drawer CSS:
|
|
708
|
+
|
|
709
|
+
```vue
|
|
710
|
+
<ShellLayout :drawer-width="280" :rail-width="64" :navigation-item-spacing="12">
|
|
711
|
+
<RouterView />
|
|
712
|
+
</ShellLayout>
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
Omit `drawer-width` to retain content-aware sizing. Omit `rail-width` to retain
|
|
716
|
+
the 80px Material navigation-rail default. Drawer overrides are clamped to
|
|
717
|
+
120–360px and rail overrides to 48–160px so shell navigation cannot consume an
|
|
718
|
+
unsafe share of the viewport or shrink below its touch targets. The app-owned
|
|
719
|
+
`src/components/ShellLayout.vue` wrapper also forwards
|
|
720
|
+
`navigation-item-spacing`, so an application does not need to copy or restyle
|
|
721
|
+
the drawer implementation.
|
|
722
|
+
|
|
691
723
|
`useShellErrorPresentationStore()` exposes the current banner, snackbar, and dialog presentation state behind `ShellErrorHost`.
|
|
692
724
|
|
|
693
725
|
The simplest direct store usage looks like this:
|
package/package.json
CHANGED
package/patterns/placements.md
CHANGED
|
@@ -58,6 +58,9 @@ Runtime behavior:
|
|
|
58
58
|
- Runtime resolves the component token as `entry.componentToken || variant.renderers[entry.kind]`.
|
|
59
59
|
- Entries without a resolvable component token do not render.
|
|
60
60
|
- `when()` receives placement context including `app`, `surface`, `target`, `layoutClass`, runtime context, local outlet context, and context contributors.
|
|
61
|
+
- The standard `ShellLayout` uses one `navigationItemSpacing` value (12px by default) for the icon-to-label gap and the widest label's logical-end gap. It remeasures its content-aware width after placement, locale, font, surface, spacing, and layout changes. Use `drawerWidth` only when a product needs a fixed width; do not add consumer `.v-navigation-drawer` overrides.
|
|
62
|
+
- On medium and expanded layouts, closing the standard drawer produces an 80px Material navigation rail by default. Use `railWidth` to configure that width, or `desktopDrawerClosedMode="hidden"` only when another discoverable navigation surface exists.
|
|
63
|
+
- The shell link renderers own rail centring, selected-state treatment, and opaque theme-aware tooltips. Applications should keep supplying the same semantic placement records rather than creating rail-only links or tooltip CSS.
|
|
61
64
|
|
|
62
65
|
CLI and generators:
|
|
63
66
|
|
package/patterns/ui-testing.md
CHANGED
|
@@ -13,6 +13,7 @@ Rules:
|
|
|
13
13
|
- Generator or package template UI changes must be checked at compact phone, tablet-ish medium, and expanded desktop widths.
|
|
14
14
|
- For generated UI, check horizontal overflow, clipped or invisible text, duplicate navigation, and broken route placement at every standard viewport. On compact screens, also check generated-screen tap targets under 48 px; medium and expanded layouts may use their documented denser controls.
|
|
15
15
|
- Apps with `shell-web` installed should start from `tests/e2e/adaptive-shell.spec.ts` and extend it with feature-specific assertions.
|
|
16
|
+
- The package helper reads the shell's rendered `data-layout` contract, waits for drawer transitions without fixed sleeps, verifies compact Escape/outside dismissal, checks content-aware drawer fit, and measures rail icon centring against the configured width. Do not replace it with viewport-name assumptions or immediate animation-time geometry reads.
|
|
16
17
|
- Generated `playwright.config.mjs` delegates to `@jskit-ai/jskit-cli/test/playwright`. Do not copy base-URL, web-server, or storage-state logic into app tests.
|
|
17
18
|
- Use relative paths such as `page.goto("/home")`. The shared config owns the browser base URL.
|
|
18
19
|
- A managed runner supplies `PLAYWRIGHT_BASE_URL`. When it is set, JSKIT does not start another app server.
|
|
@@ -65,6 +65,17 @@ Local functions
|
|
|
65
65
|
Exports
|
|
66
66
|
- None
|
|
67
67
|
Local functions
|
|
68
|
+
- `attachShellListeners()`
|
|
69
|
+
- `detachShellListeners()`
|
|
70
|
+
- `handleDrawerOpenChange(open)`
|
|
71
|
+
- `handleLayoutClassChange(compact)`
|
|
72
|
+
- `handleShellKeydown(event)`
|
|
73
|
+
- `focusNavigationToggle()`
|
|
74
|
+
- `initializeDrawerMeasurement()`
|
|
75
|
+
- `resolveNavigationDrawerElement()`
|
|
76
|
+
- `scheduleDrawerWidthMeasurement()`
|
|
77
|
+
- `measureDrawerContentWidth()`
|
|
78
|
+
- `measureRenderedText(element)`
|
|
68
79
|
- `handlePullPointerDown(event)`
|
|
69
80
|
- `handleDrawerVisibilityChange(open)`
|
|
70
81
|
- `handlePullPointerMove(event)`
|
|
@@ -91,6 +102,10 @@ Local functions
|
|
|
91
102
|
Exports
|
|
92
103
|
- None
|
|
93
104
|
|
|
105
|
+
### `src/client/components/ShellNavigationTooltip.vue`
|
|
106
|
+
Exports
|
|
107
|
+
- None
|
|
108
|
+
|
|
94
109
|
### `src/client/components/ShellOutlet.vue`
|
|
95
110
|
Exports
|
|
96
111
|
- None
|
|
@@ -412,6 +427,20 @@ Exports
|
|
|
412
427
|
- `resolveShellDrawerPresentation({ compact = false, open = false, desktopClosedMode = "rail" } = {})`
|
|
413
428
|
- `resolveShellDrawerToggleLabel({ compact = false, open = false } = {})`
|
|
414
429
|
|
|
430
|
+
### `src/client/support/drawerWidth.js`
|
|
431
|
+
Exports
|
|
432
|
+
- `DEFAULT_SHELL_DRAWER_WIDTH`
|
|
433
|
+
- `DEFAULT_SHELL_NAVIGATION_ITEM_SPACING`
|
|
434
|
+
- `DEFAULT_SHELL_RAIL_WIDTH`
|
|
435
|
+
- `MAXIMUM_SHELL_DRAWER_WIDTH`
|
|
436
|
+
- `MINIMUM_SHELL_DRAWER_WIDTH`
|
|
437
|
+
- `normalizeShellDrawerWidth(value, fallback = DEFAULT_SHELL_DRAWER_WIDTH)`
|
|
438
|
+
- `normalizeShellNavigationItemSpacing(value, fallback = DEFAULT_SHELL_NAVIGATION_ITEM_SPACING)`
|
|
439
|
+
- `normalizeShellRailWidth(value, fallback = DEFAULT_SHELL_RAIL_WIDTH)`
|
|
440
|
+
- `resolveContentAwareDrawerWidth(measurements = [], { endGap = DEFAULT_SHELL_NAVIGATION_ITEM_SPACING, minimum = MINIMUM_SHELL_DRAWER_WIDTH, maximum = MAXIMUM_SHELL_DRAWER_WIDTH, fallback = DEFAULT_SHELL_DRAWER_WIDTH } = {})`
|
|
441
|
+
Local functions
|
|
442
|
+
- `clampNumber(value, minimum, maximum)`
|
|
443
|
+
|
|
415
444
|
### `src/client/support/menuLinkTarget.js`
|
|
416
445
|
Exports
|
|
417
446
|
- `normalizeMenuLinkPathname(pathname = "")`
|
|
@@ -422,6 +451,10 @@ Local functions
|
|
|
422
451
|
- `isRelativeMenuLinkTarget(target = "")`
|
|
423
452
|
- `surfaceRequiresWorkspaceFromPlacementContext(contextValue = null, surfaceId = "")`
|
|
424
453
|
|
|
454
|
+
### `src/client/support/navigationLinkKeyboard.js`
|
|
455
|
+
Exports
|
|
456
|
+
- `activateShellNavigationLinkOnSpace(event)`
|
|
457
|
+
|
|
425
458
|
### `src/client/support/routeTransitionKey.js`
|
|
426
459
|
Exports
|
|
427
460
|
- `resolveShellRouteTransitionKey({ routePathKey = "", routeTransitionName = "", surfaceId = "" } = {})`
|
|
@@ -512,3 +545,24 @@ Exports
|
|
|
512
545
|
### `package.descriptor.mjs`
|
|
513
546
|
Exports
|
|
514
547
|
- None
|
|
548
|
+
|
|
549
|
+
### fixtures
|
|
550
|
+
|
|
551
|
+
### `fixtures/adaptive-shell/src/App.vue`
|
|
552
|
+
Exports
|
|
553
|
+
- None
|
|
554
|
+
|
|
555
|
+
### `fixtures/adaptive-shell/src/main.js`
|
|
556
|
+
Exports
|
|
557
|
+
- None
|
|
558
|
+
Local functions
|
|
559
|
+
- `createSurfacePlacement(surface, order, label, suffix)`
|
|
560
|
+
- `createSurfacePlacements(surface)`
|
|
561
|
+
|
|
562
|
+
### `fixtures/adaptive-shell/src/ScreenPage.vue`
|
|
563
|
+
Exports
|
|
564
|
+
- None
|
|
565
|
+
|
|
566
|
+
### `fixtures/adaptive-shell/vite.config.mjs`
|
|
567
|
+
Exports
|
|
568
|
+
- None
|
|
@@ -47,6 +47,12 @@ navigation as a rail. Use `desktopDrawerClosedMode="hidden"` only when another
|
|
|
47
47
|
discoverable navigation affordance exists. Do not create a second drawer/menu
|
|
48
48
|
registry or imitate the rail with CSS.
|
|
49
49
|
|
|
50
|
+
The drawer uses `navigationItemSpacing` (12px) for icon/label and widest-label/
|
|
51
|
+
edge gaps. Its 80px rail centres complete 48px targets and theme-owned
|
|
52
|
+
tooltips. Set `railWidth` (for example, `64`) for another density, or
|
|
53
|
+
`drawerWidth` for a fixed open width. The app wrapper forwards all three; never
|
|
54
|
+
override `.v-navigation-drawer` in an app.
|
|
55
|
+
|
|
50
56
|
## Browser verification
|
|
51
57
|
|
|
52
58
|
Exercise user-facing changes with Playwright at compact, medium, and expanded
|