@salesforce/ui-bundle 1.117.2
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/LICENSE.txt +82 -0
- package/README.md +3 -0
- package/dist/api/clients.d.ts +22 -0
- package/dist/api/clients.d.ts.map +1 -0
- package/dist/api/clients.js +84 -0
- package/dist/api/graphql-operations-types.d.ts +225 -0
- package/dist/api/graphql-operations-types.d.ts.map +1 -0
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +13 -0
- package/dist/api/utils/accounts.d.ts +33 -0
- package/dist/api/utils/accounts.d.ts.map +1 -0
- package/dist/api/utils/accounts.js +47 -0
- package/dist/api/utils/records.d.ts +16 -0
- package/dist/api/utils/records.d.ts.map +1 -0
- package/dist/api/utils/records.js +26 -0
- package/dist/api/utils/user.d.ts +17 -0
- package/dist/api/utils/user.d.ts.map +1 -0
- package/dist/api/utils/user.js +25 -0
- package/dist/app/index.d.ts +10 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +7 -0
- package/dist/app/manifest.d.ts +34 -0
- package/dist/app/manifest.d.ts.map +1 -0
- package/dist/app/manifest.js +28 -0
- package/dist/app/org.d.ts +28 -0
- package/dist/app/org.d.ts.map +1 -0
- package/dist/app/org.js +67 -0
- package/dist/design/design-mode-interactions.js +761 -0
- package/dist/design/index.d.ts +12 -0
- package/dist/design/index.d.ts.map +1 -0
- package/dist/design/index.js +14 -0
- package/dist/design/interactions/communicationManager.d.ts +25 -0
- package/dist/design/interactions/communicationManager.d.ts.map +1 -0
- package/dist/design/interactions/componentMatcher.d.ts +43 -0
- package/dist/design/interactions/componentMatcher.d.ts.map +1 -0
- package/dist/design/interactions/editableManager.d.ts +25 -0
- package/dist/design/interactions/editableManager.d.ts.map +1 -0
- package/dist/design/interactions/eventHandlers.d.ts +40 -0
- package/dist/design/interactions/eventHandlers.d.ts.map +1 -0
- package/dist/design/interactions/index.d.ts +7 -0
- package/dist/design/interactions/index.d.ts.map +1 -0
- package/dist/design/interactions/interactionsController.d.ts +36 -0
- package/dist/design/interactions/interactionsController.d.ts.map +1 -0
- package/dist/design/interactions/styleManager.d.ts +49 -0
- package/dist/design/interactions/styleManager.d.ts.map +1 -0
- package/dist/design/interactions/utils/cssUtils.d.ts +54 -0
- package/dist/design/interactions/utils/cssUtils.d.ts.map +1 -0
- package/dist/design/interactions/utils/sourceUtils.d.ts +36 -0
- package/dist/design/interactions/utils/sourceUtils.d.ts.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/package.json.js +4 -0
- package/dist/proxy/handler.d.ts +38 -0
- package/dist/proxy/handler.d.ts.map +1 -0
- package/dist/proxy/handler.js +530 -0
- package/dist/proxy/index.d.ts +8 -0
- package/dist/proxy/index.d.ts.map +1 -0
- package/dist/proxy/index.js +7 -0
- package/dist/proxy/livePreviewScript.d.ts +21 -0
- package/dist/proxy/livePreviewScript.d.ts.map +1 -0
- package/dist/proxy/livePreviewScript.js +16 -0
- package/dist/proxy/routing.d.ts +35 -0
- package/dist/proxy/routing.d.ts.map +1 -0
- package/dist/proxy/routing.js +83 -0
- package/dist/proxy/templates/livePreviewScript.js +553 -0
- package/package.json +65 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Read the bundled design mode interactions script content.
|
|
8
|
+
* @returns The script content, or null if the file does not exist (e.g. build:design not run)
|
|
9
|
+
* @throws Error if the file exists but cannot be read
|
|
10
|
+
*/
|
|
11
|
+
export declare function getDesignModeScriptContent(): string | null;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/design/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,GAAG,IAAI,CAK1D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
const __dirname$1 = dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
const DESIGN_MODE_SCRIPT_PATH = join(__dirname$1, "../../dist/design/design-mode-interactions.js");
|
|
6
|
+
function getDesignModeScriptContent() {
|
|
7
|
+
if (!existsSync(DESIGN_MODE_SCRIPT_PATH)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return readFileSync(DESIGN_MODE_SCRIPT_PATH, "utf-8");
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
getDesignModeScriptContent
|
|
14
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
export declare class CommunicationManager {
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Notify the extension about a selected component
|
|
10
|
+
* @param element - The selected element
|
|
11
|
+
*/
|
|
12
|
+
notifyComponentSelected(element: HTMLElement): void;
|
|
13
|
+
/**
|
|
14
|
+
* Notify the extension about a text change
|
|
15
|
+
* @param element - The element that changed
|
|
16
|
+
* @param originalText - The original text
|
|
17
|
+
* @param newText - The new text
|
|
18
|
+
*/
|
|
19
|
+
notifyTextChange(element: HTMLElement, originalText: string, newText: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Notify the parent window that interactions initialization is complete
|
|
22
|
+
*/
|
|
23
|
+
notifyInitializationComplete(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=communicationManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"communicationManager.d.ts","sourceRoot":"","sources":["../../../src/design/interactions/communicationManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiBH,qBAAa,oBAAoB;;IAKhC;;;OAGG;IACH,uBAAuB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAuDnD;;;;;OAKG;IACH,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAyBnF;;OAEG;IACH,4BAA4B,IAAI,IAAI;CAepC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Component Matcher Module
|
|
8
|
+
* Handles mapping DOM elements to source-locatable elements (data-source-*).
|
|
9
|
+
*/
|
|
10
|
+
export interface ComponentMatcherOptions {
|
|
11
|
+
allowlist?: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare class ComponentMatcher {
|
|
14
|
+
private allowlist;
|
|
15
|
+
constructor(options?: ComponentMatcherOptions);
|
|
16
|
+
/**
|
|
17
|
+
* Check whether an element contains compile-time source metadata attributes.
|
|
18
|
+
* @param element - The element to check
|
|
19
|
+
* @returns True if the data-source-file attribute is present
|
|
20
|
+
*/
|
|
21
|
+
hasSourceMetadata(element: HTMLElement | null | undefined): boolean;
|
|
22
|
+
private matchesList;
|
|
23
|
+
/**
|
|
24
|
+
* Checks if a label represents a component name (not a fallback like tag name, ID, or text content)
|
|
25
|
+
* @param label - The label to check
|
|
26
|
+
* @param tagName - The element's tag name (lowercase)
|
|
27
|
+
* @returns True if the label is a component name
|
|
28
|
+
*/
|
|
29
|
+
isComponentNameLabel(label: string, tagName: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Check if an element is highlightable.
|
|
32
|
+
* @param element - The element to check
|
|
33
|
+
* @returns True if the element should be highlighted
|
|
34
|
+
*/
|
|
35
|
+
isHighlightableElement(element: HTMLElement | null | undefined): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Find the nearest highlightable element by walking up the DOM tree
|
|
38
|
+
* @param target - The target element
|
|
39
|
+
* @returns The highlightable element or null
|
|
40
|
+
*/
|
|
41
|
+
findHighlightableElement(target: HTMLElement | null | undefined): HTMLElement | null;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=componentMatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentMatcher.d.ts","sourceRoot":"","sources":["../../../src/design/interactions/componentMatcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AAEH,MAAM,WAAW,uBAAuB;IAEvC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,qBAAa,gBAAgB;IAC5B,OAAO,CAAC,SAAS,CAAW;gBAEhB,OAAO,GAAE,uBAA4B;IAIjD;;;;OAIG;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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
interface CommunicationManagerLike {
|
|
7
|
+
notifyTextChange: (element: HTMLElement, originalText: string, newText: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const TEXT_TAGS: string[];
|
|
10
|
+
export declare class EditableManager {
|
|
11
|
+
private communicationManager?;
|
|
12
|
+
private boundHandleBlur;
|
|
13
|
+
private boundHandleKeydown;
|
|
14
|
+
private boundHandleInput;
|
|
15
|
+
private editableGroup;
|
|
16
|
+
constructor(communicationManager?: CommunicationManagerLike);
|
|
17
|
+
makeEditableIfText(element: HTMLElement): void;
|
|
18
|
+
removeEditable(element: HTMLElement): void;
|
|
19
|
+
private _isTextElement;
|
|
20
|
+
private _handleInput;
|
|
21
|
+
private _handleBlur;
|
|
22
|
+
private _handleKeydown;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=editableManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editableManager.d.ts","sourceRoot":"","sources":["../../../src/design/interactions/editableManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,UAAU,wBAAwB;IACjC,gBAAgB,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxF;AAED,eAAO,MAAM,SAAS,UAA4E,CAAC;AAEnG,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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
interface ComponentMatcherLike {
|
|
7
|
+
findHighlightableElement: (target: HTMLElement) => HTMLElement | null;
|
|
8
|
+
}
|
|
9
|
+
interface StyleManagerLike {
|
|
10
|
+
highlightElements: (elements: HTMLElement[]) => void;
|
|
11
|
+
unhighlightElements: (elements: HTMLElement[]) => void;
|
|
12
|
+
selectElements: (elements: HTMLElement[]) => void;
|
|
13
|
+
deselectElements: (elements: HTMLElement[]) => void;
|
|
14
|
+
}
|
|
15
|
+
interface EditableManagerLike {
|
|
16
|
+
makeEditableIfText: (element: HTMLElement) => void;
|
|
17
|
+
removeEditable: (element: HTMLElement) => void;
|
|
18
|
+
}
|
|
19
|
+
interface CommunicationManagerLike {
|
|
20
|
+
notifyComponentSelected: (element: HTMLElement) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare class EventHandlers {
|
|
23
|
+
private isInteractionsActive;
|
|
24
|
+
private componentMatcher;
|
|
25
|
+
private styleManager;
|
|
26
|
+
private editableManager;
|
|
27
|
+
private communicationManager;
|
|
28
|
+
private currentHighlightedElements;
|
|
29
|
+
private selectedElement;
|
|
30
|
+
private selectedElements;
|
|
31
|
+
constructor(isInteractionsActive: () => boolean, componentMatcher: ComponentMatcherLike, styleManager: StyleManagerLike, editableManager: EditableManagerLike, communicationManager: CommunicationManagerLike);
|
|
32
|
+
private _findHighlightableElement;
|
|
33
|
+
handleMouseOver(e: MouseEvent): void;
|
|
34
|
+
handleMouseLeave(): void;
|
|
35
|
+
handleClick(e: MouseEvent): void;
|
|
36
|
+
clearAll(): void;
|
|
37
|
+
getSelectedElement(): HTMLElement | null;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=eventHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventHandlers.d.ts","sourceRoot":"","sources":["../../../src/design/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,gBAAgB;IACzB,iBAAiB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IACrD,mBAAmB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IACvD,cAAc,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAClD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;CACpD;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,YAAY,CAAmB;IACvC,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,YAAY,EAAE,gBAAgB,EAC9B,eAAe,EAAE,mBAAmB,EACpC,oBAAoB,EAAE,wBAAwB;IAkB/C,OAAO,CAAC,yBAAyB;IAIjC,eAAe,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAqCpC,gBAAgB,IAAI,IAAI;IAcxB,WAAW,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IA+ChC,QAAQ,IAAI,IAAI;IAchB,kBAAkB,IAAI,WAAW,GAAG,IAAI;CAGxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/design/interactions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SourceLocation } from './utils/sourceUtils';
|
|
2
|
+
export declare class InteractionsController {
|
|
3
|
+
private enabled;
|
|
4
|
+
private isActive;
|
|
5
|
+
private componentMatcher;
|
|
6
|
+
private styleManager;
|
|
7
|
+
private communicationManager;
|
|
8
|
+
private editableManager;
|
|
9
|
+
private eventHandlers;
|
|
10
|
+
constructor(enabled?: boolean);
|
|
11
|
+
/**
|
|
12
|
+
* Initialize the design mode interactions
|
|
13
|
+
*/
|
|
14
|
+
initialize(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Enable the design mode interactions
|
|
17
|
+
*/
|
|
18
|
+
enable(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Disable the design mode interactions
|
|
21
|
+
*/
|
|
22
|
+
disable(): void;
|
|
23
|
+
private resolveTargets;
|
|
24
|
+
/**
|
|
25
|
+
* Apply a style change to all elements at the given source location.
|
|
26
|
+
* When sourceLocation is provided (undo/redo), it is used directly.
|
|
27
|
+
* Otherwise the source location is read from the currently selected element.
|
|
28
|
+
*/
|
|
29
|
+
applyStyleChange(property: string, value: string, sourceLocation?: SourceLocation): void;
|
|
30
|
+
applyTextChange(text: string, sourceLocation?: SourceLocation): void;
|
|
31
|
+
/**
|
|
32
|
+
* Cleanup and remove event listeners
|
|
33
|
+
*/
|
|
34
|
+
destroy(): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=interactionsController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactionsController.d.ts","sourceRoot":"","sources":["../../../src/design/interactions/interactionsController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,EAGN,KAAK,cAAc,EACnB,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,sBAAsB;IAClC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,aAAa,CAAgB;gBAEzB,OAAO,UAAO;IAwD1B;;OAEG;IACH,UAAU,IAAI,IAAI;IAiBlB;;OAEG;IACH,MAAM,IAAI,IAAI;IAKd;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf,OAAO,CAAC,cAAc;IAWtB;;;;OAIG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI;IAMxF,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI;IAMpE;;OAEG;IACH,OAAO,IAAI,IAAI;CAOf"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 Manager Module
|
|
8
|
+
* Handles CSS injection and style management for highlighting
|
|
9
|
+
*/
|
|
10
|
+
export declare class StyleManager {
|
|
11
|
+
private styleId;
|
|
12
|
+
private stylesAdded;
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Add CSS styles for highlighting to the document
|
|
16
|
+
*/
|
|
17
|
+
addHighlightStyles(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Remove highlight styles from the document
|
|
20
|
+
*/
|
|
21
|
+
removeHighlightStyles(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Get the CSS styles for highlighting
|
|
24
|
+
* @private
|
|
25
|
+
* @returns CSS styles
|
|
26
|
+
*/
|
|
27
|
+
private _getStyles;
|
|
28
|
+
/**
|
|
29
|
+
* Apply highlight class to one or more elements
|
|
30
|
+
* @param elements - The elements to highlight
|
|
31
|
+
*/
|
|
32
|
+
highlightElements(elements: HTMLElement[]): void;
|
|
33
|
+
/**
|
|
34
|
+
* Remove highlight class from one or more elements
|
|
35
|
+
* @param elements - The elements to unhighlight
|
|
36
|
+
*/
|
|
37
|
+
unhighlightElements(elements: HTMLElement[]): void;
|
|
38
|
+
/**
|
|
39
|
+
* Apply selected class to one or more elements
|
|
40
|
+
* @param elements - The elements to select
|
|
41
|
+
*/
|
|
42
|
+
selectElements(elements: HTMLElement[]): void;
|
|
43
|
+
/**
|
|
44
|
+
* Remove selected class from one or more elements
|
|
45
|
+
* @param elements - The elements to deselect
|
|
46
|
+
*/
|
|
47
|
+
deselectElements(elements: HTMLElement[]): void;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=styleManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleManager.d.ts","sourceRoot":"","sources":["../../../src/design/interactions/styleManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AAEH,qBAAa,YAAY;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAU;;IAO7B;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAY1B;;OAEG;IACH,qBAAqB,IAAI,IAAI;IAQ7B;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAiBlB;;;OAGG;IACH,iBAAiB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;IAMhD;;;OAGG;IACH,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;IAMlD;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;IAM7C;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;CAK/C"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 value with both inline and computed values.
|
|
8
|
+
* - inline: the raw value from element.style (what was explicitly set via
|
|
9
|
+
* the style attribute).
|
|
10
|
+
* - computed: the browser-resolved value after the full cascade.
|
|
11
|
+
*/
|
|
12
|
+
interface StyleValue {
|
|
13
|
+
inline: string;
|
|
14
|
+
computed: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Complete element styles snapshot
|
|
18
|
+
*/
|
|
19
|
+
interface ElementStyles {
|
|
20
|
+
width: StyleValue;
|
|
21
|
+
minWidth: StyleValue;
|
|
22
|
+
maxWidth: StyleValue;
|
|
23
|
+
height: StyleValue;
|
|
24
|
+
minHeight: StyleValue;
|
|
25
|
+
maxHeight: StyleValue;
|
|
26
|
+
overflow: StyleValue;
|
|
27
|
+
padding: StyleValue;
|
|
28
|
+
margin: StyleValue;
|
|
29
|
+
backgroundColor: StyleValue;
|
|
30
|
+
borderWidth: StyleValue;
|
|
31
|
+
borderStyle: StyleValue;
|
|
32
|
+
borderColor: StyleValue;
|
|
33
|
+
borderRadius: StyleValue;
|
|
34
|
+
color: StyleValue;
|
|
35
|
+
fontFamily: StyleValue;
|
|
36
|
+
fontSize: StyleValue;
|
|
37
|
+
fontWeight: StyleValue;
|
|
38
|
+
fontStyle: StyleValue;
|
|
39
|
+
lineHeight: StyleValue;
|
|
40
|
+
letterSpacing: StyleValue;
|
|
41
|
+
textAlign: StyleValue;
|
|
42
|
+
textDecoration: StyleValue;
|
|
43
|
+
textTransform: StyleValue;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get all style values relevant to UI controls for an element.
|
|
47
|
+
* Each property returns { inline, computed } where inline is the raw
|
|
48
|
+
* element.style value and computed is the browser-resolved value.
|
|
49
|
+
* @param element - The HTML element to extract styles from
|
|
50
|
+
* @returns Plain-object snapshot safe for postMessage
|
|
51
|
+
*/
|
|
52
|
+
export declare function getElementStyles(element: HTMLElement | null | undefined): Partial<ElementStyles>;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=cssUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssUtils.d.ts","sourceRoot":"","sources":["../../../../src/design/interactions/utils/cssUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,UAAU,UAAU;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACjB;AAID;;GAEG;AACH,UAAU,aAAa;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,eAAe,EAAE,UAAU,CAAC;IAC5B,WAAW,EAAE,UAAU,CAAC;IACxB,WAAW,EAAE,UAAU,CAAC;IACxB,WAAW,EAAE,UAAU,CAAC;IACxB,YAAY,EAAE,UAAU,CAAC;IACzB,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,UAAU,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,UAAU,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,UAAU,CAAC;IAC1B,SAAS,EAAE,UAAU,CAAC;IACtB,cAAc,EAAE,UAAU,CAAC;IAC3B,aAAa,EAAE,UAAU,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CAmFhG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
export interface SourceLocation {
|
|
7
|
+
fileName: string;
|
|
8
|
+
lineNumber: number | null;
|
|
9
|
+
columnNumber: number | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Extract source location information from data attributes.
|
|
13
|
+
* @param element - The DOM element
|
|
14
|
+
* @returns Source location information, or null if missing.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getSourceFromDataAttributes(element: HTMLElement | null | undefined): SourceLocation | null;
|
|
17
|
+
/**
|
|
18
|
+
* Find all DOM elements whose `data-source-file` attribute matches the given source location.
|
|
19
|
+
* @param location - The source location to match against
|
|
20
|
+
* @returns All matching elements (may be empty)
|
|
21
|
+
*/
|
|
22
|
+
export declare function findElementsBySourceLocation(location: SourceLocation): HTMLElement[];
|
|
23
|
+
/**
|
|
24
|
+
* Derive a human-readable label from the injected source file name, if present.
|
|
25
|
+
* @param element - The DOM element
|
|
26
|
+
* @returns A label suitable for UI display
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Parse an untyped message payload object into a SourceLocation.
|
|
30
|
+
* Used by the entry point to convert raw postMessage data into typed values.
|
|
31
|
+
* @param sl - The raw source location object from a message payload
|
|
32
|
+
* @returns A SourceLocation, or undefined if the input is not a valid object
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseSourceLocation(sl: unknown): SourceLocation | undefined;
|
|
35
|
+
export declare function getLabelFromSource(element: HTMLElement | null | undefined): string;
|
|
36
|
+
//# sourceMappingURL=sourceUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceUtils.d.ts","sourceRoot":"","sources":["../../../../src/design/interactions/utils/sourceUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkCH,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;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;;;;GAIG;AACH;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CAQ3E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAiBlF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
export * from './api/index';
|
|
7
|
+
export * from './app/index';
|
|
8
|
+
export * from './proxy/index';
|
|
9
|
+
export * from './design/index';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { uiApiClient } from "./api/clients.js";
|
|
2
|
+
import { getHighRevenueAccounts } from "./api/utils/accounts.js";
|
|
3
|
+
import { createRecord, deleteRecord, getRecord, updateRecord } from "./api/utils/records.js";
|
|
4
|
+
import { getCurrentUser } from "./api/utils/user.js";
|
|
5
|
+
import { getOrgInfo, refreshOrgAuth } from "./app/org.js";
|
|
6
|
+
import { loadManifest } from "./app/manifest.js";
|
|
7
|
+
import { UIBUNDLE_HEALTH_CHECK_PARAM, UIBUNDLE_PROXY_HEADER, createProxyHandler, injectLivePreviewScript } from "./proxy/handler.js";
|
|
8
|
+
import { getDesignModeScriptContent } from "./design/index.js";
|
|
9
|
+
export {
|
|
10
|
+
UIBUNDLE_HEALTH_CHECK_PARAM,
|
|
11
|
+
UIBUNDLE_PROXY_HEADER,
|
|
12
|
+
createProxyHandler,
|
|
13
|
+
createRecord,
|
|
14
|
+
deleteRecord,
|
|
15
|
+
getCurrentUser,
|
|
16
|
+
getDesignModeScriptContent,
|
|
17
|
+
getHighRevenueAccounts,
|
|
18
|
+
getOrgInfo,
|
|
19
|
+
getRecord,
|
|
20
|
+
injectLivePreviewScript,
|
|
21
|
+
loadManifest,
|
|
22
|
+
refreshOrgAuth,
|
|
23
|
+
uiApiClient,
|
|
24
|
+
updateRecord
|
|
25
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
import { OrgInfo, UIBundleManifest } from '../app/index';
|
|
3
|
+
/**
|
|
4
|
+
* URL parameter to trigger health check response
|
|
5
|
+
*/
|
|
6
|
+
export declare const UIBUNDLE_HEALTH_CHECK_PARAM = "sfProxyHealthCheck";
|
|
7
|
+
/**
|
|
8
|
+
* Response header indicating the proxy is active
|
|
9
|
+
*/
|
|
10
|
+
export declare const UIBUNDLE_PROXY_HEADER = "X-Salesforce-UIBundle-Proxy";
|
|
11
|
+
/**
|
|
12
|
+
* Configuration options for the UI Bundle proxy handler
|
|
13
|
+
*/
|
|
14
|
+
export interface ProxyOptions {
|
|
15
|
+
debug?: boolean;
|
|
16
|
+
onTokenRefresh?: (updatedOrgInfo: OrgInfo) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Proxy handler function type
|
|
20
|
+
*/
|
|
21
|
+
export type ProxyHandler = (req: IncomingMessage, res: ServerResponse, next?: () => void) => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Create proxy request handler
|
|
24
|
+
*
|
|
25
|
+
* @param manifest - UI Bundle manifest configuration
|
|
26
|
+
* @param orgInfo - Salesforce org information
|
|
27
|
+
* @param target - Target URL for dev server forwarding (optional)
|
|
28
|
+
* @param basePath - Base path for routing (optional)
|
|
29
|
+
* @param options - Proxy configuration options
|
|
30
|
+
* @returns Async request handler function for Node.js HTTP server
|
|
31
|
+
*/
|
|
32
|
+
export declare function createProxyHandler(manifest: UIBundleManifest, orgInfo?: OrgInfo, target?: string, basePath?: string, options?: ProxyOptions): ProxyHandler;
|
|
33
|
+
/**
|
|
34
|
+
* Inject Live Preview script into HTML content.
|
|
35
|
+
* Used by the Vite plugin's transformIndexHtml hook and the standalone proxy's sendResponse.
|
|
36
|
+
*/
|
|
37
|
+
export declare function injectLivePreviewScript(html: string): string;
|
|
38
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/proxy/handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIjE,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG9D;;GAEG;AACH,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,qBAAqB,gCAAgC,CAAC;AA6BnE;;GAEG;AACH,MAAM,WAAW,YAAY;IAE5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,cAAc,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAC1B,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,IAAI,CAAC,EAAE,MAAM,IAAI,KACb,OAAO,CAAC,IAAI,CAAC,CAAC;AAwlBnB;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,CAAC,EAAE,OAAO,EACjB,MAAM,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,YAAY,GACpB,YAAY,CAGd;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D"}
|