@salesforce/ui-design-mode 12.17.0 → 13.0.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 (96) hide show
  1. package/dist/authoring/core/DesignPropertyPanelRoot.d.cts +4 -2
  2. package/dist/authoring/core/DesignPropertyPanelRoot.d.ts +4 -2
  3. package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
  4. package/dist/authoring/core/editors/BoxDimensionEditor.d.cts +20 -34
  5. package/dist/authoring/core/editors/BoxDimensionEditor.d.ts +20 -34
  6. package/dist/authoring/core/editors/BoxDimensionEditor.d.ts.map +1 -1
  7. package/dist/authoring/core/editors/ColorEditor.d.cts +8 -7
  8. package/dist/authoring/core/editors/ColorEditor.d.ts +8 -7
  9. package/dist/authoring/core/editors/ColorEditor.d.ts.map +1 -1
  10. package/dist/authoring/core/editors/DimensionEditor.d.ts.map +1 -1
  11. package/dist/authoring/core/editors/FieldNotice.d.cts +17 -0
  12. package/dist/authoring/core/editors/FieldNotice.d.ts +17 -0
  13. package/dist/authoring/core/editors/FieldNotice.d.ts.map +1 -0
  14. package/dist/authoring/core/editors/FontFamilyEditor.d.cts +4 -6
  15. package/dist/authoring/core/editors/FontFamilyEditor.d.ts +4 -6
  16. package/dist/authoring/core/editors/FontFamilyEditor.d.ts.map +1 -1
  17. package/dist/authoring/core/editors/FontWeightEditor.d.cts +6 -5
  18. package/dist/authoring/core/editors/FontWeightEditor.d.ts +6 -5
  19. package/dist/authoring/core/editors/FontWeightEditor.d.ts.map +1 -1
  20. package/dist/authoring/core/editors/ImageEditor.d.cts +21 -1
  21. package/dist/authoring/core/editors/ImageEditor.d.ts +21 -1
  22. package/dist/authoring/core/editors/ImageEditor.d.ts.map +1 -1
  23. package/dist/authoring/core/editors/PicklistEditor.d.cts +5 -21
  24. package/dist/authoring/core/editors/PicklistEditor.d.ts +5 -21
  25. package/dist/authoring/core/editors/PicklistEditor.d.ts.map +1 -1
  26. package/dist/authoring/core/history/changeSet.d.cts +28 -5
  27. package/dist/authoring/core/history/changeSet.d.ts +28 -5
  28. package/dist/authoring/core/history/changeSet.d.ts.map +1 -1
  29. package/dist/authoring/core/history/historyService.d.cts +1 -3
  30. package/dist/authoring/core/history/historyService.d.ts +1 -3
  31. package/dist/authoring/core/history/historyService.d.ts.map +1 -1
  32. package/dist/authoring/core/history/iframeCommandExecutor.d.cts +1 -1
  33. package/dist/authoring/core/history/iframeCommandExecutor.d.ts +1 -1
  34. package/dist/authoring/core/hooks/useRecentColors.d.cts +12 -0
  35. package/dist/authoring/core/hooks/useRecentColors.d.ts +12 -0
  36. package/dist/authoring/core/hooks/useRecentColors.d.ts.map +1 -0
  37. package/dist/authoring/core/labels/labels.d.cts +74 -97
  38. package/dist/authoring/core/labels/labels.d.ts +74 -97
  39. package/dist/authoring/core/labels/labels.d.ts.map +1 -1
  40. package/dist/authoring/core/utils/colorEditorModel.d.cts +18 -0
  41. package/dist/authoring/core/utils/colorEditorModel.d.ts +18 -0
  42. package/dist/authoring/core/utils/colorEditorModel.d.ts.map +1 -0
  43. package/dist/authoring/core/utils/colorOcclusion.d.cts +4 -20
  44. package/dist/authoring/core/utils/colorOcclusion.d.ts +4 -20
  45. package/dist/authoring/core/utils/colorOcclusion.d.ts.map +1 -1
  46. package/dist/authoring/core/utils/dimensionUtils.d.cts +0 -39
  47. package/dist/authoring/core/utils/dimensionUtils.d.ts +0 -39
  48. package/dist/authoring/core/utils/dimensionUtils.d.ts.map +1 -1
  49. package/dist/authoring/react/index.d.cts +1 -1
  50. package/dist/authoring/react/index.d.ts +1 -1
  51. package/dist/authoring/react/index.d.ts.map +1 -1
  52. package/dist/authoring/react/index.js +3 -3
  53. package/dist/authoring/react/styles.css +1 -1
  54. package/dist/authoring/web-component/index.d.cts +3 -1
  55. package/dist/authoring/web-component/index.d.ts +3 -1
  56. package/dist/authoring/web-component/index.d.ts.map +1 -1
  57. package/dist/authoring/web-component/index.js +290 -288
  58. package/dist/protocol/domAttributes.cjs +4 -0
  59. package/dist/protocol/domAttributes.d.cts +17 -0
  60. package/dist/protocol/domAttributes.d.ts +17 -0
  61. package/dist/protocol/domAttributes.d.ts.map +1 -1
  62. package/dist/protocol/domAttributes.js +4 -0
  63. package/dist/protocol/index.cjs +4 -0
  64. package/dist/protocol/index.js +6 -2
  65. package/dist/protocol/measuredStyleProperties.cjs +18 -0
  66. package/dist/protocol/measuredStyleProperties.d.cts +7 -0
  67. package/dist/protocol/measuredStyleProperties.d.ts +7 -0
  68. package/dist/protocol/measuredStyleProperties.d.ts.map +1 -1
  69. package/dist/protocol/measuredStyleProperties.js +18 -0
  70. package/dist/protocol/messageTypes.d.cts +27 -16
  71. package/dist/protocol/messageTypes.d.ts +27 -16
  72. package/dist/protocol/messageTypes.d.ts.map +1 -1
  73. package/dist/protocol/version.cjs +1 -1
  74. package/dist/protocol/version.js +1 -1
  75. package/dist/runtime/design-mode-interactions.js +198 -88
  76. package/dist/runtime/interactions/communicationManager.d.cts +2 -2
  77. package/dist/runtime/interactions/communicationManager.d.ts +2 -2
  78. package/dist/runtime/interactions/communicationManager.d.ts.map +1 -1
  79. package/dist/runtime/interactions/eventHandlers.d.cts +1 -1
  80. package/dist/runtime/interactions/eventHandlers.d.ts +1 -1
  81. package/dist/runtime/interactions/eventHandlers.d.ts.map +1 -1
  82. package/dist/runtime/interactions/interactionsController.d.cts +2 -0
  83. package/dist/runtime/interactions/interactionsController.d.ts +2 -0
  84. package/dist/runtime/interactions/interactionsController.d.ts.map +1 -1
  85. package/dist/runtime/interactions/propertyEditorCapabilities.d.cts +4 -0
  86. package/dist/runtime/interactions/propertyEditorCapabilities.d.ts +4 -0
  87. package/dist/runtime/interactions/propertyEditorCapabilities.d.ts.map +1 -0
  88. package/dist/runtime/interactions/utils/cssUtils.d.cts +3 -7
  89. package/dist/runtime/interactions/utils/cssUtils.d.ts +3 -7
  90. package/dist/runtime/interactions/utils/cssUtils.d.ts.map +1 -1
  91. package/dist/runtime/interactions/utils/sourceUtils.d.cts +1 -1
  92. package/dist/runtime/interactions/utils/sourceUtils.d.ts +1 -1
  93. package/dist/source-locator/react/babel/reactDesignTimeLocatorBabelPlugin.cjs +33 -0
  94. package/dist/source-locator/react/babel/reactDesignTimeLocatorBabelPlugin.d.ts.map +1 -1
  95. package/dist/source-locator/react/babel/reactDesignTimeLocatorBabelPlugin.js +34 -1
  96. package/package.json +1 -1
