@kerfjs/ui 5.0.0-beta.111 → 5.0.0-beta.112

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.
Files changed (93) hide show
  1. package/README.md +2 -0
  2. package/ai/component-catalog.json +152 -6
  3. package/ai/component-composition.json +111 -1
  4. package/ai/components/README.md +2 -0
  5. package/ai/components/backdrop-image.md +1 -0
  6. package/ai/components/content-item.md +1 -0
  7. package/ai/components/editor-frame.md +80 -0
  8. package/ai/components/summary-row.md +5 -2
  9. package/ai/components/value-preview.md +75 -0
  10. package/ai/public-api-signatures-v1.md +124 -14
  11. package/ai/skill.md +13 -0
  12. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  13. package/dist/backdrop-image.d.ts +3 -0
  14. package/dist/backdrop-image.js +1 -1
  15. package/dist/browser/editor-frame.js +3 -0
  16. package/dist/browser/value-preview.js +3 -0
  17. package/dist/catalog.js +4 -3
  18. package/dist/catalog.js.map +1 -1
  19. package/dist/{chunk-JCCN3U6X.js → chunk-2J7XKAZX.js} +3 -2
  20. package/dist/chunk-2J7XKAZX.js.map +1 -0
  21. package/dist/{chunk-WD6KABEU.js → chunk-3KFMLOTH.js} +3 -2
  22. package/dist/chunk-3KFMLOTH.js.map +1 -0
  23. package/dist/{chunk-ATGAJVZ6.js → chunk-3OP66VXU.js} +64 -4
  24. package/dist/chunk-3OP66VXU.js.map +1 -0
  25. package/dist/{chunk-ZNROKDSZ.js → chunk-3V4OCDTL.js} +2 -8
  26. package/dist/chunk-3V4OCDTL.js.map +1 -0
  27. package/dist/{chunk-3GLYIIFR.js → chunk-3WWX2O4G.js} +3 -2
  28. package/dist/chunk-3WWX2O4G.js.map +1 -0
  29. package/dist/{chunk-SOBRGH7T.js → chunk-5CLMV5YU.js} +5 -2
  30. package/dist/chunk-5CLMV5YU.js.map +1 -0
  31. package/dist/chunk-F653O57X.js +41 -0
  32. package/dist/chunk-F653O57X.js.map +1 -0
  33. package/dist/{chunk-4UB5Z3ZZ.js → chunk-K67XBCHG.js} +8 -4
  34. package/dist/chunk-K67XBCHG.js.map +1 -0
  35. package/dist/chunk-OK7FUK7U.js +9 -0
  36. package/dist/chunk-OK7FUK7U.js.map +1 -0
  37. package/dist/{chunk-VGECEXM6.js → chunk-S3DCRI2M.js} +21 -4
  38. package/dist/chunk-S3DCRI2M.js.map +1 -0
  39. package/dist/chunk-V6N3YLTM.js +56 -0
  40. package/dist/chunk-V6N3YLTM.js.map +1 -0
  41. package/dist/content-item.d.ts +2 -0
  42. package/dist/content-item.js +1 -1
  43. package/dist/editor-frame.d.ts +41 -0
  44. package/dist/editor-frame.js +3 -0
  45. package/dist/editor-frame.js.map +1 -0
  46. package/dist/index.d.ts +2 -0
  47. package/dist/index.js +24 -21
  48. package/dist/list-action-row.js +2 -1
  49. package/dist/list-detail-dialog.js +2 -2
  50. package/dist/list-item.js +2 -1
  51. package/dist/styles/backdrop-image.css +6 -0
  52. package/dist/styles/components/actions/popup-menu/popup-menu.css +1 -1
  53. package/dist/styles/components/collections/summary-row/summary-row.css +7 -3
  54. package/dist/styles/components/data-display/value-preview/value-preview.css +18 -0
  55. package/dist/styles/components/surfaces/backdrop-image/backdrop-image.css +6 -0
  56. package/dist/styles/components/surfaces/editor-frame/editor-frame.css +121 -0
  57. package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +16 -0
  58. package/dist/styles/editor-frame.css +121 -0
  59. package/dist/styles/foundation.css +5 -0
  60. package/dist/styles/popup-menu.css +1 -1
  61. package/dist/styles/styles.css +2 -0
  62. package/dist/styles/summary-row.css +7 -3
  63. package/dist/styles/surface-scaffold.css +16 -0
  64. package/dist/styles/value-preview.css +18 -0
  65. package/dist/summary-row.d.ts +20 -11
  66. package/dist/summary-row.js +2 -1
  67. package/dist/surface-scaffold-register.js +1 -1
  68. package/dist/surface-scaffold.d.ts +26 -2
  69. package/dist/surface-scaffold.js +2 -2
  70. package/dist/value-preview.d.ts +21 -0
  71. package/dist/value-preview.js +3 -0
  72. package/dist/value-preview.js.map +1 -0
  73. package/dist/wire-catalog.js +1 -1
  74. package/dist/wire-content-items.js +34 -8
  75. package/dist/wire-content-items.js.map +1 -1
  76. package/dist/workbench-dialog.js +2 -2
  77. package/docs/component-contract.md +28 -5
  78. package/docs/component-selection.md +15 -0
  79. package/docs/editor-frame.md +47 -0
  80. package/docs/investigations/content-item-media-scroll-performance.md +26 -0
  81. package/docs/layout.md +10 -1
  82. package/docs/surface-scaffold.md +46 -0
  83. package/docs/value-preview.md +16 -0
  84. package/llms.txt +7 -1
  85. package/package.json +13 -1
  86. package/dist/chunk-3GLYIIFR.js.map +0 -1
  87. package/dist/chunk-4UB5Z3ZZ.js.map +0 -1
  88. package/dist/chunk-ATGAJVZ6.js.map +0 -1
  89. package/dist/chunk-JCCN3U6X.js.map +0 -1
  90. package/dist/chunk-SOBRGH7T.js.map +0 -1
  91. package/dist/chunk-VGECEXM6.js.map +0 -1
  92. package/dist/chunk-WD6KABEU.js.map +0 -1
  93. package/dist/chunk-ZNROKDSZ.js.map +0 -1
@@ -20,7 +20,11 @@ var DIALOG_SURFACE_PROTECTED = /* @__PURE__ */ new Set([
20
20
  "data-resizable",
21
21
  "data-enter-motion",
22
22
  "data-exit-motion",
23
- "data-light-dismiss"
23
+ "data-light-dismiss",
24
+ "data-stack-open",
25
+ "data-stack-active",
26
+ "data-stack-position",
27
+ "data-stack-count"
24
28
  ]);
