@spiffcommerce/core 0.4.0 → 0.4.2
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 +9 -9
- package/dist/types.d.ts +12 -11
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { CanvasCommand, CreateElementCommand as _CreateElementCommand1, GroupCom
|
|
|
6
6
|
import { LayoutData as _LayoutData1, CommandState, CommandContext as _CommandContext1, CommandContext, LayoutData } from "papyrus/build/main/CommandContext";
|
|
7
7
|
import { ModuleProduct } from "papyrus/build/main/module/ModuleProduct";
|
|
8
8
|
import { ReactNode, Dispatch, FunctionComponent, RefObject, PointerEvent, KeyboardEvent, MouseEvent } from "react";
|
|
9
|
-
import { ThreeDPreviewService as
|
|
9
|
+
import { ThreeDPreviewService as _ThreeDPreviewService2, LoadProgressEventData, ProductCameraRig, SpiffCommerce3DPreviewService, ThreeDPreviewService } from "spiff-preview";
|
|
10
10
|
import { LayoutElementFactory } from "papyrus/build/main/Elements/factory";
|
|
11
11
|
export const gatherVaryingStepAspects: (workflow: Workflow) => StepAspect[];
|
|
12
12
|
export interface WorkflowScene {
|
|
@@ -418,7 +418,7 @@ export interface WorkflowManager {
|
|
|
418
418
|
getVariationRecords: () => VariationRecord[];
|
|
419
419
|
getLayouts: () => ILayout[];
|
|
420
420
|
getLayoutPreviewService: () => any;
|
|
421
|
-
getPreviewService: () =>
|
|
421
|
+
getPreviewService: () => _ThreeDPreviewService1 | undefined;
|
|
422
422
|
getProductName: () => string | undefined;
|
|
423
423
|
getProfanities: () => string[];
|
|
424
424
|
getRegionElements: (stepName: string) => RegionElement[];
|
|
@@ -760,7 +760,7 @@ interface FrameData {
|
|
|
760
760
|
*/
|
|
761
761
|
height: number;
|
|
762
762
|
}
|
|
763
|
-
type
|
|
763
|
+
type _ThreeDPreviewService1 = {
|
|
764
764
|
/**
|
|
765
765
|
* Allows listeners to be aware of the camera losing focus of the
|
|
766
766
|
* main product.
|
|
@@ -778,14 +778,14 @@ type ThreeDPreviewService = {
|
|
|
778
778
|
* the preview is loading scenes.
|
|
779
779
|
* @param listener A function to get load progress updates
|
|
780
780
|
*/
|
|
781
|
-
registerLoadProgressListener(listener: (e:
|
|
781
|
+
registerLoadProgressListener(listener: (e: _LoadProgressEventData1) => void): void;
|
|
782
782
|
/**
|
|
783
783
|
* Allows you to pass any function that originally called registerLoadProgressListener()
|
|
784
784
|
* to have it excluded from load progress updates.
|
|
785
785
|
* If the function was never registered this call has no effect.
|
|
786
786
|
* @param listener The listener to exclude from load progress.
|
|
787
787
|
*/
|
|
788
|
-
unregisterLoadProgressListener(listener: (e:
|
|
788
|
+
unregisterLoadProgressListener(listener: (e: _LoadProgressEventData1) => void): void;
|
|
789
789
|
/**
|
|
790
790
|
* Request that the scene renders to a given canvas
|
|
791
791
|
* @param canvas The canvas we should render to.
|
|
@@ -844,7 +844,7 @@ type ThreeDPreviewService = {
|
|
|
844
844
|
* Controls the current control state of the camera.
|
|
845
845
|
* @param rigType The control type to use.
|
|
846
846
|
*/
|
|
847
|
-
setCameraState(rigType:
|
|
847
|
+
setCameraState(rigType: _ProductCameraRig1): void;
|
|
848
848
|
/**
|
|
849
849
|
* Restores the product camera to it's last set focus point. If the user has
|
|
850
850
|
* been panning this will animate the camera to the original focus point. If the camera is still
|
|
@@ -1041,7 +1041,7 @@ type PreviewOptions = {
|
|
|
1041
1041
|
* Defines the different behaviors supported by the camera system
|
|
1042
1042
|
* for control when viewing a product.
|
|
1043
1043
|
*/
|
|
1044
|
-
enum
|
|
1044
|
+
enum _ProductCameraRig1 {
|
|
1045
1045
|
Orbit = 0,
|
|
1046
1046
|
Pan = 1
|
|
1047
1047
|
}
|
|
@@ -1059,7 +1059,7 @@ type CameraPose = {
|
|
|
1059
1059
|
readonly z: number;
|
|
1060
1060
|
};
|
|
1061
1061
|
};
|
|
1062
|
-
type
|
|
1062
|
+
type _LoadProgressEventData1 = {
|
|
1063
1063
|
/**
|
|
1064
1064
|
* The total load value of the scene, this is an average of all
|
|
1065
1065
|
* 'in progress' loading events. when all events are fully loaded this value will be 100.
|
|
@@ -1430,11 +1430,11 @@ export class Client {
|
|
|
1430
1430
|
* @param previewServiceConstructor A function called during initialization. Takes a class implementing ThreeDPreviewService in return.
|
|
1431
1431
|
* @returns A workflow experience configured as requested.
|
|
1432
1432
|
*/
|
|
1433
|
-
getWorkflowExperience(workflowId?: string, workflowState?: string, previewServiceConstructor?: (workflow: Workflow) =>
|
|
1433
|
+
getWorkflowExperience(workflowId?: string, workflowState?: string, previewServiceConstructor?: (workflow: Workflow) => _ThreeDPreviewService2): Promise<WorkflowExperience>;
|
|
1434
1434
|
/**
|
|
1435
1435
|
* @returns The preview service that was provided during construction.
|
|
1436
1436
|
*/
|
|
1437
|
-
getPreviewService(): import("types").
|
|
1437
|
+
getPreviewService(): import("types")._ThreeDPreviewService2;
|
|
1438
1438
|
/**
|
|
1439
1439
|
* @returns The product associated with this client.
|
|
1440
1440
|
*/
|
|
@@ -1515,6 +1515,7 @@ export class MockWorkflowManager implements WorkflowManager {
|
|
|
1515
1515
|
export { CommandContext };
|
|
1516
1516
|
export { CreateElementCommand, TextChangeCommand, FontAlignmentCommand, FontColorCommand, LayoutElementFactory };
|
|
1517
1517
|
export { LayoutElement, ImageElement, TextboxElement, TextStepData, FrameElement, PatchworkElement, IllustrationElement, LayoutData, LayoutsState };
|
|
1518
|
-
export { SpiffCommerce3DPreviewService };
|
|
1518
|
+
export { SpiffCommerce3DPreviewService, ProductCameraRig };
|
|
1519
|
+
export { ThreeDPreviewService, LoadProgressEventData };
|
|
1519
1520
|
|
|
1520
1521
|
//# sourceMappingURL=types.d.ts.map
|