@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.
@@ -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];