@salesforce/ui-design-mode 10.4.1 → 10.5.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 +12 -4
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts +12 -4
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
- package/dist/authoring/core/history/historyManager.d.cts +1 -1
- package/dist/authoring/core/history/historyManager.d.ts +1 -1
- package/dist/authoring/react/index.d.cts +1 -1
- package/dist/authoring/react/index.d.ts +1 -1
- package/dist/authoring/react/index.d.ts.map +1 -1
- package/dist/authoring/react/index.js +3 -3
- package/dist/authoring/react/styles.css +6 -0
- package/dist/authoring/web-component/index.d.cts +10 -0
- package/dist/authoring/web-component/index.d.ts +10 -0
- package/dist/authoring/web-component/index.d.ts.map +1 -1
- package/dist/authoring/web-component/index.js +288 -259
- package/package.json +2 -1
|
@@ -5,8 +5,8 @@ import { ChangeContext } from './history/historyService.cjs';
|
|
|
5
5
|
export type DesignPanelComponent = Pick<ComponentData, "name" | "tagName" | "debugSource" | "hasNonEditableText">;
|
|
6
6
|
/** Per-property inline + computed style values pushed from the host. */
|
|
7
7
|
export type StylesEntryMap = Record<string, ComponentStyleValue>;
|
|
8
|
-
/**
|
|
9
|
-
export type
|
|
8
|
+
/** The selected element's source context, sent to the host's AI chat as context info. */
|
|
9
|
+
export type SelectedComponentContext = ChangeContext;
|
|
10
10
|
/** Payload the panel emits when the user clicks a component's source-file link. */
|
|
11
11
|
export interface OpenSourceFilePayload {
|
|
12
12
|
sourceFile: string;
|
|
@@ -28,10 +28,18 @@ export interface DesignPropertyPanelProps {
|
|
|
28
28
|
canUndo: boolean;
|
|
29
29
|
canRedo: boolean;
|
|
30
30
|
}) => void;
|
|
31
|
-
/** User clicked "
|
|
32
|
-
|
|
31
|
+
/** User clicked the "add selected element to AI chat as context" button. */
|
|
32
|
+
onAddToChatContext?: (context: SelectedComponentContext) => void;
|
|
33
33
|
/** User clicked the selected component's source-file link. */
|
|
34
34
|
onOpenSourceFile?: (payload: OpenSourceFilePayload) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to render the panel's "add selected element to chat as context"
|
|
37
|
+
* button. Defaults to `true`. A surface with no AI-chat integration sets this
|
|
38
|
+
* to `false` to hide the button without forking the panel. The button's
|
|
39
|
+
* visible label defaults to neutral text ("Add to chat as context");
|
|
40
|
+
* per-surface relabeling is future work (Epic 5's `strings` prop).
|
|
41
|
+
*/
|
|
42
|
+
showAddToChatContext?: boolean;
|
|
35
43
|
}
|
|
36
44
|
/** Imperative handle exposed via ref for toolbar-driven history control. */
|
|
37
45
|
export interface DesignPropertyPanelHandle {
|
|
@@ -5,8 +5,8 @@ import { ChangeContext } from './history/historyService.js';
|
|
|
5
5
|
export type DesignPanelComponent = Pick<ComponentData, "name" | "tagName" | "debugSource" | "hasNonEditableText">;
|
|
6
6
|
/** Per-property inline + computed style values pushed from the host. */
|
|
7
7
|
export type StylesEntryMap = Record<string, ComponentStyleValue>;
|
|
8
|
-
/**
|
|
9
|
-
export type
|
|
8
|
+
/** The selected element's source context, sent to the host's AI chat as context info. */
|
|
9
|
+
export type SelectedComponentContext = ChangeContext;
|
|
10
10
|
/** Payload the panel emits when the user clicks a component's source-file link. */
|
|
11
11
|
export interface OpenSourceFilePayload {
|
|
12
12
|
sourceFile: string;
|
|
@@ -28,10 +28,18 @@ export interface DesignPropertyPanelProps {
|
|
|
28
28
|
canUndo: boolean;
|
|
29
29
|
canRedo: boolean;
|
|
30
30
|
}) => void;
|
|
31
|
-
/** User clicked "
|
|
32
|
-
|
|
31
|
+
/** User clicked the "add selected element to AI chat as context" button. */
|
|
32
|
+
onAddToChatContext?: (context: SelectedComponentContext) => void;
|
|
33
33
|
/** User clicked the selected component's source-file link. */
|
|
34
34
|
onOpenSourceFile?: (payload: OpenSourceFilePayload) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to render the panel's "add selected element to chat as context"
|
|
37
|
+
* button. Defaults to `true`. A surface with no AI-chat integration sets this
|
|
38
|
+
* to `false` to hide the button without forking the panel. The button's
|
|
39
|
+
* visible label defaults to neutral text ("Add to chat as context");
|
|
40
|
+
* per-surface relabeling is future work (Epic 5's `strings` prop).
|
|
41
|
+
*/
|
|
42
|
+
showAddToChatContext?: boolean;
|
|
35
43
|
}
|
|
36
44
|
/** Imperative handle exposed via ref for toolbar-driven history control. */
|
|
37
45
|
export interface DesignPropertyPanelHandle {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesignPropertyPanelRoot.d.ts","sourceRoot":"","sources":["../../../src/authoring/core/DesignPropertyPanelRoot.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAazF,OAAO,EAEN,KAAK,aAAa,EAElB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"DesignPropertyPanelRoot.d.ts","sourceRoot":"","sources":["../../../src/authoring/core/DesignPropertyPanelRoot.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAazF,OAAO,EAEN,KAAK,aAAa,EAElB,MAAM,0BAA0B,CAAC;AASlC,iFAAiF;AACjF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACtC,aAAa,EACb,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,oBAAoB,CACzD,CAAC;AAEF,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAEjE,yFAAyF;AACzF,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC;AAErD,mFAAmF;AACnF,MAAM,WAAW,qBAA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eAAO,MAAM,mBAAmB,4GAyM9B,CAAC;AAEH;;;GAGG;AACH,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,KAAK,EAAE,wBAAwB,EAC/B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,yBAAyB,CAAC,QAK1C"}
|
|
@@ -64,7 +64,7 @@ export declare class HistoryManager {
|
|
|
64
64
|
getUndoCount(): number;
|
|
65
65
|
getRedoCount(): number;
|
|
66
66
|
/**
|
|
67
|
-
* Returns a serializable snapshot of the undo stack for building prompts (e.g. for
|
|
67
|
+
* Returns a serializable snapshot of the undo stack for building prompts (e.g. for an AI chat).
|
|
68
68
|
* Order is oldest-first (first applied change first).
|
|
69
69
|
*/
|
|
70
70
|
getUndoStackSnapshot(): {
|
|
@@ -64,7 +64,7 @@ export declare class HistoryManager {
|
|
|
64
64
|
getUndoCount(): number;
|
|
65
65
|
getRedoCount(): number;
|
|
66
66
|
/**
|
|
67
|
-
* Returns a serializable snapshot of the undo stack for building prompts (e.g. for
|
|
67
|
+
* Returns a serializable snapshot of the undo stack for building prompts (e.g. for an AI chat).
|
|
68
68
|
* Order is oldest-first (first applied change first).
|
|
69
69
|
*/
|
|
70
70
|
getUndoStackSnapshot(): {
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
* use `/authoring/web-component` instead.
|
|
11
11
|
*/
|
|
12
12
|
export { DesignPropertyPanel, mountDesignPropertyPanel } from '../core/DesignPropertyPanelRoot.cjs';
|
|
13
|
-
export type { DesignPropertyPanelProps, DesignPropertyPanelHandle, DesignPanelComponent, StylesEntryMap,
|
|
13
|
+
export type { DesignPropertyPanelProps, DesignPropertyPanelHandle, DesignPanelComponent, StylesEntryMap, SelectedComponentContext, OpenSourceFilePayload, } from '../core/DesignPropertyPanelRoot.cjs';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
* use `/authoring/web-component` instead.
|
|
11
11
|
*/
|
|
12
12
|
export { DesignPropertyPanel, mountDesignPropertyPanel } from '../core/DesignPropertyPanelRoot.js';
|
|
13
|
-
export type { DesignPropertyPanelProps, DesignPropertyPanelHandle, DesignPanelComponent, StylesEntryMap,
|
|
13
|
+
export type { DesignPropertyPanelProps, DesignPropertyPanelHandle, DesignPanelComponent, StylesEntryMap, SelectedComponentContext, OpenSourceFilePayload, } from '../core/DesignPropertyPanelRoot.js';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/authoring/react/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,YAAY,EACX,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/authoring/react/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,YAAY,EACX,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,qBAAqB,GACrB,MAAM,iCAAiC,CAAC"}
|