@cueplusplus/ui 0.14.0 → 0.15.0

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 (352) hide show
  1. package/CHANGELOG.md +340 -0
  2. package/dist/agent-runtime/tool-call-card.js +1 -1
  3. package/dist/chat/message.js +1 -1
  4. package/dist/chrome/band.js +10 -4
  5. package/dist/chrome/eyebrow.js +1 -1
  6. package/dist/chrome/footer.js +1 -1
  7. package/dist/chrome/section-header.js +1 -1
  8. package/dist/configurator/configurator.js +1 -1
  9. package/dist/configurator/export-dialog.js +1 -1
  10. package/dist/configurator/panel-sections.js +1 -1
  11. package/dist/configurator/token-editor.js +1 -1
  12. package/dist/date/calendar.js +2 -2
  13. package/dist/elements/context-usage.js +3 -3
  14. package/dist/elements/transcript-rules.js +1 -1
  15. package/dist/forms/field.js +1 -1
  16. package/dist/forms/slider.js +1 -1
  17. package/dist/instruments/code-block.js +1 -1
  18. package/dist/instruments/ledger.js +1 -1
  19. package/dist/instruments/progress.js +1 -1
  20. package/dist/instruments/stat.js +1 -1
  21. package/dist/instruments/table.js +2 -2
  22. package/dist/instruments/terminal-frame.js +1 -1
  23. package/dist/layout/_ground.js +1 -1
  24. package/dist/layout/collapsible.js +1 -1
  25. package/dist/layout/description-list.js +1 -1
  26. package/dist/layout/preview.d.ts +13 -1
  27. package/dist/layout/preview.js +16 -9
  28. package/dist/layout/sidebar.js +1 -1
  29. package/dist/layout/stepper.js +1 -1
  30. package/dist/overlays/_surface.d.ts +1 -1
  31. package/dist/overlays/_surface.js +1 -1
  32. package/dist/overlays/command-palette.js +1 -1
  33. package/dist/overlays/toast.js +1 -1
  34. package/dist/primitives/chip.d.ts +1 -1
  35. package/dist/primitives/chip.js +2 -2
  36. package/dist/system/density.d.ts +11 -2
  37. package/dist/system/density.js +29 -9
  38. package/dist/system/portal.js +8 -2
  39. package/dist/system/prepaint.d.ts +18 -1
  40. package/dist/system/prepaint.js +8 -2
  41. package/dist/system/theme-provider.d.ts +42 -5
  42. package/dist/system/theme-provider.js +84 -19
  43. package/dist/system/vocabulary.d.ts +1 -1
  44. package/dist/system/vocabulary.js +14 -2
  45. package/manifest/components/accordion.json +16 -4
  46. package/manifest/components/activity-graph.json +15 -3
  47. package/manifest/components/agent-card.json +15 -3
  48. package/manifest/components/agent-handoff.json +14 -3
  49. package/manifest/components/agent-mode-badge.json +12 -3
  50. package/manifest/components/agent-pile.json +13 -3
  51. package/manifest/components/agent-plan.json +13 -3
  52. package/manifest/components/agent-status.json +14 -3
  53. package/manifest/components/agent-surface.json +12 -3
  54. package/manifest/components/alert-dialog.json +16 -4
  55. package/manifest/components/animated-number.json +12 -3
  56. package/manifest/components/app-window-frame.json +13 -3
  57. package/manifest/components/approval-card.json +14 -3
  58. package/manifest/components/artifact-card.json +14 -3
  59. package/manifest/components/ask-box.json +13 -3
  60. package/manifest/components/audience-icon.json +11 -3
  61. package/manifest/components/autocomplete.json +17 -4
  62. package/manifest/components/avatar-group.json +15 -4
  63. package/manifest/components/avatar.json +16 -4
  64. package/manifest/components/background-inbox.json +14 -3
  65. package/manifest/components/band.json +15 -5
  66. package/manifest/components/breadcrumb.json +14 -3
  67. package/manifest/components/button-group.json +13 -3
  68. package/manifest/components/calendar.json +18 -5
  69. package/manifest/components/canvas-split-body.json +13 -3
  70. package/manifest/components/canvas-split-document.json +11 -3
  71. package/manifest/components/canvas-split-header.json +13 -3
  72. package/manifest/components/canvas-split-line.json +13 -3
  73. package/manifest/components/canvas-split-message.json +13 -3
  74. package/manifest/components/canvas-split-thread.json +11 -3
  75. package/manifest/components/canvas-split.json +13 -3
  76. package/manifest/components/card.json +14 -3
  77. package/manifest/components/carousel.json +12 -3
  78. package/manifest/components/catalogue-icon.json +11 -3
  79. package/manifest/components/channel-beta-icon.json +11 -3
  80. package/manifest/components/channel-matrix.json +13 -4
  81. package/manifest/components/channel-released-icon.json +11 -3
  82. package/manifest/components/chart-container.json +11 -3
  83. package/manifest/components/chart-ramp.json +12 -3
  84. package/manifest/components/chart-swatch.json +11 -3
  85. package/manifest/components/chart-tooltip-content.json +14 -5
  86. package/manifest/components/chart.json +14 -3
  87. package/manifest/components/chat-empty-state.json +13 -3
  88. package/manifest/components/chat-panel-assistant-message.json +11 -3
  89. package/manifest/components/chat-panel-composer.json +11 -3
  90. package/manifest/components/chat-panel-messages.json +11 -3
  91. package/manifest/components/chat-panel-typing.json +11 -3
  92. package/manifest/components/chat-panel-user-message.json +11 -3
  93. package/manifest/components/chat-panel.json +13 -3
  94. package/manifest/components/checkbox-group.json +15 -4
  95. package/manifest/components/checkpoint-history.json +13 -3
  96. package/manifest/components/chip.json +1 -0
  97. package/manifest/components/clamp.json +12 -3
  98. package/manifest/components/cli-tool-icon.json +11 -3
  99. package/manifest/components/code-block.json +2 -1
  100. package/manifest/components/code-diff.json +14 -3
  101. package/manifest/components/code-runner.json +13 -3
  102. package/manifest/components/collapsible.json +15 -4
  103. package/manifest/components/color-area.json +12 -4
  104. package/manifest/components/color-field.json +12 -3
  105. package/manifest/components/color-picker.json +14 -4
  106. package/manifest/components/color-slider.json +12 -3
  107. package/manifest/components/color-swatch.json +13 -3
  108. package/manifest/components/colors-section.json +13 -4
  109. package/manifest/components/combobox.json +17 -5
  110. package/manifest/components/command-palette.json +2 -1
  111. package/manifest/components/compaction-row.json +12 -3
  112. package/manifest/components/comparison-card.json +12 -3
  113. package/manifest/components/composer-actions.json +11 -3
  114. package/manifest/components/composer-attach-button.json +11 -3
  115. package/manifest/components/composer-attachment-chip.json +13 -3
  116. package/manifest/components/composer-attachments.json +11 -3
  117. package/manifest/components/composer-bar.json +12 -3
  118. package/manifest/components/composer-command-item.json +13 -3
  119. package/manifest/components/composer-context.json +13 -3
  120. package/manifest/components/composer-input.json +11 -3
  121. package/manifest/components/composer-menu-item.json +12 -3
  122. package/manifest/components/composer-menu.json +13 -3
  123. package/manifest/components/composer-model-item.json +13 -3
  124. package/manifest/components/composer-model-trigger.json +13 -3
  125. package/manifest/components/composer-person-item.json +13 -3
  126. package/manifest/components/composer-send.json +13 -3
  127. package/manifest/components/composer-toolbar.json +11 -3
  128. package/manifest/components/composer-voice-button.json +11 -3
  129. package/manifest/components/composer-voice.json +13 -3
  130. package/manifest/components/composer.json +14 -4
  131. package/manifest/components/computer-use.json +13 -3
  132. package/manifest/components/confidence-marker.json +11 -3
  133. package/manifest/components/connection-state.json +12 -3
  134. package/manifest/components/container.json +12 -3
  135. package/manifest/components/context-breakdown.json +12 -4
  136. package/manifest/components/context-menu.json +16 -5
  137. package/manifest/components/context-usage.json +15 -4
  138. package/manifest/components/conversation-search.json +13 -3
  139. package/manifest/components/copy-button.json +14 -3
  140. package/manifest/components/cost-meter.json +12 -3
  141. package/manifest/components/cue-portal-frame.json +12 -3
  142. package/manifest/components/data-table-pagination.json +13 -3
  143. package/manifest/components/data-table-toolbar.json +12 -3
  144. package/manifest/components/date-field.json +12 -3
  145. package/manifest/components/date-picker.json +13 -3
  146. package/manifest/components/date-range-picker.json +11 -3
  147. package/manifest/components/day-separator.json +12 -3
  148. package/manifest/components/delegation-card.json +14 -4
  149. package/manifest/components/density.json +25 -2
  150. package/manifest/components/description-list.json +17 -5
  151. package/manifest/components/diagram.json +13 -3
  152. package/manifest/components/dialog.json +2 -1
  153. package/manifest/components/disclosure.json +17 -5
  154. package/manifest/components/dmx-bar.json +14 -4
  155. package/manifest/components/dmx-strip.json +13 -4
  156. package/manifest/components/document-reference.json +13 -3
  157. package/manifest/components/draft-restore.json +13 -3
  158. package/manifest/components/drawer.json +15 -5
  159. package/manifest/components/dropdown-menu.json +2 -1
  160. package/manifest/components/edit-message.json +13 -3
  161. package/manifest/components/elements-command-palette.json +13 -3
  162. package/manifest/components/elements-composer.json +13 -3
  163. package/manifest/components/elements-data-table.json +11 -3
  164. package/manifest/components/elements-timeline.json +13 -3
  165. package/manifest/components/elicitation-form.json +13 -3
  166. package/manifest/components/empty-state-composer.json +11 -3
  167. package/manifest/components/empty-state-greeting.json +11 -3
  168. package/manifest/components/empty-state-suggestion.json +11 -3
  169. package/manifest/components/empty-state-suggestions.json +11 -3
  170. package/manifest/components/empty-state.json +15 -4
  171. package/manifest/components/end-of-turn-summary.json +14 -3
  172. package/manifest/components/env-var-input.json +15 -4
  173. package/manifest/components/error-state.json +13 -3
  174. package/manifest/components/export-dialog.json +12 -3
  175. package/manifest/components/eyebrow.json +16 -5
  176. package/manifest/components/feedback-dialog.json +13 -3
  177. package/manifest/components/field-description.json +17 -5
  178. package/manifest/components/field-error.json +17 -5
  179. package/manifest/components/field-label.json +17 -5
  180. package/manifest/components/field.json +2 -1
  181. package/manifest/components/file-tree.json +13 -3
  182. package/manifest/components/file-upload.json +14 -4
  183. package/manifest/components/flow-background.json +11 -3
  184. package/manifest/components/flow-controls.json +11 -3
  185. package/manifest/components/flow-graph.json +13 -3
  186. package/manifest/components/folder-icon.json +12 -3
  187. package/manifest/components/footer.json +1 -0
  188. package/manifest/components/frac.json +11 -3
  189. package/manifest/components/frames.json +2 -1
  190. package/manifest/components/generation-loader.json +13 -3
  191. package/manifest/components/generative-ui.json +16 -4
  192. package/manifest/components/grid.json +14 -3
  193. package/manifest/components/group-bar.json +13 -3
  194. package/manifest/components/guardrail-notice.json +13 -3
  195. package/manifest/components/hover-card.json +16 -5
  196. package/manifest/components/icon-button.json +15 -3
  197. package/manifest/components/image-generation.json +13 -3
  198. package/manifest/components/info-tip.json +15 -4
  199. package/manifest/components/inline-citation.json +13 -3
  200. package/manifest/components/input-group.json +15 -4
  201. package/manifest/components/item.json +15 -4
  202. package/manifest/components/job-progress.json +14 -3
  203. package/manifest/components/kbd.json +14 -3
  204. package/manifest/components/launcher-bubble.json +14 -3
  205. package/manifest/components/ledger.json +2 -1
  206. package/manifest/components/link.json +13 -3
  207. package/manifest/components/live-region-announcer.json +16 -4
  208. package/manifest/components/log-viewer.json +15 -3
  209. package/manifest/components/map-answer.json +13 -3
  210. package/manifest/components/markdown-text.json +16 -4
  211. package/manifest/components/math-block.json +13 -3
  212. package/manifest/components/mcp-server-icon.json +12 -3
  213. package/manifest/components/mcp-server-panel.json +13 -3
  214. package/manifest/components/memory-chips.json +12 -3
  215. package/manifest/components/menubar.json +15 -4
  216. package/manifest/components/message-actions.json +14 -4
  217. package/manifest/components/message-attachments.json +12 -3
  218. package/manifest/components/message-branches.json +12 -3
  219. package/manifest/components/message-list.json +12 -3
  220. package/manifest/components/message-pair.json +12 -3
  221. package/manifest/components/message-queue.json +13 -3
  222. package/manifest/components/message-timing.json +13 -3
  223. package/manifest/components/message.json +14 -4
  224. package/manifest/components/mobile-composer.json +14 -3
  225. package/manifest/components/model-picker.json +12 -3
  226. package/manifest/components/multi-select.json +18 -5
  227. package/manifest/components/musical-time-input.json +11 -3
  228. package/manifest/components/navigation-menu.json +15 -4
  229. package/manifest/components/node-card.json +11 -3
  230. package/manifest/components/node-handle.json +11 -3
  231. package/manifest/components/number-field.json +15 -3
  232. package/manifest/components/number-ticker.json +12 -3
  233. package/manifest/components/onboarding.json +12 -3
  234. package/manifest/components/otp-field.json +14 -3
  235. package/manifest/components/page-shell.json +14 -4
  236. package/manifest/components/pagination.json +14 -3
  237. package/manifest/components/panel-header.json +14 -4
  238. package/manifest/components/password-input.json +15 -4
  239. package/manifest/components/permission-grant.json +13 -3
  240. package/manifest/components/permission-scopes.json +14 -3
  241. package/manifest/components/piano-keyboard.json +11 -3
  242. package/manifest/components/popover.json +2 -1
  243. package/manifest/components/preset-section.json +13 -4
  244. package/manifest/components/preview.json +15 -1
  245. package/manifest/components/progress.json +16 -4
  246. package/manifest/components/prompt-library.json +12 -3
  247. package/manifest/components/queue-dock.json +14 -3
  248. package/manifest/components/quota-banner.json +12 -3
  249. package/manifest/components/quote-reply.json +12 -3
  250. package/manifest/components/radio-group.json +15 -4
  251. package/manifest/components/radio.json +15 -4
  252. package/manifest/components/rating.json +15 -4
  253. package/manifest/components/read-aloud.json +13 -3
  254. package/manifest/components/reasoning-effort.json +12 -3
  255. package/manifest/components/reasoning-panel.json +13 -3
  256. package/manifest/components/recommendation-card.json +12 -3
  257. package/manifest/components/regenerate-menu.json +12 -3
  258. package/manifest/components/replay-player.json +14 -3
  259. package/manifest/components/research-report.json +12 -3
  260. package/manifest/components/resizable.json +13 -3
  261. package/manifest/components/retrieval-chunks.json +13 -3
  262. package/manifest/components/revert-dock.json +14 -3
  263. package/manifest/components/reviewable-diff.json +12 -3
  264. package/manifest/components/risk-badge.json +14 -3
  265. package/manifest/components/schedule-card.json +12 -3
  266. package/manifest/components/score-breakdown.json +13 -3
  267. package/manifest/components/scroll-anchor.json +12 -3
  268. package/manifest/components/scroll-area.json +13 -3
  269. package/manifest/components/scrollable-tabs-list.json +14 -4
  270. package/manifest/components/seam-cell.json +13 -4
  271. package/manifest/components/seam-grid.json +14 -3
  272. package/manifest/components/seam-list.json +13 -3
  273. package/manifest/components/search-input.json +15 -4
  274. package/manifest/components/section-header.json +16 -4
  275. package/manifest/components/segmented-control.json +15 -3
  276. package/manifest/components/separator.json +14 -3
  277. package/manifest/components/settings-panel.json +13 -3
  278. package/manifest/components/shape-section.json +13 -4
  279. package/manifest/components/shared-conversation.json +12 -3
  280. package/manifest/components/sheet.json +16 -5
  281. package/manifest/components/shimmer-label.json +12 -3
  282. package/manifest/components/sidebar.json +17 -5
  283. package/manifest/components/signal-edge.json +13 -4
  284. package/manifest/components/skeleton.json +16 -4
  285. package/manifest/components/skill-icon.json +12 -3
  286. package/manifest/components/slider.json +16 -4
  287. package/manifest/components/sources.json +12 -3
  288. package/manifest/components/sparkline.json +14 -4
  289. package/manifest/components/speaker-identity.json +11 -3
  290. package/manifest/components/spec-sheet.json +13 -4
  291. package/manifest/components/spectrum-visualizer.json +11 -3
  292. package/manifest/components/spinner.json +16 -4
  293. package/manifest/components/stack-icon.json +12 -3
  294. package/manifest/components/stack.json +14 -3
  295. package/manifest/components/stacks-matrix-icon.json +11 -3
  296. package/manifest/components/stat.json +15 -3
  297. package/manifest/components/status-dot.json +16 -4
  298. package/manifest/components/stepper.json +17 -5
  299. package/manifest/components/stopped-run.json +13 -4
  300. package/manifest/components/streaming-text.json +12 -3
  301. package/manifest/components/sub.json +11 -3
  302. package/manifest/components/subagent-list.json +13 -3
  303. package/manifest/components/suggestions.json +12 -3
  304. package/manifest/components/sup.json +11 -3
  305. package/manifest/components/swap-label.json +12 -3
  306. package/manifest/components/table-scroll-region.json +2 -1
  307. package/manifest/components/table.json +2 -1
  308. package/manifest/components/tags-input.json +17 -5
  309. package/manifest/components/tail-status.json +14 -3
  310. package/manifest/components/terminal-block.json +13 -3
  311. package/manifest/components/terminal-frame.json +15 -3
  312. package/manifest/components/textarea.json +15 -4
  313. package/manifest/components/theme-configurator.json +14 -4
  314. package/manifest/components/theme-provider.json +14 -1
  315. package/manifest/components/thinking-indicator.json +12 -3
  316. package/manifest/components/thread-list.json +12 -3
  317. package/manifest/components/thread-search.json +12 -3
  318. package/manifest/components/threshold-rail.json +13 -3
  319. package/manifest/components/time-boundary.json +15 -4
  320. package/manifest/components/time-field.json +15 -4
  321. package/manifest/components/timeline-ruler.json +13 -3
  322. package/manifest/components/timeline.json +13 -3
  323. package/manifest/components/title-bar.json +13 -3
  324. package/manifest/components/toast.json +2 -0
  325. package/manifest/components/todo-list.json +12 -3
  326. package/manifest/components/toggle-group.json +15 -4
  327. package/manifest/components/toggle.json +15 -4
  328. package/manifest/components/token-editor.json +14 -4
  329. package/manifest/components/tool-call-card.json +2 -1
  330. package/manifest/components/tool-call.json +13 -3
  331. package/manifest/components/tool-error.json +14 -4
  332. package/manifest/components/tool-group.json +12 -3
  333. package/manifest/components/tool-timeline.json +14 -4
  334. package/manifest/components/toolbar.json +14 -4
  335. package/manifest/components/tooltip.json +2 -1
  336. package/manifest/components/trace-waterfall.json +12 -3
  337. package/manifest/components/tree-visibility-toggle.json +13 -3
  338. package/manifest/components/tree.json +14 -3
  339. package/manifest/components/turn-footer.json +14 -3
  340. package/manifest/components/two-step-button.json +14 -3
  341. package/manifest/components/typing-indicator.json +12 -3
  342. package/manifest/components/universe-grid.json +14 -4
  343. package/manifest/components/unread-divider.json +16 -5
  344. package/manifest/components/usage-chart.json +14 -3
  345. package/manifest/components/verdict-row.json +14 -3
  346. package/manifest/components/voice-conversation.json +13 -3
  347. package/manifest/components/web-preview.json +13 -3
  348. package/manifest/components/web-search.json +13 -3
  349. package/manifest/components/work-collapse.json +15 -4
  350. package/manifest/manifest.json +667 -667
  351. package/manifest/tokens.json +29 -2
  352. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { PreviewGround } from "./_ground.js";
