@spiffcommerce/core 0.10.177 → 0.10.179

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/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Workflow as _Workflow1, StepAspect as _StepAspect1, Step as _Step1, AnyStepData as _AnyStepData1, Asset as _Asset1, Region, VariantResource as _VariantResource1, FrameOffsets, PatternImageData, DigitalContentStepData as _DigitalContentStepData1, LayoutsState as _LayoutsState1, CanvasCommand as _CanvasCommand1, IServerModel, MaterialResource, AssetType as _AssetType1, FrameStepData as _FrameStepData1, ILayout as _ILayout1, CreateElementCommand as _CreateElementCommand1, FrameElement as _FrameElement1, ColorDefinition as _ColorDefinition1, IllustrationStepData as _IllustrationStepData1, IllustrationElement as _IllustrationElement1, LayoutData as _LayoutData1, MaterialStepData as _MaterialStepData1, ModelStepData as _ModelStepData1, ModuleStepData as _ModuleStepData1, PictureStepData as _PictureStepData1, QuestionStepData as _QuestionStepData1, ShapeStepData as _ShapeStepData1, FontData, GroupCommand as _GroupCommand1, OptionResource as _OptionResource1, TextboxElement as _TextboxElement1, TextStepData as _TextStepData1, StepStorage as _StepStorage1, SerializableStep, CommandState as _CommandState1, CommandContext as _CommandContext1, LayoutState, Point, ScaleAxis, UnitOfMeasurement as _UnitOfMeasurement1, StepType as _StepType1, BulkStepData as _BulkStepData1, StepGroup, FrameData as _FrameData1, Animatable, AnyStepData, Asset, AssetType, BringForwardCommand, BulkStepData, CanvasCommand, ColorDefinition, CommandContext, CommandState, CreateElementCommand, DeleteElementCommand, DigitalContentStepData, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, FrameElement, FrameStepData, GroupCommand, ILayout, IllustrationElement, IllustrationStepData, ImageElement, LayoutData, LayoutElement, LayoutElementFactory, LayoutElementType, LayoutsState, MaterialStepData, ModelStepData, ModuleStepData, MoveCommand, OptionResource, PictureStepData, QuestionStepData, ResizeCommand, RotateCommand, SendBackwardsCommand, ShapeStepData, Step, StepAspect, StepAspectType, StepStorage, StepType, TextChangeCommand, TextStepData, TextboxElement, UnitOfMeasurement, VariantResource, Workflow, dataUrlFromExternalUrl, findElement, frameDataCache, generate, generateSVGWithUnknownColors, getAttributesFromArrayBuffer, getFrameData, getSvgElement, loadFontFromDataUrl, loadFontFromExternalUrl, patternImageDataCache, CreateLayoutCommand, rehydrateSerializedLayout, ColorProfileProps, WorkflowPanel, determineCorrectFontSizeAndLines, registerJSDOM, getAxisAlignedBoundingBox } from "@spiffcommerce/papyrus";
1
+ import { Workflow as _Workflow1, StepAspect as _StepAspect1, Step as _Step1, AnyStepData as _AnyStepData1, Asset as _Asset1, Region, VariantResource as _VariantResource1, FrameOffsets, PatternImageData, DigitalContentStepData as _DigitalContentStepData1, LayoutsState as _LayoutsState1, CanvasCommand as _CanvasCommand1, IServerModel, MaterialResource, AssetType as _AssetType1, FrameStepData as _FrameStepData1, ILayout as _ILayout1, CreateElementCommand as _CreateElementCommand1, FrameElement as _FrameElement1, ColorDefinition as _ColorDefinition1, IllustrationStepData as _IllustrationStepData1, IllustrationElement as _IllustrationElement1, LayoutData as _LayoutData1, MaterialStepData as _MaterialStepData1, ModelStepData as _ModelStepData1, ModuleStepData as _ModuleStepData1, PictureStepData as _PictureStepData1, QuestionStepData as _QuestionStepData1, ShapeStepData as _ShapeStepData1, FontData, GroupCommand as _GroupCommand1, OptionResource as _OptionResource1, TextboxElement as _TextboxElement1, TextStepData as _TextStepData1, StepStorage as _StepStorage1, SerializableStep, CommandState as _CommandState1, CommandContext as _CommandContext1, LayoutState, Point, ScaleAxis, UnitOfMeasurement as _UnitOfMeasurement1, StepType as _StepType1, BulkStepData as _BulkStepData1, StepGroup, FrameData as _FrameData1, Animatable, AnyStepData, Asset, AssetType, BringForwardCommand, BulkStepData, CanvasCommand, ColorDefinition, CommandContext, CommandState, CreateElementCommand, DeleteElementCommand, DigitalContentStepData, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, FrameElement, FrameStepData, GroupCommand, ILayout, IllustrationElement, IllustrationStepData, ImageElement, LayoutData, LayoutElement, LayoutElementFactory, LayoutElementType, LayoutsState, MaterialStepData, ModelStepData, ModuleStepData, MoveCommand, OptionResource, PictureStepData, QuestionStepData, ResizeCommand, RotateCommand, SendBackwardsCommand, ShapeStepData, Step, StepAspect, StepAspectType, StepStorage, StepType, TextChangeCommand, TextStepData, TextboxElement, UnitOfMeasurement, VariantResource, Workflow, dataUrlFromExternalUrl, findElement, frameDataCache, generate, generateSVGWithUnknownColors, getAttributesFromArrayBuffer, getFrameData, getSvgString, loadFontFromDataUrl, loadFontFromExternalUrl, patternImageDataCache, CreateLayoutCommand, rehydrateSerializedLayout, ColorProfileProps, WorkflowPanel, determineCorrectFontSizeAndLines, registerJSDOM, getAxisAlignedBoundingBox } from "@spiffcommerce/papyrus";
2
2
  import { ApolloClient } from "@apollo/client";
