@spiffcommerce/core 14.10.0 → 14.11.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/types.d.ts CHANGED
@@ -340,11 +340,13 @@ declare class QuestionStepService implements StepService<_QuestionStepData1> {
340
340
  }
341
341
  export const questionStepService: QuestionStepService;
342
342
  declare class ShapeStepService implements StepService<_ShapeStepData1> {
343
+ readonly shapeFillId = "spiff-fill-shape";
343
344
  availableColours(stepData: _Step1<_ShapeStepData1>): Promise<{
344
345
  fill: string | undefined;
345
346
  stroke: string | undefined;
346
347
  variant: _VariantResource1;
347
348
  }[]>;
349
+ setCustomColor(color: string, stepData: _Step1<_ShapeStepData1>, manager: WorkflowManager): void;
348
350
  init(stepData: _Step1<_ShapeStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<CommandWithFollowup | null>;
349
351
  selectVariant(stepData: _Step1<_ShapeStepData1>, colourOption: ColorOption, elements: RegionElement[], workflowManager: WorkflowManager): Promise<void>;
350
352
  }
@@ -550,7 +552,7 @@ export interface WorkflowManager {
550
552
  * @deprecated State updates are being pulled internally. This function will be removed in the future.
551
553
  */
552
554
  updateStateWithServerImmediate: (getReducerState: () => _CommandState1) => Promise<void>;
553
- updateStorage: (stepName: string, update: _StepStorage1) => Promise<void>;
555
+ updateStorage: (stepName: string, update: _StepStorage1) => void;
554
556
  getModelContainer: () => any | undefined;
555
557
  setModelContainer: (container: any) => void;
556
558
  /**
@@ -1652,6 +1654,12 @@ export class ShapeStepHandle extends StepHandle<_ShapeStepData1> {
1652
1654
  stroke: string | undefined;
1653
1655
  variant: import("@spiffcommerce/papyrus").VariantResource;
1654
1656
  }[]>;
1657
+ /**
1658
+ * Allows for setting a custom color when the custom variant is selected. Will
1659
+ * throw when a non-custom variant is selected.
1660
+ */
1661
+ setCustomColor(color: string): void;
1662
+ getCustomColor(): string;
1655
1663
  }
1656
1664
  interface TextChangeResult {
1657
1665
  input: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "14.10.0",
3
+ "version": "14.11.0",
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",