@@ -2,5 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const ATTR_SOURCE_FILE = "data-source-file";
4
4
  const ATTR_TEXT_TYPE = "data-text-type";
5
+ const ATTR_SRC_KIND = "data-src-kind";
6
+ const ATTR_ALT_KIND = "data-alt-kind";
7
+ exports.ATTR_ALT_KIND = ATTR_ALT_KIND;
5
8
  exports.ATTR_SOURCE_FILE = ATTR_SOURCE_FILE;
9
+ exports.ATTR_SRC_KIND = ATTR_SRC_KIND;
6
10
  exports.ATTR_TEXT_TYPE = ATTR_TEXT_TYPE;
@@ -15,4 +15,21 @@ export declare const ATTR_SOURCE_FILE: "data-source-file";
15
15
  export declare const ATTR_TEXT_TYPE: "data-text-type";
16
16
  /** Allowed values for ATTR_TEXT_TYPE. */
17
17
  export type TextType = "none" | "static" | "dynamic" | "mixed" | "element";
18
+ /**
19
+ * How an `<img>`'s `src` is written in source: `literal | asset-import | unknown`.
20
+ * Set by the Babel plugin on native `<img>` elements only. Fails closed: anything
21
+ * it can't prove is a literal or an imported image asset is `unknown`.
22
+ */
23
+ export declare const ATTR_SRC_KIND: "data-src-kind";
24
+ /** How an `<img>`'s `alt` is written in source: `literal | unknown` (see ATTR_SRC_KIND). */
25
+ export declare const ATTR_ALT_KIND: "data-alt-kind";
26
+ /**
27
+ * Allowed values for ATTR_SRC_KIND and ATTR_ALT_KIND.
28
+ * - `literal`: a string literal, or the attribute is absent.
29
+ * - `asset-import`: an identifier bound to a default import of an image file
30
+ * (`import hero from "./assets/hero.cjs"`). `src` only.
31
+ * - `unknown`: anything else (props, state, hooks, fetched data, `.map()` items,
32
+ * expressions, a props spread). Not editable from design mode.
33
+ */
34
+ export type MediaValueKind = "literal" | "asset-import" | "unknown";
18
35
  //# sourceMappingURL=domAttributes.d.ts.map
