@salesforce/ui-design-mode 12.17.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring/core/DesignPropertyPanelRoot.d.cts +4 -2
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts +4 -2
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
- package/dist/authoring/core/editors/BoxDimensionEditor.d.cts +20 -34
- package/dist/authoring/core/editors/BoxDimensionEditor.d.ts +20 -34
- package/dist/authoring/core/editors/BoxDimensionEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/ColorEditor.d.cts +8 -7
- package/dist/authoring/core/editors/ColorEditor.d.ts +8 -7
- package/dist/authoring/core/editors/ColorEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/DimensionEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/FieldNotice.d.cts +17 -0
- package/dist/authoring/core/editors/FieldNotice.d.ts +17 -0
- package/dist/authoring/core/editors/FieldNotice.d.ts.map +1 -0
- package/dist/authoring/core/editors/FontFamilyEditor.d.cts +4 -6
- package/dist/authoring/core/editors/FontFamilyEditor.d.ts +4 -6
- package/dist/authoring/core/editors/FontFamilyEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/FontWeightEditor.d.cts +6 -5
- package/dist/authoring/core/editors/FontWeightEditor.d.ts +6 -5
- package/dist/authoring/core/editors/FontWeightEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/ImageEditor.d.cts +21 -1
- package/dist/authoring/core/editors/ImageEditor.d.ts +21 -1
- package/dist/authoring/core/editors/ImageEditor.d.ts.map +1 -1
- package/dist/authoring/core/editors/PicklistEditor.d.cts +5 -21
- package/dist/authoring/core/editors/PicklistEditor.d.ts +5 -21
- package/dist/authoring/core/editors/PicklistEditor.d.ts.map +1 -1
- package/dist/authoring/core/history/changeSet.d.cts +28 -5
- package/dist/authoring/core/history/changeSet.d.ts +28 -5
- package/dist/authoring/core/history/changeSet.d.ts.map +1 -1
- package/dist/authoring/core/history/historyService.d.cts +1 -3
- package/dist/authoring/core/history/historyService.d.ts +1 -3
- package/dist/authoring/core/history/historyService.d.ts.map +1 -1
- package/dist/authoring/core/history/iframeCommandExecutor.d.cts +1 -1
- package/dist/authoring/core/history/iframeCommandExecutor.d.ts +1 -1
- package/dist/authoring/core/hooks/useRecentColors.d.cts +12 -0
- package/dist/authoring/core/hooks/useRecentColors.d.ts +12 -0
- package/dist/authoring/core/hooks/useRecentColors.d.ts.map +1 -0
- package/dist/authoring/core/labels/labels.d.cts +74 -97
- package/dist/authoring/core/labels/labels.d.ts +74 -97
- package/dist/authoring/core/labels/labels.d.ts.map +1 -1
- package/dist/authoring/core/utils/colorEditorModel.d.cts +18 -0
- package/dist/authoring/core/utils/colorEditorModel.d.ts +18 -0
- package/dist/authoring/core/utils/colorEditorModel.d.ts.map +1 -0
- package/dist/authoring/core/utils/colorOcclusion.d.cts +4 -20
- package/dist/authoring/core/utils/colorOcclusion.d.ts +4 -20
- package/dist/authoring/core/utils/colorOcclusion.d.ts.map +1 -1
- package/dist/authoring/core/utils/dimensionUtils.d.cts +0 -39
- package/dist/authoring/core/utils/dimensionUtils.d.ts +0 -39
- package/dist/authoring/core/utils/dimensionUtils.d.ts.map +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 +1 -1
- package/dist/authoring/web-component/index.d.cts +3 -1
- package/dist/authoring/web-component/index.d.ts +3 -1
- package/dist/authoring/web-component/index.d.ts.map +1 -1
- package/dist/authoring/web-component/index.js +290 -288
- package/dist/protocol/domAttributes.cjs +4 -0
- package/dist/protocol/domAttributes.d.cts +17 -0
- package/dist/protocol/domAttributes.d.ts +17 -0
- package/dist/protocol/domAttributes.d.ts.map +1 -1
- package/dist/protocol/domAttributes.js +4 -0
- package/dist/protocol/index.cjs +4 -0
- package/dist/protocol/index.js +6 -2
- package/dist/protocol/measuredStyleProperties.cjs +18 -0
- package/dist/protocol/measuredStyleProperties.d.cts +7 -0
- package/dist/protocol/measuredStyleProperties.d.ts +7 -0
- package/dist/protocol/measuredStyleProperties.d.ts.map +1 -1
- package/dist/protocol/measuredStyleProperties.js +18 -0
- package/dist/protocol/messageTypes.d.cts +27 -16
- package/dist/protocol/messageTypes.d.ts +27 -16
- 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 +198 -88
- package/dist/runtime/interactions/communicationManager.d.cts +2 -2
- package/dist/runtime/interactions/communicationManager.d.ts +2 -2
- package/dist/runtime/interactions/communicationManager.d.ts.map +1 -1
- package/dist/runtime/interactions/eventHandlers.d.cts +1 -1
- package/dist/runtime/interactions/eventHandlers.d.ts +1 -1
- package/dist/runtime/interactions/eventHandlers.d.ts.map +1 -1
- package/dist/runtime/interactions/interactionsController.d.cts +2 -0
- package/dist/runtime/interactions/interactionsController.d.ts +2 -0
- package/dist/runtime/interactions/interactionsController.d.ts.map +1 -1
- package/dist/runtime/interactions/propertyEditorCapabilities.d.cts +4 -0
- package/dist/runtime/interactions/propertyEditorCapabilities.d.ts +4 -0
- package/dist/runtime/interactions/propertyEditorCapabilities.d.ts.map +1 -0
- package/dist/runtime/interactions/utils/cssUtils.d.cts +3 -7
- package/dist/runtime/interactions/utils/cssUtils.d.ts +3 -7
- package/dist/runtime/interactions/utils/cssUtils.d.ts.map +1 -1
- package/dist/runtime/interactions/utils/sourceUtils.d.cts +1 -1
- package/dist/runtime/interactions/utils/sourceUtils.d.ts +1 -1
- package/dist/source-locator/react/babel/reactDesignTimeLocatorBabelPlugin.cjs +33 -0
- package/dist/source-locator/react/babel/reactDesignTimeLocatorBabelPlugin.d.ts.map +1 -1
- package/dist/source-locator/react/babel/reactDesignTimeLocatorBabelPlugin.js +34 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ComponentData, ComponentStyleValue, SourceLocation } from '../../protocol.cjs';
|
|
2
|
+
import { ComponentData, ComponentStyleValue, SourceLocation } from '../../protocol/index.cjs';
|
|
3
3
|
import { CmsSpace, CmsImage, CmsFolderItemsResult, CmsContentDetailResult, CmsThumbnailResult, ImageImportResult, LocalFilePreview } from './editors/ImageEditor.cjs';
|
|
4
4
|
import { ChangeSetEntry } from './history/changeSet.cjs';
|
|
5
5
|
import { ChangeContext } from './history/historyService.cjs';
|
|
6
6
|
import { PanelLabels } from './labels/labels.cjs';
|
|
7
7
|
export declare const IMAGE_SOURCE_EDITOR_LS_KEY = "designMode.imageSourceEditorEnabled";
|
|
8
8
|
/** Selected-component subset the panel renders. Mirrors the protocol payload. */
|
|
9
|
-
export type DesignPanelComponent = Pick<ComponentData, "name" | "tagName" | "debugSource" | "instanceIndex" | "hasNonEditableText" | "media">;
|
|
9
|
+
export type DesignPanelComponent = Pick<ComponentData, "name" | "tagName" | "debugSource" | "instanceIndex" | "instanceCount" | "hasNonEditableText" | "media" | "propertyEditorCapabilities">;
|
|
10
10
|
/** Per-property inline + computed style values pushed from the host. */
|
|
11
11
|
export type StylesEntryMap = Record<string, ComponentStyleValue>;
|
|
12
12
|
/** The selected element's source context, sent to the host's AI chat as context info. */
|
|
@@ -19,6 +19,8 @@ export interface OpenSourceFilePayload {
|
|
|
19
19
|
}
|
|
20
20
|
/** Props supplied by the host (surface adapter or `<design-mode-panel>` element). */
|
|
21
21
|
export interface DesignPropertyPanelProps {
|
|
22
|
+
/** Stable application identity for browser-persisted recent colors. Omit for memory-only history. */
|
|
23
|
+
applicationId?: string;
|
|
22
24
|
/** Selected component, or null when nothing is selected. */
|
|
23
25
|
component: DesignPanelComponent | null;
|
|
24
26
|
/** Inline + computed style values for the selected component. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ComponentData, ComponentStyleValue, SourceLocation } from '../../protocol.js';
|
|
2
|
+
import { ComponentData, ComponentStyleValue, SourceLocation } from '../../protocol/index.js';
|
|
3
3
|
import { CmsSpace, CmsImage, CmsFolderItemsResult, CmsContentDetailResult, CmsThumbnailResult, ImageImportResult, LocalFilePreview } from './editors/ImageEditor.js';
|
|
4
4
|
import { ChangeSetEntry } from './history/changeSet.js';
|
|
5
5
|
import { ChangeContext } from './history/historyService.js';
|
|
6
6
|
import { PanelLabels } from './labels/labels.js';
|
|
7
7
|
export declare const IMAGE_SOURCE_EDITOR_LS_KEY = "designMode.imageSourceEditorEnabled";
|
|
8
8
|
/** Selected-component subset the panel renders. Mirrors the protocol payload. */
|
|
9
|
-
export type DesignPanelComponent = Pick<ComponentData, "name" | "tagName" | "debugSource" | "instanceIndex" | "hasNonEditableText" | "media">;
|
|
9
|
+
export type DesignPanelComponent = Pick<ComponentData, "name" | "tagName" | "debugSource" | "instanceIndex" | "instanceCount" | "hasNonEditableText" | "media" | "propertyEditorCapabilities">;
|
|
10
10
|
/** Per-property inline + computed style values pushed from the host. */
|
|
11
11
|
export type StylesEntryMap = Record<string, ComponentStyleValue>;
|
|
12
12
|
/** The selected element's source context, sent to the host's AI chat as context info. */
|
|
@@ -19,6 +19,8 @@ export interface OpenSourceFilePayload {
|
|
|
19
19
|
}
|
|
20
20
|
/** Props supplied by the host (surface adapter or `<design-mode-panel>` element). */
|
|
21
21
|
export interface DesignPropertyPanelProps {
|
|
22
|
+
/** Stable application identity for browser-persisted recent colors. Omit for memory-only history. */
|
|
23
|
+
applicationId?: string;
|
|
22
24
|
/** Selected component, or null when nothing is selected. */
|
|
23
25
|
component: DesignPanelComponent | null;
|
|
24
26
|
/** Inline + computed style values for the selected component. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesignPropertyPanelRoot.d.ts","sourceRoot":"","sources":["../../../src/authoring/core/DesignPropertyPanelRoot.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DesignPropertyPanelRoot.d.ts","sourceRoot":"","sources":["../../../src/authoring/core/DesignPropertyPanelRoot.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAEX,aAAa,EACb,mBAAmB,EAEnB,cAAc,EACd,MAAM,gBAAgB,CAAC;AAMxB,OAAO,EAEN,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAEtB,KAAK,gBAAgB,EACrB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAoB,KAAK,cAAc,EAA0B,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAEN,KAAK,aAAa,EAElB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAwIlE,eAAO,MAAM,0BAA0B,wCAAwC,CAAC;AAoEhF,iFAAiF;AACjF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACtC,aAAa,EACX,MAAM,GACN,SAAS,GACT,aAAa,GACb,eAAe,GACf,eAAe,GACf,oBAAoB,GACpB,OAAO,GACP,4BAA4B,CAC9B,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,qBAAqB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,qFAAqF;AACrF,MAAM,WAAW,wBAAwB;IACxC,qGAAqG;IACrG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4DAA4D;IA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,GAAG,IAAI,CAAC;IACvF,OAAO,IAAI,OAAO,CAAC;IACnB,OAAO,IAAI,OAAO,CAAC;CACnB;AA0rBD,eAAO,MAAM,mBAAmB,4GAM9B,CAAC;AA8sBH;;;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"}
|
|
@@ -1,45 +1,31 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { PanelLabels } from '../labels/labels.cjs';
|
|
3
|
-
import {
|
|
2
|
+
import { BoxSides } from '../utils/dimensionUtils.cjs';
|
|
4
3
|
type BoxDimensionLabels = PanelLabels["editors"]["boxDimension"];
|
|
5
|
-
|
|
4
|
+
type Side = keyof BoxSides;
|
|
6
5
|
export type SideLabelKind = "sides" | "corners";
|
|
6
|
+
export declare function parseSides(value: string): BoxSides;
|
|
7
7
|
export interface BoxDimensionEditorProps {
|
|
8
|
-
/** Editor label displayed above the inputs */
|
|
9
8
|
label: string;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/**
|
|
9
|
+
/** Computed shorthand, including percentage/elliptical radii. Empty means measurements are unresolved. */
|
|
10
|
+
displayValue: string;
|
|
11
|
+
/** Independent computed longhands. Missing/unresolved sides stay blank; takes precedence over displayValue. */
|
|
12
|
+
displaySides?: Partial<Record<Side, string>>;
|
|
13
|
+
/** Changes identity when the host pushes a fresh measurement. */
|
|
14
|
+
measurement?: object;
|
|
15
|
+
/** Bumped to discard local drafts and reconcile, including unchanged measurements. */
|
|
16
|
+
resetVersion?: number;
|
|
17
|
+
/** Padding/margin use compact vertical/horizontal pairs when measured pairs match. */
|
|
18
|
+
paired?: boolean;
|
|
19
|
+
/** Collapse equal values to one input that edits all four corners. */
|
|
20
|
+
uniform?: boolean;
|
|
21
|
+
/** Only the intended side or pair, in pixels. Return false to retain a blocked draft. */
|
|
22
|
+
onSidesChange: (sides: Partial<Record<Side, string>>) => boolean | void;
|
|
15
23
|
id?: string;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/** Min/max/step constraints per unit */
|
|
19
|
-
constraints?: UnitConstraints;
|
|
20
|
-
/** Whether to allow "auto" value */
|
|
21
|
-
allowAuto?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Which per-cell label set this instance edits — box `sides` (default) or
|
|
24
|
-
* `corners` (border-radius). Selects between the localized `aria.sides` and
|
|
25
|
-
* `aria.corners` slices; both are localized, so neither path hardcodes English.
|
|
26
|
-
*/
|
|
24
|
+
/** Permits negative numbers (margin). */
|
|
25
|
+
allowNegative?: boolean;
|
|
27
26
|
sideLabelKind?: SideLabelKind;
|
|
28
|
-
/** Optional icon components for each side */
|
|
29
|
-
sideIcons?: (React.ComponentType<{
|
|
30
|
-
size?: number;
|
|
31
|
-
width?: number;
|
|
32
|
-
height?: number;
|
|
33
|
-
}> | null | undefined)[];
|
|
34
|
-
/** Placeholder value for empty inputs */
|
|
35
|
-
placeholder?: string;
|
|
36
|
-
/** Localized side labels + link aria + composed-aria templates; omit for English. */
|
|
37
27
|
aria?: BoxDimensionLabels;
|
|
38
28
|
}
|
|
39
|
-
|
|
40
|
-
* Box-model dimension editor (4-sided) with shared unit selector and
|
|
41
|
-
* a link toggle to lock all four sides to the same value.
|
|
42
|
-
*/
|
|
43
|
-
export declare function BoxDimensionEditor({ label, value, onChange, id, units, constraints, allowAuto, sideLabelKind, sideIcons, placeholder, aria: ariaProp, }: BoxDimensionEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function BoxDimensionEditor({ label, displayValue, displaySides, measurement, resetVersion, paired, uniform, onSidesChange, id: idProp, allowNegative, sideLabelKind, aria: ariaProp, }: BoxDimensionEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
44
30
|
export {};
|
|
45
31
|
//# sourceMappingURL=BoxDimensionEditor.d.ts.map
|
|
@@ -1,45 +1,31 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { PanelLabels } from '../labels/labels.js';
|
|
3
|
-
import {
|
|
2
|
+
import { BoxSides } from '../utils/dimensionUtils.js';
|
|
4
3
|
type BoxDimensionLabels = PanelLabels["editors"]["boxDimension"];
|
|
5
|
-
|
|
4
|
+
type Side = keyof BoxSides;
|
|
6
5
|
export type SideLabelKind = "sides" | "corners";
|
|
6
|
+
export declare function parseSides(value: string): BoxSides;
|
|
7
7
|
export interface BoxDimensionEditorProps {
|
|
8
|
-
/** Editor label displayed above the inputs */
|
|
9
8
|
label: string;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/**
|
|
9
|
+
/** Computed shorthand, including percentage/elliptical radii. Empty means measurements are unresolved. */
|
|
10
|
+
displayValue: string;
|
|
11
|
+
/** Independent computed longhands. Missing/unresolved sides stay blank; takes precedence over displayValue. */
|
|
12
|
+
displaySides?: Partial<Record<Side, string>>;
|
|
13
|
+
/** Changes identity when the host pushes a fresh measurement. */
|
|
14
|
+
measurement?: object;
|
|
15
|
+
/** Bumped to discard local drafts and reconcile, including unchanged measurements. */
|
|
16
|
+
resetVersion?: number;
|
|
17
|
+
/** Padding/margin use compact vertical/horizontal pairs when measured pairs match. */
|
|
18
|
+
paired?: boolean;
|
|
19
|
+
/** Collapse equal values to one input that edits all four corners. */
|
|
20
|
+
uniform?: boolean;
|
|
21
|
+
/** Only the intended side or pair, in pixels. Return false to retain a blocked draft. */
|
|
22
|
+
onSidesChange: (sides: Partial<Record<Side, string>>) => boolean | void;
|
|
15
23
|
id?: string;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/** Min/max/step constraints per unit */
|
|
19
|
-
constraints?: UnitConstraints;
|
|
20
|
-
/** Whether to allow "auto" value */
|
|
21
|
-
allowAuto?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Which per-cell label set this instance edits — box `sides` (default) or
|
|
24
|
-
* `corners` (border-radius). Selects between the localized `aria.sides` and
|
|
25
|
-
* `aria.corners` slices; both are localized, so neither path hardcodes English.
|
|
26
|
-
*/
|
|
24
|
+
/** Permits negative numbers (margin). */
|
|
25
|
+
allowNegative?: boolean;
|
|
27
26
|
sideLabelKind?: SideLabelKind;
|
|
28
|
-
/** Optional icon components for each side */
|
|
29
|
-
sideIcons?: (React.ComponentType<{
|
|
30
|
-
size?: number;
|
|
31
|
-
width?: number;
|
|
32
|
-
height?: number;
|
|
33
|
-
}> | null | undefined)[];
|
|
34
|
-
/** Placeholder value for empty inputs */
|
|
35
|
-
placeholder?: string;
|
|
36
|
-
/** Localized side labels + link aria + composed-aria templates; omit for English. */
|
|
37
27
|
aria?: BoxDimensionLabels;
|
|
38
28
|
}
|
|
39
|
-
|
|
40
|
-
* Box-model dimension editor (4-sided) with shared unit selector and
|
|
41
|
-
* a link toggle to lock all four sides to the same value.
|
|
42
|
-
*/
|
|
43
|
-
export declare function BoxDimensionEditor({ label, value, onChange, id, units, constraints, allowAuto, sideLabelKind, sideIcons, placeholder, aria: ariaProp, }: BoxDimensionEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function BoxDimensionEditor({ label, displayValue, displaySides, measurement, resetVersion, paired, uniform, onSidesChange, id: idProp, allowNegative, sideLabelKind, aria: ariaProp, }: BoxDimensionEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
44
30
|
export {};
|
|
45
31
|
//# sourceMappingURL=BoxDimensionEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxDimensionEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/BoxDimensionEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoxDimensionEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/BoxDimensionEditor.tsx"],"names":[],"mappings":"AASA,OAAO,EAA8B,KAAK,WAAW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ACd,EAAE,uBAAuB,2CAsSzB"}
|
|
@@ -3,8 +3,11 @@ export declare function computePopoverPosition(buttonEl: HTMLElement, popoverHei
|
|
|
3
3
|
top: number;
|
|
4
4
|
left: number;
|
|
5
5
|
};
|
|
6
|
-
type ColorAriaLabels = PanelLabels["editors"]["color"];
|
|
7
6
|
export interface ColorEditorProps {
|
|
7
|
+
/** Shared application palette, newest first, containing exact CSS declarations. */
|
|
8
|
+
recentColors?: string[];
|
|
9
|
+
/** Records the final applied color when the picker closes or focus leaves the editor. */
|
|
10
|
+
onColorApplied?: (declaration: string) => void;
|
|
8
11
|
/** Editor label displayed above the control */
|
|
9
12
|
label: string;
|
|
10
13
|
/** Current color value (hex, rgba, oklch, oklab, lch, lab, or hsl string) */
|
|
@@ -14,7 +17,7 @@ export interface ColorEditorProps {
|
|
|
14
17
|
/** DOM id for the editor (defaults to 'color') */
|
|
15
18
|
id?: string;
|
|
16
19
|
/** Localized placeholder + static/composed aria; omit for English. */
|
|
17
|
-
aria?:
|
|
20
|
+
aria?: PanelLabels["editors"]["color"];
|
|
18
21
|
/**
|
|
19
22
|
* The image layer competing with this editor's color, whichever one applies:
|
|
20
23
|
* `background-image` for Background Color, `border-image-source` for Border
|
|
@@ -27,10 +30,8 @@ export interface ColorEditorProps {
|
|
|
27
30
|
* `computeColorOcclusionClears`).
|
|
28
31
|
*/
|
|
29
32
|
backgroundImage?: string;
|
|
33
|
+
/** Refresh drafts after undo, reset, or successful Save, even when the value is unchanged. */
|
|
34
|
+
resetVersion?: number;
|
|
30
35
|
}
|
|
31
|
-
|
|
32
|
-
* Color editor with popover picker and hex/rgba inputs.
|
|
33
|
-
*/
|
|
34
|
-
export declare function ColorEditor({ label, value, onChange, id, aria: ariaProp, backgroundImage, }: ColorEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export {};
|
|
36
|
+
export declare function ColorEditor({ label, value, onChange, id, aria: ariaProp, backgroundImage, resetVersion, recentColors, onColorApplied, }: ColorEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
36
37
|
//# sourceMappingURL=ColorEditor.d.ts.map
|
|
@@ -3,8 +3,11 @@ export declare function computePopoverPosition(buttonEl: HTMLElement, popoverHei
|
|
|
3
3
|
top: number;
|
|
4
4
|
left: number;
|
|
5
5
|
};
|
|
6
|
-
type ColorAriaLabels = PanelLabels["editors"]["color"];
|
|
7
6
|
export interface ColorEditorProps {
|
|
7
|
+
/** Shared application palette, newest first, containing exact CSS declarations. */
|
|
8
|
+
recentColors?: string[];
|
|
9
|
+
/** Records the final applied color when the picker closes or focus leaves the editor. */
|
|
10
|
+
onColorApplied?: (declaration: string) => void;
|
|
8
11
|
/** Editor label displayed above the control */
|
|
9
12
|
label: string;
|
|
10
13
|
/** Current color value (hex, rgba, oklch, oklab, lch, lab, or hsl string) */
|
|
@@ -14,7 +17,7 @@ export interface ColorEditorProps {
|
|
|
14
17
|
/** DOM id for the editor (defaults to 'color') */
|
|
15
18
|
id?: string;
|
|
16
19
|
/** Localized placeholder + static/composed aria; omit for English. */
|
|
17
|
-
aria?:
|
|
20
|
+
aria?: PanelLabels["editors"]["color"];
|
|
18
21
|
/**
|
|
19
22
|
* The image layer competing with this editor's color, whichever one applies:
|
|
20
23
|
* `background-image` for Background Color, `border-image-source` for Border
|
|
@@ -27,10 +30,8 @@ export interface ColorEditorProps {
|
|
|
27
30
|
* `computeColorOcclusionClears`).
|
|
28
31
|
*/
|
|
29
32
|
backgroundImage?: string;
|
|
33
|
+
/** Refresh drafts after undo, reset, or successful Save, even when the value is unchanged. */
|
|
34
|
+
resetVersion?: number;
|
|
30
35
|
}
|
|
31
|
-
|
|
32
|
-
* Color editor with popover picker and hex/rgba inputs.
|
|
33
|
-
*/
|
|
34
|
-
export declare function ColorEditor({ label, value, onChange, id, aria: ariaProp, backgroundImage, }: ColorEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export {};
|
|
36
|
+
export declare function ColorEditor({ label, value, onChange, id, aria: ariaProp, backgroundImage, resetVersion, recentColors, onColorApplied, }: ColorEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
36
37
|
//# sourceMappingURL=ColorEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/ColorEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ColorEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/ColorEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAmChF,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,WAAW,EACrB,aAAa,GAAE,MAAuB;;;EAoBtC;AA4JD,MAAM,WAAW,gBAAgB;IAChC,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yFAAyF;IACzF,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,IAAI,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;IACvC;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAC3B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,EAAY,EACZ,IAAI,EAAE,QAAQ,EACd,eAAe,EACf,YAAY,EACZ,YAAiB,EACjB,cAAc,GACd,EAAE,gBAAgB,2CAkVlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DimensionEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/DimensionEditor.tsx"],"names":[],"mappings":"AAUA,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EACN,KAAK,gBAAgB,EAMrB,MAAM,yBAAyB,CAAC;AAGjC,KAAK,mBAAmB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"DimensionEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/DimensionEditor.tsx"],"names":[],"mappings":"AAUA,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EACN,KAAK,gBAAgB,EAMrB,MAAM,yBAAyB,CAAC;AAGjC,KAAK,mBAAmB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC;AAsB/D,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC7D,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,sDAAsD;IACtD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC/B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,EAAgB,EAChB,IAAI,EAAE,QAAQ,EACd,IAAI,EACJ,IAAI,EAAE,IAAI,EACV,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,GACZ,EAAE,oBAAoB,2CA0StB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface FieldNoticeProps {
|
|
2
|
+
/** Id the field references with `aria-describedby`. */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Extra class(es), for the caller's layout or test hooks. */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** The message: one short sentence. */
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A yellow warning strip shown with a field: why it can't be edited, or what editing it
|
|
11
|
+
* will affect. Any editor can use it; the field points at it with `aria-describedby`.
|
|
12
|
+
*
|
|
13
|
+
* It is static text, not an alert, so screen readers read it when the field is focused
|
|
14
|
+
* rather than interrupting on every selection. The caller owns placement (margins).
|
|
15
|
+
*/
|
|
16
|
+
export declare function FieldNotice({ id, className, text }: FieldNoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=FieldNotice.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface FieldNoticeProps {
|
|
2
|
+
/** Id the field references with `aria-describedby`. */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Extra class(es), for the caller's layout or test hooks. */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** The message: one short sentence. */
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A yellow warning strip shown with a field: why it can't be edited, or what editing it
|
|
11
|
+
* will affect. Any editor can use it; the field points at it with `aria-describedby`.
|
|
12
|
+
*
|
|
13
|
+
* It is static text, not an alert, so screen readers read it when the field is focused
|
|
14
|
+
* rather than interrupting on every selection. The caller owns placement (margins).
|
|
15
|
+
*/
|
|
16
|
+
export declare function FieldNotice({ id, className, text }: FieldNoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=FieldNotice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldNotice.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/FieldNotice.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,gBAAgB;IAChC,uDAAuD;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CASpE"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PicklistOption } from './PicklistEditor.cjs';
|
|
2
|
-
|
|
3
|
-
type PicklistAriaLabels = PanelLabels["editors"]["picklist"];
|
|
2
|
+
export declare function isDefaultFontFamily(fontFamily: string | undefined): boolean;
|
|
4
3
|
export interface FontFamilyEditorProps {
|
|
5
4
|
label?: string;
|
|
6
5
|
/** The explicit inline override (element.style), or "" when unset. */
|
|
@@ -11,9 +10,8 @@ export interface FontFamilyEditorProps {
|
|
|
11
10
|
onChange: (value: string) => void;
|
|
12
11
|
matchOption?: (fontFamily: string | null | undefined, options: PicklistOption[]) => PicklistOption | null;
|
|
13
12
|
id?: string;
|
|
14
|
-
/** Localized
|
|
15
|
-
|
|
13
|
+
/** Localized editors.dimension.useInherit; omit for the English default. */
|
|
14
|
+
useInheritLabel?: string;
|
|
16
15
|
}
|
|
17
|
-
export declare function FontFamilyEditor({ label, value, computedValue, options, onChange, matchOption, id,
|
|
18
|
-
export {};
|
|
16
|
+
export declare function FontFamilyEditor({ label, value, computedValue, options, onChange, matchOption, id, useInheritLabel, }: FontFamilyEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
19
17
|
//# sourceMappingURL=FontFamilyEditor.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PicklistOption } from './PicklistEditor.js';
|
|
2
|
-
|
|
3
|
-
type PicklistAriaLabels = PanelLabels["editors"]["picklist"];
|
|
2
|
+
export declare function isDefaultFontFamily(fontFamily: string | undefined): boolean;
|
|
4
3
|
export interface FontFamilyEditorProps {
|
|
5
4
|
label?: string;
|
|
6
5
|
/** The explicit inline override (element.style), or "" when unset. */
|
|
@@ -11,9 +10,8 @@ export interface FontFamilyEditorProps {
|
|
|
11
10
|
onChange: (value: string) => void;
|
|
12
11
|
matchOption?: (fontFamily: string | null | undefined, options: PicklistOption[]) => PicklistOption | null;
|
|
13
12
|
id?: string;
|
|
14
|
-
/** Localized
|
|
15
|
-
|
|
13
|
+
/** Localized editors.dimension.useInherit; omit for the English default. */
|
|
14
|
+
useInheritLabel?: string;
|
|
16
15
|
}
|
|
17
|
-
export declare function FontFamilyEditor({ label, value, computedValue, options, onChange, matchOption, id,
|
|
18
|
-
export {};
|
|
16
|
+
export declare function FontFamilyEditor({ label, value, computedValue, options, onChange, matchOption, id, useInheritLabel, }: FontFamilyEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
19
17
|
//# sourceMappingURL=FontFamilyEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontFamilyEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/FontFamilyEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"FontFamilyEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/FontFamilyEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiCvE,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE3E;AAKD,MAAM,WAAW,qBAAqB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CACb,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACrC,OAAO,EAAE,cAAc,EAAE,KACrB,cAAc,GAAG,IAAI,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,EAChC,KAAqB,EACrB,KAAK,EACL,aAAa,EACb,OAAO,EACP,QAAQ,EACR,WAAmC,EACnC,EAAkB,EAClB,eAA6B,GAC7B,EAAE,qBAAqB,2CAoCvB"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { PicklistOption } from './PicklistEditor.cjs';
|
|
2
2
|
import { PanelLabels } from '../labels/labels.cjs';
|
|
3
3
|
type FontWeightOptionLabels = PanelLabels["editors"]["fontWeight"]["options"];
|
|
4
|
-
type PicklistAriaLabels = PanelLabels["editors"]["picklist"];
|
|
5
4
|
export interface FontWeightEditorProps {
|
|
6
5
|
label?: string;
|
|
7
6
|
/** The explicit inline override (element.style), or "" when unset. */
|
|
8
7
|
value?: string;
|
|
9
8
|
/** The effective computed weight (after cascade/inheritance). */
|
|
10
9
|
computedValue?: string;
|
|
10
|
+
/** Effective family; built-in system choices offer only curated regular/bold weights. */
|
|
11
|
+
fontFamily?: string;
|
|
11
12
|
options?: PicklistOption[];
|
|
12
13
|
onChange: (value: string) => void;
|
|
13
14
|
matchOption?: (weight: string | null | undefined, options: PicklistOption[]) => PicklistOption | null;
|
|
14
15
|
id?: string;
|
|
15
|
-
/** Localized
|
|
16
|
+
/** Localized editors.dimension.useInherit; omit for the English default. */
|
|
17
|
+
useInheritLabel?: string;
|
|
18
|
+
/** Localized weight words; omit for English. */
|
|
16
19
|
optionLabels?: FontWeightOptionLabels;
|
|
17
|
-
/** Localized picklist aria (reset control); omit for the English default. */
|
|
18
|
-
aria?: PicklistAriaLabels;
|
|
19
20
|
}
|
|
20
|
-
export declare function FontWeightEditor({ label, value, computedValue, options, onChange, matchOption, id,
|
|
21
|
+
export declare function FontWeightEditor({ label, value, computedValue, fontFamily, options, onChange, matchOption, id, useInheritLabel, optionLabels, }: FontWeightEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export {};
|
|
22
23
|
//# sourceMappingURL=FontWeightEditor.d.ts.map
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { PicklistOption } from './PicklistEditor.js';
|
|
2
2
|
import { PanelLabels } from '../labels/labels.js';
|
|
3
3
|
type FontWeightOptionLabels = PanelLabels["editors"]["fontWeight"]["options"];
|
|
4
|
-
type PicklistAriaLabels = PanelLabels["editors"]["picklist"];
|
|
5
4
|
export interface FontWeightEditorProps {
|
|
6
5
|
label?: string;
|
|
7
6
|
/** The explicit inline override (element.style), or "" when unset. */
|
|
8
7
|
value?: string;
|
|
9
8
|
/** The effective computed weight (after cascade/inheritance). */
|
|
10
9
|
computedValue?: string;
|
|
10
|
+
/** Effective family; built-in system choices offer only curated regular/bold weights. */
|
|
11
|
+
fontFamily?: string;
|
|
11
12
|
options?: PicklistOption[];
|
|
12
13
|
onChange: (value: string) => void;
|
|
13
14
|
matchOption?: (weight: string | null | undefined, options: PicklistOption[]) => PicklistOption | null;
|
|
14
15
|
id?: string;
|
|
15
|
-
/** Localized
|
|
16
|
+
/** Localized editors.dimension.useInherit; omit for the English default. */
|
|
17
|
+
useInheritLabel?: string;
|
|
18
|
+
/** Localized weight words; omit for English. */
|
|
16
19
|
optionLabels?: FontWeightOptionLabels;
|
|
17
|
-
/** Localized picklist aria (reset control); omit for the English default. */
|
|
18
|
-
aria?: PicklistAriaLabels;
|
|
19
20
|
}
|
|
20
|
-
export declare function FontWeightEditor({ label, value, computedValue, options, onChange, matchOption, id,
|
|
21
|
+
export declare function FontWeightEditor({ label, value, computedValue, fontFamily, options, onChange, matchOption, id, useInheritLabel, optionLabels, }: FontWeightEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export {};
|
|
22
23
|
//# sourceMappingURL=FontWeightEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontWeightEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/FontWeightEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FontWeightEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/FontWeightEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,KAAK,sBAAsB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;AAoC9E,MAAM,WAAW,qBAAqB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CACb,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,OAAO,EAAE,cAAc,EAAE,KACrB,cAAc,GAAG,IAAI,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED,wBAAgB,gBAAgB,CAAC,EAChC,KAAqB,EACrB,KAAK,EACL,aAAa,EACb,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAA+B,EAC/B,EAAkB,EAClB,eAA6B,EAC7B,YAAY,GACZ,EAAE,qBAAqB,2CAyBvB"}
|
|
@@ -24,6 +24,12 @@ export interface CmsImage {
|
|
|
24
24
|
export interface ImageAttributes {
|
|
25
25
|
alt: string;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Why an image attribute can't be edited: `from-data` when source binds it to
|
|
29
|
+
* data (props, state, fetched records, `.map()` items), `not-editable` when its
|
|
30
|
+
* source kind is unknown to the panel.
|
|
31
|
+
*/
|
|
32
|
+
export type ImageReadOnlyReason = "from-data" | "not-editable";
|
|
27
33
|
/**
|
|
28
34
|
* A page of CMS folder items pushed from the host in response to
|
|
29
35
|
* {@link ImageEditorProps.onFetchCmsFolderItems}. The picker replaces its grid
|
|
@@ -68,6 +74,19 @@ export interface ImageEditorProps {
|
|
|
68
74
|
attributes?: ImageAttributes;
|
|
69
75
|
/** Apply a non-`src` attribute change (alt). */
|
|
70
76
|
onAttributeChange?: (attribute: keyof ImageAttributes, value: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Why `src` can't be edited. When set, the editor shows the current image and
|
|
79
|
+
* the reason in place of the clear button and the source tabs.
|
|
80
|
+
*/
|
|
81
|
+
sourceReadOnly?: ImageReadOnlyReason;
|
|
82
|
+
/** Why `alt` can't be edited. When set, the alt field is disabled and shows the reason. */
|
|
83
|
+
altReadOnly?: ImageReadOnlyReason;
|
|
84
|
+
/**
|
|
85
|
+
* How many elements on the page render from this image's source location. Above
|
|
86
|
+
* 1, each editable field notes that a change applies to all of them, since the
|
|
87
|
+
* edit rewrites the one source they share (e.g. a literal inside a `.map()`).
|
|
88
|
+
*/
|
|
89
|
+
sharedCount?: number;
|
|
71
90
|
/** Available CMS workspaces, pushed from the host after {@link onFetchCmsSpaces}. */
|
|
72
91
|
cmsSpaces?: CmsSpace[];
|
|
73
92
|
/** Whether a workspace fetch is in flight. */
|
|
@@ -106,7 +125,8 @@ export interface ImageEditorProps {
|
|
|
106
125
|
* direct URL, plus edit alt. All host I/O (CMS fetches, local file
|
|
107
126
|
* picking, importing) is supplied via optional callback + data props so the
|
|
108
127
|
* shared panel stays host-agnostic; absent callbacks make that action inert.
|
|
128
|
+
* A `src` or `alt` the host marks read-only stays visible but can't be changed.
|
|
109
129
|
*/
|
|
110
|
-
export declare function ImageEditor({ label, value, onChange, id, attributes, onAttributeChange, cmsSpaces, cmsSpacesLoading, onFetchCmsSpaces, cmsFolderItemsResult, onFetchCmsFolderItems, cmsContentDetail, onFetchCmsContentDetail, cmsThumbnailResult, onFetchCmsThumbnail, onImportCmsImage, cmsImportResult, onPickLocalFile, localPreview, imageLabels, }: ImageEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
130
|
+
export declare function ImageEditor({ label, value, onChange, id, attributes, onAttributeChange, sourceReadOnly, altReadOnly, sharedCount, cmsSpaces, cmsSpacesLoading, onFetchCmsSpaces, cmsFolderItemsResult, onFetchCmsFolderItems, cmsContentDetail, onFetchCmsContentDetail, cmsThumbnailResult, onFetchCmsThumbnail, onImportCmsImage, cmsImportResult, onPickLocalFile, localPreview, imageLabels, }: ImageEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
111
131
|
export {};
|
|
112
132
|
//# sourceMappingURL=ImageEditor.d.ts.map
|
|
@@ -24,6 +24,12 @@ export interface CmsImage {
|
|
|
24
24
|
export interface ImageAttributes {
|
|
25
25
|
alt: string;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Why an image attribute can't be edited: `from-data` when source binds it to
|
|
29
|
+
* data (props, state, fetched records, `.map()` items), `not-editable` when its
|
|
30
|
+
* source kind is unknown to the panel.
|
|
31
|
+
*/
|
|
32
|
+
export type ImageReadOnlyReason = "from-data" | "not-editable";
|
|
27
33
|
/**
|
|
28
34
|
* A page of CMS folder items pushed from the host in response to
|
|
29
35
|
* {@link ImageEditorProps.onFetchCmsFolderItems}. The picker replaces its grid
|
|
@@ -68,6 +74,19 @@ export interface ImageEditorProps {
|
|
|
68
74
|
attributes?: ImageAttributes;
|
|
69
75
|
/** Apply a non-`src` attribute change (alt). */
|
|
70
76
|
onAttributeChange?: (attribute: keyof ImageAttributes, value: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Why `src` can't be edited. When set, the editor shows the current image and
|
|
79
|
+
* the reason in place of the clear button and the source tabs.
|
|
80
|
+
*/
|
|
81
|
+
sourceReadOnly?: ImageReadOnlyReason;
|
|
82
|
+
/** Why `alt` can't be edited. When set, the alt field is disabled and shows the reason. */
|
|
83
|
+
altReadOnly?: ImageReadOnlyReason;
|
|
84
|
+
/**
|
|
85
|
+
* How many elements on the page render from this image's source location. Above
|
|
86
|
+
* 1, each editable field notes that a change applies to all of them, since the
|
|
87
|
+
* edit rewrites the one source they share (e.g. a literal inside a `.map()`).
|
|
88
|
+
*/
|
|
89
|
+
sharedCount?: number;
|
|
71
90
|
/** Available CMS workspaces, pushed from the host after {@link onFetchCmsSpaces}. */
|
|
72
91
|
cmsSpaces?: CmsSpace[];
|
|
73
92
|
/** Whether a workspace fetch is in flight. */
|
|
@@ -106,7 +125,8 @@ export interface ImageEditorProps {
|
|
|
106
125
|
* direct URL, plus edit alt. All host I/O (CMS fetches, local file
|
|
107
126
|
* picking, importing) is supplied via optional callback + data props so the
|
|
108
127
|
* shared panel stays host-agnostic; absent callbacks make that action inert.
|
|
128
|
+
* A `src` or `alt` the host marks read-only stays visible but can't be changed.
|
|
109
129
|
*/
|
|
110
|
-
export declare function ImageEditor({ label, value, onChange, id, attributes, onAttributeChange, cmsSpaces, cmsSpacesLoading, onFetchCmsSpaces, cmsFolderItemsResult, onFetchCmsFolderItems, cmsContentDetail, onFetchCmsContentDetail, cmsThumbnailResult, onFetchCmsThumbnail, onImportCmsImage, cmsImportResult, onPickLocalFile, localPreview, imageLabels, }: ImageEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
130
|
+
export declare function ImageEditor({ label, value, onChange, id, attributes, onAttributeChange, sourceReadOnly, altReadOnly, sharedCount, cmsSpaces, cmsSpacesLoading, onFetchCmsSpaces, cmsFolderItemsResult, onFetchCmsFolderItems, cmsContentDetail, onFetchCmsContentDetail, cmsThumbnailResult, onFetchCmsThumbnail, onImportCmsImage, cmsImportResult, onPickLocalFile, localPreview, imageLabels, }: ImageEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
111
131
|
export {};
|
|
112
132
|
//# sourceMappingURL=ImageEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/ImageEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImageEditor.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/editors/ImageEditor.tsx"],"names":[],"mappings":"AAUA,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEhF,0FAA0F;AAC1F,KAAK,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;AAwCnD,MAAM,WAAW,QAAQ;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,OAA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