nudge-ui 0.2.4 → 0.2.5

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 (250) hide show
  1. package/dist/cli/agentCommand.js +4 -28
  2. package/dist/client.mjs +863 -213
  3. package/dist/hosts/next/wrapper.js +1 -7
  4. package/dist/hosts/projectBridge.js +3 -17
  5. package/dist/inspector/agent/McpConnectionDialog.js +7 -3
  6. package/dist/inspector/agent/activity.d.ts +1 -1
  7. package/dist/inspector/agent/activity.js +3 -2
  8. package/dist/inspector/agent/client.d.ts +2 -2
  9. package/dist/inspector/agent/client.js +28 -29
  10. package/dist/inspector/agent/connectionStatus.d.ts +3 -1
  11. package/dist/inspector/agent/connectionStatus.js +25 -0
  12. package/dist/inspector/agent/httpTransport.js +31 -147
  13. package/dist/inspector/agent/protocol.d.ts +1 -1
  14. package/dist/inspector/agent/protocol.js +1 -1
  15. package/dist/inspector/agent/verification.d.ts +1 -1
  16. package/dist/inspector/agent/verification.js +7 -4
  17. package/dist/inspector/boot.d.ts +3 -0
  18. package/dist/inspector/boot.js +297 -0
  19. package/dist/inspector/canvas/AgentActivityOverlay.d.ts +2 -1
  20. package/dist/inspector/canvas/AgentActivityOverlay.js +6 -3
  21. package/dist/inspector/canvas/CanvasCard.js +21 -12
  22. package/dist/inspector/canvas/CanvasElementOverlay.js +82 -127
  23. package/dist/inspector/canvas/CanvasToolbar.js +2 -1
  24. package/dist/inspector/canvas/CanvasWorkspace.js +74 -97
  25. package/dist/inspector/canvas/LockedWorkspaceNotice.d.ts +3 -2
  26. package/dist/inspector/canvas/LockedWorkspaceNotice.js +10 -6
  27. package/dist/inspector/canvas/PageCard.d.ts +10 -0
  28. package/dist/inspector/canvas/PageCard.js +51 -0
  29. package/dist/inspector/canvas/SketchToolOptions.d.ts +5 -0
  30. package/dist/inspector/canvas/SketchToolOptions.js +86 -0
  31. package/dist/inspector/canvas/StaleChangeIndicator.d.ts +1 -1
  32. package/dist/inspector/canvas/StaleChangeIndicator.js +1 -1
  33. package/dist/inspector/canvas/ToolOptionsDrawer.d.ts +21 -0
  34. package/dist/inspector/canvas/ToolOptionsDrawer.js +77 -0
  35. package/dist/inspector/canvas/activeCanvasDocument.d.ts +3 -2
  36. package/dist/inspector/canvas/assets/eraser.svg +28 -0
  37. package/dist/inspector/canvas/assets/pen.svg +25 -0
  38. package/dist/inspector/canvas/canvasFrame.d.ts +16 -0
  39. package/dist/inspector/canvas/canvasFrame.js +10 -0
  40. package/dist/inspector/canvas/canvasGestures.d.ts +0 -1
  41. package/dist/inspector/canvas/canvasGestures.js +0 -6
  42. package/dist/inspector/canvas/canvasStore.d.ts +6 -0
  43. package/dist/inspector/canvas/canvasStore.js +36 -1
  44. package/dist/inspector/canvas/frameConnection.d.ts +48 -0
  45. package/dist/inspector/canvas/frameConnection.js +73 -0
  46. package/dist/inspector/canvas/frameProtocol.d.ts +18 -1
  47. package/dist/inspector/canvas/frameProtocol.js +36 -0
  48. package/dist/inspector/canvas/pageSurface.d.ts +11 -0
  49. package/dist/inspector/canvas/pageSurface.js +34 -0
  50. package/dist/inspector/canvas/projection.d.ts +19 -9
  51. package/dist/inspector/canvas/projection.js +58 -31
  52. package/dist/inspector/canvas/rendererBootstrap.js +4 -1
  53. package/dist/inspector/canvas/rendererElementSelector.js +9 -1
  54. package/dist/inspector/canvas/rendererMessageRouter.d.ts +4 -5
  55. package/dist/inspector/canvas/rendererMessageRouter.js +12 -16
  56. package/dist/inspector/canvas/rendererSelectionProxy.d.ts +7 -1
  57. package/dist/inspector/canvas/rendererSelectionProxy.js +8 -36
  58. package/dist/inspector/canvas/rendererStylesheet.js +15 -0
  59. package/dist/inspector/canvas/sessionStore.d.ts +2 -2
  60. package/dist/inspector/canvas/sessionStore.js +12 -9
  61. package/dist/inspector/canvas/staleChangeDetector.d.ts +1 -1
  62. package/dist/inspector/canvas/staleChangeDetector.js +10 -22
  63. package/dist/inspector/changes/codecs.d.ts +1 -0
  64. package/dist/inspector/changes/codecs.js +20 -5
  65. package/dist/inspector/changes/draftPreview.d.ts +12 -0
  66. package/dist/inspector/changes/draftPreview.js +133 -0
  67. package/dist/inspector/changes/editModel.d.ts +8 -0
  68. package/dist/inspector/changes/editModel.js +8 -2
  69. package/dist/inspector/changes/managedStyleProjection.js +2 -1
  70. package/dist/inspector/changes/previewDiagnostics.js +1 -1
  71. package/dist/inspector/changes/types.d.ts +11 -1
  72. package/dist/inspector/comments/CommentsOverlay.js +18 -16
  73. package/dist/inspector/comments/store.js +3 -2
  74. package/dist/inspector/comments/verification.js +1 -1
  75. package/dist/inspector/componentSemantics/ComponentPropsSection.js +2 -1
  76. package/dist/inspector/componentSemantics/changeAction.js +1 -1
  77. package/dist/inspector/componentSemantics/textBinding.d.ts +1 -2
  78. package/dist/inspector/componentSemantics/textBinding.js +4 -45
  79. package/dist/inspector/drafts/draftStore.d.ts +109 -0
  80. package/dist/inspector/drafts/draftStore.js +451 -0
  81. package/dist/inspector/drafts/model.d.ts +9 -1
  82. package/dist/inspector/drafts/model.js +5 -1
  83. package/dist/inspector/drafts/store.d.ts +53 -15
  84. package/dist/inspector/drafts/store.js +143 -169
  85. package/dist/inspector/index.d.ts +2 -4
  86. package/dist/inspector/index.js +2 -264
  87. package/dist/inspector/inline-text/inlineTextEditor.d.ts +1 -1
  88. package/dist/inspector/inline-text/inlineTextEditor.js +1 -2
  89. package/dist/inspector/inline-text/textEditChange.d.ts +1 -1
  90. package/dist/inspector/inspection/bridge.d.ts +1 -1
  91. package/dist/inspector/inspection/bridge.js +2 -1
  92. package/dist/inspector/inspection/browserCssInspection.d.ts +8 -0
  93. package/dist/inspector/inspection/browserCssInspection.js +28 -6
  94. package/dist/inspector/inspection/inspectionSnapshot.d.ts +6 -0
  95. package/dist/inspector/inspection/inspectionSnapshot.js +10 -0
  96. package/dist/inspector/inspection/performanceDiagnostics.d.ts +18 -0
  97. package/dist/inspector/inspection/performanceDiagnostics.js +31 -0
  98. package/dist/inspector/inspection/useBrowserCssInspection.js +17 -38
  99. package/dist/inspector/iterations/capture.d.ts +2 -1
  100. package/dist/inspector/iterations/client.d.ts +2 -1
  101. package/dist/inspector/iterations/coordinator.d.ts +4 -3
  102. package/dist/inspector/iterations/coordinator.js +5 -3
  103. package/dist/inspector/iterations/prompt.js +9 -8
  104. package/dist/inspector/overlay/interactionStyles.js +17 -0
  105. package/dist/inspector/pageInspector.d.ts +42 -0
  106. package/dist/inspector/pageInspector.js +342 -0
  107. package/dist/inspector/projection/draftProjection.d.ts +10 -2
  108. package/dist/inspector/projection/draftProjection.js +9 -1
  109. package/dist/inspector/projection/managedStylesheet.js +24 -4
  110. package/dist/inspector/projection/renderedInstance.js +7 -1
  111. package/dist/inspector/projection/structuralProjection.d.ts +0 -9
  112. package/dist/inspector/projection/structuralProjection.js +14 -44
  113. package/dist/inspector/projection/textProjection.d.ts +8 -2
  114. package/dist/inspector/projection/textProjection.js +21 -13
  115. package/dist/inspector/prompt/clipboardHandoff.d.ts +9 -0
  116. package/dist/inspector/prompt/clipboardHandoff.js +42 -16
  117. package/dist/inspector/prompt/generatePrompt.d.ts +1 -1
  118. package/dist/inspector/prompt/generatePrompt.js +243 -147
  119. package/dist/inspector/prompt/promptDocument.d.ts +3 -0
  120. package/dist/inspector/prompt/promptDocument.js +8 -0
  121. package/dist/inspector/prompt/promptSettings.js +7 -5
  122. package/dist/inspector/runtime/inspectorStorage.d.ts +17 -0
  123. package/dist/inspector/runtime/inspectorStorage.js +42 -0
  124. package/dist/inspector/runtime/ownedStylesheets.d.ts +20 -0
  125. package/dist/inspector/runtime/ownedStylesheets.js +72 -0
  126. package/dist/inspector/runtime/runtimeConfig.d.ts +4 -0
  127. package/dist/inspector/runtime/runtimeConfig.js +10 -1
  128. package/dist/inspector/runtime/runtimeIdentityClaims.d.ts +29 -0
  129. package/dist/inspector/runtime/runtimeIdentityClaims.js +188 -0
  130. package/dist/inspector/runtime/staticHtmlRuntimeIdentity.d.ts +15 -0
  131. package/dist/inspector/runtime/staticHtmlRuntimeIdentity.js +113 -29
  132. package/dist/inspector/selection/editScope.d.ts +1 -0
  133. package/dist/inspector/selection/editScope.js +13 -2
  134. package/dist/inspector/shell/AgentStatusButton.js +2 -2
  135. package/dist/inspector/shell/AppShell.js +6 -2
  136. package/dist/inspector/shell/ChangesLog.js +27 -9
  137. package/dist/inspector/shell/CopyPromptButton.js +60 -54
  138. package/dist/inspector/shell/EmptyState.js +3 -3
  139. package/dist/inspector/shell/InspectorShell.d.ts +0 -3
  140. package/dist/inspector/shell/InspectorShell.js +21 -13
  141. package/dist/inspector/shell/PeekOriginalButton.js +3 -3
  142. package/dist/inspector/shell/interactionStatePreview.d.ts +9 -0
  143. package/dist/inspector/shell/interactionStatePreview.js +112 -0
  144. package/dist/inspector/shell/originalPreview.d.ts +3 -2
  145. package/dist/inspector/shell/originalPreview.js +10 -37
  146. package/dist/inspector/shell/stateValue.js +2 -3
  147. package/dist/inspector/sketch/SketchEditor.js +5 -4
  148. package/dist/inspector/sketch/SketchFrameOverlay.d.ts +2 -1
  149. package/dist/inspector/sketch/SketchFrameOverlay.js +5 -4
  150. package/dist/inspector/sketch/SketchOverlay.d.ts +3 -5
  151. package/dist/inspector/sketch/SketchOverlay.js +139 -263
  152. package/dist/inspector/sketch/SketchPromptPanel.d.ts +1 -1
  153. package/dist/inspector/sketch/SketchPromptPanel.js +8 -1
  154. package/dist/inspector/sketch/SketchThumbnail.d.ts +5 -0
  155. package/dist/inspector/sketch/SketchThumbnail.js +18 -0
  156. package/dist/inspector/sketch/SketchWorkspace.d.ts +1 -2
  157. package/dist/inspector/sketch/SketchWorkspace.js +69 -34
  158. package/dist/inspector/sketch/capture.js +19 -3
  159. package/dist/inspector/sketch/copySketch.d.ts +10 -0
  160. package/dist/inspector/sketch/copySketch.js +52 -0
  161. package/dist/inspector/sketch/drawingTools.d.ts +17 -0
  162. package/dist/inspector/sketch/drawingTools.js +47 -0
  163. package/dist/inspector/sketch/frameHeading.d.ts +9 -0
  164. package/dist/inspector/sketch/frameHeading.js +30 -0
  165. package/dist/inspector/sketch/freehand.js +3 -3
  166. package/dist/inspector/sketch/geometry.d.ts +6 -0
  167. package/dist/inspector/sketch/geometry.js +19 -0
  168. package/dist/inspector/sketch/history.d.ts +30 -0
  169. package/dist/inspector/sketch/history.js +58 -0
  170. package/dist/inspector/sketch/interaction.d.ts +1 -3
  171. package/dist/inspector/sketch/interaction.js +6 -9
  172. package/dist/inspector/sketch/model.d.ts +35 -1
  173. package/dist/inspector/sketch/model.js +116 -61
  174. package/dist/inspector/sketch/persistence.d.ts +14 -0
  175. package/dist/inspector/sketch/persistence.js +63 -7
  176. package/dist/inspector/sketch/raster.d.ts +6 -2
  177. package/dist/inspector/sketch/raster.js +43 -17
  178. package/dist/inspector/sketch/store.d.ts +1 -1
  179. package/dist/inspector/sketch/store.js +1 -1
  180. package/dist/inspector/sketch/videoFrames.d.ts +6 -0
  181. package/dist/inspector/sketch/videoFrames.js +81 -0
  182. package/dist/inspector/styleEditors/BackgroundEditor.js +2 -1
  183. package/dist/inspector/styleEditors/BorderEditor.js +30 -130
  184. package/dist/inspector/styleEditors/BorderRadiusEditor.js +8 -3
  185. package/dist/inspector/styleEditors/ImageBackgroundEditor.js +1 -1
  186. package/dist/inspector/styleEditors/LayoutSection.js +2 -2
  187. package/dist/inspector/styleEditors/borderModel.d.ts +42 -0
  188. package/dist/inspector/styleEditors/borderModel.js +114 -0
  189. package/dist/inspector/styleEditors/layoutValue.js +2 -3
  190. package/dist/inspector/tokens/TokenField.js +34 -3
  191. package/dist/inspector/tokens/TokensPanel.js +2 -1
  192. package/dist/inspector/tokens/editActions.d.ts +3 -3
  193. package/dist/inspector/tokens/editActions.js +9 -3
  194. package/dist/inspector/tokens/resolution/containerQueryEvaluator.d.ts +15 -0
  195. package/dist/inspector/tokens/resolution/containerQueryEvaluator.js +86 -0
  196. package/dist/inspector/tokens/resolution/cssomCollector.js +44 -9
  197. package/dist/inspector/tokens/resolution/nestedSelectors.d.ts +6 -0
  198. package/dist/inspector/tokens/resolution/nestedSelectors.js +67 -0
  199. package/dist/inspector/tokens/resolution/ruleMatching.js +23 -4
  200. package/dist/inspector/tokens/resolution.d.ts +6 -3
  201. package/dist/inspector/tokens/resolution.js +91 -112
  202. package/dist/inspector/tokens/tokenEdits.d.ts +1 -1
  203. package/dist/inspector/tokens/tokenEdits.js +1 -1
  204. package/dist/inspector/ui/InlineStyleWarning.js +2 -2
  205. package/dist/inspector/ui/InspectorStyle.d.ts +8 -0
  206. package/dist/inspector/ui/InspectorStyle.js +26 -0
  207. package/dist/inspector/ui/PopoverListbox.d.ts +2 -1
  208. package/dist/inspector/ui/PopoverListbox.js +3 -3
  209. package/dist/inspector/ui/Toast.d.ts +14 -0
  210. package/dist/inspector/ui/Toast.js +30 -0
  211. package/dist/inspector/ui/assets/canvasIllustration.d.ts +2 -0
  212. package/dist/inspector/ui/assets/canvasIllustration.js +21 -0
  213. package/dist/inspector/ui/assets/gridIllustration.d.ts +2 -0
  214. package/dist/inspector/ui/assets/{grid.svg → gridIllustration.js} +3 -2
  215. package/dist/inspector/ui/customCursors.d.ts +5 -0
  216. package/dist/inspector/ui/customCursors.js +32 -6
  217. package/dist/inspector/ui/styles.js +12 -10
  218. package/dist/inspector/workspace/commands.js +1 -2
  219. package/dist/inspector/workspace/controller.js +1 -2
  220. package/dist/inspector/workspace/handoff.js +3 -2
  221. package/dist/inspector/workspace/sentItems.d.ts +3 -6
  222. package/dist/inspector/workspace/sentItems.js +6 -24
  223. package/dist/inspector/workspace/timeline.d.ts +24 -10
  224. package/dist/inspector/workspace/timeline.js +118 -96
  225. package/dist/internal/agent-protocol.d.ts +50 -13
  226. package/dist/internal/agent-protocol.js +145 -19
  227. package/dist/nudge-ui.mjs +81 -65
  228. package/dist/project/mcpPackage.d.ts +8 -0
  229. package/dist/project/mcpPackage.js +60 -0
  230. package/package.json +12 -2
  231. package/dist/inspector/canvas/measurementProjection.d.ts +0 -8
  232. package/dist/inspector/canvas/measurementProjection.js +0 -16
  233. package/dist/inspector/changes/changesLog.d.ts +0 -49
  234. package/dist/inspector/changes/changesLog.js +0 -255
  235. package/dist/inspector/changes/draftChanges.d.ts +0 -58
  236. package/dist/inspector/changes/draftChanges.js +0 -304
  237. package/dist/inspector/conformance/projection.d.ts +0 -2
  238. package/dist/inspector/conformance/projection.js +0 -3
  239. package/dist/inspector/inline-text/textChangeBoundary.d.ts +0 -6
  240. package/dist/inspector/inline-text/textChangeBoundary.js +0 -1
  241. package/dist/inspector/overlay/InspectorOverlay.d.ts +0 -5
  242. package/dist/inspector/overlay/InspectorOverlay.js +0 -332
  243. package/dist/inspector/overlay/elementSelector.d.ts +0 -1
  244. package/dist/inspector/overlay/elementSelector.js +0 -111
  245. package/dist/inspector/sketch/SketchChanges.d.ts +0 -2
  246. package/dist/inspector/sketch/SketchChanges.js +0 -72
  247. package/dist/inspector/sketch/SketchEntryButton.d.ts +0 -4
  248. package/dist/inspector/sketch/SketchEntryButton.js +0 -11
  249. package/dist/inspector/sketch/SketchLayersPanel.d.ts +0 -2
  250. package/dist/inspector/sketch/SketchLayersPanel.js +0 -71
