@spiffcommerce/core 0.10.125 → 0.10.127
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/main.js +2 -2
- package/dist/module.js +2 -2
- package/dist/types.d.ts +32 -13
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1037,6 +1037,14 @@ export interface AdvancedEditorState extends UIState {
|
|
|
1037
1037
|
* The current zoom level of the editor.
|
|
1038
1038
|
*/
|
|
1039
1039
|
zoom: number;
|
|
1040
|
+
/**
|
|
1041
|
+
* The current x translation of the transform for the canvas.
|
|
1042
|
+
*/
|
|
1043
|
+
xTranslation: number;
|
|
1044
|
+
/**
|
|
1045
|
+
* The current y translation of the transform for the canvas.
|
|
1046
|
+
*/
|
|
1047
|
+
yTranslation: number;
|
|
1040
1048
|
/**
|
|
1041
1049
|
* The maxiumum zoom possible based on current canvas content.
|
|
1042
1050
|
*/
|
|
@@ -1067,18 +1075,7 @@ export interface AdvancedEditorState extends UIState {
|
|
|
1067
1075
|
*/
|
|
1068
1076
|
scrolledMovement: boolean;
|
|
1069
1077
|
}
|
|
1070
|
-
export const getDefaultState: (getLayouts: LayoutsGetter, defaultZoom: number) =>
|
|
1071
|
-
layoutId: string;
|
|
1072
|
-
selectedElement: undefined;
|
|
1073
|
-
zoom: number;
|
|
1074
|
-
maxZoom: number;
|
|
1075
|
-
units: _UnitOfMeasurement1;
|
|
1076
|
-
subMenu: EditorSubMenu;
|
|
1077
|
-
activeModifierKeys: never[];
|
|
1078
|
-
metaPressed: boolean;
|
|
1079
|
-
elementEvent: undefined;
|
|
1080
|
-
scrolledMovement: boolean;
|
|
1081
|
-
};
|
|
1078
|
+
export const getDefaultState: (getLayouts: LayoutsGetter, defaultZoom: number) => AdvancedEditorState;
|
|
1082
1079
|
export const commandReducer: (state: AdvancedEditorState, command: UICommand) => AdvancedEditorState;
|
|
1083
1080
|
export const AdvancedEditorContext: import("react").Context<{
|
|
1084
1081
|
uiDispatcher: Dispatch<UICommand>;
|
|
@@ -1094,6 +1091,8 @@ export class UICommand {
|
|
|
1094
1091
|
layoutId: string;
|
|
1095
1092
|
selectedElement?: string | undefined;
|
|
1096
1093
|
zoom: number;
|
|
1094
|
+
xTranslation: number;
|
|
1095
|
+
yTranslation: number;
|
|
1097
1096
|
maxZoom: number;
|
|
1098
1097
|
units: _UnitOfMeasurement1;
|
|
1099
1098
|
subMenu: EditorSubMenu;
|
|
@@ -1125,7 +1124,7 @@ export const useEditorInteraction: (editorRef: RefObject<SVGRectElement>, intera
|
|
|
1125
1124
|
handleScroll: () => void;
|
|
1126
1125
|
handleSequenceStart: () => void;
|
|
1127
1126
|
};
|
|
1128
|
-
export const useShortcutCombination: (shortcutKeys: string[],
|
|
1127
|
+
export const useShortcutCombination: (shortcutKeys: string[], onCombinationPressed: () => void, onCombinationReleased?: () => void) => void;
|
|
1129
1128
|
export const EditorCore: FunctionComponent<{
|
|
1130
1129
|
isMobile: boolean;
|
|
1131
1130
|
color?: string;
|
|
@@ -1312,6 +1311,25 @@ export class QuestionStepHandle extends StepHandle<_QuestionStepData1> {
|
|
|
1312
1311
|
*/
|
|
1313
1312
|
getDisplayType(): string | undefined;
|
|
1314
1313
|
}
|
|
1314
|
+
export class ShapeStepHandle extends StepHandle<_ShapeStepData1> {
|
|
1315
|
+
constructor(manager: WorkflowManager, step: _Step1<_ShapeStepData1>);
|
|
1316
|
+
selectVariant(_: _VariantResource1): Promise<void>;
|
|
1317
|
+
/**
|
|
1318
|
+
* Sets the color of the shape.
|
|
1319
|
+
* @param color The color option to use.
|
|
1320
|
+
* @returns A promise resolving when the color has changed in the design.
|
|
1321
|
+
*/
|
|
1322
|
+
setColor(color: ColorOption): Promise<void>;
|
|
1323
|
+
/**
|
|
1324
|
+
* Get available colors for the shape.
|
|
1325
|
+
* @returns A list of color definitions that are currently applied to the illustration.
|
|
1326
|
+
*/
|
|
1327
|
+
getColors(): Promise<{
|
|
1328
|
+
fill: string | undefined;
|
|
1329
|
+
stroke: string | undefined;
|
|
1330
|
+
variant: _VariantResource1;
|
|
1331
|
+
}[]>;
|
|
1332
|
+
}
|
|
1315
1333
|
interface TextChangeResult {
|
|
1316
1334
|
input: string;
|
|
1317
1335
|
helperText?: string;
|
|
@@ -1601,6 +1619,7 @@ export class FrameStepHandle extends StepHandle<_FrameStepData1> {
|
|
|
1601
1619
|
hasVaryingUpload(): boolean | undefined;
|
|
1602
1620
|
hasVaryingSelection(): boolean | undefined;
|
|
1603
1621
|
}
|
|
1622
|
+
export default TransformWrapper;
|
|
1604
1623
|
export { CommandContext };
|
|
1605
1624
|
export { AssetType, BringForwardCommand, CanvasCommand, CreateElementCommand, CreateLayoutCommand, DeleteElementCommand, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, GroupCommand, LayoutElementFactory, LayoutElementType, MoveCommand, ResizeCommand, RotateCommand, SendBackwardsCommand, StepAspectType, StepType, TextChangeCommand, UnitOfMeasurement, dataUrlFromExternalUrl, findElement, frameDataCache, generate, generateSVGWithUnknownColors, getAttributesFromArrayBuffer, rehydrateSerializedLayout, getFrameData, getSvgString, loadFontFromDataUrl, loadFontFromExternalUrl, determineCorrectFontSizeAndLines, patternImageDataCache, registerJSDOM };
|
|
1606
1625
|
export { Animatable, AnyStepData, Asset, BulkStepData, ColorProfileProps, ColorDefinition, CommandState, WorkflowPanel, DigitalContentStepData, FrameElement, FrameStepData, ILayout, IllustrationElement, IllustrationStepData, ImageElement, LayoutData, LayoutElement, LayoutsState, MaterialStepData, ModelStepData, ModuleStepData, OptionResource, PictureStepData, QuestionStepData, ShapeStepData, Step, StepAspect, StepStorage, TextStepData, TextboxElement, VariantResource, Workflow };
|