2
2
  import * as React from "react";
3
- import { StyleSet } from "@cueplusplus/tokens";
3
+ import { Paint, StyleSet } from "@cueplusplus/tokens";
4
4
  import { Density as Density$1, FontName, Mode, ThemeName } from "@cueplusplus/theme-base";
5
5
  //#region src/layout/preview.d.ts
6
6
  /** Where the chrome sits and what the stage's ground is. */
@@ -71,6 +71,18 @@ interface PreviewProps extends Omit<React.ComponentPropsWithoutRef<"div">, "chil
71
71
  * `<body>` and inherits nothing from the stage's DOM.
72
72
  */
73
73
  styleSet?: StyleSet;
74
+ /**
75
+ * A look pack for the stage: the finish its surfaces wear.
76
+ *
77
+ * Stamped as `data-paint` on the stage element, and republished to React for
78
+ * the same reason `styleSet` is — a popover opened on the stage mounts on
79
+ * `<body>` and inherits nothing from the stage's DOM, so it has to be told.
80
+ *
81
+ * Absent means inherit. `none` is a value that opts OUT of an ambient pack,
82
+ * which is what a stage uses to show a component unpainted inside a page that
83
+ * is not.
84
+ */
85
+ paint?: Paint;
74
86
  /**
75
87
  * Resize the stage by dragging or with the keyboard. `true` gives both axes
76
88
  * inside the default bounds (160–1280 px wide, 96–960 px tall); an object
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
3
  import { useIsomorphicLayoutEffect } from "../system/use-isomorphic-layout-effect.js";
4
- import { AmbientThemeContext, DensityContext, StyleSetContext } from "../system/density.js";
4
+ import { AmbientThemeContext, DensityContext, PaintContext, StyleSetContext } from "../system/density.js";
5
5
  import { OverridesContext } from "../system/overrides.js";
6
6
  import { ThemeContext } from "../system/theme-provider.js";
7
7
  import { GROUND_CLASSES } from "./_ground.js";
@@ -241,6 +241,7 @@ function stageAttributes(asked, page) {
241
241
  }
242
242
  if (asked.font !== void 0) attributes["data-font"] = asked.font;
243
243
  if (asked.styleSet !== void 0) attributes["data-style"] = asked.styleSet;
244
+ if (asked.paint !== void 0) attributes["data-paint"] = asked.paint;
244
245
  return attributes;
245
246
  }
246
247
  /**
@@ -258,12 +259,13 @@ function stageAttributes(asked, page) {
258
259
  * route: `useCuePortalProps()` stamps a portal container from `StyleSetContext`,
259
260
  * and a popup opened on the stage inherits nothing from the stage's DOM.
260
261
  */
