@kerfjs/ui 5.0.0-beta.135 → 5.0.0-beta.137

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 (125) hide show
  1. package/README.md +19 -0
  2. package/ai/component-catalog.json +17 -5
  3. package/ai/component-composition-rules.json +7 -0
  4. package/ai/component-composition.json +18 -0
  5. package/ai/components/empty-state.md +1 -0
  6. package/ai/components/popup-menu.md +1 -1
  7. package/ai/components/text.md +7 -4
  8. package/ai/public-api-signatures-v1.md +99 -21
  9. package/ai/skill.md +10 -0
  10. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  11. package/dist/catalog-library.d.ts +2 -2
  12. package/dist/catalog-resources.d.ts +1 -1
  13. package/dist/catalog.d.ts +3 -3
  14. package/dist/catalog.js +4 -4
  15. package/dist/{chunk-OW2ODKHN.js → chunk-44C2K6V6.js} +33 -9
  16. package/dist/chunk-44C2K6V6.js.map +1 -0
  17. package/dist/{chunk-IXT2ARIM.js → chunk-6FQFZVRV.js} +2 -2
  18. package/dist/{chunk-IXT2ARIM.js.map → chunk-6FQFZVRV.js.map} +1 -1
  19. package/dist/{chunk-LH5V6XGH.js → chunk-7G6BSG4B.js} +1 -1
  20. package/dist/{chunk-LH5V6XGH.js.map → chunk-7G6BSG4B.js.map} +1 -1
  21. package/dist/{chunk-XNSYDA6G.js → chunk-B4UWDIUL.js} +5 -5
  22. package/dist/{chunk-XNSYDA6G.js.map → chunk-B4UWDIUL.js.map} +1 -1
  23. package/dist/{chunk-42NLFCIN.js → chunk-D4KXWVNG.js} +33 -4
  24. package/dist/chunk-D4KXWVNG.js.map +1 -0
  25. package/dist/{chunk-LK3QJHVX.js → chunk-GP3G3ZY3.js} +1 -1
  26. package/dist/chunk-GP3G3ZY3.js.map +1 -0
  27. package/dist/{chunk-QNB5DKKP.js → chunk-LMBSIRGQ.js} +2 -2
  28. package/dist/{chunk-QNB5DKKP.js.map → chunk-LMBSIRGQ.js.map} +1 -1
  29. package/dist/{chunk-YRQ4KKLG.js → chunk-NPPL3NXM.js} +16 -2
  30. package/dist/chunk-NPPL3NXM.js.map +1 -0
  31. package/dist/{chunk-MPT6Y7Z2.js → chunk-QOZABB23.js} +29 -1
  32. package/dist/chunk-QOZABB23.js.map +1 -0
  33. package/dist/{chunk-EI55KWHP.js → chunk-QWB4FEWD.js} +2 -1
  34. package/dist/chunk-QWB4FEWD.js.map +1 -0
  35. package/dist/{chunk-ZDI5I2HT.js → chunk-RMGHAIV5.js} +3 -3
  36. package/dist/{chunk-ZDI5I2HT.js.map → chunk-RMGHAIV5.js.map} +1 -1
  37. package/dist/{chunk-QNA27ABY.js → chunk-TNHJMOWJ.js} +4 -2
  38. package/dist/chunk-TNHJMOWJ.js.map +1 -0
  39. package/dist/{chunk-LSFPZR52.js → chunk-WBNUX4LA.js} +2 -2
  40. package/dist/{chunk-LSFPZR52.js.map → chunk-WBNUX4LA.js.map} +1 -1
  41. package/dist/{chunk-XZ253TGP.js → chunk-XZWEKC5F.js} +27 -5
  42. package/dist/chunk-XZWEKC5F.js.map +1 -0
  43. package/dist/{chunk-QWAAR5JX.js → chunk-ZS4WBHQG.js} +3 -3
  44. package/dist/{chunk-QWAAR5JX.js.map → chunk-ZS4WBHQG.js.map} +1 -1
  45. package/dist/collapsible-panel.js +2 -2
  46. package/dist/column-explorer.js +1 -1
  47. package/dist/{compose-B_GFfFhm.d.ts → compose-Qkitwg3x.d.ts} +1 -1
  48. package/dist/empty-state.d.ts +3 -1
  49. package/dist/empty-state.js +1 -1
  50. package/dist/index.d.ts +4 -4
  51. package/dist/index.js +9 -9
  52. package/dist/list-action-row.js +1 -1
  53. package/dist/list-detail-dialog.js +2 -2
  54. package/dist/list-header.d.ts +41 -1
  55. package/dist/list-header.js +1 -1
  56. package/dist/message-composer.js +1 -1
  57. package/dist/nav-stack.js +1 -1
  58. package/dist/pane.d.ts +2 -2
  59. package/dist/pane.js +1 -1
  60. package/dist/popup-menu.d.ts +12 -1
  61. package/dist/popup-menu.js +1 -1
  62. package/dist/split-middle-BNI0Rni-.d.ts +9 -0
  63. package/dist/split-view.js +1 -1
  64. package/dist/styles/backdrop-image.css +26 -0
  65. package/dist/styles/color-picker.css +4 -0
  66. package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +15 -0
  67. package/dist/styles/components/collections/list-header/list-header.css +60 -4
  68. package/dist/styles/components/feedback/empty-state/empty-state.css +7 -0
  69. package/dist/styles/components/forms/color-picker/color-picker.css +4 -0
  70. package/dist/styles/components/layout/pane/pane.css +6 -0
  71. package/dist/styles/components/navigation/nav-stack/nav-stack.css +12 -0
  72. package/dist/styles/components/navigation/paged-view/paged-view.css +4 -0
  73. package/dist/styles/components/navigation/tab-bar-item/tab-bar-item.css +31 -1
  74. package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +6 -0
  75. package/dist/styles/components/surfaces/backdrop-image/backdrop-image.css +22 -0
  76. package/dist/styles/components/surfaces/scroll-effect/scroll-effect.css +4 -0
  77. package/dist/styles/components/typography/text/text.css +64 -2
  78. package/dist/styles/content-item.css +26 -0
  79. package/dist/styles/empty-state.css +7 -0
  80. package/dist/styles/foundation.css +28 -4
  81. package/dist/styles/list-header.css +60 -4
  82. package/dist/styles/nav-stack.css +12 -0
  83. package/dist/styles/paged-view.css +4 -0
  84. package/dist/styles/pane.css +6 -0
  85. package/dist/styles/scroll-effect.css +4 -0
  86. package/dist/styles/tab-bar-item.css +31 -1
  87. package/dist/styles/tab-navigator.css +6 -0
  88. package/dist/styles/text.css +64 -2
  89. package/dist/styles/toolbar-control-group.css +15 -0
  90. package/dist/styles/webawesome.css +19 -0
  91. package/dist/tab-bar-item.d.ts +9 -4
  92. package/dist/tab-bar-item.js +1 -1
  93. package/dist/text.d.ts +24 -4
  94. package/dist/text.js +1 -1
  95. package/dist/{types-CuKf5G87.d.ts → types-PGGOsJug.d.ts} +2 -1
  96. package/dist/wire-catalog.d.ts +1 -1
  97. package/dist/wire-search-fields.js +1 -1
  98. package/dist/wire-tag-fields.js +1 -1
  99. package/dist/workbench-dialog.js +1 -1
  100. package/dist/workbench.js +1 -1
  101. package/docs/accessibility.md +1 -1
  102. package/docs/component-selection.md +15 -1
  103. package/docs/design/sketch/Kerf-UI.sketch +0 -0
  104. package/docs/design/sketch/README.md +13 -8
  105. package/docs/design/sketch/unified/README.md +23 -10
  106. package/docs/design/sketch/unified/pages/advanced.png +0 -0
  107. package/docs/design/sketch/unified/pages/content.png +0 -0
  108. package/docs/design/sketch/unified/pages/toolbar.png +0 -0
  109. package/docs/design/sketch/unified/variant-link-investigation.md +45 -0
  110. package/docs/design/templates.md +1 -1
  111. package/docs/layout.md +7 -0
  112. package/docs/workbench.md +6 -1
  113. package/doctor/eslint-diagnostics.d.mts +4 -0
  114. package/doctor/eslint-diagnostics.mjs +13 -0
  115. package/doctor/index.mjs +2 -1
  116. package/package.json +1 -1
  117. package/dist/chunk-42NLFCIN.js.map +0 -1
  118. package/dist/chunk-EI55KWHP.js.map +0 -1
  119. package/dist/chunk-LK3QJHVX.js.map +0 -1
  120. package/dist/chunk-MPT6Y7Z2.js.map +0 -1
  121. package/dist/chunk-OW2ODKHN.js.map +0 -1
  122. package/dist/chunk-QNA27ABY.js.map +0 -1
  123. package/dist/chunk-XZ253TGP.js.map +0 -1
  124. package/dist/chunk-YRQ4KKLG.js.map +0 -1
  125. package/dist/split-middle-De745N2j.d.ts +0 -7
package/dist/catalog.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Workbench } from './chunk-XNSYDA6G.js';
1
+ import { Workbench } from './chunk-B4UWDIUL.js';
2
2
  import { uxReviewCaptureUrl } from './chunk-6C6DLP3W.js';
3
3
  export { UX_REVIEW_PROJECT_PATH, loadUxReviewProject, uxReviewCaptureUrl } from './chunk-6C6DLP3W.js';
4
4
 
@@ -6,7 +6,7 @@ import { Switch } from './chunk-PIYFVFPL.js';
6
6
  import { SearchField } from './chunk-T7M5FKCE.js';
7
7
  import { Row } from './chunk-BQHGXQVA.js';
8
8
  import { ListInsetText } from './chunk-BLBMUD2W.js';
9
- import { PopupMenu } from './chunk-YRQ4KKLG.js';
9
+ import { PopupMenu } from './chunk-NPPL3NXM.js';
10
10
 
11
11
 
12
12
 
@@ -28,8 +28,8 @@ import { ListItem } from './chunk-UWLJ7UEK.js';
28
28
 
29
29
 
30
30
 
31
- import { ListHeader } from './chunk-42NLFCIN.js';
32
- import { Text } from './chunk-OW2ODKHN.js';
31
+ import { ListHeader } from './chunk-D4KXWVNG.js';
32
+ import { Text } from './chunk-44C2K6V6.js';
33
33
 
34
34
 
35
35
 
@@ -1,6 +1,6 @@
1
- import { splitMiddle } from './chunk-LK3QJHVX.js';
1
+ import { splitMiddle } from './chunk-GP3G3ZY3.js';
2
2
  import { filterDataAttributes } from './chunk-BRDTP3RT.js';
3
- import { jsx, jsxs } from 'kerfjs/jsx-runtime';
3
+ import { jsx, jsxs, Fragment } from 'kerfjs/jsx-runtime';
4
4
 
