@salesforce/ui-design-mode 10.2.1 → 10.3.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.
- package/dist/authoring/core/DesignPropertyPanelRoot.d.cts +52 -0
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts +52 -0
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -0
- package/dist/authoring/core/DesignPropertyPanelSection.d.cts +8 -0
- package/dist/authoring/core/DesignPropertyPanelSection.d.ts +8 -0
- package/dist/authoring/core/DesignPropertyPanelSection.d.ts.map +1 -0
- package/dist/authoring/core/editors/BaseEditorContainer.d.cts +16 -0
- package/dist/authoring/core/editors/BaseEditorContainer.d.ts +16 -0
- package/dist/authoring/core/editors/BaseEditorContainer.d.ts.map +1 -0
- package/dist/authoring/core/editors/BorderStyleEditor.d.cts +8 -0
- package/dist/authoring/core/editors/BorderStyleEditor.d.ts +8 -0
- package/dist/authoring/core/editors/BorderStyleEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/BoxDimensionEditor.d.cts +34 -0
- package/dist/authoring/core/editors/BoxDimensionEditor.d.ts +34 -0
- package/dist/authoring/core/editors/BoxDimensionEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/ColorEditor.d.cts +15 -0
- package/dist/authoring/core/editors/ColorEditor.d.ts +15 -0
- package/dist/authoring/core/editors/ColorEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/DimensionEditor.d.cts +31 -0
- package/dist/authoring/core/editors/DimensionEditor.d.ts +31 -0
- package/dist/authoring/core/editors/DimensionEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/FontFamilyEditor.d.cts +11 -0
- package/dist/authoring/core/editors/FontFamilyEditor.d.ts +11 -0
- package/dist/authoring/core/editors/FontFamilyEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/FontStyleEditor.d.cts +8 -0
- package/dist/authoring/core/editors/FontStyleEditor.d.ts +8 -0
- package/dist/authoring/core/editors/FontStyleEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/FontWeightEditor.d.cts +11 -0
- package/dist/authoring/core/editors/FontWeightEditor.d.ts +11 -0
- package/dist/authoring/core/editors/FontWeightEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/OverflowEditor.d.cts +8 -0
- package/dist/authoring/core/editors/OverflowEditor.d.ts +8 -0
- package/dist/authoring/core/editors/OverflowEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/PicklistEditor.d.cts +26 -0
- package/dist/authoring/core/editors/PicklistEditor.d.ts +26 -0
- package/dist/authoring/core/editors/PicklistEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/RadioGroupEditor.d.cts +26 -0
- package/dist/authoring/core/editors/RadioGroupEditor.d.ts +26 -0
- package/dist/authoring/core/editors/RadioGroupEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/TextAlignmentEditor.d.cts +8 -0
- package/dist/authoring/core/editors/TextAlignmentEditor.d.ts +8 -0
- package/dist/authoring/core/editors/TextAlignmentEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/TextDecorationEditor.d.cts +8 -0
- package/dist/authoring/core/editors/TextDecorationEditor.d.ts +8 -0
- package/dist/authoring/core/editors/TextDecorationEditor.d.ts.map +1 -0
- package/dist/authoring/core/editors/TextTransformEditor.d.cts +8 -0
- package/dist/authoring/core/editors/TextTransformEditor.d.ts +8 -0
- package/dist/authoring/core/editors/TextTransformEditor.d.ts.map +1 -0
- package/dist/authoring/core/history/commandExecutor.d.cts +29 -0
- package/dist/authoring/core/history/commandExecutor.d.ts +29 -0
- package/dist/authoring/core/history/commandExecutor.d.ts.map +1 -0
- package/dist/authoring/core/history/historyManager.d.cts +77 -0
- package/dist/authoring/core/history/historyManager.d.ts +77 -0
- package/dist/authoring/core/history/historyManager.d.ts.map +1 -0
- package/dist/authoring/core/history/historyService.d.cts +37 -0
- package/dist/authoring/core/history/historyService.d.ts +37 -0
- package/dist/authoring/core/history/historyService.d.ts.map +1 -0
- package/dist/authoring/core/history/iframeCommandExecutor.d.cts +10 -0
- package/dist/authoring/core/history/iframeCommandExecutor.d.ts +10 -0
- package/dist/authoring/core/history/iframeCommandExecutor.d.ts.map +1 -0
- package/dist/authoring/core/history/targetResolver.d.cts +59 -0
- package/dist/authoring/core/history/targetResolver.d.ts +59 -0
- package/dist/authoring/core/history/targetResolver.d.ts.map +1 -0
- package/dist/authoring/core/hooks/usePopover.d.cts +26 -0
- package/dist/authoring/core/hooks/usePopover.d.ts +26 -0
- package/dist/authoring/core/hooks/usePopover.d.ts.map +1 -0
- package/dist/authoring/core/utils/colorUtils.d.cts +73 -0
- package/dist/authoring/core/utils/colorUtils.d.ts +73 -0
- package/dist/authoring/core/utils/colorUtils.d.ts.map +1 -0
- package/dist/authoring/core/utils/dimensionUtils.d.cts +81 -0
- package/dist/authoring/core/utils/dimensionUtils.d.ts +81 -0
- package/dist/authoring/core/utils/dimensionUtils.d.ts.map +1 -0
- package/dist/authoring/core/utils/domUtils.d.cts +7 -0
- package/dist/authoring/core/utils/domUtils.d.ts +7 -0
- package/dist/authoring/core/utils/domUtils.d.ts.map +1 -0
- package/dist/authoring/react/index.d.cts +14 -0
- package/dist/authoring/react/index.d.ts +14 -0
- package/dist/authoring/react/index.d.ts.map +1 -0
- package/dist/authoring/react/index.js +119 -0
- package/dist/authoring/web-component/index.d.cts +18 -0
- package/dist/authoring/web-component/index.d.ts +18 -0
- package/dist/authoring/web-component/index.d.ts.map +1 -0
- package/dist/authoring/web-component/index.js +1229 -0
- package/dist/protocol/editableElementTags.cjs +16 -0
- package/dist/protocol/editableElementTags.d.cts +14 -0
- package/dist/protocol/editableElementTags.d.ts +14 -0
- package/dist/protocol/editableElementTags.d.ts.map +1 -0
- package/dist/protocol/editableElementTags.js +16 -0
- package/dist/protocol/index.cjs +2 -0
- package/dist/protocol/index.d.cts +1 -0
- package/dist/protocol/index.d.ts +1 -0
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/protocol/index.js +2 -0
- package/dist/protocol/messageTypes.d.cts +49 -6
- package/dist/protocol/messageTypes.d.ts +49 -6
- package/dist/protocol/messageTypes.d.ts.map +1 -1
- package/dist/runtime/design-mode-interactions.js +44 -21
- package/dist/runtime/interactions/communicationManager.d.cts +2 -26
- package/dist/runtime/interactions/communicationManager.d.ts +2 -26
- package/dist/runtime/interactions/communicationManager.d.ts.map +1 -1
- package/dist/runtime/interactions/componentMatcher.d.cts +6 -2
- package/dist/runtime/interactions/componentMatcher.d.ts +6 -2
- package/dist/runtime/interactions/componentMatcher.d.ts.map +1 -1
- package/dist/runtime/interactions/editableManager.d.cts +2 -1
- package/dist/runtime/interactions/editableManager.d.ts +2 -1
- package/dist/runtime/interactions/editableManager.d.ts.map +1 -1
- package/dist/runtime/interactions/utils/sourceUtils.d.cts +4 -1
- package/dist/runtime/interactions/utils/sourceUtils.d.ts +4 -1
- package/dist/runtime/interactions/utils/sourceUtils.d.ts.map +1 -1
- package/package.json +27 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const EDITABLE_ELEMENT_TAGS = [
|
|
4
|
+
"H1",
|
|
5
|
+
"H2",
|
|
6
|
+
"H3",
|
|
7
|
+
"H4",
|
|
8
|
+
"H5",
|
|
9
|
+
"H6",
|
|
10
|
+
"P",
|
|
11
|
+
"SPAN",
|
|
12
|
+
"A",
|
|
13
|
+
"BUTTON",
|
|
14
|
+
"LABEL"
|
|
15
|
+
];
|
|
16
|
+
exports.EDITABLE_ELEMENT_TAGS = EDITABLE_ELEMENT_TAGS;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Uppercase tag names treated as inline-editable text elements. Shared by the
|
|
8
|
+
* iframe runtime (which makes these elements `contentEditable`) and the authoring
|
|
9
|
+
* panel (which shows the inline-edit hint for them) so the two stay in lockstep.
|
|
10
|
+
*
|
|
11
|
+
* Compared against `element.tagName`, which the DOM always reports uppercase.
|
|
12
|
+
*/
|
|
13
|
+
export declare const EDITABLE_ELEMENT_TAGS: readonly string[];
|
|
14
|
+
//# sourceMappingURL=editableElementTags.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Uppercase tag names treated as inline-editable text elements. Shared by the
|
|
8
|
+
* iframe runtime (which makes these elements `contentEditable`) and the authoring
|
|
9
|
+
* panel (which shows the inline-edit hint for them) so the two stay in lockstep.
|
|
10
|
+
*
|
|
11
|
+
* Compared against `element.tagName`, which the DOM always reports uppercase.
|
|
12
|
+
*/
|
|
13
|
+
export declare const EDITABLE_ELEMENT_TAGS: readonly string[];
|
|
14
|
+
//# sourceMappingURL=editableElementTags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editableElementTags.d.ts","sourceRoot":"","sources":["../../src/protocol/editableElementTags.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAYlD,CAAC"}
|
package/dist/protocol/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const messageTypes = require("./messageTypes.cjs");
|
|
4
4
|
const domAttributes = require("./domAttributes.cjs");
|
|
5
|
+
const editableElementTags = require("./editableElementTags.cjs");
|
|
5
6
|
exports.MSG_COMPONENT_SELECTED = messageTypes.MSG_COMPONENT_SELECTED;
|
|
6
7
|
exports.MSG_DISABLE_INTERACTIONS = messageTypes.MSG_DISABLE_INTERACTIONS;
|
|
7
8
|
exports.MSG_ENABLE_INTERACTIONS = messageTypes.MSG_ENABLE_INTERACTIONS;
|
|
@@ -12,3 +13,4 @@ exports.MSG_TEXT_CHANGE = messageTypes.MSG_TEXT_CHANGE;
|
|
|
12
13
|
exports.MSG_TEXT_CHANGED = messageTypes.MSG_TEXT_CHANGED;
|
|
13
14
|
exports.ATTR_SOURCE_FILE = domAttributes.ATTR_SOURCE_FILE;
|
|
14
15
|
exports.ATTR_TEXT_TYPE = domAttributes.ATTR_TEXT_TYPE;
|
|
16
|
+
exports.EDITABLE_ELEMENT_TAGS = editableElementTags.EDITABLE_ELEMENT_TAGS;
|
package/dist/protocol/index.d.ts
CHANGED
|
@@ -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"}
|
|
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"}
|
package/dist/protocol/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { MSG_COMPONENT_SELECTED, MSG_DISABLE_INTERACTIONS, MSG_ENABLE_INTERACTIONS, MSG_INTERACTIONS_INITIALIZED, MSG_MEDIA_CHANGE, MSG_STYLE_CHANGE, MSG_TEXT_CHANGE, MSG_TEXT_CHANGED } from "./messageTypes.js";
|
|
2
2
|
import { ATTR_SOURCE_FILE, ATTR_TEXT_TYPE } from "./domAttributes.js";
|
|
3
|
+
import { EDITABLE_ELEMENT_TAGS } from "./editableElementTags.js";
|
|
3
4
|
export {
|
|
4
5
|
ATTR_SOURCE_FILE,
|
|
5
6
|
ATTR_TEXT_TYPE,
|
|
7
|
+
EDITABLE_ELEMENT_TAGS,
|
|
6
8
|
MSG_COMPONENT_SELECTED,
|
|
7
9
|
MSG_DISABLE_INTERACTIONS,
|
|
8
10
|
MSG_ENABLE_INTERACTIONS,
|
|
@@ -13,11 +13,19 @@
|
|
|
13
13
|
* - Capability advertisement (on InteractionsInitializedMessage) is the
|
|
14
14
|
* preferred mechanism for new behavior.
|
|
15
15
|
*/
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Source location of a JSX element in the customer's source tree.
|
|
18
|
+
*
|
|
19
|
+
* Invariant: all three fields are always present. The source-locator injects
|
|
20
|
+
* `data-source-file` as an all-or-nothing `file:line:col` triple, so a producer
|
|
21
|
+
* that can't supply a full position emits no location at all (the field is
|
|
22
|
+
* absent / the element is treated as non-locatable) rather than a partial
|
|
23
|
+
* `SourceLocation`. Consumers therefore never have to guard line/column.
|
|
24
|
+
*/
|
|
17
25
|
export interface SourceLocation {
|
|
18
26
|
sourceFile: string;
|
|
19
|
-
lineNumber: number
|
|
20
|
-
columnNumber: number
|
|
27
|
+
lineNumber: number;
|
|
28
|
+
columnNumber: number;
|
|
21
29
|
}
|
|
22
30
|
export interface EnableInteractionsMessage {
|
|
23
31
|
type: "enable-interactions";
|
|
@@ -61,10 +69,45 @@ export interface TextChangedMessage {
|
|
|
61
69
|
change: TextChange;
|
|
62
70
|
}
|
|
63
71
|
export type IframeToHostMessage = InteractionsInitializedMessage | ComponentSelectedMessage | TextChangedMessage;
|
|
72
|
+
/**
|
|
73
|
+
* A single style property's value pair, as reported on `component-selected`.
|
|
74
|
+
* - `inline`: the raw value explicitly set via the element's `style` attribute.
|
|
75
|
+
* - `computed`: the browser-resolved value after the full cascade.
|
|
76
|
+
*
|
|
77
|
+
* The panel uses `inline` as the editor's value and `computed` as its placeholder.
|
|
78
|
+
*/
|
|
79
|
+
export interface ComponentStyleValue {
|
|
80
|
+
inline?: string;
|
|
81
|
+
computed?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Editable attributes reported for an `<img>` element on selection. Strings
|
|
85
|
+
* mirror the raw HTML attribute values; missing attributes are reported as `""`.
|
|
86
|
+
*
|
|
87
|
+
* `width` / `height` are unitless integer strings (px); `""` means the attribute
|
|
88
|
+
* is absent and the image renders at its intrinsic size.
|
|
89
|
+
*/
|
|
90
|
+
export interface ImageMediaInfo {
|
|
91
|
+
tag: "img";
|
|
92
|
+
src: string;
|
|
93
|
+
alt: string;
|
|
94
|
+
width: string;
|
|
95
|
+
height: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Discriminated union of media-element metadata, keyed by `tag`. To support a
|
|
99
|
+
* new media tag in future, add a variant here and a matching case in the
|
|
100
|
+
* runtime's `getMediaInfo`.
|
|
101
|
+
*/
|
|
102
|
+
export type MediaInfo = ImageMediaInfo;
|
|
103
|
+
/** Selected-component payload carried by `component-selected`. */
|
|
64
104
|
export interface ComponentData {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
105
|
+
name?: string;
|
|
106
|
+
tagName?: string;
|
|
107
|
+
styles?: Record<string, ComponentStyleValue>;
|
|
108
|
+
debugSource?: SourceLocation;
|
|
109
|
+
hasNonEditableText?: boolean;
|
|
110
|
+
media?: MediaInfo;
|
|
68
111
|
}
|
|
69
112
|
export interface TextChange {
|
|
70
113
|
originalText: string;
|
|
@@ -13,11 +13,19 @@
|
|
|
13
13
|
* - Capability advertisement (on InteractionsInitializedMessage) is the
|
|
14
14
|
* preferred mechanism for new behavior.
|
|
15
15
|
*/
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Source location of a JSX element in the customer's source tree.
|
|
18
|
+
*
|
|
19
|
+
* Invariant: all three fields are always present. The source-locator injects
|
|
20
|
+
* `data-source-file` as an all-or-nothing `file:line:col` triple, so a producer
|
|
21
|
+
* that can't supply a full position emits no location at all (the field is
|
|
22
|
+
* absent / the element is treated as non-locatable) rather than a partial
|
|
23
|
+
* `SourceLocation`. Consumers therefore never have to guard line/column.
|
|
24
|
+
*/
|
|
17
25
|
export interface SourceLocation {
|
|
18
26
|
sourceFile: string;
|
|
19
|
-
lineNumber: number
|
|
20
|
-
columnNumber: number
|
|
27
|
+
lineNumber: number;
|
|
28
|
+
columnNumber: number;
|
|
21
29
|
}
|
|
22
30
|
export interface EnableInteractionsMessage {
|
|
23
31
|
type: "enable-interactions";
|
|
@@ -61,10 +69,45 @@ export interface TextChangedMessage {
|
|
|
61
69
|
change: TextChange;
|
|
62
70
|
}
|
|
63
71
|
export type IframeToHostMessage = InteractionsInitializedMessage | ComponentSelectedMessage | TextChangedMessage;
|
|
72
|
+
/**
|
|
73
|
+
* A single style property's value pair, as reported on `component-selected`.
|
|
74
|
+
* - `inline`: the raw value explicitly set via the element's `style` attribute.
|
|
75
|
+
* - `computed`: the browser-resolved value after the full cascade.
|
|
76
|
+
*
|
|
77
|
+
* The panel uses `inline` as the editor's value and `computed` as its placeholder.
|
|
78
|
+
*/
|
|
79
|
+
export interface ComponentStyleValue {
|
|
80
|
+
inline?: string;
|
|
81
|
+
computed?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Editable attributes reported for an `<img>` element on selection. Strings
|
|
85
|
+
* mirror the raw HTML attribute values; missing attributes are reported as `""`.
|
|
86
|
+
*
|
|
87
|
+
* `width` / `height` are unitless integer strings (px); `""` means the attribute
|
|
88
|
+
* is absent and the image renders at its intrinsic size.
|
|
89
|
+
*/
|
|
90
|
+
export interface ImageMediaInfo {
|
|
91
|
+
tag: "img";
|
|
92
|
+
src: string;
|
|
93
|
+
alt: string;
|
|
94
|
+
width: string;
|
|
95
|
+
height: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Discriminated union of media-element metadata, keyed by `tag`. To support a
|
|
99
|
+
* new media tag in future, add a variant here and a matching case in the
|
|
100
|
+
* runtime's `getMediaInfo`.
|
|
101
|
+
*/
|
|
102
|
+
export type MediaInfo = ImageMediaInfo;
|
|
103
|
+
/** Selected-component payload carried by `component-selected`. */
|
|
64
104
|
export interface ComponentData {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
105
|
+
name?: string;
|
|
106
|
+
tagName?: string;
|
|
107
|
+
styles?: Record<string, ComponentStyleValue>;
|
|
108
|
+
debugSource?: SourceLocation;
|
|
109
|
+
hasNonEditableText?: boolean;
|
|
110
|
+
media?: MediaInfo;
|
|
68
111
|
}
|
|
69
112
|
export interface TextChange {
|
|
70
113
|
originalText: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../../src/protocol/messageTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;GASG;AAEH
|
|
1
|
+
{"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../../src/protocol/messageTypes.ts"],"names":[],"mappings":"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"}
|
|
@@ -25,24 +25,40 @@
|
|
|
25
25
|
// src/protocol/domAttributes.ts
|
|
26
26
|
var ATTR_SOURCE_FILE = "data-source-file";
|
|
27
27
|
|
|
28
|
+
// src/protocol/editableElementTags.ts
|
|
29
|
+
var EDITABLE_ELEMENT_TAGS = [
|
|
30
|
+
"H1",
|
|
31
|
+
"H2",
|
|
32
|
+
"H3",
|
|
33
|
+
"H4",
|
|
34
|
+
"H5",
|
|
35
|
+
"H6",
|
|
36
|
+
"P",
|
|
37
|
+
"SPAN",
|
|
38
|
+
"A",
|
|
39
|
+
"BUTTON",
|
|
40
|
+
"LABEL"
|
|
41
|
+
];
|
|
42
|
+
|
|
28
43
|
// src/runtime/interactions/utils/sourceUtils.ts
|
|
29
|
-
function
|
|
30
|
-
if (value ===
|
|
44
|
+
function parseRequiredInt(value) {
|
|
45
|
+
if (value === void 0 || value === "") {
|
|
31
46
|
return null;
|
|
32
47
|
}
|
|
33
|
-
const parsed = Number.parseInt(
|
|
48
|
+
const parsed = Number.parseInt(value, 10);
|
|
34
49
|
return Number.isFinite(parsed) ? parsed : null;
|
|
35
50
|
}
|
|
36
51
|
function parseSourceFileAttribute(value) {
|
|
37
52
|
const match = /^(.*):(\d+):(\d+)$/.exec(value);
|
|
38
|
-
if (!match) {
|
|
39
|
-
return
|
|
53
|
+
if (!match || !match[1]) {
|
|
54
|
+
return null;
|
|
40
55
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
56
|
+
const lineNumber = parseRequiredInt(match[2]);
|
|
57
|
+
const columnNumber = parseRequiredInt(match[3]);
|
|
58
|
+
if (lineNumber === null || columnNumber === null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return { sourceFile: match[1], lineNumber, columnNumber };
|
|
46
62
|
}
|
|
47
63
|
function getSourceFromDataAttributes(element) {
|
|
48
64
|
if (!element) {
|
|
@@ -68,10 +84,13 @@
|
|
|
68
84
|
function parseSourceLocation(sl) {
|
|
69
85
|
if (!sl || typeof sl !== "object") return void 0;
|
|
70
86
|
const obj = sl;
|
|
87
|
+
if (typeof obj.sourceFile !== "string" || obj.sourceFile === "" || typeof obj.lineNumber !== "number" || typeof obj.columnNumber !== "number") {
|
|
88
|
+
return void 0;
|
|
89
|
+
}
|
|
71
90
|
return {
|
|
72
|
-
sourceFile:
|
|
73
|
-
lineNumber:
|
|
74
|
-
columnNumber:
|
|
91
|
+
sourceFile: obj.sourceFile,
|
|
92
|
+
lineNumber: obj.lineNumber,
|
|
93
|
+
columnNumber: obj.columnNumber
|
|
75
94
|
};
|
|
76
95
|
}
|
|
77
96
|
function getLabelFromSource(element) {
|
|
@@ -79,17 +98,17 @@
|
|
|
79
98
|
return "";
|
|
80
99
|
}
|
|
81
100
|
const source = element.getAttribute(ATTR_SOURCE_FILE);
|
|
82
|
-
|
|
101
|
+
const parsed = source ? parseSourceFileAttribute(source) : null;
|
|
102
|
+
if (!parsed) {
|
|
83
103
|
return element.tagName ? element.tagName.toLowerCase() : "";
|
|
84
104
|
}
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
const baseName = parts[parts.length - 1] || sourceFile;
|
|
105
|
+
const parts = parsed.sourceFile.split(/[/\\]/);
|
|
106
|
+
const baseName = parts[parts.length - 1] || parsed.sourceFile;
|
|
88
107
|
return baseName;
|
|
89
108
|
}
|
|
90
109
|
|
|
91
110
|
// src/runtime/interactions/editableManager.ts
|
|
92
|
-
var TEXT_TAGS =
|
|
111
|
+
var TEXT_TAGS = EDITABLE_ELEMENT_TAGS;
|
|
93
112
|
var EditableManager = class {
|
|
94
113
|
constructor(communicationManager) {
|
|
95
114
|
__publicField(this, "communicationManager");
|
|
@@ -356,15 +375,19 @@
|
|
|
356
375
|
this.allowlist = options.allowlist ?? [];
|
|
357
376
|
}
|
|
358
377
|
/**
|
|
359
|
-
* Check whether an element
|
|
378
|
+
* Check whether an element carries a *valid, complete* source location.
|
|
379
|
+
* A bare `data-source-file` attribute is not enough — it must parse into a
|
|
380
|
+
* full `SourceLocation` (file + line + column). Elements without a valid
|
|
381
|
+
* location are not selectable or highlightable, so downstream consumers can
|
|
382
|
+
* trust that any selected element has a complete location.
|
|
360
383
|
* @param element - The element to check
|
|
361
|
-
* @returns True if the
|
|
384
|
+
* @returns True if the element has a valid, fully-parsed source location
|
|
362
385
|
*/
|
|
363
386
|
hasSourceMetadata(element) {
|
|
364
387
|
if (!element) {
|
|
365
388
|
return false;
|
|
366
389
|
}
|
|
367
|
-
return element
|
|
390
|
+
return getSourceFromDataAttributes(element) !== null;
|
|
368
391
|
}
|
|
369
392
|
matchesList(element, selectors) {
|
|
370
393
|
return selectors.some((selector) => element.matches(selector));
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* For full license text, see the LICENSE.txt file
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Editable attributes reported for an `<img>` element on selection. Strings
|
|
8
|
-
* mirror the raw HTML attribute values; missing attributes are reported as `""`.
|
|
9
|
-
*
|
|
10
|
-
* - `width` / `height` are unitless integer strings (px); `""` means the
|
|
11
|
-
* attribute is absent and the image renders at its intrinsic size.
|
|
12
|
-
*/
|
|
13
|
-
interface ImageMediaInfo {
|
|
14
|
-
tag: "img";
|
|
15
|
-
src: string;
|
|
16
|
-
alt: string;
|
|
17
|
-
width: string;
|
|
18
|
-
height: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Discriminated union of media-element metadata, keyed by `tag`. To support a
|
|
22
|
-
* new media tag in future if required, add a variant here and a matching case
|
|
23
|
-
* in {@link getMediaInfo}.
|
|
24
|
-
*/
|
|
25
|
-
export type MediaInfo = ImageMediaInfo;
|
|
1
|
+
import { MediaInfo } from '../../protocol.cjs';
|
|
2
|
+
export type { MediaInfo };
|
|
26
3
|
/**
|
|
27
4
|
* Extract editable media metadata from a selected element.
|
|
28
5
|
*
|
|
@@ -53,5 +30,4 @@ export declare class CommunicationManager {
|
|
|
53
30
|
*/
|
|
54
31
|
notifyInitializationComplete(): void;
|
|
55
32
|
}
|
|
56
|
-
export {};
|
|
57
33
|
//# sourceMappingURL=communicationManager.d.ts.map
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* For full license text, see the LICENSE.txt file
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Editable attributes reported for an `<img>` element on selection. Strings
|
|
8
|
-
* mirror the raw HTML attribute values; missing attributes are reported as `""`.
|
|
9
|
-
*
|
|
10
|
-
* - `width` / `height` are unitless integer strings (px); `""` means the
|
|
11
|
-
* attribute is absent and the image renders at its intrinsic size.
|
|
12
|
-
*/
|
|
13
|
-
interface ImageMediaInfo {
|
|
14
|
-
tag: "img";
|
|
15
|
-
src: string;
|
|
16
|
-
alt: string;
|
|
17
|
-
width: string;
|
|
18
|
-
height: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Discriminated union of media-element metadata, keyed by `tag`. To support a
|
|
22
|
-
* new media tag in future if required, add a variant here and a matching case
|
|
23
|
-
* in {@link getMediaInfo}.
|
|
24
|
-
*/
|
|
25
|
-
export type MediaInfo = ImageMediaInfo;
|
|
1
|
+
import { MediaInfo } from '../../protocol.js';
|
|
2
|
+
export type { MediaInfo };
|
|
26
3
|
/**
|
|
27
4
|
* Extract editable media metadata from a selected element.
|
|
28
5
|
*
|
|
@@ -53,5 +30,4 @@ export declare class CommunicationManager {
|
|
|
53
30
|
*/
|
|
54
31
|
notifyInitializationComplete(): void;
|
|
55
32
|
}
|
|
56
|
-
export {};
|
|
57
33
|
//# sourceMappingURL=communicationManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communicationManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/communicationManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"communicationManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/communicationManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAIN,KAAK,SAAS,EACd,MAAM,gBAAgB,CAAC;AAUxB,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAexE;AAED,qBAAa,oBAAoB;;IAKhC;;;OAGG;IACH,uBAAuB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IA0DnD;;;;;OAKG;IACH,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAyBnF;;OAEG;IACH,4BAA4B,IAAI,IAAI;CAepC"}
|
|
@@ -10,9 +10,13 @@ export declare class ComponentMatcher {
|
|
|
10
10
|
private allowlist;
|
|
11
11
|
constructor(options?: ComponentMatcherOptions);
|
|
12
12
|
/**
|
|
13
|
-
* Check whether an element
|
|
13
|
+
* Check whether an element carries a *valid, complete* source location.
|
|
14
|
+
* A bare `data-source-file` attribute is not enough — it must parse into a
|
|
15
|
+
* full `SourceLocation` (file + line + column). Elements without a valid
|
|
16
|
+
* location are not selectable or highlightable, so downstream consumers can
|
|
17
|
+
* trust that any selected element has a complete location.
|
|
14
18
|
* @param element - The element to check
|
|
15
|
-
* @returns True if the
|
|
19
|
+
* @returns True if the element has a valid, fully-parsed source location
|
|
16
20
|
*/
|
|
17
21
|
hasSourceMetadata(element: HTMLElement | null | undefined): boolean;
|
|
18
22
|
private matchesList;
|
|
@@ -10,9 +10,13 @@ export declare class ComponentMatcher {
|
|
|
10
10
|
private allowlist;
|
|
11
11
|
constructor(options?: ComponentMatcherOptions);
|
|
12
12
|
/**
|
|
13
|
-
* Check whether an element
|
|
13
|
+
* Check whether an element carries a *valid, complete* source location.
|
|
14
|
+
* A bare `data-source-file` attribute is not enough — it must parse into a
|
|
15
|
+
* full `SourceLocation` (file + line + column). Elements without a valid
|
|
16
|
+
* location are not selectable or highlightable, so downstream consumers can
|
|
17
|
+
* trust that any selected element has a complete location.
|
|
14
18
|
* @param element - The element to check
|
|
15
|
-
* @returns True if the
|
|
19
|
+
* @returns True if the element has a valid, fully-parsed source location
|
|
16
20
|
*/
|
|
17
21
|
hasSourceMetadata(element: HTMLElement | null | undefined): boolean;
|
|
18
22
|
private matchesList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentMatcher.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/componentMatcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"componentMatcher.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/componentMatcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,MAAM,WAAW,uBAAuB;IAEvC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,qBAAa,gBAAgB;IAC5B,OAAO,CAAC,SAAS,CAAW;gBAEhB,OAAO,GAAE,uBAA4B;IAIjD;;;;;;;;OAQG;IACH,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO;IAOnE,OAAO,CAAC,WAAW;IAInB;;;;;OAKG;IACH,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAM7D;;;;OAIG;IACH,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO;IAgBxE;;;;OAIG;IACH,wBAAwB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI;CA+BpF"}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
interface CommunicationManagerLike {
|
|
7
7
|
notifyTextChange: (element: HTMLElement, originalText: string, newText: string) => void;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/** Canonical list lives in `/protocol` (EDITABLE_ELEMENT_TAGS); aliased here for existing call sites. */
|
|
10
|
+
export declare const TEXT_TAGS: readonly string[];
|
|
10
11
|
export declare class EditableManager {
|
|
11
12
|
private communicationManager?;
|
|
12
13
|
private boundHandleBlur;
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
interface CommunicationManagerLike {
|
|
7
7
|
notifyTextChange: (element: HTMLElement, originalText: string, newText: string) => void;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/** Canonical list lives in `/protocol` (EDITABLE_ELEMENT_TAGS); aliased here for existing call sites. */
|
|
10
|
+
export declare const TEXT_TAGS: readonly string[];
|
|
10
11
|
export declare class EditableManager {
|
|
11
12
|
private communicationManager?;
|
|
12
13
|
private boundHandleBlur;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editableManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/editableManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"editableManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/editableManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,UAAU,wBAAwB;IACjC,gBAAgB,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxF;AAED,yGAAyG;AACzG,eAAO,MAAM,SAAS,mBAAwB,CAAC;AAE/C,qBAAa,eAAe;IAC3B,OAAO,CAAC,oBAAoB,CAAC,CAA2B;IACxD,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,kBAAkB,CAA6B;IACvD,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,aAAa,CAAgB;gBAEzB,oBAAoB,CAAC,EAAE,wBAAwB;IAQ3D,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAoB9C,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAe1C,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,WAAW;IAkBnB,OAAO,CAAC,cAAc;CAiBtB"}
|
|
@@ -15,8 +15,11 @@ export declare function findElementsBySourceLocation(location: SourceLocation):
|
|
|
15
15
|
/**
|
|
16
16
|
* Parse an untyped message payload object into a SourceLocation.
|
|
17
17
|
* Used by the entry point to convert raw postMessage data into typed values.
|
|
18
|
+
* Enforces the same all-or-nothing invariant as the DOM parser: returns
|
|
19
|
+
* `undefined` unless `sourceFile` is a non-empty string and both `lineNumber`
|
|
20
|
+
* and `columnNumber` are numbers.
|
|
18
21
|
* @param sl - The raw source location object from a message payload
|
|
19
|
-
* @returns A SourceLocation, or undefined if
|
|
22
|
+
* @returns A complete SourceLocation, or undefined if any field is missing/invalid
|
|
20
23
|
*/
|
|
21
24
|
export declare function parseSourceLocation(sl: unknown): SourceLocation | undefined;
|
|
22
25
|
/**
|
|
@@ -15,8 +15,11 @@ export declare function findElementsBySourceLocation(location: SourceLocation):
|
|
|
15
15
|
/**
|
|
16
16
|
* Parse an untyped message payload object into a SourceLocation.
|
|
17
17
|
* Used by the entry point to convert raw postMessage data into typed values.
|
|
18
|
+
* Enforces the same all-or-nothing invariant as the DOM parser: returns
|
|
19
|
+
* `undefined` unless `sourceFile` is a non-empty string and both `lineNumber`
|
|
20
|
+
* and `columnNumber` are numbers.
|
|
18
21
|
* @param sl - The raw source location object from a message payload
|
|
19
|
-
* @returns A SourceLocation, or undefined if
|
|
22
|
+
* @returns A complete SourceLocation, or undefined if any field is missing/invalid
|
|
20
23
|
*/
|
|
21
24
|
export declare function parseSourceLocation(sl: unknown): SourceLocation | undefined;
|
|
22
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceUtils.d.ts","sourceRoot":"","sources":["../../../../src/runtime/interactions/utils/sourceUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AAEH,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE1E,YAAY,EAAE,cAAc,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"sourceUtils.d.ts","sourceRoot":"","sources":["../../../../src/runtime/interactions/utils/sourceUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AAEH,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE1E,YAAY,EAAE,cAAc,EAAE,CAAC;AAkC/B;;;;GAIG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACrC,cAAc,GAAG,IAAI,CAWvB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,cAAc,GAAG,WAAW,EAAE,CAepF;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CAgB3E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAgBlF"}
|
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": "10.
|
|
4
|
+
"version": "10.3.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -35,13 +35,21 @@
|
|
|
35
35
|
"default": "./dist/runtime/index.cjs"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
+
"./authoring/react": {
|
|
39
|
+
"types": "./dist/authoring/react/index.d.ts",
|
|
40
|
+
"import": "./dist/authoring/react/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./authoring/web-component": {
|
|
43
|
+
"types": "./dist/authoring/web-component/index.d.ts",
|
|
44
|
+
"import": "./dist/authoring/web-component/index.js"
|
|
45
|
+
},
|
|
38
46
|
"./package.json": "./package.json"
|
|
39
47
|
},
|
|
40
48
|
"files": [
|
|
41
49
|
"dist"
|
|
42
50
|
],
|
|
43
51
|
"scripts": {
|
|
44
|
-
"build": "vite build && node scripts/fix-dts-extensions.mjs && node src/runtime/bundle-runtime.mjs",
|
|
52
|
+
"build": "vite build && node scripts/fix-dts-extensions.mjs && node src/runtime/bundle-runtime.mjs && node src/authoring/react/bundle-authoring-react.mjs && node src/authoring/web-component/bundle-authoring-web-component.mjs",
|
|
45
53
|
"clean": "rm -rf dist",
|
|
46
54
|
"dev": "vite build --watch",
|
|
47
55
|
"test": "vitest run",
|
|
@@ -49,13 +57,29 @@
|
|
|
49
57
|
"test:coverage": "vitest run --coverage"
|
|
50
58
|
},
|
|
51
59
|
"dependencies": {
|
|
52
|
-
"@babel/helper-plugin-utils": "^7.28.3"
|
|
60
|
+
"@babel/helper-plugin-utils": "^7.28.3",
|
|
61
|
+
"@radix-ui/react-icons": "1.3.2",
|
|
62
|
+
"@radix-ui/react-toggle-group": "1.1.11",
|
|
63
|
+
"culori": "^4.0.1",
|
|
64
|
+
"downshift": "9.3.2",
|
|
65
|
+
"lucide-react": "0.575.0",
|
|
66
|
+
"react-beautiful-color": "2.1.0",
|
|
67
|
+
"use-debounce": "^10.0.4"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"react": "^19.2.0",
|
|
71
|
+
"react-dom": "^19.2.0"
|
|
53
72
|
},
|
|
54
73
|
"devDependencies": {
|
|
55
74
|
"@babel/core": "^7.28.4",
|
|
56
75
|
"@types/babel__core": "^7.20.5",
|
|
57
76
|
"@types/babel__helper-plugin-utils": "^7.10.3",
|
|
77
|
+
"@types/culori": "4.0.1",
|
|
78
|
+
"@types/react": "19.2.14",
|
|
79
|
+
"@types/react-dom": "19.2.3",
|
|
58
80
|
"esbuild": "^0.24.0",
|
|
81
|
+
"react": "^19.2.0",
|
|
82
|
+
"react-dom": "^19.2.0",
|
|
59
83
|
"ts-morph": "^25.0.0",
|
|
60
84
|
"vite": "^7.3.1",
|
|
61
85
|
"vite-plugin-dts": "^4.5.4",
|