@salesforce/ui-design-mode 12.12.1 → 12.14.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 (42) hide show
  1. package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
  2. package/dist/authoring/core/editors/DimensionEditor.d.cts +11 -20
  3. package/dist/authoring/core/editors/DimensionEditor.d.ts +11 -20
  4. package/dist/authoring/core/editors/DimensionEditor.d.ts.map +1 -1
  5. package/dist/authoring/core/hooks/usePopover.d.cts +3 -2
  6. package/dist/authoring/core/hooks/usePopover.d.ts +3 -2
  7. package/dist/authoring/core/hooks/usePopover.d.ts.map +1 -1
  8. package/dist/authoring/core/labels/labels.d.cts +24 -42
  9. package/dist/authoring/core/labels/labels.d.ts +24 -42
  10. package/dist/authoring/core/labels/labels.d.ts.map +1 -1
  11. package/dist/authoring/core/utils/dimensionUtils.d.cts +19 -11
  12. package/dist/authoring/core/utils/dimensionUtils.d.ts +19 -11
  13. package/dist/authoring/core/utils/dimensionUtils.d.ts.map +1 -1
  14. package/dist/authoring/react/index.js +4 -4
  15. package/dist/authoring/react/styles.css +1 -1
  16. package/dist/authoring/web-component/index.js +101 -68
  17. package/dist/protocol/index.cjs +2 -0
  18. package/dist/protocol/index.d.cts +1 -0
  19. package/dist/protocol/index.d.ts +1 -0
  20. package/dist/protocol/index.d.ts.map +1 -1
  21. package/dist/protocol/index.js +2 -0
  22. package/dist/protocol/measuredStyleProperties.cjs +8 -0
  23. package/dist/protocol/measuredStyleProperties.d.cts +13 -0
  24. package/dist/protocol/measuredStyleProperties.d.ts +13 -0
  25. package/dist/protocol/measuredStyleProperties.d.ts.map +1 -0
  26. package/dist/protocol/measuredStyleProperties.js +8 -0
  27. package/dist/protocol/messageTypes.d.cts +6 -3
  28. package/dist/protocol/messageTypes.d.ts +6 -3
  29. package/dist/protocol/messageTypes.d.ts.map +1 -1
  30. package/dist/protocol/version.cjs +1 -1
  31. package/dist/protocol/version.js +1 -1
  32. package/dist/runtime/design-mode-interactions.js +15 -8
  33. package/dist/runtime/interactions/communicationManager.d.cts +1 -1
  34. package/dist/runtime/interactions/communicationManager.d.ts +1 -1
  35. package/dist/runtime/interactions/communicationManager.d.ts.map +1 -1
  36. package/dist/runtime/interactions/interactionsController.d.cts +2 -2
  37. package/dist/runtime/interactions/interactionsController.d.ts +2 -2
  38. package/dist/runtime/interactions/interactionsController.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/authoring/core/editors/OverflowEditor.d.cts +0 -19
  41. package/dist/authoring/core/editors/OverflowEditor.d.ts +0 -19
  42. package/dist/authoring/core/editors/OverflowEditor.d.ts.map +0 -1
@@ -4,6 +4,7 @@ const messageTypes = require("./messageTypes.cjs");
4
4
  const domAttributes = require("./domAttributes.cjs");
5
5
  const editableElementTags = require("./editableElementTags.cjs");
6
6
  const version = require("./version.cjs");
7
+ const measuredStyleProperties = require("./measuredStyleProperties.cjs");
7
8
  exports.CAP_SELECT_ELEMENT = messageTypes.CAP_SELECT_ELEMENT;
8
9
  exports.MSG_COMPONENT_SELECTED = messageTypes.MSG_COMPONENT_SELECTED;
9
10
  exports.MSG_DISABLE_INTERACTIONS = messageTypes.MSG_DISABLE_INTERACTIONS;
@@ -18,3 +19,4 @@ exports.ATTR_SOURCE_FILE = domAttributes.ATTR_SOURCE_FILE;
18
19
  exports.ATTR_TEXT_TYPE = domAttributes.ATTR_TEXT_TYPE;