261
- function StageScope({ theme, mode, density, styleSet, children }) {
262
+ function StageScope({ theme, mode, density, styleSet, paint, children }) {
262
263
  const outer = React.useContext(ThemeContext);
263
264
  const outerOverrides = React.useContext(OverridesContext);
264
265
  const outerDensity = React.useContext(DensityContext);
265
266
  const outerAmbient = React.useContext(AmbientThemeContext);
266
267
  const outerStyleSet = React.useContext(StyleSetContext);
268
+ const outerPaint = React.useContext(PaintContext);
267
269
  const value = React.useMemo(() => {
268
270
  if (outer === null || theme === void 0 && mode === void 0) return outer;
269
271
  const scoped = theme ?? outer.theme;
@@ -286,11 +288,14 @@ function StageScope({ theme, mode, density, styleSet, children }) {
286
288
  value: density ?? outerDensity,
287
289
  children: /* @__PURE__ */ jsx(StyleSetContext.Provider, {
288
290
  value: styleSet ?? outerStyleSet,
289
- children: /* @__PURE__ */ jsx(OverridesContext.Provider, {
290
- value: stamped ? null : outerOverrides,
291
- children: /* @__PURE__ */ jsx(ThemeContext.Provider, {
292
- value,
293
- children
291
+ children: /* @__PURE__ */ jsx(PaintContext.Provider, {
292
+ value: paint ?? outerPaint,
293
+ children: /* @__PURE__ */ jsx(OverridesContext.Provider, {
294
+ value: stamped ? null : outerOverrides,
295
+ children: /* @__PURE__ */ jsx(ThemeContext.Provider, {
296
+ value,
297
+ children
298
+ })
294
299
  })
295
300
  })
296
301
  })
@@ -505,7 +510,7 @@ function Grips({ label, options, size }) {
505
510
  * <Container className="max-w-(--cue-measure-prose)">…</Container>
506
511
  * </Preview>
507
512
  */
508
- const Preview = React.forwardRef(function Preview({ children, label, theme, mode, density, font, styleSet, resizable, tools, footer, presentation = "panel", name, count, ground, captions = true, className, ...elementProps }, ref) {
513
+ const Preview = React.forwardRef(function Preview({ children, label, theme, mode, density, font, styleSet, paint, resizable, tools, footer, presentation = "panel", name, count, ground, captions = true, className, ...elementProps }, ref) {
509
514
  const outer = React.useContext(ThemeContext);
510
515
  const bench = React.useRef(null);
511
516
  const given = resolveResize(resizable);
@@ -517,7 +522,8 @@ const Preview = React.forwardRef(function Preview({ children, label, theme, mode
517
522
  mode,
518
523
  density,
519
524
  font,
520
- styleSet
525
+ styleSet,
526
+ paint
521
527
  }, outer);
522
528
  const framed = presentation === "frame";
523
529
  const stage = /* @__PURE__ */ jsx("div", {
@@ -530,6 +536,7 @@ const Preview = React.forwardRef(function Preview({ children, label, theme, mode
530
536
  mode,
531
537
  density,
532
538
  styleSet,
539
+ paint,
533
540
  children
534
541
  })
535
542
  });
@@ -101,7 +101,7 @@ const Sidebar = {
101
101
  ...elementProps,
102
102
  children: [label === void 0 || collapsed ? null : /* @__PURE__ */ jsx("div", {
103
103
  "data-slot": "sidebar-section-label",
104
- className: "flex h-control-sm items-center px-(--cue-space-2) font-mono text-(length:--cue-text-label) tracking-[0.15em] text-fg-subtle uppercase",
104
+ className: "flex h-control-sm items-center px-(--cue-space-2) font-mono text-(length:--cue-text-label) tracking-(--cue-tracking-caps) text-fg-subtle uppercase",
105
105
  children: label
106
106
  }), children]
107
107
  });
@@ -43,7 +43,7 @@ const Stepper = React.forwardRef(function Stepper({ className, steps, current, o
43
43
  className: cn("min-w-0", className),
44
44
  ...elementProps,
45
45
  children: /* @__PURE__ */ jsx("ol", {
46
- className: "m-0 flex list-none flex-wrap items-center gap-(--cue-space-3) p-0 font-mono text-(length:--cue-text-label) tracking-[0.1em] uppercase",
46
+ className: "m-0 flex list-none flex-wrap items-center gap-(--cue-space-3) p-0 font-mono text-(length:--cue-text-label) tracking-(--cue-tracking-caps-tight) uppercase",
47
47
  children: steps.map((step, index) => {
48
48
  const state = currentIndex === -1 || index > currentIndex ? "upcoming" : index === currentIndex ? "current" : "complete";
49
49
  const navigable = onStepChange !== void 0 && state === "complete";
@@ -59,7 +59,7 @@ declare const overlayFooterClasses = "flex items-center justify-end gap-(--cue-s
59
59
  */
60
60
  declare const menuItemClasses = "flex h-control-sm cursor-default items-center gap-(--cue-space-2) rounded-(--radius-control) px-(--cue-space-3) font-mono text-(length:--cue-text-ui) text-fg-muted outline-none select-none data-[highlighted]:bg-accent-soft data-[highlighted]:text-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-40";
61
61
  /** The uppercase mono caption over a group of menu rows. */
62
- declare const menuLabelClasses = "flex h-control-sm items-center px-(--cue-space-3) font-mono text-(length:--cue-text-label) tracking-[0.15em] text-fg-subtle uppercase select-none";
62
+ declare const menuLabelClasses = "flex h-control-sm items-center px-(--cue-space-3) font-mono text-(length:--cue-text-label) tracking-(--cue-tracking-caps) text-fg-subtle uppercase select-none";
63
63
  /** The hairline between menu groups. */
64
64
  declare const menuSeparatorClasses = "my-(--cue-space-1) h-px bg-border";
65
65
  /** Padding of a menu popup — a single space unit so rows reach the rim. */
@@ -59,7 +59,7 @@ const overlayFooterClasses = "flex items-center justify-end gap-(--cue-space-3)
59
59
  */
60
60
  const menuItemClasses = "flex h-control-sm cursor-default items-center gap-(--cue-space-2) rounded-(--radius-control) px-(--cue-space-3) font-mono text-(length:--cue-text-ui) text-fg-muted outline-none select-none data-[highlighted]:bg-accent-soft data-[highlighted]:text-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-40";
61
61
  /** The uppercase mono caption over a group of menu rows. */
62
- const menuLabelClasses = "flex h-control-sm items-center px-(--cue-space-3) font-mono text-(length:--cue-text-label) tracking-[0.15em] text-fg-subtle uppercase select-none";
62
+ const menuLabelClasses = "flex h-control-sm items-center px-(--cue-space-3) font-mono text-(length:--cue-text-label) tracking-(--cue-tracking-caps) text-fg-subtle uppercase select-none";
63
63
  /** The hairline between menu groups. */
64
64
  const menuSeparatorClasses = "my-(--cue-space-1) h-px bg-border";
65
65
  /** Padding of a menu popup — a single space unit so rows reach the rim. */
@@ -155,7 +155,7 @@ function CommandPalette({ items, onSelect, open: openProp, defaultOpen = false,
155
155
  items: group.items,
156
156
  className: "block",
157
157
  children: [group.value === "" ? null : /* @__PURE__ */ jsx(Combobox.GroupLabel, {
158
- className: "flex h-control-sm items-center px-(--cue-space-3) font-mono text-(length:--cue-text-micro) tracking-[0.15em] text-fg-subtle uppercase select-none",
158
+ className: "flex h-control-sm items-center px-(--cue-space-3) font-mono text-(length:--cue-text-micro) tracking-(--cue-tracking-caps) text-fg-subtle uppercase select-none",
159
159
  children: group.value
160
160
  }), /* @__PURE__ */ jsx(Combobox.Collection, { children: (item) => /* @__PURE__ */ jsxs(Combobox.Item, {
161
161
  value: item,
@@ -87,7 +87,7 @@ function ToastItem({ toast, className, closeLabel }) {
87
87
  }),
88
88
  /* @__PURE__ */ jsx(Toast.Action, {
89
89
  "data-slot": "toast-action",
90
- className: "mt-(--cue-space-1) inline-flex h-control-sm w-fit cursor-pointer items-center justify-center rounded-(--radius-control) border border-border px-(--cue-space-3) font-mono text-(length:--cue-text-label) tracking-[0.1em] text-fg-muted uppercase transition-colors outline-none hover:border-border-strong hover:text-fg focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-accent"
90
+ className: "mt-(--cue-space-1) inline-flex h-control-sm w-fit cursor-pointer items-center justify-center rounded-(--radius-control) border border-border px-(--cue-space-3) font-mono text-(length:--cue-text-label) tracking-(--cue-tracking-caps-tight) text-fg-muted uppercase transition-colors outline-none hover:border-border-strong hover:text-fg focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-accent"
91
91
  }),
92
92
  /* @__PURE__ */ jsx(Toast.Close, {
93
93
  "aria-label": closeLabel,
@@ -30,7 +30,7 @@ import * as React from "react";
30
30
  * <span className={chipVariants({ variant: "tag" })}>mcp</span>
31
31
  */
32
32
  declare const chipVariants: (props?: ({
33
- tone?: "info" | "warn" | "danger" | "accent" | "ok" | "busy" | "neutral" | null | undefined;
33
+ tone?: "info" | "warn" | "danger" | "busy" | "accent" | "ok" | "neutral" | null | undefined;
34
34
  variant?: "outline" | "tinted" | "tag" | null | undefined;
35
35
  interactive?: boolean | null | undefined;
36
36
  } & ClassProp) | undefined) => string;
@@ -44,8 +44,8 @@ const chipVariants = cva("inline-flex h-chip select-none items-center justify-ce
44
44
  info: "border-info/35 text-info"
45
45
  },
46
46
  variant: {
47
- tinted: "px-(--cue-space-3) text-(length:--cue-text-label) tracking-[0.15em]",
48
- outline: "bg-transparent px-(--cue-space-3) text-(length:--cue-text-label) tracking-[0.15em]",
47
+ tinted: "px-(--cue-space-3) text-(length:--cue-text-label) tracking-(--cue-tracking-caps)",
48
+ outline: "bg-transparent px-(--cue-space-3) text-(length:--cue-text-label) tracking-(--cue-tracking-caps)",
49
49
  tag: "bg-transparent px-(--cue-space-2) text-(length:--cue-text-micro) tracking-[0.06em]"
50
50
  },
51
51
  interactive: {
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { StyleSet } from "@cueplusplus/tokens";
2
+ import { Paint, StyleSet } from "@cueplusplus/tokens";
3
3
  import { Density as Density$1 } from "@cueplusplus/theme-base";
4
4
  //#region src/system/density.d.ts
5
5
  interface DensityProps {
@@ -8,6 +8,15 @@ interface DensityProps {
8
8
  * `large` or `ultra-large`.
9
9
  */
10
10
  density: Density$1;
11
+ /**
12
+ * A look pack for this subtree.
13
+ *
14
+ * Optional, and **absent means inherit**, exactly as `styleSet` is: an island
15
+ * that names none stamps no `data-paint` and passes the ambient pack straight
16
+ * through. `none` is a *value*, not an absence — it restates the `:root`
17
+ * defaults, so a subtree stamps it to opt out of a pack its parent set.
18
+ */
19
+ paint?: Paint;
11
20
  /**
12
21
  * A style set for this subtree: `console`, `editorial` or `marketing`.
13
22
  *
@@ -68,6 +77,6 @@ interface DensityProps {
68
77
  * <Toolbar />
69
78
  * </Density>
70
79
  */
71
- declare function Density$2({ density, styleSet, children, className, style }: DensityProps): React.JSX.Element;
80
+ declare function Density$2({ density, styleSet, paint, children, className, style }: DensityProps): React.JSX.Element;
72
81
  //#endregion
73
82
  export { Density$2 as Density, DensityProps };
@@ -57,6 +57,21 @@ const AmbientThemeContext = React.createContext(null);
57
57
  */
58
58
  const StyleSetContext = React.createContext(null);
59
59
  /**
60
+ * The look pack stamped around this subtree, or `null` when none is.
61
+ *
62
+ * The fifth axis's counterpart to {@link StyleSetContext}, and internal for the
63
+ * same reasons: a provider publishes this and its `ThemeContext.paint` from one
64
+ * value, a `<Density paint>` island re-scopes it without a `ThemeContext` of its
65
+ * own, and `Preview`'s stage and the portal stamp both leave the DOM they were
66
+ * written in and have to carry the answer with them.
67
+ *
68
+ * `null` is not `"none"`. Absent means *inherit*; `none` is a pack that restates
69
+ * the `:root` defaults, which is what a subtree stamps to opt OUT of an ambient
70
+ * pack. Collapsing the two would make every unpainted subtree override its
71
+ * parent instead of inheriting from it.
72
+ */
73
+ const PaintContext = React.createContext(null);
74
+ /**
60
75
  * Re-scope any subtree to a different density level.
61
76
  *
62
77
  * Renders a plain `<div data-density="…" data-cue-theme="…">`: the geometry
@@ -89,23 +104,28 @@ const StyleSetContext = React.createContext(null);
89
104
  * <Toolbar />
90
105
  * </Density>
91
106
  */
92
- function Density({ density, styleSet, children, className, style }) {
107
+ function Density({ density, styleSet, paint, children, className, style }) {
93
108
  const theme = React.useContext(AmbientThemeContext);
94
109
  const ambientStyleSet = React.useContext(StyleSetContext);
110
+ const ambientPaint = React.useContext(PaintContext);
95
111
  return /* @__PURE__ */ jsx(DensityContext.Provider, {
96
112
  value: density,
97
113
  children: /* @__PURE__ */ jsx(StyleSetContext.Provider, {
98
114
  value: styleSet ?? ambientStyleSet,
99
- children: /* @__PURE__ */ jsx("div", {
100
- "data-density": density,
101
- "data-cue-theme": theme ?? void 0,
102
- "data-style": styleSet ?? void 0,
103
- className,
104
- style,
105
- children
115
+ children: /* @__PURE__ */ jsx(PaintContext.Provider, {
116
+ value: paint ?? ambientPaint,
117
+ children: /* @__PURE__ */ jsx("div", {
118
+ "data-density": density,
119
+ "data-cue-theme": theme ?? void 0,
120
+ "data-style": styleSet ?? void 0,
121
+ "data-paint": paint ?? void 0,
122
+ className,
123
+ style,
124
+ children
125
+ })
106
126
  })
107
127
  })
108
128
  });
109
129
  }
110
130
  //#endregion
111
- export { AmbientThemeContext, DEFAULT_DENSITY, Density, DensityContext, StyleSetContext };
131
+ export { AmbientThemeContext, DEFAULT_DENSITY, Density, DensityContext, PaintContext, StyleSetContext };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
3
3
  import { AgentSkinContext } from "./agent-skin.js";
4
- import { DensityContext, StyleSetContext } from "./density.js";
4
+ import { DensityContext, PaintContext, StyleSetContext } from "./density.js";
5
5
  import { OverridesContext } from "./overrides.js";
6
6
  import { FontFamiliesContext, FontScaleContext, ThemeContext } from "./theme-provider.js";
7
7
  import * as React from "react";
@@ -31,6 +31,7 @@ function usePortalStamp() {
31
31
  const overrides = React.useContext(OverridesContext);
32
32
  const skin = React.useContext(AgentSkinContext);
33
33
  const styleSet = React.useContext(StyleSetContext);
34
+ const paint = React.useContext(PaintContext);
34
35
  return {
35
36
  theme: theme?.theme ?? DEFAULT_THEME,
36
37
  density: island ?? theme?.density ?? "compact",
@@ -41,7 +42,8 @@ function usePortalStamp() {
41
42
  overrides,
42
43
  skin: skin?.skin ?? null,
43
44
  fidelity: skin?.fidelity ?? null,
44
- styleSet
45
+ styleSet,
46
+ paint
45
47
  };
46
48
  }
47
49
  /**
@@ -97,6 +99,7 @@ function useCuePortalProps() {
97
99
  stamp.density,
98
100
  stamp.font,
99
101
  stamp.styleSet,
102
+ stamp.paint,
100
103
  stamp.mode,
101
104
  stamp.fontScale,
102
105
  stamp.fontFamilies?.sans,
@@ -132,6 +135,8 @@ function applyStamp(element, stamp) {
132
135
  element.setAttribute("data-mode", stamp.mode);
133
136
  if (stamp.styleSet === null) element.removeAttribute("data-style");
134
137
  else element.setAttribute("data-style", stamp.styleSet);
138
+ if (stamp.paint === null) element.removeAttribute("data-paint");
139
+ else element.setAttribute("data-paint", stamp.paint);
135
140
  if (stamp.skin === null) element.removeAttribute("data-cue-skin");
136
141
  else element.setAttribute("data-cue-skin", stamp.skin);
137
142
  if (stamp.fidelity === null) element.removeAttribute("data-cue-fidelity");
@@ -182,6 +187,7 @@ function CuePortalFrame({ children, className, style }) {
182
187
  "data-font": stamp.font,
183
188
  "data-mode": stamp.mode,
184
189
  "data-style": stamp.styleSet ?? void 0,
190
+ "data-paint": stamp.paint ?? void 0,
185
191
  "data-cue-skin": stamp.skin ?? void 0,
186
192
  "data-cue-fidelity": stamp.fidelity ?? void 0,
187
193
  className,
@@ -1,4 +1,4 @@
1
- import { StyleSet } from "@cueplusplus/tokens";
1
+ import { Paint, StyleSet } from "@cueplusplus/tokens";
2
2
  import { Density as Density$1, FontName, Mode, ThemeManifest, ThemeName } from "@cueplusplus/theme-base";
3
3
  //#region src/system/prepaint.d.ts
4
4
  /** localStorage key the ThemeProvider and the pre-paint script share by default. */
@@ -21,6 +21,13 @@ interface PersistedPreferences {
21
21
  * value to hold an opinion about.
22
22
  */
23
23
  style?: string;
24
+ /**
25
+ * Last look pack the user picked, or absent — which is what "no pack" means,
26
+ * for exactly the reason `style` above gives. An application that never
27
+ * touches this axis keeps storing the object it always stored, and the
28
+ * pre-paint script has no sixth value to hold an opinion about.
29
+ */
30
+ paint?: string;
24
31
  }
25
32
  /**
26
33
  * The server-authoritative fallback stamped when storage is absent or ignored.
@@ -52,6 +59,16 @@ interface PrepaintDefaults {
52
59
  * (stored, then this) rather than four.
53
60
  */
54
61
  styleSet?: StyleSet;
62
+ /**
63
+ * The look pack an unstamped page opens on, or omitted for none.
64
+ *
65
+ * The second axis whose absence is a value, and it behaves exactly as
66
+ * `styleSet` does: omitted means the script REMOVES `data-paint` rather than
67
+ * stamping a default, because a page in no pack has made no claim about
68
+ * finish and `[data-paint]` blocks key their whole value-set on the attribute
69
+ * being there.
70
+ */
71
+ paint?: Paint;
55
72
  }
56
73
  /** Options form for apps whose server projection, not localStorage, owns first paint. */
57
74
  interface PrepaintOptions {
@@ -1,5 +1,5 @@
1
1
  import { vocabulary } from "./vocabulary.js";
2
- import { DEFAULT_DENSITY, DEFAULT_FONT, STYLE_SETS } from "@cueplusplus/tokens";
2
+ import { DEFAULT_DENSITY, DEFAULT_FONT, PAINTS, STYLE_SETS } from "@cueplusplus/tokens";
3
3
  import { MODES } from "@cueplusplus/theme-base";
4
4
  //#region src/system/prepaint.ts
5
5
  /**
@@ -114,7 +114,13 @@ function prepaintScript(storageKeyOrOptions = DEFAULT_STORAGE_KEY, defaultTheme
114
114
  */
115
115
  const styleSets = scriptSafe(JSON.stringify([...STYLE_SETS]));
116
116
  const fallbackStyleSet = defaults.styleSet === void 0 ? "null" : jsStringLiteral(defaults.styleSet);
117
- return `!function(){try{var k=${key},e=document.documentElement,s=null;` + (readStoredPreferences ? "try{var r=localStorage.getItem(k);s=r?JSON.parse(r):null}catch(_){}" : "") + `s=s&&typeof s=="object"?s:{};var T=${themes},A=${axes},P=/^[a-z][a-z0-9-]*$/i;var t=T?(T.indexOf(s.theme)>-1?s.theme:${fallbackTheme}):(typeof s.theme=="string"&&P.test(s.theme)?s.theme:${fallbackTheme});var a=A[T?t:""]||A[""]||{d:[],f:[]};var d=a.d.indexOf(s.density)>-1?s.density:(a.d.indexOf(${fallbackDensity})>-1?${fallbackDensity}:(a.p&&a.d.indexOf(a.p)>-1?a.p:${baseDensity}));var f=a.f.indexOf(s.font)>-1?s.font:(a.f.indexOf(${fallbackFont})>-1?${fallbackFont}:(a.q&&a.f.indexOf(a.q)>-1?a.q:${baseFont}));var m=${modes}.indexOf(s.mode)>-1?s.mode:${fallbackMode};var S=${styleSets},y=S.indexOf(s.style)>-1?s.style:${fallbackStyleSet};e.setAttribute("data-theme",t);e.setAttribute("data-density",d);e.setAttribute("data-font",f);e.setAttribute("data-mode",m);y?e.setAttribute("data-style",y):e.removeAttribute("data-style");e.style.colorScheme=a.l===false?"dark":(m==="system"?"light dark":m)}catch(_){}}()`;
117
+ /**
118
+ * The packs, inlined for the same reason as everything above it, and the
119
+ * second axis whose absence is a legal value.
120
+ */
121
+ const paints = scriptSafe(JSON.stringify([...PAINTS]));
122
+ const fallbackPaint = defaults.paint === void 0 ? "null" : jsStringLiteral(defaults.paint);
123
+ return `!function(){try{var k=${key},e=document.documentElement,s=null;` + (readStoredPreferences ? "try{var r=localStorage.getItem(k);s=r?JSON.parse(r):null}catch(_){}" : "") + `s=s&&typeof s=="object"?s:{};var T=${themes},A=${axes},P=/^[a-z][a-z0-9-]*$/i;var t=T?(T.indexOf(s.theme)>-1?s.theme:${fallbackTheme}):(typeof s.theme=="string"&&P.test(s.theme)?s.theme:${fallbackTheme});var a=A[T?t:""]||A[""]||{d:[],f:[]};var d=a.d.indexOf(s.density)>-1?s.density:(a.d.indexOf(${fallbackDensity})>-1?${fallbackDensity}:(a.p&&a.d.indexOf(a.p)>-1?a.p:${baseDensity}));var f=a.f.indexOf(s.font)>-1?s.font:(a.f.indexOf(${fallbackFont})>-1?${fallbackFont}:(a.q&&a.f.indexOf(a.q)>-1?a.q:${baseFont}));var m=${modes}.indexOf(s.mode)>-1?s.mode:${fallbackMode};var S=${styleSets},y=S.indexOf(s.style)>-1?s.style:${fallbackStyleSet};var G=${paints},g=G.indexOf(s.paint)>-1?s.paint:${fallbackPaint};e.setAttribute("data-theme",t);e.setAttribute("data-density",d);e.setAttribute("data-font",f);e.setAttribute("data-mode",m);y?e.setAttribute("data-style",y):e.removeAttribute("data-style");g?e.setAttribute("data-paint",g):e.removeAttribute("data-paint");e.style.colorScheme=a.l===false?"dark":(m==="system"?"light dark":m)}catch(_){}}()`;
118
124
  }
119
125
  //#endregion
120
126
  export { DEFAULT_STORAGE_KEY, prepaintScript };
@@ -1,6 +1,6 @@
1
1
  import { TokenOverrides } from "./overrides.js";
2
2
  import * as React from "react";
3
- import { StyleSet } from "@cueplusplus/tokens";
3
+ import { Paint, StyleSet } from "@cueplusplus/tokens";
4
4
  import { Density as Density$1, FontName, Mode, ThemeManifest, ThemeName } from "@cueplusplus/theme-base";
5
5
  //#region src/system/theme-provider.d.ts
6
6
  /** A mode that has been resolved to an actual palette — `"system"` never survives this far. */
@@ -33,6 +33,14 @@ interface ThemeContextValue {
33
33
  * `StyleSetContext` the portal and stage stamps read are one value.
34
34
  */
35
35
  styleSet: StyleSet | null;
36
+ /**
37
+ * The look pack in force on this subtree, or `null`.
38
+ *
39
+ * *In force*, not *named here*, exactly as `styleSet` is: a provider that
40
+ * names no pack reports the one stamped around it, so this and the
41
+ * `PaintContext` the portal and stage stamps read are one value.
42
+ */
43
+ paint: Paint | null;
36
44
  /** Mode after resolving `"system"` against `prefers-color-scheme`. */
37
45
  resolvedMode: ResolvedMode;
38
46
  /** Switch theme and persist the new preference triple. */
@@ -58,6 +66,8 @@ interface ThemeContextValue {
58
66
  * out-specify an ancestor's in a cascade.
59
67
  */
60
68
  setStyleSet: (next: StyleSet | null) => void;
69
+ /** Switch the look pack and persist it. `null` clears the attribute. */
70
+ setPaint: (next: Paint | null) => void;
61
71
  }
62
72
  /** Provider-owned font-family overrides that detached portals must republish. */
63
73
  interface FontFamilies {
@@ -164,6 +174,11 @@ interface ThemeProviderProps {
164
174
  * holds its own rather than handing the axis up to the root.
165
175
  */
166
176
  styleSet?: StyleSet;
177
+ /**
178
+ * A look pack for this subtree. Opt-in: a provider that names none stamps no
179
+ * `data-paint`, and a nested one inherits the pack stamped around it.
180
+ */
181
+ paint?: Paint;
167
182
  /** Multiplier on every text token, published as `--cue-font-scale`. Defaults to `1`. */
168
183
  fontScale?: number;
169
184
  /** Optional app-owned font stacks, published as inline CUE font custom properties. */
@@ -237,7 +252,8 @@ interface ThemeProviderProps {
237
252
  /** Restore and write root preferences in localStorage. Defaults to `true`. */
238
253
  persistPreferences?: boolean;
239
254
  /**
240
- * The Content-Security-Policy nonce for the density override layer.
255
+ * The Content-Security-Policy nonce for every `<style>` element this tree
256
+ * renders — this library's and Base UI's.
241
257
  *
242
258
  * When `overrides.densities` is set this provider emits one `<style>`
243
259
  * element (see {@link ThemeProviderProps.overrides}). Under a policy of
@@ -246,10 +262,31 @@ interface ThemeProviderProps {
246
262
  * cannot pick up a server nonce by itself. Pass the request's nonce here and
247
263
  * it is set on the element.
248
264
  *
249
- * Nothing else in this library emits a `<style>` element, and
265
+ * It also reaches **Base UI**. Given a nonce, this provider renders
266
+ * `@base-ui/react`'s own `CSPProvider` around the tree, so the hoisted
267
+ * `<style>` that `ScrollAreaRoot` and `SelectPopup` emit carries it too.
268
+ * Without that, a strict policy refuses it by content hash on every page
269
+ * rendering a Select, a Popover or a ScrollArea — and a consumer has no way
270
+ * to guess the remedy lives in a peer dependency's provider. An outer
271
+ * `CSPProvider` a consumer renders itself is left alone: no nonce here means
272
+ * no provider here, rather than one that overwrites theirs with `undefined`.
273
+ *
250
274
  * `prepaintScript()` returns a *string* the application renders in a
251
275
  * `<script>` of its own — so the application already controls that element's
252
- * nonce, and this prop is the whole of what a strict policy needs from here.
276
+ * nonce, and between it and this prop a strict policy needs nothing else
277
+ * from here.
278
+ *
279
+ * **Pass this OR render your own `CSPProvider` — not both.** Base UI's
280
+ * context carries a second value beside the nonce, `disableStyleElements`,
281
+ * and its provider is the only public way to set either: the package exports
282
+ * `CSPProvider` and no hook, so a provider rendered here *replaces* an outer
283
+ * one rather than extending it. Given a nonce this provider therefore sets
284
+ * `disableStyleElements` back to its default, and a consumer who had turned
285
+ * it on outside loses it silently — Base UI resumes emitting the very style
286
+ * element they suppressed. An application already rendering its own
287
+ * `CSPProvider` needs nothing from this prop: leave it unset and the outer
288
+ * context survives untouched, which is the case
289
+ * `base-ui-nonce-outer-provider.test.tsx` pins.
253
290
  *
254
291
  * **A nonce cannot rescue a style ATTRIBUTE**, and this provider always sets
255
292
  * one on its root: `color-scheme` and `--cue-font-scale`, plus the font
@@ -308,6 +345,6 @@ interface ThemeProviderProps {
308
345
  * <App />
309
346
  * </ThemeProvider>
310
347
  */
311
- declare function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityProp, mode: modeProp, font: fontProp, styleSet: styleSetProp, fontScale, fontFamilies, overrides, storageKey, persistPreferences, nonce, asChild, className, style: styleProp, children }: ThemeProviderProps): React.JSX.Element;
348
+ declare function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityProp, mode: modeProp, font: fontProp, styleSet: styleSetProp, paint: paintProp, fontScale, fontFamilies, overrides, storageKey, persistPreferences, nonce, asChild, className, style: styleProp, children }: ThemeProviderProps): React.JSX.Element;
312
349
  //#endregion
313
350
  export { FontFamilies, ResolvedMode, ThemeContextValue, ThemeProvider, ThemeProviderProps };