@@ -15,4 +15,21 @@ export declare const ATTR_SOURCE_FILE: "data-source-file";
15
15
  export declare const ATTR_TEXT_TYPE: "data-text-type";
16
16
  /** Allowed values for ATTR_TEXT_TYPE. */
17
17
  export type TextType = "none" | "static" | "dynamic" | "mixed" | "element";
18
+ /**
19
+ * How an `<img>`'s `src` is written in source: `literal | asset-import | unknown`.
20
+ * Set by the Babel plugin on native `<img>` elements only. Fails closed: anything
21
+ * it can't prove is a literal or an imported image asset is `unknown`.
22
+ */
23
+ export declare const ATTR_SRC_KIND: "data-src-kind";
24
+ /** How an `<img>`'s `alt` is written in source: `literal | unknown` (see ATTR_SRC_KIND). */
25
+ export declare const ATTR_ALT_KIND: "data-alt-kind";
26
+ /**
27
+ * Allowed values for ATTR_SRC_KIND and ATTR_ALT_KIND.
28
+ * - `literal`: a string literal, or the attribute is absent.
29
+ * - `asset-import`: an identifier bound to a default import of an image file
30
+ * (`import hero from "./assets/hero.js"`). `src` only.
31
+ * - `unknown`: anything else (props, state, hooks, fetched data, `.map()` items,
32
+ * expressions, a props spread). Not editable from design mode.
33
+ */
34
+ export type MediaValueKind = "literal" | "asset-import" | "unknown";
18
35
  //# sourceMappingURL=domAttributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"domAttributes.d.ts","sourceRoot":"","sources":["../../src/protocol/domAttributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAG,kBAA2B,CAAC;AAE5D,6EAA6E;AAC7E,eAAO,MAAM,cAAc,EAAG,gBAAyB,CAAC;AAExD,yCAAyC;AACzC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"domAttributes.d.ts","sourceRoot":"","sources":["../../src/protocol/domAttributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAG,kBAA2B,CAAC;AAE5D,6EAA6E;AAC7E,eAAO,MAAM,cAAc,EAAG,gBAAyB,CAAC;AAExD,yCAAyC;AACzC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAG,eAAwB,CAAC;AAEtD,4FAA4F;AAC5F,eAAO,MAAM,aAAa,EAAG,eAAwB,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,CAAC"}
