@merchi/product-form 1.19.80 → 1.19.81
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/lib/components/drafts/DraftApprovePanel.js +47 -19
- package/lib/components/drafts/DraftDesignerSheet.js +122 -59
- package/lib/components/drafts/DraftProductPreview.js +5 -3
- package/lib/styles/globals.css +22 -1
- package/lib/styles/globals.css.map +1 -1
- package/lib/styles/globals.scss +22 -1
- package/lib/utils/draftExport.js +11 -6
- package/lib/utils/draftTemplates.d.ts +23 -1
- package/lib/utils/draftTemplates.js +181 -44
- package/lib/utils/draftTemplates.test.js +140 -2
- package/lib/utils/previewSize.d.ts +2 -0
- package/lib/utils/previewSize.js +9 -1
- package/lib/utils/previewSize.test.js +9 -2
- package/lib/utils/printTexture.d.ts +3 -1
- package/lib/utils/printTexture.js +12 -3
- package/lib/utils/printTexture.test.js +96 -1
- package/package.json +1 -1
|
@@ -105,9 +105,16 @@ export type BodyColourMode = 'segmentation' | 'mix';
|
|
|
105
105
|
export declare function bodyColourStrategy(template: any): BodyColourMode | null;
|
|
106
106
|
/** Styles the product builder turned on. A saved strategy counts when no list is stored. */
|
|
107
107
|
export declare function allowedBodyColourModes(template: any): BodyColourMode[];
|
|
108
|
+
/** A select whose options include both Segmentation and Swirl, such as Band style. */
|
|
109
|
+
export declare function bodyColourStyleChoice(variations: any[], mode: BodyColourMode): {
|
|
110
|
+
fieldId: number;
|
|
111
|
+
value: string;
|
|
112
|
+
} | null;
|
|
113
|
+
/** The style selected on the product form, when that field offers both styles. */
|
|
114
|
+
export declare function bodyColourModeFromVariations(variations: any[]): BodyColourMode | null;
|
|
108
115
|
export declare function activeBodyColourMode(template: any, state?: {
|
|
109
116
|
bodyColourMode?: string | null;
|
|
110
|
-
} | null): BodyColourMode | null;
|
|
117
|
+
} | null, variations?: any[] | null): BodyColourMode | null;
|
|
111
118
|
export declare function backgroundColourVariations(template: any, variations: any[], detached?: Set<number> | number[]): any[];
|
|
112
119
|
export interface BodyColourPanel {
|
|
113
120
|
colours: Array<{
|
|
@@ -123,6 +130,21 @@ export interface BodyColourPanel {
|
|
|
123
130
|
export declare function bodyColourPanel(template: any, variations: any[], state?: DraftCanvasState | null): BodyColourPanel | null;
|
|
124
131
|
export declare function splitBbox(bbox: number[], count: number): number[][];
|
|
125
132
|
export declare function bodyColourBounds(template: any): number[];
|
|
133
|
+
/** The part of the template the customer should approve: the band, plus any artwork on it. */
|
|
134
|
+
export declare function approvalPreviewFrame(template: any, state?: {
|
|
135
|
+
width?: number;
|
|
136
|
+
height?: number;
|
|
137
|
+
objects?: Array<{
|
|
138
|
+
type?: string;
|
|
139
|
+
x?: number;
|
|
140
|
+
y?: number;
|
|
141
|
+
width?: number;
|
|
142
|
+
height?: number;
|
|
143
|
+
rotation?: number;
|
|
144
|
+
scaleX?: number;
|
|
145
|
+
scaleY?: number;
|
|
146
|
+
}>;
|
|
147
|
+
} | null): PixelBox;
|
|
126
148
|
export declare function bodyColourSliceBoxes(template: any, count: number): number[][];
|
|
127
149
|
export declare function swirlUnit(nx: number, ny: number): number;
|
|
128
150
|
export declare function swirlRgb(nx: number, ny: number, colours: Array<[number, number, number]>): [number, number, number];
|