5
5
  function FieldLabel({
6
6
  children,
@@ -24,7 +24,8 @@ var textProtectedAttributes = /* @__PURE__ */ new Set([
24
24
  "data-align",
25
25
  "data-wrap",
26
26
  "data-max-lines",
27
- "data-truncate"
27
+ "data-truncate",
28
+ "data-truncate-priority"
28
29
  ]);
29
30
  function Text({
30
31
  variant: Variant = "p",
@@ -45,6 +46,7 @@ function Text({
45
46
  maxLines,
46
47
  truncate,
47
48
  truncateKeep,
49
+ truncatePriority,
48
50
  children,
49
51
  class: classValue = "",
50
52
  className = "",
@@ -64,6 +66,10 @@ function Text({
64
66
  throw new RangeError(
65
67
  'Text truncateKeep requires truncate="middle" and a positive integer or "segment"'
66
68
  );
69
+ if (truncatePriority !== void 0 && (position !== "middle" || !["head", "suffix"].includes(truncatePriority)))
70
+ throw new RangeError(
71
+ 'Text truncatePriority requires truncate="middle" and one of head or suffix'
72
+ );
67
73
  const textValue = typeof children === "string" || typeof children === "number" ? String(children) : void 0;
68
74
  if (position === "middle" && textValue === void 0)
69
75
  throw new TypeError(
@@ -91,6 +97,7 @@ function Text({
91
97
  "data-wrap": wrap === "normal" ? void 0 : wrap,
92
98
  "data-max-lines": maxLines === void 0 ? void 0 : String(maxLines),
93
99
  "data-truncate": position === "end" ? void 0 : position,
100
+ "data-truncate-priority": position === "middle" && truncatePriority === "suffix" ? "suffix" : void 0,
94
101
  title,
95
102
  style: color === void 0 ? style : `${style === void 0 || style === null ? "" : `${style};`}color:${color}`,
96
103
  children: textBody(
@@ -98,6 +105,7 @@ function Text({
98
105
  children,
99
106
  textValue,
100
107
  truncateKeep,
108
+ truncatePriority,
101
109
  maxLines,
102
110
  weight === "strong"
103
111
  )
@@ -105,7 +113,7 @@ function Text({
105
113
  );
106
114
  }
107
115
  var LRM = "\u200E";
108
- function textBody(position, children, textValue, truncateKeep, maxLines, strong) {
116
+ function textBody(position, children, textValue, truncateKeep, truncatePriority, maxLines, strong) {
109
117
  const content = strong ? /* @__PURE__ */ jsx("strong", { children }) : children;
110
118
  switch (position) {
111
119
  case "start":
@@ -119,7 +127,8 @@ function textBody(position, children, textValue, truncateKeep, maxLines, strong)
119
127
  TruncateMiddle,
120
128
  {
121
129
  parts: splitMiddle(textValue, truncateKeep ?? "segment"),
122
- strong
130
+ strong,
131
+ suffixPriority: truncatePriority === "suffix"
123
132
  }
124
133
  );
125
134
  case "end":
@@ -135,15 +144,30 @@ function textBody(position, children, textValue, truncateKeep, maxLines, strong)
135
144
  }
136
145
  function TruncateMiddle({
137
146
  parts: [head, tail],
138
- strong
147
+ strong,
148
+ suffixPriority
139
149
  }) {
140
150
  const mark = (part) => strong ? /* @__PURE__ */ jsx("strong", { children: part }) : part;
141
151
  return /* @__PURE__ */ jsxs("span", { class: "kui-text__truncate-middle", children: [
142
- /* @__PURE__ */ jsx("span", { class: "kui-text__truncate-head", children: mark(head) }),
152
+ /* @__PURE__ */ jsx("span", { class: "kui-text__truncate-head", children: suffixPriority ? /* @__PURE__ */ jsxs(Fragment, { children: [
153
+ /* @__PURE__ */ jsx("span", { class: "kui-text__truncate-head-sizer", "aria-hidden": "true", children: mark(head) }),
154
+ /* @__PURE__ */ jsx("span", { class: "kui-text__truncate-head-clip", children: /* @__PURE__ */ jsx("span", { class: "kui-text__truncate-head-content", children: mark(head) }) })
155
+ ] }) : mark(head) }),
143
156
  tail ? /* @__PURE__ */ jsx("span", { class: "kui-text__truncate-tail", children: mark(tail) }) : ""
144
157
  ] });
145
158
  }
159
+ function Mark({ children, current = false }) {
160
+ return /* @__PURE__ */ jsx(
161
+ "mark",
162
+ {
163
+ class: "kui-text__mark",
164
+ "data-current": current ? "true" : void 0,
165
+ "aria-current": current ? "true" : void 0,
166
+ children
167
+ }
168
+ );
169
+ }
146
170
 
147
- export { FieldLabel, Text };
171
+ export { FieldLabel, Mark, Text };
148
172
 
149
- //# sourceMappingURL=chunk-OW2ODKHN.js.map
173
+ //# sourceMappingURL=chunk-44C2K6V6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/forms/field-label/field-label.tsx","../src/components/typography/text/text.tsx"],"names":["jsx"],"mappings":";;;;AAiBO,SAAS,UAAA,CAAW;AAAA,EACzB,QAAA;AAAA,EACA,EAAA;AAAA,EACA,OAAO,UAAA,GAAa,EAAA;AAAA,EACpB,SAAA,GAAY,EAAA;AAAA,EACZ,GAAG;AACL,CAAA,EAAoB;AAClB,EAAA,MAAM,OAAA,GAAU,CAAC,uBAAA,EAAyB,UAAA,EAAY,SAAS,EAC5D,MAAA,CAAO,OAAO,CAAA,CACd,IAAA,CAAK,GAAG,CAAA;AACX,EAAA,uBACE,GAAA,CAAC,SAAK,GAAG,UAAA,EAAY,IAAQ,KAAA,EAAO,OAAA,EAAS,gBAAA,EAAe,aAAA,EACzD,QAAA,EACH,CAAA;AAEJ;ACyHA,IAAM,uBAAA,uBAA8B,GAAA,CAAI;AAAA,EACtC,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA,sBAAA;AAAA,EACA,YAAA;AAAA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AM,8BAAA,EACV,QAAA,kBAAAA,GAAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,iCAAA,EAAmC,QAAA,EAAA,IAAA,CAAK,IAAI,GAAE,CAAA,EAC5D;AAAA,KAAA,EACF,CAAA,GAEA,IAAA,CAAK,IAAI,CAAA,EAEb,CAAA;AAAA,IACC,IAAA,mBAAOA,GAAAA,CAAC,MAAA,EAAA,EAAK,OAAM,yBAAA,EAA2B,QAAA,EAAA,IAAA,CAAK,IAAI,CAAA,EAAE,CAAA,GAAU;AAAA,GAAA,EACtE,CAAA;AAEJ;AAYO,SAAS,IAAA,CAAK,EAAE,QAAA,EAAU,OAAA,GAAU,OAAM,EAAc;AAC7D,EAAA,uBACEA,GAAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAM,gBAAA;AAAA,MACN,cAAA,EAAc,UAAU,MAAA,GAAS,MAAA;AAAA,MACjC,cAAA,EAAc,UAAU,MAAA,GAAS,MAAA;AAAA,MAEhC;AAAA;AAAA,GACH;AAEJ","file":"chunk-44C2K6V6.js","sourcesContent":["import type { KerfBaseAttrs } from 'kerfjs/jsx-runtime';\n\nexport type FieldLabelProps = Omit<\n KerfBaseAttrs,\n 'children' | 'class' | 'className' | 'id'\n> & {\n children: string;\n /**\n * The label's id: what a group's `labelledBy` (a ChoiceChips or a preview\n * group's `aria-labelledby`) names, so the label is that group's name.\n */\n id?: string;\n class?: string;\n className?: string;\n};\n\n/** Visible field heading for a read-only preview; use its id with aria-labelledby on the preview group. */\nexport function FieldLabel({\n children,\n id,\n class: classValue = '',\n className = '',\n ...attributes\n}: FieldLabelProps) {\n const classes = ['kui-text__field-label', classValue, className]\n .filter(Boolean)\n .join(' ');\n return (\n <div {...attributes} id={id} class={classes} data-component=\"field-label\">\n {children}\n </div>\n );\n}\n","import type { SafeHtml } from 'kerfjs';\nimport type { KerfBaseAttrs } from 'kerfjs/jsx-runtime';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport type { Sides } from '../../../shared/layout/sides.js';\nimport type { CssForegroundColor } from '../../../shared/styles/css-values.js';\n\nexport {\n FieldLabel,\n type FieldLabelProps,\n} from '../../forms/field-label/field-label.js';\nimport {\n type MiddleTruncateKeep,\n type MiddleTruncatePriority,\n splitMiddle,\n} from '../../../shared/text/split-middle.js';\n\nexport type TextVariant =\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';\nexport type TextTone = 'default' | 'quiet' | 'danger';\n/** `strong` marks the text as important with a `<strong>` element. */\nexport type TextWeight = 'regular' | 'strong';\n/**\n * `compact` (xs), `default` (the element's own size), `medium` (the 16px\n * body size, for a heading such as an in-list group title), `large`, or\n * `xlarge`.\n */\nexport type TextSize = 'compact' | 'default' | 'medium' | 'large' | 'xlarge';\nexport type TextFont = 'default' | 'monospace';\nexport type TextBorder = 'transparent' | 'none';\nexport type TextLineHeight = 'default' | 'tight';\nexport type TextWrap = 'normal' | 'anywhere' | 'nowrap' | 'truncate';\n/** Inline alignment of the text's lines, in logical (writing-direction) terms. */\nexport type TextAlign = 'start' | 'center' | 'end';\n/**\n * Where `wrap=\"truncate\"` places its ellipsis: `end` (default) keeps the\n * start, `start` keeps the tail (branch names, the end of an identifier), and\n * `middle` keeps both the start and a suffix (file paths).\n */\nexport type TextTruncate = 'end' | 'middle' | 'start';\n/**\n * The suffix `truncate=\"middle\"` selects: a number of trailing\n * characters, or `segment` for the last path segment with its separator.\n */\nexport type TextTruncateKeep = MiddleTruncateKeep;\n/** Which part wins in a narrow middle-truncated box; defaults to `head`. */\nexport type TextTruncatePriority = MiddleTruncatePriority;\n\nexport type TextContent =\n KerfUiContent | string | number | readonly TextContent[];\n\ntype TextCommonProps = Omit<\n KerfBaseAttrs,\n 'children' | 'class' | 'className' | 'id' | 'lang'\n> & {\n /**\n * The element's id, for a link or `aria-*` reference to target (a\n * `ListItemLink href=\"#…\"` destination, for example).\n */\n id?: string;\n /** The text's language (`lang`), when it differs from the page's (KF-AC7AFR). */\n lang?: string;\n /**\n * An accessible name for the element (`aria-label`), such as a named\n * example paragraph (KF-AC7AFR). Visible text names most Text already.\n */\n ariaLabel?: string;\n /** Native heading, paragraph, or inline span element to render. Defaults to `p`. */\n variant?: TextVariant;\n /** Semantic foreground treatment. Defaults to the inherited foreground. */\n tone?: TextTone;\n /**\n * `strong` wraps the text in `<strong>`, for a title or key phrase that\n * matters more than its neighbors. Defaults to `regular`.\n */\n weight?: TextWeight;\n /** Foreground color; overrides tone when supplied, or inherits when omitted. */\n color?: CssForegroundColor;\n /** Text sizing independent of the native semantic element. */\n size?: TextSize;\n /** Font family independent of the native semantic element. */\n font?: TextFont;\n /** Transparent alignment border or no border when embedded in owner chrome. */\n border?: TextBorder;\n /** Add the shared control gutter outside selected physical edges. */\n controlMargins?: Sides;\n /** Remove the block variant's item padding and border in compact content. */\n flush?: boolean;\n /** Use compact leading for short dialog or metadata copy. */\n lineHeight?: TextLineHeight;\n /** Inline alignment of the lines (default `start`), for centered status copy. */\n align?: TextAlign;\n /**\n * Announce changes to this text as a live region (`aria-live`), for a\n * status or result readout that updates without moving focus.\n */\n live?: 'polite' | 'assertive';\n /** Application `data-*` metadata (test hooks, row keys); Text's own stay protected. */\n rootAttributes?: RootDataAttributes;\n children: TextContent;\n class?: string;\n className?: string;\n};\n\nexport type TextProps = TextCommonProps &\n (\n | {\n /** Wrap normally or break long unbroken strings. Defaults to normal. */\n wrap?: 'normal' | 'anywhere';\n /** Cap wrapped text to this positive number of lines. */\n maxLines?: number;\n truncate?: never;\n truncateKeep?: never;\n truncatePriority?: never;\n }\n | {\n /** Keep one line without an ellipsis. */\n wrap: 'nowrap';\n maxLines?: never;\n truncate?: never;\n truncateKeep?: never;\n truncatePriority?: never;\n }\n | {\n /** Keep one line with an ellipsis. */\n wrap: 'truncate';\n maxLines?: never;\n /**\n * Where the ellipsis goes (default `end`). `start` and `middle` are\n * for left-to-right identifiers and paths, and `middle` requires\n * string or number children so it can split them.\n */\n truncate?: TextTruncate;\n /**\n * The suffix `truncate=\"middle\"` keeps (default `segment`: the last\n * path segment, or the last 10 characters when there is no `/` or\n * `\\\\` separator).\n */\n truncateKeep?: TextTruncateKeep;\n /**\n * Narrow-box policy for `truncate=\"middle\"`: `head` (default)\n * reserves a head sliver and ellipsizes the suffix; `suffix` keeps\n * the suffix whole while the head shrinks to an ellipsis or nothing.\n */\n truncatePriority?: TextTruncatePriority;\n }\n );\n\n/** Attributes Text writes itself, which `rootAttributes` cannot replace. */\nconst textProtectedAttributes = new Set([\n 'data-component',\n 'data-tone',\n 'data-size',\n 'data-font',\n 'data-border',\n 'data-control-margins',\n 'data-flush',\n 'data-line-height',\n 'data-align',\n 'data-wrap',\n 'data-max-lines',\n 'data-truncate',\n 'data-truncate-priority',\n]);\n\n/**\n * Semantic heading, paragraph, or inline text. Block variants use the standard\n * content-item padding; `span` adds no box geometry.\n * All ordinary native heading/paragraph attributes pass through to the element.\n */\nexport function Text({\n variant: Variant = 'p',\n tone = 'default',\n weight = 'regular',\n color,\n size = 'default',\n font = 'default',\n border = 'transparent',\n flush = false,\n controlMargins = '',\n lineHeight = 'default',\n align = 'start',\n live,\n ariaLabel,\n rootAttributes = {},\n wrap = 'normal',\n maxLines,\n truncate,\n truncateKeep,\n truncatePriority,\n children,\n class: classValue = '',\n className = '',\n style,\n ...attributes\n}: TextProps) {\n if (\n maxLines !== undefined &&\n (!Number.isSafeInteger(maxLines) ||\n maxLines < 1 ||\n wrap === 'nowrap' ||\n wrap === 'truncate')\n )\n throw new RangeError(\n 'Text maxLines requires a positive integer and wrapping',\n );\n const position = truncate ?? 'end';\n if (\n (truncate !== undefined && wrap !== 'truncate') ||\n !['end', 'middle', 'start'].includes(position)\n )\n throw new RangeError(\n 'Text truncate requires wrap=\"truncate\" and one of end, middle, or start',\n );\n if (\n truncateKeep !== undefined &&\n (position !== 'middle' ||\n (truncateKeep !== 'segment' &&\n (!Number.isSafeInteger(truncateKeep) || truncateKeep < 1)))\n )\n throw new RangeError(\n 'Text truncateKeep requires truncate=\"middle\" and a positive integer or \"segment\"',\n );\n if (\n truncatePriority !== undefined &&\n (position !== 'middle' || !['head', 'suffix'].includes(truncatePriority))\n )\n throw new RangeError(\n 'Text truncatePriority requires truncate=\"middle\" and one of head or suffix',\n );\n const textValue =\n typeof children === 'string' || typeof children === 'number'\n ? String(children)\n : undefined;\n if (position === 'middle' && textValue === undefined)\n throw new TypeError(\n 'Text truncate=\"middle\" requires string or number children',\n );\n // Visually clipped start/middle text keeps its full value in the DOM; the\n // title shows it to pointer users unless the app supplied its own.\n const title =\n attributes.title === undefined && position !== 'end'\n ? textValue\n : attributes.title;\n const classes = ['kui-text', classValue, className].filter(Boolean).join(' ');\n return (\n <Variant\n {...filterDataAttributes(rootAttributes, textProtectedAttributes)}\n {...attributes}\n aria-live={live ?? attributes['aria-live']}\n aria-label={ariaLabel ?? attributes['aria-label']}\n class={classes}\n data-component=\"text\"\n data-tone={tone}\n data-size={size}\n data-font={font}\n data-border={border}\n data-control-margins={controlMargins || undefined}\n data-flush={flush ? 'true' : undefined}\n data-line-height={lineHeight === 'tight' ? 'tight' : undefined}\n data-align={align === 'start' ? undefined : align}\n data-wrap={wrap === 'normal' ? undefined : wrap}\n data-max-lines={maxLines === undefined ? undefined : String(maxLines)}\n data-truncate={position === 'end' ? undefined : position}\n data-truncate-priority={\n position === 'middle' && truncatePriority === 'suffix'\n ? 'suffix'\n : undefined\n }\n title={title}\n style={\n color === undefined\n ? style\n : `${style === undefined || style === null ? '' : `${style};`}color:${color}`\n }\n >\n {textBody(\n position,\n children,\n textValue,\n truncateKeep,\n truncatePriority,\n maxLines,\n weight === 'strong',\n )}\n </Variant>\n );\n}\n\n/** U+200E LEFT-TO-RIGHT MARK. */\nconst LRM = '\\u200E';\n\n/** The element's content for its truncation position or line cap. */\nfunction textBody(\n position: TextTruncate,\n children: TextContent,\n textValue: string | undefined,\n truncateKeep: TextTruncateKeep | undefined,\n truncatePriority: TextTruncatePriority | undefined,\n maxLines: number | undefined,\n strong: boolean,\n): TextContent {\n const content = strong ? <strong>{children}</strong> : children;\n switch (position) {\n case 'start':\n // KF-FM2NWN: left-to-right marks keep the text's own order and edge\n // punctuation in the right-to-left clip box. An isolating `dir=\"ltr\"`\n // span would too, but WebKit then draws no leading ellipsis once the\n // text has a space.\n return (\n <span class=\"kui-text__truncate-start\">\n {LRM}\n {content}\n {LRM}\n </span>\n );\n case 'middle':\n return (\n <TruncateMiddle\n parts={splitMiddle(textValue!, truncateKeep ?? 'segment')}\n strong={strong}\n suffixPriority={truncatePriority === 'suffix'}\n />\n );\n case 'end':\n return maxLines === undefined ? (\n content\n ) : (\n <span\n class=\"kui-text__clamp\"\n style={`--_kui-text-max-lines:${maxLines}`}\n >\n {content}\n </span>\n );\n }\n}\n\nfunction TruncateMiddle({\n parts: [head, tail],\n strong,\n suffixPriority,\n}: {\n parts: [string, string];\n strong: boolean;\n suffixPriority: boolean;\n}) {\n // A strong middle truncation keeps its two shrinking parts and marks each.\n const mark = (part: string) => (strong ? <strong>{part}</strong> : part);\n return (\n <span class=\"kui-text__truncate-middle\">\n <span class=\"kui-text__truncate-head\">\n {suffixPriority ? (\n <>\n <span class=\"kui-text__truncate-head-sizer\" aria-hidden=\"true\">\n {mark(head)}\n </span>\n <span class=\"kui-text__truncate-head-clip\">\n <span class=\"kui-text__truncate-head-content\">{mark(head)}</span>\n </span>\n </>\n ) : (\n mark(head)\n )}\n </span>\n {tail ? <span class=\"kui-text__truncate-tail\">{mark(tail)}</span> : ''}\n </span>\n );\n}\n\nexport type { Sides } from '../../../shared/layout/sides.js';\n\nexport interface MarkProps {\n /** Matched content; inherits the surrounding font, including code typography. */\n children: SafeHtml | string | number;\n /** Emphasize the active result among otherwise quiet matches. */\n current?: boolean;\n}\n\n/** A native text highlight for find-in-content results. */\nexport function Mark({ children, current = false }: MarkProps) {\n return (\n <mark\n class=\"kui-text__mark\"\n data-current={current ? 'true' : undefined}\n aria-current={current ? 'true' : undefined}\n >\n {children}\n </mark>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { NavStack } from './chunk-QWAAR5JX.js';
1
+ import { NavStack } from './chunk-ZS4WBHQG.js';
2
2
  import { ResizableRegion } from './chunk-6OH734CG.js';
3
3
  import { remify, pct } from './chunk-IQSRHXZR.js';
4
4
  import { filterDataAttributes } from './chunk-BRDTP3RT.js';
@@ -153,4 +153,4 @@ function SplitView({
153
153
 
154
154
  export { SplitView };
155
155
 
156
- //# sourceMappingURL=chunk-IXT2ARIM.js.map
156
+ //# sourceMappingURL=chunk-6FQFZVRV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/layout/split-view/split-view.tsx"],"names":[],"mappings":";;;;;;AAsFA,SAAS,eAAe,SAAA,EAAuC;AAC7D,EAAA,MAAM,EAAE,IAAA,EAAM,WAAA,EAAY,GACxB,OAAO,SAAA,KAAc,QAAA,GACjB,EAAE,IAAA,EAAM,SAAA,EAAW,WAAA,EAAa,MAAA,EAAU,GAC1C,SAAA;AACN,EAAA,IAAI,CAAC,MAAA,CAAO,QAAA,CAAS,IAAI,KAAK,IAAA,IAAQ,CAAA;AACpC,IAAA,MAAM,IAAI,UAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,IACE,WAAA,KAAgB,WACf,CAAC,MAAA,CAAO,SAAS,WAAW,CAAA,IAAK,WAAA,IAAe,CAAA,IAAK,WAAA,GAAc,CAAA,CAAA;AAEpE,IAAA,MAAM,IAAI,UAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,MAAM,SAAA,GAAY,OAAO,IAAI,CAAA;AAC7B,EAAA,OAAO,WAAA,KAAgB,SACnB,SAAA,GACA,CAAA,IAAA,EAAO,SAAS,CAAA,EAAA,EAAK,GAAA,CAAI,WAAA,GAAc,GAAG,CAAC,CAAA,CAAA,CAAA;AACjD;AAyCA,IAAM,oBAAA,uBAA2B,GAAA,CAAI;A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B,SAAA,CAAU,cAAA;AAAA,MAC1B,iBAAiB,SAAA,CAAU,eAAA;AAAA,MAE3B,QAAA,kBAAA,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAM,+BAAA;AAAA,UACN,iBAAA,EAAe,IAAA;AAAA,UACf,gBAAA,EAAe,MAAA;AAAA,UAEd,QAAA,EAAA;AAAA;AAAA;AACH;AAAA,GACF,mBAEA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAM,+BAAA;AAAA,MACN,iBAAA,EAAe,IAAA;AAAA,MACf,gBAAA,EAAe,OAAA;AAAA,MAEd,QAAA,EAAA;AAAA;AAAA,GACH;AAEF,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,oBAAA,CAAqB,cAAA,EAAgB,oBAAoB,CAAA;AAAA,MAC7D,KAAA,EAAO,CAAA,eAAA,EAAkB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC1C,EAAA;AAAA,MACA,gBAAA,EAAe,YAAA;AAAA,MACf,iBAAA,EAAgB,OAAA;AAAA,MAChB,YAAA,EAAY,KAAA;AAAA,MACZ,KAAA,EAAO,cAAA;AAAA,MACP,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,iCAAA;AAAA,YACN,mBAAA,EAAiB,IAAA;AAAA,YACjB,cAAY,WAAA,IAAe,MAAA;AAAA,YAE1B,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GACF;AAEJ","file":"chunk-IXT2ARIM.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport { pct, remify } from '../../../shared/styles/css-values.js';\nimport {\n NavStack,\n type NavStackProps,\n type NavStackView,\n} from '../../navigation/nav-stack/nav-stack.js';\nimport {\n ResizableRegion,\n type ResizableRegionProps,\n} from '../resizable-region/resizable-region.js';\n\n/**\n * The roomy list pane's `ResizableRegion`: its committed `size` and `min` /\n * `max` limits, plus the region configuration that forwards unchanged\n * (`separator`, `handleIcon`, `contentOverflow`, and collapse:\n * `collapsed`, `transitioning`, `collapseMotion`, `restoreControl`,\n * `restorePosition`). Omitted options keep the region's defaults.\n */\nexport interface SplitViewResizable extends Pick<\n ResizableRegionProps,\n | 'separator'\n | 'handleIcon'\n | 'contentOverflow'\n | 'collapsed'\n | 'transitioning'\n | 'collapseMotion'\n | 'restoreControl'\n | 'restorePosition'\n> {\n size: number;\n min: number;\n max: number;\n}\n\n/**\n * One compact view's top- and bottom-toolbar content and pinned footer (see\n * `NavStackView`).\n */\nexport type SplitViewCompactViewToolbars = Pick<\n NavStackView,\n 'toolbar' | 'bottomToolbar' | 'footer'\n>;\n\n/**\n * The compact `NavStack`'s configuration: its toolbar configuration, back\n * control, persistent bottom toolbar, chrome dividers, and chrome and\n * bottom-toolbar presentations forward to the stack, and `list` / `detail`\n * give each view its own toolbar groups.\n */\nexport interface SplitViewCompactStack extends Pick<\n NavStackProps,\n | 'toolbarConfig'\n | 'backIcon'\n | 'backText'\n | 'hideToolbar'\n | 'bottomToolbar'\n | 'chromeDividers'\n | 'chromePresentation'\n | 'bottomToolbarPresentation'\n> {\n /** Toolbar content for the list (root) view. */\n list?: SplitViewCompactViewToolbars;\n /** Toolbar content for the pushed detail view. */\n detail?: SplitViewCompactViewToolbars;\n}\n\n/**\n * The fixed list column's width: a size in CSS pixels, or that size capped\n * at a fraction of the SplitView's own width so a narrow container (a\n * dialog, a small window) always leaves the detail in view.\n */\nexport type SplitViewListWidth =\n | number\n | {\n /** Preferred width in CSS pixels. */\n size: number;\n /** Largest share of the SplitView's width, greater than 0 and at most 1. */\n maxFraction?: number;\n };\n\n/** The list-width custom property value for a fixed split. */\nfunction listWidthValue(listWidth: SplitViewListWidth): string {\n const { size, maxFraction } =\n typeof listWidth === 'number'\n ? { size: listWidth, maxFraction: undefined }\n : listWidth;\n if (!Number.isFinite(size) || size <= 0)\n throw new RangeError(\n 'SplitView listWidth size must be a positive number of pixels',\n );\n if (\n maxFraction !== undefined &&\n (!Number.isFinite(maxFraction) || maxFraction <= 0 || maxFraction > 1)\n )\n throw new RangeError(\n 'SplitView listWidth maxFraction must be greater than 0 and at most 1',\n );\n const preferred = remify(size);\n return maxFraction === undefined\n ? preferred\n : `min(${preferred}, ${pct(maxFraction * 100)})`;\n}\n\nexport interface SplitViewProps {\n id: string;\n label: string;\n /** The list (primary) pane. */\n list: KerfUiContent;\n /** The detail (secondary) pane. */\n detail: KerfUiContent;\n /**\n * Compact (\"one pane at a time\") classes — a handset or portrait tablet.\n * Derive from `deviceClass().value.compact`. When true the split collapses to\n * a `NavStack`: the list is the root and the detail is pushed over it.\n */\n compact?: boolean;\n /** In compact mode, whether the detail is currently pushed over the list. */\n detailActive?: boolean;\n /** Title/label for the list (compact NavStack root + region label). */\n listTitle?: string;\n /** Title/label for the detail (compact NavStack pushed view + region label). */\n detailTitle?: string;\n /** Back label for the compact NavStack (default \"Back\"). */\n backLabel?: string;\n /** Compact NavStack configuration and per-view toolbars. */\n compactStack?: SplitViewCompactStack;\n /** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */\n resizable?: SplitViewResizable;\n /**\n * The fixed split's list column width (default 320px). A number is CSS\n * pixels; `{ size, maxFraction }` caps it at that share of the SplitView's\n * width. A resizable split sizes its list with `resizable` instead.\n */\n listWidth?: SplitViewListWidth;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or a\n * test hook; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\nconst SPLIT_VIEW_PROTECTED = new Set([\n 'data-component',\n 'data-resizable',\n 'data-split-mode',\n]);\n\n/**\n * A list-detail split. On roomy classes it shows both panes side\n * by side with an optional resizable separator; on compact classes it collapses\n * to a `NavStack` (list → detail). See `docs/23-app-layouts.md` §3.2. Compose the\n * resizable wiring with `wireResizableRegions` and the compact back with\n * `wireNavStack`.\n */\nexport function SplitView({\n id,\n label,\n list,\n detail,\n compact = false,\n detailActive = false,\n listTitle = '',\n detailTitle = '',\n backLabel = 'Back',\n compactStack = {},\n resizable,\n listWidth,\n className = '',\n slot,\n rootAttributes = {},\n}: SplitViewProps) {\n if (listWidth !== undefined && resizable)\n throw new RangeError(\n 'SplitView listWidth applies to a fixed split; size a resizable list with resizable.size, min, and max',\n );\n const listWidthStyle =\n listWidth === undefined\n ? undefined\n : `--kui-split-view-list-width:${listWidthValue(listWidth)}`;\n if (compact) {\n const listView: NavStackView = {\n ...compactStack.list,\n key: 'list',\n toolbar: { ...compactStack.list?.toolbar, title: listTitle },\n content: list,\n };\n const views: NavStackView[] = detailActive\n ? [\n listView,\n {\n ...compactStack.detail,\n key: 'detail',\n toolbar: { ...compactStack.detail?.toolbar, title: detailTitle },\n content: detail,\n },\n ]\n : [listView];\n return (\n <div\n {...filterDataAttributes(rootAttributes, SPLIT_VIEW_PROTECTED)}\n class={`kui-split-view kui-split-view--compact ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"compact\"\n slot={slot}\n >\n <NavStack\n id={`${id}-stack`}\n label={label}\n views={views}\n backLabel={backLabel}\n backIcon={compactStack.backIcon}\n backText={compactStack.backText}\n toolbarConfig={compactStack.toolbarConfig}\n hideToolbar={compactStack.hideToolbar}\n bottomToolbar={compactStack.bottomToolbar}\n chromeDividers={compactStack.chromeDividers}\n chromePresentation={compactStack.chromePresentation}\n bottomToolbarPresentation={compactStack.bottomToolbarPresentation}\n />\n </div>\n );\n }\n const listPane = resizable ? (\n <ResizableRegion\n id={`${id}-list`}\n label={listTitle || 'List'}\n size={resizable.size}\n min={resizable.min}\n max={resizable.max}\n separator={resizable.separator}\n handleIcon={resizable.handleIcon}\n contentOverflow={resizable.contentOverflow}\n collapsed={resizable.collapsed}\n transitioning={resizable.transitioning}\n collapseMotion={resizable.collapseMotion}\n restoreControl={resizable.restoreControl}\n restorePosition={resizable.restorePosition}\n >\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"true\"\n >\n {list}\n </div>\n </ResizableRegion>\n ) : (\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"false\"\n >\n {list}\n </div>\n );\n return (\n <div\n {...filterDataAttributes(rootAttributes, SPLIT_VIEW_PROTECTED)}\n class={`kui-split-view ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"split\"\n aria-label={label}\n style={listWidthStyle}\n slot={slot}\n >\n {listPane}\n <div\n class=\"kui-split-view__detail kui-pane\"\n data-split-detail\n aria-label={detailTitle || undefined}\n >\n {detail}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/components/layout/split-view/split-view.tsx"],"names":[],"mappings":";;;;;;AAsFA,SAAS,eAAe,SAAA,EAAuC;AAC7D,EAAA,MAAM,EAAE,IAAA,EAAM,WAAA,EAAY,GACxB,OAAO,SAAA,KAAc,QAAA,GACjB,EAAE,IAAA,EAAM,SAAA,EAAW,WAAA,EAAa,MAAA,EAAU,GAC1C,SAAA;AACN,EAAA,IAAI,CAAC,MAAA,CAAO,QAAA,CAAS,IAAI,KAAK,IAAA,IAAQ,CAAA;AACpC,IAAA,MAAM,IAAI,UAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,IACE,WAAA,KAAgB,WACf,CAAC,MAAA,CAAO,SAAS,WAAW,CAAA,IAAK,WAAA,IAAe,CAAA,IAAK,WAAA,GAAc,CAAA,CAAA;AAEpE,IAAA,MAAM,IAAI,UAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,MAAM,SAAA,GAAY,OAAO,IAAI,CAAA;AAC7B,EAAA,OAAO,WAAA,KAAgB,SACnB,SAAA,GACA,CAAA,IAAA,EAAO,SAAS,CAAA,EAAA,EAA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AAU,SAAA;AAAA,MACrB,eAAe,SAAA,CAAU,aAAA;AAAA,MACzB,gBAAgB,SAAA,CAAU,cAAA;AAAA,MAC1B,gBAAgB,SAAA,CAAU,cAAA;AAAA,MAC1B,iBAAiB,SAAA,CAAU,eAAA;AAAA,MAE3B,QAAA,kBAAA,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAM,+BAAA;AAAA,UACN,iBAAA,EAAe,IAAA;AAAA,UACf,gBAAA,EAAe,MAAA;AAAA,UAEd,QAAA,EAAA;AAAA;AAAA;AACH;AAAA,GACF,mBAEA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAM,+BAAA;AAAA,MACN,iBAAA,EAAe,IAAA;AAAA,MACf,gBAAA,EAAe,OAAA;AAAA,MAEd,QAAA,EAAA;AAAA;AAAA,GACH;AAEF,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,oBAAA,CAAqB,cAAA,EAAgB,oBAAoB,CAAA;AAAA,MAC7D,KAAA,EAAO,CAAA,eAAA,EAAkB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC1C,EAAA;AAAA,MACA,gBAAA,EAAe,YAAA;AAAA,MACf,iBAAA,EAAgB,OAAA;AAAA,MAChB,YAAA,EAAY,KAAA;AAAA,MACZ,KAAA,EAAO,cAAA;AAAA,MACP,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,iCAAA;AAAA,YACN,mBAAA,EAAiB,IAAA;AAAA,YACjB,cAAY,WAAA,IAAe,MAAA;AAAA,YAE1B,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GACF;AAEJ","file":"chunk-6FQFZVRV.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport { pct, remify } from '../../../shared/styles/css-values.js';\nimport {\n NavStack,\n type NavStackProps,\n type NavStackView,\n} from '../../navigation/nav-stack/nav-stack.js';\nimport {\n ResizableRegion,\n type ResizableRegionProps,\n} from '../resizable-region/resizable-region.js';\n\n/**\n * The roomy list pane's `ResizableRegion`: its committed `size` and `min` /\n * `max` limits, plus the region configuration that forwards unchanged\n * (`separator`, `handleIcon`, `contentOverflow`, and collapse:\n * `collapsed`, `transitioning`, `collapseMotion`, `restoreControl`,\n * `restorePosition`). Omitted options keep the region's defaults.\n */\nexport interface SplitViewResizable extends Pick<\n ResizableRegionProps,\n | 'separator'\n | 'handleIcon'\n | 'contentOverflow'\n | 'collapsed'\n | 'transitioning'\n | 'collapseMotion'\n | 'restoreControl'\n | 'restorePosition'\n> {\n size: number;\n min: number;\n max: number;\n}\n\n/**\n * One compact view's top- and bottom-toolbar content and pinned footer (see\n * `NavStackView`).\n */\nexport type SplitViewCompactViewToolbars = Pick<\n NavStackView,\n 'toolbar' | 'bottomToolbar' | 'footer'\n>;\n\n/**\n * The compact `NavStack`'s configuration: its toolbar configuration, back\n * control, persistent bottom toolbar, chrome dividers, and chrome and\n * bottom-toolbar presentations forward to the stack, and `list` / `detail`\n * give each view its own toolbar groups.\n */\nexport interface SplitViewCompactStack extends Pick<\n NavStackProps,\n | 'toolbarConfig'\n | 'backIcon'\n | 'backText'\n | 'hideToolbar'\n | 'bottomToolbar'\n | 'chromeDividers'\n | 'chromePresentation'\n | 'bottomToolbarPresentation'\n> {\n /** Toolbar content for the list (root) view. */\n list?: SplitViewCompactViewToolbars;\n /** Toolbar content for the pushed detail view. */\n detail?: SplitViewCompactViewToolbars;\n}\n\n/**\n * The fixed list column's width: a size in CSS pixels, or that size capped\n * at a fraction of the SplitView's own width so a narrow container (a\n * dialog, a small window) always leaves the detail in view.\n */\nexport type SplitViewListWidth =\n | number\n | {\n /** Preferred width in CSS pixels. */\n size: number;\n /** Largest share of the SplitView's width, greater than 0 and at most 1. */\n maxFraction?: number;\n };\n\n/** The list-width custom property value for a fixed split. */\nfunction listWidthValue(listWidth: SplitViewListWidth): string {\n const { size, maxFraction } =\n typeof listWidth === 'number'\n ? { size: listWidth, maxFraction: undefined }\n : listWidth;\n if (!Number.isFinite(size) || size <= 0)\n throw new RangeError(\n 'SplitView listWidth size must be a positive number of pixels',\n );\n if (\n maxFraction !== undefined &&\n (!Number.isFinite(maxFraction) || maxFraction <= 0 || maxFraction > 1)\n )\n throw new RangeError(\n 'SplitView listWidth maxFraction must be greater than 0 and at most 1',\n );\n const preferred = remify(size);\n return maxFraction === undefined\n ? preferred\n : `min(${preferred}, ${pct(maxFraction * 100)})`;\n}\n\nexport interface SplitViewProps {\n id: string;\n label: string;\n /** The list (primary) pane. */\n list: KerfUiContent;\n /** The detail (secondary) pane. */\n detail: KerfUiContent;\n /**\n * Compact (\"one pane at a time\") classes — a handset or portrait tablet.\n * Derive from `deviceClass().value.compact`. When true the split collapses to\n * a `NavStack`: the list is the root and the detail is pushed over it.\n */\n compact?: boolean;\n /** In compact mode, whether the detail is currently pushed over the list. */\n detailActive?: boolean;\n /** Title/label for the list (compact NavStack root + region label). */\n listTitle?: string;\n /** Title/label for the detail (compact NavStack pushed view + region label). */\n detailTitle?: string;\n /** Back label for the compact NavStack (default \"Back\"). */\n backLabel?: string;\n /** Compact NavStack configuration and per-view toolbars. */\n compactStack?: SplitViewCompactStack;\n /** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */\n resizable?: SplitViewResizable;\n /**\n * The fixed split's list column width (default 320px). A number is CSS\n * pixels; `{ size, maxFraction }` caps it at that share of the SplitView's\n * width. A resizable split sizes its list with `resizable` instead.\n */\n listWidth?: SplitViewListWidth;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or a\n * test hook; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\nconst SPLIT_VIEW_PROTECTED = new Set([\n 'data-component',\n 'data-resizable',\n 'data-split-mode',\n]);\n\n/**\n * A list-detail split. On roomy classes it shows both panes side\n * by side with an optional resizable separator; on compact classes it collapses\n * to a `NavStack` (list → detail). See `docs/23-app-layouts.md` §3.2. Compose the\n * resizable wiring with `wireResizableRegions` and the compact back with\n * `wireNavStack`.\n */\nexport function SplitView({\n id,\n label,\n list,\n detail,\n compact = false,\n detailActive = false,\n listTitle = '',\n detailTitle = '',\n backLabel = 'Back',\n compactStack = {},\n resizable,\n listWidth,\n className = '',\n slot,\n rootAttributes = {},\n}: SplitViewProps) {\n if (listWidth !== undefined && resizable)\n throw new RangeError(\n 'SplitView listWidth applies to a fixed split; size a resizable list with resizable.size, min, and max',\n );\n const listWidthStyle =\n listWidth === undefined\n ? undefined\n : `--kui-split-view-list-width:${listWidthValue(listWidth)}`;\n if (compact) {\n const listView: NavStackView = {\n ...compactStack.list,\n key: 'list',\n toolbar: { ...compactStack.list?.toolbar, title: listTitle },\n content: list,\n };\n const views: NavStackView[] = detailActive\n ? [\n listView,\n {\n ...compactStack.detail,\n key: 'detail',\n toolbar: { ...compactStack.detail?.toolbar, title: detailTitle },\n content: detail,\n },\n ]\n : [listView];\n return (\n <div\n {...filterDataAttributes(rootAttributes, SPLIT_VIEW_PROTECTED)}\n class={`kui-split-view kui-split-view--compact ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"compact\"\n slot={slot}\n >\n <NavStack\n id={`${id}-stack`}\n label={label}\n views={views}\n backLabel={backLabel}\n backIcon={compactStack.backIcon}\n backText={compactStack.backText}\n toolbarConfig={compactStack.toolbarConfig}\n hideToolbar={compactStack.hideToolbar}\n bottomToolbar={compactStack.bottomToolbar}\n chromeDividers={compactStack.chromeDividers}\n chromePresentation={compactStack.chromePresentation}\n bottomToolbarPresentation={compactStack.bottomToolbarPresentation}\n />\n </div>\n );\n }\n const listPane = resizable ? (\n <ResizableRegion\n id={`${id}-list`}\n label={listTitle || 'List'}\n size={resizable.size}\n min={resizable.min}\n max={resizable.max}\n separator={resizable.separator}\n handleIcon={resizable.handleIcon}\n contentOverflow={resizable.contentOverflow}\n collapsed={resizable.collapsed}\n transitioning={resizable.transitioning}\n collapseMotion={resizable.collapseMotion}\n restoreControl={resizable.restoreControl}\n restorePosition={resizable.restorePosition}\n >\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"true\"\n >\n {list}\n </div>\n </ResizableRegion>\n ) : (\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"false\"\n >\n {list}\n </div>\n );\n return (\n <div\n {...filterDataAttributes(rootAttributes, SPLIT_VIEW_PROTECTED)}\n class={`kui-split-view ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"split\"\n aria-label={label}\n style={listWidthStyle}\n slot={slot}\n >\n {listPane}\n <div\n class=\"kui-split-view__detail kui-pane\"\n data-split-detail\n aria-label={detailTitle || undefined}\n >\n {detail}\n </div>\n </div>\n );\n}\n"]}
@@ -167,4 +167,4 @@ function Pane({
167
167
 
168
168
  export { Pane };
169
169
 
170
- //# sourceMappingURL=chunk-LH5V6XGH.js.map
170
+ //# sourceMappingURL=chunk-7G6BSG4B.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/layout/pane/pane.tsx"],"names":[],"mappings":";;;;;;;AAiCA,IAAM,uBAAA,uBAA8B,GAAA,CAAI;AAAA,EACtC,gBAAA;AAAA,EACA,uBAAA;AAAA,EACA,WAAA;AAAA,EACA,uBAAA;AAAA,EACA,qBAAA;AAAA,EACA,qBAAA;AAAA,EACA,0BAAA;AAAA,EACA,0BAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA,uBAAA;AAAA,EACA,0BAAA;AAAA,EACA,sBAAA;AAAA,EACA,kBAAA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C1E,0BAAA,EAA4B,MAAA,CAAO,aAAA,CAAc,QAAA,CAAS,WAAW,CAAC,CAAA;AAAA,IACtE,6BAAA,EAA+B,MAAA;AAAA,MAC7B,aAAA,CAAc,SAAS,cAAc;AAAA,KACvC;AAAA,IACA,2BAAA,EAA6B,MAAA,CAAO,aAAA,CAAc,QAAA,CAAS,YAAY,CAAC,CAAA;AAAA,IACxE,YAAA,EAAc,KAAA;AAAA,IACd,QAAA,EAAU,QAAA;AAAA,IACV;AAAA,GACF;AAEA,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,IAAI,YAAY,OAAA,EAAS,2BAAQ,OAAA,EAAA,EAAO,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC7D,EAAA,IAAI,YAAY,MAAA,EAAQ,2BAAQ,MAAA,EAAA,EAAM,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC3D,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAK,GAAG,UAAA,EAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACpC","file":"chunk-LH5V6XGH.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nimport {\n type ScrollEdge,\n scrollEdgeAttributes,\n} from '../../../shared/layout/scroll-edge.js';\nimport {\n type AnchorName,\n checkedAnchorName,\n} from '../../../shared/styles/anchor-name.js';\nimport type { CssColor } from '../../../shared/styles/css-values.js';\nimport { ensureSunkenTexture } from '../../../shared/styles/sunken-texture.js';\nimport {\n joinStyles,\n type SurfaceTint,\n surfaceTintAttributes,\n type SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n\n/**\n * Logical pane sides: where a {@link Pane} can show a separator and where it can\n * compensate for a device safe-area inset.\n */\nexport type PaneSeparatorSide =\n 'block-start' | 'block-end' | 'inline-start' | 'inline-end';\n\n/** Semantic root elements supported by {@link Pane}. */\nexport type PaneElement = 'article' | 'aside' | 'div' | 'main' | 'section';\n\n/** Semantic elements supported by the scrolling content slot. */\nexport type PaneContentElement = 'div' | 'main' | 'nav' | 'section';\n\nconst paneProtectedAttributes = new Set([\n 'data-component',\n 'data-scroll-anchoring',\n 'data-fill',\n 'data-chrome-placement',\n 'data-compact-header',\n 'data-compact-footer',\n 'data-compact-header-open',\n 'data-compact-footer-open',\n 'data-chrome-dividers',\n 'data-appearance',\n 'data-background',\n 'data-kui-tint',\n 'data-kui-tint-accent',\n 'data-deep-inset',\n 'data-outlined',\n 'data-scroll-clearance',\n 'data-header-presentation',\n 'data-header-material',\n 'data-scroll-edge',\n 'data-scroll-edge-distance',\n 'data-header-overlay',\n 'data-separator-block-start',\n 'data-separator-block-end',\n 'data-separator-inline-start',\n 'data-separator-inline-end',\n 'data-safe-area-block-start',\n 'data-safe-area-block-end',\n 'data-safe-area-inline-start',\n 'data-safe-area-inline-end',\n]);\n\nconst allPaneSides: readonly PaneSeparatorSide[] = [\n 'block-start',\n 'block-end',\n 'inline-start',\n 'inline-end',\n];\n\ntype PaneRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-fill'?: never;\n 'data-separator-block-start'?: never;\n 'data-separator-block-end'?: never;\n 'data-separator-inline-start'?: never;\n 'data-separator-inline-end'?: never;\n 'data-safe-area-block-start'?: never;\n 'data-safe-area-block-end'?: never;\n 'data-safe-area-inline-start'?: never;\n 'data-safe-area-inline-end'?: never;\n 'data-chrome-placement'?: never;\n 'data-chrome-dividers'?: never;\n 'data-appearance'?: never;\n 'data-background'?: never;\n 'data-kui-tint'?: never;\n 'data-kui-tint-accent'?: never;\n 'data-deep-inset'?: never;\n 'data-outlined'?: never;\n 'data-scroll-clearance'?: never;\n 'data-header-presentation'?: never;\n 'data-header-material'?: never;\n 'data-scroll-edge'?: never;\n 'data-scroll-edge-distance'?: never;\n 'data-header-overlay'?: never;\n 'data-compact-header'?: never;\n 'data-compact-footer'?: never;\n 'data-compact-header-open'?: never;\n 'data-compact-footer-open'?: never;\n }\n>;\n\n/** How a Pane's header and footer relate to its scrolling content. */\nexport type PaneChromePlacement = 'fixed' | 'auto';\n\n/**\n * How a header or footer behaves when the pane's container presents\n * compactly (a `NavStack` view, a `TabNavigator` scene, a full-screen dialog,\n * or a compact `Workbench`): `fixed` stays docked and shrinks the content\n * area; `scroll` sits inline with the content (a footer settles at the end\n * and scrolls past when the content is longer); `overlay` lies over the\n * content on the chrome material, shown only while the app opens it.\n */\nexport type PaneCompactChrome = 'fixed' | 'scroll' | 'overlay';\n\n/** The compact chrome policy for a Pane's header and footer. */\nexport interface PaneCompactChromePolicy {\n header?: PaneCompactChrome;\n footer?: PaneCompactChrome;\n}\n\n/**\n * When a Pane draws the divider between its pinned header or footer and its\n * scrolling content: `scroll` while content is scrolled away beneath that\n * chrome, as `wireScrollDividers` reports; `always`; or `none`.\n */\nexport type PaneChromeDividers = 'scroll' | 'always' | 'none';\n\n/**\n * How a Pane's header relates to its scrolling content: `docked` in its own\n * row above the content, or `overlay` laid over the content's top edge on the\n * translucent chrome material, so content scrolls visibly beneath it.\n * `clear` lays it over\n * the same edge fully transparent, for chrome over imagery: legibility comes\n * from glass control groups or a scrim, and with `scrollEdge=\"material\"` the\n * chrome material fades in once content scrolls beneath it.\n */\nexport type PaneHeaderPresentation = 'docked' | 'overlay' | 'clear';\n\n/** Background treatment of the Pane's scrolling work surface. */\nexport type PaneAppearance = 'default' | 'sunken';\n\n/** Whether a Pane's scrolling content keeps the browser's scroll anchoring. */\nexport type PaneScrollAnchoring = 'auto' | 'none';\n\nexport interface PaneProps {\n /** Optional fixed chrome above the scrolling content, arranged vertically. */\n header?: KerfUiContent;\n /** The pane's primary vertical, scrolling content stack. */\n children?: KerfUiContent;\n /** Optional fixed chrome below the scrolling content. */\n footer?: KerfUiContent;\n /**\n * Fill the height of a parent with a definite height, such as an app root\n * (`.kui-app-root`), a `SizedRegion`, or a grid cell, or take the rest of a\n * flex column. The header and footer stay pinned and the content scrolls\n * between them, as in a NavStack view or Workbench region (which fill their\n * Pane without this prop). Defaults to false: the pane takes its content's\n * height.\n */\n fill?: boolean;\n /**\n * Whether the header and footer stay pinned around the scrolling content.\n * `fixed` (default) always pins them. `auto` pins them while the pane is\n * tall enough, and below 480px of height (30rem, so it scales with the text\n * size) lets the whole pane scroll as one column, so tall chrome can never\n * squeeze the content to nothing.\n */\n chromePlacement?: PaneChromePlacement;\n /**\n * The divider under the header and over the footer, where they meet the\n * scrolling content. Omitted defaults to `scroll` for a plain pane and\n * `always` for `appearance=\"sunken\"`. `scroll` shows the header's divider only\n * while the content is scrolled down, and the footer's only while more\n * content lies below — never when the content fits — once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane; unwired, neither shows. `always` shows both; `none` neither.\n * The line is drawn inside the chrome, so no state moves the content.\n */\n chromeDividers?: PaneChromeDividers;\n /**\n * `docked` (default) gives the header its own row above the scrolling\n * content. `overlay` lays the header over the content's top edge on the\n * translucent chrome material (`--kui-chrome-material`, opaque under\n * `prefers-reduced-transparency`, forced colors, or without\n * `backdrop-filter`), so content scrolls visibly beneath it. Once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane it measures the header and publishes its height as the\n * `--kui-scroll-clearance-block-start` context, which the content adds to\n * its block-start padding and `scroll-padding` without any\n * `scrollClearance` prop, so the first item, and anything focused or\n * scrolled into view, rests clear of the header. Until then, and with\n * `chromePlacement=\"auto\"`, the header stays docked. Keep overlay header\n * text in the normal text color: quiet text can fall below AA over the\n * content passing beneath it.\n */\n /**\n * What the header and footer do when the pane's container presents\n * compactly (default `fixed`); roomy containers ignore it. The container\n * interprets it, so set it on panes inside a `NavStack`, `TabNavigator`,\n * full-screen dialog, or `Workbench`.\n */\n compactChrome?: PaneCompactChromePolicy;\n /**\n * Which `overlay` compact chrome is showing. The app owns it and flips it\n * from a control the person can reach while the chrome is hidden.\n */\n compactChromeOpen?: { header?: boolean; footer?: boolean };\n headerPresentation?: PaneHeaderPresentation;\n /**\n * With `headerPresentation=\"clear\"`, `material` fades the chrome material\n * in behind the header once content scrolls beneath it (default `none`).\n */\n scrollEdge?: ScrollEdge;\n /**\n * The scroll distance, in CSS pixels, over which the scroll edge fades in\n * (default 60).\n */\n scrollEdgeDistance?: number;\n /** Paint the scrolling work surface with the shared lowered-surface color. */\n appearance?: PaneAppearance;\n /**\n * Paint the whole pane, header and footer included, in an app-chosen color\n * (`uiColor('surface-raised')`, `fillColor('#1f2a44')`, or `colorVar(…)`\n * from `@kerfjs/ui/css-values`). It replaces the appearance's fill: a sunken\n * pane drops its lowered color and grain. Omitted, the pane keeps its\n * default (transparent, or the sunken surface). Forced colors paint\n * `Canvas`. Keep text at AA over the color; a dark color needs a matching\n * tint or dark tones for its content.\n */\n background?: CssColor;\n /**\n * A scoped tint: `{ color, scheme }`, the app's color and the scheme it\n * belongs to. The pane paints the tinted surface (unless `background` is\n * set) and its whole subtree, chrome material and quiet fills included,\n * re-derives its surface and text tokens from the color with lightness\n * clamped to keep text at WCAG AA. Without relative color syntax, or under\n * `prefers-contrast: more`, the scope keeps the plain palette in the\n * declared scheme.\n */\n tint?: SurfaceTint;\n /**\n * Scope this surface and its subtree to the light or dark palette, whatever\n * the page's scheme (a light card on a dark page). A `tint` already sets\n * its scheme; pass `scheme` alone for the plain palette, or with a tint\n * only when they agree.\n */\n scheme?: SurfaceTintScheme;\n /**\n * Clear chrome that lies over the scrolling content's block-start and/or\n * block-end edge, such as a `DialogSurface` floating footer over a filling\n * Pane. The content scroller adds the inherited\n * `--kui-scroll-clearance-block-*` context that chrome publishes to its block\n * padding and `scroll-padding`, so content scrolls visibly beneath the chrome\n * while its first and last items (and anything focused or scrolled into\n * view) can still rest clear of it. Defaults to none.\n */\n scrollClearance?: ScrollClearance;\n /** Add 8px to every side of scrolling content (default: false). */\n deepInset?: boolean;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on the Pane root. */\n tabIndex?: 0 | -1;\n /**\n * Names the Pane root as a CSS anchor (`anchor-name`): a dashed ident such\n * as `--app-main`. A surface that docks to a named anchor, such as a\n * `PopoverDialogSurface` with the same `anchorName`, then docks to this\n * pane, so the app names its main column without CSS. A Workbench work\n * area, panel, or NavStack view takes it through its `PaneConfig`.\n */\n anchorName?: AnchorName;\n /**\n * The scrolling content's CSS scroll anchoring (`overflow-anchor`). `auto`\n * (the default) keeps the browser's anchoring, which holds visible content\n * still when something above it grows or shrinks. `none` opts the pane\n * out: use it for a pane whose own edits insert or remove rows above the\n * reader, where Safari can apply a late anchoring jump on an unrelated\n * reflow, such as an inspector. A Workbench panel, work area, or NavStack\n * view takes it through its `PaneConfig`.\n */\n scrollAnchoring?: PaneScrollAnchoring;\n /** Keep the standard focus outline visible, such as for a drop target. */\n outlined?: boolean;\n /** Root semantics. Defaults to `div`. */\n element?: PaneElement;\n /** Scrolling content semantics. Defaults to `div`. */\n contentElement?: PaneContentElement;\n /** Independent logical-edge separator lines. Defaults to none. */\n separators?: readonly PaneSeparatorSide[];\n /**\n * Sides on which the pane may compensate for a device safe-area inset.\n * Defaults to every side: the pane pads its slots for each side that still\n * reaches an unsafe screen edge, as its surrounding layout reports, while its\n * background and separators paint through. List only the sides an app-owned\n * layout places at a screen edge, or pass `[]` to opt out.\n */\n safeAreaEdges?: readonly PaneSeparatorSide[];\n id?: string;\n /** Accessible name for a landmark root such as `aside` or `main`. */\n label?: string;\n /** Accessible name for a landmark scrolling slot such as `nav`. */\n contentLabel?: string;\n className?: string;\n headerClassName?: string;\n contentClassName?: string;\n footerClassName?: string;\n /** Safe `data-*` metadata; Pane-owned structural attributes remain protected. */\n rootAttributes?: PaneRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A pane's configuration, apart from its content and styling hooks: the props a\n * composite that renders a `Pane` for the app (a Workbench panel or work area,\n * or a CollapsiblePanel) forwards, so the app configures that pane instead of\n * styling it. An omitted or `undefined` field keeps the composite's default.\n */\nexport type PaneConfig = Pick<\n PaneProps,\n | 'contentElement'\n | 'contentLabel'\n | 'separators'\n | 'safeAreaEdges'\n | 'chromeDividers'\n | 'compactChrome'\n | 'compactChromeOpen'\n | 'headerPresentation'\n | 'scrollEdge'\n | 'scrollEdgeDistance'\n | 'appearance'\n | 'background'\n | 'tint'\n | 'deepInset'\n | 'scrollClearance'\n | 'tabIndex'\n | 'outlined'\n | 'anchorName'\n | 'scrollAnchoring'\n>;\n\nfunction paneContent(\n element: PaneContentElement,\n children: KerfUiContent,\n className: string,\n label: string | undefined,\n) {\n const attributes = {\n class: `kui-pane__content kui-content ${className}`.trim(),\n 'aria-label': label,\n };\n if (element === 'main') return <main {...attributes}>{children}</main>;\n if (element === 'nav') return <nav {...attributes}>{children}</nav>;\n if (element === 'section')\n return <section {...attributes}>{children}</section>;\n return <div {...attributes}>{children}</div>;\n}\n\n/**\n * An unpadded application column with optional fixed header/footer slots and one\n * scrolling vertical content owner. Separator lines are independently opt-in on\n * each logical edge, so the same component works as a sidebar, main area,\n * inspector, or dialog column.\n */\nexport function Pane({\n header,\n children,\n footer,\n fill = false,\n chromePlacement = 'fixed',\n chromeDividers,\n compactChrome = {},\n compactChromeOpen = {},\n headerPresentation = 'docked',\n scrollEdge = 'none',\n scrollEdgeDistance,\n appearance = 'default',\n background,\n tint,\n scheme,\n deepInset = false,\n scrollClearance,\n tabIndex,\n anchorName,\n scrollAnchoring = 'auto',\n outlined = false,\n element = 'div',\n contentElement = 'div',\n separators = [],\n safeAreaEdges = allPaneSides,\n id,\n label,\n contentLabel,\n className = '',\n headerClassName = '',\n contentClassName = '',\n footerClassName = '',\n rootAttributes = {},\n slot,\n}: PaneProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n paneProtectedAttributes,\n );\n const content = paneContent(\n contentElement,\n children,\n contentClassName,\n contentLabel,\n );\n const resolvedChromeDividers =\n chromeDividers ?? (appearance === 'sunken' ? 'always' : 'scroll');\n if (appearance === 'sunken' && background === undefined)\n ensureSunkenTexture();\n const tinted = surfaceTintAttributes(tint, scheme);\n const clearHeader = headerPresentation === 'clear' && header !== undefined;\n const body = (\n <>\n {header === undefined ? null : (\n <header\n class={`kui-pane__header kui-pane__toolbar ${headerClassName}`.trim()}\n >\n {header}\n </header>\n )}\n {content}\n {footer === undefined ? null : (\n <footer class={`kui-pane__footer ${footerClassName}`.trim()}>\n {footer}\n </footer>\n )}\n </>\n );\n const attributes = {\n ...safeRootAttributes,\n class: `kui-pane ${tinted.className} ${className}`\n .replace(/\\s+/g, ' ')\n .trim(),\n id,\n 'data-component': 'pane',\n 'data-fill': fill ? 'true' : undefined,\n 'data-appearance': appearance === 'sunken' ? 'sunken' : undefined,\n 'data-background': background === undefined ? undefined : '',\n 'data-kui-tint': tinted['data-kui-tint'],\n 'data-kui-tint-accent': tinted['data-kui-tint-accent'],\n 'data-kui-scheme': tinted['data-kui-scheme'],\n style: joinStyles(\n background === undefined\n ? undefined\n : `--_kui-pane-background:${background}`,\n tinted.style,\n anchorName === undefined\n ? undefined\n : `anchor-name:${checkedAnchorName(anchorName, 'Pane anchorName')}`,\n ),\n 'data-deep-inset': deepInset ? 'true' : undefined,\n 'data-outlined': outlined ? 'true' : undefined,\n 'data-scroll-anchoring': scrollAnchoring === 'none' ? 'none' : undefined,\n 'data-scroll-clearance': scrollClearance,\n 'data-header-presentation':\n headerPresentation !== 'docked' && header !== undefined\n ? 'overlay'\n : undefined,\n 'data-header-material': clearHeader ? 'clear' : undefined,\n ...scrollEdgeAttributes(scrollEdge, scrollEdgeDistance, clearHeader),\n 'data-chrome-placement': chromePlacement === 'auto' ? 'auto' : undefined,\n 'data-compact-header':\n header !== undefined && compactChrome.header !== 'fixed'\n ? compactChrome.header\n : undefined,\n 'data-compact-footer':\n footer !== undefined && compactChrome.footer !== 'fixed'\n ? compactChrome.footer\n : undefined,\n 'data-compact-header-open':\n compactChrome.header === 'overlay' && compactChromeOpen.header\n ? ''\n : undefined,\n 'data-compact-footer-open':\n compactChrome.footer === 'overlay' && compactChromeOpen.footer\n ? ''\n : undefined,\n 'data-chrome-dividers':\n resolvedChromeDividers === 'always' || resolvedChromeDividers === 'none'\n ? resolvedChromeDividers\n : undefined,\n 'data-separator-block-start': String(separators.includes('block-start')),\n 'data-separator-block-end': String(separators.includes('block-end')),\n 'data-separator-inline-start': String(separators.includes('inline-start')),\n 'data-separator-inline-end': String(separators.includes('inline-end')),\n 'data-safe-area-block-start': String(safeAreaEdges.includes('block-start')),\n 'data-safe-area-block-end': String(safeAreaEdges.includes('block-end')),\n 'data-safe-area-inline-start': String(\n safeAreaEdges.includes('inline-start'),\n ),\n 'data-safe-area-inline-end': String(safeAreaEdges.includes('inline-end')),\n 'aria-label': label,\n tabindex: tabIndex,\n slot,\n };\n\n if (element === 'article') return <article {...attributes}>{body}</article>;\n if (element === 'aside') return <aside {...attributes}>{body}</aside>;\n if (element === 'main') return <main {...attributes}>{body}</main>;\n if (element === 'section') return <section {...attributes}>{body}</section>;\n return <div {...attributes}>{body}</div>;\n}\n\nexport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nexport type { ScrollEdge } from '../../../shared/layout/scroll-edge.js';\nexport type {\n SurfaceTint,\n SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n"]}
1
+ {"version":3,"sources":["../src/components/layout/pane/pane.tsx"],"names":[],"mappings":";;;;;;;AAiCA,IAAM,uBAAA,uBAA8B,GAAA,CAAI;AAAA,EACtC,gBAAA;AAAA,EACA,uBAAA;AAAA,EACA,WAAA;AAAA,EACA,uBAAA;AAAA,EACA,qBAAA;AAAA,EACA,qBAAA;AAAA,EACA,0BAAA;AAAA,EACA,0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,QAAA,CAAS,cAAc,CAAC,CAAA;AAAA,IACzE,2BAAA,EAA6B,MAAA,CAAO,UAAA,CAAW,QAAA,CAAS,YAAY,CAAC,CAAA;AAAA,IACrE,4BAAA,EAA8B,MAAA,CAAO,aAAA,CAAc,QAAA,CAAS,aAAa,CAAC,CAAA;AAAA,IAC1E,0BAAA,EAA4B,MAAA,CAAO,aAAA,CAAc,QAAA,CAAS,WAAW,CAAC,CAAA;AAAA,IACtE,6BAAA,EAA+B,MAAA;AAAA,MAC7B,aAAA,CAAc,SAAS,cAAc;AAAA,KACvC;AAAA,IACA,2BAAA,EAA6B,MAAA,CAAO,aAAA,CAAc,QAAA,CAAS,YAAY,CAAC,CAAA;AAAA,IACxE,YAAA,EAAc,KAAA;AAAA,IACd,QAAA,EAAU,QAAA;AAAA,IACV;AAAA,GACF;AAEA,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,IAAI,YAAY,OAAA,EAAS,2BAAQ,OAAA,EAAA,EAAO,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC7D,EAAA,IAAI,YAAY,MAAA,EAAQ,2BAAQ,MAAA,EAAA,EAAM,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC3D,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAK,GAAG,UAAA,EAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACpC","file":"chunk-7G6BSG4B.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nimport {\n type ScrollEdge,\n scrollEdgeAttributes,\n} from '../../../shared/layout/scroll-edge.js';\nimport {\n type AnchorName,\n checkedAnchorName,\n} from '../../../shared/styles/anchor-name.js';\nimport type { CssColor } from '../../../shared/styles/css-values.js';\nimport { ensureSunkenTexture } from '../../../shared/styles/sunken-texture.js';\nimport {\n joinStyles,\n type SurfaceTint,\n surfaceTintAttributes,\n type SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n\n/**\n * Logical pane sides: where a {@link Pane} can show a separator and where it can\n * compensate for a device safe-area inset.\n */\nexport type PaneSeparatorSide =\n 'block-start' | 'block-end' | 'inline-start' | 'inline-end';\n\n/** Semantic root elements supported by {@link Pane}. */\nexport type PaneElement = 'article' | 'aside' | 'div' | 'main' | 'section';\n\n/** Semantic elements supported by the scrolling content slot. */\nexport type PaneContentElement = 'div' | 'main' | 'nav' | 'section';\n\nconst paneProtectedAttributes = new Set([\n 'data-component',\n 'data-scroll-anchoring',\n 'data-fill',\n 'data-chrome-placement',\n 'data-compact-header',\n 'data-compact-footer',\n 'data-compact-header-open',\n 'data-compact-footer-open',\n 'data-chrome-dividers',\n 'data-appearance',\n 'data-background',\n 'data-kui-tint',\n 'data-kui-tint-accent',\n 'data-deep-inset',\n 'data-outlined',\n 'data-scroll-clearance',\n 'data-header-presentation',\n 'data-header-material',\n 'data-scroll-edge',\n 'data-scroll-edge-distance',\n 'data-header-overlay',\n 'data-separator-block-start',\n 'data-separator-block-end',\n 'data-separator-inline-start',\n 'data-separator-inline-end',\n 'data-safe-area-block-start',\n 'data-safe-area-block-end',\n 'data-safe-area-inline-start',\n 'data-safe-area-inline-end',\n]);\n\nconst allPaneSides: readonly PaneSeparatorSide[] = [\n 'block-start',\n 'block-end',\n 'inline-start',\n 'inline-end',\n];\n\ntype PaneRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-fill'?: never;\n 'data-separator-block-start'?: never;\n 'data-separator-block-end'?: never;\n 'data-separator-inline-start'?: never;\n 'data-separator-inline-end'?: never;\n 'data-safe-area-block-start'?: never;\n 'data-safe-area-block-end'?: never;\n 'data-safe-area-inline-start'?: never;\n 'data-safe-area-inline-end'?: never;\n 'data-chrome-placement'?: never;\n 'data-chrome-dividers'?: never;\n 'data-appearance'?: never;\n 'data-background'?: never;\n 'data-kui-tint'?: never;\n 'data-kui-tint-accent'?: never;\n 'data-deep-inset'?: never;\n 'data-outlined'?: never;\n 'data-scroll-clearance'?: never;\n 'data-header-presentation'?: never;\n 'data-header-material'?: never;\n 'data-scroll-edge'?: never;\n 'data-scroll-edge-distance'?: never;\n 'data-header-overlay'?: never;\n 'data-compact-header'?: never;\n 'data-compact-footer'?: never;\n 'data-compact-header-open'?: never;\n 'data-compact-footer-open'?: never;\n }\n>;\n\n/** How a Pane's header and footer relate to its scrolling content. */\nexport type PaneChromePlacement = 'fixed' | 'auto';\n\n/**\n * How a header or footer behaves when the pane's container presents\n * compactly (a `NavStack` view, a `TabNavigator` scene, a full-screen dialog,\n * or a compact `Workbench`): `fixed` stays docked and shrinks the content\n * area; `scroll` sits inline with the content (a footer settles at the end\n * and scrolls past when the content is longer); `overlay` lies over the\n * content on the chrome material, shown only while the app opens it.\n */\nexport type PaneCompactChrome = 'fixed' | 'scroll' | 'overlay';\n\n/** The compact chrome policy for a Pane's header and footer. */\nexport interface PaneCompactChromePolicy {\n header?: PaneCompactChrome;\n footer?: PaneCompactChrome;\n}\n\n/**\n * When a Pane draws the divider between its pinned header or footer and its\n * scrolling content: `scroll` while content is scrolled away beneath that\n * chrome, as `wireScrollDividers` reports; `always`; or `none`.\n */\nexport type PaneChromeDividers = 'scroll' | 'always' | 'none';\n\n/**\n * How a Pane's header relates to its scrolling content: `docked` in its own\n * row above the content, or `overlay` laid over the content's top edge on the\n * translucent chrome material, so content scrolls visibly beneath it.\n * `clear` lays it over\n * the same edge fully transparent, for chrome over imagery: legibility comes\n * from glass control groups or a scrim, and with `scrollEdge=\"material\"` the\n * chrome material fades in once content scrolls beneath it.\n */\nexport type PaneHeaderPresentation = 'docked' | 'overlay' | 'clear';\n\n/** Background treatment of the Pane's scrolling work surface. */\nexport type PaneAppearance = 'default' | 'sunken';\n\n/** Whether a Pane's scrolling content keeps the browser's scroll anchoring. */\nexport type PaneScrollAnchoring = 'auto' | 'none';\n\nexport interface PaneProps {\n /** Optional fixed chrome above the scrolling content, arranged vertically. */\n header?: KerfUiContent;\n /** The pane's primary vertical, scrolling content stack. */\n children?: KerfUiContent;\n /** Optional fixed chrome below the scrolling content. */\n footer?: KerfUiContent;\n /**\n * Fill the height of a parent with a definite height, such as an app root\n * (`.kui-app-root`), a `SizedRegion`, or a grid cell, or take the rest of a\n * flex column. The header and footer stay pinned and the content scrolls\n * between them, as in a NavStack view or Workbench region (which fill their\n * Pane without this prop). Defaults to false: the pane takes its content's\n * height.\n */\n fill?: boolean;\n /**\n * Whether the header and footer stay pinned around the scrolling content.\n * `fixed` (default) always pins them. `auto` pins them while the pane is\n * tall enough, and below 480px of height (30rem, so it scales with the text\n * size) lets the whole pane scroll as one column, so tall chrome can never\n * squeeze the content to nothing.\n */\n chromePlacement?: PaneChromePlacement;\n /**\n * The divider under the header and over the footer, where they meet the\n * scrolling content. Omitted defaults to `scroll` for a plain pane and\n * `always` for `appearance=\"sunken\"`. `scroll` shows the header's divider only\n * while the content is scrolled down, and the footer's only while more\n * content lies below — never when the content fits — once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane; unwired, neither shows. `always` shows both; `none` neither.\n * The line is drawn inside the chrome, so no state moves the content.\n */\n chromeDividers?: PaneChromeDividers;\n /**\n * `docked` (default) gives the header its own row above the scrolling\n * content. `overlay` lays the header over the content's top edge on the\n * translucent chrome material (`--kui-chrome-material`, opaque under\n * `prefers-reduced-transparency`, forced colors, or without\n * `backdrop-filter`), so content scrolls visibly beneath it. Once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane it measures the header and publishes its height as the\n * `--kui-scroll-clearance-block-start` context, which the content adds to\n * its block-start padding and `scroll-padding` without any\n * `scrollClearance` prop, so the first item, and anything focused or\n * scrolled into view, rests clear of the header. Until then, and with\n * `chromePlacement=\"auto\"`, the header stays docked. Keep overlay header\n * text in the normal text color: quiet text can fall below AA over the\n * content passing beneath it.\n */\n /**\n * What the header and footer do when the pane's container presents\n * compactly (default `fixed`); roomy containers ignore it. The container\n * interprets it, so set it on panes inside a `NavStack`, `TabNavigator`,\n * full-screen dialog, or `Workbench`.\n */\n compactChrome?: PaneCompactChromePolicy;\n /**\n * Which `overlay` compact chrome is showing. The app owns it and flips it\n * from a control the person can reach while the chrome is hidden.\n */\n compactChromeOpen?: { header?: boolean; footer?: boolean };\n headerPresentation?: PaneHeaderPresentation;\n /**\n * With `headerPresentation=\"clear\"`, `material` fades the chrome material\n * in behind the header once content scrolls beneath it (default `none`).\n */\n scrollEdge?: ScrollEdge;\n /**\n * The scroll distance, in CSS pixels, over which the scroll edge fades in\n * (default 60).\n */\n scrollEdgeDistance?: number;\n /** Paint the scrolling work surface with the shared lowered-surface color. */\n appearance?: PaneAppearance;\n /**\n * Paint the whole pane, header and footer included, in an app-chosen color\n * (`uiColor('surface-raised')`, `fillColor('#1f2a44')`, or `colorVar(…)`\n * from `@kerfjs/ui/css-values`). It replaces the appearance's fill: a sunken\n * pane drops its lowered color and grain. Omitted, the pane keeps its\n * default (transparent, or the sunken surface). Forced colors paint\n * `Canvas`. Keep text at AA over the color; a dark color needs a matching\n * tint or dark tones for its content.\n */\n background?: CssColor;\n /**\n * A scoped tint: `{ color, scheme }`, the app's color and the scheme it\n * belongs to. The pane paints the tinted surface (unless `background` is\n * set) and its whole subtree, chrome material and quiet fills included,\n * re-derives its surface and text tokens from the color with lightness\n * clamped to keep text at WCAG AA. Without relative color syntax, or under\n * `prefers-contrast: more`, the scope keeps the plain palette in the\n * declared scheme.\n */\n tint?: SurfaceTint;\n /**\n * Scope this surface and its subtree to the light or dark palette, whatever\n * the page's scheme (a light card on a dark page). A `tint` already sets\n * its scheme; pass `scheme` alone for the plain palette, or with a tint\n * only when they agree.\n */\n scheme?: SurfaceTintScheme;\n /**\n * Clear chrome that lies over the scrolling content's block-start and/or\n * block-end edge, such as a `DialogSurface` floating footer over a filling\n * Pane. The content scroller adds the inherited\n * `--kui-scroll-clearance-block-*` context that chrome publishes to its block\n * padding and `scroll-padding`, so content scrolls visibly beneath the chrome\n * while its first and last items (and anything focused or scrolled into\n * view) can still rest clear of it. Defaults to none.\n */\n scrollClearance?: ScrollClearance;\n /** Add 8px to every side of scrolling content (default: false). */\n deepInset?: boolean;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on the Pane root. */\n tabIndex?: 0 | -1;\n /**\n * Names the Pane root as a CSS anchor (`anchor-name`): a dashed ident such\n * as `--app-main`. A surface that docks to a named anchor, such as a\n * `PopoverDialogSurface` with the same `anchorName`, then docks to this\n * pane, so the app names its main column without CSS. A Workbench work\n * area, panel, or NavStack view takes it through its `PaneConfig`.\n */\n anchorName?: AnchorName;\n /**\n * The scrolling content's CSS scroll anchoring (`overflow-anchor`). `auto`\n * (the default) keeps the browser's anchoring, which holds visible content\n * still when something above it grows or shrinks. `none` opts the pane\n * out: use it for a pane whose own edits insert or remove rows above the\n * reader, where Safari can apply a late anchoring jump on an unrelated\n * reflow, such as an inspector. A Workbench panel, work area, or NavStack\n * view takes it through its `PaneConfig`.\n */\n scrollAnchoring?: PaneScrollAnchoring;\n /** Keep the standard focus outline visible, such as for a drop target. */\n outlined?: boolean;\n /** Root semantics. Defaults to `div`. */\n element?: PaneElement;\n /** Scrolling content semantics. Defaults to `div`. */\n contentElement?: PaneContentElement;\n /** Independent logical-edge separator lines. Defaults to none. */\n separators?: readonly PaneSeparatorSide[];\n /**\n * Sides on which the pane may compensate for a device safe-area inset.\n * Defaults to every side: the pane pads its slots for each side that still\n * reaches an unsafe screen edge, as its surrounding layout reports, while its\n * background and separators paint through. List only the sides an app-owned\n * layout places at a screen edge, or pass `[]` to opt out.\n */\n safeAreaEdges?: readonly PaneSeparatorSide[];\n id?: string;\n /** Accessible name for a landmark root such as `aside` or `main`. */\n label?: string;\n /** Accessible name for a landmark scrolling slot such as `nav`. */\n contentLabel?: string;\n className?: string;\n headerClassName?: string;\n contentClassName?: string;\n footerClassName?: string;\n /** Safe `data-*` metadata; Pane-owned structural attributes remain protected. */\n rootAttributes?: PaneRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A pane's configuration, apart from its content and root styling hooks: the props a\n * composite that renders a `Pane` for the app (a Workbench panel or work area,\n * or a CollapsiblePanel) forwards, so the app configures that pane instead of\n * styling it. An omitted or `undefined` field keeps the composite's default.\n */\nexport type PaneConfig = Pick<\n PaneProps,\n | 'contentElement'\n | 'contentLabel'\n | 'contentClassName'\n | 'separators'\n | 'safeAreaEdges'\n | 'chromeDividers'\n | 'compactChrome'\n | 'compactChromeOpen'\n | 'headerPresentation'\n | 'scrollEdge'\n | 'scrollEdgeDistance'\n | 'appearance'\n | 'background'\n | 'tint'\n | 'deepInset'\n | 'scrollClearance'\n | 'tabIndex'\n | 'outlined'\n | 'anchorName'\n | 'scrollAnchoring'\n>;\n\nfunction paneContent(\n element: PaneContentElement,\n children: KerfUiContent,\n className: string,\n label: string | undefined,\n) {\n const attributes = {\n class: `kui-pane__content kui-content ${className}`.trim(),\n 'aria-label': label,\n };\n if (element === 'main') return <main {...attributes}>{children}</main>;\n if (element === 'nav') return <nav {...attributes}>{children}</nav>;\n if (element === 'section')\n return <section {...attributes}>{children}</section>;\n return <div {...attributes}>{children}</div>;\n}\n\n/**\n * An unpadded application column with optional fixed header/footer slots and one\n * scrolling vertical content owner. Separator lines are independently opt-in on\n * each logical edge, so the same component works as a sidebar, main area,\n * inspector, or dialog column.\n */\nexport function Pane({\n header,\n children,\n footer,\n fill = false,\n chromePlacement = 'fixed',\n chromeDividers,\n compactChrome = {},\n compactChromeOpen = {},\n headerPresentation = 'docked',\n scrollEdge = 'none',\n scrollEdgeDistance,\n appearance = 'default',\n background,\n tint,\n scheme,\n deepInset = false,\n scrollClearance,\n tabIndex,\n anchorName,\n scrollAnchoring = 'auto',\n outlined = false,\n element = 'div',\n contentElement = 'div',\n separators = [],\n safeAreaEdges = allPaneSides,\n id,\n label,\n contentLabel,\n className = '',\n headerClassName = '',\n contentClassName = '',\n footerClassName = '',\n rootAttributes = {},\n slot,\n}: PaneProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n paneProtectedAttributes,\n );\n const content = paneContent(\n contentElement,\n children,\n contentClassName,\n contentLabel,\n );\n const resolvedChromeDividers =\n chromeDividers ?? (appearance === 'sunken' ? 'always' : 'scroll');\n if (appearance === 'sunken' && background === undefined)\n ensureSunkenTexture();\n const tinted = surfaceTintAttributes(tint, scheme);\n const clearHeader = headerPresentation === 'clear' && header !== undefined;\n const body = (\n <>\n {header === undefined ? null : (\n <header\n class={`kui-pane__header kui-pane__toolbar ${headerClassName}`.trim()}\n >\n {header}\n </header>\n )}\n {content}\n {footer === undefined ? null : (\n <footer class={`kui-pane__footer ${footerClassName}`.trim()}>\n {footer}\n </footer>\n )}\n </>\n );\n const attributes = {\n ...safeRootAttributes,\n class: `kui-pane ${tinted.className} ${className}`\n .replace(/\\s+/g, ' ')\n .trim(),\n id,\n 'data-component': 'pane',\n 'data-fill': fill ? 'true' : undefined,\n 'data-appearance': appearance === 'sunken' ? 'sunken' : undefined,\n 'data-background': background === undefined ? undefined : '',\n 'data-kui-tint': tinted['data-kui-tint'],\n 'data-kui-tint-accent': tinted['data-kui-tint-accent'],\n 'data-kui-scheme': tinted['data-kui-scheme'],\n style: joinStyles(\n background === undefined\n ? undefined\n : `--_kui-pane-background:${background}`,\n tinted.style,\n anchorName === undefined\n ? undefined\n : `anchor-name:${checkedAnchorName(anchorName, 'Pane anchorName')}`,\n ),\n 'data-deep-inset': deepInset ? 'true' : undefined,\n 'data-outlined': outlined ? 'true' : undefined,\n 'data-scroll-anchoring': scrollAnchoring === 'none' ? 'none' : undefined,\n 'data-scroll-clearance': scrollClearance,\n 'data-header-presentation':\n headerPresentation !== 'docked' && header !== undefined\n ? 'overlay'\n : undefined,\n 'data-header-material': clearHeader ? 'clear' : undefined,\n ...scrollEdgeAttributes(scrollEdge, scrollEdgeDistance, clearHeader),\n 'data-chrome-placement': chromePlacement === 'auto' ? 'auto' : undefined,\n 'data-compact-header':\n header !== undefined && compactChrome.header !== 'fixed'\n ? compactChrome.header\n : undefined,\n 'data-compact-footer':\n footer !== undefined && compactChrome.footer !== 'fixed'\n ? compactChrome.footer\n : undefined,\n 'data-compact-header-open':\n compactChrome.header === 'overlay' && compactChromeOpen.header\n ? ''\n : undefined,\n 'data-compact-footer-open':\n compactChrome.footer === 'overlay' && compactChromeOpen.footer\n ? ''\n : undefined,\n 'data-chrome-dividers':\n resolvedChromeDividers === 'always' || resolvedChromeDividers === 'none'\n ? resolvedChromeDividers\n : undefined,\n 'data-separator-block-start': String(separators.includes('block-start')),\n 'data-separator-block-end': String(separators.includes('block-end')),\n 'data-separator-inline-start': String(separators.includes('inline-start')),\n 'data-separator-inline-end': String(separators.includes('inline-end')),\n 'data-safe-area-block-start': String(safeAreaEdges.includes('block-start')),\n 'data-safe-area-block-end': String(safeAreaEdges.includes('block-end')),\n 'data-safe-area-inline-start': String(\n safeAreaEdges.includes('inline-start'),\n ),\n 'data-safe-area-inline-end': String(safeAreaEdges.includes('inline-end')),\n 'aria-label': label,\n tabindex: tabIndex,\n slot,\n };\n\n if (element === 'article') return <article {...attributes}>{body}</article>;\n if (element === 'aside') return <aside {...attributes}>{body}</aside>;\n if (element === 'main') return <main {...attributes}>{body}</main>;\n if (element === 'section') return <section {...attributes}>{body}</section>;\n return <div {...attributes}>{body}</div>;\n}\n\nexport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nexport type { ScrollEdge } from '../../../shared/layout/scroll-edge.js';\nexport type {\n SurfaceTint,\n SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n"]}
@@ -1,10 +1,10 @@
1
1
  import { WORKBENCH_MAIN_MIN_SIZE, WORKBENCH_MAIN_MIN_HEIGHT, workbenchRegionId, WORKBENCH_RESIZE_DEFAULTS } from './chunk-DT7KOBQJ.js';
2
- import { NavStack } from './chunk-QWAAR5JX.js';
2
+ import { NavStack } from './chunk-ZS4WBHQG.js';
3
3
  import { clampRegionSize, ResizeGrip } from './chunk-6OH734CG.js';
4
4
  import { FloatingToolbar } from './chunk-KBDYXGYT.js';
5
- import { panelToggleGroup, groupSizeFor, composedPanelBody, relocatedPanelGroups } from './chunk-ZDI5I2HT.js';
6
- import { paneConfigProps } from './chunk-EI55KWHP.js';
7
- import { Pane } from './chunk-LH5V6XGH.js';
5
+ import { panelToggleGroup, groupSizeFor, composedPanelBody, relocatedPanelGroups } from './chunk-RMGHAIV5.js';
6
+ import { paneConfigProps } from './chunk-QWB4FEWD.js';
7
+ import { Pane } from './chunk-7G6BSG4B.js';
8
8
  import { ensureSunkenTexture } from './chunk-IKS72C6P.js';
9
9
  import { Toolbar } from './chunk-XXKRHKFH.js';
10
10
  import { List } from './chunk-KKMZP3YL.js';
@@ -560,4 +560,4 @@ function Workbench({
560
560
 
561
561
  export { Workbench };
562
562
 
563
- //# sourceMappingURL=chunk-XNSYDA6G.js.map
563
+ //# sourceMappingURL=chunk-B4UWDIUL.js.map