@spiffcommerce/core 13.3.0 → 14.0.0-alpha.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/types.d.ts CHANGED
@@ -165,7 +165,13 @@ export class ParseError extends ImplementationError {
165
165
  */
166
166
  export function getBoundedOffsets(newOffsets: FrameOffsets, frameData: FrameData, imageData: PatternImageData, mustCover?: boolean): FrameOffsets;
167
167
  export class FrameService {
168
+ /**
169
+ * The calculated minimum zoom value. Note: This is calculated based on the first frame.
170
+ */
168
171
  minZoomScale: number;
172
+ /**
173
+ * The calculated maximum zoom value. Note: This is calculated based on the first frame.
174
+ */
169
175
  maxZoomScale: number;
170
176
  constructor(forceImageCover?: boolean);
171
177
  /**
@@ -185,12 +191,12 @@ export class FrameService {
185
191
  * Gets the current calculated frame data
186
192
  * @returns A FrameData object or undefined if no frame has been set.
187
193
  */
188
- getFrameData(): FrameData | undefined;
194
+ getFrameData(): FrameData[] | undefined;
189
195
  /**
190
- * Sets the current frame data
191
- * @param path The path to lookup in our frame data cache.
196
+ * Sets the current frame data. Note:
197
+ * @param paths The paths to lookup in our frame data cache.
192
198
  */
193
- setFrameData(path: string): Promise<void>;
199
+ setFrameData(paths: string[] | undefined): void;
194
200
  /**
195
201
  * Gets the currently set image of the frame..
196
202
  * @returns A PatternImageData object, or undefined if no image is set.
@@ -200,11 +206,11 @@ export class FrameService {
200
206
  * Gets the current calculated offsets of the pattern within the frame.
201
207
  * @returns A FrameOffsets object or undefined if no offsets are defined.
202
208
  */
203
- getOffsets(): FrameOffsets | undefined;
209
+ getOffsets(): FrameOffsets[] | undefined;
204
210
  /**
205
211
  * Updates the frame offsets explicitly.
206
212
  */
207
- setOffsets(offsets: FrameOffsets): void;
213
+ setOffsets(offsets: FrameOffsets[]): void;
208
214
  /**
209
215
  * Sets the zoom of the cropper that owns this service.
210
216
  * @param zoom The new zoom value.
@@ -220,11 +226,11 @@ export class FrameService {
220
226
  setPatternData(value: PatternImageData): void;
221
227
  /**
222
228
  * Modify the offsets of the frame.
223
- * @param value The new FrameOffsets object.
229
+ * @param value The new FrameOffsets objects.
224
230
  * @param onComplete A callback, called when the modification is complete
225
231
  */
226
- updateOffsets(value: FrameOffsets, onComplete?: () => void): void;
227
- onFrameDataChanged(newListener: (frameData: FrameData | undefined) => void): void;
232
+ updateOffsets(value: FrameOffsets[], onComplete?: () => void): void;
233
+ onFrameDataChanged(newListener: (frameData: FrameData[] | undefined) => void): void;
228
234
  /**
229
235
  * Append a new listener to zoom events on this frame.
230
236
  * @param newListener
@@ -1899,7 +1905,7 @@ export enum FrameStep {
1899
1905
  export class FrameStepHandle extends StepHandle<_FrameStepData1> {
1900
1906
  constructor(manager: WorkflowManager, step: _Step1<_FrameStepData1>);
1901
1907
  selectVariant(variant: Variant): Promise<void>;
1902
- onFrameDataChanged(callback: (frameData: _FrameData1) => void): void;
1908
+ onFrameDataChanged(callback: (frameData: _FrameData1[]) => void): void;
1903
1909
  selectImage(asset: _Asset1): void;
1904
1910
  getImageData(): PatternImageData | undefined;
1905
1911
  getCurrentFrameStep(frameData: _FrameData1, uploading?: any, imageUploadComplete?: any, variants?: _VariantResource1[]): FrameStep;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "13.3.0",
3
+ "version": "14.0.0-alpha.1",
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",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "dependencies": {
89
89
  "@apollo/client": "^3.7.0",
90
- "@spiffcommerce/papyrus": "^3.1.0",
90
+ "@spiffcommerce/papyrus": "4.0.1-alpha.1",
91
91
  "cross-fetch": "^3.1.5",
92
92
  "graphql": "^16.6.0",
93
93
  "lodash.clonedeep": "^4.5.0",