25
29
  function DialogSurface({
26
30
  id,
@@ -36,6 +40,7 @@ function DialogSurface({
36
40
  closeLabel = "Close",
37
41
  closeEmphasis = "normal",
38
42
  children,
43
+ stack,
39
44
  size = "medium",
40
45
  presentation = "modal",
41
46
  preferredWidth,
@@ -56,13 +61,18 @@ function DialogSurface({
56
61
  className = "",
57
62
  slot
58
63
  }) {
64
+ if (stack && (!Number.isInteger(stack.position) || !Number.isInteger(stack.count) || stack.count < 1 || stack.position < 1 || stack.position > stack.count || stack.active && !stack.open))
65
+ throw new RangeError(
66
+ "DialogSurface stack needs a valid frontmost active layer"
67
+ );
59
68
  const style = [
60
69
  preferredWidth === void 0 ? "" : `--_kui-dialog-surface-preferred-width:${preferredWidth}`,
61
70
  viewportGutter === void 0 ? "" : `--_kui-dialog-surface-gutter:${viewportGutter}`,
62
71
  maxHeight === void 0 || maxHeight === "viewport" ? "" : `--_kui-dialog-surface-max-height:${maxHeight}`,
63
72
  height === void 0 || height === "viewport" ? "" : `--_kui-dialog-surface-height:${height}`,
64
73
  footerOffset === void 0 ? "" : `--_kui-dialog-surface-footer-offset:${footerOffset}`,
65
- minHeight === void 0 ? "" : `--_kui-dialog-surface-min-height:${minHeight}`
74
+ minHeight === void 0 ? "" : `--_kui-dialog-surface-min-height:${minHeight}`,
75
+ stack?.offset === void 0 ? "" : `--_kui-dialog-surface-stack-offset:${stack.offset}`
66
76
  ].filter(Boolean).join(";");
67
77
  return /* @__PURE__ */ jsxs(
68
78
  "dialog",
@@ -74,15 +84,22 @@ function DialogSurface({
74
84
  "aria-label": label,
75
85
  "aria-labelledby": labelledBy,
76
86
  "aria-describedby": describedBy,
87
+ "aria-modal": stack ? stack.open && stack.active ? "true" : "false" : void 0,
88
+ "aria-hidden": stack ? stack.open && stack.active ? "false" : "true" : void 0,
89
+ inert: stack && (!stack.open || !stack.active) ? true : void 0,
77
90
  tabindex: -1,
78
91
  "data-light-dismiss": lightDismiss ? "" : void 0,
79
92
  "data-component": "dialog-surface",
93
+ "data-stack-open": stack ? String(stack.open) : void 0,
94
+ "data-stack-active": stack ? String(stack.active) : void 0,
95
+ "data-stack-position": stack?.position,
96
+ "data-stack-count": stack?.count,
80
97
  "data-size": size,
81
98
  "data-presentation": presentation,
82
99
  "data-preferred-width": preferredWidth === void 0 ? void 0 : "",
83
100
  "data-body-inset": bodyInset,
84
101
  "data-footer-inset": footerInset,
85
- "data-viewport-gutter": viewportGutter === void 0 ? void 0 : "",
102
+ "data-viewport-gutter": viewportGutter === void 0 && !stack ? void 0 : "",
86
103
  "data-max-height": maxHeight === void 0 ? void 0 : "",
87
104
  "data-height": height === void 0 ? void 0 : "",
88
105
  "data-body-layout": bodyLayout === "flow" ? void 0 : bodyLayout,
@@ -210,4 +227,4 @@ function PopupSurface({
210
227
 
211
228
  export { DialogSurface, PopoverDialogSurface, PopupSurface };
212
229
 
213
- //# sourceMappingURL=chunk-VGECEXM6.js.map
230
+ //# sourceMappingURL=chunk-S3DCRI2M.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/surfaces/surface-scaffold/surface-scaffold.tsx"],"names":[],"mappings":";;;;;AAoEA,IAAM,wBAAA,uBAA+B,GAAA,CAAI;AAAA,EACvC,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,mBAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,0BAAA;AAAA,EACA,0BAAA;AAAA,EACA,iBAAA;AAAA,EACA,gBAAA;AAAA,EACA,mBAAA;AAAA,EACA,kBAAA;AAAA,EACA,oBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,qBAAA;AAAA,EACA;AACF,CAAC,CAAA;AAiKM,SAAS,aAAA,CAAc;AAAA,EAC5B,EAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA,GAAQ,KAAA;AAAA,EACR,OAAA;AAAA,EACA,aAAA;AAAA,EACA,MAAA;AAAA,EACA,aAAA,GAAgB,KAAA;AAAA,EAChB,YAAA,GAAe,KAAA;AAAA,EACf,UAAA,GAAa,OAAA;AAAA,EACb,aAAA,GAAgB,QAAA;AAAA,EAChB,QAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA,GAAO,QAAA;AAAA,EACP,YAAA,GAAe,OAAA;AAAA,EACf,cAAA;AAAA,EACA,SAAA,GAAY,SAAA;AAAA,EACZ,WAAA,GAAc,aAAA;AA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AAAA,MACX,aAAA,EAAa,MAAA,KAAW,MAAA,GAAY,MAAA,GAAY,EAAA;AAAA,MAChD,iBAAA,EAAiB,SAAA,KAAc,MAAA,GAAY,MAAA,GAAY,EAAA;AAAA,MACvD,kBAAA,EAAkB,UAAA,KAAe,MAAA,GAAS,MAAA,GAAY,UAAA;AAAA,MACtD,OAAA,EAAS,YAAA,KAAiB,SAAA,GAAY,MAAA,GAAS,MAAA;AAAA,MAC/C,IAAA,EAAK,QAAA;AAAA,MACL,YAAA,EAAY,KAAA;AAAA,MACZ,iBAAA,EAAiB,UAAA;AAAA,MACjB,kBAAA,EAAkB,WAAA;AAAA,MAClB,OAAO,KAAA,IAAS,MAAA;AAAA,MAChB,IAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ;AAaO,SAAS,YAAA,CAAa;AAAA,EAC3B,QAAA;AAAA,EACA,KAAA,GAAQ,UAAA;AAAA,EACR,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAAsB;AACpB,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,kBAAA,EAAqB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC7C,gBAAA,EAAe,eAAA;AAAA,MACf,YAAA,EAAY,KAAA;AAAA,MACZ,IAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"chunk-S3DCRI2M.js","sourcesContent":["import { X } from 'lucide';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { CssLength } from '../../../shared/styles/css-values.js';\nimport { LucideIcon } from '../../media/lucide-icon/lucide-icon.js';\n\nexport {\n closeDialog,\n type DialogCloseSource,\n type DialogRequestCloseDetail,\n openDialog,\n syncDialogStack,\n wireDialogStack,\n} from './internal/dialog-surface-controller.js';\n\nexport type DialogSurfaceSize = 'small' | 'medium' | 'large';\n/**\n * How the dialog is presented: `modal` (default) centered on the screen,\n * `side-sheet` against the inline end, `fullscreen`, or `bottom-sheet`\n * attached to the bottom edge (square bottom corners, safe-area and\n * virtual-keyboard clearance, optionally user-resizable).\n */\nexport type DialogSurfacePresentation =\n 'modal' | 'side-sheet' | 'fullscreen' | 'bottom-sheet';\n/**\n * How a bottom sheet appears or leaves: `slide` (default) moves the panel in\n * from, or out to, the bottom edge; `standard` keeps the dialog's\n * scale-and-fade. Both honor `prefers-reduced-motion`.\n */\nexport type DialogSurfaceSheetMotion = 'slide' | 'standard';\nexport type SurfaceInset = 'none' | 'compact' | 'comfortable';\nexport type DialogSurfaceMaxHeight = CssLength | 'viewport';\n/** A definite modal height: a length or the full viewport, minus both gutters. */\nexport type DialogSurfaceHeight = CssLength | 'viewport';\n/**\n * How the dialog body lays out its children: `flow` (default) scrolls ordinary\n * content in the body; `fill` gives one child the body's whole height and\n * lets it own scrolling (a SplitView, a Pane, an editor); `fill-last` stacks\n * the leading children at their natural height and gives the last child the\n * remaining height to own its scrolling (a heading and notices above a\n * scrolling transcript).\n */\nexport type DialogSurfaceBodyLayout = 'flow' | 'fill' | 'fill-last';\n/**\n * Where the dialog footer sits: `docked` (default) below the body, or\n * `floating` over the body's block end, inset from the panel's inline and\n * block-end edges on a transparent background (a chat composer).\n */\nexport type DialogSurfaceFooterPresentation = 'docked' | 'floating';\n/**\n * Where the dialog header sits: `docked` (default) above the body, or\n * `floating` over the body's block-start edge on the translucent chrome\n * material, so content scrolls visibly beneath the title bar.\n */\nexport type DialogSurfaceHeaderPresentation = 'docked' | 'floating';\n\n/** The built-in close control's visual weight; `normal` keeps the default. */\nexport type DialogSurfaceCloseEmphasis = 'normal' | 'quiet';\n\n/**\n * Application `data-*` identity on the DialogSurface root, such as\n * `data-key`; the surface's own configuration attributes stay protected.\n */\nexport type DialogSurfaceRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined>\n>;\n\nconst DIALOG_SURFACE_PROTECTED = new Set([\n 'data-component',\n 'data-size',\n 'data-presentation',\n 'data-preferred-width',\n 'data-body-inset',\n 'data-footer-inset',\n 'data-viewport-gutter',\n 'data-max-height',\n 'data-height',\n 'data-body-layout',\n 'data-footer-presentation',\n 'data-header-presentation',\n 'data-min-height',\n 'data-resizable',\n 'data-enter-motion',\n 'data-exit-motion',\n 'data-light-dismiss',\n 'data-stack-open',\n 'data-stack-active',\n 'data-stack-position',\n 'data-stack-count',\n]);\n\n/**\n * The dialog's accessible name: its `label` text (also the default title), or\n * the id of an element that names it, such as a `heading` ToolbarText.\n */\nexport type DialogSurfaceName =\n { label: string; labelledBy?: never } | { label?: never; labelledBy: string };\n\nexport type DialogSurfaceProps = DialogSurfaceName & DialogSurfaceOptions;\n\n/** Controlled state of one native modal layer inside a `wireDialogStack` root. */\nexport interface DialogSurfaceStack {\n /** Whether this layer belongs in the native top layer. */\n open: boolean;\n /** The one frontmost open layer; it owns modal focus and accessibility. */\n active: boolean;\n /** One-based order from the back to the front. */\n position: number;\n /** Number of layers in the stack, including closed layers still rendered. */\n count: number;\n /** Optional vertical offset for an inactive layer; omitted on phones. */\n offset?: CssLength;\n}\n\nexport interface DialogSurfaceOptions {\n /** The dialog's id, for `openDialog(document.getElementById(id))`. */\n id?: string;\n /**\n * Id of the element whose text is the dialog's accessible description,\n * such as the `heading` ToolbarText's `descriptionId` or app-owned summary\n * copy in the body; rendered as `aria-describedby` on the `<dialog>`.\n */\n describedBy?: string;\n /**\n * An alert dialog: a confirmation that interrupts the person to report\n * something urgent or ask before a destructive action (\"Delete this\n * topic?\"). Renders `role=\"alertdialog\"` on the `<dialog>`; set\n * `describedBy` to the element holding the message, and leave\n * `lightDismiss` off so the person answers it.\n */\n alert?: boolean;\n /** The body content. */\n children: KerfUiContent;\n /** Controlled modal stack state; call `wireDialogStack` on the containing root. */\n stack?: DialogSurfaceStack;\n /**\n * Header title content in place of the `label` text, such as an xl\n * `ToolbarText` with a description. The dialog keeps its `label` (or\n * `labelledBy`) name.\n */\n heading?: KerfUiContent;\n /** Controls before the close button in the header. */\n headerActions?: KerfUiContent;\n /** The footer, below the body (or floating over it); usually its buttons. */\n footer?: KerfUiContent;\n /**\n * Render no header: no title and no close button. The content then owns its\n * heading and a way to close (an element with `data-dialog-close`).\n */\n withoutHeader?: boolean;\n /** Close on a press on the backdrop; otherwise the panel pulses. */\n lightDismiss?: boolean;\n /** The close button's accessible name (default `Close`). */\n closeLabel?: string;\n /** Soften the built-in close control without changing its 40px target. */\n closeEmphasis?: DialogSurfaceCloseEmphasis;\n size?: DialogSurfaceSize;\n presentation?: DialogSurfacePresentation;\n /** Modal preferred width. Takes precedence over size, within the viewport cap. */\n preferredWidth?: CssLength;\n bodyInset?: SurfaceInset;\n footerInset?: SurfaceInset;\n /** Modal edge clearance. Omit to retain Web Awesome's default viewport cap. */\n viewportGutter?: CssLength;\n /**\n * Modal height cap, bounded by the dynamic viewport minus both gutters. On a\n * bottom sheet, the cap (and the resize ceiling), bounded by the dynamic\n * viewport minus the top safe area and one gutter.\n */\n maxHeight?: DialogSurfaceMaxHeight;\n /**\n * Modal definite height, bounded the same way, so a filling child has a\n * height to fill. Takes precedence over `maxHeight`. On a bottom sheet, the\n * height it opens at (the visible height above the safe area or keyboard).\n */\n height?: DialogSurfaceHeight;\n /**\n * A resizable bottom sheet's resize floor (default 160px), the visible\n * height above the safe area or keyboard.\n */\n minHeight?: CssLength;\n /**\n * Let the person resize a bottom sheet by its top grabber (drag, or the\n * arrow, Page Up/Down, Home and End keys) between `minHeight` and the\n * sheet's cap. Needs the `/register` entry; each opening starts at `height`\n * (or the content height). Ignored by other presentations.\n */\n resizable?: boolean;\n /** How a bottom sheet appears (default `slide` up from the bottom edge). */\n enterMotion?: DialogSurfaceSheetMotion;\n /** How a bottom sheet is dismissed (default `slide` down off the bottom edge). */\n exitMotion?: DialogSurfaceSheetMotion;\n /**\n * Body layout (default `flow`); `fill` lets one child own the body and\n * `fill-last` stacks fixed rows above one filling last child.\n */\n bodyLayout?: DialogSurfaceBodyLayout;\n /**\n * Header placement (default `docked`); `floating` lays the dialog's header\n * (its title and close control) over the body's block-start edge on the\n * translucent chrome material (`--kui-chrome-material-raised`, opaque under\n * `prefers-reduced-transparency`, increased contrast, forced colors, or\n * without `backdrop-filter`). The `/register` entry measures the header;\n * the body reserves that height before its own inset, so its first content\n * rests below the title bar. A `fill`/`fill-last` child that is the body's\n * only child and opts into block-start `scrollClearance` (a `List` or\n * `Pane`) takes the clearance inside its own scroll area instead, published\n * as `--kui-scroll-clearance-block-start`, so its content scrolls visibly\n * beneath the header. Unmeasured (without the register), the header stays\n * docked. Keep header text in the normal text color: quiet text can fall\n * below AA over the content passing beneath it.\n */\n headerPresentation?: DialogSurfaceHeaderPresentation;\n /**\n * Footer placement (default `docked`); `floating` lays the footer over the\n * body's block end. The body reserves the footer's measured height so its\n * last content is never hidden beneath it. A `fill`/`fill-last` child that\n * opts into block-end `scrollClearance` (a `List` or `Pane`) takes that\n * clearance inside its own scroll area instead, published as\n * `--kui-scroll-clearance-block-end`, so its content scrolls visibly beneath\n * the transparent footer.\n */\n footerPresentation?: DialogSurfaceFooterPresentation;\n /**\n * A floating footer's clearance from the panel's inline and block-end edges\n * (default the 16px container inset). Choose a phone value such as\n * `remify(8)` from `deviceClass()`; the scaffold adds no breakpoint.\n */\n footerOffset?: CssLength;\n /**\n * Safe `data-*` identity on the root. Give sibling dialogs distinct\n * `data-key`s so a re-render morphs each surface into itself instead of\n * reusing one dialog's element for another (structurally identical roots\n * are otherwise matched by position).\n */\n rootAttributes?: DialogSurfaceRootAttributes;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A modal dialog: a native `<dialog>` with Kerf's header, body, and footer\n * chrome, sized and presented by its props. Render it closed, then open it\n * with `openDialog()` and close it with `closeDialog()`, the close button, an\n * element with `data-dialog-close`, Escape, or (with `lightDismiss`) a press\n * on the backdrop. Import `@kerfjs/ui/surface-scaffold/register` for the\n * floating header and footer measurement, the bottom sheet's keyboard\n * clearance and grabber, and re-render resilience while open.\n */\nexport function DialogSurface({\n id,\n label,\n labelledBy,\n describedBy,\n alert = false,\n heading,\n headerActions,\n footer,\n withoutHeader = false,\n lightDismiss = false,\n closeLabel = 'Close',\n closeEmphasis = 'normal',\n children,\n stack,\n size = 'medium',\n presentation = 'modal',\n preferredWidth,\n bodyInset = 'compact',\n footerInset = 'comfortable',\n viewportGutter,\n maxHeight,\n height,\n minHeight,\n resizable = false,\n enterMotion = 'slide',\n exitMotion = 'slide',\n bodyLayout = 'flow',\n headerPresentation = 'docked',\n footerPresentation = 'docked',\n footerOffset,\n rootAttributes = {},\n className = '',\n slot,\n}: DialogSurfaceProps) {\n if (\n stack &&\n (!Number.isInteger(stack.position) ||\n !Number.isInteger(stack.count) ||\n stack.count < 1 ||\n stack.position < 1 ||\n stack.position > stack.count ||\n (stack.active && !stack.open))\n )\n throw new RangeError(\n 'DialogSurface stack needs a valid frontmost active layer',\n );\n const style = [\n preferredWidth === undefined\n ? ''\n : `--_kui-dialog-surface-preferred-width:${preferredWidth}`,\n viewportGutter === undefined\n ? ''\n : `--_kui-dialog-surface-gutter:${viewportGutter}`,\n maxHeight === undefined || maxHeight === 'viewport'\n ? ''\n : `--_kui-dialog-surface-max-height:${maxHeight}`,\n height === undefined || height === 'viewport'\n ? ''\n : `--_kui-dialog-surface-height:${height}`,\n footerOffset === undefined\n ? ''\n : `--_kui-dialog-surface-footer-offset:${footerOffset}`,\n minHeight === undefined\n ? ''\n : `--_kui-dialog-surface-min-height:${minHeight}`,\n stack?.offset === undefined\n ? ''\n : `--_kui-dialog-surface-stack-offset:${stack.offset}`,\n ]\n .filter(Boolean)\n .join(';');\n return (\n <dialog\n {...filterDataAttributes(rootAttributes, DIALOG_SURFACE_PROTECTED)}\n id={id}\n class={`kui-dialog-surface ${className}`.trim()}\n role={alert ? 'alertdialog' : undefined}\n aria-label={label}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n aria-modal={\n stack ? (stack.open && stack.active ? 'true' : 'false') : undefined\n }\n aria-hidden={\n stack ? (stack.open && stack.active ? 'false' : 'true') : undefined\n }\n inert={stack && (!stack.open || !stack.active) ? true : undefined}\n tabindex={-1}\n data-light-dismiss={lightDismiss ? '' : undefined}\n data-component=\"dialog-surface\"\n data-stack-open={stack ? String(stack.open) : undefined}\n data-stack-active={stack ? String(stack.active) : undefined}\n data-stack-position={stack?.position}\n data-stack-count={stack?.count}\n data-size={size}\n data-presentation={presentation}\n data-preferred-width={preferredWidth === undefined ? undefined : ''}\n data-body-inset={bodyInset}\n data-footer-inset={footerInset}\n data-viewport-gutter={\n viewportGutter === undefined && !stack ? undefined : ''\n }\n data-max-height={maxHeight === undefined ? undefined : ''}\n data-height={height === undefined ? undefined : ''}\n data-body-layout={bodyLayout === 'flow' ? undefined : bodyLayout}\n data-header-presentation={\n headerPresentation === 'floating' ? 'floating' : undefined\n }\n data-footer-presentation={\n footerPresentation === 'floating' ? 'floating' : undefined\n }\n data-min-height={minHeight === undefined ? undefined : ''}\n data-resizable={resizable ? '' : undefined}\n data-enter-motion={enterMotion === 'slide' ? undefined : enterMotion}\n data-exit-motion={exitMotion === 'slide' ? undefined : exitMotion}\n style={style || undefined}\n slot={slot}\n >\n {withoutHeader ? null : (\n <header class=\"kui-dialog-surface__header\">\n {heading === undefined ? (\n <h2 class=\"kui-dialog-surface__title\">{label}</h2>\n ) : (\n <div class=\"kui-dialog-surface__title\">{heading}</div>\n )}\n <div class=\"kui-dialog-surface__header-actions\">\n {headerActions}\n <button\n type=\"button\"\n class=\"kui-dialog-surface__close\"\n aria-label={closeLabel}\n data-emphasis={closeEmphasis === 'quiet' ? 'quiet' : undefined}\n data-dialog-close=\"\"\n >\n <LucideIcon\n icon={X}\n name=\"x\"\n size={closeEmphasis === 'quiet' ? 'm' : 'l'}\n />\n </button>\n </div>\n </header>\n )}\n {presentation === 'bottom-sheet' && resizable ? (\n <div\n class=\"kui-dialog-surface__sheet-handle\"\n role=\"separator\"\n aria-orientation=\"horizontal\"\n aria-label=\"Resize sheet\"\n tabindex={0}\n />\n ) : null}\n <div class=\"kui-dialog-surface__body\">{children}</div>\n {footer === undefined ? null : (\n <footer class=\"kui-dialog-surface__footer\">{footer}</footer>\n )}\n {/* Where kerfjs/overlay hosts a popover or tooltip opened inside the\n modal dialog, so it stays interactive above the inert page. */}\n <div data-kerf-overlay-host data-morph-skip style=\"display:contents\" />\n </dialog>\n );\n}\n\n/** Where a PopoverDialogSurface appears: the top layer, or in flow. */\nexport type PopoverDialogSurfacePresentation = 'overlay' | 'embedded';\n\n/** Application `data-*` metadata on the surface root. */\nexport type PopoverDialogSurfaceDataAttributes = Readonly<\n Record<`data-${string}`, string>\n>;\n\ntype PopoverDialogSurfaceName =\n { label: string; labelledBy?: never } | { label?: never; labelledBy: string };\n\nexport type PopoverDialogSurfaceProps = PopoverDialogSurfaceName & {\n /** The root id: what an opening control's `popovertarget` names. */\n id?: string;\n /**\n * Id of the element whose text is the dialog's accessible description,\n * such as a title `ToolbarText`'s `descriptionId`; rendered as\n * `aria-describedby` on the `role=\"dialog\"` root.\n */\n describedBy?: string;\n children: KerfUiContent;\n /**\n * `overlay` (default) is a native `popover=\"auto\"` in the top layer:\n * non-modal, light dismiss (Escape or a press outside), nothing inert.\n * `embedded` renders the same surface in flow for a catalog or inline use.\n */\n presentation?: PopoverDialogSurfacePresentation;\n /** Preferred width preset: 400px, 560px (default), or 800px. */\n size?: DialogSurfaceSize;\n /** Preferred width; takes precedence over `size`, within the viewport cap. */\n preferredWidth?: CssLength;\n /** Definite height, bounded by the dynamic viewport minus both gutters. */\n height?: DialogSurfaceHeight;\n /** Height cap, bounded the same way, for a surface that sizes to content. */\n maxHeight?: DialogSurfaceMaxHeight;\n /** Edge clearance on each side of the viewport (default 16px). */\n viewportGutter?: CssLength;\n /**\n * Body layout (default `flow`); `fill` lets one child own the surface and\n * `fill-last` stacks fixed rows above one filling last child.\n */\n bodyLayout?: DialogSurfaceBodyLayout;\n rootAttributes?: PopoverDialogSurfaceDataAttributes;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n};\n\nconst POPOVER_DIALOG_PROTECTED = new Set([\n 'data-component',\n 'data-presentation',\n 'data-size',\n 'data-height',\n 'data-max-height',\n 'data-body-layout',\n]);\n\n/**\n * A non-modal dialog surface on the native Popover API: Kerf's dialog chrome,\n * viewport-bounded size, and single-child fill without application CSS.\n * Open it with a `popovertarget` control or `showPopover()`; it light\n * dismisses and leaves the page interactive. Use `DialogSurface` when the\n * task must block the page.\n */\nexport function PopoverDialogSurface({\n id,\n children,\n label,\n labelledBy,\n describedBy,\n presentation = 'overlay',\n size = 'medium',\n preferredWidth,\n height,\n maxHeight,\n viewportGutter,\n bodyLayout = 'flow',\n rootAttributes = {},\n className = '',\n slot,\n}: PopoverDialogSurfaceProps) {\n const style = [\n preferredWidth === undefined\n ? ''\n : `--_kui-popover-dialog-surface-preferred-width:${preferredWidth}`,\n viewportGutter === undefined\n ? ''\n : `--_kui-popover-dialog-surface-gutter:${viewportGutter}`,\n height === undefined || height === 'viewport'\n ? ''\n : `--_kui-popover-dialog-surface-height:${height}`,\n maxHeight === undefined || maxHeight === 'viewport'\n ? ''\n : `--_kui-popover-dialog-surface-max-height:${maxHeight}`,\n ]\n .filter(Boolean)\n .join(';');\n return (\n <section\n {...filterDataAttributes(rootAttributes, POPOVER_DIALOG_PROTECTED)}\n id={id}\n class={`kui-popover-dialog-surface ${className}`.trim()}\n data-component=\"popover-dialog-surface\"\n data-presentation={presentation}\n data-size={size}\n data-height={height === undefined ? undefined : ''}\n data-max-height={maxHeight === undefined ? undefined : ''}\n data-body-layout={bodyLayout === 'flow' ? undefined : bodyLayout}\n popover={presentation === 'overlay' ? 'auto' : undefined}\n role=\"dialog\"\n aria-label={label}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n style={style || undefined}\n slot={slot}\n >\n {children}\n </section>\n );\n}\n\nexport type PopupSurfaceInset = 'standard' | 'compact' | 'list-zero';\n\nexport interface PopupSurfaceProps {\n children: KerfUiContent;\n inset?: PopupSurfaceInset;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** Configure recurring Web Awesome dropdown-menu geometry without consumer ::part() CSS. */\nexport function PopupSurface({\n children,\n inset = 'standard',\n className = '',\n slot,\n}: PopupSurfaceProps) {\n return (\n <span\n class={`kui-popup-surface ${className}`.trim()}\n data-component=\"popup-surface\"\n data-inset={inset}\n slot={slot}\n >\n {children}\n </span>\n );\n}\n"]}
@@ -0,0 +1,56 @@
1
+ import { jsxs, jsx } from 'kerfjs/jsx-runtime';
2
+
3
+ // src/components/surfaces/editor-frame/editor-frame.tsx
4
+ var unsafeStyleValue = /[;{}<>"'\\]|\p{Cc}/u;
5
+ function styleValue(value, prop) {
6
+ const trimmed = value.trim();
7
+ if (!trimmed || unsafeStyleValue.test(trimmed))
8
+ throw new TypeError(`EditorFrame ${prop} requires one CSS length.`);
9
+ return trimmed;
10
+ }
11
+ function EditorFrame({
12
+ toolbar,
13
+ children,
14
+ mode,
15
+ appearance = "framed",
16
+ inset = "padded",
17
+ expanded = false,
18
+ height,
19
+ maxWidth,
20
+ sourceHeight,
21
+ sourceAutosize = false,
22
+ label,
23
+ rootAttributes = {},
24
+ slot
25
+ }) {
26
+ const style = [
27
+ height === void 0 ? "" : `--_kui-editor-frame-height:${styleValue(height, "height")}`,
28
+ maxWidth === void 0 ? "" : `--_kui-editor-frame-max-width:${styleValue(maxWidth, "maxWidth")}`,
29
+ sourceHeight === void 0 ? "" : `--_kui-editor-frame-source-height:${styleValue(sourceHeight, "sourceHeight")}`
30
+ ].filter(Boolean).join(";");
31
+ return /* @__PURE__ */ jsxs(
32
+ "section",
33
+ {
34
+ ...rootAttributes,
35
+ class: "kui-editor-frame",
36
+ "data-component": "editor-frame",
37
+ "data-mode": mode,
38
+ "data-appearance": appearance,
39
+ "data-inset": inset,
40
+ "data-expanded": String(expanded),
41
+ "data-source-autosize": String(sourceAutosize),
42
+ role: label ? "region" : void 0,
43
+ "aria-label": label,
44
+ style: style || void 0,
45
+ slot,
46
+ children: [
47
+ toolbar === void 0 ? null : /* @__PURE__ */ jsx("div", { class: "kui-editor-frame__toolbar", children: toolbar }),
48
+ /* @__PURE__ */ jsx("div", { class: "kui-editor-frame__surface", children })
49
+ ]
50
+ }
51
+ );
52
+ }
53
+
54
+ export { EditorFrame };
55
+
56
+ //# sourceMappingURL=chunk-V6N3YLTM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/surfaces/editor-frame/editor-frame.tsx"],"names":[],"mappings":";;;AAGA,IAAM,gBAAA,GAAmB,qBAAA;AAEzB,SAAS,UAAA,CAAW,OAAkB,IAAA,EAAsB;AAC1D,EAAA,MAAM,OAAA,GAAU,MAAM,IAAA,EAAK;AAC3B,EAAA,IAAI,CAAC,OAAA,IAAW,gBAAA,CAAiB,IAAA,CAAK,OAAO,CAAA;AAC3C,IAAA,MAAM,IAAI,SAAA,CAAU,CAAA,YAAA,EAAe,IAAI,CAAA,yBAAA,CAA2B,CAAA;AACpE,EAAA,OAAO,OAAA;AACT;AAsCO,SAAS,WAAA,CAAY;AAAA,EAC1B,OAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA,GAAa,QAAA;AAAA,EACb,KAAA,GAAQ,QAAA;AAAA,EACR,QAAA,GAAW,KAAA;AAAA,EACX,MAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA,GAAiB,KAAA;AAAA,EACjB,KAAA;AAAA,EACA,iBAAiB,EAAC;AAAA,EAClB;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,WAAW,MAAA,GACP,EAAA,GACA,8BAA8B,UAAA,CAAW,MAAA,EAAQ,QAAQ,CAAC,CAAA,CAAA;AAAA,IAC9D,aAAa,MAAA,GACT,EAAA,GACA,iCAAiC,UAAA,CAAW,QAAA,EAAU,UAAU,CAAC,CAAA,CAAA;AAAA,IACrE,iBAAiB,MAAA,GACb,EAAA,GACA,qCAAqC,UAAA,CAAW,YAAA,EAAc,cAAc,CAAC,CAAA;AAAA,GACnF,CACG,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AACX,EAAA,uBACE,IAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACE,GAAG,cAAA;AAAA,MACJ,KAAA,EAAM,kBAAA;AAAA,MACN,gBAAA,EAAe,cAAA;AAAA,MACf,WAAA,EAAW,IAAA;AAAA,MACX,iBAAA,EAAiB,UAAA;AAAA,MACjB,YAAA,EAAY,KAAA;AAAA,MACZ,eAAA,EAAe,OAAO,QAAQ,CAAA;AAAA,MAC9B,sBAAA,EAAsB,OAAO,cAAc,CAAA;AAAA,MAC3C,IAAA,EAAM,QAAQ,QAAA,GAAW,MAAA;AAAA,MACzB,YAAA,EAAY,KAAA;AAAA,MACZ,OAAO,KAAA,IAAS,MAAA;AAAA,MAChB,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,OAAA,KAAY,SAAY,IAAA,mBACvB,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,6BAA6B,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,wBAElD,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,2BAAA,EAA6B,QAAA,EAAS;AAAA;AAAA;AAAA,GACnD;AAEJ","file":"chunk-V6N3YLTM.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport type { CssLength } from '../../../shared/styles/css-values.js';\n\nconst unsafeStyleValue = /[;{}<>\"'\\\\]|\\p{Cc}/u;\n\nfunction styleValue(value: CssLength, prop: string): string {\n const trimmed = value.trim();\n if (!trimmed || unsafeStyleValue.test(trimmed))\n throw new TypeError(`EditorFrame ${prop} requires one CSS length.`);\n return trimmed;\n}\n\nexport type EditorFrameMode = 'source' | 'preview';\nexport type EditorFrameAppearance = 'framed' | 'embedded';\nexport type EditorFrameInset = 'padded' | 'flush';\n\nexport interface EditorFrameProps {\n /** A Toolbar or other fixed controls above the writing surface. */\n toolbar?: KerfUiContent;\n /** A native textarea in source mode, or rendered content in preview mode. */\n children: KerfUiContent;\n mode: EditorFrameMode;\n /** Framed fixed-height card (default) or unframed content within a host. */\n appearance?: EditorFrameAppearance;\n /** Remove the writing surface inset when the host owns the text column. */\n inset?: EditorFrameInset;\n /** Fill the viewport inset as a raised editor overlay. */\n expanded?: boolean;\n /** Framed block size; defaults to 320px. Ignored while expanded or embedded. */\n height?: CssLength;\n /** Maximum framed inline size; defaults to 672px. */\n maxWidth?: CssLength;\n /** Embedded source height restored by the app. */\n sourceHeight?: CssLength;\n /** Let an embedded native textarea grow with its content. */\n sourceAutosize?: boolean;\n /** Name a distinct editor region for assistive technology. */\n label?: string;\n /** App-owned root identity for delegation or a stable morph key. */\n rootAttributes?: Readonly<Record<`data-${string}`, string | undefined>>;\n slot?: string;\n}\n\n/**\n * A fixed toolbar over one writing surface. Source mode gives a native\n * textarea the scrollport; preview mode scrolls the surface around rendered\n * content. The app owns editing, draft restoration, and preview actions.\n */\nexport function EditorFrame({\n toolbar,\n children,\n mode,\n appearance = 'framed',\n inset = 'padded',\n expanded = false,\n height,\n maxWidth,\n sourceHeight,\n sourceAutosize = false,\n label,\n rootAttributes = {},\n slot,\n}: EditorFrameProps) {\n const style = [\n height === undefined\n ? ''\n : `--_kui-editor-frame-height:${styleValue(height, 'height')}`,\n maxWidth === undefined\n ? ''\n : `--_kui-editor-frame-max-width:${styleValue(maxWidth, 'maxWidth')}`,\n sourceHeight === undefined\n ? ''\n : `--_kui-editor-frame-source-height:${styleValue(sourceHeight, 'sourceHeight')}`,\n ]\n .filter(Boolean)\n .join(';');\n return (\n <section\n {...rootAttributes}\n class=\"kui-editor-frame\"\n data-component=\"editor-frame\"\n data-mode={mode}\n data-appearance={appearance}\n data-inset={inset}\n data-expanded={String(expanded)}\n data-source-autosize={String(sourceAutosize)}\n role={label ? 'region' : undefined}\n aria-label={label}\n style={style || undefined}\n slot={slot}\n >\n {toolbar === undefined ? null : (\n <div class=\"kui-editor-frame__toolbar\">{toolbar}</div>\n )}\n <div class=\"kui-editor-frame__surface\">{children}</div>\n </section>\n );\n}\n"]}
@@ -38,6 +38,8 @@ interface ContentItemMedia {
38
38
  blurredSrc?: string;
39
39
  /** Shared BackdropImage blur behavior; use instead of `blurredSrc`. */
40
40
  blur?: BackdropImageBlur;
41
+ /** Skip offscreen media painting in long feeds while retaining card geometry. */
42
+ deferOffscreen?: boolean;
41
43
  /** Color the image dissolves into and the card body continues on. */
42
44
  fadeTo?: CssColor;
43
45
  /** Content layered over the image, including native controls. */
@@ -1,4 +1,4 @@
1
- export { ContentItem } from './chunk-WD6KABEU.js';
1
+ export { ContentItem } from './chunk-3KFMLOTH.js';
2
2
 
3
3
 
4
4
 
@@ -0,0 +1,41 @@
1
+ import * as kerfjs from 'kerfjs';
2
+ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
3
+ import { CssLength } from './css-values.js';
4
+
5
+ type EditorFrameMode = 'source' | 'preview';
6
+ type EditorFrameAppearance = 'framed' | 'embedded';
7
+ type EditorFrameInset = 'padded' | 'flush';
8
+ interface EditorFrameProps {
9
+ /** A Toolbar or other fixed controls above the writing surface. */
10
+ toolbar?: KerfUiContent;
11
+ /** A native textarea in source mode, or rendered content in preview mode. */
12
+ children: KerfUiContent;
13
+ mode: EditorFrameMode;
14
+ /** Framed fixed-height card (default) or unframed content within a host. */
15
+ appearance?: EditorFrameAppearance;
16
+ /** Remove the writing surface inset when the host owns the text column. */
17
+ inset?: EditorFrameInset;
18
+ /** Fill the viewport inset as a raised editor overlay. */
19
+ expanded?: boolean;
20
+ /** Framed block size; defaults to 320px. Ignored while expanded or embedded. */
21
+ height?: CssLength;
22
+ /** Maximum framed inline size; defaults to 672px. */
23
+ maxWidth?: CssLength;
24
+ /** Embedded source height restored by the app. */
25
+ sourceHeight?: CssLength;
26
+ /** Let an embedded native textarea grow with its content. */
27
+ sourceAutosize?: boolean;
28
+ /** Name a distinct editor region for assistive technology. */
29
+ label?: string;
30
+ /** App-owned root identity for delegation or a stable morph key. */
31
+ rootAttributes?: Readonly<Record<`data-${string}`, string | undefined>>;
32
+ slot?: string;
33
+ }
34
+ /**
35
+ * A fixed toolbar over one writing surface. Source mode gives a native
36
+ * textarea the scrollport; preview mode scrolls the surface around rendered
37
+ * content. The app owns editing, draft restoration, and preview actions.
38
+ */
39
+ declare function EditorFrame({ toolbar, children, mode, appearance, inset, expanded, height, maxWidth, sourceHeight, sourceAutosize, label, rootAttributes, slot, }: EditorFrameProps): kerfjs.SafeHtml;
40
+
41
+ export { EditorFrame, type EditorFrameAppearance, type EditorFrameInset, type EditorFrameMode, type EditorFrameProps };
@@ -0,0 +1,3 @@
1
+ export { EditorFrame } from './chunk-V6N3YLTM.js';
2
+
3
+ //# sourceMappingURL=editor-frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"editor-frame.js"}
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export { ListInsetControl, ListInsetControlProps } from './list-inset-control.js
14
14
  export { ListInsetText, ListInsetTextProps } from './list-inset-text.js';
15
15
  export { ListItem, ListItemLink, ListItemLinkProps, ListItemProps } from './list-item.js';
16
16
  export { SummaryRow, SummaryRowListEdge, SummaryRowPresentation, SummaryRowProps } from './summary-row.js';
17
+ export { ValuePreview, ValuePreviewProps } from './value-preview.js';
17
18
  export { ValueTable, ValueTablePresentation, ValueTableProps, ValueTableRow, ValueTableRowProps, ValueTableStackBelow } from './value-table.js';
18
19
  export { AnchoredSurfaceOptions, AnchoredSurfacePoint, openAnchoredSurface, openAnchoredSurfaceAt } from './anchored-surface.js';
19
20
  export { Badge, BadgeAppearance, BadgeDotProps, BadgeProps, BadgeShape, BadgeSize, BadgeTextProps, BadgeTone } from './badge.js';
@@ -60,6 +61,7 @@ export { TabDropPosition, TabReorder, TabReorderSource, WireTabBarsOptions, reor
60
61
  export { TabBarItem, TabBarItemNameOverflow, TabBarItemPresentation, TabBarItemProps, TabBarItemSize } from './tab-bar-item.js';
61
62
  export { BackdropImage, BackdropImageFit, BackdropImageParallax, BackdropImagePosition, BackdropImageProps, BackdropImageRepeat, BackdropImageScrim, BackdropImageSingleProps, BackdropImageTiledProps } from './backdrop-image.js';
62
63
  export { ContentItem, ContentItemAppearance, ContentItemBubble, ContentItemFrame, ContentItemMedia, ContentItemProps, ContentItemSelectionMode, ContentItemShape } from './content-item.js';
64
+ export { EditorFrame, EditorFrameAppearance, EditorFrameInset, EditorFrameMode, EditorFrameProps } from './editor-frame.js';
63
65
  export { SunkenPanel, SunkenPanelProps, SunkenPanelShape, ensureSunkenTexture } from './sunken-panel.js';
64
66
  export { DialogCloseSource, DialogRequestCloseDetail, DialogSurface, DialogSurfaceBodyLayout, DialogSurfaceFooterPresentation, DialogSurfaceHeaderPresentation, DialogSurfaceHeight, DialogSurfaceMaxHeight, DialogSurfaceName, DialogSurfaceOptions, DialogSurfacePresentation, DialogSurfaceProps, DialogSurfaceRootAttributes, DialogSurfaceSheetMotion, DialogSurfaceSize, PopoverDialogSurface, PopoverDialogSurfaceDataAttributes, PopoverDialogSurfacePresentation, PopoverDialogSurfaceProps, PopupSurface, PopupSurfaceInset, PopupSurfaceProps, SurfaceInset, closeDialog, openDialog } from './surface-scaffold.js';
65
67
  export { wireOverlaySheets } from './wire-overlay-sheets.js';
package/dist/index.js CHANGED
@@ -1,45 +1,47 @@
1
+ export { wireToolbarVisibility } from './chunk-2GOCOLQL.js';
1
2
  export { reorderTabs, wireTabBars } from './chunk-T74YB76U.js';
3
+ export { wireSearchFields } from './chunk-UMNHJSIO.js';
2
4
  export { wireTextFields } from './chunk-KC6WUSNS.js';
3
- export { wireToolbarVisibility } from './chunk-2GOCOLQL.js';
5
+ export { fileMatchesAccept, wireFilePickers } from './chunk-KK3S5OTW.js';
6
+ export { wireListFocusScroll } from './chunk-QDSZTQXL.js';
4
7
  export { reorderListItems, wireListReorder } from './chunk-MJ5RU6XT.js';
5
8
  export { wireMessageComposers } from './chunk-HTERKONR.js';
6
9
  export { wireOverlaySheets } from './chunk-4RECPEHI.js';
7
10
  export { wireResizableRegions } from './chunk-GS2QD3N7.js';
8
- export { wireSearchFields } from './chunk-UMNHJSIO.js';
11
+ export { wireScrollDividers } from './chunk-OZ6X76G5.js';
12
+
13
+ export { wireCheckboxes } from './chunk-CNM6ZWP2.js';
9
14
  export { readChoiceChips, wireChoiceChips } from './chunk-K57NINLH.js';
10
15
  export { wireComboboxes } from './chunk-MVKHSAKE.js';
11
16
  export { wireCornerStatus } from './chunk-ZKKO4MHC.js';
12
- export { fileMatchesAccept, wireFilePickers } from './chunk-KK3S5OTW.js';
13
- export { wireListFocusScroll } from './chunk-QDSZTQXL.js';
17
+ export { TextField } from './chunk-36HVQ72F.js';
18
+ export { ValuePreview } from './chunk-F653O57X.js';
14
19
  export { ValueTable, ValueTableRow } from './chunk-DZJ4GBSP.js';
15
-
16
- export { wireScrollDividers } from './chunk-OZ6X76G5.js';
17
- export { wireCheckboxes } from './chunk-CNM6ZWP2.js';
20
+ export { SunkenPanel } from './chunk-D5RGM3XA.js';
18
21
  export { TabBarItem } from './chunk-ZCDRLN3B.js';
19
22
  export { TabBar } from './chunk-7AK5I7U7.js';
20
- export { TextField } from './chunk-36HVQ72F.js';
23
+ export { applySelection, isApplePlatform, selectionGesture } from './chunk-GXSX6Q6O.js';
21
24
  export { Spacer } from './chunk-YMUIQRWK.js';
22
25
  export { SplitButton } from './chunk-TI2GV36S.js';
23
26
  export { StateBanner } from './chunk-2FW7D4IG.js';
24
- export { SummaryRow } from './chunk-4UB5Z3ZZ.js';
25
- export { SunkenPanel } from './chunk-D5RGM3XA.js';
27
+ export { SummaryRow } from './chunk-K67XBCHG.js';
28
+ export { RadioGroup } from './chunk-OHPYT2BH.js';
26
29
  export { createSearchFieldModel } from './chunk-CIAUILRR.js';
27
30
  export { SegmentedControl } from './chunk-LZUUUHNH.js';
28
31
  export { Select } from './chunk-ZX2QQJXD.js';
29
32
 
30
- export { applySelection, isApplePlatform, selectionGesture } from './chunk-GXSX6Q6O.js';
31
33
  export { MessageComposer } from './chunk-4OV272LF.js';
32
- export { RadioGroup } from './chunk-OHPYT2BH.js';
33
- export { DialogSurface, PopoverDialogSurface, PopupSurface } from './chunk-VGECEXM6.js';
34
- export { closeDialog, openDialog } from './chunk-ATGAJVZ6.js';
34
+ export { ListActionRow } from './chunk-2J7XKAZX.js';
35
+ export { DialogSurface, PopoverDialogSurface, PopupSurface } from './chunk-S3DCRI2M.js';
36
+ export { closeDialog, openDialog } from './chunk-3OP66VXU.js';
35
37
 
38
+ export { EditorFrame } from './chunk-V6N3YLTM.js';
36
39
  export { EmptyState } from './chunk-B53PS2LE.js';
37
40
  export { FileDropZone, FilePickerTrigger } from './chunk-KDQZ3E5C.js';
38
41
  export { FramedList, FramedListRow } from './chunk-S2XULQEK.js';
39
42
  export { Grid } from './chunk-KCS6NJ3O.js';
40
43
 
41
- export { ListActionRow } from './chunk-JCCN3U6X.js';
42
- export { ContentItem } from './chunk-WD6KABEU.js';
44
+ export { ContentItem } from './chunk-3KFMLOTH.js';
43
45
  export { ContentSwap } from './chunk-EIET4QLK.js';
44
46
  export { CornerStatus } from './chunk-G3J7JDP6.js';
45
47
  export { EdgeActivityIndicator } from './chunk-QH5KOFNS.js';
@@ -48,24 +50,25 @@ export { ChoiceChips } from './chunk-ITUQC4FW.js';
48
50
  export { ColumnTrack } from './chunk-QYMJHS4K.js';
49
51
  export { Combobox } from './chunk-BKUMG2KB.js';
50
52
  export { openAnchoredSurface, openAnchoredSurfaceAt } from './chunk-3WYREXW4.js';
51
- export { BackdropImage } from './chunk-SOBRGH7T.js';
53
+ export { BackdropImage } from './chunk-5CLMV5YU.js';
52
54
  export { Button } from './chunk-PS24PVR6.js';
53
55
  export { Switch } from './chunk-LTBVP6VN.js';
54
56
  export { Row } from './chunk-AMIHGFLP.js';
55
57
  export { SearchField, placeSearchFieldCaret, readSearchField } from './chunk-VEME3D7K.js';
58
+ export { PopupMenu, closePopupMenu, openPopupMenu, openPopupMenuAt } from './chunk-OQP3PFKQ.js';
59
+
60
+
56
61
  export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-Y6KT7ZTR.js';
57
62
  export { ToolbarText } from './chunk-EKHDLBRP.js';
58
63
  export { ListHeader } from './chunk-NR6O74ST.js';
59
64
  export { FieldLabel, Text } from './chunk-7K6U6FCN.js';
60
65
  export { ListInsetControl } from './chunk-AN5IWMTM.js';
61
66
  export { ListInsetText } from './chunk-S4Y3YTAI.js';
62
- export { ListItem, ListItemLink } from './chunk-3GLYIIFR.js';
63
- export { FloatingToolbar } from './chunk-S3ECMF23.js';
64
- export { PopupMenu, closePopupMenu, openPopupMenu, openPopupMenuAt } from './chunk-OQP3PFKQ.js';
65
-
67
+ export { ListItem, ListItemLink } from './chunk-3WWX2O4G.js';
66
68
 
67
69
 
68
70
  export { Skeleton } from './chunk-CVD5IZGB.js';
71
+ export { FloatingToolbar } from './chunk-S3ECMF23.js';
69
72
  export { DisclosureArrow } from './chunk-TKNVL53O.js';
70
73
  export { ToolbarActionLink, ToolbarControlGroup } from './chunk-5J6Z4BWY.js';
71
74
  export { Toolbar } from './chunk-ZN7KUMPY.js';
@@ -1,4 +1,5 @@
1
- export { ListActionRow } from './chunk-JCCN3U6X.js';
1
+ export { ListActionRow } from './chunk-2J7XKAZX.js';
2
+
2
3
 
3
4
 
4
5
 
@@ -1,6 +1,6 @@
1
1
  import { SplitView } from './chunk-ETFP7HAR.js';
2
- import { DialogSurface } from './chunk-VGECEXM6.js';
3
- export { closeDialog, openDialog } from './chunk-ATGAJVZ6.js';
2
+ import { DialogSurface } from './chunk-S3DCRI2M.js';
3
+ export { closeDialog, openDialog } from './chunk-3OP66VXU.js';
4
4
 
5
5
 
6
6
 
package/dist/list-item.js CHANGED
@@ -1,4 +1,5 @@
1
- export { ListItem, ListItemLink } from './chunk-3GLYIIFR.js';
1
+ export { ListItem, ListItemLink } from './chunk-3WWX2O4G.js';
2
+
2
3
 
3
4
 
4
5
 
@@ -65,6 +65,12 @@
65
65
  view-timeline: --kui-backdrop-image block;
66
66
  }
67
67
 
68
+ /* Dense feeds can skip offscreen image painting without changing the height
69
+ reserved by the hero's aspect ratio or the containing card body. */
70
+ .kui-backdrop-image[data-defer-offscreen="true"] .kui-backdrop-image__hero {
71
+ content-visibility: auto;
72
+ }
73
+
68
74
  .kui-backdrop-image[data-aspect-ratio="true"] .kui-backdrop-image__hero {
69
75
  min-height: 0;
70
76
  aspect-ratio: var(--_kui-backdrop-image-ratio);
@@ -402,7 +402,7 @@
402
402
  > .kui-popup-menu {
403
403
  margin: -2px;
404
404
  }
405
- .kui-toolbar-control-group:is([data-single="true"], [data-content="mixed"])
405
+ .kui-toolbar-control-group[data-content="mixed"]
406
406
  > .kui-popup-menu
407
407
  > .kui-popup-menu__trigger {
408
408
  min-width: max-content;
@@ -1,4 +1,4 @@
1
- /* A selectable summary: a full-width option on the base surface, a container
1
+ /* A summary surface: a full-width option or static group on the base surface, a container
2
2
  for its own compaction, with a hairline divider below each list row. */
3
3
  .kui-summary-row {
4
4
  --_kui-summary-row-rail: transparent;
@@ -18,7 +18,7 @@
18
18
  border-radius: 0;
19
19
  color: var(--kui-color-text);
20
20
  background: var(--kui-color-surface);
21
- cursor: pointer;
21
+ cursor: default;
22
22
  outline: none;
23
23
  container-type: inline-size;
24
24
  user-select: none;
@@ -47,7 +47,11 @@
47
47
  contain-intrinsic-size: auto 4.5rem;
48
48
  }
49
49
 
50
- .kui-summary-row:hover {
50
+ .kui-summary-row[role="option"] {
51
+ cursor: pointer;
52
+ }
53
+
54
+ .kui-summary-row[role="option"]:hover {
51
55
  border-color: var(--kui-color-brand-border-normal);
52
56
  }
53
57
 
@@ -0,0 +1,18 @@
1
+ .kui-value-preview {
2
+ display: block;
3
+ box-sizing: border-box;
4
+ min-width: 0;
5
+ min-height: var(--_kui-value-preview-min-height, 3rem);
6
+ max-height: var(--_kui-value-preview-max-height, 6rem);
7
+ overflow: auto;
8
+ color: var(--kui-color-text);
9
+ font-size: var(--kui-font-xs);
10
+ line-height: 1.4;
11
+ white-space: pre-wrap;
12
+ overflow-wrap: anywhere;
13
+ }
14
+
15
+ .kui-value-preview:focus-visible {
16
+ outline: var(--kui-focus-ring);
17
+ outline-offset: -2px;
18
+ }
@@ -65,6 +65,12 @@
65
65
  view-timeline: --kui-backdrop-image block;
66
66
  }
67
67
 
68
+ /* Dense feeds can skip offscreen image painting without changing the height
69
+ reserved by the hero's aspect ratio or the containing card body. */
70
+ .kui-backdrop-image[data-defer-offscreen="true"] .kui-backdrop-image__hero {
71
+ content-visibility: auto;
72
+ }
73
+
68
74
  .kui-backdrop-image[data-aspect-ratio="true"] .kui-backdrop-image__hero {
69
75
  min-height: 0;
70
76
  aspect-ratio: var(--_kui-backdrop-image-ratio);
@@ -0,0 +1,121 @@
1
+ .kui-editor-frame {
2
+ display: flex;
3
+ width: min(100%, var(--_kui-editor-frame-max-width, 42rem));
4
+ height: var(--_kui-editor-frame-height, 20rem);
5
+ min-width: 0;
6
+ min-height: 0;
7
+ box-sizing: border-box;
8
+ overflow: hidden;
9
+ border: 1px solid var(--kui-color-neutral-border-normal);
10
+ border-radius: var(--kui-radius-l);
11
+ color: var(--kui-color-neutral-on-normal);
12
+ background: var(--kui-color-surface);
13
+ flex-direction: column;
14
+ }
15
+
16
+ .kui-editor-frame__toolbar {
17
+ flex: none;
18
+ }
19
+
20
+ .kui-editor-frame__surface {
21
+ display: flex;
22
+ min-width: 0;
23
+ min-height: 0;
24
+ padding: 1rem;
25
+ flex: 1 1 auto;
26
+ flex-direction: column;
27
+ }
28
+
29
+ .kui-editor-frame[data-mode="source"] > .kui-editor-frame__surface {
30
+ overflow: hidden;
31
+ }
32
+
33
+ .kui-editor-frame[data-mode="preview"] > .kui-editor-frame__surface {
34
+ overflow: auto;
35
+ }
36
+
37
+ .kui-editor-frame[data-mode="source"] > .kui-editor-frame__surface > textarea {
38
+ display: block;
39
+ width: 100%;
40
+ min-width: 0;
41
+ min-height: 0;
42
+ box-sizing: border-box;
43
+ padding: 0;
44
+ overflow: auto;
45
+ border: 0;
46
+ outline: 0;
47
+ color: inherit;
48
+ background: transparent;
49
+ flex: 1 1 auto;
50
+ font: inherit;
51
+ line-height: 1.6;
52
+ resize: none;
53
+ }
54
+
55
+ .kui-editor-frame[data-inset="flush"] > .kui-editor-frame__surface {
56
+ padding: 0;
57
+ }
58
+
59
+ .kui-editor-frame[data-appearance="embedded"]:not([data-expanded="true"]) {
60
+ width: 100%;
61
+ height: auto;
62
+ overflow: visible;
63
+ border: 0;
64
+ border-radius: 0;
65
+ background: transparent;
66
+ }
67
+
68
+ .kui-editor-frame[data-appearance="embedded"]:not([data-expanded="true"])
69
+ > .kui-editor-frame__surface {
70
+ min-height: 3rem;
71
+ padding: 0.75rem;
72
+ overflow: visible;
73
+ }
74
+
75
+ .kui-editor-frame[data-appearance="embedded"]:not(
76
+ [data-expanded="true"]
77
+ )[data-inset="flush"]
78
+ > .kui-editor-frame__surface {
79
+ padding: 0;
80
+ }
81
+
82
+ .kui-editor-frame[data-appearance="embedded"]:not(
83
+ [data-expanded="true"]
84
+ )[data-mode="source"]
85
+ > .kui-editor-frame__surface
86
+ > textarea {
87
+ height: var(--_kui-editor-frame-source-height, auto);
88
+ min-height: 3rem;
89
+ padding: 0;
90
+ overflow: auto;
91
+ flex: none;
92
+ resize: vertical;
93
+ }
94
+
95
+ .kui-editor-frame[data-appearance="embedded"]:not(
96
+ [data-expanded="true"]
97
+ )[data-mode="source"][data-source-autosize="true"]
98
+ > .kui-editor-frame__surface
99
+ > textarea {
100
+ field-sizing: content;
101
+ resize: none;
102
+ }
103
+
104
+ @supports not (field-sizing: content) {
105
+ .kui-editor-frame[data-appearance="embedded"]:not(
106
+ [data-expanded="true"]
107
+ )[data-mode="source"][data-source-autosize="true"]
108
+ > .kui-editor-frame__surface
109
+ > textarea {
110
+ resize: vertical;
111
+ }
112
+ }
113
+
114
+ .kui-editor-frame[data-expanded="true"] {
115
+ position: fixed;
116
+ z-index: 40;
117
+ inset: 2rem;
118
+ width: auto;
119
+ height: auto;
120
+ box-shadow: var(--kui-shadow-l);
121
+ }