19
20
  exports.EDITABLE_ELEMENT_TAGS = editableElementTags.EDITABLE_ELEMENT_TAGS;
20
21
  exports.UI_DESIGN_MODE_VERSION = version.UI_DESIGN_MODE_VERSION;
22
+ exports.MEASURED_TYPOGRAPHY_PROPERTIES = measuredStyleProperties.MEASURED_TYPOGRAPHY_PROPERTIES;
@@ -7,4 +7,5 @@ export * from './messageTypes.cjs';
7
7
  export * from './domAttributes.cjs';
8
8
  export * from './editableElementTags.cjs';
9
9
  export * from './version.cjs';
10
+ export * from './measuredStyleProperties.cjs';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -7,4 +7,5 @@ export * from './messageTypes.js';
7
7
  export * from './domAttributes.js';
8
8
  export * from './editableElementTags.js';
9
9
  export * from './version.js';
10
+ export * from './measuredStyleProperties.js';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/protocol/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/protocol/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC"}
@@ -2,11 +2,13 @@ import { CAP_SELECT_ELEMENT, MSG_COMPONENT_SELECTED, MSG_DISABLE_INTERACTIONS, M
2
2
  import { ATTR_SOURCE_FILE, ATTR_TEXT_TYPE } from "./domAttributes.js";
3
3
  import { EDITABLE_ELEMENT_TAGS } from "./editableElementTags.js";
4
4
  import { UI_DESIGN_MODE_VERSION } from "./version.js";
5
+ import { MEASURED_TYPOGRAPHY_PROPERTIES } from "./measuredStyleProperties.js";
5
6
  export {
6
7
  ATTR_SOURCE_FILE,
7
8
  ATTR_TEXT_TYPE,
8
9
  CAP_SELECT_ELEMENT,
9
10
  EDITABLE_ELEMENT_TAGS,
11
+ MEASURED_TYPOGRAPHY_PROPERTIES,
10
12
  MSG_COMPONENT_SELECTED,
11
13
  MSG_DISABLE_INTERACTIONS,
12
14
  MSG_ENABLE_INTERACTIONS,
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const MEASURED_TYPOGRAPHY_PROPERTIES = /* @__PURE__ */ new Set([
4
+ "fontSize",
5
+ "lineHeight",
6
+ "letterSpacing"
7
+ ]);
8
+ exports.MEASURED_TYPOGRAPHY_PROPERTIES = MEASURED_TYPOGRAPHY_PROPERTIES;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ /**
7
+ * Style properties the panel displays as computed values. Shared by the iframe
8
+ * runtime (which re-measures the selection after any change to one) and the
9
+ * authoring panel (which keeps their computed value live) so the two stay in
10
+ * lockstep.
11
+ */
12
+ export declare const MEASURED_TYPOGRAPHY_PROPERTIES: ReadonlySet<string>;
13
+ //# sourceMappingURL=measuredStyleProperties.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ /**
7
+ * Style properties the panel displays as computed values. Shared by the iframe
8
+ * runtime (which re-measures the selection after any change to one) and the
9
+ * authoring panel (which keeps their computed value live) so the two stay in
10
+ * lockstep.
11
+ */
12
+ export declare const MEASURED_TYPOGRAPHY_PROPERTIES: ReadonlySet<string>;
13
+ //# sourceMappingURL=measuredStyleProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measuredStyleProperties.d.ts","sourceRoot":"","sources":["../../src/protocol/measuredStyleProperties.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,MAAM,CAI7D,CAAC"}
@@ -0,0 +1,8 @@
1
+ const MEASURED_TYPOGRAPHY_PROPERTIES = /* @__PURE__ */ new Set([
2
+ "fontSize",
3
+ "lineHeight",
4
+ "letterSpacing"
5
+ ]);
6
+ export {
7
+ MEASURED_TYPOGRAPHY_PROPERTIES
8
+ };
@@ -49,9 +49,10 @@ export interface StyleChangeMessage {
49
49
  * True when this change is an undo/redo replay rather than a live edit.
50
50
  * `sourceLocation` alone can't carry this distinction: a live edit is stamped
51
51
  * with the source of the component it was made for too (W-23560967), so both
52
- * paths can carry a `sourceLocation`. The runtime uses this flag — not
53
- * `sourceLocation` presence — to decide whether a clear should re-notify the
54
- * panel for a re-measure (see `applyStyleChange` in interactionsController.ts).
52
+ * paths can carry a `sourceLocation`. Older runtimes use this flag to suppress
53
+ * clear echoes during replay; current runtimes ignore it and mark re-measures
54
+ * with `ComponentSelectedMessage.styleRefresh` instead.
55
+ * @deprecated Ignored by current runtimes; kept for older-runtime compatibility.
55
56
  */
56
57
  isReplay?: boolean;
57
58
  }
@@ -122,6 +123,8 @@ export interface InteractionsInitializedMessage {
122
123
  export interface ComponentSelectedMessage {
123
124
  type: "component-selected";
124
125
  component: ComponentData | null;
126
+ /** Re-measures the current selection after a style edit, not a selection swap. */
127
+ styleRefresh?: true;
125
128
  }
126
129
  export interface TextChangedMessage {
127
130
  type: "text-changed";
@@ -49,9 +49,10 @@ export interface StyleChangeMessage {
49
49
  * True when this change is an undo/redo replay rather than a live edit.
50
50
  * `sourceLocation` alone can't carry this distinction: a live edit is stamped
51
51
  * with the source of the component it was made for too (W-23560967), so both
52
- * paths can carry a `sourceLocation`. The runtime uses this flag — not
53
- * `sourceLocation` presence — to decide whether a clear should re-notify the
54
- * panel for a re-measure (see `applyStyleChange` in interactionsController.ts).
52
+ * paths can carry a `sourceLocation`. Older runtimes use this flag to suppress
53
+ * clear echoes during replay; current runtimes ignore it and mark re-measures
54
+ * with `ComponentSelectedMessage.styleRefresh` instead.
55
+ * @deprecated Ignored by current runtimes; kept for older-runtime compatibility.
55
56
  */
56
57
  isReplay?: boolean;
57
58
  }
@@ -122,6 +123,8 @@ export interface InteractionsInitializedMessage {
122
123
  export interface ComponentSelectedMessage {
123
124
  type: "component-selected";
124
125
  component: ComponentData | null;
126
+ /** Re-measures the current selection after a style edit, not a selection swap. */
127
+ styleRefresh?: true;
125
128
  }
126
129
  export interface TextChangedMessage {
127
130
  type: "text-changed";
@@ -1 +1 @@
1
- {"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../../src/protocol/messageTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;GASG;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB;AAID,MAAM,WAAW,yBAAyB;IACzC,IAAI,EAAE,qBAAqB,CAAC;IAC5B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA0B;IAC1C,IAAI,EAAE,sBAAsB,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,cAAc,CAAC;CAChC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,cAAc,CAAC;CAChC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,gBAAgB,CAAC;IACvB,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,cAAc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AAgB,EAAG,cAAuB,CAAC;AACxD,eAAO,MAAM,eAAe,EAAG,aAAsB,CAAC;AACtD,eAAO,MAAM,gBAAgB,EAAG,cAAuB,CAAC;AACxD,eAAO,MAAM,kBAAkB,EAAG,gBAAyB,CAAC;AAC5D,eAAO,MAAM,4BAA4B,EAAG,0BAAmC,CAAC;AAChF,eAAO,MAAM,sBAAsB,EAAG,oBAA6B,CAAC;AACpE,eAAO,MAAM,gBAAgB,EAAG,cAAuB,CAAC;AAIxD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAG,gBAAyB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const UI_DESIGN_MODE_VERSION = "12.12.1";
3
+ const UI_DESIGN_MODE_VERSION = "12.14.0";
4
4
  exports.UI_DESIGN_MODE_VERSION = UI_DESIGN_MODE_VERSION;
@@ -1,4 +1,4 @@
1
- const UI_DESIGN_MODE_VERSION = "12.12.1";
1
+ const UI_DESIGN_MODE_VERSION = "12.14.0";
2
2
  export {
3
3
  UI_DESIGN_MODE_VERSION
4
4
  };
@@ -56,7 +56,14 @@
56
56
  ];
57
57
 
58
58
  // src/protocol/version.ts
59
- var UI_DESIGN_MODE_VERSION = "12.12.1";
59
+ var UI_DESIGN_MODE_VERSION = "12.14.0";
60
+
61
+ // src/protocol/measuredStyleProperties.ts
62
+ var MEASURED_TYPOGRAPHY_PROPERTIES = /* @__PURE__ */ new Set([
63
+ "fontSize",
64
+ "lineHeight",
65
+ "letterSpacing"
66
+ ]);
60
67
 
61
68
  // src/runtime/interactions/utils/sourceUtils.ts
62
69
  function parseRequiredInt(value) {
@@ -366,7 +373,7 @@
366
373
  * Notify the extension about a selected component
367
374
  * @param element - The selected element
368
375
  */
369
- notifyComponentSelected(element) {
376
+ notifyComponentSelected(element, styleRefresh) {
370
377
  const label = getLabelFromSource(element);
371
378
  const styles = getElementStyles(element);
372
379
  const debugSource = getSourceFromDataAttributes(element);
@@ -379,6 +386,7 @@
379
386
  window.parent.postMessage(
380
387
  {
381
388
  type: MSG_COMPONENT_SELECTED,
389
+ ...styleRefresh ? { styleRefresh: true } : {},
382
390
  component: {
383
391
  name: label,
384
392
  tagName: element.tagName,
@@ -1591,17 +1599,17 @@
1591
1599
  /**
1592
1600
  * Apply a style change to all elements at the given source location.
1593
1601
  * `sourceLocation`, when provided, is used directly (both a stamped live
1594
- * edit and an undo/redo replay carry one — see `isReplay` below). Otherwise
1602
+ * edit and an undo/redo replay carry one). Otherwise
1595
1603
  * the source location is read from the currently selected element.
1596
1604
  */
1597
- applyStyleChange(property, value, sourceLocation, isReplay) {
1605
+ applyStyleChange(property, value, sourceLocation) {
1598
1606
  for (const el of this.resolveTargets(sourceLocation)) {
1599
1607
  el.style[property] = value;
1600
1608
  }
1601
1609
  this.overlayManager.reposition();
1602
- if (value === "" && !isReplay) {
1610
+ if (value === "" || MEASURED_TYPOGRAPHY_PROPERTIES.has(property)) {
1603
1611
  const selected = this.eventHandlers.getSelectedElement();
1604
- if (selected) this.communicationManager.notifyComponentSelected(selected);
1612
+ if (selected) this.communicationManager.notifyComponentSelected(selected, true);
1605
1613
  }
1606
1614
  }
1607
1615
  applyTextChange(text, sourceLocation) {
@@ -1676,8 +1684,7 @@
1676
1684
  interactions.applyStyleChange(
1677
1685
  String(typed.property ?? ""),
1678
1686
  String(typed.value ?? ""),
1679
- parseSourceLocation(typed.sourceLocation),
1680
- typed.isReplay === true
1687
+ parseSourceLocation(typed.sourceLocation)
1681
1688
  );
1682
1689
  }
1683
1690
  if (typed && typed.type === MSG_TEXT_CHANGE) {
@@ -19,7 +19,7 @@ export declare class CommunicationManager {
19
19
  * Notify the extension about a selected component
20
20
  * @param element - The selected element
21
21
  */
22
- notifyComponentSelected(element: HTMLElement): void;
22
+ notifyComponentSelected(element: HTMLElement, styleRefresh?: boolean): void;
23
23
  /**
24
24
  * Notify the extension about a text change
25
25
  * @param element - The element that changed
@@ -19,7 +19,7 @@ export declare class CommunicationManager {
19
19
  * Notify the extension about a selected component
20
20
  * @param element - The selected element
21
21
  */
22
- notifyComponentSelected(element: HTMLElement): void;
22
+ notifyComponentSelected(element: HTMLElement, styleRefresh?: boolean): void;
23
23
  /**
24
24
  * Notify the extension about a text change
25
25
  * @param element - The element that changed
@@ -1 +1 @@
1
- {"version":3,"file":"communicationManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/communicationManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAMN,KAAK,SAAS,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAcpD,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,WAAW,EACpB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,GAC1C,SAAS,GAAG,SAAS,CAkBvB;AAED,qBAAa,oBAAoB;;IAKhC;;;OAGG;IACH,uBAAuB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAqDnD;;;;;OAKG;IACH,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAyBnF;;OAEG;IACH,4BAA4B,IAAI,IAAI;CAmBpC"}
1
+ {"version":3,"file":"communicationManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/communicationManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAMN,KAAK,SAAS,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAcpD,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,WAAW,EACpB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,GAC1C,SAAS,GAAG,SAAS,CAkBvB;AAED,qBAAa,oBAAoB;;IAKhC;;;OAGG;IACH,uBAAuB,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI;IAsD3E;;;;;OAKG;IACH,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAyBnF;;OAEG;IACH,4BAA4B,IAAI,IAAI;CAmBpC"}
@@ -59,10 +59,10 @@ export declare class InteractionsController {
59
59
  /**
60
60
  * Apply a style change to all elements at the given source location.
61
61
  * `sourceLocation`, when provided, is used directly (both a stamped live
62
- * edit and an undo/redo replay carry one — see `isReplay` below). Otherwise
62
+ * edit and an undo/redo replay carry one). Otherwise
63
63
  * the source location is read from the currently selected element.
64
64
  */
65
- applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation, isReplay?: boolean): void;
65
+ applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation): void;
66
66
  applyTextChange(text: string, sourceLocation?: SourceLocation): void;
67
67
  /**
68
68
  * Apply attribute changes to all elements at the given source location whose
@@ -59,10 +59,10 @@ export declare class InteractionsController {
59
59
  /**
60
60
  * Apply a style change to all elements at the given source location.
61
61
  * `sourceLocation`, when provided, is used directly (both a stamped live
62
- * edit and an undo/redo replay carry one — see `isReplay` below). Otherwise
62
+ * edit and an undo/redo replay carry one). Otherwise
63
63
  * the source location is read from the currently selected element.
64
64
  */
65
- applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation, isReplay?: boolean): void;
65
+ applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation): void;
66
66
  applyTextChange(text: string, sourceLocation?: SourceLocation): void;
67
67
  /**
68
68
  * Apply attribute changes to all elements at the given source location whose
@@ -1 +1 @@
1
- {"version":3,"file":"interactionsController.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/interactionsController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,EAIN,KAAK,cAAc,EACnB,MAAM,qBAAqB,CAAC;AA6C7B,qBAAa,sBAAsB;IAClC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,gBAAgB,CAAmB;gBAE/B,OAAO,UAAO;IA2E1B;;OAEG;IACH,UAAU,IAAI,IAAI;IAalB;;;;OAIG;IACH,MAAM,CAAC,cAAc,GAAE,SAAS,MAAM,EAAO,GAAG,IAAI;IAMpD;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAgB,CAAC,cAAc,CAAC,EAAE,cAAc,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO;IAoCxE,OAAO,CAAC,cAAc;IAWtB;;;;;OAKG;IACH,gBAAgB,CACf,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,cAAc,CAAC,EAAE,cAAc,EAC/B,QAAQ,CAAC,EAAE,OAAO,GAChB,IAAI;IAwBP,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI;IAOpE;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CACf,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAC9C,cAAc,CAAC,EAAE,cAAc,GAC7B,IAAI;IAWP;;OAEG;IACH,OAAO,IAAI,IAAI;CAKf"}
1
+ {"version":3,"file":"interactionsController.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/interactionsController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,OAAO,EAIN,KAAK,cAAc,EACnB,MAAM,qBAAqB,CAAC;AA6C7B,qBAAa,sBAAsB;IAClC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,gBAAgB,CAAmB;gBAE/B,OAAO,UAAO;IA2E1B;;OAEG;IACH,UAAU,IAAI,IAAI;IAalB;;;;OAIG;IACH,MAAM,CAAC,cAAc,GAAE,SAAS,MAAM,EAAO,GAAG,IAAI;IAMpD;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAgB,CAAC,cAAc,CAAC,EAAE,cAAc,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO;IAoCxE,OAAO,CAAC,cAAc;IAWtB;;;;;OAKG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI;IAgBxF,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI;IAOpE;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CACf,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAC9C,cAAc,CAAC,EAAE,cAAc,GAC7B,IAAI;IAWP;;OAEG;IACH,OAAO,IAAI,IAAI;CAKf"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/ui-design-mode",
3
3
  "description": "Hybrid editor (design-mode) authoring UI, iframe runtime, source-locator, and protocol for Salesforce UI Bundles",
4
- "version": "12.12.1",
4
+ "version": "12.14.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "type": "module",
7
7
  "exports": {
@@ -1,19 +0,0 @@
1
- import { PanelLabels } from '../labels/labels.cjs';
2
- type OverflowOptionLabels = PanelLabels["editors"]["overflow"]["options"];
3
- type PicklistAriaLabels = PanelLabels["editors"]["picklist"];
4
- export interface OverflowEditorProps {
5
- label?: string;
6
- /** The explicit inline override (element.style), or "" when unset. */
7
- value?: string;
8
- /** The effective computed overflow (after cascade; initial is "visible"). */
9
- computedValue?: string;
10
- onChange: (value: string) => void;
11
- id?: string;
12
- /** Localized option labels; omit to use the editor's English defaults. */
13
- optionLabels?: OverflowOptionLabels;
14
- /** Localized picklist aria (reset control); omit for the English default. */
15
- aria?: PicklistAriaLabels;
16
- }
17
- export declare function OverflowEditor({ label, value, computedValue, onChange, id, optionLabels, aria, }: OverflowEditorProps): import("react/jsx-runtime").JSX.Element;
18
- export {};
19
- //# sourceMappingURL=OverflowEditor.d.ts.map
@@ -1,19 +0,0 @@
1
- import { PanelLabels } from '../labels/labels.js';
2
- type OverflowOptionLabels = PanelLabels["editors"]["overflow"]["options"];
3
- type PicklistAriaLabels = PanelLabels["editors"]["picklist"];
4
- export interface OverflowEditorProps {
5
- label?: string;
6
- /** The explicit inline override (element.style), or "" when unset. */
7
- value?: string;
8
- /** The effective computed overflow (after cascade; initial is "visible"). */
9
- computedValue?: string;
10
- onChange: (value: string) => void;
11
- id?: string;
12
- /** Localized option labels; omit to use the editor's English defaults. */
13
- optionLabels?: OverflowOptionLabels;
14
- /** Localized picklist aria (reset control); omit for the English default. */
15
- aria?: PicklistAriaLabels;
16
- }
17
- export declare function OverflowEditor({ label, value, computedValue, onChange, id, optionLabels, aria, }: OverflowEditorProps): import("react/jsx-runtime").JSX.Element;
18
- export {};
19
- //# sourceMappingURL=OverflowEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OverflowEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/OverflowEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,KAAK,oBAAoB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC;AAC1E,KAAK,kBAAkB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;AA6B7D,MAAM,WAAW,mBAAmB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,6EAA6E;IAC7E,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC1B;AAED,wBAAgB,cAAc,CAAC,EAC9B,KAA0B,EAC1B,KAAK,EACL,aAAa,EACb,QAAQ,EACR,EAAe,EACf,YAAY,EACZ,IAAI,GACJ,EAAE,mBAAmB,2CAuBrB"}