@@ -1,6 +1,10 @@
1
1
  const ATTR_SOURCE_FILE = "data-source-file";
2
2
  const ATTR_TEXT_TYPE = "data-text-type";
3
+ const ATTR_SRC_KIND = "data-src-kind";
4
+ const ATTR_ALT_KIND = "data-alt-kind";
3
5
  export {
6
+ ATTR_ALT_KIND,
4
7
  ATTR_SOURCE_FILE,
8
+ ATTR_SRC_KIND,
5
9
  ATTR_TEXT_TYPE
6
10
  };
@@ -15,8 +15,12 @@ exports.MSG_SELECT_ELEMENT = messageTypes.MSG_SELECT_ELEMENT;
15
15
  exports.MSG_STYLE_CHANGE = messageTypes.MSG_STYLE_CHANGE;
16
16
  exports.MSG_TEXT_CHANGE = messageTypes.MSG_TEXT_CHANGE;
17
17
  exports.MSG_TEXT_CHANGED = messageTypes.MSG_TEXT_CHANGED;
18
+ exports.ATTR_ALT_KIND = domAttributes.ATTR_ALT_KIND;
18
19
  exports.ATTR_SOURCE_FILE = domAttributes.ATTR_SOURCE_FILE;
20
+ exports.ATTR_SRC_KIND = domAttributes.ATTR_SRC_KIND;
19
21
  exports.ATTR_TEXT_TYPE = domAttributes.ATTR_TEXT_TYPE;
20
22
  exports.EDITABLE_ELEMENT_TAGS = editableElementTags.EDITABLE_ELEMENT_TAGS;
21
23
  exports.UI_DESIGN_MODE_VERSION = version.UI_DESIGN_MODE_VERSION;
24
+ exports.BOX_DIMENSION_LONGHANDS = measuredStyleProperties.BOX_DIMENSION_LONGHANDS;
25
+ exports.MEASURED_BOX_PROPERTIES = measuredStyleProperties.MEASURED_BOX_PROPERTIES;
22
26
  exports.MEASURED_TYPOGRAPHY_PROPERTIES = measuredStyleProperties.MEASURED_TYPOGRAPHY_PROPERTIES;
@@ -1,13 +1,17 @@
1
1
  import { CAP_SELECT_ELEMENT, MSG_COMPONENT_SELECTED, MSG_DISABLE_INTERACTIONS, MSG_ENABLE_INTERACTIONS, MSG_INTERACTIONS_INITIALIZED, MSG_MEDIA_CHANGE, MSG_SELECT_ELEMENT, MSG_STYLE_CHANGE, MSG_TEXT_CHANGE, MSG_TEXT_CHANGED } from "./messageTypes.js";
