@spiffcommerce/core 26.6.1 → 26.7.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/CHANGELOG.md +7 -0
- package/dist/index.d.ts +31 -3
- package/dist/index.js +133 -127
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2215 -2100
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
14
|
- `Fixed` for any bug fixes.
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
|
+
## [26.7.0] - 27-11-2024
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Text steps now support custom stroke. Similar to other color customisation features, this is accessible via the functions `getAvailableStrokeColors`, `getStrokeColor`, and `setStrokeColor` on `TextStepHandle`.
|
|
22
|
+
The thickness of the stroke, the colors to select from, and other options, are configurable via the Spiff Hub in the Workflow editor.
|
|
23
|
+
|
|
17
24
|
## [26.5.2] - 20-11-2024
|
|
18
25
|
|
|
19
26
|
### Fixed
|
package/dist/index.d.ts
CHANGED
|
@@ -2991,14 +2991,17 @@ interface TextStepData extends Animatable, Placeable, Colorable {
|
|
|
2991
2991
|
hideSelectionInCart?: boolean;
|
|
2992
2992
|
hideFillImageInCart?: boolean;
|
|
2993
2993
|
hideColorInCart?: boolean;
|
|
2994
|
+
hideStrokeInCart?: boolean;
|
|
2994
2995
|
hideTextInCart?: boolean;
|
|
2995
2996
|
displaySelectionOnFinishStep?: boolean;
|
|
2996
|
-
|
|
2997
|
+
displayImageFillOnFinishStep?: boolean;
|
|
2997
2998
|
displayColorOnFinishStep?: boolean;
|
|
2998
2999
|
displayTextOnFinishStep?: boolean;
|
|
3000
|
+
displayStrokeOnFinishStep?: boolean;
|
|
2999
3001
|
markSelectionAsCustomField?: boolean;
|
|
3000
3002
|
markFillImageAsCustomField?: boolean;
|
|
3001
3003
|
markColorAsCustomField?: boolean;
|
|
3004
|
+
markStrokeAsCustomField?: boolean;
|
|
3002
3005
|
markTextAsCustomField?: boolean;
|
|
3003
3006
|
allowNewlines?: boolean;
|
|
3004
3007
|
defaultText: string;
|
|
@@ -3023,6 +3026,9 @@ interface TextStepData extends Animatable, Placeable, Colorable {
|
|
|
3023
3026
|
varyColor?: boolean;
|
|
3024
3027
|
imageFillOption?: OptionResource;
|
|
3025
3028
|
imageFillScale?: number;
|
|
3029
|
+
strokeEnabled?: boolean;
|
|
3030
|
+
strokeOption?: OptionResource;
|
|
3031
|
+
strokeThickness?: string;
|
|
3026
3032
|
}
|
|
3027
3033
|
interface SilentStepData extends Animatable, Placeable {
|
|
3028
3034
|
asset?: Asset;
|
|
@@ -3092,6 +3098,7 @@ interface StepStorage {
|
|
|
3092
3098
|
overrideGlobalConfigurations?: {
|
|
3093
3099
|
[key: string]: boolean;
|
|
3094
3100
|
};
|
|
3101
|
+
strokeColor?: IllustrationColorObject;
|
|
3095
3102
|
text?: string;
|
|
3096
3103
|
videoShortUrl?: string;
|
|
3097
3104
|
videoUrl?: string;
|
|
@@ -3792,6 +3799,7 @@ interface TextMetadata {
|
|
|
3792
3799
|
color?: string;
|
|
3793
3800
|
text: string;
|
|
3794
3801
|
fillImage?: string;
|
|
3802
|
+
strokeColor?: string;
|
|
3795
3803
|
}
|
|
3796
3804
|
interface SelectionStorage {
|
|
3797
3805
|
selectedVariants?: VariantResource[];
|
|
@@ -4203,6 +4211,8 @@ interface TextboxElement extends LayoutElement {
|
|
|
4203
4211
|
*/
|
|
4204
4212
|
algorithm?: TextAlgorithm;
|
|
4205
4213
|
fillSpotColorDefinition?: SpotColorDefinition;
|
|
4214
|
+
strokeColor?: ColorDefinition;
|
|
4215
|
+
strokeThickness?: string;
|
|
4206
4216
|
}
|
|
4207
4217
|
interface FontData {
|
|
4208
4218
|
assetUrl: string;
|
|
@@ -4720,13 +4730,20 @@ declare class TextStepService implements StepService<TextStepData> {
|
|
|
4720
4730
|
/**
|
|
4721
4731
|
* Get the colors that can be used for a given text step.
|
|
4722
4732
|
* @param stepData The text step to get colors for.
|
|
4723
|
-
* @returns A list of color objects
|
|
4733
|
+
* @returns A list of color objects containing fill, stroke and variant if available.
|
|
4724
4734
|
*/
|
|
4725
4735
|
availableFillColors(stepData: Step<TextStepData>): ColorOption[];
|
|
4726
4736
|
changeAlignment(stepData: Step<TextStepData>, alignment: "left" | "center" | "right", elements: RegionElement[], workflowManager: WorkflowManager): void;
|
|
4727
4737
|
changeFillColor(stepData: Step<TextStepData>, newColor: ColorOption, elements: RegionElement[], workflowManager: WorkflowManager): Promise<void>;
|
|
4728
4738
|
availableFillImages(stepData: Step<TextStepData>): Promise<TextFillImage[]>;
|
|
4729
4739
|
changeFillImage(stepData: Step<TextStepData>, fillImage: TextFillImage, elements: RegionElement[], workflowManager: WorkflowManager): Promise<void>;
|
|
4740
|
+
/**
|
|
4741
|
+
* Get the colors that can be used for a given text step's stroke.
|
|
4742
|
+
* @param stepData The text step to get colors for.
|
|
4743
|
+
* @returns A list of color objects containing fill, stroke and variant if available.
|
|
4744
|
+
*/
|
|
4745
|
+
availableStrokeColors(stepData: Step<TextStepData>): ColorOption[];
|
|
4746
|
+
changeStrokeColor(stepData: Step<TextStepData>, newColor: ColorOption | undefined, elements: RegionElement[], workflowManager: WorkflowManager): Promise<void>;
|
|
4730
4747
|
/**
|
|
4731
4748
|
* Given an element and a string, filters any characters from the string that are
|
|
4732
4749
|
* not supported by the font of the given element.
|
|
@@ -4744,8 +4761,9 @@ declare class TextStepService implements StepService<TextStepData> {
|
|
|
4744
4761
|
private getDefaultColorVariant;
|
|
4745
4762
|
private getDefaultColor;
|
|
4746
4763
|
private getDefaultImageFillVariant;
|
|
4764
|
+
private getDefaultStrokeColorVariant;
|
|
4747
4765
|
/**
|
|
4748
|
-
* Validates a string of text based on step
|
|
4766
|
+
* Validates a string of text based on step configuration.
|
|
4749
4767
|
* @param text The text to validate
|
|
4750
4768
|
* @param step The step providing configuration
|
|
4751
4769
|
* @param workflowManager Workflow manager for access to workflow state
|
|
@@ -5016,6 +5034,16 @@ declare class TextStepHandle extends StepHandle<TextStepData> implements CustomC
|
|
|
5016
5034
|
getCharactersRemaining(): number | undefined;
|
|
5017
5035
|
setCustomColor(_color: string): void;
|
|
5018
5036
|
getCustomColor(): string;
|
|
5037
|
+
/**
|
|
5038
|
+
* @returns A list of colors that can be used for the text's outline.
|
|
5039
|
+
*/
|
|
5040
|
+
getAvailableStrokeColors(): ColorOption[];
|
|
5041
|
+
getStrokeColor(): string;
|
|
5042
|
+
/**
|
|
5043
|
+
* Changes the stroke of text related to this step to the new stroke value.
|
|
5044
|
+
* @param stroke A new stroke value to use.
|
|
5045
|
+
*/
|
|
5046
|
+
setStrokeColor(stroke: ColorOption | undefined): Promise<void>;
|
|
5019
5047
|
}
|
|
5020
5048
|
|
|
5021
5049
|
declare class PictureStepHandle extends StepHandle<PictureStepData> {
|