@@ -1,5 +1,6 @@
1
1
  import { readTailwindV4AlphaUtility, tailwindV4AlphaExpression } from "../../css/dialects/index.js";
2
2
  import { getElementComputedStyle } from "../runtime/domRealm.js";
3
+ import { createContainerQueryEvaluator } from "./resolution/containerQueryEvaluator.js";
3
4
  import { collectRules as collectCssomRules, documentRevisions as getDocumentRevisions, registerResolutionLineage, } from "./resolution/cssomCollector.js";
4
5
  import { createRuleMatcher, matchRuleForElement } from "./resolution/ruleMatching.js";
5
6
  import { compareAuthorCascade } from "./resolution/cascade.js";
@@ -126,46 +127,14 @@ function hydratePropertyOpacityRows(rows, computed) {
126
127
  function capabilityFor(property, value, tokenTable) {
127
128
  return interpretValue(property, value, createInspectorValueContext(tokenTable))[0].capability;
128
129
  }
129
- let containerProbeSequence = 0;
130
- /**
131
- * Container conditions are element-relative. CSSOM exposes their text but has
132
- * no `matches` API, so ask the browser by applying an inert custom property to
133
- * the selected element inside an equivalent temporary @container wrapper.
134
- */
135
- function matchesContainerQuery(el, params) {
136
- const doc = el.ownerDocument;
137
- if (!doc.head || !params)
138
- return false;
139
- const id = ++containerProbeSequence;
140
- const marker = `data-container-probe-${id}`;
141
- const property = `--container-probe-${id}`;
142
- const style = doc.createElement("style");
143
- style.setAttribute("data-nudge-ui", "container-probe");
144
- style.textContent = `@container ${params} { [${marker}] { ${property}: 1; } }`;
145
- el.setAttribute(marker, "");
146
- doc.head.appendChild(style);
147
- try {
148
- return getElementComputedStyle(el).getPropertyValue(property).trim() === "1";
149
- }
150
- catch {
151
- return false;
152
- }
153
- finally {
154
- style.remove();
155
- el.removeAttribute(marker);
156
- }
157
- }
158
- function atRulesApplyToElement(el, atRules) {
130
+ function atRulesApplyToElement(el, atRules, evaluator) {
159
131
  const view = el.ownerDocument.defaultView;
160
- return (atRules ?? []).every((atRule) => {
161
- if (atRule.kind === "container")
162
- return matchesContainerQuery(el, atRule.params);
163
- if (atRule.kind === "supports")
164
- return view?.CSS?.supports(atRule.params) ?? false;
165
- return true;
166
- });
132
+ if ((atRules ?? []).some((rule) => rule.kind === "supports" && !view?.CSS?.supports(rule.params)))
133
+ return false;
134
+ const conditions = (atRules ?? []).filter((rule) => rule.kind === "container").map((rule) => rule.params);
135
+ return conditions.length === 0 || evaluator.matches(el, conditions);
167
136
  }
168
- function collectLocalAliases(el, rules, ruleApplies) {
137
+ function collectLocalAliases(el, rules) {
169
138
  // Custom properties inherit independently of the property being resolved.
170
139
  // Resolve the winning declaration separately for each element in the
171
140
  // ancestor chain, then let the nearest declaration override inherited ones.
@@ -179,15 +148,18 @@ function collectLocalAliases(el, rules, ruleApplies) {
179
148
  }
180
149
  const aliases = new Map();
181
150
  for (const element of lineage.reverse()) {
151
+ const ruleApplies = makeRuleApplies(element);
182
152
  const candidates = new Map();
183
153
  rules.forEach((rule, index) => {
184
154
  if (rule.active === false)
185
155
  return;
186
- if (!ruleApplies(rule))
187
- return;
188
156
  const match = matchRuleForElement(element, { rule, selectorText: rule.selectorText });
189
157
  if (!match)
190
158
  return;
159
+ if (!rule.declarations.some((declaration) => declaration.property.startsWith("--")))
160
+ return;
161
+ if (!ruleApplies(rule))
162
+ return;
191
163
  const sourceOrder = rule.sourceOrder ?? index;
192
164
  const { specificity } = match;
193
165
  for (const declaration of rule.declarations) {
@@ -230,7 +202,7 @@ function collectLocalAliases(el, rules, ruleApplies) {
230
202
  }
231
203
  return aliases;
232
204
  }
233
- function makeRuleApplies(el) {
205
+ function makeRuleApplies(el, evaluator = createContainerQueryEvaluator(el.ownerDocument)) {
234
206
  const matchingContexts = new Map();
235
207
  return (rule) => {
236
208
  const atRules = rule.atRules;
@@ -240,7 +212,7 @@ function makeRuleApplies(el) {
240
212
  const cached = matchingContexts.get(key);
241
213
  if (cached !== undefined)
242
214
  return cached;
243
- const result = atRulesApplyToElement(el, atRules);
215
+ const result = atRulesApplyToElement(el, atRules, evaluator);
244
216
  matchingContexts.set(key, result);
245
217
  return result;
246
218
  };
@@ -251,79 +223,84 @@ function makeRuleApplies(el) {
251
223
  * inherited phase. Local aliases are collected per element so no ancestor
252
224
  * re-walks the lineage × rules.
253
225
  */
254
- function resolveLineage(el, matcher) {
255
- const lineage = [];
256
- let current = el;
257
- while (current) {
258
- lineage.push(current);
259
- current = current.parentElement;
226
+ function relevantAncestorRule(rule) {
227
+ return rule.declarations.some(({ property }) => property.startsWith("--") || INHERITED_PROPERTIES.has(property));
228
+ }
229
+ function lineageElements(el) {
230
+ const elements = [];
231
+ for (let current = el; current; current = current.parentElement)
232
+ elements.unshift(current);
233
+ return elements;
234
+ }
235
+ function queryPairs(el, matcher) {
236
+ const pairs = [];
237
+ for (const element of lineageElements(el)) {
238
+ for (const { rule } of matcher.matchesForElement(element).matched) {
239
+ if (element !== el && !relevantAncestorRule(rule))
240
+ continue;
241
+ if (rule.declarations.length === 0)
242
+ continue;
243
+ if (rule.atRules?.some((context) => context.kind === "supports" && !element.ownerDocument.defaultView?.CSS?.supports(context.params)))
244
+ continue;
245
+ const conditions = (rule.atRules ?? []).filter((context) => context.kind === "container").map((context) => context.params);
246
+ if (conditions.length > 0)
247
+ pairs.push({ element, conditions });
248
+ }
260
249
  }
261
- lineage.reverse();
262
- const selectorMatches = new Map();
263
- const allSelectorMatches = new Map();
264
- for (const element of lineage) {
265
- const { matched, allMatched } = matcher.matchesForElement(element);
266
- selectorMatches.set(element, matched);
267
- allSelectorMatches.set(element, allMatched);
250
+ return pairs;
251
+ }
252
+ /** Prepares both cascades together so a selection refresh inserts one probe sheet. */
253
+ export function prefetchContainerQueries(elements, state, evaluator) {
254
+ const pairs = [];
255
+ for (const element of elements) {
256
+ const { rules } = collectCssomRules(element.ownerDocument);
257
+ pairs.push(...queryPairs(element, createRuleMatcher(rules, state)));
258
+ if (state === "base")
259
+ pairs.push(...queryPairs(element, createRuleMatcher(rules, "stable")));
268
260
  }
261
+ evaluator.prefetch(pairs);
262
+ }
263
+ function resolveLineage(el, matcher, evaluator) {
264
+ const lineage = lineageElements(el);
265
+ evaluator.prefetch(queryPairs(el, matcher));
269
266
  const byElement = new Map();
270
- for (let index = 0; index < lineage.length; index++) {
271
- const element = lineage[index];
272
- const ruleApplies = makeRuleApplies(element);
273
- const aliases = new Map();
274
- for (const lineageElement of lineage.slice(0, index + 1)) {
275
- const candidates = new Map();
276
- for (const match of selectorMatches.get(lineageElement) ?? []) {
277
- if (!ruleApplies(match.rule))
278
- continue;
279
- const sourceOrder = match.rule.sourceOrder ?? 0;
280
- for (const declaration of match.rule.declarations) {
281
- if (!declaration.property.startsWith("--"))
282
- continue;
283
- const candidate = {
284
- value: declaration.value.trim(),
285
- important: declaration.important,
286
- layer: match.rule.layer,
287
- layerOrder: match.rule.layerOrder,
288
- specificity: match.specificity,
289
- sourceOrder,
290
- };
291
- const previous = candidates.get(declaration.property);
292
- if (!previous || compareAuthorCascade(candidate, previous) >= 0) {
293
- candidates.set(declaration.property, candidate);
294
- }
295
- }
296
- }
297
- for (const property of Array.from(lineageElement.style)) {
298
- if (!property.startsWith("--"))
267
+ const inheritedAliases = new Map();
268
+ for (const element of lineage) {
269
+ const ruleApplies = makeRuleApplies(element, evaluator);
270
+ const { matched: selectorMatches, allMatched } = matcher.matchesForElement(element);
271
+ const matched = selectorMatches.filter(({ rule }) => (element === el || relevantAncestorRule(rule)) && rule.declarations.length > 0 && ruleApplies(rule));
272
+ const candidates = new Map();
273
+ for (const match of matched) {
274
+ // Conditions have already been evaluated against the declaration's own
275
+ // element. Descendants inherit its resulting alias, not its condition.
276
+ for (const declaration of match.rule.declarations) {
277
+ if (!declaration.property.startsWith("--"))
299
278
  continue;
300
279
  const candidate = {
301
- value: lineageElement.style.getPropertyValue(property).trim(),
302
- important: lineageElement.style.getPropertyPriority(property) === "important",
303
- inline: true,
304
- specificity: 100000000,
305
- sourceOrder: Number.MAX_SAFE_INTEGER,
280
+ value: declaration.value.trim(), important: declaration.important,
281
+ layer: match.rule.layer, layerOrder: match.rule.layerOrder,
282
+ specificity: match.specificity, sourceOrder: match.rule.sourceOrder ?? 0,
306
283
  };
307
- const previous = candidates.get(property);
308
- if (!previous || compareAuthorCascade(candidate, previous) >= 0) {
309
- candidates.set(property, candidate);
310
- }
284
+ const previous = candidates.get(declaration.property);
285
+ if (!previous || compareAuthorCascade(candidate, previous) >= 0)
286
+ candidates.set(declaration.property, candidate);
311
287
  }
312
- for (const [name, candidate] of candidates)
313
- aliases.set(name, candidate.value);
314
288
  }
315
- const matched = [];
316
- for (const match of selectorMatches.get(element) ?? []) {
317
- if (!ruleApplies(match.rule))
289
+ for (const property of Array.from(element.style)) {
290
+ if (!property.startsWith("--"))
318
291
  continue;
319
- matched.push(match);
292
+ const candidate = {
293
+ value: element.style.getPropertyValue(property).trim(),
294
+ important: element.style.getPropertyPriority(property) === "important", inline: true,
295
+ specificity: 100000000, sourceOrder: Number.MAX_SAFE_INTEGER,
296
+ };
297
+ const previous = candidates.get(property);
298
+ if (!previous || compareAuthorCascade(candidate, previous) >= 0)
299
+ candidates.set(property, candidate);
320
300
  }
321
- byElement.set(element, {
322
- element,
323
- matched,
324
- allMatched: allSelectorMatches.get(element) ?? matched,
325
- aliases,
326
- });
301
+ for (const [name, candidate] of candidates)
302
+ inheritedAliases.set(name, candidate.value);
303
+ byElement.set(element, { element, matched, allMatched, aliases: new Map(inheritedAliases) });
327
304
  }
328
305
  return { lineage, byElement };
329
306
  }
@@ -453,7 +430,7 @@ export function resolveRuleFixture(el, rules, tokenTable) {
453
430
  continue;
454
431
  matched.push(match);
455
432
  }
456
- const localAliases = collectLocalAliases(el, rules, ruleApplies);
433
+ const localAliases = collectLocalAliases(el, rules);
457
434
  return rowsFromMatches(el, matched, localAliases, tokenTable, allMatched);
458
435
  }
459
436
  function compareCandidate(a, b) {
@@ -569,10 +546,10 @@ function annotatePaintedValues(el, result, computed, inaccessible, mode) {
569
546
  }
570
547
  }
571
548
  }
572
- export function getResolvedProperties(el, tokenTable) {
549
+ export function getResolvedProperties(el, tokenTable, evaluator = createContainerQueryEvaluator(el.ownerDocument)) {
573
550
  const doc = el.ownerDocument ?? document;
574
551
  const { rules, inaccessible } = collectCssomRules(doc);
575
- const lineage = resolveLineage(el, createRuleMatcher(rules, "live"));
552
+ const lineage = resolveLineage(el, createRuleMatcher(rules, "live"), evaluator);
576
553
  return resolveMatchedProperties(el, tokenTable, lineage, inaccessible, "live");
577
554
  }
578
555
  function applyInlineDeclarations(el, result, tokenTable, computed, inaccessible) {
@@ -646,7 +623,7 @@ function promoteNumericCalcRows(result, tokenTable) {
646
623
  * values with no authored declaration still fall back to the browser's live
647
624
  * computed value in the field layer.
648
625
  */
649
- export function getResolvedPropertiesForState(el, tokenTable, state) {
626
+ export function getResolvedPropertiesForState(el, tokenTable, state, evaluator = createContainerQueryEvaluator(el.ownerDocument)) {
650
627
  const doc = el.ownerDocument ?? document;
651
628
  const revisions = getDocumentRevisions(doc);
652
629
  const { rules, inaccessible } = collectCssomRules(doc);
@@ -659,13 +636,14 @@ export function getResolvedPropertiesForState(el, tokenTable, state) {
659
636
  }
660
637
  const cached = snapshots.get(state);
661
638
  if (cached
639
+ && queryPairs(el, matcher).length === 0
662
640
  && cached.elementRevision === revisions.element
663
641
  && cached.stylesheetRevision === revisions.stylesheet
664
642
  && cached.tokenTable === tokenTable
665
643
  && cached.dynamicMatchKey === dynamicMatchKey) {
666
644
  return cached.rows;
667
645
  }
668
- const lineage = resolveLineage(el, matcher);
646
+ const lineage = resolveLineage(el, matcher, evaluator);
669
647
  const rows = resolveMatchedProperties(el, tokenTable, lineage, inaccessible, state);
670
648
  registerResolutionLineage(el);
671
649
  snapshots.set(state, {
@@ -683,7 +661,7 @@ const stableTokenCache = new WeakMap();
683
661
  * an editor must stay linked to the stable token beneath a live :hover/:focus
684
662
  * paint. Memoized per (element, revisions, tokenTable).
685
663
  */
686
- export function getResolvedPropertiesStable(el, tokenTable) {
664
+ export function getResolvedPropertiesStable(el, tokenTable, evaluator = createContainerQueryEvaluator(el.ownerDocument)) {
687
665
  const doc = el.ownerDocument ?? document;
688
666
  const revisions = getDocumentRevisions(doc);
689
667
  const { rules, inaccessible } = collectCssomRules(doc);
@@ -691,13 +669,14 @@ export function getResolvedPropertiesStable(el, tokenTable) {
691
669
  const dynamicMatchKey = matcher.dynamicMatchKey(el);
692
670
  const cached = stableTokenCache.get(el);
693
671
  if (cached
672
+ && queryPairs(el, matcher).length === 0
694
673
  && cached.elementRevision === revisions.element
695
674
  && cached.stylesheetRevision === revisions.stylesheet
696
675
  && cached.tokenTable === tokenTable
697
676
  && cached.dynamicMatchKey === dynamicMatchKey) {
698
677
  return cached.rows;
699
678
  }
700
- const lineage = resolveLineage(el, matcher);
679
+ const lineage = resolveLineage(el, matcher, evaluator);
701
680
  const rows = resolveMatchedProperties(el, tokenTable, lineage, inaccessible, "stable");
702
681
  stableTokenCache.set(el, {
703
682
  elementRevision: revisions.element,
@@ -1,3 +1,3 @@
1
- import type { TokenChangeRecord } from "../changes/changesLog.js";
1
+ import type { TokenChangeRecord } from "../changes/types.js";
2
2
  import type { TokenCatalogRow } from "./catalog.js";
3
3
  export declare function setGlobalTokenValue(row: TokenCatalogRow, value: string): TokenChangeRecord | null;
@@ -1,4 +1,4 @@
1
- import { appendChange } from "../changes/changesLog.js";
1
+ import { appendChange } from "../drafts/store.js";
2
2
  export function setGlobalTokenValue(row, value) {
3
3
  const nextValue = value.trim();
4
4
  if (!row.activeDeclaration || !nextValue)
@@ -1,10 +1,10 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cx } from "./classNames.js";
3
3
  import { Tooltip } from "./Tooltip.js";
4
4
  export function inlineStyleWarningContent(blockedBy) {
5
5
  if (blockedBy === null)
6
6
  return undefined;
7
- return (_jsx("div", { className: "at-rule-tooltip__rules", children: _jsxs("div", { className: "at-rule-tooltip__rule at-rule-tooltip__rule--active", children: ["Set inline (", _jsx("code", { children: blockedBy }), "). Previews can't beat inline styles \u2014 move it to a stylesheet to edit it here."] }) }));
7
+ return (_jsx("div", { className: "at-rule-tooltip__rules", children: _jsx("div", { className: "at-rule-tooltip__rule at-rule-tooltip__rule--active", children: "This is set as inline style. Can't be edited here." }) }));
8
8
  }
9
9
  export function InlineStyleWarning({ blockedBy, dataTest = "inline-style-warning", tooltipDataTest, className, symbolClassName, }) {
10
10
  if (blockedBy === null)
@@ -0,0 +1,8 @@
1
+ import { type ReactElement } from "react";
2
+ interface InspectorStyleProps {
3
+ readonly css: string;
4
+ readonly testId?: string;
5
+ }
6
+ /** Inspector UI styles; adopted into the shadow root when the page's CSP blocks `<style>`. */
7
+ export declare function InspectorStyle({ css, testId }: InspectorStyleProps): ReactElement | null;
8
+ export {};
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useLayoutEffect } from "react";
3
+ import { NUDGE_UI_MOUNT_ID } from "../../transport/routes.js";
4
+ import { adoptStylesheet, allowsStyleElements, releaseAdoptedStylesheet } from "../runtime/ownedStylesheets.js";
5
+ const adoptedUsers = new Map();
6
+ /** Inspector UI styles; adopted into the shadow root when the page's CSP blocks `<style>`. */
7
+ export function InspectorStyle({ css, testId }) {
8
+ const adopted = typeof document !== "undefined" && !allowsStyleElements(document);
9
+ useLayoutEffect(() => {
10
+ const root = adopted ? document.getElementById(NUDGE_UI_MOUNT_ID)?.shadowRoot : null;
11
+ if (!root)
12
+ return;
13
+ adoptedUsers.set(css, (adoptedUsers.get(css) ?? 0) + 1);
14
+ adoptStylesheet(root, css, css);
15
+ return () => {
16
+ const users = (adoptedUsers.get(css) ?? 1) - 1;
17
+ if (users > 0) {
18
+ adoptedUsers.set(css, users);
19
+ return;
20
+ }
21
+ adoptedUsers.delete(css);
22
+ releaseAdoptedStylesheet(root, css);
23
+ };
24
+ }, [adopted, css]);
25
+ return adopted ? null : _jsx("style", { "data-test": testId, children: css });
26
+ }
@@ -21,6 +21,7 @@ export interface PopoverListboxProps {
21
21
  searchable?: boolean;
22
22
  searchPlaceholder?: string;
23
23
  searchAriaLabel?: string;
24
+ searchOnKeyDown?: KeyboardEventHandler<HTMLInputElement>;
24
25
  placeholder?: string;
25
26
  inputRef?: Ref<HTMLInputElement>;
26
27
  inputClassName?: string;
@@ -35,4 +36,4 @@ export interface PopoverListboxProps {
35
36
  onOpenChange: (open: boolean) => void;
36
37
  onSelect: (value: string) => void;
37
38
  }
38
- export declare function PopoverListbox({ value, query, items, open, trigger, triggerElement, triggerClassName, triggerDataTest, triggerAriaLabel, triggerTooltip, searchable, searchPlaceholder, searchAriaLabel, placeholder, inputRef, inputClassName, inputAppearance, inputDataTest, inputOnFocus, inputOnBlur, inputOnKeyDown, disabled, className, onQueryChange, onOpenChange, onSelect, }: PopoverListboxProps): ReactElement;
39
+ export declare function PopoverListbox({ value, query, items, open, trigger, triggerElement, triggerClassName, triggerDataTest, triggerAriaLabel, triggerTooltip, searchable, searchPlaceholder, searchAriaLabel, searchOnKeyDown, placeholder, inputRef, inputClassName, inputAppearance, inputDataTest, inputOnFocus, inputOnBlur, inputOnKeyDown, disabled, className, onQueryChange, onOpenChange, onSelect, }: PopoverListboxProps): ReactElement;
@@ -4,7 +4,7 @@ import { Autocomplete } from "@base-ui/react/autocomplete";
4
4
  import { cx } from "./classNames.js";
5
5
  import { Tooltip } from "./Tooltip.js";
6
6
  import { portalContainer } from "./portalContainer.js";
7
- export function PopoverListbox({ value = null, query, items, open, trigger, triggerElement, triggerClassName, triggerDataTest, triggerAriaLabel, triggerTooltip, searchable = false, searchPlaceholder = "Search…", searchAriaLabel = "Search options", placeholder, inputRef, inputClassName, inputAppearance = "default", inputDataTest, inputOnFocus, inputOnBlur, inputOnKeyDown, disabled = false, className, onQueryChange, onOpenChange, onSelect, }) {
7
+ export function PopoverListbox({ value = null, query, items, open, trigger, triggerElement, triggerClassName, triggerDataTest, triggerAriaLabel, triggerTooltip, searchable = false, searchPlaceholder = "Search…", searchAriaLabel = "Search options", searchOnKeyDown, placeholder, inputRef, inputClassName, inputAppearance = "default", inputDataTest, inputOnFocus, inputOnBlur, inputOnKeyDown, disabled = false, className, onQueryChange, onOpenChange, onSelect, }) {
8
8
  const itemByValue = new Map(items.map((item) => [item.value, item]));
9
9
  const resolvedTriggerTooltip = triggerTooltip ?? (triggerElement ? triggerAriaLabel : undefined);
10
10
  function renderComboboxItem(item) {
@@ -13,10 +13,10 @@ export function PopoverListbox({ value = null, query, items, open, trigger, trig
13
13
  return (_jsx("div", { className: cx("popover-listbox", className), children: trigger || triggerElement ? (_jsxs(Combobox.Root, { value: value, inputValue: searchable ? undefined : query, open: open, items: items.map((item) => item.value), filteredItems: searchable ? undefined : items.map((item) => item.value), autoHighlight: true, itemToStringLabel: (item) => itemByValue.get(item)?.label ?? item, onInputValueChange: (next) => onQueryChange(next), onOpenChange: (next) => onOpenChange(next), onValueChange: (next) => {
14
14
  if (typeof next === "string")
15
15
  onSelect(next);
16
- }, children: [_jsx(Tooltip, { content: resolvedTriggerTooltip, disabled: resolvedTriggerTooltip === undefined, stableTrigger: true, children: _jsx(Combobox.Trigger, { render: triggerElement, className: cx("popover-listbox__trigger", triggerClassName), "data-test": triggerDataTest, "aria-label": triggerAriaLabel, disabled: disabled, children: triggerElement ? undefined : trigger }) }), _jsx(Combobox.Portal, { container: portalContainer(), children: _jsx(Combobox.Positioner, { className: "popover-listbox__positioner", children: _jsxs(Combobox.Popup, { className: cx("popover-listbox__popup", searchable && "popover-listbox__popup--searchable"), children: [searchable ? (_jsxs(_Fragment, { children: [_jsx(Combobox.Input, { className: "popover-listbox__search-input", placeholder: searchPlaceholder, "aria-label": searchAriaLabel, "data-test": triggerDataTest ? `${triggerDataTest}-search` : "popover-listbox-search" }), _jsx(Combobox.Empty, { className: "popover-listbox__empty", children: "No matching options." })] })) : null, _jsx(Combobox.List, { className: cx("popover-listbox__list", searchable && "popover-listbox__list--searchable"), children: searchable
16
+ }, children: [_jsx(Tooltip, { content: resolvedTriggerTooltip, disabled: resolvedTriggerTooltip === undefined, stableTrigger: true, children: _jsx(Combobox.Trigger, { render: triggerElement, className: cx("popover-listbox__trigger", triggerClassName), "data-test": triggerDataTest, "aria-label": triggerAriaLabel, disabled: disabled, children: triggerElement ? undefined : trigger }) }), _jsx(Combobox.Portal, { container: portalContainer(), children: _jsx(Combobox.Positioner, { className: "popover-listbox__positioner", sideOffset: 4, children: _jsxs(Combobox.Popup, { className: cx("popover-listbox__popup", searchable && "popover-listbox__popup--searchable"), children: [searchable ? (_jsxs(_Fragment, { children: [_jsx(Combobox.Input, { className: "popover-listbox__search-input", placeholder: searchPlaceholder, "aria-label": searchAriaLabel, "data-test": triggerDataTest ? `${triggerDataTest}-search` : "popover-listbox-search", onKeyDown: searchOnKeyDown }), _jsx(Combobox.Empty, { className: "popover-listbox__empty", children: "No matching options." })] })) : null, _jsx(Combobox.List, { className: cx("popover-listbox__list", searchable && "popover-listbox__list--searchable"), children: searchable
17
17
  ? ((itemValue) => {
18
18
  const item = itemByValue.get(itemValue);
19
19
  return item ? renderComboboxItem(item) : null;
20
20
  })
21
- : items.map((item) => renderComboboxItem(item)) })] }) }) })] })) : (_jsxs(Autocomplete.Root, { value: query, open: open, items: items.map((item) => item.value), filteredItems: items.map((item) => item.value), autoHighlight: true, mode: "none", openOnInputClick: true, onValueChange: onQueryChange, onOpenChange: (next) => onOpenChange(next), children: [_jsx(Autocomplete.Input, { ref: inputRef, className: cx("text-input", inputAppearance === "embedded" && "text-input--embedded", inputClassName), placeholder: placeholder, "data-test": inputDataTest, onFocus: inputOnFocus, onBlur: inputOnBlur, onKeyDownCapture: inputOnKeyDown, disabled: disabled }), _jsx(Autocomplete.Portal, { container: portalContainer(), children: _jsx(Autocomplete.Positioner, { className: "popover-listbox__positioner", children: _jsx(Autocomplete.Popup, { className: "popover-listbox__popup", children: _jsx(Autocomplete.List, { className: "popover-listbox__list", children: items.map((item) => (_jsxs(Autocomplete.Item, { value: item.value, className: "popover-listbox__item", "data-test": item["data-test"], onClick: () => onSelect(item.value), children: [item.leading ? _jsx("span", { className: "popover-listbox__leading", children: item.leading }) : null, _jsx("span", { className: "popover-listbox__label", children: item.label }), item.trailing ? _jsx("span", { className: "popover-listbox__trailing", children: item.trailing }) : null] }, item.value))) }) }) }) })] })) }));
21
+ : items.map((item) => renderComboboxItem(item)) })] }) }) })] })) : (_jsxs(Autocomplete.Root, { value: query, open: open, items: items.map((item) => item.value), filteredItems: items.map((item) => item.value), autoHighlight: true, mode: "none", openOnInputClick: true, onValueChange: onQueryChange, onOpenChange: (next) => onOpenChange(next), children: [_jsx(Autocomplete.Input, { ref: inputRef, className: cx("text-input", inputAppearance === "embedded" && "text-input--embedded", inputClassName), placeholder: placeholder, "data-test": inputDataTest, onFocus: inputOnFocus, onBlur: inputOnBlur, onKeyDownCapture: inputOnKeyDown, disabled: disabled }), _jsx(Autocomplete.Portal, { container: portalContainer(), children: _jsx(Autocomplete.Positioner, { className: "popover-listbox__positioner", sideOffset: 4, children: _jsx(Autocomplete.Popup, { className: "popover-listbox__popup", children: _jsx(Autocomplete.List, { className: "popover-listbox__list", children: items.map((item) => (_jsxs(Autocomplete.Item, { value: item.value, className: "popover-listbox__item", "data-test": item["data-test"], onClick: () => onSelect(item.value), children: [item.leading ? _jsx("span", { className: "popover-listbox__leading", children: item.leading }) : null, _jsx("span", { className: "popover-listbox__label", children: item.label }), item.trailing ? _jsx("span", { className: "popover-listbox__trailing", children: item.trailing }) : null] }, item.value))) }) }) }) })] })) }));
22
22
  }
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from "react";
2
+ export type ToastTone = "success" | "error";
3
+ export interface ShowToastOptions {
4
+ readonly title: string;
5
+ readonly description?: string;
6
+ readonly tone?: ToastTone;
7
+ readonly timeout?: number;
8
+ }
9
+ export declare function showToast({ title, description, tone, timeout }: ShowToastOptions): string;
10
+ /**
11
+ * Renders inspector toasts inside the inspector's shadow root, centered above
12
+ * the canvas toolbar in the space the inspector panel leaves free.
13
+ */
14
+ export declare function ToastRegion(): ReactElement;
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Toast as BaseToast } from "@base-ui/react/toast";
3
+ import { IconAlertTriangleFilled, IconCircleCheckFilled } from "@tabler/icons-react";
4
+ import { portalContainer } from "./portalContainer.js";
5
+ import { useInspectorOpen } from "../shell/openStore.js";
6
+ /** Module-level manager so stores and async flows can raise toasts outside React. */
7
+ const toastManager = BaseToast.createToastManager();
8
+ export function showToast({ title, description, tone = "success", timeout }) {
9
+ return toastManager.add({
10
+ title,
11
+ description,
12
+ type: tone,
13
+ priority: tone === "error" ? "high" : "low",
14
+ timeout: timeout ?? (tone === "error" ? 5000 : 2000),
15
+ });
16
+ }
17
+ function ToastList() {
18
+ const { toasts } = BaseToast.useToastManager();
19
+ return (_jsx(_Fragment, { children: toasts.map((toast) => (_jsxs(BaseToast.Root, { toast: toast, className: "toast", "data-test": "toast", "data-tone": toast.type, children: [toast.type === "error"
20
+ ? _jsx(IconAlertTriangleFilled, { className: "toast__icon", size: "var(--icon-size-small)", "aria-hidden": "true" })
21
+ : _jsx(IconCircleCheckFilled, { className: "toast__icon", size: "var(--icon-size-small)", "aria-hidden": "true" }), _jsxs(BaseToast.Content, { className: "toast__content", children: [_jsx(BaseToast.Title, { className: "toast__title" }), toast.description ? _jsx(BaseToast.Description, { className: "toast__description" }) : null] })] }, toast.id))) }));
22
+ }
23
+ /**
24
+ * Renders inspector toasts inside the inspector's shadow root, centered above
25
+ * the canvas toolbar in the space the inspector panel leaves free.
26
+ */
27
+ export function ToastRegion() {
28
+ const inspectorOpen = useInspectorOpen();
29
+ return (_jsx(BaseToast.Provider, { toastManager: toastManager, limit: 3, children: _jsx(BaseToast.Portal, { container: portalContainer(), children: _jsx(BaseToast.Viewport, { className: "toast__viewport", "data-inspector-open": inspectorOpen ? "true" : "false", "data-test": "toast-viewport", children: _jsx(ToastList, {}) }) }) }));
30
+ }
@@ -0,0 +1,2 @@
1
+ /** Inline markup so pages whose `img-src` blocks `data:` images still render it. */
2
+ export declare const CANVAS_ILLUSTRATION_SVG = "<svg width=\"182\" height=\"104\" viewBox=\"0 0 182 104\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect x=\"30\" y=\"54\" width=\"17\" height=\"4\" rx=\"2\" fill=\"#0096FF\"/>\n<path d=\"M62.5 32.5V79.5H15.5V32.5H62.5Z\" stroke=\"#0096FF\"/>\n<path opacity=\"0.3\" d=\"M165.5 56.5V103.5H118.5V56.5H165.5Z\" stroke=\"black\"/>\n<rect opacity=\"0.3\" x=\"102.5\" y=\"0.5\" width=\"47\" height=\"47\" stroke=\"black\"/>\n<g clip-path=\"url(#clip0_1882_2967)\">\n<path d=\"M38 64.75V58.375C38 58.0766 38.1185 57.7905 38.3295 57.5795C38.5405 57.3685 38.8266 57.25 39.125 57.25C39.4234 57.25 39.7095 57.3685 39.9205 57.5795C40.1315 57.7905 40.25 58.0766 40.25 58.375V64\" stroke=\"black\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M40.25 63.625V62.125C40.25 61.9773 40.2791 61.831 40.3356 61.6945C40.3922 61.558 40.475 61.434 40.5795 61.3295C40.684 61.225 40.808 61.1422 40.9445 61.0856C41.081 61.0291 41.2273 61 41.375 61C41.5227 61 41.669 61.0291 41.8055 61.0856C41.942 61.1422 42.066 61.225 42.1705 61.3295C42.275 61.434 42.3578 61.558 42.4144 61.6945C42.4709 61.831 42.5 61.9773 42.5 62.125V64\" stroke=\"black\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M42.5 62.875C42.5 62.5766 42.6185 62.2905 42.8295 62.0795C43.0405 61.8685 43.3266 61.75 43.625 61.75C43.9234 61.75 44.2095 61.8685 44.4205 62.0795C44.6315 62.2905 44.75 62.5766 44.75 62.875V64\" stroke=\"black\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M44.7499 63.625C44.7499 63.3266 44.8684 63.0405 45.0794 62.8295C45.2904 62.6185 45.5765 62.5 45.8749 62.5C46.1733 62.5 46.4594 62.6185 46.6704 62.8295C46.8814 63.0405 46.9999 63.3266 46.9999 63.625V67C46.9999 68.1935 46.5258 69.3381 45.6819 70.182C44.838 71.0259 43.6934 71.5 42.4999 71.5H40.9999H41.1559C40.4106 71.5001 39.677 71.3152 39.0209 70.9617C38.3648 70.6083 37.8068 70.0974 37.3969 69.475C37.3477 69.4001 37.2987 69.3251 37.2499 69.25C37.0159 68.8907 36.1946 67.459 34.7854 64.954C34.6417 64.6986 34.6034 64.3973 34.6784 64.1141C34.7535 63.8309 34.9361 63.5882 35.1874 63.4375C35.4551 63.2769 35.7687 63.2103 36.0785 63.2484C36.3883 63.2864 36.6765 63.4269 36.8974 63.6475L37.9999 64.75\" stroke=\"black\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</g>\n<path d=\"M107 47.5V57.5C107 61.9183 110.582 65.5 115 65.5H117.5\" stroke=\"#B2B2B2\" stroke-dasharray=\"2 2\"/>\n<path d=\"M49 55H58.4171H66.5H79C83.4183 55 87 51.4183 87 47V37.5C87 33.0817 90.5817 29.5 95 29.5H102\" stroke=\"#0096FF\" stroke-dasharray=\"2 2\"/>\n<path d=\"M49 55H58.4171H66.5H79C83.4183 55 87 51.4183 87 47V37.5C87 33.0817 90.5817 29.5 95 29.5H102\" stroke=\"#0096FF\" stroke-dasharray=\"2 2\"/>\n<defs>\n<clipPath id=\"clip0_1882_2967\">\n<rect width=\"18\" height=\"18\" fill=\"white\" transform=\"translate(32 55)\"/>\n</clipPath>\n</defs>\n</svg>";
@@ -0,0 +1,21 @@
1
+ /** Inline markup so pages whose `img-src` blocks `data:` images still render it. */
2
+ export const CANVAS_ILLUSTRATION_SVG = `<svg width="182" height="104" viewBox="0 0 182 104" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <rect x="30" y="54" width="17" height="4" rx="2" fill="#0096FF"/>
4
+ <path d="M62.5 32.5V79.5H15.5V32.5H62.5Z" stroke="#0096FF"/>
5
+ <path opacity="0.3" d="M165.5 56.5V103.5H118.5V56.5H165.5Z" stroke="black"/>
6
+ <rect opacity="0.3" x="102.5" y="0.5" width="47" height="47" stroke="black"/>
7
+ <g clip-path="url(#clip0_1882_2967)">
8
+ <path d="M38 64.75V58.375C38 58.0766 38.1185 57.7905 38.3295 57.5795C38.5405 57.3685 38.8266 57.25 39.125 57.25C39.4234 57.25 39.7095 57.3685 39.9205 57.5795C40.1315 57.7905 40.25 58.0766 40.25 58.375V64" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
9
+ <path d="M40.25 63.625V62.125C40.25 61.9773 40.2791 61.831 40.3356 61.6945C40.3922 61.558 40.475 61.434 40.5795 61.3295C40.684 61.225 40.808 61.1422 40.9445 61.0856C41.081 61.0291 41.2273 61 41.375 61C41.5227 61 41.669 61.0291 41.8055 61.0856C41.942 61.1422 42.066 61.225 42.1705 61.3295C42.275 61.434 42.3578 61.558 42.4144 61.6945C42.4709 61.831 42.5 61.9773 42.5 62.125V64" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
10
+ <path d="M42.5 62.875C42.5 62.5766 42.6185 62.2905 42.8295 62.0795C43.0405 61.8685 43.3266 61.75 43.625 61.75C43.9234 61.75 44.2095 61.8685 44.4205 62.0795C44.6315 62.2905 44.75 62.5766 44.75 62.875V64" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <path d="M44.7499 63.625C44.7499 63.3266 44.8684 63.0405 45.0794 62.8295C45.2904 62.6185 45.5765 62.5 45.8749 62.5C46.1733 62.5 46.4594 62.6185 46.6704 62.8295C46.8814 63.0405 46.9999 63.3266 46.9999 63.625V67C46.9999 68.1935 46.5258 69.3381 45.6819 70.182C44.838 71.0259 43.6934 71.5 42.4999 71.5H40.9999H41.1559C40.4106 71.5001 39.677 71.3152 39.0209 70.9617C38.3648 70.6083 37.8068 70.0974 37.3969 69.475C37.3477 69.4001 37.2987 69.3251 37.2499 69.25C37.0159 68.8907 36.1946 67.459 34.7854 64.954C34.6417 64.6986 34.6034 64.3973 34.6784 64.1141C34.7535 63.8309 34.9361 63.5882 35.1874 63.4375C35.4551 63.2769 35.7687 63.2103 36.0785 63.2484C36.3883 63.2864 36.6765 63.4269 36.8974 63.6475L37.9999 64.75" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
12
+ </g>
13
+ <path d="M107 47.5V57.5C107 61.9183 110.582 65.5 115 65.5H117.5" stroke="#B2B2B2" stroke-dasharray="2 2"/>
14
+ <path d="M49 55H58.4171H66.5H79C83.4183 55 87 51.4183 87 47V37.5C87 33.0817 90.5817 29.5 95 29.5H102" stroke="#0096FF" stroke-dasharray="2 2"/>
15
+ <path d="M49 55H58.4171H66.5H79C83.4183 55 87 51.4183 87 47V37.5C87 33.0817 90.5817 29.5 95 29.5H102" stroke="#0096FF" stroke-dasharray="2 2"/>
16
+ <defs>
17
+ <clipPath id="clip0_1882_2967">
18
+ <rect width="18" height="18" fill="white" transform="translate(32 55)"/>
19
+ </clipPath>
20
+ </defs>
21
+ </svg>`;
@@ -0,0 +1,2 @@
1
+ /** Inline markup so pages whose `img-src` blocks `data:` images still render it. */
2
+ export declare const GRID_ILLUSTRATION_SVG = "<svg width=\"182\" height=\"72\" viewBox=\"0 0 182 72\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect x=\"11.5\" y=\"11.5\" width=\"47\" height=\"47\" stroke=\"black\" stroke-opacity=\"0.15\"/>\n<rect x=\"67.5\" y=\"11.5\" width=\"47\" height=\"47\" stroke=\"#0096FF\"/>\n<rect x=\"123.5\" y=\"11.5\" width=\"47\" height=\"47\" stroke=\"black\" stroke-opacity=\"0.15\"/>\n<mask id=\"path-4-inside-1_4219_25901\" fill=\"white\">\n<path d=\"M3 11H180V59H3V11Z\"/>\n</mask>\n<path d=\"M3 59V59.5H4.00568V59V58.5H3V59ZM6.01705 59V59.5H8.02841V59V58.5H6.01705V59ZM10.0398 59V59.5H12.0511V59V58.5H10.0398V59ZM14.0625 59V59.5H16.0739V59V58.5H14.0625V59ZM18.0852 59V59.5H20.0966V59V58.5H18.0852V59ZM22.108 59V59.5H24.1193V59V58.5H22.108V59ZM26.1307 59V59.5H28.142V59V58.5H26.1307V59ZM30.1534 59V59.5H32.1648V59V58.5H30.1534V59ZM34.1761 59V59.5H36.1875V59V58.5H34.1761V59ZM38.1989 59V59.5H40.2102V59V58.5H38.1989V59ZM42.2216 59V59.5H44.233V59V58.5H42.2216V59ZM46.2443 59V59.5H48.2557V59V58.5H46.2443V59ZM50.2671 59V59.5H52.2784V59V58.5H50.2671V59ZM54.2898 59V59.5H56.3011V59V58.5H54.2898V59ZM58.3125 59V59.5H60.3239V59V58.5H58.3125V59ZM62.3352 59V59.5H64.3466V59V58.5H62.3352V59ZM66.358 59V59.5H68.3693V59V58.5H66.358V59ZM70.3807 59V59.5H72.392V59V58.5H70.3807V59ZM74.4034 59V59.5H76.4148V59V58.5H74.4034V59ZM78.4261 59V59.5H80.4375V59V58.5H78.4261V59ZM82.4488 59V59.5H84.4602V59V58.5H82.4488V59ZM86.4716 59V59.5H88.4829V59V58.5H86.4716V59ZM90.4943 59V59.5H92.5056V59V58.5H90.4943V59ZM94.517 59V59.5H96.5284V59V58.5H94.517V59ZM98.5397 59V59.5H100.551V59V58.5H98.5397V59ZM102.562 59V59.5H104.574V59V58.5H102.562V59ZM106.585 59V59.5H108.597V59V58.5H106.585V59ZM110.608 59V59.5H112.619V59V58.5H110.608V59ZM114.631 59V59.5H116.642V59V58.5H114.631V59ZM118.653 59V59.5H120.665V59V58.5H118.653V59ZM122.676 59V59.5H124.687V59V58.5H122.676V59ZM126.699 59V59.5H128.71V59V58.5H126.699V59ZM130.721 59V59.5H132.733V59V58.5H130.721V59ZM134.744 59V59.5H136.756V59V58.5H134.744V59ZM138.767 59V59.5H140.778V59V58.5H138.767V59ZM142.79 59V59.5H144.801V59V58.5H142.79V59ZM146.812 59V59.5H148.824V59V58.5H146.812V59ZM150.835 59V59.5H152.847V59V58.5H150.835V59ZM154.858 59V59.5H156.869V59V58.5H154.858V59ZM158.881 59V59.5H160.892V59V58.5H158.881V59ZM162.903 59V59.5H164.915V59V58.5H162.903V59ZM166.926 59V59.5H168.937V59V58.5H166.926V59ZM170.949 59V59.5H172.96V59V58.5H170.949V59ZM174.972 59V59.5H176.983V59V58.5H174.972V59ZM178.994 59V59.5H180V59V58.5H178.994V59ZM180 11V10.5H178.994V11V11.5H180V11ZM176.983 11V10.5H174.972V11V11.5H176.983V11ZM172.96 11V10.5H170.949V11V11.5H172.96V11ZM168.938 11V10.5H166.926V11V11.5H168.938V11ZM164.915 11V10.5H162.903V11V11.5H164.915V11ZM160.892 11V10.5H158.881V11V11.5H160.892V11ZM156.869 11V10.5H154.858V11V11.5H156.869V11ZM152.847 11V10.5H150.835V11V11.5H152.847V11ZM148.824 11V10.5H146.812V11V11.5H148.824V11ZM144.801 11V10.5H142.79V11V11.5H144.801V11ZM140.778 11V10.5H138.767V11V11.5H140.778V11ZM136.756 11V10.5H134.744V11V11.5H136.756V11ZM132.733 11V10.5H130.722V11V11.5H132.733V11ZM128.71 11V10.5H126.699V11V11.5H128.71V11ZM124.687 11V10.5H122.676V11V11.5H124.687V11ZM120.665 11V10.5H118.653V11V11.5H120.665V11ZM116.642 11V10.5H114.631V11V11.5H116.642V11ZM112.619 11V10.5H110.608V11V11.5H112.619V11ZM108.597 11V10.5H106.585V11V11.5H108.597V11ZM104.574 11V10.5H102.563V11V11.5H104.574V11ZM100.551 11V10.5H98.5398V11V11.5H100.551V11ZM96.5284 11V10.5H94.5171V11V11.5H96.5284V11ZM92.5057 11V10.5H90.4944V11V11.5H92.5057V11ZM88.483 11V10.5H86.4716V11V11.5H88.483V11ZM84.4603 11V10.5H82.4489V11V11.5H84.4603V11ZM80.4376 11V10.5H78.4262V11V11.5H80.4376V11ZM76.4148 11V10.5H74.4035V11V11.5H76.4148V11ZM72.3921 11V10.5H70.3808V11V11.5H72.3921V11ZM68.3694 11V10.5H66.358V11V11.5H68.3694V11ZM64.3467 11V10.5H62.3353V11V11.5H64.3467V11ZM60.324 11V10.5H58.3126V11V11.5H60.324V11ZM56.3012 11V10.5H54.2899V11V11.5H56.3012V11ZM52.2785 11V10.5H50.2671V11V11.5H52.2785V11ZM48.2558 11V10.5H46.2444V11V11.5H48.2558V11ZM44.2331 11V10.5H42.2217V11V11.5H44.2331V11ZM40.2103 11V10.5H38.1989V11V11.5H40.2103V11ZM36.1876 11V10.5H34.1762V11V11.5H36.1876V11ZM32.1648 11V10.5H30.1535V11V11.5H32.1648V11ZM28.1421 11V10.5H26.1307V11V11.5H28.1421V11ZM24.1194 11V10.5H22.108V11V11.5H24.1194V11ZM20.0966 11V10.5H18.0853V11V11.5H20.0966V11ZM16.0739 11V10.5H14.0625V11V11.5H16.0739V11ZM12.0512 11V10.5H10.0398V11V11.5H12.0512V11ZM8.02843 11V10.5H6.01706V11V11.5H8.02843V11ZM4.00569 11V10.5H3V11V11.5H4.00569V11ZM3 59V60H4.00568V59V58H3V59ZM6.01705 59V60H8.02841V59V58H6.01705V59ZM10.0398 59V60H12.0511V59V58H10.0398V59ZM14.0625 59V60H16.0739V59V58H14.0625V59ZM18.0852 59V60H20.0966V59V58H18.0852V59ZM22.108 59V60H24.1193V59V58H22.108V59ZM26.1307 59V60H28.142V59V58H26.1307V59ZM30.1534 59V60H32.1648V59V58H30.1534V59ZM34.1761 59V60H36.1875V59V58H34.1761V59ZM38.1989 59V60H40.2102V59V58H38.1989V59ZM42.2216 59V60H44.233V59V58H42.2216V59ZM46.2443 59V60H48.2557V59V58H46.2443V59ZM50.2671 59V60H52.2784V59V58H50.2671V59ZM54.2898 59V60H56.3011V59V58H54.2898V59ZM58.3125 59V60H60.3239V59V58H58.3125V59ZM62.3352 59V60H64.3466V59V58H62.3352V59ZM66.358 59V60H68.3693V59V58H66.358V59ZM70.3807 59V60H72.392V59V58H70.3807V59ZM74.4034 59V60H76.4148V59V58H74.4034V59ZM78.4261 59V60H80.4375V59V58H78.4261V59ZM82.4488 59V60H84.4602V59V58H82.4488V59ZM86.4716 59V60H88.4829V59V58H86.4716V59ZM90.4943 59V60H92.5056V59V58H90.4943V59ZM94.517 59V60H96.5284V59V58H94.517V59ZM98.5397 59V60H100.551V59V58H98.5397V59ZM102.562 59V60H104.574V59V58H102.562V59ZM106.585 59V60H108.597V59V58H106.585V59ZM110.608 59V60H112.619V59V58H110.608V59ZM114.631 59V60H116.642V59V58H114.631V59ZM118.653 59V60H120.665V59V58H118.653V59ZM122.676 59V60H124.687V59V58H122.676V59ZM126.699 59V60H128.71V59V58H126.699V59ZM130.721 59V60H132.733V59V58H130.721V59ZM134.744 59V60H136.756V59V58H134.744V59ZM138.767 59V60H140.778V59V58H138.767V59ZM142.79 59V60H144.801V59V58H142.79V59ZM146.812 59V60H148.824V59V58H146.812V59ZM150.835 59V60H152.847V59V58H150.835V59ZM154.858 59V60H156.869V59V58H154.858V59ZM158.881 59V60H160.892V59V58H158.881V59ZM162.903 59V60H164.915V59V58H162.903V59ZM166.926 59V60H168.937V59V58H166.926V59ZM170.949 59V60H172.96V59V58H170.949V59ZM174.972 59V60H176.983V59V58H174.972V59ZM178.994 59V60H180V59V58H178.994V59ZM180 11V10H178.994V11V12H180V11ZM176.983 11V10H174.972V11V12H176.983V11ZM172.96 11V10H170.949V11V12H172.96V11ZM168.938 11V10H166.926V11V12H168.938V11ZM164.915 11V10H162.903V11V12H164.915V11ZM160.892 11V10H158.881V11V12H160.892V11ZM156.869 11V10H154.858V11V12H156.869V11ZM152.847 11V10H150.835V11V12H152.847V11ZM148.824 11V10H146.812V11V12H148.824V11ZM144.801 11V10H142.79V11V12H144.801V11ZM140.778 11V10H138.767V11V12H140.778V11ZM136.756 11V10H134.744V11V12H136.756V11ZM132.733 11V10H130.722V11V12H132.733V11ZM128.71 11V10H126.699V11V12H128.71V11ZM124.687 11V10H122.676V11V12H124.687V11ZM120.665 11V10H118.653V11V12H120.665V11ZM116.642 11V10H114.631V11V12H116.642V11ZM112.619 11V10H110.608V11V12H112.619V11ZM108.597 11V10H106.585V11V12H108.597V11ZM104.574 11V10H102.563V11V12H104.574V11ZM100.551 11V10H98.5398V11V12H100.551V11ZM96.5284 11V10H94.5171V11V12H96.5284V11ZM92.5057 11V10H90.4944V11V12H92.5057V11ZM88.483 11V10H86.4716V11V12H88.483V11ZM84.4603 11V10H82.4489V11V12H84.4603V11ZM80.4376 11V10H78.4262V11V12H80.4376V11ZM76.4148 11V10H74.4035V11V12H76.4148V11ZM72.3921 11V10H70.3808V11V12H72.3921V11ZM68.3694 11V10H66.358V11V12H68.3694V11ZM64.3467 11V10H62.3353V11V12H64.3467V11ZM60.324 11V10H58.3126V11V12H60.324V11ZM56.3012 11V10H54.2899V11V12H56.3012V11ZM52.2785 11V10H50.2671V11V12H52.2785V11ZM48.2558 11V10H46.2444V11V12H48.2558V11ZM44.2331 11V10H42.2217V11V12H44.2331V11ZM40.2103 11V10H38.1989V11V12H40.2103V11ZM36.1876 11V10H34.1762V11V12H36.1876V11ZM32.1648 11V10H30.1535V11V12H32.1648V11ZM28.1421 11V10H26.1307V11V12H28.1421V11ZM24.1194 11V10H22.108V11V12H24.1194V11ZM20.0966 11V10H18.0853V11V12H20.0966V11ZM16.0739 11V10H14.0625V11V12H16.0739V11ZM12.0512 11V10H10.0398V11V12H12.0512V11ZM8.02843 11V10H6.01706V11V12H8.02843V11ZM4.00569 11V10H3V11V12H4.00569V11Z\" fill=\"#0096FF\" mask=\"url(#path-4-inside-1_4219_25901)\"/>\n<mask id=\"path-6-inside-2_4219_25901\" fill=\"white\">\n<path d=\"M67 68L67 2L115 2L115 68L67 68Z\"/>\n</mask>\n<path d=\"M115 68L115.5 68L115.5 67.0294L115 67.0294L114.5 67.0294L114.5 68L115 68ZM115 65.0882L115.5 65.0882L115.5 63.1471L115 63.1471L114.5 63.1471L114.5 65.0882L115 65.0882ZM115 61.2059L115.5 61.2059L115.5 59.2647L115 59.2647L114.5 59.2647L114.5 61.2059L115 61.2059ZM115 57.3235L115.5 57.3235L115.5 55.3824L115 55.3824L114.5 55.3824L114.5 57.3235L115 57.3235ZM115 53.4412L115.5 53.4412L115.5 51.5L115 51.5L114.5 51.5L114.5 53.4412L115 53.4412ZM115 49.5588L115.5 49.5588L115.5 47.6176L115 47.6176L114.5 47.6176L114.5 49.5588L115 49.5588ZM115 45.6765L115.5 45.6765L115.5 43.7353L115 43.7353L114.5 43.7353L114.5 45.6765L115 45.6765ZM115 41.7941L115.5 41.7941L115.5 39.8529L115 39.8529L114.5 39.8529L114.5 41.7941L115 41.7941ZM115 37.9118L115.5 37.9118L115.5 35.9706L115 35.9706L114.5 35.9706L114.5 37.9118L115 37.9118ZM115 34.0294L115.5 34.0294L115.5 32.0882L115 32.0882L114.5 32.0882L114.5 34.0294L115 34.0294ZM115 30.147L115.5 30.147L115.5 28.2059L115 28.2059L114.5 28.2059L114.5 30.147L115 30.147ZM115 26.2647L115.5 26.2647L115.5 24.3235L115 24.3235L114.5 24.3235L114.5 26.2647L115 26.2647ZM115 22.3823L115.5 22.3823L115.5 20.4412L115 20.4412L114.5 20.4412L114.5 22.3823L115 22.3823ZM115 18.5L115.5 18.5L115.5 16.5588L115 16.5588L114.5 16.5588L114.5 18.5L115 18.5ZM115 14.6176L115.5 14.6176L115.5 12.6765L115 12.6765L114.5 12.6765L114.5 14.6176L115 14.6176ZM115 10.7353L115.5 10.7353L115.5 8.7941L115 8.7941L114.5 8.7941L114.5 10.7353L115 10.7353ZM115 6.85292L115.5 6.85292L115.5 4.91174L115 4.91174L114.5 4.91174L114.5 6.85292L115 6.85292ZM115 2.97056L115.5 2.97056L115.5 2L115 2L114.5 2L114.5 2.97056L115 2.97056ZM67 2L66.5 2L66.5 2.97059L67 2.97059L67.5 2.97059L67.5 2L67 2ZM67 4.91177L66.5 4.91177L66.5 6.85294L67 6.85294L67.5 6.85294L67.5 4.91177L67 4.91177ZM67 8.79412L66.5 8.79412L66.5 10.7353L67 10.7353L67.5 10.7353L67.5 8.79412L67 8.79412ZM67 12.6765L66.5 12.6765L66.5 14.6176L67 14.6176L67.5 14.6176L67.5 12.6765L67 12.6765ZM67 16.5588L66.5 16.5588L66.5 18.5L67 18.5L67.5 18.5L67.5 16.5588L67 16.5588ZM67 20.4412L66.5 20.4412L66.5 22.3824L67 22.3824L67.5 22.3824L67.5 20.4412L67 20.4412ZM67 24.3235L66.5 24.3235L66.5 26.2647L67 26.2647L67.5 26.2647L67.5 24.3235L67 24.3235ZM67 28.2059L66.5 28.2059L66.5 30.1471L67 30.1471L67.5 30.1471L67.5 28.2059L67 28.2059ZM67 32.0882L66.5 32.0882L66.5 34.0294L67 34.0294L67.5 34.0294L67.5 32.0882L67 32.0882ZM67 35.9706L66.5 35.9706L66.5 37.9118L67 37.9118L67.5 37.9118L67.5 35.9706L67 35.9706ZM67 39.8529L66.5 39.8529L66.5 41.7941L67 41.7941L67.5 41.7941L67.5 39.8529L67 39.8529ZM67 43.7353L66.5 43.7353L66.5 45.6765L67 45.6765L67.5 45.6765L67.5 43.7353L67 43.7353ZM67 47.6177L66.5 47.6177L66.5 49.5588L67 49.5588L67.5 49.5588L67.5 47.6177L67 47.6177ZM67 51.5L66.5 51.5L66.5 53.4412L67 53.4412L67.5 53.4412L67.5 51.5L67 51.5ZM67 55.3824L66.5 55.3824L66.5 57.3235L67 57.3235L67.5 57.3235L67.5 55.3824L67 55.3824ZM67 59.2647L66.5 59.2647L66.5 61.2059L67 61.2059L67.5 61.2059L67.5 59.2647L67 59.2647ZM67 63.1471L66.5 63.1471L66.5 65.0883L67 65.0883L67.5 65.0883L67.5 63.1471L67 63.1471ZM67 67.0294L66.5 67.0294L66.5 68L67 68L67.5 68L67.5 67.0294L67 67.0294ZM115 68L116 68L116 67.0294L115 67.0294L114 67.0294L114 68L115 68ZM115 65.0882L116 65.0882L116 63.1471L115 63.1471L114 63.1471L114 65.0882L115 65.0882ZM115 61.2059L116 61.2059L116 59.2647L115 59.2647L114 59.2647L114 61.2059L115 61.2059ZM115 57.3235L116 57.3235L116 55.3824L115 55.3824L114 55.3824L114 57.3235L115 57.3235ZM115 53.4412L116 53.4412L116 51.5L115 51.5L114 51.5L114 53.4412L115 53.4412ZM115 49.5588L116 49.5588L116 47.6176L115 47.6176L114 47.6176L114 49.5588L115 49.5588ZM115 45.6765L116 45.6765L116 43.7353L115 43.7353L114 43.7353L114 45.6765L115 45.6765ZM115 41.7941L116 41.7941L116 39.8529L115 39.8529L114 39.8529L114 41.7941L115 41.7941ZM115 37.9118L116 37.9118L116 35.9706L115 35.9706L114 35.9706L114 37.9118L115 37.9118ZM115 34.0294L116 34.0294L116 32.0882L115 32.0882L114 32.0882L114 34.0294L115 34.0294ZM115 30.147L116 30.147L116 28.2059L115 28.2059L114 28.2059L114 30.147L115 30.147ZM115 26.2647L116 26.2647L116 24.3235L115 24.3235L114 24.3235L114 26.2647L115 26.2647ZM115 22.3823L116 22.3823L116 20.4412L115 20.4412L114 20.4412L114 22.3823L115 22.3823ZM115 18.5L116 18.5L116 16.5588L115 16.5588L114 16.5588L114 18.5L115 18.5ZM115 14.6176L116 14.6176L116 12.6765L115 12.6765L114 12.6765L114 14.6176L115 14.6176ZM115 10.7353L116 10.7353L116 8.7941L115 8.7941L114 8.7941L114 10.7353L115 10.7353ZM115 6.85292L116 6.85292L116 4.91174L115 4.91174L114 4.91174L114 6.85292L115 6.85292ZM115 2.97056L116 2.97056L116 2L115 2L114 2L114 2.97056L115 2.97056ZM67 2L66 2L66 2.97059L67 2.97059L68 2.97059L68 2L67 2ZM67 4.91177L66 4.91177L66 6.85294L67 6.85294L68 6.85294L68 4.91177L67 4.91177ZM67 8.79412L66 8.79412L66 10.7353L67 10.7353L68 10.7353L68 8.79412L67 8.79412ZM67 12.6765L66 12.6765L66 14.6176L67 14.6176L68 14.6176L68 12.6765L67 12.6765ZM67 16.5588L66 16.5588L66 18.5L67 18.5L68 18.5L68 16.5588L67 16.5588ZM67 20.4412L66 20.4412L66 22.3824L67 22.3824L68 22.3824L68 20.4412L67 20.4412ZM67 24.3235L66 24.3235L66 26.2647L67 26.2647L68 26.2647L68 24.3235L67 24.3235ZM67 28.2059L66 28.2059L66 30.1471L67 30.1471L68 30.1471L68 28.2059L67 28.2059ZM67 32.0882L66 32.0882L66 34.0294L67 34.0294L68 34.0294L68 32.0882L67 32.0882ZM67 35.9706L66 35.9706L66 37.9118L67 37.9118L68 37.9118L68 35.9706L67 35.9706ZM67 39.8529L66 39.8529L66 41.7941L67 41.7941L68 41.7941L68 39.8529L67 39.8529ZM67 43.7353L66 43.7353L66 45.6765L67 45.6765L68 45.6765L68 43.7353L67 43.7353ZM67 47.6177L66 47.6177L66 49.5588L67 49.5588L68 49.5588L68 47.6177L67 47.6177ZM67 51.5L66 51.5L66 53.4412L67 53.4412L68 53.4412L68 51.5L67 51.5ZM67 55.3824L66 55.3824L66 57.3235L67 57.3235L68 57.3235L68 55.3824L67 55.3824ZM67 59.2647L66 59.2647L66 61.2059L67 61.2059L68 61.2059L68 59.2647L67 59.2647ZM67 63.1471L66 63.1471L66 65.0883L67 65.0883L68 65.0883L68 63.1471L67 63.1471ZM67 67.0294L66 67.0294L66 68L67 68L68 68L68 67.0294L67 67.0294Z\" fill=\"#0096FF\" mask=\"url(#path-6-inside-2_4219_25901)\"/>\n<path d=\"M99.8275 63.5419L94.2119 49L109.294 55.1409L101.79 56.0727L99.8275 63.5419Z\" fill=\"black\" stroke=\"white\"/>\n</svg>";
@@ -1,4 +1,5 @@
1
- <svg width="182" height="72" viewBox="0 0 182 72" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ /** Inline markup so pages whose `img-src` blocks `data:` images still render it. */
2
+ export const GRID_ILLUSTRATION_SVG = `<svg width="182" height="72" viewBox="0 0 182 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
3
  <rect x="11.5" y="11.5" width="47" height="47" stroke="black" stroke-opacity="0.15"/>
3
4
  <rect x="67.5" y="11.5" width="47" height="47" stroke="#0096FF"/>
4
5
  <rect x="123.5" y="11.5" width="47" height="47" stroke="black" stroke-opacity="0.15"/>
@@ -11,4 +12,4 @@
11
12
  </mask>
12
13
  <path d="M115 68L115.5 68L115.5 67.0294L115 67.0294L114.5 67.0294L114.5 68L115 68ZM115 65.0882L115.5 65.0882L115.5 63.1471L115 63.1471L114.5 63.1471L114.5 65.0882L115 65.0882ZM115 61.2059L115.5 61.2059L115.5 59.2647L115 59.2647L114.5 59.2647L114.5 61.2059L115 61.2059ZM115 57.3235L115.5 57.3235L115.5 55.3824L115 55.3824L114.5 55.3824L114.5 57.3235L115 57.3235ZM115 53.4412L115.5 53.4412L115.5 51.5L115 51.5L114.5 51.5L114.5 53.4412L115 53.4412ZM115 49.5588L115.5 49.5588L115.5 47.6176L115 47.6176L114.5 47.6176L114.5 49.5588L115 49.5588ZM115 45.6765L115.5 45.6765L115.5 43.7353L115 43.7353L114.5 43.7353L114.5 45.6765L115 45.6765ZM115 41.7941L115.5 41.7941L115.5 39.8529L115 39.8529L114.5 39.8529L114.5 41.7941L115 41.7941ZM115 37.9118L115.5 37.9118L115.5 35.9706L115 35.9706L114.5 35.9706L114.5 37.9118L115 37.9118ZM115 34.0294L115.5 34.0294L115.5 32.0882L115 32.0882L114.5 32.0882L114.5 34.0294L115 34.0294ZM115 30.147L115.5 30.147L115.5 28.2059L115 28.2059L114.5 28.2059L114.5 30.147L115 30.147ZM115 26.2647L115.5 26.2647L115.5 24.3235L115 24.3235L114.5 24.3235L114.5 26.2647L115 26.2647ZM115 22.3823L115.5 22.3823L115.5 20.4412L115 20.4412L114.5 20.4412L114.5 22.3823L115 22.3823ZM115 18.5L115.5 18.5L115.5 16.5588L115 16.5588L114.5 16.5588L114.5 18.5L115 18.5ZM115 14.6176L115.5 14.6176L115.5 12.6765L115 12.6765L114.5 12.6765L114.5 14.6176L115 14.6176ZM115 10.7353L115.5 10.7353L115.5 8.7941L115 8.7941L114.5 8.7941L114.5 10.7353L115 10.7353ZM115 6.85292L115.5 6.85292L115.5 4.91174L115 4.91174L114.5 4.91174L114.5 6.85292L115 6.85292ZM115 2.97056L115.5 2.97056L115.5 2L115 2L114.5 2L114.5 2.97056L115 2.97056ZM67 2L66.5 2L66.5 2.97059L67 2.97059L67.5 2.97059L67.5 2L67 2ZM67 4.91177L66.5 4.91177L66.5 6.85294L67 6.85294L67.5 6.85294L67.5 4.91177L67 4.91177ZM67 8.79412L66.5 8.79412L66.5 10.7353L67 10.7353L67.5 10.7353L67.5 8.79412L67 8.79412ZM67 12.6765L66.5 12.6765L66.5 14.6176L67 14.6176L67.5 14.6176L67.5 12.6765L67 12.6765ZM67 16.5588L66.5 16.5588L66.5 18.5L67 18.5L67.5 18.5L67.5 16.5588L67 16.5588ZM67 20.4412L66.5 20.4412L66.5 22.3824L67 22.3824L67.5 22.3824L67.5 20.4412L67 20.4412ZM67 24.3235L66.5 24.3235L66.5 26.2647L67 26.2647L67.5 26.2647L67.5 24.3235L67 24.3235ZM67 28.2059L66.5 28.2059L66.5 30.1471L67 30.1471L67.5 30.1471L67.5 28.2059L67 28.2059ZM67 32.0882L66.5 32.0882L66.5 34.0294L67 34.0294L67.5 34.0294L67.5 32.0882L67 32.0882ZM67 35.9706L66.5 35.9706L66.5 37.9118L67 37.9118L67.5 37.9118L67.5 35.9706L67 35.9706ZM67 39.8529L66.5 39.8529L66.5 41.7941L67 41.7941L67.5 41.7941L67.5 39.8529L67 39.8529ZM67 43.7353L66.5 43.7353L66.5 45.6765L67 45.6765L67.5 45.6765L67.5 43.7353L67 43.7353ZM67 47.6177L66.5 47.6177L66.5 49.5588L67 49.5588L67.5 49.5588L67.5 47.6177L67 47.6177ZM67 51.5L66.5 51.5L66.5 53.4412L67 53.4412L67.5 53.4412L67.5 51.5L67 51.5ZM67 55.3824L66.5 55.3824L66.5 57.3235L67 57.3235L67.5 57.3235L67.5 55.3824L67 55.3824ZM67 59.2647L66.5 59.2647L66.5 61.2059L67 61.2059L67.5 61.2059L67.5 59.2647L67 59.2647ZM67 63.1471L66.5 63.1471L66.5 65.0883L67 65.0883L67.5 65.0883L67.5 63.1471L67 63.1471ZM67 67.0294L66.5 67.0294L66.5 68L67 68L67.5 68L67.5 67.0294L67 67.0294ZM115 68L116 68L116 67.0294L115 67.0294L114 67.0294L114 68L115 68ZM115 65.0882L116 65.0882L116 63.1471L115 63.1471L114 63.1471L114 65.0882L115 65.0882ZM115 61.2059L116 61.2059L116 59.2647L115 59.2647L114 59.2647L114 61.2059L115 61.2059ZM115 57.3235L116 57.3235L116 55.3824L115 55.3824L114 55.3824L114 57.3235L115 57.3235ZM115 53.4412L116 53.4412L116 51.5L115 51.5L114 51.5L114 53.4412L115 53.4412ZM115 49.5588L116 49.5588L116 47.6176L115 47.6176L114 47.6176L114 49.5588L115 49.5588ZM115 45.6765L116 45.6765L116 43.7353L115 43.7353L114 43.7353L114 45.6765L115 45.6765ZM115 41.7941L116 41.7941L116 39.8529L115 39.8529L114 39.8529L114 41.7941L115 41.7941ZM115 37.9118L116 37.9118L116 35.9706L115 35.9706L114 35.9706L114 37.9118L115 37.9118ZM115 34.0294L116 34.0294L116 32.0882L115 32.0882L114 32.0882L114 34.0294L115 34.0294ZM115 30.147L116 30.147L116 28.2059L115 28.2059L114 28.2059L114 30.147L115 30.147ZM115 26.2647L116 26.2647L116 24.3235L115 24.3235L114 24.3235L114 26.2647L115 26.2647ZM115 22.3823L116 22.3823L116 20.4412L115 20.4412L114 20.4412L114 22.3823L115 22.3823ZM115 18.5L116 18.5L116 16.5588L115 16.5588L114 16.5588L114 18.5L115 18.5ZM115 14.6176L116 14.6176L116 12.6765L115 12.6765L114 12.6765L114 14.6176L115 14.6176ZM115 10.7353L116 10.7353L116 8.7941L115 8.7941L114 8.7941L114 10.7353L115 10.7353ZM115 6.85292L116 6.85292L116 4.91174L115 4.91174L114 4.91174L114 6.85292L115 6.85292ZM115 2.97056L116 2.97056L116 2L115 2L114 2L114 2.97056L115 2.97056ZM67 2L66 2L66 2.97059L67 2.97059L68 2.97059L68 2L67 2ZM67 4.91177L66 4.91177L66 6.85294L67 6.85294L68 6.85294L68 4.91177L67 4.91177ZM67 8.79412L66 8.79412L66 10.7353L67 10.7353L68 10.7353L68 8.79412L67 8.79412ZM67 12.6765L66 12.6765L66 14.6176L67 14.6176L68 14.6176L68 12.6765L67 12.6765ZM67 16.5588L66 16.5588L66 18.5L67 18.5L68 18.5L68 16.5588L67 16.5588ZM67 20.4412L66 20.4412L66 22.3824L67 22.3824L68 22.3824L68 20.4412L67 20.4412ZM67 24.3235L66 24.3235L66 26.2647L67 26.2647L68 26.2647L68 24.3235L67 24.3235ZM67 28.2059L66 28.2059L66 30.1471L67 30.1471L68 30.1471L68 28.2059L67 28.2059ZM67 32.0882L66 32.0882L66 34.0294L67 34.0294L68 34.0294L68 32.0882L67 32.0882ZM67 35.9706L66 35.9706L66 37.9118L67 37.9118L68 37.9118L68 35.9706L67 35.9706ZM67 39.8529L66 39.8529L66 41.7941L67 41.7941L68 41.7941L68 39.8529L67 39.8529ZM67 43.7353L66 43.7353L66 45.6765L67 45.6765L68 45.6765L68 43.7353L67 43.7353ZM67 47.6177L66 47.6177L66 49.5588L67 49.5588L68 49.5588L68 47.6177L67 47.6177ZM67 51.5L66 51.5L66 53.4412L67 53.4412L68 53.4412L68 51.5L67 51.5ZM67 55.3824L66 55.3824L66 57.3235L67 57.3235L68 57.3235L68 55.3824L67 55.3824ZM67 59.2647L66 59.2647L66 61.2059L67 61.2059L68 61.2059L68 59.2647L67 59.2647ZM67 63.1471L66 63.1471L66 65.0883L67 65.0883L68 65.0883L68 63.1471L67 63.1471ZM67 67.0294L66 67.0294L66 68L67 68L68 68L68 67.0294L67 67.0294Z" fill="#0096FF" mask="url(#path-6-inside-2_4219_25901)"/>
13
14
  <path d="M99.8275 63.5419L94.2119 49L109.294 55.1409L101.79 56.0727L99.8275 63.5419Z" fill="black" stroke="white"/>
14
- </svg>
15
+ </svg>`;
@@ -10,14 +10,19 @@ export declare const DRAG_CURSOR_HOTSPOT: {
10
10
  readonly x: 14.4;
11
11
  readonly y: 12;
12
12
  };
13
+ export type CursorImage = "design-select" | "drag" | "sketch" | "eraser" | "comment";
13
14
  export declare const DESIGN_SELECT_CURSOR_URL: string;
14
15
  export declare const DRAG_CURSOR_URL: string;
15
16
  export declare const SKETCH_CURSOR_URL: string;
17
+ export declare const ERASER_CURSOR_URL: string;
16
18
  export declare const DESIGN_SELECT_CURSOR: string;
17
19
  /** Cursor SVGs are separate images, so resolve CSS tokens before encoding them. */
18
20
  export declare function createCommentCursor(tokenSource?: Element | null): string;
21
+ /** Image files for hosts that serve cursors from a base URL; the comment cursor uses default tokens. */
22
+ export declare function cursorImageFiles(): Record<CursorImage, string>;
19
23
  export declare const COMMENT_CURSOR: string;
20
24
  export declare const PAN_CURSOR = "grab";
21
25
  export declare const DRAG_CURSOR: string;
22
26
  export declare const SKETCH_CURSOR: string;
27
+ export declare const ERASER_CURSOR: string;
23
28
  export declare function rendererCursorValue(cursor: RendererCursor, commentCursor?: string): string;