@kerfjs/ui 5.0.0-beta.17 → 5.0.0-beta.21
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 +221 -81
- package/ai/application-ui-diagnostic-ids-v1.json +92 -0
- package/ai/application-ui-profile-sync.cjs +529 -0
- package/ai/application-ui-profile.d.mts +1 -0
- package/ai/application-ui-profile.d.ts +102 -0
- package/ai/application-ui-profile.defaults.json +41 -0
- package/ai/application-ui-profile.mjs +626 -0
- package/ai/application-ui-profile.schema.json +130 -0
- package/ai/catalog-authoring.json +25 -0
- package/ai/catalog-authoring.schema.json +61 -0
- package/ai/compile-time-contracts-v1.json +101 -0
- package/ai/compile-time-contracts-v1.schema.json +49 -0
- package/ai/component-catalog-extension-v2.d.ts +7 -0
- package/ai/component-catalog-extension-v2.schema.json +7 -0
- package/ai/component-catalog-extension.schema.json +79 -0
- package/ai/component-catalog-v2-overrides.json +326 -0
- package/ai/component-catalog-v2.d.ts +67 -0
- package/ai/component-catalog-v2.json +4441 -0
- package/ai/component-catalog-v2.schema.json +246 -0
- package/ai/component-catalog.json +649 -6
- package/ai/component-catalog.schema.json +15 -0
- package/ai/public-api-signatures-v1.md +357 -91
- package/ai/skill.md +95 -50
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/cli.mjs +46 -0
- package/analyzer/index.d.mts +45 -0
- package/analyzer/index.mjs +743 -0
- package/analyzer/report.schema.json +66 -0
- package/dist/app-tab.d.ts +1 -1
- package/dist/app-tab.js +1 -1
- package/dist/browser/pane.js +3 -0
- package/dist/browser/sunken-panel.js +3 -0
- package/dist/catalog-resources.d.ts +34 -0
- package/dist/catalog-resources.js +22 -0
- package/dist/catalog-resources.js.map +1 -0
- package/dist/catalog.d.ts +29 -4
- package/dist/catalog.js +302 -84
- package/dist/catalog.js.map +1 -1
- package/dist/chunk-5VTB2BKP.js +35 -0
- package/dist/chunk-5VTB2BKP.js.map +1 -0
- package/dist/chunk-6WTETUZ6.js +21 -0
- package/dist/chunk-6WTETUZ6.js.map +1 -0
- package/dist/chunk-7KEUJIIC.js +218 -0
- package/dist/chunk-7KEUJIIC.js.map +1 -0
- package/dist/chunk-7L6EHUMV.js +31 -0
- package/dist/chunk-7L6EHUMV.js.map +1 -0
- package/dist/{chunk-XXMOARTH.js → chunk-AASLYRGE.js} +57 -16
- package/dist/chunk-AASLYRGE.js.map +1 -0
- package/dist/chunk-BBRXX6PF.js +108 -0
- package/dist/chunk-BBRXX6PF.js.map +1 -0
- package/dist/{chunk-6NLRBSVX.js → chunk-CN2XNTAM.js} +129 -72
- package/dist/chunk-CN2XNTAM.js.map +1 -0
- package/dist/chunk-DPDBVKNA.js +113 -0
- package/dist/chunk-DPDBVKNA.js.map +1 -0
- package/dist/chunk-DSNIYOZ3.js +114 -0
- package/dist/chunk-DSNIYOZ3.js.map +1 -0
- package/dist/chunk-ELSJX4W7.js +68 -0
- package/dist/chunk-ELSJX4W7.js.map +1 -0
- package/dist/{chunk-AHQI52QO.js → chunk-FEY65TBV.js} +6 -2
- package/dist/chunk-FEY65TBV.js.map +1 -0
- package/dist/chunk-JRKSK2HX.js +79 -0
- package/dist/chunk-JRKSK2HX.js.map +1 -0
- package/dist/chunk-K57KRAOV.js +117 -0
- package/dist/chunk-K57KRAOV.js.map +1 -0
- package/dist/chunk-LPOMRC4C.js +25 -0
- package/dist/chunk-LPOMRC4C.js.map +1 -0
- package/dist/chunk-M7JBER5U.js +41 -0
- package/dist/chunk-M7JBER5U.js.map +1 -0
- package/dist/chunk-NENBUYX5.js +79 -0
- package/dist/chunk-NENBUYX5.js.map +1 -0
- package/dist/chunk-OHU6CI22.js +83 -0
- package/dist/chunk-OHU6CI22.js.map +1 -0
- package/dist/{chunk-YGN7OMLT.js → chunk-OZWU5ZPZ.js} +2 -2
- package/dist/chunk-OZWU5ZPZ.js.map +1 -0
- package/dist/chunk-PIDTEQ3U.js +105 -0
- package/dist/chunk-PIDTEQ3U.js.map +1 -0
- package/dist/chunk-PX3YSS5C.js +32 -0
- package/dist/chunk-PX3YSS5C.js.map +1 -0
- package/dist/chunk-PZQVSDLH.js +61 -0
- package/dist/chunk-PZQVSDLH.js.map +1 -0
- package/dist/chunk-QO55FN2Y.js +20 -0
- package/dist/chunk-QO55FN2Y.js.map +1 -0
- package/dist/chunk-QQFJMRIB.js +45 -0
- package/dist/chunk-QQFJMRIB.js.map +1 -0
- package/dist/chunk-RYRIFZCT.js +58 -0
- package/dist/chunk-RYRIFZCT.js.map +1 -0
- package/dist/{chunk-7BR3DO2A.js → chunk-SRSJO5QE.js} +13 -4
- package/dist/chunk-SRSJO5QE.js.map +1 -0
- package/dist/chunk-VLYV65LK.js +38 -0
- package/dist/chunk-VLYV65LK.js.map +1 -0
- package/dist/chunk-W4CXQYSG.js +23 -0
- package/dist/chunk-W4CXQYSG.js.map +1 -0
- package/dist/{chunk-WXMGNX2Y.js → chunk-W7YD6E4N.js} +2 -2
- package/dist/chunk-W7YD6E4N.js.map +1 -0
- package/dist/{chunk-56RJXPHG.js → chunk-Y6LYKFXY.js} +1 -1
- package/dist/{chunk-56RJXPHG.js.map → chunk-Y6LYKFXY.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +2 -2
- package/dist/collapsible-panel.js +47 -6
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/device-class.js +33 -5
- package/dist/device-class.js.map +1 -1
- package/dist/disclosure-arrow.js +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/empty-state.js +1 -1
- package/dist/floating-toolbar.d.ts +1 -1
- package/dist/floating-toolbar.js +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +27 -25
- package/dist/list-action-row.d.ts +1 -1
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.d.ts +30 -9
- package/dist/list-header.js +1 -1
- package/dist/list-inset-control.d.ts +1 -1
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.d.ts +1 -1
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.d.ts +1 -1
- package/dist/list-item.js +1 -1
- package/dist/loading-spinner.js +1 -1
- package/dist/nav-stack.d.ts +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/pane.d.ts +49 -0
- package/dist/pane.js +4 -0
- package/dist/pane.js.map +1 -0
- package/dist/panel-header.d.ts +10 -4
- package/dist/panel-header.js +1 -1
- package/dist/resizable-region.d.ts +1 -1
- package/dist/resizable-region.js +1 -1
- package/dist/segmented-control.d.ts +6 -6
- package/dist/segmented-control.js +1 -1
- package/dist/select.d.ts +11 -5
- package/dist/select.js +1 -1
- package/dist/skeleton.d.ts +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/split-view.d.ts +1 -1
- package/dist/split-view.js +70 -10
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +4 -3
- package/dist/state-banner.js +1 -1
- package/dist/styles/catalog.css +32 -6
- package/dist/styles/layout.css +2 -20
- package/dist/styles/pane.css +62 -0
- package/dist/styles/segmented-control.css +3 -7
- package/dist/styles/sunken-panel.css +18 -0
- package/dist/sunken-panel.d.ts +16 -0
- package/dist/sunken-panel.js +3 -0
- package/dist/sunken-panel.js.map +1 -0
- package/dist/tab-bar.d.ts +4 -3
- package/dist/tab-bar.js +1 -1
- package/dist/tab-scaffold.d.ts +6 -6
- package/dist/tab-scaffold.js +43 -8
- package/dist/tab-scaffold.js.map +1 -1
- package/dist/token-search-field.d.ts +25 -9
- package/dist/token-search-field.js +1 -1
- package/dist/toolbar-control-group.d.ts +10 -6
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.d.ts +10 -11
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/value-table.d.ts +2 -2
- package/dist/value-table.js +1 -1
- package/dist/wire-catalog.d.ts +31 -2
- package/dist/wire-catalog.js +203 -8
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-nav-stack.js +22 -7
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-resizable-regions.d.ts +1 -1
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-sidebar.js +52 -41
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-tab-bars.d.ts +5 -2
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-scaffold.js +9 -4
- package/dist/wire-tab-scaffold.js.map +1 -1
- package/dist/wire-token-search-fields.d.ts +12 -7
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/workbench.d.ts +1 -1
- package/dist/workbench.js +56 -9
- package/dist/workbench.js.map +1 -1
- package/docs/app-layouts.md +7 -7
- package/docs/catalog.md +249 -46
- package/docs/collapsible-panel.md +38 -11
- package/docs/component-contract.md +132 -7
- package/docs/component-selection.md +79 -67
- package/docs/design/templates.md +1 -1
- package/docs/design-philosophy.md +7 -9
- package/docs/device-class.md +8 -8
- package/docs/examples/application-ui-profile.json +60 -0
- package/docs/examples/command-palette-adapter.tsx +67 -17
- package/docs/examples/component-catalog-extension-v2.json +81 -0
- package/docs/examples/component-catalog-extension.json +45 -0
- package/docs/layout.md +51 -32
- package/docs/nav-stack.md +15 -6
- package/docs/recipes.md +4 -4
- package/docs/split-view.md +3 -3
- package/docs/sunken-panel.md +43 -0
- package/docs/tab-scaffold.md +16 -7
- package/docs/type-contracts.md +99 -0
- package/docs/ui-analyzer.md +81 -0
- package/docs/ui-doctor.md +77 -0
- package/docs/ui-evaluator.md +122 -0
- package/docs/webawesome-theme.md +8 -8
- package/docs/workbench.md +18 -5
- package/doctor/cli.mjs +115 -0
- package/doctor/config.schema.json +68 -0
- package/doctor/index.d.mts +116 -0
- package/doctor/index.mjs +1256 -0
- package/doctor/report.schema.json +118 -0
- package/evaluator/cli.mjs +89 -0
- package/evaluator/index.d.mts +90 -0
- package/evaluator/index.mjs +1138 -0
- package/evaluator/report.schema.json +152 -0
- package/llms.txt +58 -15
- package/package.json +70 -10
- package/ux-demo/recipes/app-shell.tsx +206 -10
- package/ux-demo/recipes/collapsible-sidebar.tsx +167 -44
- package/ux-demo/recipes/compact-toolbar.tsx +114 -12
- package/ux-demo/recipes/composer-form.tsx +106 -18
- package/ux-demo/recipes/list-detail-dialog.tsx +144 -8
- package/ux-demo/recipes/list-workspace-states.tsx +165 -8
- package/ux-demo/recipes/loaders.ts +5 -2
- package/ux-demo/recipes/loading-inspector.tsx +124 -41
- package/ux-demo/recipes/mount-recipe.ts +27 -6
- package/ux-demo/recipes/navigation-sidebar.tsx +120 -9
- package/ux-demo/recipes/navigation-stack.tsx +61 -19
- package/ux-demo/recipes/types.ts +3 -1
- package/ux-demo/recipes/workspace-header.tsx +57 -2
- package/dist/chunk-2Z5TWHKQ.js +0 -34
- package/dist/chunk-2Z5TWHKQ.js.map +0 -1
- package/dist/chunk-37T3VNIZ.js +0 -19
- package/dist/chunk-37T3VNIZ.js.map +0 -1
- package/dist/chunk-55DATV3A.js +0 -10
- package/dist/chunk-55DATV3A.js.map +0 -1
- package/dist/chunk-5ATCDSQS.js +0 -42
- package/dist/chunk-5ATCDSQS.js.map +0 -1
- package/dist/chunk-5E2HVJ33.js +0 -10
- package/dist/chunk-5E2HVJ33.js.map +0 -1
- package/dist/chunk-6NLRBSVX.js.map +0 -1
- package/dist/chunk-7BR3DO2A.js.map +0 -1
- package/dist/chunk-7JB7VPRI.js +0 -34
- package/dist/chunk-7JB7VPRI.js.map +0 -1
- package/dist/chunk-7LDCTU7D.js +0 -134
- package/dist/chunk-7LDCTU7D.js.map +0 -1
- package/dist/chunk-AHQI52QO.js.map +0 -1
- package/dist/chunk-AQNKJRFH.js +0 -79
- package/dist/chunk-AQNKJRFH.js.map +0 -1
- package/dist/chunk-AVZHJN6C.js +0 -14
- package/dist/chunk-AVZHJN6C.js.map +0 -1
- package/dist/chunk-B24C4A6T.js +0 -22
- package/dist/chunk-B24C4A6T.js.map +0 -1
- package/dist/chunk-CH4SQ6H5.js +0 -39
- package/dist/chunk-CH4SQ6H5.js.map +0 -1
- package/dist/chunk-DAFFDO33.js +0 -14
- package/dist/chunk-DAFFDO33.js.map +0 -1
- package/dist/chunk-I7INRJO4.js +0 -17
- package/dist/chunk-I7INRJO4.js.map +0 -1
- package/dist/chunk-L4OKFDJY.js +0 -24
- package/dist/chunk-L4OKFDJY.js.map +0 -1
- package/dist/chunk-M5JRI6MN.js +0 -27
- package/dist/chunk-M5JRI6MN.js.map +0 -1
- package/dist/chunk-RNPGFQ33.js +0 -10
- package/dist/chunk-RNPGFQ33.js.map +0 -1
- package/dist/chunk-VPCTCUED.js +0 -10
- package/dist/chunk-VPCTCUED.js.map +0 -1
- package/dist/chunk-WRTAQ7BZ.js +0 -23
- package/dist/chunk-WRTAQ7BZ.js.map +0 -1
- package/dist/chunk-WVPYVDXY.js +0 -15
- package/dist/chunk-WVPYVDXY.js.map +0 -1
- package/dist/chunk-WXMGNX2Y.js.map +0 -1
- package/dist/chunk-XXMOARTH.js.map +0 -1
- package/dist/chunk-YGN7OMLT.js.map +0 -1
- package/dist/chunk-ZQQ6P4SV.js +0 -20
- package/dist/chunk-ZQQ6P4SV.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sunken-panel.tsx"],"names":[],"mappings":";;;AAcO,SAAS,WAAA,CAAY;AAAA,EAC1B,QAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA,GAAY;AACd,CAAA,EAAqB;AACnB,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,iBAAA,EAAoB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC5C,gBAAA,EAAe,cAAA;AAAA,MACf,IAAA,EAAM,YAAY,QAAA,GAAW,MAAA;AAAA,MAC7B,YAAA,EAAY,SAAA;AAAA,MAEX;AAAA;AAAA,GACH;AAEJ","file":"chunk-W4CXQYSG.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nexport interface SunkenPanelProps {\n children?: SafeHtml | readonly SafeHtml[];\n /** Optional accessible landmark name for a distinct application region. */\n ariaLabel?: string;\n className?: string;\n}\n\n/**\n * A lowered application surface with one compact inset and a vertical content\n * stack. The panel owns its background and padding; children own their own\n * borders and internal geometry.\n */\nexport function SunkenPanel({\n children,\n ariaLabel,\n className = '',\n}: SunkenPanelProps) {\n return (\n <div\n class={`kui-sunken-panel ${className}`.trim()}\n data-component=\"sunken-panel\"\n role={ariaLabel ? 'region' : undefined}\n aria-label={ariaLabel}\n >\n {children}\n </div>\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Skeleton } from './chunk-
|
|
1
|
+
import { Skeleton } from './chunk-PZQVSDLH.js';
|
|
2
2
|
import { jsx } from 'kerfjs/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
function ToolbarText({
|
|
@@ -35,4 +35,4 @@ function ToolbarText({
|
|
|
35
35
|
|
|
36
36
|
export { ToolbarText };
|
|
37
37
|
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-W7YD6E4N.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/toolbar-text.tsx"],"names":[],"mappings":";;;AA2CO,SAAS,WAAA,CAAY;AAAA,EAC1B,IAAA;AAAA,EACA,IAAA,GAAO,SAAA;AAAA,EACP,SAAA,GAAY,EAAA;AAAA,EACZ,EAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA,GAAc,KAAA;AAAA,EACd,IAAA,GAAO,KAAA;AAAA,EACP,QAAA,GAAW,IAAA;AAAA,EACX,QAAA,GAAW;AACb,CAAA,EAAqB;AACnB,EAAA,MAAM,MAAA,GAAS,IAAA,IAAQ,QAAA,IAAY,IAAA,IAAQ,QAAA,GAAW,CAAA;AACtD,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,iBAAA,EAAoB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC5C,gBAAA,EAAe,cAAA;AAAA,MACf,WAAA,EAAW,IAAA;AAAA,MACX,WAAA,EAAW,OAAO,MAAA,GAAS,MAAA;AAAA,MAC3B,eAAA,EAAe,WAAW,MAAA,GAAY,OAAA;AAAA,MACtC,gBAAA,EAAgB,MAAA,GAAS,MAAA,CAAO,QAAQ,CAAA,GAAI,MAAA;AAAA,MAC5C,KAAA,EAAO,MAAA,GAAS,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAA,GAAK,MAAA;AAAA,MAC7D,kBAAA,EAAkB,cAAc,MAAA,GAAS,MAAA;AAAA,MACzC,EAAA;AAAA,MACA,IAAA,EAAM,eAAe,SAAA,GAAY,MAAA;AAAA,MACjC,YAAA,EAAY,YAAA,GAAe,MAAA,CAAO,YAAY,CAAA,GAAI,MAAA;AAAA,MAClD,WAAA,EAAW,cAAc,MAAA,GAAS,MAAA;AAAA,MAEjC,QAAA,EAAA,WAAA,mBACC,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAM,KAAA,EAAM,oBAEtB,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,wBAAA,EAA0B,QAAA,EAAA,IAAA,EAAK;AAAA;AAAA,GAE/C;AAEJ","file":"chunk-W7YD6E4N.js","sourcesContent":["import { Skeleton } from './skeleton.js';\n\nexport type ToolbarTextSize = 'xlarge' | 'large' | 'default' | 'small';\n\n/** ARIA heading level for a title exposed as a heading landmark. */\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\ninterface ToolbarTextBaseProps {\n text: string;\n size?: ToolbarTextSize;\n className?: string;\n /** Optional id, e.g. so a dialog can reference the title via aria-labelledby. */\n id?: string;\n /**\n * Expose heading semantics (`role=\"heading\"` + `aria-level`) so the text acts as\n * a heading landmark — e.g. a page's primary title. Omit to keep the plain span\n * (the default), which suits a dialog title referenced via `aria-labelledby`.\n */\n headingLevel?: HeadingLevel;\n /** Render the text as an unanimated loading skeleton instead of its value. */\n placeholder?: boolean;\n /**\n * Show a trailing ellipsis (…) where the text is truncated — on the single line\n * (default), or at the `maxLines` boundary when wrapping. Set false to hard-clip\n * instead. Default true.\n */\n ellipsis?: boolean;\n /**\n * Cap wrapped text to this many lines, truncating past it. Only takes effect with\n * `wrap`; ignored on a single line. `null`/omitted wraps without a line cap. Default null.\n */\n}\n\ntype ToolbarTextWrappingProps =\n | {\n /** Wrap onto multiple lines; combine with `maxLines` to cap them. */\n wrap: true;\n maxLines?: number | null;\n }\n | { wrap?: false; maxLines?: never };\n\nexport type ToolbarTextProps = ToolbarTextBaseProps & ToolbarTextWrappingProps;\n\nexport function ToolbarText({\n text,\n size = 'default',\n className = '',\n id,\n headingLevel,\n placeholder = false,\n wrap = false,\n ellipsis = true,\n maxLines = null,\n}: ToolbarTextProps) {\n const capped = wrap && maxLines != null && maxLines > 0;\n return (\n <span\n class={`kui-toolbar-text ${className}`.trim()}\n data-component=\"toolbar-text\"\n data-size={size}\n data-wrap={wrap ? 'true' : undefined}\n data-ellipsis={ellipsis ? undefined : 'false'}\n data-max-lines={capped ? String(maxLines) : undefined}\n style={capped ? `--kui-toolbar-text-max-lines:${maxLines}` : undefined}\n data-placeholder={placeholder ? 'true' : undefined}\n id={id}\n role={headingLevel ? 'heading' : undefined}\n aria-level={headingLevel ? String(headingLevel) : undefined}\n aria-busy={placeholder ? 'true' : undefined}\n >\n {placeholder ? (\n <Skeleton width=\"8em\" />\n ) : (\n <span class=\"kui-toolbar-text__text\">{text}</span>\n )}\n </span>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/disclosure-arrow.tsx"],"names":[],"mappings":";;;;AAgBA,IAAM,kBAAA,GAA0D;AAAA,EAC9D,KAAA,EAAO,CAAA;AAAA,EACP,IAAA,EAAM,EAAA;AAAA,EACN,IAAA,EAAM,GAAA;AAAA,EACN,EAAA,EAAI;AACN,CAAA;AAEA,SAAS,gBAAA,CACP,IAAA,EACA,aAAA,EACA,eAAA,EACA;AACA,EA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e,kBAAA;AAAA,MACf,WAAA,EAAW,OAAO,IAAI,CAAA;AAAA,MACtB,gBAAA,EAAgB,SAAA;AAAA,MAChB,aAAA,EAAY,MAAA;AAAA,MAEX,kCAAQ,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,YAAA,EAAc,MAAK,eAAA,EAAgB;AAAA;AAAA,GAChE;AAEJ","file":"chunk-Y6LYKFXY.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport { ChevronRight } from 'lucide';\n\nimport { LucideIcon } from './lucide-icon.js';\n\nexport type DisclosureDirection = 'up' | 'down' | 'left' | 'right';\n\nexport interface DisclosureArrowProps {\n open: boolean;\n openDirection?: DisclosureDirection;\n closedDirection?: DisclosureDirection;\n /** Replacement icons should use right as their unrotated orientation. */\n icon?: SafeHtml;\n className?: string;\n}\n\nconst directionRotations: Record<DisclosureDirection, number> = {\n right: 0,\n down: 90,\n left: 180,\n up: 270,\n};\n\nfunction rotationForState(\n open: boolean,\n openDirection: DisclosureDirection,\n closedDirection: DisclosureDirection,\n) {\n const closedRotation = directionRotations[closedDirection];\n if (!open) return closedRotation;\n\n const openRotation = directionRotations[openDirection];\n const shortestDelta = ((openRotation - closedRotation + 540) % 360) - 180;\n return closedRotation + shortestDelta;\n}\n\nexport function DisclosureArrow({\n open,\n openDirection = 'down',\n closedDirection = 'right',\n icon,\n className = '',\n}: DisclosureArrowProps) {\n const direction = open ? openDirection : closedDirection;\n const rotation = rotationForState(open, openDirection, closedDirection);\n return (\n <span\n class={`kui-disclosure-arrow ${className}`.trim()}\n style={`--_kui-disclosure-arrow-rotation:${rotation}deg`}\n data-component=\"disclosure-arrow\"\n data-open={String(open)}\n data-direction={direction}\n aria-hidden=\"true\"\n >\n {icon ?? <LucideIcon icon={ChevronRight} name=\"chevron-right\" />}\n </span>\n );\n}\n"]}
|
|
@@ -35,7 +35,7 @@ interface CollapsiblePanelToggleProps {
|
|
|
35
35
|
* put it in the panel's own header (to collapse) and somewhere always-visible
|
|
36
36
|
* (to expand while collapsed).
|
|
37
37
|
*/
|
|
38
|
-
declare function CollapsiblePanelToggle({ side, collapsed, action, panelId, label, className }: CollapsiblePanelToggleProps): SafeHtml;
|
|
38
|
+
declare function CollapsiblePanelToggle({ side, collapsed, action, panelId, label, className, }: CollapsiblePanelToggleProps): SafeHtml;
|
|
39
39
|
interface CollapsiblePanelProps {
|
|
40
40
|
/** A stable id for the panel — `wireSidebar` targets it and toggles reference it. */
|
|
41
41
|
id: string;
|
|
@@ -61,6 +61,6 @@ interface CollapsiblePanelProps {
|
|
|
61
61
|
* and persistence semantics, and with `CollapsiblePanelToggle` for the standard
|
|
62
62
|
* affordance. See `docs/24-collapsible-panel.md`.
|
|
63
63
|
*/
|
|
64
|
-
declare function CollapsiblePanel({ id, side, collapsed, size, label, children, className }: CollapsiblePanelProps): SafeHtml;
|
|
64
|
+
declare function CollapsiblePanel({ id, side, collapsed, size, label, children, className, }: CollapsiblePanelProps): SafeHtml;
|
|
65
65
|
|
|
66
66
|
export { CollapsiblePanel, type CollapsiblePanelProps, type CollapsiblePanelSide, CollapsiblePanelToggle, type CollapsiblePanelToggleProps, collapsiblePanelToggleIcon };
|
|
@@ -3,18 +3,59 @@ import { PanelLeftOpen, PanelLeftClose, PanelRightOpen, PanelRightClose, PanelBo
|
|
|
3
3
|
import { jsx } from 'kerfjs/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
function collapsiblePanelToggleIcon(side, collapsed) {
|
|
6
|
-
if (side === "left")
|
|
7
|
-
|
|
6
|
+
if (side === "left")
|
|
7
|
+
return collapsed ? { icon: PanelLeftOpen, name: "panel-left-open" } : { icon: PanelLeftClose, name: "panel-left-close" };
|
|
8
|
+
if (side === "right")
|
|
9
|
+
return collapsed ? { icon: PanelRightOpen, name: "panel-right-open" } : { icon: PanelRightClose, name: "panel-right-close" };
|
|
8
10
|
return collapsed ? { icon: PanelBottomOpen, name: "panel-bottom-open" } : { icon: PanelBottomClose, name: "panel-bottom-close" };
|
|
9
11
|
}
|
|
10
|
-
function CollapsiblePanelToggle({
|
|
12
|
+
function CollapsiblePanelToggle({
|
|
13
|
+
side,
|
|
14
|
+
collapsed,
|
|
15
|
+
action,
|
|
16
|
+
panelId,
|
|
17
|
+
label,
|
|
18
|
+
className = ""
|
|
19
|
+
}) {
|
|
11
20
|
const glyph = collapsiblePanelToggleIcon(side, collapsed);
|
|
12
21
|
const accessible = label ?? (collapsed ? "Expand" : "Collapse");
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
"button",
|
|
24
|
+
{
|
|
25
|
+
type: "button",
|
|
26
|
+
class: `kui-collapsible-panel__toggle ${className}`.trim(),
|
|
27
|
+
"data-action": action,
|
|
28
|
+
"data-collapsible-target": panelId,
|
|
29
|
+
"aria-expanded": String(!collapsed),
|
|
30
|
+
"aria-label": accessible,
|
|
31
|
+
children: /* @__PURE__ */ jsx(LucideIcon, { icon: glyph.icon, name: glyph.name })
|
|
32
|
+
}
|
|
33
|
+
);
|
|
14
34
|
}
|
|
15
|
-
function CollapsiblePanel({
|
|
35
|
+
function CollapsiblePanel({
|
|
36
|
+
id,
|
|
37
|
+
side,
|
|
38
|
+
collapsed = false,
|
|
39
|
+
size,
|
|
40
|
+
label,
|
|
41
|
+
children,
|
|
42
|
+
className = ""
|
|
43
|
+
}) {
|
|
16
44
|
const sizeVar = side === "bottom" ? "--kui-collapsible-panel-height" : "--kui-collapsible-panel-width";
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
"aside",
|
|
47
|
+
{
|
|
48
|
+
class: `kui-collapsible-panel kui-collapsible-panel--${side} ${className}`.trim(),
|
|
49
|
+
"data-component": "collapsible-panel",
|
|
50
|
+
"data-collapsible-panel": id,
|
|
51
|
+
"data-side": side,
|
|
52
|
+
"data-collapsed": String(collapsed),
|
|
53
|
+
"aria-label": label || void 0,
|
|
54
|
+
"aria-hidden": collapsed ? "true" : void 0,
|
|
55
|
+
style: size ? `${sizeVar}: ${size}px` : void 0,
|
|
56
|
+
children: /* @__PURE__ */ jsx("div", { class: "kui-collapsible-panel__content", children })
|
|
57
|
+
}
|
|
58
|
+
);
|
|
18
59
|
}
|
|
19
60
|
|
|
20
61
|
export { CollapsiblePanel, CollapsiblePanelToggle, collapsiblePanelToggleIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/collapsible-panel.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"sources":["../src/collapsible-panel.tsx"],"names":[],"mappings":";;;;AAsBO,SAAS,0BAAA,CACd,MACA,SAAA,EACkE;AAClE,EAAA,IAAI,IAAA,KAAS,MAAA;AACX,IAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,aAAA,EAAe,IAAA,EAAM,iBAAA,EAAkB,GAC/C,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,kBAAA,EAAmB;AACvD,EAAA,IAAI,IAAA,KAAS,OAAA;AACX,IAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,kBAAA,EAAmB,GACjD,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,mBAAA,EAAoB;AACzD,EAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,mBAAA,EAAoB,GACnD,EAAE,IAAA,EAAM,gBAAA,EAAkB,IAAA,EAAM,oBAAA,EAAqB;AAC3D;AAuBO,SAAS,sBAAA,CAAuB;AAAA,EACrC,IAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA,GAAY;AACd,CAAA,EAAgC;AAC9B,EAAA,MAAM,KAAA,GAAQ,0BAAA,CAA2B,IAAA,EAAM,SAAS,CAAA;AACxD,EAAA,MAAM,UAAA,GAAa,KAAA,KAAU,SAAA,GAA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,KAAA,EAAM,gCAAA,EAAkC,QAAA,EAAS;AAAA;AAAA,GACxD;AAEJ","file":"collapsible-panel.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport {\n PanelBottomClose,\n PanelBottomOpen,\n PanelLeftClose,\n PanelLeftOpen,\n PanelRightClose,\n PanelRightOpen,\n} from 'lucide';\n\nimport { LucideIcon } from './lucide-icon.js';\n\n/** Which edge a {@link CollapsiblePanel} docks to. */\nexport type CollapsiblePanelSide = 'left' | 'right' | 'bottom';\n\n/**\n * The standard collapse/expand icon for a panel `side` and `collapsed` state,\n * so every app's sidebars and drawers use one recognizable convention:\n * `PanelLeft*` for a left rail, `PanelRight*` for a right rail, `PanelBottom*`\n * for a bottom drawer — the `Close` glyph while open, the `Open` glyph while\n * collapsed. Exposed so an app can render its own toggle affordance.\n */\nexport function collapsiblePanelToggleIcon(\n side: CollapsiblePanelSide,\n collapsed: boolean,\n): { icon: Parameters<typeof LucideIcon>[0]['icon']; name: string } {\n if (side === 'left')\n return collapsed\n ? { icon: PanelLeftOpen, name: 'panel-left-open' }\n : { icon: PanelLeftClose, name: 'panel-left-close' };\n if (side === 'right')\n return collapsed\n ? { icon: PanelRightOpen, name: 'panel-right-open' }\n : { icon: PanelRightClose, name: 'panel-right-close' };\n return collapsed\n ? { icon: PanelBottomOpen, name: 'panel-bottom-open' }\n : { icon: PanelBottomClose, name: 'panel-bottom-close' };\n}\n\nexport interface CollapsiblePanelToggleProps {\n /** The panel this toggle controls. */\n side: CollapsiblePanelSide;\n /** The panel's current collapsed state (drives the icon direction). */\n collapsed: boolean;\n /** `data-action` the button carries so `wireSidebar` can delegate its click. */\n action: string;\n /** The panel id the button targets (`data-tab-panel`-style: `data-collapsible-panel`). */\n panelId?: string;\n /** Accessible label; defaults to \"Collapse\"/\"Expand\". */\n label?: string;\n className?: string;\n}\n\n/**\n * A standard collapse/expand toggle button for a {@link CollapsiblePanel}: the\n * recognizable per-side icon (see {@link collapsiblePanelToggleIcon}) plus the\n * `data-action` / `aria-expanded` `wireSidebar` reads. Placement is the app's —\n * put it in the panel's own header (to collapse) and somewhere always-visible\n * (to expand while collapsed).\n */\nexport function CollapsiblePanelToggle({\n side,\n collapsed,\n action,\n panelId,\n label,\n className = '',\n}: CollapsiblePanelToggleProps) {\n const glyph = collapsiblePanelToggleIcon(side, collapsed);\n const accessible = label ?? (collapsed ? 'Expand' : 'Collapse');\n return (\n <button\n type=\"button\"\n class={`kui-collapsible-panel__toggle ${className}`.trim()}\n data-action={action}\n data-collapsible-target={panelId}\n aria-expanded={String(!collapsed)}\n aria-label={accessible}\n >\n <LucideIcon icon={glyph.icon} name={glyph.name} />\n </button>\n );\n}\n\nexport interface CollapsiblePanelProps {\n /** A stable id for the panel — `wireSidebar` targets it and toggles reference it. */\n id: string;\n /** Which edge the panel docks to: a left/right rail or a bottom drawer. */\n side: CollapsiblePanelSide;\n /** Whether the panel is currently collapsed (the app owns this signal). */\n collapsed?: boolean;\n /** Rail width or drawer height in px. Overrides the CSS default. */\n size?: number;\n /** Accessible label for the panel region. */\n label?: string;\n /** Panel content. */\n children?: SafeHtml | readonly SafeHtml[];\n className?: string;\n}\n\n/**\n * A standalone collapsible side rail or bottom drawer, outside the full\n * {@link Workbench} shell. It owns only the presentation: a fixed-size content\n * area that stays laid out while the panel's track snaps to zero and the content\n * slides out via `transform` (one reflow, composited — the same technique\n * `Workbench` and the catalog sidebar use). The app owns the `collapsed` signal;\n * pair it with `wireSidebar` for the toggle, focus, compact-overlay, keyboard,\n * and persistence semantics, and with `CollapsiblePanelToggle` for the standard\n * affordance. See `docs/24-collapsible-panel.md`.\n */\nexport function CollapsiblePanel({\n id,\n side,\n collapsed = false,\n size,\n label,\n children,\n className = '',\n}: CollapsiblePanelProps) {\n const sizeVar =\n side === 'bottom'\n ? '--kui-collapsible-panel-height'\n : '--kui-collapsible-panel-width';\n return (\n <aside\n class={`kui-collapsible-panel kui-collapsible-panel--${side} ${className}`.trim()}\n data-component=\"collapsible-panel\"\n data-collapsible-panel={id}\n data-side={side}\n data-collapsed={String(collapsed)}\n aria-label={label || undefined}\n aria-hidden={collapsed ? 'true' : undefined}\n style={size ? `${sizeVar}: ${size}px` : undefined}\n >\n <div class=\"kui-collapsible-panel__content\">{children}</div>\n </aside>\n );\n}\n"]}
|
package/dist/device-class.js
CHANGED
|
@@ -7,8 +7,19 @@ var DEFAULT_BREAKPOINTS = {
|
|
|
7
7
|
desktop: 1024,
|
|
8
8
|
"xl-desktop": 1440
|
|
9
9
|
};
|
|
10
|
-
var SIZE_ORDER = [
|
|
11
|
-
|
|
10
|
+
var SIZE_ORDER = [
|
|
11
|
+
"xs-mobile",
|
|
12
|
+
"mobile",
|
|
13
|
+
"tablet",
|
|
14
|
+
"desktop",
|
|
15
|
+
"xl-desktop"
|
|
16
|
+
];
|
|
17
|
+
var SSR_VIEWPORT = {
|
|
18
|
+
width: 1024,
|
|
19
|
+
height: 768,
|
|
20
|
+
segments: 1,
|
|
21
|
+
verticalSegments: 1
|
|
22
|
+
};
|
|
12
23
|
function classifyViewport(width, orientation, segments = 1, verticalSegments = 1, breakpoints = DEFAULT_BREAKPOINTS) {
|
|
13
24
|
const size = width >= breakpoints["xl-desktop"] ? "xl-desktop" : width >= breakpoints.desktop ? "desktop" : width >= breakpoints.tablet ? "tablet" : width >= breakpoints.mobile ? "mobile" : "xs-mobile";
|
|
14
25
|
const rank = SIZE_ORDER.indexOf(size);
|
|
@@ -57,16 +68,33 @@ function orientationOf(view) {
|
|
|
57
68
|
return view.height > view.width ? "portrait" : "landscape";
|
|
58
69
|
}
|
|
59
70
|
function deviceClass(options = {}) {
|
|
60
|
-
const breakpoints = {
|
|
71
|
+
const breakpoints = {
|
|
72
|
+
...DEFAULT_BREAKPOINTS,
|
|
73
|
+
...options.breakpoints
|
|
74
|
+
};
|
|
61
75
|
const view = browserWindow();
|
|
62
76
|
if (!view) {
|
|
63
77
|
const snapshot = { ...SSR_VIEWPORT, ...options.ssr };
|
|
64
|
-
return computed(
|
|
78
|
+
return computed(
|
|
79
|
+
() => classifyViewport(
|
|
80
|
+
snapshot.width,
|
|
81
|
+
orientationOf(snapshot),
|
|
82
|
+
snapshot.segments,
|
|
83
|
+
snapshot.verticalSegments,
|
|
84
|
+
breakpoints
|
|
85
|
+
)
|
|
86
|
+
);
|
|
65
87
|
}
|
|
66
88
|
const source = viewportSource(view);
|
|
67
89
|
return computed(() => {
|
|
68
90
|
const v = source.value;
|
|
69
|
-
return classifyViewport(
|
|
91
|
+
return classifyViewport(
|
|
92
|
+
v.width,
|
|
93
|
+
orientationOf(v),
|
|
94
|
+
v.segments,
|
|
95
|
+
v.verticalSegments,
|
|
96
|
+
breakpoints
|
|
97
|
+
);
|
|
70
98
|
});
|
|
71
99
|
}
|
|
72
100
|
|
package/dist/device-class.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/device-class.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/device-class.ts"],"names":[],"mappings":";;;AAsDO,IAAM,mBAAA,GAAyC;AAAA,EACpD,MAAA,EAAQ,GAAA;AAAA,EACR,MAAA,EAAQ,GAAA;AAAA,EACR,OAAA,EAAS,IAAA;AAAA,EACT,YAAA,EAAc;AAChB;AAEA,IAAM,UAAA,GAAoC;AAAA,EACxC,WAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA;AAEA,IAAM,YAAA,GAAyB;AAAA,EAC7B,KAAA,EAAO,IAAA;AAAA,EACP,MAAA,EAAQ,GAAA;AAAA,EACR,QAAA,EAAU,CAAA;AAAA,EACV,gBAAA,EAAkB;AACpB,CAAA;AAMO,SAAS,gBAAA,CACd,OACA,WAAA,EACA,QAAA,GAAW,GACX,gBAAA,GAAmB,CAAA,EACnB,cAAiC,mBAAA,EACpB;AACb,EAAA,MAAM,OACJ,KAAA,IAAS,WAAA,CAAY,YAAY,CAAA,GAC7B,eACA,KAAA,IAAS,WAAA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A,MACL,CAAA,CAAE,KAAA;AAAA,MACF,cAAc,CAAC,CAAA;AAAA,MACf,CAAA,CAAE,QAAA;AAAA,MACF,CAAA,CAAE,gBAAA;AAAA,MACF;AAAA,KACF;AAAA,EACF,CAAC,CAAA;AACH","file":"device-class.js","sourcesContent":["import { computed, type ReadonlySignal, signal } from 'kerfjs';\n\n/**\n * Reactive device-class detection for `@kerfjs/ui` (see `docs/23-app-layouts.md`\n * §2). `deviceClass()` returns a `ReadonlySignal<DeviceClass>` describing the\n * current viewport as a size bucket × orientation × viewport-segment count, so a\n * layout can pick its presentation reactively instead of hand-wiring `matchMedia`.\n *\n * One shared viewport source backs every reader; the pure `classifyViewport`\n * core is DOM-free and directly unit-tested.\n */\n\nexport type DeviceSize =\n 'xs-mobile' | 'mobile' | 'tablet' | 'desktop' | 'xl-desktop';\nexport type DeviceOrientation = 'portrait' | 'landscape';\n\n/** Minimum widths (px) at which each larger bucket begins. `xs-mobile` is 0. */\nexport interface DeviceBreakpoints {\n mobile: number;\n tablet: number;\n desktop: number;\n 'xl-desktop': number;\n}\n\nexport interface DeviceClass {\n size: DeviceSize;\n orientation: DeviceOrientation;\n /** Horizontal viewport segments (foldables / dual-screen); 1 on ordinary devices. */\n segments: number;\n /** Vertical viewport segments; 1 on ordinary devices. */\n verticalSegments: number;\n /** Small phones — `xs-mobile` or `mobile`. */\n handset: boolean;\n /** \"One pane at a time\" — a handset or a portrait tablet. */\n compact: boolean;\n /** True when the current size is `size` or larger, e.g. `atLeast('tablet')`. */\n atLeast(size: DeviceSize): boolean;\n}\n\n/** A raw viewport snapshot, before breakpoints are applied. */\nexport interface Viewport {\n width: number;\n height: number;\n segments: number;\n verticalSegments: number;\n}\n\nexport interface DeviceClassOptions {\n /** Override any of the default bucket thresholds. */\n breakpoints?: Partial<DeviceBreakpoints>;\n /** The viewport assumed when there is no DOM (SSR). Defaults to 1024×768, one segment. */\n ssr?: Partial<Viewport>;\n}\n\nexport const DEFAULT_BREAKPOINTS: DeviceBreakpoints = {\n mobile: 360,\n tablet: 720,\n desktop: 1024,\n 'xl-desktop': 1440,\n};\n\nconst SIZE_ORDER: readonly DeviceSize[] = [\n 'xs-mobile',\n 'mobile',\n 'tablet',\n 'desktop',\n 'xl-desktop',\n];\n\nconst SSR_VIEWPORT: Viewport = {\n width: 1024,\n height: 768,\n segments: 1,\n verticalSegments: 1,\n};\n\n/**\n * Classify a raw viewport into a {@link DeviceClass}. Pure and DOM-free — the\n * single source of truth for the bucketing rules.\n */\nexport function classifyViewport(\n width: number,\n orientation: DeviceOrientation,\n segments = 1,\n verticalSegments = 1,\n breakpoints: DeviceBreakpoints = DEFAULT_BREAKPOINTS,\n): DeviceClass {\n const size: DeviceSize =\n width >= breakpoints['xl-desktop']\n ? 'xl-desktop'\n : width >= breakpoints.desktop\n ? 'desktop'\n : width >= breakpoints.tablet\n ? 'tablet'\n : width >= breakpoints.mobile\n ? 'mobile'\n : 'xs-mobile';\n const rank = SIZE_ORDER.indexOf(size);\n return {\n size,\n orientation,\n segments,\n verticalSegments,\n handset: rank <= 1,\n compact: rank <= 1 || (size === 'tablet' && orientation === 'portrait'),\n atLeast: (target) => rank >= SIZE_ORDER.indexOf(target),\n };\n}\n\n/** Count viewport segments along one axis, feature-detecting the media query. */\nfunction countSegments(axis: 'horizontal' | 'vertical', view: Window): number {\n const mq = view.matchMedia;\n if (typeof mq !== 'function') return 1;\n for (let n = 4; n >= 2; n--) {\n if (mq.call(view, `(${axis}-viewport-segments: ${n})`).matches) return n;\n }\n return 1;\n}\n\n/** Read the current viewport from a browser window. */\nfunction readViewport(view: Window): Viewport {\n return {\n width: view.innerWidth,\n height: view.innerHeight,\n segments: countSegments('horizontal', view),\n verticalSegments: countSegments('vertical', view),\n };\n}\n\n/** The browser window, or `undefined` when running without a DOM (SSR). */\nfunction browserWindow(): Window | undefined {\n return typeof window === 'undefined' ? undefined : window;\n}\n\nlet sharedSource: ReturnType<typeof signal<Viewport>> | undefined;\n\n/**\n * The shared reactive viewport source. Installed lazily on first read and kept\n * for the life of the page — there is only ever one viewport, so a single\n * listener set backs every `deviceClass()` reader.\n */\nfunction viewportSource(view: Window): ReturnType<typeof signal<Viewport>> {\n if (sharedSource) return sharedSource;\n const source = signal(readViewport(view));\n sharedSource = source;\n const update = (): void => {\n source.value = readViewport(view);\n };\n view.addEventListener('resize', update);\n view.addEventListener('orientationchange', update);\n return source;\n}\n\nfunction orientationOf(view: Viewport): DeviceOrientation {\n return view.height > view.width ? 'portrait' : 'landscape';\n}\n\n/**\n * A reactive signal of the current {@link DeviceClass}. Reading it inside an\n * `effect`/`computed` re-runs when the viewport crosses a breakpoint, rotates,\n * or changes its segment count. Without a DOM it resolves to `options.ssr`\n * (default 1024×768, landscape, one segment).\n */\nexport function deviceClass(\n options: DeviceClassOptions = {},\n): ReadonlySignal<DeviceClass> {\n const breakpoints: DeviceBreakpoints = {\n ...DEFAULT_BREAKPOINTS,\n ...options.breakpoints,\n };\n const view = browserWindow();\n if (!view) {\n const snapshot: Viewport = { ...SSR_VIEWPORT, ...options.ssr };\n return computed(() =>\n classifyViewport(\n snapshot.width,\n orientationOf(snapshot),\n snapshot.segments,\n snapshot.verticalSegments,\n breakpoints,\n ),\n );\n }\n const source = viewportSource(view);\n return computed(() => {\n const v = source.value;\n return classifyViewport(\n v.width,\n orientationOf(v),\n v.segments,\n v.verticalSegments,\n breakpoints,\n );\n });\n}\n"]}
|
package/dist/disclosure-arrow.js
CHANGED
package/dist/empty-state.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ interface EmptyStateProps {
|
|
|
8
8
|
busy?: boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
|
-
declare function EmptyState({ title, detail, icon, action, busy, className }: EmptyStateProps): SafeHtml;
|
|
11
|
+
declare function EmptyState({ title, detail, icon, action, busy, className, }: EmptyStateProps): SafeHtml;
|
|
12
12
|
|
|
13
13
|
export { EmptyState, type EmptyStateProps };
|
package/dist/empty-state.js
CHANGED
|
@@ -23,6 +23,6 @@ interface FloatingToolbarProps {
|
|
|
23
23
|
* top toolbar's own inset); override that token to move it. The app owns the
|
|
24
24
|
* controls and their behavior — wire them with `delegate()` as usual.
|
|
25
25
|
*/
|
|
26
|
-
declare function FloatingToolbar({ children, label, position, className }: FloatingToolbarProps): SafeHtml;
|
|
26
|
+
declare function FloatingToolbar({ children, label, position, className, }: FloatingToolbarProps): SafeHtml;
|
|
27
27
|
|
|
28
28
|
export { FloatingToolbar, type FloatingToolbarPosition, type FloatingToolbarProps };
|
package/dist/floating-toolbar.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -9,16 +9,18 @@ export { ListInsetText, ListInsetTextProps } from './list-inset-text.js';
|
|
|
9
9
|
export { ListItem, ListItemProps } from './list-item.js';
|
|
10
10
|
export { LoadingSpinner, LoadingSpinnerProps } from './loading-spinner.js';
|
|
11
11
|
export { LucideIcon, LucideIconProps, LucideNode } from './lucide-icon.js';
|
|
12
|
+
export { Pane, PaneContentElement, PaneElement, PaneProps, PaneSeparatorSide } from './pane.js';
|
|
12
13
|
export { PanelHeader, PanelHeaderProps } from './panel-header.js';
|
|
13
14
|
export { ResizableRegion, ResizableRegionAxis, ResizableRegionEdge, ResizableRegionProps, clampRegionSize, resizeRegionFromPointer } from './resizable-region.js';
|
|
14
15
|
export { SegmentedControl, SegmentedControlAppearance, SegmentedControlChoice, SegmentedControlLayout, SegmentedControlProps, SegmentedControlShape, SegmentedControlSize } from './segmented-control.js';
|
|
15
16
|
export { Select, SelectChoice, SelectProps } from './select.js';
|
|
16
17
|
export { Skeleton, SkeletonProps } from './skeleton.js';
|
|
17
|
-
export { StateBanner, StateBannerProps, StateBannerTone } from './state-banner.js';
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
18
|
+
export { StateBanner, StateBannerProps, StateBannerTone, StateBannerUrgency } from './state-banner.js';
|
|
19
|
+
export { SunkenPanel, SunkenPanelProps } from './sunken-panel.js';
|
|
20
|
+
export { TabActivation, TabBar, TabBarProps } from './tab-bar.js';
|
|
21
|
+
export { TokenSearchEditorAttributes, TokenSearchField, TokenSearchFieldProps, TokenSearchFieldValue, TokenSearchToken, placeTokenSearchCaret, readTokenSearchField } from './token-search-field.js';
|
|
20
22
|
export { Toolbar, ToolbarProps } from './toolbar.js';
|
|
21
|
-
export { ToolbarControlGroup, ToolbarControlGroupProps } from './toolbar-control-group.js';
|
|
23
|
+
export { ToolbarControlGroup, ToolbarControlGroupAppearance, ToolbarControlGroupButtonAppearance, ToolbarControlGroupProps, ToolbarControlGroupShape, ToolbarControlGroupTone } from './toolbar-control-group.js';
|
|
22
24
|
export { HeadingLevel, ToolbarText, ToolbarTextProps, ToolbarTextSize } from './toolbar-text.js';
|
|
23
25
|
export { ValueTable, ValueTableProps, ValueTableRow, ValueTableRowProps } from './value-table.js';
|
|
24
26
|
export { ResizeCommit, WireResizableRegionsOptions, wireResizableRegions } from './wire-resizable-regions.js';
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
1
|
+
export { wireTokenSearchFields } from './chunk-CN2XNTAM.js';
|
|
2
|
+
export { ValueTable, ValueTableRow } from './chunk-QQFJMRIB.js';
|
|
3
|
+
export { wireResizableRegions } from './chunk-DPDBVKNA.js';
|
|
4
|
+
export { reorderTabs, wireTabBars } from './chunk-AASLYRGE.js';
|
|
5
|
+
export { StateBanner } from './chunk-VLYV65LK.js';
|
|
6
|
+
export { SunkenPanel } from './chunk-W4CXQYSG.js';
|
|
7
|
+
export { TabBar } from './chunk-M7JBER5U.js';
|
|
8
|
+
export { TokenSearchField, placeTokenSearchCaret, readTokenSearchField } from './chunk-7KEUJIIC.js';
|
|
9
|
+
export { PanelHeader } from './chunk-RYRIFZCT.js';
|
|
10
|
+
export { ToolbarText } from './chunk-W7YD6E4N.js';
|
|
11
|
+
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-NENBUYX5.js';
|
|
12
|
+
export { SegmentedControl } from './chunk-OZWU5ZPZ.js';
|
|
13
|
+
export { Select } from './chunk-K57KRAOV.js';
|
|
14
|
+
export { ListActionRow } from './chunk-BBRXX6PF.js';
|
|
15
|
+
export { ListInsetControl } from './chunk-QO55FN2Y.js';
|
|
16
|
+
export { ListInsetText } from './chunk-FEY65TBV.js';
|
|
17
|
+
export { AppTab } from './chunk-PIDTEQ3U.js';
|
|
18
|
+
export { Pane } from './chunk-JRKSK2HX.js';
|
|
19
|
+
export { Toolbar } from './chunk-7L6EHUMV.js';
|
|
20
|
+
export { ToolbarControlGroup } from './chunk-5VTB2BKP.js';
|
|
21
|
+
export { ListHeader } from './chunk-DSNIYOZ3.js';
|
|
22
|
+
export { ListItem } from './chunk-ELSJX4W7.js';
|
|
21
23
|
|
|
22
|
-
export { Skeleton } from './chunk-
|
|
23
|
-
export { DisclosureArrow } from './chunk-
|
|
24
|
+
export { Skeleton } from './chunk-PZQVSDLH.js';
|
|
25
|
+
export { DisclosureArrow } from './chunk-Y6LYKFXY.js';
|
|
24
26
|
export { LucideIcon } from './chunk-W2FK7ZNY.js';
|
|
25
|
-
export { EmptyState } from './chunk-
|
|
26
|
-
export { LoadingSpinner } from './chunk-
|
|
27
|
-
export { FloatingToolbar } from './chunk-
|
|
27
|
+
export { EmptyState } from './chunk-PX3YSS5C.js';
|
|
28
|
+
export { LoadingSpinner } from './chunk-6WTETUZ6.js';
|
|
29
|
+
export { FloatingToolbar } from './chunk-LPOMRC4C.js';
|
|
28
30
|
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -47,6 +47,6 @@ interface ListActionRowProps {
|
|
|
47
47
|
rootAttributes?: ListActionRowRootAttributes;
|
|
48
48
|
trailingActionAttributes?: ListActionRowTrailingAttributes;
|
|
49
49
|
}
|
|
50
|
-
declare function ListActionRow({ label, icon, action, itemId, selected, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, trailingAction, trailingActionLabel, trailingActionIcon, trailingActionDisabled, trailingActionTitle, className, style, rootAttributes, trailingActionAttributes }: ListActionRowProps): SafeHtml;
|
|
50
|
+
declare function ListActionRow({ label, icon, action, itemId, selected, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, trailingAction, trailingActionLabel, trailingActionIcon, trailingActionDisabled, trailingActionTitle, className, style, rootAttributes, trailingActionAttributes, }: ListActionRowProps): SafeHtml;
|
|
51
51
|
|
|
52
52
|
export { ListActionRow, type ListActionRowProps };
|
package/dist/list-action-row.js
CHANGED
package/dist/list-header.d.ts
CHANGED
|
@@ -16,18 +16,39 @@ type ListHeaderTriggerAttributes = Readonly<Record<`data-${string}`, string | un
|
|
|
16
16
|
}>;
|
|
17
17
|
interface ListHeaderBaseProps {
|
|
18
18
|
label: string;
|
|
19
|
-
action?: string;
|
|
20
|
-
actionLabel?: string;
|
|
21
|
-
actionIcon?: SafeHtml;
|
|
22
|
-
actionDisabled?: boolean;
|
|
23
|
-
disabledReason?: string;
|
|
24
|
-
expanded?: boolean;
|
|
25
|
-
toggle?: boolean;
|
|
26
19
|
/** Render as an unanimated loading skeleton: keep the label and action affordance, disable interaction. */
|
|
27
20
|
placeholder?: boolean;
|
|
28
21
|
rootAttributes?: ListHeaderRootAttributes;
|
|
29
22
|
triggerAttributes?: ListHeaderTriggerAttributes;
|
|
30
23
|
}
|
|
24
|
+
type ListHeaderModeProps = {
|
|
25
|
+
/** Render the title as a controlled disclosure trigger. */
|
|
26
|
+
toggle: true;
|
|
27
|
+
action: string;
|
|
28
|
+
expanded: boolean;
|
|
29
|
+
actionIcon?: SafeHtml;
|
|
30
|
+
actionLabel?: never;
|
|
31
|
+
actionDisabled?: boolean;
|
|
32
|
+
disabledReason?: string;
|
|
33
|
+
} | {
|
|
34
|
+
/** Render a separately named trailing action. */
|
|
35
|
+
toggle?: false;
|
|
36
|
+
action: string;
|
|
37
|
+
actionLabel: string;
|
|
38
|
+
actionIcon: SafeHtml;
|
|
39
|
+
expanded?: never;
|
|
40
|
+
actionDisabled?: boolean;
|
|
41
|
+
disabledReason?: string;
|
|
42
|
+
} | {
|
|
43
|
+
/** Render a passive section heading. */
|
|
44
|
+
toggle?: false;
|
|
45
|
+
action?: never;
|
|
46
|
+
actionLabel?: never;
|
|
47
|
+
actionIcon?: never;
|
|
48
|
+
expanded?: never;
|
|
49
|
+
actionDisabled?: never;
|
|
50
|
+
disabledReason?: never;
|
|
51
|
+
};
|
|
31
52
|
type ListHeaderIndicatorProps = {
|
|
32
53
|
count: number;
|
|
33
54
|
countLabel: string;
|
|
@@ -37,7 +58,7 @@ type ListHeaderIndicatorProps = {
|
|
|
37
58
|
countLabel?: never;
|
|
38
59
|
badge?: SafeHtml;
|
|
39
60
|
};
|
|
40
|
-
type ListHeaderProps = ListHeaderBaseProps & ListHeaderIndicatorProps;
|
|
41
|
-
declare function ListHeader({ label, count, countLabel, badge, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes }: ListHeaderProps): SafeHtml;
|
|
61
|
+
type ListHeaderProps = ListHeaderBaseProps & ListHeaderIndicatorProps & ListHeaderModeProps;
|
|
62
|
+
declare function ListHeader({ label, count, countLabel, badge, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes, }: ListHeaderProps): SafeHtml;
|
|
42
63
|
|
|
43
64
|
export { ListHeader, type ListHeaderProps };
|
package/dist/list-header.js
CHANGED
|
@@ -11,6 +11,6 @@ interface ListInsetControlProps {
|
|
|
11
11
|
* Use it for controls that carry their own border and padding but no outer margin
|
|
12
12
|
* — the wrapper adds only the alignment margin and layout, not a second inset.
|
|
13
13
|
*/
|
|
14
|
-
declare function ListInsetControl({ children, className }: ListInsetControlProps): SafeHtml;
|
|
14
|
+
declare function ListInsetControl({ children, className, }: ListInsetControlProps): SafeHtml;
|
|
15
15
|
|
|
16
16
|
export { ListInsetControl, type ListInsetControlProps };
|
|
@@ -20,6 +20,6 @@ interface ListInsetTextProps {
|
|
|
20
20
|
* Pass `horizontalOnly` to keep the horizontal inset but drop the vertical box
|
|
21
21
|
* space for tight text layout.
|
|
22
22
|
*/
|
|
23
|
-
declare function ListInsetText({ children, horizontalOnly, className }: ListInsetTextProps): SafeHtml;
|
|
23
|
+
declare function ListInsetText({ children, horizontalOnly, className, }: ListInsetTextProps): SafeHtml;
|
|
24
24
|
|
|
25
25
|
export { ListInsetText, type ListInsetTextProps };
|
package/dist/list-inset-text.js
CHANGED
package/dist/list-item.d.ts
CHANGED
|
@@ -28,6 +28,6 @@ interface ListItemProps {
|
|
|
28
28
|
placeholder?: boolean;
|
|
29
29
|
rootAttributes?: ListItemRootAttributes;
|
|
30
30
|
}
|
|
31
|
-
declare function ListItem({ label, icon, trailing, selected, action, itemId, className, style, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, rootAttributes }: ListItemProps): SafeHtml;
|
|
31
|
+
declare function ListItem({ label, icon, trailing, selected, action, itemId, className, style, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, rootAttributes, }: ListItemProps): SafeHtml;
|
|
32
32
|
|
|
33
33
|
export { ListItem, type ListItemProps };
|
package/dist/list-item.js
CHANGED
package/dist/loading-spinner.js
CHANGED
package/dist/nav-stack.d.ts
CHANGED
|
@@ -33,6 +33,6 @@ interface NavStackProps {
|
|
|
33
33
|
* cross-fades the chrome across a change. A single-pane layout is a `NavStack`
|
|
34
34
|
* with one entry. See `docs/23-app-layouts.md` §3.1.
|
|
35
35
|
*/
|
|
36
|
-
declare function NavStack({ id, label, views, backLabel, hideToolbar, bottomToolbar, className }: NavStackProps): SafeHtml;
|
|
36
|
+
declare function NavStack({ id, label, views, backLabel, hideToolbar, bottomToolbar, className, }: NavStackProps): SafeHtml;
|
|
37
37
|
|
|
38
38
|
export { NavStack, type NavStackProps, type NavStackView };
|
package/dist/nav-stack.js
CHANGED
package/dist/pane.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { SafeHtml } from 'kerfjs';
|
|
2
|
+
|
|
3
|
+
/** Logical sides that can show a {@link Pane} separator. */
|
|
4
|
+
type PaneSeparatorSide = 'block-start' | 'block-end' | 'inline-start' | 'inline-end';
|
|
5
|
+
/** Semantic root elements supported by {@link Pane}. */
|
|
6
|
+
type PaneElement = 'article' | 'aside' | 'div' | 'main' | 'section';
|
|
7
|
+
/** Semantic elements supported by the scrolling content slot. */
|
|
8
|
+
type PaneContentElement = 'div' | 'main' | 'nav' | 'section';
|
|
9
|
+
type PaneRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
10
|
+
'data-component'?: never;
|
|
11
|
+
'data-separator-block-start'?: never;
|
|
12
|
+
'data-separator-block-end'?: never;
|
|
13
|
+
'data-separator-inline-start'?: never;
|
|
14
|
+
'data-separator-inline-end'?: never;
|
|
15
|
+
}>;
|
|
16
|
+
interface PaneProps {
|
|
17
|
+
/** Optional fixed chrome above the scrolling content, arranged vertically. */
|
|
18
|
+
header?: SafeHtml | readonly SafeHtml[];
|
|
19
|
+
/** The pane's primary vertical, scrolling content stack. */
|
|
20
|
+
children?: SafeHtml | readonly SafeHtml[];
|
|
21
|
+
/** Optional fixed chrome below the scrolling content. */
|
|
22
|
+
footer?: SafeHtml | readonly SafeHtml[];
|
|
23
|
+
/** Root semantics. Defaults to `div`. */
|
|
24
|
+
element?: PaneElement;
|
|
25
|
+
/** Scrolling content semantics. Defaults to `div`. */
|
|
26
|
+
contentElement?: PaneContentElement;
|
|
27
|
+
/** Independent logical-edge separator lines. Defaults to none. */
|
|
28
|
+
separators?: readonly PaneSeparatorSide[];
|
|
29
|
+
id?: string;
|
|
30
|
+
/** Accessible name for a landmark root such as `aside` or `main`. */
|
|
31
|
+
label?: string;
|
|
32
|
+
/** Accessible name for a landmark scrolling slot such as `nav`. */
|
|
33
|
+
contentLabel?: string;
|
|
34
|
+
className?: string;
|
|
35
|
+
headerClassName?: string;
|
|
36
|
+
contentClassName?: string;
|
|
37
|
+
footerClassName?: string;
|
|
38
|
+
/** Safe `data-*` metadata; Pane-owned structural attributes remain protected. */
|
|
39
|
+
rootAttributes?: PaneRootAttributes;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* An unpadded application column with optional fixed header/footer slots and one
|
|
43
|
+
* scrolling vertical content owner. Separator lines are independently opt-in on
|
|
44
|
+
* each logical edge, so the same component works as a sidebar, main area,
|
|
45
|
+
* inspector, or dialog column.
|
|
46
|
+
*/
|
|
47
|
+
declare function Pane({ header, children, footer, element, contentElement, separators, id, label, contentLabel, className, headerClassName, contentClassName, footerClassName, rootAttributes, }: PaneProps): SafeHtml;
|
|
48
|
+
|
|
49
|
+
export { Pane, type PaneContentElement, type PaneElement, type PaneProps, type PaneSeparatorSide };
|