@salesforce/ui-design-mode 11.44.0 → 11.44.1
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 +7 -2
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts +7 -2
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
- package/dist/authoring/react/index.js +2 -2
- package/dist/authoring/web-component/index.js +7 -7
- package/dist/protocol/messageTypes.d.cts +9 -0
- package/dist/protocol/messageTypes.d.ts +9 -0
- package/dist/protocol/messageTypes.d.ts.map +1 -1
- package/dist/protocol/version.cjs +1 -1
- package/dist/protocol/version.js +1 -1
- package/dist/runtime/design-mode-interactions.js +50 -7
- package/dist/runtime/interactions/eventHandlers.d.cts +19 -0
- package/dist/runtime/interactions/eventHandlers.d.ts +19 -0
- package/dist/runtime/interactions/eventHandlers.d.ts.map +1 -1
- package/dist/runtime/interactions/interactionsController.d.cts +12 -3
- package/dist/runtime/interactions/interactionsController.d.ts +12 -3
- package/dist/runtime/interactions/interactionsController.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -45,6 +45,15 @@ export interface StyleChangeMessage {
|
|
|
45
45
|
property: string;
|
|
46
46
|
value: string;
|
|
47
47
|
sourceLocation?: SourceLocation;
|
|
48
|
+
/**
|
|
49
|
+
* True when this change is an undo/redo replay rather than a live edit.
|
|
50
|
+
* `sourceLocation` alone can't carry this distinction: a live edit is stamped
|
|
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).
|
|
55
|
+
*/
|
|
56
|
+
isReplay?: boolean;
|
|
48
57
|
}
|
|
49
58
|
export interface TextChangeMessage {
|
|
50
59
|
type: "text-change";
|
|
@@ -45,6 +45,15 @@ export interface StyleChangeMessage {
|
|
|
45
45
|
property: string;
|
|
46
46
|
value: string;
|
|
47
47
|
sourceLocation?: SourceLocation;
|
|
48
|
+
/**
|
|
49
|
+
* True when this change is an undo/redo replay rather than a live edit.
|
|
50
|
+
* `sourceLocation` alone can't carry this distinction: a live edit is stamped
|
|
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).
|
|
55
|
+
*/
|
|
56
|
+
isReplay?: boolean;
|
|
48
57
|
}
|
|
49
58
|
export interface TextChangeMessage {
|
|
50
59
|
type: "text-change";
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../../src/protocol/messageTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;GASG;AAEH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AAC,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"}
|
package/dist/protocol/version.js
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
];
|
|
45
45
|
|
|
46
46
|
// src/protocol/version.ts
|
|
47
|
-
var UI_DESIGN_MODE_VERSION = "11.44.
|
|
47
|
+
var UI_DESIGN_MODE_VERSION = "11.44.1";
|
|
48
48
|
|
|
49
49
|
// src/runtime/interactions/utils/sourceUtils.ts
|
|
50
50
|
function parseRequiredInt(value) {
|
|
@@ -565,6 +565,25 @@
|
|
|
565
565
|
* In design mode the app is inspected, not driven; selection still happens on
|
|
566
566
|
* `click`. Exception: events inside the element being inline-text-edited pass
|
|
567
567
|
* through so the caret can be placed.
|
|
568
|
+
*
|
|
569
|
+
* Deliberately does NOT call `preventDefault()`. `stopPropagation` +
|
|
570
|
+
* `stopImmediatePropagation` are what keep the app from reacting; `preventDefault`
|
|
571
|
+
* additionally cancelled two *browser* default actions we do want:
|
|
572
|
+
*
|
|
573
|
+
* 1. The focus shift. In an embedded preview that is cross-document: a text
|
|
574
|
+
* field focused in the HOST panel never blurs, so the panel — which commits
|
|
575
|
+
* a typed draft on blur — silently discards the user's edit when they click
|
|
576
|
+
* another element in the canvas (W-23560967). Keyboard Tab/Enter still worked,
|
|
577
|
+
* because focus movement by keyboard is not a mousedown default action, which
|
|
578
|
+
* is exactly what made the bug look arbitrary.
|
|
579
|
+
* 2. Text-selection drag. That one we still want suppressed, so it is handled by
|
|
580
|
+
* a `user-select: none` rule the controller installs while interactions are
|
|
581
|
+
* active (exempting `[contenteditable="true"]` so inline text editing keeps
|
|
582
|
+
* its caret and selection). CSS is the right tool: it suppresses the drag
|
|
583
|
+
* without also cancelling focus.
|
|
584
|
+
*
|
|
585
|
+
* Note `preventDefault` on `pointerdown` ALONE also cancels the focus shift, so
|
|
586
|
+
* dropping it only for `mousedown` would not have fixed this.
|
|
568
587
|
*/
|
|
569
588
|
handlePointerDown(e) {
|
|
570
589
|
if (!this.isInteractionsActive()) {
|
|
@@ -574,7 +593,6 @@
|
|
|
574
593
|
if (target.isContentEditable) {
|
|
575
594
|
return;
|
|
576
595
|
}
|
|
577
|
-
e.preventDefault();
|
|
578
596
|
e.stopPropagation();
|
|
579
597
|
e.stopImmediatePropagation?.();
|
|
580
598
|
}
|
|
@@ -945,6 +963,9 @@
|
|
|
945
963
|
|
|
946
964
|
// src/runtime/interactions/interactionsController.ts
|
|
947
965
|
var MAX_DRIFT_LINE_DELTA = 50;
|
|
966
|
+
var SELECT_SUPPRESS_STYLE_ID = "sfdc-design-mode-select-suppress";
|
|
967
|
+
var SELECT_SUPPRESS_CSS = `:root{-webkit-user-select:none;user-select:none;}
|
|
968
|
+
[contenteditable="true"],[contenteditable="true"] *{-webkit-user-select:text;user-select:text;}`;
|
|
948
969
|
var mediaAppliers = {
|
|
949
970
|
// Whitelist by construction: this applier reads only the attribute keys
|
|
950
971
|
// valid for <img> and ignores anything else in `attrs`. The map is never
|
|
@@ -1049,6 +1070,7 @@
|
|
|
1049
1070
|
enable(workspaceRoots = []) {
|
|
1050
1071
|
this.componentMatcher.setWorkspaceRoots(workspaceRoots);
|
|
1051
1072
|
this.isActive = true;
|
|
1073
|
+
this._mountSelectSuppression();
|
|
1052
1074
|
}
|
|
1053
1075
|
/**
|
|
1054
1076
|
* Disable the design mode interactions
|
|
@@ -1056,6 +1078,25 @@
|
|
|
1056
1078
|
disable() {
|
|
1057
1079
|
this.isActive = false;
|
|
1058
1080
|
this.eventHandlers.clearAll();
|
|
1081
|
+
this._unmountSelectSuppression();
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* Install the text-selection suppression sheet (idempotent). Tied to
|
|
1085
|
+
* enable/disable rather than initialize/destroy so the previewed app selects
|
|
1086
|
+
* text normally whenever design mode is off.
|
|
1087
|
+
*/
|
|
1088
|
+
_mountSelectSuppression() {
|
|
1089
|
+
if (typeof document === "undefined") return;
|
|
1090
|
+
if (document.getElementById(SELECT_SUPPRESS_STYLE_ID)) return;
|
|
1091
|
+
const style = document.createElement("style");
|
|
1092
|
+
style.id = SELECT_SUPPRESS_STYLE_ID;
|
|
1093
|
+
style.textContent = SELECT_SUPPRESS_CSS;
|
|
1094
|
+
document.head.appendChild(style);
|
|
1095
|
+
}
|
|
1096
|
+
/** Remove the suppression sheet so text is selectable again outside design mode. */
|
|
1097
|
+
_unmountSelectSuppression() {
|
|
1098
|
+
if (typeof document === "undefined") return;
|
|
1099
|
+
document.getElementById(SELECT_SUPPRESS_STYLE_ID)?.remove();
|
|
1059
1100
|
}
|
|
1060
1101
|
/**
|
|
1061
1102
|
* Programmatically select an element by source identity — the runtime side of
|
|
@@ -1123,15 +1164,16 @@
|
|
|
1123
1164
|
}
|
|
1124
1165
|
/**
|
|
1125
1166
|
* Apply a style change to all elements at the given source location.
|
|
1126
|
-
*
|
|
1127
|
-
*
|
|
1167
|
+
* `sourceLocation`, when provided, is used directly (both a stamped live
|
|
1168
|
+
* edit and an undo/redo replay carry one — see `isReplay` below). Otherwise
|
|
1169
|
+
* the source location is read from the currently selected element.
|
|
1128
1170
|
*/
|
|
1129
|
-
applyStyleChange(property, value, sourceLocation) {
|
|
1171
|
+
applyStyleChange(property, value, sourceLocation, isReplay) {
|
|
1130
1172
|
for (const el of this.resolveTargets(sourceLocation)) {
|
|
1131
1173
|
el.style[property] = value;
|
|
1132
1174
|
}
|
|
1133
1175
|
this.overlayManager.reposition();
|
|
1134
|
-
if (value === "" && !
|
|
1176
|
+
if (value === "" && !isReplay) {
|
|
1135
1177
|
const selected = this.eventHandlers.getSelectedElement();
|
|
1136
1178
|
if (selected) this.communicationManager.notifyComponentSelected(selected);
|
|
1137
1179
|
}
|
|
@@ -1213,7 +1255,8 @@
|
|
|
1213
1255
|
interactions.applyStyleChange(
|
|
1214
1256
|
String(typed.property ?? ""),
|
|
1215
1257
|
String(typed.value ?? ""),
|
|
1216
|
-
parseSourceLocation(typed.sourceLocation)
|
|
1258
|
+
parseSourceLocation(typed.sourceLocation),
|
|
1259
|
+
typed.isReplay === true
|
|
1217
1260
|
);
|
|
1218
1261
|
}
|
|
1219
1262
|
if (typed && typed.type === MSG_TEXT_CHANGE) {
|
|
@@ -35,6 +35,25 @@ export declare class EventHandlers {
|
|
|
35
35
|
* In design mode the app is inspected, not driven; selection still happens on
|
|
36
36
|
* `click`. Exception: events inside the element being inline-text-edited pass
|
|
37
37
|
* through so the caret can be placed.
|
|
38
|
+
*
|
|
39
|
+
* Deliberately does NOT call `preventDefault()`. `stopPropagation` +
|
|
40
|
+
* `stopImmediatePropagation` are what keep the app from reacting; `preventDefault`
|
|
41
|
+
* additionally cancelled two *browser* default actions we do want:
|
|
42
|
+
*
|
|
43
|
+
* 1. The focus shift. In an embedded preview that is cross-document: a text
|
|
44
|
+
* field focused in the HOST panel never blurs, so the panel — which commits
|
|
45
|
+
* a typed draft on blur — silently discards the user's edit when they click
|
|
46
|
+
* another element in the canvas (W-23560967). Keyboard Tab/Enter still worked,
|
|
47
|
+
* because focus movement by keyboard is not a mousedown default action, which
|
|
48
|
+
* is exactly what made the bug look arbitrary.
|
|
49
|
+
* 2. Text-selection drag. That one we still want suppressed, so it is handled by
|
|
50
|
+
* a `user-select: none` rule the controller installs while interactions are
|
|
51
|
+
* active (exempting `[contenteditable="true"]` so inline text editing keeps
|
|
52
|
+
* its caret and selection). CSS is the right tool: it suppresses the drag
|
|
53
|
+
* without also cancelling focus.
|
|
54
|
+
*
|
|
55
|
+
* Note `preventDefault` on `pointerdown` ALONE also cancels the focus shift, so
|
|
56
|
+
* dropping it only for `mousedown` would not have fixed this.
|
|
38
57
|
*/
|
|
39
58
|
handlePointerDown(e: Event): void;
|
|
40
59
|
private _findHighlightableElement;
|
|
@@ -35,6 +35,25 @@ export declare class EventHandlers {
|
|
|
35
35
|
* In design mode the app is inspected, not driven; selection still happens on
|
|
36
36
|
* `click`. Exception: events inside the element being inline-text-edited pass
|
|
37
37
|
* through so the caret can be placed.
|
|
38
|
+
*
|
|
39
|
+
* Deliberately does NOT call `preventDefault()`. `stopPropagation` +
|
|
40
|
+
* `stopImmediatePropagation` are what keep the app from reacting; `preventDefault`
|
|
41
|
+
* additionally cancelled two *browser* default actions we do want:
|
|
42
|
+
*
|
|
43
|
+
* 1. The focus shift. In an embedded preview that is cross-document: a text
|
|
44
|
+
* field focused in the HOST panel never blurs, so the panel — which commits
|
|
45
|
+
* a typed draft on blur — silently discards the user's edit when they click
|
|
46
|
+
* another element in the canvas (W-23560967). Keyboard Tab/Enter still worked,
|
|
47
|
+
* because focus movement by keyboard is not a mousedown default action, which
|
|
48
|
+
* is exactly what made the bug look arbitrary.
|
|
49
|
+
* 2. Text-selection drag. That one we still want suppressed, so it is handled by
|
|
50
|
+
* a `user-select: none` rule the controller installs while interactions are
|
|
51
|
+
* active (exempting `[contenteditable="true"]` so inline text editing keeps
|
|
52
|
+
* its caret and selection). CSS is the right tool: it suppresses the drag
|
|
53
|
+
* without also cancelling focus.
|
|
54
|
+
*
|
|
55
|
+
* Note `preventDefault` on `pointerdown` ALONE also cancels the focus shift, so
|
|
56
|
+
* dropping it only for `mousedown` would not have fixed this.
|
|
38
57
|
*/
|
|
39
58
|
handlePointerDown(e: Event): void;
|
|
40
59
|
private _findHighlightableElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventHandlers.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/eventHandlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,UAAU,oBAAoB;IAC7B,wBAAwB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAC;CACtE;AAED,UAAU,kBAAkB;IAC3B,iBAAiB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IACrD,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,cAAc,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAClD,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,UAAU,mBAAmB;IAC5B,kBAAkB,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACnD,cAAc,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/C;AAED,UAAU,wBAAwB;IACjC,uBAAuB,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CACxD;AAED,qBAAa,aAAa;IACzB,OAAO,CAAC,oBAAoB,CAAgB;IAC5C,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,oBAAoB,CAA2B;IAEvD,OAAO,CAAC,0BAA0B,CAAgB;IAClD,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,gBAAgB,CAAgB;gBAGvC,oBAAoB,EAAE,MAAM,OAAO,EACnC,gBAAgB,EAAE,oBAAoB,EACtC,cAAc,EAAE,kBAAkB,EAClC,eAAe,EAAE,mBAAmB,EACpC,oBAAoB,EAAE,wBAAwB;IAmB/C
|
|
1
|
+
{"version":3,"file":"eventHandlers.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/eventHandlers.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B,IAAI,IAAI;IAQxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAU3B,WAAW,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAqBhC;;;;;;;;;OASG;IACH,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IA8BzC,QAAQ,IAAI,IAAI;IAchB,kBAAkB,IAAI,WAAW,GAAG,IAAI;CAGxC"}
|
|
@@ -22,6 +22,14 @@ export declare class InteractionsController {
|
|
|
22
22
|
* Disable the design mode interactions
|
|
23
23
|
*/
|
|
24
24
|
disable(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Install the text-selection suppression sheet (idempotent). Tied to
|
|
27
|
+
* enable/disable rather than initialize/destroy so the previewed app selects
|
|
28
|
+
* text normally whenever design mode is off.
|
|
29
|
+
*/
|
|
30
|
+
private _mountSelectSuppression;
|
|
31
|
+
/** Remove the suppression sheet so text is selectable again outside design mode. */
|
|
32
|
+
private _unmountSelectSuppression;
|
|
25
33
|
/**
|
|
26
34
|
* Programmatically select an element by source identity — the runtime side of
|
|
27
35
|
* {@link SelectElementMessage}. Used to re-select an element after an edit
|
|
@@ -57,10 +65,11 @@ export declare class InteractionsController {
|
|
|
57
65
|
private resolveTargets;
|
|
58
66
|
/**
|
|
59
67
|
* Apply a style change to all elements at the given source location.
|
|
60
|
-
*
|
|
61
|
-
*
|
|
68
|
+
* `sourceLocation`, when provided, is used directly (both a stamped live
|
|
69
|
+
* edit and an undo/redo replay carry one — see `isReplay` below). Otherwise
|
|
70
|
+
* the source location is read from the currently selected element.
|
|
62
71
|
*/
|
|
63
|
-
applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation): void;
|
|
72
|
+
applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation, isReplay?: boolean): void;
|
|
64
73
|
applyTextChange(text: string, sourceLocation?: SourceLocation): void;
|
|
65
74
|
/**
|
|
66
75
|
* Apply attribute changes to all elements at the given source location whose
|
|
@@ -22,6 +22,14 @@ export declare class InteractionsController {
|
|
|
22
22
|
* Disable the design mode interactions
|
|
23
23
|
*/
|
|
24
24
|
disable(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Install the text-selection suppression sheet (idempotent). Tied to
|
|
27
|
+
* enable/disable rather than initialize/destroy so the previewed app selects
|
|
28
|
+
* text normally whenever design mode is off.
|
|
29
|
+
*/
|
|
30
|
+
private _mountSelectSuppression;
|
|
31
|
+
/** Remove the suppression sheet so text is selectable again outside design mode. */
|
|
32
|
+
private _unmountSelectSuppression;
|
|
25
33
|
/**
|
|
26
34
|
* Programmatically select an element by source identity — the runtime side of
|
|
27
35
|
* {@link SelectElementMessage}. Used to re-select an element after an edit
|
|
@@ -57,10 +65,11 @@ export declare class InteractionsController {
|
|
|
57
65
|
private resolveTargets;
|
|
58
66
|
/**
|
|
59
67
|
* Apply a style change to all elements at the given source location.
|
|
60
|
-
*
|
|
61
|
-
*
|
|
68
|
+
* `sourceLocation`, when provided, is used directly (both a stamped live
|
|
69
|
+
* edit and an undo/redo replay carry one — see `isReplay` below). Otherwise
|
|
70
|
+
* the source location is read from the currently selected element.
|
|
62
71
|
*/
|
|
63
|
-
applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation): void;
|
|
72
|
+
applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation, isReplay?: boolean): void;
|
|
64
73
|
applyTextChange(text: string, sourceLocation?: SourceLocation): void;
|
|
65
74
|
/**
|
|
66
75
|
* 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;AAYH,OAAO,EAIN,KAAK,cAAc,EACnB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"interactionsController.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/interactionsController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,EAIN,KAAK,cAA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mode",
|
|
3
3
|
"description": "Hybrid editor (design-mode) authoring UI, iframe runtime, source-locator, and protocol for Salesforce UI Bundles",
|
|
4
|
-
"version": "11.44.
|
|
4
|
+
"version": "11.44.1",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|