3
3
  import React, { ReactNode, Dispatch, FunctionComponent, RefObject, PointerEvent, KeyboardEvent } from "react";
4
4
  export const gatherVaryingStepAspects: (workflow: _Workflow1) => _StepAspect1[];
@@ -1136,13 +1136,6 @@ export const useEditorInteraction: (editorRef: RefObject<SVGRectElement>, intera
1136
1136
  handleSequenceStart: () => void;
1137
1137
  };
1138
1138
  export const useShortcutCombination: (shortcutKeys: string[], onCombinationPressed: () => void, onCombinationReleased?: () => void) => void;
1139
- export interface DesignInputStep {
1140
- data: DesignInputStepData;
1141
- name: string;
1142
- }
1143
- interface DesignInputStepData {
1144
- }
1145
- export const generateCommands: (designInputSteps: DesignInputStep[], workflow: _Workflow1, layouts: _ILayout1[], server: ServerService, productOverlayImageUrl?: string) => Promise<_CanvasCommand1[]>;
1146
1139
  export const EditorCore: FunctionComponent<{
1147
1140
  isMobile: boolean;
1148
1141
  color?: string;
@@ -1177,8 +1170,6 @@ export const EditorCore: FunctionComponent<{
1177
1170
  onSequenceStart: () => void;
1178
1171
  setElementEvent: (e: ElementEvent | undefined) => void;
1179
1172
  onElementSelected: (elementId: string | undefined, event: PointerEvent) => void;
1180
- variationRecord: null | VariationRecord;
1181
- workflow: _Workflow1;
1182
1173
  }>;
1183
1174
  /**
1184
1175
  * The advanced editor encapsulates the logic required to allow users to manipulate a design
@@ -1197,8 +1188,6 @@ export const AdvancedEditor: FunctionComponent<{
1197
1188
  onContextMenuHandlePointerDown?: (event: PointerEvent) => void;
1198
1189
  onElementSelected?: (id: string | undefined, element: PointerEvent) => void;
1199
1190
  onDragEnd?: () => void;
1200
- variationRecord: null | VariationRecord;
1201
- workflow: _Workflow1;
1202
1191
  }>;
1203
1192
  /**
1204
1193
  * A StepHandle allows for managing the state of a specific step in a workflow. This class
@@ -1525,6 +1514,7 @@ export interface WorkflowExperience {
1525
1514
  * Saves this experience to storage. This may be local or remote depending
1526
1515
  * on configuration.
1527
1516
  * @param title The title for the saved design.
1517
+ * @param thumbnail An optional thumbnail for the saved design. If none is provided this field will be saved blank.
1528
1518
  */
1529
1519
  save(title: string): Promise<SavedDesign>;
1530
1520
  /**
@@ -1545,6 +1535,13 @@ export interface WorkflowExperience {
1545
1535
  */
1546
1536
  onDesignFinished(product: Product, onProgressUpdate: DesignCreationProgressUpdate, selections: WorkflowSelections, metadata?: WorkflowMetadata | undefined): Promise<DesignCreationMessage>;
1547
1537
  }
