@jskit-ai/agent-docs 0.1.116 → 0.1.117
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,19 @@ 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
|
+
keeps the drawer edge approximately 10 CSS pixels beyond the widest label. It
|
|
685
|
+
remeasures when placements, localization, fonts, the active surface, or the
|
|
686
|
+
window layout change, and clamps unusually long labels to a safe range. The
|
|
687
|
+
closed desktop rail remains 80 CSS pixels wide by default, with every icon and
|
|
688
|
+
its Material selected-state indicator centred in the rail. Rail tooltips use
|
|
689
|
+
one explicit opaque theme color pair and open on pointer hover or keyboard
|
|
690
|
+
focus.
|
|
678
691
|
|
|
679
692
|
The app-owned `ShellLayout` can opt into a fully hidden wide drawer when the
|
|
680
693
|
product has another discoverable navigation affordance:
|
|
@@ -688,6 +701,23 @@ product has another discoverable navigation affordance:
|
|
|
688
701
|
The default is `desktop-drawer-closed-mode="rail"`. Prefer that Material 3
|
|
689
702
|
pattern; do not imitate a rail with custom CSS or a second menu registry.
|
|
690
703
|
|
|
704
|
+
Applications that need fixed product-specific dimensions can use the public
|
|
705
|
+
width props instead of overriding Vuetify drawer CSS:
|
|
706
|
+
|
|
707
|
+
```vue
|
|
708
|
+
<ShellLayout :drawer-width="280" :rail-width="88">
|
|
709
|
+
<RouterView />
|
|
710
|
+
</ShellLayout>
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
Omit `drawer-width` to retain content-aware sizing. Omit `rail-width` to retain
|
|
714
|
+
the 80px Material navigation-rail default. Drawer overrides are clamped to
|
|
715
|
+
120–360px and rail overrides to 48–160px so shell navigation cannot consume an
|
|
716
|
+
unsafe share of the viewport or shrink below its touch targets. The app-owned
|
|
717
|
+
`src/components/ShellLayout.vue` wrapper forwards these attributes to the
|
|
718
|
+
package component, so an application does not need to copy or restyle the
|
|
719
|
+
drawer implementation.
|
|
720
|
+
|
|
691
721
|
`useShellErrorPresentationStore()` exposes the current banner, snackbar, and dialog presentation state behind `ShellErrorHost`.
|
|
692
722
|
|
|
693
723
|
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` sizes its open drawer from the widest currently visible placement label plus an approximately 10px logical-end gap. It remeasures after placement, locale, font, surface, and layout changes. Use the public `drawerWidth` prop 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 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,19 @@ 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_RAIL_WIDTH`
|
|
434
|
+
- `MAXIMUM_SHELL_DRAWER_WIDTH`
|
|
435
|
+
- `MINIMUM_SHELL_DRAWER_WIDTH`
|
|
436
|
+
- `SHELL_DRAWER_LABEL_END_GAP`
|
|
437
|
+
- `normalizeShellDrawerWidth(value, fallback = DEFAULT_SHELL_DRAWER_WIDTH)`
|
|
438
|
+
- `normalizeShellRailWidth(value, fallback = DEFAULT_SHELL_RAIL_WIDTH)`
|
|
439
|
+
- `resolveContentAwareDrawerWidth(measurements = [], { endGap = SHELL_DRAWER_LABEL_END_GAP, minimum = MINIMUM_SHELL_DRAWER_WIDTH, maximum = MAXIMUM_SHELL_DRAWER_WIDTH, fallback = DEFAULT_SHELL_DRAWER_WIDTH } = {})`
|
|
440
|
+
Local functions
|
|
441
|
+
- `clampNumber(value, minimum, maximum)`
|
|
442
|
+
|
|
415
443
|
### `src/client/support/menuLinkTarget.js`
|
|
416
444
|
Exports
|
|
417
445
|
- `normalizeMenuLinkPathname(pathname = "")`
|
|
@@ -422,6 +450,10 @@ Local functions
|
|
|
422
450
|
- `isRelativeMenuLinkTarget(target = "")`
|
|
423
451
|
- `surfaceRequiresWorkspaceFromPlacementContext(contextValue = null, surfaceId = "")`
|
|
424
452
|
|
|
453
|
+
### `src/client/support/navigationLinkKeyboard.js`
|
|
454
|
+
Exports
|
|
455
|
+
- `activateShellNavigationLinkOnSpace(event)`
|
|
456
|
+
|
|
425
457
|
### `src/client/support/routeTransitionKey.js`
|
|
426
458
|
Exports
|
|
427
459
|
- `resolveShellRouteTransitionKey({ routePathKey = "", routeTransitionName = "", surfaceId = "" } = {})`
|
|
@@ -512,3 +544,24 @@ Exports
|
|
|
512
544
|
### `package.descriptor.mjs`
|
|
513
545
|
Exports
|
|
514
546
|
- None
|
|
547
|
+
|
|
548
|
+
### fixtures
|
|
549
|
+
|
|
550
|
+
### `fixtures/adaptive-shell/src/App.vue`
|
|
551
|
+
Exports
|
|
552
|
+
- None
|
|
553
|
+
|
|
554
|
+
### `fixtures/adaptive-shell/src/main.js`
|
|
555
|
+
Exports
|
|
556
|
+
- None
|
|
557
|
+
Local functions
|
|
558
|
+
- `createSurfacePlacement(surface, order, label, suffix)`
|
|
559
|
+
- `createSurfacePlacements(surface)`
|
|
560
|
+
|
|
561
|
+
### `fixtures/adaptive-shell/src/ScreenPage.vue`
|
|
562
|
+
Exports
|
|
563
|
+
- None
|
|
564
|
+
|
|
565
|
+
### `fixtures/adaptive-shell/vite.config.mjs`
|
|
566
|
+
Exports
|
|
567
|
+
- None
|
|
@@ -47,6 +47,11 @@ 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 open drawer tracks its widest visible label plus about 10px. The 80px
|
|
51
|
+
desktop rail centres complete 48px targets and opaque theme-owned tooltips.
|
|
52
|
+
Set `ShellLayout` `drawerWidth` or `railWidth` only for a fixed product width;
|
|
53
|
+
the app wrapper forwards both. Never override `.v-navigation-drawer` in an app.
|
|
54
|
+
|
|
50
55
|
## Browser verification
|
|
51
56
|
|
|
52
57
|
Exercise user-facing changes with Playwright at compact, medium, and expanded
|