2
- import { ATTR_SOURCE_FILE, ATTR_TEXT_TYPE } from "./domAttributes.js";
2
+ import { ATTR_ALT_KIND, ATTR_SOURCE_FILE, ATTR_SRC_KIND, 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
+ import { BOX_DIMENSION_LONGHANDS, MEASURED_BOX_PROPERTIES, MEASURED_TYPOGRAPHY_PROPERTIES } from "./measuredStyleProperties.js";
6
6
  export {
7
+ ATTR_ALT_KIND,
7
8
  ATTR_SOURCE_FILE,
9
+ ATTR_SRC_KIND,
8
10
  ATTR_TEXT_TYPE,
11
+ BOX_DIMENSION_LONGHANDS,
9
12
  CAP_SELECT_ELEMENT,
10
13
  EDITABLE_ELEMENT_TAGS,
14
+ MEASURED_BOX_PROPERTIES,
11
15
  MEASURED_TYPOGRAPHY_PROPERTIES,
12
16
  MSG_COMPONENT_SELECTED,
13
17
  MSG_DISABLE_INTERACTIONS,
@@ -1,8 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const MEASURED_TYPOGRAPHY_PROPERTIES = /* @__PURE__ */ new Set([
4
+ "fontFamily",
5
+ "fontWeight",
4
6
  "fontSize",
5
7
  "lineHeight",
6
8
  "letterSpacing"
7
9
  ]);
10
+ const BOX_DIMENSION_LONGHANDS = {
11
+ padding: ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
12
+ margin: ["marginTop", "marginRight", "marginBottom", "marginLeft"],
13
+ borderRadius: [
14
+ "borderTopLeftRadius",
15
+ "borderTopRightRadius",
16
+ "borderBottomRightRadius",
17
+ "borderBottomLeftRadius"
18
+ ]
19
+ };
20
+ const MEASURED_BOX_PROPERTIES = /* @__PURE__ */ new Set([
21
+ ...Object.keys(BOX_DIMENSION_LONGHANDS),
22
+ ...Object.values(BOX_DIMENSION_LONGHANDS).flat()
23
+ ]);
24
+ exports.BOX_DIMENSION_LONGHANDS = BOX_DIMENSION_LONGHANDS;
25
+ exports.MEASURED_BOX_PROPERTIES = MEASURED_BOX_PROPERTIES;
8
26
  exports.MEASURED_TYPOGRAPHY_PROPERTIES = MEASURED_TYPOGRAPHY_PROPERTIES;
@@ -10,4 +10,11 @@
10
10
  * lockstep.
11
11
  */
12
12
  export declare const MEASURED_TYPOGRAPHY_PROPERTIES: ReadonlySet<string>;
13
+ /** Side order matches the box editor, including clockwise radius corners. */
14
+ export declare const BOX_DIMENSION_LONGHANDS: {
15
+ readonly padding: readonly ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"];
16
+ readonly margin: readonly ["marginTop", "marginRight", "marginBottom", "marginLeft"];
17
+ readonly borderRadius: readonly ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomRightRadius", "borderBottomLeftRadius"];
18
+ };
19
+ export declare const MEASURED_BOX_PROPERTIES: ReadonlySet<string>;
13
20
  //# sourceMappingURL=measuredStyleProperties.d.ts.map
@@ -10,4 +10,11 @@
10
10
  * lockstep.
11
11
  */
12
12
  export declare const MEASURED_TYPOGRAPHY_PROPERTIES: ReadonlySet<string>;
13
+ /** Side order matches the box editor, including clockwise radius corners. */
14
+ export declare const BOX_DIMENSION_LONGHANDS: {
15
+ readonly padding: readonly ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"];
16
+ readonly margin: readonly ["marginTop", "marginRight", "marginBottom", "marginLeft"];
17
+ readonly borderRadius: readonly ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomRightRadius", "borderBottomLeftRadius"];
18
+ };
19
+ export declare const MEASURED_BOX_PROPERTIES: ReadonlySet<string>;
13
20
  //# sourceMappingURL=measuredStyleProperties.d.ts.map
@@ -1 +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"}
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,CAM7D,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB;;;;CAS1B,CAAC;AAEX,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAGtD,CAAC"}
@@ -1,8 +1,26 @@
1
1
  const MEASURED_TYPOGRAPHY_PROPERTIES = /* @__PURE__ */ new Set([
2
+ "fontFamily",
3
+ "fontWeight",
2
4
  "fontSize",
3
5
  "lineHeight",
4
6
  "letterSpacing"
5
7
  ]);
8
+ const BOX_DIMENSION_LONGHANDS = {
9
+ padding: ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
10
+ margin: ["marginTop", "marginRight", "marginBottom", "marginLeft"],
11
+ borderRadius: [
12
+ "borderTopLeftRadius",
13
+ "borderTopRightRadius",
14
+ "borderBottomRightRadius",
15
+ "borderBottomLeftRadius"
16
+ ]
17
+ };
18
+ const MEASURED_BOX_PROPERTIES = /* @__PURE__ */ new Set([
19
+ ...Object.keys(BOX_DIMENSION_LONGHANDS),
20
+ ...Object.values(BOX_DIMENSION_LONGHANDS).flat()
21
+ ]);
6
22
  export {
23
+ BOX_DIMENSION_LONGHANDS,
24
+ MEASURED_BOX_PROPERTIES,
7
25
  MEASURED_TYPOGRAPHY_PROPERTIES
8
26
  };
@@ -1,18 +1,4 @@
1
- /**
2
- * Copyright (c) 2026, Salesforce, Inc.,
3
- * All rights reserved.
4
- * For full license text, see the LICENSE.txt file
5
- */
6
- /**
7
- * Typed message contract between the design-mode authoring host and the
8
- * iframe-side interactions runtime.
9
- *
10
- * Evolution policy: see docs/specs/package.md §Protocol contract. Briefly:
11
- * - Add new message types and optional fields freely.
12
- * - Never rename or remove. Never change enum values.
13
- * - Capability advertisement (on InteractionsInitializedMessage) is the
14
- * preferred mechanism for new behavior.
15
- */
1
+ import { MediaValueKind } from './domAttributes.cjs';
16
2
  /**
17
3
  * Source location of a JSX element in the customer's source tree.
18
4
  *
@@ -136,7 +122,10 @@ export type IframeToHostMessage = InteractionsInitializedMessage | ComponentSele
136
122
  * - `inline`: the raw value explicitly set via the element's `style` attribute.
137
123
  * - `computed`: the browser-resolved value after the full cascade.
138
124
  *
139
- * The panel uses `inline` as the editor's value and `computed` as its placeholder.
125
+ * The panel preserves `inline` as the authored baseline for history/replay.
126
+ * Computed typography and box dimensions are displayed as measured values;
127
+ * other editors use computed values as fallbacks. Display formatting must not
128
+ * replace untouched authored CSS or an active input draft.
140
129
  */
141
130
  export interface ComponentStyleValue {
142
131
  inline?: string;
@@ -145,11 +134,18 @@ export interface ComponentStyleValue {
145
134
  /**
146
135
  * Editable attributes reported for an `<img>` element on selection. Strings
147
136
  * mirror the raw HTML attribute values; missing attributes are reported as `""`.
137
+ *
138
+ * `srcKind` / `altKind` say how each attribute is written in source (the Babel
139
+ * plugin's `data-src-kind` / `data-alt-kind`). Absent when the element carries no
140
+ * kind (an older plugin, or an `<img>` rendered by a component or an excluded
141
+ * file); a surface should then treat the attribute as not editable.
148
142
  */
149
143
  export interface ImageMediaInfo {
150
144
  tag: "img";
151
145
  src: string;
152
146
  alt: string;
147
+ srcKind?: MediaValueKind;
148
+ altKind?: MediaValueKind;
153
149
  }
154
150
  /**
155
151
  * Reported for a non-`<img>` element whose `background-image` paints a `url()`
@@ -177,10 +173,25 @@ export interface ComponentData {
177
173
  * elements currently rendered from the same `debugSource`. Not the `.map()`
178
174
  * array index: they differ for nested or filtered lists and a component used
179
175
  * more than once, and it goes stale if the list re-renders in a new order.
176
+ *
177
+ * @deprecated A source edit targets the location, not one element, so nothing
178
+ * in this package reads it. Still sent for hosts built against earlier
179
+ * versions; to be removed in a future major version.
180
180
  */
181
181
  instanceIndex?: number;
182
+ /**
183
+ * How many elements are currently rendered from the same `debugSource`,
184
+ * including this one. A source edit at that location changes all of them.
185
+ * Reported together with `instanceIndex`.
186
+ */
187
+ instanceCount?: number;
182
188
  hasNonEditableText?: boolean;
183
189
  media?: MediaInfo;
190
+ /** Property-editor applicability measured from DOM content and element semantics. */
191
+ propertyEditorCapabilities?: {
192
+ text: boolean;
193
+ box: boolean;
194
+ };
184
195
  }
185
196
  export interface TextChange {
186
197
  originalText: string;
@@ -1,18 +1,4 @@
1
- /**
2
- * Copyright (c) 2026, Salesforce, Inc.,
3
- * All rights reserved.
4
- * For full license text, see the LICENSE.txt file
5
- */
6
- /**
7
- * Typed message contract between the design-mode authoring host and the
8
- * iframe-side interactions runtime.
9
- *
10
- * Evolution policy: see docs/specs/package.md §Protocol contract. Briefly:
11
- * - Add new message types and optional fields freely.
12
- * - Never rename or remove. Never change enum values.
13
- * - Capability advertisement (on InteractionsInitializedMessage) is the
14
- * preferred mechanism for new behavior.
15
- */
1
+ import { MediaValueKind } from './domAttributes.js';
16
2
  /**
17
3
  * Source location of a JSX element in the customer's source tree.
18
4
  *
@@ -136,7 +122,10 @@ export type IframeToHostMessage = InteractionsInitializedMessage | ComponentSele
136
122
  * - `inline`: the raw value explicitly set via the element's `style` attribute.
137
123
  * - `computed`: the browser-resolved value after the full cascade.
138
124
  *
139
- * The panel uses `inline` as the editor's value and `computed` as its placeholder.
125
+ * The panel preserves `inline` as the authored baseline for history/replay.
126
+ * Computed typography and box dimensions are displayed as measured values;
127
+ * other editors use computed values as fallbacks. Display formatting must not
128
+ * replace untouched authored CSS or an active input draft.
140
129
  */
141
130
  export interface ComponentStyleValue {
142
131
  inline?: string;
@@ -145,11 +134,18 @@ export interface ComponentStyleValue {
145
134
  /**
146
135
  * Editable attributes reported for an `<img>` element on selection. Strings
147
136
  * mirror the raw HTML attribute values; missing attributes are reported as `""`.
137
+ *
138
+ * `srcKind` / `altKind` say how each attribute is written in source (the Babel
139
+ * plugin's `data-src-kind` / `data-alt-kind`). Absent when the element carries no
140
+ * kind (an older plugin, or an `<img>` rendered by a component or an excluded
141
+ * file); a surface should then treat the attribute as not editable.
148
142
  */
149
143
  export interface ImageMediaInfo {
150
144
  tag: "img";
151
145
  src: string;
152
146
  alt: string;
147
+ srcKind?: MediaValueKind;
148
+ altKind?: MediaValueKind;
153
149
  }
154
150
  /**
155
151
  * Reported for a non-`<img>` element whose `background-image` paints a `url()`
@@ -177,10 +173,25 @@ export interface ComponentData {
177
173
  * elements currently rendered from the same `debugSource`. Not the `.map()`
178
174
  * array index: they differ for nested or filtered lists and a component used
179
175
  * more than once, and it goes stale if the list re-renders in a new order.
176
+ *
177
+ * @deprecated A source edit targets the location, not one element, so nothing
178
+ * in this package reads it. Still sent for hosts built against earlier
179
+ * versions; to be removed in a future major version.
180
180
  */
181
181
  instanceIndex?: number;
182
+ /**
183
+ * How many elements are currently rendered from the same `debugSource`,
184
+ * including this one. A source edit at that location changes all of them.
185
+ * Reported together with `instanceIndex`.
186
+ */
187
+ instanceCount?: number;
182
188
  hasNonEditableText?: boolean;
183
189
  media?: MediaInfo;
190
+ /** Property-editor applicability measured from DOM content and element semantics. */
191
+ propertyEditorCapabilities?: {
192
+ text: boolean;
193
+ box: boolean;
194
+ };
184
195
  }
185
196
  export interface TextChange {
186
197
  originalText: string;
@@ -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;;;;;;;;OAQG;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,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;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,qFAAqF;IACrF,0BAA0B,CAAC,EAAE;QAC5B,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,OAAO,CAAC;KACb,CAAC;CACF;AAED,MAAM,WAAW,UAAU;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,eAAO,MAAM,uBAAuB,EAAG,qBAA8B,CAAC;AACtE,eAAO,MAAM,wBAAwB,EAAG,sBAA+B,CAAC;AACxE,eAAO,MAAM,gBAAgB,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.17.0";
3
+ const UI_DESIGN_MODE_VERSION = "13.0.0";
4
4
  exports.UI_DESIGN_MODE_VERSION = UI_DESIGN_MODE_VERSION;
@@ -1,4 +1,4 @@
1
- const UI_DESIGN_MODE_VERSION = "12.17.0";
1
+ const UI_DESIGN_MODE_VERSION = "13.0.0";
2
2
  export {
3
3
  UI_DESIGN_MODE_VERSION
4
4
  };