1538
+ export interface DesignInputStep {
1539
+ data: DesignInputStepData;
1540
+ name: string;
1541
+ }
1542
+ interface DesignInputStepData {
1543
+ }
1544
+ export const generateCommands: (designInputSteps: DesignInputStep[], workflow: _Workflow1, layouts: _ILayout1[], server: ServerService, productOverlayImageUrl?: string) => Promise<_CanvasCommand1[]>;
1548
1545
  /**
1549
1546
  * Options that can be used during instantiation of the SpiffCommerce Javascript Client.
1550
1547
  * Please refer to the documentation for more information.
@@ -1698,7 +1695,7 @@ export class FrameStepHandle extends StepHandle<_FrameStepData1> {
1698
1695
  }
1699
1696
  export const TransformWrapper: React.FunctionComponent;
1700
1697
  export { CommandContext };
1701
- 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, getAxisAlignedBoundingBox, generateSVGWithUnknownColors, getAttributesFromArrayBuffer, rehydrateSerializedLayout, getFrameData, getSvgElement, loadFontFromDataUrl, loadFontFromExternalUrl, determineCorrectFontSizeAndLines, patternImageDataCache, registerJSDOM };
1698
+ 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, getAxisAlignedBoundingBox, generateSVGWithUnknownColors, getAttributesFromArrayBuffer, rehydrateSerializedLayout, getFrameData, getSvgString, loadFontFromDataUrl, loadFontFromExternalUrl, determineCorrectFontSizeAndLines, patternImageDataCache, registerJSDOM };
1702
1699
  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 };
1703
1700
 
1704
1701
  //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "0.10.177",
3
+ "version": "0.10.179",
4
4
  "description": "Core client API for interacting with the Spiff Commerce backend.",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -10,8 +10,7 @@
10
10
  "build": "parcel build",
11
11
  "dev": "ladle serve",
12
12
  "test": "tsc --noEmit --isolatedModules --skipLibCheck && jest",
13
- "prepare": "yarn run build",
14
- "lint": "npx eslint src"
13
+ "prepare": "yarn run build"
15
14
  },
16
15
  "targets": {
17
16
  "main": {
@@ -52,16 +51,11 @@
52
51
  "@types/qrcode": "^1.3.5",
53
52
  "@types/react": "^17.0.9",
54
53
  "@types/react-dom": "^17.0.9",
55
- "@typescript-eslint/eslint-plugin": "^5.43.0",
56
- "@typescript-eslint/parser": "^5.43.0",
57
54
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
58
55
  "agent-base": "^6.0.2",
59
56
  "assert": "^2.0.0",
60
57
  "buffer": "^6.0.3",
61
58
  "enzyme": "^3.11.0",
62
- "eslint": "^8.28.0",
63
- "eslint-plugin-react": "^7.31.11",
64
- "eslint-plugin-react-hooks": "^4.6.0",
65
59
  "events": "^3.3.0",
66
60
  "https-browserify": "^1.0.0",
67
61
  "husky": "^8.0.1",
@@ -85,7 +79,7 @@
85
79
  },
86
80
  "dependencies": {
87
81
  "@apollo/client": "^3.7.0",
88
- "@spiffcommerce/papyrus": "1.5.56",
82
+ "@spiffcommerce/papyrus": "^1.5.55",
89
83
  "canvg": "https://github.com/spiffdev/canvg.git#03bcd151b12441e88ecb552bb658356f5bbe92c4",
90
84
  "cross-fetch": "^3.1.5",
91
85
  "graphql": "^16.6.0",