@kerfjs/ui 5.0.0-beta.91 → 5.0.0-beta.93
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 -1
- package/ai/public-api-signatures-v1.md +47 -10
- package/ai/skill.md +5 -1
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/index.mjs +4 -4
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +30 -4
- package/dist/catalog.js +51 -8
- package/dist/catalog.js.map +1 -1
- package/dist/chunk-6C6DLP3W.js +31 -0
- package/dist/chunk-6C6DLP3W.js.map +1 -0
- package/dist/{chunk-3VWOVICT.js → chunk-6STQXRT4.js} +34 -4
- package/dist/chunk-6STQXRT4.js.map +1 -0
- package/dist/{chunk-ZM3UOGZV.js → chunk-75YOTZ25.js} +2 -2
- package/dist/{chunk-ZM3UOGZV.js.map → chunk-75YOTZ25.js.map} +1 -1
- package/dist/{chunk-D3ACDORR.js → chunk-GIUOXAVL.js} +2 -2
- package/dist/{chunk-D3ACDORR.js.map → chunk-GIUOXAVL.js.map} +1 -1
- package/dist/{chunk-X6PR75UE.js → chunk-HWY4BSLS.js} +2 -2
- package/dist/{chunk-X6PR75UE.js.map → chunk-HWY4BSLS.js.map} +1 -1
- package/dist/{chunk-H45DAZBL.js → chunk-KQDU7Z7P.js} +76 -23
- package/dist/chunk-KQDU7Z7P.js.map +1 -0
- package/dist/{chunk-PYWDDPMJ.js → chunk-QCLLBMLA.js} +3 -3
- package/dist/{chunk-PYWDDPMJ.js.map → chunk-QCLLBMLA.js.map} +1 -1
- package/dist/{chunk-5BZBIRQG.js → chunk-QLA25V2K.js} +50 -9
- package/dist/chunk-QLA25V2K.js.map +1 -0
- package/dist/{chunk-NMKY3WRM.js → chunk-ROZLJULF.js} +2 -2
- package/dist/{chunk-NMKY3WRM.js.map → chunk-ROZLJULF.js.map} +1 -1
- package/dist/{chunk-JQ4QGIKS.js → chunk-RZYQFGMM.js} +2 -2
- package/dist/{chunk-JQ4QGIKS.js.map → chunk-RZYQFGMM.js.map} +1 -1
- package/dist/chunk-TKDDTLG5.js +254 -0
- package/dist/chunk-TKDDTLG5.js.map +1 -0
- package/dist/{chunk-FHVGTV4Z.js → chunk-TNG3XKHB.js} +2 -2
- package/dist/{chunk-FHVGTV4Z.js.map → chunk-TNG3XKHB.js.map} +1 -1
- package/dist/{chunk-6L3WBDNW.js → chunk-UKKRPP56.js} +34 -9
- package/dist/chunk-UKKRPP56.js.map +1 -0
- package/dist/{chunk-SSXEYZQR.js → chunk-YP2G67S7.js} +2 -2
- package/dist/{chunk-SSXEYZQR.js.map → chunk-YP2G67S7.js.map} +1 -1
- package/dist/collapsible-panel.js +3 -3
- package/dist/disclosure-arrow.js +1 -1
- package/dist/index.js +9 -9
- package/dist/list-header.js +1 -1
- package/dist/lucide-icon.js +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/popup-menu.js +1 -1
- package/dist/select.js +1 -1
- package/dist/split-view.js +1 -1
- package/dist/token-search-field.js +1 -1
- package/dist/{types-oLe_N1w0.d.ts → types-BNP4gA41.d.ts} +18 -1
- package/dist/wire-catalog.d.ts +9 -2
- package/dist/wire-catalog.js +42 -8
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-scroll-dividers.d.ts +6 -2
- package/dist/wire-scroll-dividers.js +1 -1
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/wire-workbench.js +1 -1
- package/dist/workbench.js +1 -1
- package/docs/catalog.md +51 -0
- package/docs/component-contract.md +6 -0
- package/docs/ui-doctor.md +6 -2
- package/doctor/index.mjs +10 -1
- package/package.json +8 -1
- package/vite-ux-review.d.mts +44 -0
- package/vite-ux-review.mjs +65 -0
- package/dist/chunk-3VWOVICT.js.map +0 -1
- package/dist/chunk-5BZBIRQG.js.map +0 -1
- package/dist/chunk-6L3WBDNW.js.map +0 -1
- package/dist/chunk-H45DAZBL.js.map +0 -1
- package/dist/chunk-NJZMR7HM.js +0 -135
- package/dist/chunk-NJZMR7HM.js.map +0 -1
package/README.md
CHANGED
|
@@ -377,7 +377,11 @@ pretending app-local components are `@kerfjs/ui` exports.
|
|
|
377
377
|
For a consumer UX demo, `@kerfjs/ui/catalog-projection` derives rows and
|
|
378
378
|
relationships from that extension; `kerf-catalog-demo --write` emits a typed
|
|
379
379
|
module and `--check` catches drift. See the [catalog guide](./docs/catalog.md)
|
|
380
|
-
for repository base and source path configuration.
|
|
380
|
+
for repository base and source path configuration. To offer the catalog's
|
|
381
|
+
**Capture region** link to UX Review on a local server, add the Node-only
|
|
382
|
+
`uxReviewPlugin` from `@kerfjs/ui/vite-ux-review` to the Vite config and pass
|
|
383
|
+
`wireCatalog`'s `onUxReviewProject` result to `Catalog`'s `uxReview` (the
|
|
384
|
+
[catalog guide](./docs/catalog.md#ux-review-capture) has the wiring).
|
|
381
385
|
|
|
382
386
|
Composition-aware consumers use
|
|
383
387
|
[`component-composition-extension.schema.json`](./ai/component-composition-extension.schema.json),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Public API signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.93` and `kerfjs@5.0.0-beta.93`. This bounded reference covers only APIs used by the seven-task corpus. It is interface evidence, not an implementation or runtime guarantee.
|
|
4
4
|
|
|
5
5
|
## `@kerfjs/ui/css-values`
|
|
6
6
|
|
|
@@ -1281,8 +1281,12 @@ type Root = HTMLElement | Document;
|
|
|
1281
1281
|
*
|
|
1282
1282
|
* Structure is re-read after every DOM change below root that can change a
|
|
1283
1283
|
* pairing — a structural element or target id added, removed, or re-classed;
|
|
1284
|
-
* mutations inside scrolled content (a row's class, a list's rows)
|
|
1285
|
-
* re-
|
|
1284
|
+
* mutations inside scrolled content (a row's class, a list's rows) do not
|
|
1285
|
+
* re-read it. Either way the scrollers are re-measured once the next frame
|
|
1286
|
+
* has laid out, before it paints, so a large render never forces a layout
|
|
1287
|
+
* (where `ResizeObserver` is missing, structure is measured at once and
|
|
1288
|
+
* content in the next animation frame) — and a re-render that drops the
|
|
1289
|
+
* attributes gets them back before paint.
|
|
1286
1290
|
* Scroll is tracked with one capturing listener per registered root, and size
|
|
1287
1291
|
* changes of each scroller and its children with a `ResizeObserver`. Overlapping registrations
|
|
1288
1292
|
* share one attribute writer; each disposer removes its registration, and the
|
|
@@ -2410,8 +2414,8 @@ export { DEFAULT_BREAKPOINTS, type DeviceBreakpoints, type DeviceClass, type Dev
|
|
|
2410
2414
|
```ts
|
|
2411
2415
|
import * as kerfjs from 'kerfjs';
|
|
2412
2416
|
import { SafeHtml } from 'kerfjs';
|
|
2413
|
-
import { b as CatalogProps } from './types-
|
|
2414
|
-
export { a as CatalogBackgroundStyle, c as CatalogBrand, d as CatalogEntry, e as CatalogRelated, C as CatalogResource, f as CatalogSecondaryGroup, g as CatalogSection, h as CatalogStageRootAttributes } from './types-
|
|
2417
|
+
import { b as CatalogProps } from './types-BNP4gA41.js';
|
|
2418
|
+
export { a as CatalogBackgroundStyle, c as CatalogBrand, d as CatalogEntry, e as CatalogRelated, C as CatalogResource, f as CatalogSecondaryGroup, g as CatalogSection, h as CatalogStageRootAttributes, i as CatalogUxReview } from './types-BNP4gA41.js';
|
|
2415
2419
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
2416
2420
|
import './toolbar.js';
|
|
2417
2421
|
import './sides-BPSWde0A.js';
|
|
@@ -2434,7 +2438,7 @@ import './resizable-region.js';
|
|
|
2434
2438
|
* standard toggle moves into the entry toolbar while it is collapsed, and on
|
|
2435
2439
|
* a small screen the sidebar overlays the stage like any Workbench rail.
|
|
2436
2440
|
*/
|
|
2437
|
-
declare function Catalog({ id, brand, sections, active, content, collapsed, theme, increasedContrast, reducedMotion, backgroundControl, headerActions, secondarySections, sidebarFooter, status, backgroundStyle, stageRootAttributes, selectAction, toggleSidebarAction, toggleThemeAction, toggleContrastAction, toggleMotionAction, selectBackgroundAction, toggleSecondaryAction, headerPlacement, footerPlacement, sidebar, mainToolbar, footerToolbar, className, slot, }: CatalogProps): kerfjs.SafeHtml;
|
|
2441
|
+
declare function Catalog({ id, brand, sections, active, content, collapsed, theme, increasedContrast, reducedMotion, backgroundControl, headerActions, uxReview, secondarySections, sidebarFooter, status, backgroundStyle, stageRootAttributes, selectAction, toggleSidebarAction, toggleThemeAction, toggleContrastAction, toggleMotionAction, selectBackgroundAction, toggleSecondaryAction, headerPlacement, footerPlacement, sidebar, mainToolbar, footerToolbar, className, slot, }: CatalogProps): kerfjs.SafeHtml;
|
|
2438
2442
|
|
|
2439
2443
|
/** How a specimen aligns its visible edge with its `ListHeader` label. */
|
|
2440
2444
|
type CatalogExampleAlign = 'glyph' | 'inline-control' | 'text-trigger' | 'none';
|
|
@@ -2499,13 +2503,39 @@ interface CatalogExampleStackProps {
|
|
|
2499
2503
|
/** A vertically stacked group of catalog examples. */
|
|
2500
2504
|
declare function CatalogExampleStack({ label, rootAttributes, className, children, slot, }: CatalogExampleStackProps): kerfjs.SafeHtml;
|
|
2501
2505
|
|
|
2502
|
-
|
|
2506
|
+
/**
|
|
2507
|
+
* Browser helpers for UX Review region captures from a catalog. The local
|
|
2508
|
+
* project directory comes from `uxReviewPlugin` (`@kerfjs/ui/vite-ux-review`),
|
|
2509
|
+
* which serves it to the catalog page on a Vite dev or preview server; static
|
|
2510
|
+
* hosting has no such endpoint, so a catalog there shows no capture link.
|
|
2511
|
+
*/
|
|
2512
|
+
/** Where `uxReviewPlugin` serves `{ projectDirectory }`, relative to the catalog page. */
|
|
2513
|
+
declare const UX_REVIEW_PROJECT_PATH = "__ux-review/project.json";
|
|
2514
|
+
/** What a UX Review region capture is preset with. */
|
|
2515
|
+
interface UxReviewCapture {
|
|
2516
|
+
/** The absolute project directory UX Review files the review under. */
|
|
2517
|
+
projectDirectory: string;
|
|
2518
|
+
/** The review title. */
|
|
2519
|
+
title: string;
|
|
2520
|
+
/** Review context: what was selected and where. */
|
|
2521
|
+
context: string;
|
|
2522
|
+
}
|
|
2523
|
+
/** A `uxreview://capture` link that starts a region screenshot for a project. */
|
|
2524
|
+
declare function uxReviewCaptureUrl({ projectDirectory, title, context, }: UxReviewCapture): string;
|
|
2525
|
+
/**
|
|
2526
|
+
* Ask the server that served `pageUrl` for its UX Review project directory.
|
|
2527
|
+
* Resolves `null` when there is none (static hosting, a server without the
|
|
2528
|
+
* plugin, a malformed answer, or a network failure); never rejects.
|
|
2529
|
+
*/
|
|
2530
|
+
declare function loadUxReviewProject(pageUrl: string | URL, fetchImpl?: typeof globalThis.fetch): Promise<string | null>;
|
|
2531
|
+
|
|
2532
|
+
export { Catalog, CatalogExample, type CatalogExampleAlign, type CatalogExampleProps, CatalogExampleStack, type CatalogExampleStackProps, type CatalogExampleViewport, CatalogProps, UX_REVIEW_PROJECT_PATH, type UxReviewCapture, loadUxReviewProject, uxReviewCaptureUrl };
|
|
2503
2533
|
```
|
|
2504
2534
|
|
|
2505
2535
|
## `@kerfjs/ui/catalog-resources`
|
|
2506
2536
|
|
|
2507
2537
|
```ts
|
|
2508
|
-
import { C as CatalogResource } from './types-
|
|
2538
|
+
import { C as CatalogResource } from './types-BNP4gA41.js';
|
|
2509
2539
|
import './toolbar.js';
|
|
2510
2540
|
import 'kerfjs';
|
|
2511
2541
|
import './semantic-content-BbzjvSu9.js';
|
|
@@ -2559,7 +2589,7 @@ export { type CatalogGuidanceKind, type CatalogResourceKind, type CatalogResourc
|
|
|
2559
2589
|
|
|
2560
2590
|
```ts
|
|
2561
2591
|
import { Signal } from 'kerfjs';
|
|
2562
|
-
import { a as CatalogBackgroundStyle } from './types-
|
|
2592
|
+
import { a as CatalogBackgroundStyle } from './types-BNP4gA41.js';
|
|
2563
2593
|
import './toolbar.js';
|
|
2564
2594
|
import './semantic-content-BbzjvSu9.js';
|
|
2565
2595
|
import './sides-BPSWde0A.js';
|
|
@@ -2625,6 +2655,13 @@ interface WireCatalogOptions {
|
|
|
2625
2655
|
sidebarStorageKey?: string;
|
|
2626
2656
|
/** The Catalog's `id`, when it is not the default `kui-catalog`. */
|
|
2627
2657
|
id?: string;
|
|
2658
|
+
/**
|
|
2659
|
+
* Ask the page's server once for its UX Review project directory (served by
|
|
2660
|
+
* `uxReviewPlugin` from `@kerfjs/ui/vite-ux-review`) and report it, so the
|
|
2661
|
+
* app can render the Catalog with `uxReview`. Never called on static
|
|
2662
|
+
* hosting or a server without the plugin.
|
|
2663
|
+
*/
|
|
2664
|
+
onUxReviewProject?: (projectDirectory: string) => void;
|
|
2628
2665
|
}
|
|
2629
2666
|
interface CatalogRevealOptions {
|
|
2630
2667
|
/** Scroll alignment within the sidebar. Default `'nearest'`. */
|
|
@@ -2653,7 +2690,7 @@ declare function revealCatalogEntry(root: HTMLElement, id: string, { block, inli
|
|
|
2653
2690
|
* catalog's panes and every example in it show their chrome dividers only
|
|
2654
2691
|
* while scrolled. Returns a disposer.
|
|
2655
2692
|
*/
|
|
2656
|
-
declare function wireCatalog(root: HTMLElement, { onSelect, onToggleSidebar, onToggleTheme, onToggleContrast, onToggleMotion, onSelectBackground, onToggleSecondary, urlParam, revealSelection, selectAction, toggleSidebarAction, toggleThemeAction, toggleContrastAction, toggleMotionAction, selectBackgroundAction, toggleSecondaryAction, collapsed, sidebarSize, sidebarStorageKey, id: catalogId, }: WireCatalogOptions): () => void;
|
|
2693
|
+
declare function wireCatalog(root: HTMLElement, { onSelect, onToggleSidebar, onToggleTheme, onToggleContrast, onToggleMotion, onSelectBackground, onToggleSecondary, urlParam, revealSelection, selectAction, toggleSidebarAction, toggleThemeAction, toggleContrastAction, toggleMotionAction, selectBackgroundAction, toggleSecondaryAction, collapsed, sidebarSize, sidebarStorageKey, id: catalogId, onUxReviewProject, }: WireCatalogOptions): () => void;
|
|
2657
2694
|
|
|
2658
2695
|
export { type CatalogRevealOptions, type WireCatalogOptions, revealCatalogEntry, wireCatalog };
|
|
2659
2696
|
```
|
package/ai/skill.md
CHANGED
|
@@ -139,7 +139,11 @@ against both catalogs; its `source` and `demoSource` are repository-relative
|
|
|
139
139
|
files for consumer catalog links. When a consuming project has reusable visual
|
|
140
140
|
components, derive demo rows with `@kerfjs/ui/catalog-projection` or
|
|
141
141
|
`kerf-catalog-demo --write`, then guard drift with `--check`; see
|
|
142
|
-
`../docs/catalog.md`.
|
|
142
|
+
`../docs/catalog.md`. For a local catalog's UX Review **Capture region** link,
|
|
143
|
+
add `uxReviewPlugin()` from the Node-only `@kerfjs/ui/vite-ux-review` to the
|
|
144
|
+
Vite config, report the project with `wireCatalog`'s `onUxReviewProject`, and
|
|
145
|
+
render `Catalog` with `uxReview={{ projectDirectory }}`; never hand-roll the
|
|
146
|
+
endpoint or the `uxreview://` link. Prefer its generated `component-composition.json`. A package
|
|
143
147
|
scaffolded by `create-kerf-component` owns the decisions in
|
|
144
148
|
`kerf.components.json`; run `npm run catalog:check` before using its output. If
|
|
145
149
|
no generated extension exists, start from the checked examples and require the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Web Awesome JSX signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from the emitted `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from the emitted `@kerfjs/ui@5.0.0-beta.93` declaration boundary. Import `@kerfjs/ui/webawesome` for type effects when authoring direct `wa-*` JSX. The module emits no runtime behavior and does not register custom elements.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { KerfCustomElement } from 'kerfjs/jsx-runtime';
|
package/analyzer/index.mjs
CHANGED
|
@@ -1413,7 +1413,7 @@ function inspectCssValues(
|
|
|
1413
1413
|
diagnostic(
|
|
1414
1414
|
'KUI-L016',
|
|
1415
1415
|
at,
|
|
1416
|
-
`\`${entry.name}.${contract.path}\` is a forbidden declaration-list escape; use \`className\`, public tokens, or cataloged props.`,
|
|
1416
|
+
`\`${entry.name}.${contract.path}\` is a forbidden declaration-list escape hatch; use \`className\`, public tokens, or cataloged props.`,
|
|
1417
1417
|
{ component: entry.key, path: contract.path },
|
|
1418
1418
|
),
|
|
1419
1419
|
);
|
|
@@ -1426,7 +1426,7 @@ function inspectCssValues(
|
|
|
1426
1426
|
diagnostic(
|
|
1427
1427
|
'KUI-L017',
|
|
1428
1428
|
at,
|
|
1429
|
-
`\`${literal}\` is exceptional for \`${entry.name}.${contract.path}\`; prefer ${preferred} unless the off-scale choice is deliberate.`,
|
|
1429
|
+
`\`${literal}\` is an exceptional shorthand for \`${entry.name}.${contract.path}\`; prefer ${preferred} unless the off-scale choice is deliberate.`,
|
|
1430
1430
|
{ component: entry.key, path: contract.path, value: literal },
|
|
1431
1431
|
),
|
|
1432
1432
|
);
|
|
@@ -1458,7 +1458,7 @@ function inspectCssValues(
|
|
|
1458
1458
|
diagnostic(
|
|
1459
1459
|
'KUI-L015',
|
|
1460
1460
|
at,
|
|
1461
|
-
`\`${helper}()\` is not standalone for \`${entry.name}.${contract.path}\`; wrap it with an accepted composer such as \`calc()\`.`,
|
|
1461
|
+
`\`${helper}()\` is not a standalone CSS value for \`${entry.name}.${contract.path}\`; wrap it with an accepted composer such as \`calc()\`.`,
|
|
1462
1462
|
{ component: entry.key, path: contract.path, helper },
|
|
1463
1463
|
),
|
|
1464
1464
|
);
|
|
@@ -1470,7 +1470,7 @@ function inspectCssValues(
|
|
|
1470
1470
|
diagnostic(
|
|
1471
1471
|
'KUI-L014',
|
|
1472
1472
|
at,
|
|
1473
|
-
`\`${helper}()\`
|
|
1473
|
+
`\`${helper}()\` produces the wrong grammar for \`${entry.name}.${contract.path}\`; use ${preferred}.`,
|
|
1474
1474
|
{ component: entry.key, path: contract.path, helper },
|
|
1475
1475
|
),
|
|
1476
1476
|
);
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
2
|
import { SafeHtml } from 'kerfjs';
|
|
3
|
-
import { b as CatalogProps } from './types-
|
|
4
|
-
export { a as CatalogBackgroundStyle, c as CatalogBrand, d as CatalogEntry, e as CatalogRelated, C as CatalogResource, f as CatalogSecondaryGroup, g as CatalogSection, h as CatalogStageRootAttributes } from './types-
|
|
3
|
+
import { b as CatalogProps } from './types-BNP4gA41.js';
|
|
4
|
+
export { a as CatalogBackgroundStyle, c as CatalogBrand, d as CatalogEntry, e as CatalogRelated, C as CatalogResource, f as CatalogSecondaryGroup, g as CatalogSection, h as CatalogStageRootAttributes, i as CatalogUxReview } from './types-BNP4gA41.js';
|
|
5
5
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
6
6
|
import './toolbar.js';
|
|
7
7
|
import './sides-BPSWde0A.js';
|
|
@@ -24,7 +24,7 @@ import './resizable-region.js';
|
|
|
24
24
|
* standard toggle moves into the entry toolbar while it is collapsed, and on
|
|
25
25
|
* a small screen the sidebar overlays the stage like any Workbench rail.
|
|
26
26
|
*/
|
|
27
|
-
declare function Catalog({ id, brand, sections, active, content, collapsed, theme, increasedContrast, reducedMotion, backgroundControl, headerActions, secondarySections, sidebarFooter, status, backgroundStyle, stageRootAttributes, selectAction, toggleSidebarAction, toggleThemeAction, toggleContrastAction, toggleMotionAction, selectBackgroundAction, toggleSecondaryAction, headerPlacement, footerPlacement, sidebar, mainToolbar, footerToolbar, className, slot, }: CatalogProps): kerfjs.SafeHtml;
|
|
27
|
+
declare function Catalog({ id, brand, sections, active, content, collapsed, theme, increasedContrast, reducedMotion, backgroundControl, headerActions, uxReview, secondarySections, sidebarFooter, status, backgroundStyle, stageRootAttributes, selectAction, toggleSidebarAction, toggleThemeAction, toggleContrastAction, toggleMotionAction, selectBackgroundAction, toggleSecondaryAction, headerPlacement, footerPlacement, sidebar, mainToolbar, footerToolbar, className, slot, }: CatalogProps): kerfjs.SafeHtml;
|
|
28
28
|
|
|
29
29
|
/** How a specimen aligns its visible edge with its `ListHeader` label. */
|
|
30
30
|
type CatalogExampleAlign = 'glyph' | 'inline-control' | 'text-trigger' | 'none';
|
|
@@ -89,4 +89,30 @@ interface CatalogExampleStackProps {
|
|
|
89
89
|
/** A vertically stacked group of catalog examples. */
|
|
90
90
|
declare function CatalogExampleStack({ label, rootAttributes, className, children, slot, }: CatalogExampleStackProps): kerfjs.SafeHtml;
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Browser helpers for UX Review region captures from a catalog. The local
|
|
94
|
+
* project directory comes from `uxReviewPlugin` (`@kerfjs/ui/vite-ux-review`),
|
|
95
|
+
* which serves it to the catalog page on a Vite dev or preview server; static
|
|
96
|
+
* hosting has no such endpoint, so a catalog there shows no capture link.
|
|
97
|
+
*/
|
|
98
|
+
/** Where `uxReviewPlugin` serves `{ projectDirectory }`, relative to the catalog page. */
|
|
99
|
+
declare const UX_REVIEW_PROJECT_PATH = "__ux-review/project.json";
|
|
100
|
+
/** What a UX Review region capture is preset with. */
|
|
101
|
+
interface UxReviewCapture {
|
|
102
|
+
/** The absolute project directory UX Review files the review under. */
|
|
103
|
+
projectDirectory: string;
|
|
104
|
+
/** The review title. */
|
|
105
|
+
title: string;
|
|
106
|
+
/** Review context: what was selected and where. */
|
|
107
|
+
context: string;
|
|
108
|
+
}
|
|
109
|
+
/** A `uxreview://capture` link that starts a region screenshot for a project. */
|
|
110
|
+
declare function uxReviewCaptureUrl({ projectDirectory, title, context, }: UxReviewCapture): string;
|
|
111
|
+
/**
|
|
112
|
+
* Ask the server that served `pageUrl` for its UX Review project directory.
|
|
113
|
+
* Resolves `null` when there is none (static hosting, a server without the
|
|
114
|
+
* plugin, a malformed answer, or a network failure); never rejects.
|
|
115
|
+
*/
|
|
116
|
+
declare function loadUxReviewProject(pageUrl: string | URL, fetchImpl?: typeof globalThis.fetch): Promise<string | null>;
|
|
117
|
+
|
|
118
|
+
export { Catalog, CatalogExample, type CatalogExampleAlign, type CatalogExampleProps, CatalogExampleStack, type CatalogExampleStackProps, type CatalogExampleViewport, CatalogProps, UX_REVIEW_PROJECT_PATH, type UxReviewCapture, loadUxReviewProject, uxReviewCaptureUrl };
|
package/dist/catalog.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Workbench } from './chunk-
|
|
1
|
+
import { Workbench } from './chunk-QCLLBMLA.js';
|
|
2
|
+
import { uxReviewCaptureUrl } from './chunk-6C6DLP3W.js';
|
|
3
|
+
export { UX_REVIEW_PROJECT_PATH, loadUxReviewProject, uxReviewCaptureUrl } from './chunk-6C6DLP3W.js';
|
|
2
4
|
|
|
3
5
|
|
|
4
|
-
import { TokenSearchField } from './chunk-
|
|
6
|
+
import { TokenSearchField } from './chunk-ROZLJULF.js';
|
|
5
7
|
import { ToolbarText } from './chunk-3DXHNLME.js';
|
|
6
|
-
import { PopupMenu } from './chunk-
|
|
8
|
+
import { PopupMenu } from './chunk-TKDDTLG5.js';
|
|
7
9
|
|
|
8
10
|
import { Row } from './chunk-MORVLMDG.js';
|
|
9
|
-
import { ListHeader } from './chunk-
|
|
11
|
+
import { ListHeader } from './chunk-RZYQFGMM.js';
|
|
10
12
|
import { Text } from './chunk-4Y4L5YEI.js';
|
|
11
13
|
import { ListInsetControl } from './chunk-AN5IWMTM.js';
|
|
12
14
|
import { ListInsetText } from './chunk-NMWDHZVM.js';
|
|
@@ -22,12 +24,12 @@ import { Toolbar } from './chunk-BYHGRKC3.js';
|
|
|
22
24
|
|
|
23
25
|
import { List } from './chunk-QQICWWNX.js';
|
|
24
26
|
|
|
25
|
-
import { LucideIcon } from './chunk-
|
|
27
|
+
import { LucideIcon } from './chunk-UKKRPP56.js';
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
import { filterDataAttributes } from './chunk-LAZLBC2Q.js';
|
|
30
|
-
import { Contrast, ZapOff, Moon, Sun, X, Waypoints, ExternalLink } from 'lucide';
|
|
32
|
+
import { Contrast, ZapOff, Moon, Sun, X, Waypoints, ExternalLink, Scan } from 'lucide';
|
|
31
33
|
import { jsx, jsxs, Fragment } from 'kerfjs/jsx-runtime';
|
|
32
34
|
|
|
33
35
|
function relatedMenuItems(related, selectAction) {
|
|
@@ -269,9 +271,40 @@ function CatalogStage({
|
|
|
269
271
|
}
|
|
270
272
|
);
|
|
271
273
|
}
|
|
274
|
+
function CatalogUxReviewLink({
|
|
275
|
+
uxReview: { projectDirectory, name },
|
|
276
|
+
entry,
|
|
277
|
+
category
|
|
278
|
+
}) {
|
|
279
|
+
return /* @__PURE__ */ jsx(
|
|
280
|
+
ToolbarControlGroup,
|
|
281
|
+
{
|
|
282
|
+
appearance: "borderless",
|
|
283
|
+
single: true,
|
|
284
|
+
size: "compact",
|
|
285
|
+
content: "mixed",
|
|
286
|
+
buttonAppearance: "push",
|
|
287
|
+
children: /* @__PURE__ */ jsx(
|
|
288
|
+
ToolbarActionLink,
|
|
289
|
+
{
|
|
290
|
+
href: uxReviewCaptureUrl({
|
|
291
|
+
projectDirectory,
|
|
292
|
+
title: `${name}: ${entry.name}`,
|
|
293
|
+
context: `${name} catalog
|
|
294
|
+
Selected ${category}: ${entry.name} (${entry.id})`
|
|
295
|
+
}),
|
|
296
|
+
label: "Capture region",
|
|
297
|
+
ariaLabel: `Capture ${entry.name} in UX Review`,
|
|
298
|
+
icon: /* @__PURE__ */ jsx(LucideIcon, { icon: Scan, name: "scan" })
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
}
|
|
272
304
|
function findEntry(sections, id) {
|
|
273
305
|
for (const section of sections) {
|
|
274
|
-
for (const entry of section.entries)
|
|
306
|
+
for (const entry of section.entries)
|
|
307
|
+
if (entry.id === id) return { entry, category: section.category };
|
|
275
308
|
}
|
|
276
309
|
return void 0;
|
|
277
310
|
}
|
|
@@ -287,6 +320,7 @@ function Catalog({
|
|
|
287
320
|
reducedMotion,
|
|
288
321
|
backgroundControl = false,
|
|
289
322
|
headerActions,
|
|
323
|
+
uxReview,
|
|
290
324
|
secondarySections,
|
|
291
325
|
sidebarFooter,
|
|
292
326
|
status,
|
|
@@ -307,7 +341,8 @@ function Catalog({
|
|
|
307
341
|
className = "",
|
|
308
342
|
slot
|
|
309
343
|
}) {
|
|
310
|
-
const
|
|
344
|
+
const found = findEntry(sections, active) ?? (secondarySections ? findEntry(secondarySections.sections, active) : void 0);
|
|
345
|
+
const selected = found?.entry;
|
|
311
346
|
const name = selected?.name ?? "";
|
|
312
347
|
const nextTheme = theme === "dark" ? "light" : "dark";
|
|
313
348
|
const catalogName = `${brand.title} catalog`;
|
|
@@ -388,6 +423,14 @@ function Catalog({
|
|
|
388
423
|
title: /* @__PURE__ */ jsx(ToolbarText, { text: name, size: "xlarge", headingLevel: 2 }),
|
|
389
424
|
trailing: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
390
425
|
headerActions,
|
|
426
|
+
uxReview && found ? /* @__PURE__ */ jsx(
|
|
427
|
+
CatalogUxReviewLink,
|
|
428
|
+
{
|
|
429
|
+
uxReview: { ...uxReview, name: uxReview.name ?? brand.title },
|
|
430
|
+
entry: found.entry,
|
|
431
|
+
category: found.category
|
|
432
|
+
}
|
|
433
|
+
) : null,
|
|
391
434
|
displayControls ? /* @__PURE__ */ jsxs(
|
|
392
435
|
ToolbarControlGroup,
|
|
393
436
|
{
|
package/dist/catalog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/catalog/components/catalog-resource-footer.tsx","../src/catalog/components/catalog-section-entries.tsx","../src/catalog/components/catalog-secondary-sections.tsx","../src/catalog/components/catalog-section-list.tsx","../src/catalog/components/catalog-sidebar.tsx","../src/catalog/components/catalog-stage.tsx","../src/catalog/components/catalog.tsx","../src/catalog/components/catalog-example.tsx","../src/catalog/components/catalog-example-stack.tsx"],"names":["jsxs","jsx","Fragment","protectedAttributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAS,gBAAA,CACP,SACA,YAAA,EACkB;AAClB,EAAA,MAAM,SAAmB,EAAC;AAC1B,EAAA,KAAA,MA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","file":"catalog.js","sourcesContent":["import { ExternalLink, Waypoints } from 'lucide';\n\nimport {\n PopupMenu,\n type PopupMenuEntry,\n} from '../../components/actions/popup-menu/popup-menu.js';\nimport {\n Toolbar,\n type ToolbarConfig,\n} from '../../components/actions/toolbar/toolbar.js';\nimport {\n ToolbarActionLink,\n ToolbarControlGroup,\n} from '../../components/actions/toolbar-control-group/toolbar-control-group.js';\nimport { Row } from '../../components/layout/row/row.js';\nimport { LucideIcon } from '../../components/media/lucide-icon/lucide-icon.js';\nimport type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport type { CatalogRelated, CatalogResource } from '../types.js';\n\ninterface CatalogResourceFooterProps {\n name: string;\n resources: readonly CatalogResource[];\n related: readonly CatalogRelated[];\n status?: KerfUiContent;\n selectAction: string;\n toolbar?: ToolbarConfig;\n}\n\nfunction relatedMenuItems(\n related: readonly CatalogRelated[],\n selectAction: string,\n): PopupMenuEntry[] {\n const groups: string[] = [];\n for (const entry of related)\n if (!groups.includes(entry.group)) groups.push(entry.group);\n\n const items: PopupMenuEntry[] = [];\n groups.forEach((group, index) => {\n if (index > 0) items.push({ kind: 'divider' });\n items.push({ kind: 'heading', label: group });\n for (const entry of related)\n if (entry.group === group)\n items.push({\n label: entry.name,\n action: selectAction,\n attributes: { 'data-item-id': entry.id },\n });\n });\n return items;\n}\n\n/** Status, resources, and related-entry navigation for the active specimen. */\nexport function CatalogResourceFooter({\n name,\n resources,\n related,\n status,\n selectAction,\n toolbar,\n}: CatalogResourceFooterProps) {\n return (\n <>\n {status ? (\n <Row\n hAlign=\"space-between\"\n vAlign=\"baseline\"\n gap=\"xs\"\n wrap\n textInsets=\"trl\"\n >\n {status}\n </Row>\n ) : null}\n <Toolbar\n position=\"footer\"\n label={`${name} resources`}\n dividerSides={toolbar?.dividerSides}\n centerAlign={toolbar?.centerAlign}\n responsive={toolbar?.responsive ?? 'stack'}\n responsiveAt={toolbar?.responsiveAt ?? 'narrow'}\n safeAreaEdges={toolbar?.safeAreaEdges}\n leading={\n resources.length > 0 ? (\n <ToolbarControlGroup\n label={`${name} resources`}\n content=\"mixed\"\n size=\"compact\"\n overflow=\"wrap\"\n >\n {resources.map((resource) => (\n <ToolbarActionLink\n href={resource.href}\n label={resource.label}\n detail={resource.detail}\n ariaLabel={`${name}: ${resource.label} (opens in new tab)`}\n external\n icon={<LucideIcon icon={ExternalLink} name=\"external-link\" />}\n />\n ))}\n </ToolbarControlGroup>\n ) : null\n }\n trailing={\n related.length > 0 ? (\n <ToolbarControlGroup\n single\n content=\"mixed\"\n nestedDropdown\n menuInset=\"compact\"\n size=\"compact\"\n label=\"Related entries\"\n >\n <PopupMenu\n text=\"Components\"\n icon={<LucideIcon icon={Waypoints} name=\"waypoints\" />}\n placement=\"top-end\"\n items={relatedMenuItems(related, selectAction)}\n rootAttributes={{ 'data-catalog-related': '' }}\n />\n </ToolbarControlGroup>\n ) : null\n }\n />\n </>\n );\n}\n","import { List } from '../../components/collections/list/list.js';\nimport { ListHeader } from '../../components/collections/list-header/list-header.js';\nimport { ListItem } from '../../components/collections/list-item/list-item.js';\nimport type { CatalogEntry, CatalogSection } from '../types.js';\n\n/** One labeled section of catalog entries. */\nexport function CatalogSectionEntries({\n section,\n active,\n selectAction,\n}: {\n section: CatalogSection;\n active: string;\n selectAction: string;\n}) {\n return (\n <List rootAttributes={{ 'data-catalog-section': section.category }}>\n <ListHeader label={section.category} />\n <List gap=\"2xs\">\n {section.entries.map((entry: CatalogEntry) => (\n <ListItem\n action={selectAction}\n itemId={entry.id}\n label={entry.name}\n status={entry.tags?.join(' · ')}\n selected={active === entry.id}\n title={entry.description}\n multiline\n rootAttributes={{ 'data-catalog-entry-name': entry.name }}\n />\n ))}\n </List>\n </List>\n );\n}\n","import { List } from '../../components/collections/list/list.js';\nimport { ListHeader } from '../../components/collections/list-header/list-header.js';\nimport type { CatalogSecondaryGroup } from '../types.js';\nimport { CatalogSectionEntries } from './catalog-section-entries.js';\n\ninterface CatalogSecondarySectionsProps {\n group: CatalogSecondaryGroup;\n active: string;\n selectAction: string;\n toggleAction: string;\n}\n\n/** The quieter, optionally collapsible navigation below primary sections. */\nexport function CatalogSecondarySections({\n group,\n active,\n selectAction,\n toggleAction,\n}: CatalogSecondarySectionsProps) {\n const open = !group.collapsible || Boolean(group.expanded);\n return (\n <List\n dividerSides=\"t\"\n controlInsets=\"t\"\n rootAttributes={{ 'data-catalog-secondary-group': group.label }}\n >\n {group.collapsible ? (\n <ListHeader\n label={group.label}\n toggle\n expanded={open}\n action={toggleAction}\n />\n ) : (\n <ListHeader label={group.label} />\n )}\n <List\n gap=\"m\"\n rootAttributes={{\n 'data-catalog-secondary': '',\n 'data-catalog-secondary-collapsed': String(!open),\n }}\n >\n {group.sections.map((section) => (\n <CatalogSectionEntries\n section={section}\n active={active}\n selectAction={selectAction}\n />\n ))}\n </List>\n </List>\n );\n}\n","import type { CatalogSection } from '../types.js';\nimport { CatalogSectionEntries } from './catalog-section-entries.js';\n\n/** The primary category sections in the catalog navigation. */\nexport function CatalogSectionList({\n sections,\n active,\n selectAction,\n}: {\n sections: readonly CatalogSection[];\n active: string;\n selectAction: string;\n}) {\n return (\n <>\n {sections.map((section) => (\n <CatalogSectionEntries\n section={section}\n active={active}\n selectAction={selectAction}\n />\n ))}\n </>\n );\n}\n","import { List } from '../../components/collections/list/list.js';\nimport { ListInsetText } from '../../components/collections/list-inset-text/list-inset-text.js';\nimport { Text } from '../../components/typography/text/text.js';\nimport type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport type {\n CatalogBrand,\n CatalogSecondaryGroup,\n CatalogSection,\n} from '../types.js';\nimport { CatalogSecondarySections } from './catalog-secondary-sections.js';\nimport { CatalogSectionList } from './catalog-section-list.js';\n\ninterface CatalogSidebarProps {\n brand: CatalogBrand;\n sections: readonly CatalogSection[];\n active: string;\n secondarySections?: CatalogSecondaryGroup;\n footer?: KerfUiContent;\n selectAction: string;\n toggleSecondaryAction: string;\n}\n\n/** The catalog navigation: brand subtitle, entry sections, and footer. */\nexport function CatalogSidebar({\n brand,\n sections,\n active,\n secondarySections,\n footer,\n selectAction,\n toggleSecondaryAction,\n}: CatalogSidebarProps) {\n return (\n <nav aria-label={`${brand.title} components`} data-catalog-sidebar>\n <List gap=\"m\" controlInsets=\"b\">\n {brand.subtitle ? (\n <ListInsetText sides=\"rl\">\n <Text variant=\"span\" size=\"compact\" tone=\"quiet\">\n {brand.subtitle}\n </Text>\n </ListInsetText>\n ) : null}\n <CatalogSectionList\n sections={sections}\n active={active}\n selectAction={selectAction}\n />\n {secondarySections ? (\n <CatalogSecondarySections\n group={secondarySections}\n active={active}\n selectAction={selectAction}\n toggleAction={toggleSecondaryAction}\n />\n ) : null}\n <ListInsetText\n sides=\"rl\"\n rootAttributes={{ 'data-catalog-filter-empty': '' }}\n >\n <Text variant=\"span\" tone=\"quiet\">\n No matching items\n </Text>\n </ListInsetText>\n {footer}\n </List>\n </nav>\n );\n}\n","import type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../shared/dom/extension-attributes.js';\nimport type {\n CatalogBackgroundStyle,\n CatalogStageRootAttributes,\n} from '../types.js';\n\nconst protectedAttributes = new Set([\n 'data-catalog-stage',\n 'data-background-style',\n]);\n\ninterface CatalogStageProps {\n name: string;\n content: KerfUiContent;\n backgroundStyle?: CatalogBackgroundStyle;\n rootAttributes?: CatalogStageRootAttributes;\n}\n\n/** The preview canvas for an active Catalog entry. */\nexport function CatalogStage({\n name,\n content,\n backgroundStyle = 'checkerboard',\n rootAttributes = {},\n}: CatalogStageProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n protectedAttributes,\n );\n return (\n <section\n {...safeRootAttributes}\n class=\"kui-catalog__stage\"\n data-catalog-stage\n data-background-style={backgroundStyle}\n aria-label={`${name} preview`}\n >\n <div class=\"kui-catalog__canvas\">{content}</div>\n </section>\n );\n}\n","import { Contrast, Moon, Sun, X, ZapOff } from 'lucide';\n\nimport { PopupMenu } from '../../components/actions/popup-menu/popup-menu.js';\nimport { ToolbarControlGroup } from '../../components/actions/toolbar-control-group/toolbar-control-group.js';\nimport { ToolbarText } from '../../components/actions/toolbar-text/toolbar-text.js';\nimport { ListInsetControl } from '../../components/collections/list-inset-control/list-inset-control.js';\nimport { ListInsetText } from '../../components/collections/list-inset-text/list-inset-text.js';\nimport { TokenSearchField } from '../../components/forms/token-search-field/token-search-field.js';\nimport { Workbench } from '../../components/layout/workbench/workbench.js';\nimport { LucideIcon } from '../../components/media/lucide-icon/lucide-icon.js';\nimport { Text } from '../../components/typography/text/text.js';\nimport type { CatalogEntry, CatalogProps, CatalogSection } from '../types.js';\nimport { CatalogResourceFooter } from './catalog-resource-footer.js';\nimport { CatalogSidebar } from './catalog-sidebar.js';\nimport { CatalogStage } from './catalog-stage.js';\n\nfunction findEntry(\n sections: readonly CatalogSection[],\n id: string,\n): CatalogEntry | undefined {\n for (const section of sections) {\n for (const entry of section.entries) if (entry.id === id) return entry;\n }\n return undefined;\n}\n\n/**\n * Controlled, stateless component-catalog shell: a `Workbench` whose left rail\n * is the catalog navigation and whose work area is the active entry — its\n * toolbar, description, preview stage, and resource footer. The sidebar's\n * standard toggle moves into the entry toolbar while it is collapsed, and on\n * a small screen the sidebar overlays the stage like any Workbench rail.\n */\nexport function Catalog({\n id = 'kui-catalog',\n brand,\n sections,\n active,\n content,\n collapsed = false,\n theme,\n increasedContrast,\n reducedMotion,\n backgroundControl = false,\n headerActions,\n secondarySections,\n sidebarFooter,\n status,\n backgroundStyle,\n stageRootAttributes,\n selectAction = 'catalog-select',\n toggleSidebarAction = 'catalog-toggle-sidebar',\n toggleThemeAction = 'catalog-toggle-theme',\n toggleContrastAction = 'catalog-toggle-contrast',\n toggleMotionAction = 'catalog-toggle-motion',\n selectBackgroundAction = 'catalog-select-background',\n toggleSecondaryAction = 'catalog-toggle-secondary',\n headerPlacement = 'auto',\n footerPlacement = 'auto',\n sidebar = {},\n mainToolbar,\n footerToolbar,\n className = '',\n slot,\n}: CatalogProps) {\n const selected =\n findEntry(sections, active) ??\n (secondarySections\n ? findEntry(secondarySections.sections, active)\n : undefined);\n const name = selected?.name ?? '';\n const nextTheme = theme === 'dark' ? 'light' : 'dark';\n const catalogName = `${brand.title} catalog`;\n const displayControls =\n increasedContrast !== undefined ||\n reducedMotion !== undefined ||\n backgroundControl ||\n theme !== undefined;\n\n return (\n <main\n class={`kui-catalog ${className}`.trim()}\n data-component=\"catalog\"\n data-sidebar-collapsed={String(collapsed)}\n slot={slot}\n >\n <Workbench\n id={id}\n label={catalogName}\n leftRail={{\n label: catalogName,\n size: sidebar.size ?? 288,\n resizable: sidebar.resizable,\n separator: sidebar.separator,\n collapseMotion: sidebar.collapseMotion,\n presentation: sidebar.presentation,\n responsiveOverlayAt: sidebar.responsiveOverlayAt,\n compactOverlay: sidebar.compactOverlay,\n collapsed,\n toolbar: {\n ...sidebar.toolbar,\n label: `${catalogName} header`,\n title: (\n <>\n {brand.logoUrl ? (\n <ToolbarControlGroup\n appearance=\"borderless\"\n content=\"avatar\"\n shape=\"rounded\"\n single\n avatarImage={brand.logoUrl}\n >\n {null}\n </ToolbarControlGroup>\n ) : null}\n <ToolbarText text={brand.title} size=\"large\" headingLevel={1} />\n </>\n ),\n toggle: { action: toggleSidebarAction, name: catalogName },\n },\n header: (\n <ListInsetControl sides=\"rbl\">\n <TokenSearchField\n id={`${id}-filter`}\n label=\"Filter catalog\"\n placeholder=\"Filter items or headings\"\n editorAttributes={{ 'data-catalog-filter': '' }}\n trailingAction={{\n icon: <LucideIcon icon={X} name=\"x\" />,\n label: 'Clear filter',\n action: 'catalog-clear-filter',\n }}\n />\n </ListInsetControl>\n ),\n content: (\n <CatalogSidebar\n brand={brand}\n sections={sections}\n active={active}\n secondarySections={secondarySections}\n footer={sidebarFooter}\n selectAction={selectAction}\n toggleSecondaryAction={toggleSecondaryAction}\n />\n ),\n }}\n mainToolbar={{\n ...mainToolbar,\n label: `${name} header`,\n // The entry title stays whole; actions wrap below it when narrow.\n responsive: mainToolbar?.responsive ?? 'wrap',\n title: <ToolbarText text={name} size=\"xlarge\" headingLevel={2} />,\n trailing: (\n <>\n {headerActions}\n {displayControls ? (\n <ToolbarControlGroup\n appearance=\"borderless\"\n content=\"mixed\"\n size=\"compact\"\n overflow=\"wrap\"\n buttonAppearance=\"push\"\n label=\"Catalog display settings\"\n >\n {increasedContrast !== undefined ? (\n <button\n type=\"button\"\n data-action={toggleContrastAction}\n aria-pressed={String(increasedContrast)}\n >\n <LucideIcon icon={Contrast} name=\"contrast\" />\n <span>Contrast</span>\n </button>\n ) : null}\n {reducedMotion !== undefined ? (\n <button\n type=\"button\"\n data-action={toggleMotionAction}\n aria-pressed={String(reducedMotion)}\n >\n <LucideIcon icon={ZapOff} name=\"zap-off\" />\n <span>Reduce motion</span>\n </button>\n ) : null}\n {backgroundControl ? (\n <PopupMenu\n text=\"Background\"\n rootAttributes={{ 'data-catalog-background-menu': '' }}\n items={[\n { value: 'checkerboard', label: 'Checkerboard' },\n {\n value: 'vertical-stripes',\n label: 'Vertical stripes',\n },\n { value: 'layout-guide', label: 'Layout guide' },\n { value: 'surface', label: 'Surface' },\n { value: 'sunken', label: 'Sunken' },\n ].map(({ value, label }) => ({\n label,\n action: selectBackgroundAction,\n checked: (backgroundStyle ?? 'checkerboard') === value,\n attributes: { 'data-background-choice': value },\n }))}\n />\n ) : null}\n {theme ? (\n <button\n type=\"button\"\n data-action={toggleThemeAction}\n aria-label={`Use ${nextTheme} theme`}\n data-theme-preview={theme}\n >\n {nextTheme === 'dark' ? (\n <LucideIcon icon={Moon} name=\"moon\" />\n ) : (\n <LucideIcon icon={Sun} name=\"sun\" />\n )}\n <span>{nextTheme === 'dark' ? 'Dark' : 'Light'}</span>\n </button>\n ) : null}\n </ToolbarControlGroup>\n ) : null}\n </>\n ),\n }}\n mainPane={{ appearance: 'sunken' }}\n mainFooter={\n <CatalogResourceFooter\n name={name}\n resources={selected?.resources ?? []}\n related={selected?.related ?? []}\n status={status}\n selectAction={selectAction}\n toolbar={footerToolbar}\n />\n }\n mainHeader={\n selected?.description ? (\n <ListInsetText\n sides=\"trbl\"\n rootAttributes={{ 'data-catalog-description': '' }}\n >\n <Text variant=\"span\">{selected.description}</Text>\n </ListInsetText>\n ) : null\n }\n mainHeaderPlacement={headerPlacement}\n mainFooterPlacement={footerPlacement}\n main={\n <CatalogStage\n name={name}\n content={content}\n backgroundStyle={backgroundStyle}\n rootAttributes={stageRootAttributes}\n />\n }\n />\n </main>\n );\n}\n","import type { SafeHtml } from 'kerfjs';\n\nimport { ListHeader } from '../../components/collections/list-header/list-header.js';\nimport { ListInsetText } from '../../components/collections/list-inset-text/list-inset-text.js';\nimport { Text } from '../../components/typography/text/text.js';\nimport type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../shared/dom/extension-attributes.js';\n\n/** How a specimen aligns its visible edge with its `ListHeader` label. */\nexport type CatalogExampleAlign =\n 'glyph' | 'inline-control' | 'text-trigger' | 'none';\n\nexport interface CatalogExampleViewport {\n layout?: 'grid' | 'flex' | 'flex-column';\n width?: 'full' | 'compact' | 'medium' | 'wide' | 'text' | 'control';\n /** Fixed specimen height; `app` frames an application-sized recipe or layout.\n * A fixed height is definite, so a child that fills with `height: 100%`\n * (a horizontal `ResizableRegion`, say) spans the whole frame. */\n height?: 'short' | 'reduced' | 'medium' | 'tall' | 'app';\n /** A minimum the frame may grow past. It is not a definite height: a child\n * sized with `height: 100%` falls back to its content height, so use\n * `height` when the specimen must fill the frame. */\n minHeight?: 'short' | 'medium';\n frame?: 'solid' | 'dashed';\n surface?: 'default' | 'lowered';\n overflow?: 'hidden' | 'auto-x';\n responsive?: 'roomy-only';\n shadow?: boolean;\n /** Public component custom properties applied to the specimen viewport. */\n tokens?: Readonly<Record<`--${string}`, string>>;\n}\n\nconst protectedAttributes = new Set([\n 'data-catalog-example',\n 'data-catalog-example-stack',\n 'data-catalog-example-label',\n 'data-catalog-example-note',\n 'data-align',\n]);\n\ntype CatalogExampleRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-catalog-example'?: never;\n 'data-catalog-example-stack'?: never;\n 'data-catalog-example-label'?: never;\n 'data-catalog-example-note'?: never;\n 'data-align'?: never;\n }\n>;\n\nexport interface CatalogExampleProps {\n label?: string;\n note?: SafeHtml | string;\n align?: CatalogExampleAlign;\n /** Optional catalog-owned constraints for demonstrating layout components. */\n viewport?: CatalogExampleViewport;\n /** Replacement guidance shown when a roomy-only viewport is hidden. */\n compactFallback?: SafeHtml | string;\n rootAttributes?: CatalogExampleRootAttributes;\n className?: string;\n children?: KerfUiContent;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** A labeled catalog specimen with optional explanatory text and alignment. */\nexport function CatalogExample({\n label,\n note,\n align = 'none',\n viewport,\n compactFallback,\n rootAttributes = {},\n className = '',\n children,\n slot,\n}: CatalogExampleProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n protectedAttributes,\n );\n const viewportStyle = viewport?.tokens\n ? Object.entries(viewport.tokens)\n .map(([name, value]) => `${name}:${value}`)\n .join(';')\n : undefined;\n const specimen = viewport ? (\n <div\n class=\"kui-catalog-example__viewport\"\n data-catalog-example-viewport\n data-layout={viewport.layout}\n data-width={viewport.width}\n data-height={viewport.height}\n data-min-height={viewport.minHeight}\n data-frame={viewport.frame}\n data-surface={viewport.surface}\n data-overflow={viewport.overflow}\n data-responsive={viewport.responsive}\n data-shadow={viewport.shadow ? 'true' : undefined}\n style={viewportStyle}\n >\n {children}\n </div>\n ) : (\n children\n );\n\n return (\n <section\n {...safeRootAttributes}\n class={`kui-catalog-example ${className}`.trim()}\n data-catalog-example\n data-align={align}\n slot={slot}\n >\n {label !== undefined ? (\n <ListHeader\n label={label}\n width=\"content\"\n rootAttributes={{ 'data-catalog-example-label': '' }}\n />\n ) : null}\n {note !== undefined ? (\n <ListInsetText\n sides=\"rl\"\n className=\"kui-catalog-example__note\"\n rootAttributes={{ 'data-catalog-example-note': '' }}\n >\n <Text variant=\"span\" size=\"compact\" tone=\"quiet\">\n {note}\n </Text>\n </ListInsetText>\n ) : null}\n {compactFallback !== undefined ? (\n <Text tone=\"quiet\" className=\"kui-catalog-example__compact-fallback\">\n {compactFallback}\n </Text>\n ) : null}\n {specimen}\n </section>\n );\n}\n","import type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../shared/dom/extension-attributes.js';\n\nconst protectedAttributes = new Set([\n 'data-catalog-example',\n 'data-catalog-example-stack',\n 'data-catalog-example-label',\n 'data-catalog-example-note',\n 'data-align',\n]);\n\ntype CatalogExampleStackRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-catalog-example'?: never;\n 'data-catalog-example-stack'?: never;\n 'data-catalog-example-label'?: never;\n 'data-catalog-example-note'?: never;\n 'data-align'?: never;\n }\n>;\n\nexport interface CatalogExampleStackProps {\n label?: string;\n rootAttributes?: CatalogExampleStackRootAttributes;\n className?: string;\n children?: KerfUiContent;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** A vertically stacked group of catalog examples. */\nexport function CatalogExampleStack({\n label,\n rootAttributes = {},\n className = '',\n children,\n slot,\n}: CatalogExampleStackProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n protectedAttributes,\n );\n\n return (\n <section\n {...safeRootAttributes}\n class={`kui-catalog-example-stack ${className}`.trim()}\n data-catalog-example-stack\n aria-label={label}\n slot={slot}\n >\n {children}\n </section>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/catalog/components/catalog-resource-footer.tsx","../src/catalog/components/catalog-section-entries.tsx","../src/catalog/components/catalog-secondary-sections.tsx","../src/catalog/components/catalog-section-list.tsx","../src/catalog/components/catalog-sidebar.tsx","../src/catalog/components/catalog-stage.tsx","../src/catalog/components/catalog-ux-review-link.tsx","../src/catalog/components/catalog.tsx","../src/catalog/components/catalog-example.tsx","../src/catalog/components/catalog-example-stack.tsx"],"names":["jsxs","j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AAA;AAAA,IAAA;AAAA,MACE,GAAG,kBAAA;AAAA,MACJ,KAAA,EAAO,CAAA,0BAAA,EAA6B,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACrD,4BAAA,EAA0B,IAAA;AAAA,MAC1B,YAAA,EAAY,KAAA;AAAA,MACZ,IAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"catalog.js","sourcesContent":["import { ExternalLink, Waypoints } from 'lucide';\n\nimport {\n PopupMenu,\n type PopupMenuEntry,\n} from '../../components/actions/popup-menu/popup-menu.js';\nimport {\n Toolbar,\n type ToolbarConfig,\n} from '../../components/actions/toolbar/toolbar.js';\nimport {\n ToolbarActionLink,\n ToolbarControlGroup,\n} from '../../components/actions/toolbar-control-group/toolbar-control-group.js';\nimport { Row } from '../../components/layout/row/row.js';\nimport { LucideIcon } from '../../components/media/lucide-icon/lucide-icon.js';\nimport type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport type { CatalogRelated, CatalogResource } from '../types.js';\n\ninterface CatalogResourceFooterProps {\n name: string;\n resources: readonly CatalogResource[];\n related: readonly CatalogRelated[];\n status?: KerfUiContent;\n selectAction: string;\n toolbar?: ToolbarConfig;\n}\n\nfunction relatedMenuItems(\n related: readonly CatalogRelated[],\n selectAction: string,\n): PopupMenuEntry[] {\n const groups: string[] = [];\n for (const entry of related)\n if (!groups.includes(entry.group)) groups.push(entry.group);\n\n const items: PopupMenuEntry[] = [];\n groups.forEach((group, index) => {\n if (index > 0) items.push({ kind: 'divider' });\n items.push({ kind: 'heading', label: group });\n for (const entry of related)\n if (entry.group === group)\n items.push({\n label: entry.name,\n action: selectAction,\n attributes: { 'data-item-id': entry.id },\n });\n });\n return items;\n}\n\n/** Status, resources, and related-entry navigation for the active specimen. */\nexport function CatalogResourceFooter({\n name,\n resources,\n related,\n status,\n selectAction,\n toolbar,\n}: CatalogResourceFooterProps) {\n return (\n <>\n {status ? (\n <Row\n hAlign=\"space-between\"\n vAlign=\"baseline\"\n gap=\"xs\"\n wrap\n textInsets=\"trl\"\n >\n {status}\n </Row>\n ) : null}\n <Toolbar\n position=\"footer\"\n label={`${name} resources`}\n dividerSides={toolbar?.dividerSides}\n centerAlign={toolbar?.centerAlign}\n responsive={toolbar?.responsive ?? 'stack'}\n responsiveAt={toolbar?.responsiveAt ?? 'narrow'}\n safeAreaEdges={toolbar?.safeAreaEdges}\n leading={\n resources.length > 0 ? (\n <ToolbarControlGroup\n label={`${name} resources`}\n content=\"mixed\"\n size=\"compact\"\n overflow=\"wrap\"\n >\n {resources.map((resource) => (\n <ToolbarActionLink\n href={resource.href}\n label={resource.label}\n detail={resource.detail}\n ariaLabel={`${name}: ${resource.label} (opens in new tab)`}\n external\n icon={<LucideIcon icon={ExternalLink} name=\"external-link\" />}\n />\n ))}\n </ToolbarControlGroup>\n ) : null\n }\n trailing={\n related.length > 0 ? (\n <ToolbarControlGroup\n single\n content=\"mixed\"\n nestedDropdown\n menuInset=\"compact\"\n size=\"compact\"\n label=\"Related entries\"\n >\n <PopupMenu\n text=\"Components\"\n icon={<LucideIcon icon={Waypoints} name=\"waypoints\" />}\n placement=\"top-end\"\n items={relatedMenuItems(related, selectAction)}\n rootAttributes={{ 'data-catalog-related': '' }}\n />\n </ToolbarControlGroup>\n ) : null\n }\n />\n </>\n );\n}\n","import { List } from '../../components/collections/list/list.js';\nimport { ListHeader } from '../../components/collections/list-header/list-header.js';\nimport { ListItem } from '../../components/collections/list-item/list-item.js';\nimport type { CatalogEntry, CatalogSection } from '../types.js';\n\n/** One labeled section of catalog entries. */\nexport function CatalogSectionEntries({\n section,\n active,\n selectAction,\n}: {\n section: CatalogSection;\n active: string;\n selectAction: string;\n}) {\n return (\n <List rootAttributes={{ 'data-catalog-section': section.category }}>\n <ListHeader label={section.category} />\n <List gap=\"2xs\">\n {section.entries.map((entry: CatalogEntry) => (\n <ListItem\n action={selectAction}\n itemId={entry.id}\n label={entry.name}\n status={entry.tags?.join(' · ')}\n selected={active === entry.id}\n title={entry.description}\n multiline\n rootAttributes={{ 'data-catalog-entry-name': entry.name }}\n />\n ))}\n </List>\n </List>\n );\n}\n","import { List } from '../../components/collections/list/list.js';\nimport { ListHeader } from '../../components/collections/list-header/list-header.js';\nimport type { CatalogSecondaryGroup } from '../types.js';\nimport { CatalogSectionEntries } from './catalog-section-entries.js';\n\ninterface CatalogSecondarySectionsProps {\n group: CatalogSecondaryGroup;\n active: string;\n selectAction: string;\n toggleAction: string;\n}\n\n/** The quieter, optionally collapsible navigation below primary sections. */\nexport function CatalogSecondarySections({\n group,\n active,\n selectAction,\n toggleAction,\n}: CatalogSecondarySectionsProps) {\n const open = !group.collapsible || Boolean(group.expanded);\n return (\n <List\n dividerSides=\"t\"\n controlInsets=\"t\"\n rootAttributes={{ 'data-catalog-secondary-group': group.label }}\n >\n {group.collapsible ? (\n <ListHeader\n label={group.label}\n toggle\n expanded={open}\n action={toggleAction}\n />\n ) : (\n <ListHeader label={group.label} />\n )}\n <List\n gap=\"m\"\n rootAttributes={{\n 'data-catalog-secondary': '',\n 'data-catalog-secondary-collapsed': String(!open),\n }}\n >\n {group.sections.map((section) => (\n <CatalogSectionEntries\n section={section}\n active={active}\n selectAction={selectAction}\n />\n ))}\n </List>\n </List>\n );\n}\n","import type { CatalogSection } from '../types.js';\nimport { CatalogSectionEntries } from './catalog-section-entries.js';\n\n/** The primary category sections in the catalog navigation. */\nexport function CatalogSectionList({\n sections,\n active,\n selectAction,\n}: {\n sections: readonly CatalogSection[];\n active: string;\n selectAction: string;\n}) {\n return (\n <>\n {sections.map((section) => (\n <CatalogSectionEntries\n section={section}\n active={active}\n selectAction={selectAction}\n />\n ))}\n </>\n );\n}\n","import { List } from '../../components/collections/list/list.js';\nimport { ListInsetText } from '../../components/collections/list-inset-text/list-inset-text.js';\nimport { Text } from '../../components/typography/text/text.js';\nimport type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport type {\n CatalogBrand,\n CatalogSecondaryGroup,\n CatalogSection,\n} from '../types.js';\nimport { CatalogSecondarySections } from './catalog-secondary-sections.js';\nimport { CatalogSectionList } from './catalog-section-list.js';\n\ninterface CatalogSidebarProps {\n brand: CatalogBrand;\n sections: readonly CatalogSection[];\n active: string;\n secondarySections?: CatalogSecondaryGroup;\n footer?: KerfUiContent;\n selectAction: string;\n toggleSecondaryAction: string;\n}\n\n/** The catalog navigation: brand subtitle, entry sections, and footer. */\nexport function CatalogSidebar({\n brand,\n sections,\n active,\n secondarySections,\n footer,\n selectAction,\n toggleSecondaryAction,\n}: CatalogSidebarProps) {\n return (\n <nav aria-label={`${brand.title} components`} data-catalog-sidebar>\n <List gap=\"m\" controlInsets=\"b\">\n {brand.subtitle ? (\n <ListInsetText sides=\"rl\">\n <Text variant=\"span\" size=\"compact\" tone=\"quiet\">\n {brand.subtitle}\n </Text>\n </ListInsetText>\n ) : null}\n <CatalogSectionList\n sections={sections}\n active={active}\n selectAction={selectAction}\n />\n {secondarySections ? (\n <CatalogSecondarySections\n group={secondarySections}\n active={active}\n selectAction={selectAction}\n toggleAction={toggleSecondaryAction}\n />\n ) : null}\n <ListInsetText\n sides=\"rl\"\n rootAttributes={{ 'data-catalog-filter-empty': '' }}\n >\n <Text variant=\"span\" tone=\"quiet\">\n No matching items\n </Text>\n </ListInsetText>\n {footer}\n </List>\n </nav>\n );\n}\n","import type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../shared/dom/extension-attributes.js';\nimport type {\n CatalogBackgroundStyle,\n CatalogStageRootAttributes,\n} from '../types.js';\n\nconst protectedAttributes = new Set([\n 'data-catalog-stage',\n 'data-background-style',\n]);\n\ninterface CatalogStageProps {\n name: string;\n content: KerfUiContent;\n backgroundStyle?: CatalogBackgroundStyle;\n rootAttributes?: CatalogStageRootAttributes;\n}\n\n/** The preview canvas for an active Catalog entry. */\nexport function CatalogStage({\n name,\n content,\n backgroundStyle = 'checkerboard',\n rootAttributes = {},\n}: CatalogStageProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n protectedAttributes,\n );\n return (\n <section\n {...safeRootAttributes}\n class=\"kui-catalog__stage\"\n data-catalog-stage\n data-background-style={backgroundStyle}\n aria-label={`${name} preview`}\n >\n <div class=\"kui-catalog__canvas\">{content}</div>\n </section>\n );\n}\n","import { Scan } from 'lucide';\n\nimport {\n ToolbarActionLink,\n ToolbarControlGroup,\n} from '../../components/actions/toolbar-control-group/toolbar-control-group.js';\nimport { LucideIcon } from '../../components/media/lucide-icon/lucide-icon.js';\nimport type { CatalogEntry, CatalogUxReview } from '../types.js';\nimport { uxReviewCaptureUrl } from '../ux-review.js';\n\n/**\n * The \"Capture region\" header link for the active entry. `wireCatalog` adds\n * the page URL to its context when it is followed, since the URL can change\n * after this render (`urlParam`).\n */\nexport function CatalogUxReviewLink({\n uxReview: { projectDirectory, name },\n entry,\n category,\n}: {\n uxReview: CatalogUxReview & { name: string };\n entry: CatalogEntry;\n category: string;\n}) {\n return (\n <ToolbarControlGroup\n appearance=\"borderless\"\n single\n size=\"compact\"\n content=\"mixed\"\n buttonAppearance=\"push\"\n >\n <ToolbarActionLink\n href={uxReviewCaptureUrl({\n projectDirectory,\n title: `${name}: ${entry.name}`,\n context: `${name} catalog\\nSelected ${category}: ${entry.name} (${entry.id})`,\n })}\n label=\"Capture region\"\n ariaLabel={`Capture ${entry.name} in UX Review`}\n icon={<LucideIcon icon={Scan} name=\"scan\" />}\n />\n </ToolbarControlGroup>\n );\n}\n","import { Contrast, Moon, Sun, X, ZapOff } from 'lucide';\n\nimport { PopupMenu } from '../../components/actions/popup-menu/popup-menu.js';\nimport { ToolbarControlGroup } from '../../components/actions/toolbar-control-group/toolbar-control-group.js';\nimport { ToolbarText } from '../../components/actions/toolbar-text/toolbar-text.js';\nimport { ListInsetControl } from '../../components/collections/list-inset-control/list-inset-control.js';\nimport { ListInsetText } from '../../components/collections/list-inset-text/list-inset-text.js';\nimport { TokenSearchField } from '../../components/forms/token-search-field/token-search-field.js';\nimport { Workbench } from '../../components/layout/workbench/workbench.js';\nimport { LucideIcon } from '../../components/media/lucide-icon/lucide-icon.js';\nimport { Text } from '../../components/typography/text/text.js';\nimport type { CatalogEntry, CatalogProps, CatalogSection } from '../types.js';\nimport { CatalogResourceFooter } from './catalog-resource-footer.js';\nimport { CatalogSidebar } from './catalog-sidebar.js';\nimport { CatalogStage } from './catalog-stage.js';\nimport { CatalogUxReviewLink } from './catalog-ux-review-link.js';\n\nfunction findEntry(\n sections: readonly CatalogSection[],\n id: string,\n): { entry: CatalogEntry; category: string } | undefined {\n for (const section of sections) {\n for (const entry of section.entries)\n if (entry.id === id) return { entry, category: section.category };\n }\n return undefined;\n}\n\n/**\n * Controlled, stateless component-catalog shell: a `Workbench` whose left rail\n * is the catalog navigation and whose work area is the active entry — its\n * toolbar, description, preview stage, and resource footer. The sidebar's\n * standard toggle moves into the entry toolbar while it is collapsed, and on\n * a small screen the sidebar overlays the stage like any Workbench rail.\n */\nexport function Catalog({\n id = 'kui-catalog',\n brand,\n sections,\n active,\n content,\n collapsed = false,\n theme,\n increasedContrast,\n reducedMotion,\n backgroundControl = false,\n headerActions,\n uxReview,\n secondarySections,\n sidebarFooter,\n status,\n backgroundStyle,\n stageRootAttributes,\n selectAction = 'catalog-select',\n toggleSidebarAction = 'catalog-toggle-sidebar',\n toggleThemeAction = 'catalog-toggle-theme',\n toggleContrastAction = 'catalog-toggle-contrast',\n toggleMotionAction = 'catalog-toggle-motion',\n selectBackgroundAction = 'catalog-select-background',\n toggleSecondaryAction = 'catalog-toggle-secondary',\n headerPlacement = 'auto',\n footerPlacement = 'auto',\n sidebar = {},\n mainToolbar,\n footerToolbar,\n className = '',\n slot,\n}: CatalogProps) {\n const found =\n findEntry(sections, active) ??\n (secondarySections\n ? findEntry(secondarySections.sections, active)\n : undefined);\n const selected = found?.entry;\n const name = selected?.name ?? '';\n const nextTheme = theme === 'dark' ? 'light' : 'dark';\n const catalogName = `${brand.title} catalog`;\n const displayControls =\n increasedContrast !== undefined ||\n reducedMotion !== undefined ||\n backgroundControl ||\n theme !== undefined;\n\n return (\n <main\n class={`kui-catalog ${className}`.trim()}\n data-component=\"catalog\"\n data-sidebar-collapsed={String(collapsed)}\n slot={slot}\n >\n <Workbench\n id={id}\n label={catalogName}\n leftRail={{\n label: catalogName,\n size: sidebar.size ?? 288,\n resizable: sidebar.resizable,\n separator: sidebar.separator,\n collapseMotion: sidebar.collapseMotion,\n presentation: sidebar.presentation,\n responsiveOverlayAt: sidebar.responsiveOverlayAt,\n compactOverlay: sidebar.compactOverlay,\n collapsed,\n toolbar: {\n ...sidebar.toolbar,\n label: `${catalogName} header`,\n title: (\n <>\n {brand.logoUrl ? (\n <ToolbarControlGroup\n appearance=\"borderless\"\n content=\"avatar\"\n shape=\"rounded\"\n single\n avatarImage={brand.logoUrl}\n >\n {null}\n </ToolbarControlGroup>\n ) : null}\n <ToolbarText text={brand.title} size=\"large\" headingLevel={1} />\n </>\n ),\n toggle: { action: toggleSidebarAction, name: catalogName },\n },\n header: (\n <ListInsetControl sides=\"rbl\">\n <TokenSearchField\n id={`${id}-filter`}\n label=\"Filter catalog\"\n placeholder=\"Filter items or headings\"\n editorAttributes={{ 'data-catalog-filter': '' }}\n trailingAction={{\n icon: <LucideIcon icon={X} name=\"x\" />,\n label: 'Clear filter',\n action: 'catalog-clear-filter',\n }}\n />\n </ListInsetControl>\n ),\n content: (\n <CatalogSidebar\n brand={brand}\n sections={sections}\n active={active}\n secondarySections={secondarySections}\n footer={sidebarFooter}\n selectAction={selectAction}\n toggleSecondaryAction={toggleSecondaryAction}\n />\n ),\n }}\n mainToolbar={{\n ...mainToolbar,\n label: `${name} header`,\n // The entry title stays whole; actions wrap below it when narrow.\n responsive: mainToolbar?.responsive ?? 'wrap',\n title: <ToolbarText text={name} size=\"xlarge\" headingLevel={2} />,\n trailing: (\n <>\n {headerActions}\n {uxReview && found ? (\n <CatalogUxReviewLink\n uxReview={{ ...uxReview, name: uxReview.name ?? brand.title }}\n entry={found.entry}\n category={found.category}\n />\n ) : null}\n {displayControls ? (\n <ToolbarControlGroup\n appearance=\"borderless\"\n content=\"mixed\"\n size=\"compact\"\n overflow=\"wrap\"\n buttonAppearance=\"push\"\n label=\"Catalog display settings\"\n >\n {increasedContrast !== undefined ? (\n <button\n type=\"button\"\n data-action={toggleContrastAction}\n aria-pressed={String(increasedContrast)}\n >\n <LucideIcon icon={Contrast} name=\"contrast\" />\n <span>Contrast</span>\n </button>\n ) : null}\n {reducedMotion !== undefined ? (\n <button\n type=\"button\"\n data-action={toggleMotionAction}\n aria-pressed={String(reducedMotion)}\n >\n <LucideIcon icon={ZapOff} name=\"zap-off\" />\n <span>Reduce motion</span>\n </button>\n ) : null}\n {backgroundControl ? (\n <PopupMenu\n text=\"Background\"\n rootAttributes={{ 'data-catalog-background-menu': '' }}\n items={[\n { value: 'checkerboard', label: 'Checkerboard' },\n {\n value: 'vertical-stripes',\n label: 'Vertical stripes',\n },\n { value: 'layout-guide', label: 'Layout guide' },\n { value: 'surface', label: 'Surface' },\n { value: 'sunken', label: 'Sunken' },\n ].map(({ value, label }) => ({\n label,\n action: selectBackgroundAction,\n checked: (backgroundStyle ?? 'checkerboard') === value,\n attributes: { 'data-background-choice': value },\n }))}\n />\n ) : null}\n {theme ? (\n <button\n type=\"button\"\n data-action={toggleThemeAction}\n aria-label={`Use ${nextTheme} theme`}\n data-theme-preview={theme}\n >\n {nextTheme === 'dark' ? (\n <LucideIcon icon={Moon} name=\"moon\" />\n ) : (\n <LucideIcon icon={Sun} name=\"sun\" />\n )}\n <span>{nextTheme === 'dark' ? 'Dark' : 'Light'}</span>\n </button>\n ) : null}\n </ToolbarControlGroup>\n ) : null}\n </>\n ),\n }}\n mainPane={{ appearance: 'sunken' }}\n mainFooter={\n <CatalogResourceFooter\n name={name}\n resources={selected?.resources ?? []}\n related={selected?.related ?? []}\n status={status}\n selectAction={selectAction}\n toolbar={footerToolbar}\n />\n }\n mainHeader={\n selected?.description ? (\n <ListInsetText\n sides=\"trbl\"\n rootAttributes={{ 'data-catalog-description': '' }}\n >\n <Text variant=\"span\">{selected.description}</Text>\n </ListInsetText>\n ) : null\n }\n mainHeaderPlacement={headerPlacement}\n mainFooterPlacement={footerPlacement}\n main={\n <CatalogStage\n name={name}\n content={content}\n backgroundStyle={backgroundStyle}\n rootAttributes={stageRootAttributes}\n />\n }\n />\n </main>\n );\n}\n","import type { SafeHtml } from 'kerfjs';\n\nimport { ListHeader } from '../../components/collections/list-header/list-header.js';\nimport { ListInsetText } from '../../components/collections/list-inset-text/list-inset-text.js';\nimport { Text } from '../../components/typography/text/text.js';\nimport type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../shared/dom/extension-attributes.js';\n\n/** How a specimen aligns its visible edge with its `ListHeader` label. */\nexport type CatalogExampleAlign =\n 'glyph' | 'inline-control' | 'text-trigger' | 'none';\n\nexport interface CatalogExampleViewport {\n layout?: 'grid' | 'flex' | 'flex-column';\n width?: 'full' | 'compact' | 'medium' | 'wide' | 'text' | 'control';\n /** Fixed specimen height; `app` frames an application-sized recipe or layout.\n * A fixed height is definite, so a child that fills with `height: 100%`\n * (a horizontal `ResizableRegion`, say) spans the whole frame. */\n height?: 'short' | 'reduced' | 'medium' | 'tall' | 'app';\n /** A minimum the frame may grow past. It is not a definite height: a child\n * sized with `height: 100%` falls back to its content height, so use\n * `height` when the specimen must fill the frame. */\n minHeight?: 'short' | 'medium';\n frame?: 'solid' | 'dashed';\n surface?: 'default' | 'lowered';\n overflow?: 'hidden' | 'auto-x';\n responsive?: 'roomy-only';\n shadow?: boolean;\n /** Public component custom properties applied to the specimen viewport. */\n tokens?: Readonly<Record<`--${string}`, string>>;\n}\n\nconst protectedAttributes = new Set([\n 'data-catalog-example',\n 'data-catalog-example-stack',\n 'data-catalog-example-label',\n 'data-catalog-example-note',\n 'data-align',\n]);\n\ntype CatalogExampleRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-catalog-example'?: never;\n 'data-catalog-example-stack'?: never;\n 'data-catalog-example-label'?: never;\n 'data-catalog-example-note'?: never;\n 'data-align'?: never;\n }\n>;\n\nexport interface CatalogExampleProps {\n label?: string;\n note?: SafeHtml | string;\n align?: CatalogExampleAlign;\n /** Optional catalog-owned constraints for demonstrating layout components. */\n viewport?: CatalogExampleViewport;\n /** Replacement guidance shown when a roomy-only viewport is hidden. */\n compactFallback?: SafeHtml | string;\n rootAttributes?: CatalogExampleRootAttributes;\n className?: string;\n children?: KerfUiContent;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** A labeled catalog specimen with optional explanatory text and alignment. */\nexport function CatalogExample({\n label,\n note,\n align = 'none',\n viewport,\n compactFallback,\n rootAttributes = {},\n className = '',\n children,\n slot,\n}: CatalogExampleProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n protectedAttributes,\n );\n const viewportStyle = viewport?.tokens\n ? Object.entries(viewport.tokens)\n .map(([name, value]) => `${name}:${value}`)\n .join(';')\n : undefined;\n const specimen = viewport ? (\n <div\n class=\"kui-catalog-example__viewport\"\n data-catalog-example-viewport\n data-layout={viewport.layout}\n data-width={viewport.width}\n data-height={viewport.height}\n data-min-height={viewport.minHeight}\n data-frame={viewport.frame}\n data-surface={viewport.surface}\n data-overflow={viewport.overflow}\n data-responsive={viewport.responsive}\n data-shadow={viewport.shadow ? 'true' : undefined}\n style={viewportStyle}\n >\n {children}\n </div>\n ) : (\n children\n );\n\n return (\n <section\n {...safeRootAttributes}\n class={`kui-catalog-example ${className}`.trim()}\n data-catalog-example\n data-align={align}\n slot={slot}\n >\n {label !== undefined ? (\n <ListHeader\n label={label}\n width=\"content\"\n rootAttributes={{ 'data-catalog-example-label': '' }}\n />\n ) : null}\n {note !== undefined ? (\n <ListInsetText\n sides=\"rl\"\n className=\"kui-catalog-example__note\"\n rootAttributes={{ 'data-catalog-example-note': '' }}\n >\n <Text variant=\"span\" size=\"compact\" tone=\"quiet\">\n {note}\n </Text>\n </ListInsetText>\n ) : null}\n {compactFallback !== undefined ? (\n <Text tone=\"quiet\" className=\"kui-catalog-example__compact-fallback\">\n {compactFallback}\n </Text>\n ) : null}\n {specimen}\n </section>\n );\n}\n","import type { KerfUiContent } from '../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../shared/dom/extension-attributes.js';\n\nconst protectedAttributes = new Set([\n 'data-catalog-example',\n 'data-catalog-example-stack',\n 'data-catalog-example-label',\n 'data-catalog-example-note',\n 'data-align',\n]);\n\ntype CatalogExampleStackRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-catalog-example'?: never;\n 'data-catalog-example-stack'?: never;\n 'data-catalog-example-label'?: never;\n 'data-catalog-example-note'?: never;\n 'data-align'?: never;\n }\n>;\n\nexport interface CatalogExampleStackProps {\n label?: string;\n rootAttributes?: CatalogExampleStackRootAttributes;\n className?: string;\n children?: KerfUiContent;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** A vertically stacked group of catalog examples. */\nexport function CatalogExampleStack({\n label,\n rootAttributes = {},\n className = '',\n children,\n slot,\n}: CatalogExampleStackProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n protectedAttributes,\n );\n\n return (\n <section\n {...safeRootAttributes}\n class={`kui-catalog-example-stack ${className}`.trim()}\n data-catalog-example-stack\n aria-label={label}\n slot={slot}\n >\n {children}\n </section>\n );\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/catalog/ux-review.ts
|
|
2
|
+
var UX_REVIEW_PROJECT_PATH = "__ux-review/project.json";
|
|
3
|
+
function uxReviewCaptureUrl({
|
|
4
|
+
projectDirectory,
|
|
5
|
+
title,
|
|
6
|
+
context
|
|
7
|
+
}) {
|
|
8
|
+
const url = new URL("uxreview://capture");
|
|
9
|
+
url.searchParams.set("kind", "screenshot");
|
|
10
|
+
url.searchParams.set("target", "region");
|
|
11
|
+
url.searchParams.set("project", projectDirectory);
|
|
12
|
+
url.searchParams.set("title", title);
|
|
13
|
+
url.searchParams.set("context", context);
|
|
14
|
+
return url.href;
|
|
15
|
+
}
|
|
16
|
+
var ABSOLUTE_PATH = /^(?:\/|[A-Za-z]:[\\/])/;
|
|
17
|
+
async function loadUxReviewProject(pageUrl, fetchImpl = globalThis.fetch) {
|
|
18
|
+
try {
|
|
19
|
+
const response = await fetchImpl(new URL(UX_REVIEW_PROJECT_PATH, pageUrl));
|
|
20
|
+
if (!response.ok) return null;
|
|
21
|
+
const data = await response.json();
|
|
22
|
+
const directory = typeof data === "object" && data !== null && "projectDirectory" in data ? data.projectDirectory : void 0;
|
|
23
|
+
return typeof directory === "string" && ABSOLUTE_PATH.test(directory) ? directory : null;
|
|
24
|
+
} catch {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { UX_REVIEW_PROJECT_PATH, loadUxReviewProject, uxReviewCaptureUrl };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=chunk-6C6DLP3W.js.map
|