@lucablockltd/ultimate-packaging 1.1.0 → 1.3.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.
@@ -69,18 +69,186 @@ const pdf = await ref.current.exportDimension();
69
69
  ## 2. Auto-Layout (Pack Dielines on Paper)
70
70
 
71
71
  Use `AUTO_LAYOUT` to automatically arrange dieline pieces on paper sheets.
72
+ The engine calculates the optimal rotation and grid placement to maximize pieces per sheet.
72
73
 
73
- ```tsx
74
- import { AUTO_LAYOUT, calculateAutoLayout } from "@lucablockltd/ultimate-packaging";
75
- import type {
76
- AutoLayoutRef,
77
- AutoLayoutConfig,
78
- AutoLayoutResult,
74
+ ### AutoLayoutConfig — Full Reference
75
+
76
+ `AutoLayoutConfig` has **3 required fields** and **5 optional print-setting fields**.
77
+ If you omit any optional field, the system uses a sensible default automatically.
78
+
79
+ ```typescript
80
+ interface AutoLayoutConfig {
81
+ // ─── REQUIRED ───────────────────────────────────────────────
82
+ papers: AutoLayoutPaper[]; // At least 1 paper size to test
83
+ model: AutoLayoutModel; // Which box/bag model and its dimensions
84
+ quantity: number; // Total pieces needed (e.g. 1000)
85
+
86
+ // ─── OPTIONAL (print settings) ──────────────────────────────
87
+ // You can omit ALL of these — the system will use defaults.
88
+ layoutDistance?: number; // default: 3 — mm gap between piece cut-lines
89
+ spacing?: number; // default: 5 — mm margin from paper edges
90
+ griper?: number; // default: 10 — mm machine gripper zone
91
+ colorbarHeight?: number; // default: 5 — mm height of color test strip
92
+ isShowColorbar?: boolean; // default: true — whether to show colorbar
93
+ }
94
+ ```
95
+
96
+ #### Required Field #1: `papers` — Paper sizes to test
97
+
98
+ An array of paper sizes. The engine will calculate layout for EVERY paper and rank them by efficiency.
99
+ Each paper needs 4 fields — all required:
100
+
101
+ ```typescript
102
+ interface AutoLayoutPaper {
103
+ paperId: string; // Unique ID (any string, e.g. "1", "paper-a4", "custom-1")
104
+ paperName: string; // Display name (e.g. "20x28\"", "A4", "25x36\"")
105
+ paperWidth: number; // Width in millimeters
106
+ paperHeight: number; // Height in millimeters
107
+ }
108
+ ```
109
+
110
+ **Common paper sizes (inches → mm, multiply by 25.4):**
111
+
112
+ | Name | Inches | paperWidth (mm) | paperHeight (mm) |
113
+ | -------- | -------- | --------------- | ----------------- |
114
+ | 20x28" | 20 × 28 | 508 | 711.2 |
115
+ | 25x36" | 25 × 36 | 635 | 914.4 |
116
+ | 25x12" | 25 × 12 | 635 | 304.8 |
117
+ | 23x35" | 23 × 35 | 584.2 | 889 |
118
+
119
+ **Example:**
120
+
121
+ ```typescript
122
+ const papers: AutoLayoutPaper[] = [
123
+ { paperId: "1", paperName: '20x28"', paperWidth: 508, paperHeight: 711.2 },
124
+ { paperId: "2", paperName: '25x36"', paperWidth: 635, paperHeight: 914.4 },
125
+ ];
126
+ ```
127
+
128
+ #### Required Field #2: `model` — Which packaging model and its dimensions
129
+
130
+ ```typescript
131
+ interface AutoLayoutModel {
132
+ modelId: string; // Must be one of the supported model IDs (see below)
133
+ attributes: Record<string, number>; // Dimensions in mm — different per model
134
+ }
135
+ ```
136
+
137
+ **Supported `modelId` values and their required `attributes`:**
138
+
139
+ | modelId | Type | Required attributes |
140
+ | ------------ | ----------------------- | ---------------------------------------------------------------- |
141
+ | `BECF-1010A` | Tuck End Box Type A | `length`, `width`, `height`, `glueArea`, `dustFlap`, `tuckFlap` |
142
+ | `BECF-1030A` | Tuck End Box Type C | `length`, `width`, `height`, `glueArea`, `dustFlap`, `tuckFlap` |
143
+ | `BECF-1040A` | Tuck End Box Type B | `length`, `width`, `height`, `glueArea`, `dustFlap`, `tuckFlap` |
144
+ | `BECF-11D01` | Standard Box | `length`, `width`, `height`, `flapHeight`, `glueArea` |
145
+ | `BECF-12101` | Carton Bag / Shopping Bag Type A | `length`, `width`, `height`, `glueArea` |
146
+ | `BECF-12109` | Carton Bag / Shopping Bag Type B | `length`, `width`, `height`, `glueArea` |
147
+
148
+ **Example — Tuck End Box:**
149
+
150
+ ```typescript
151
+ const model: AutoLayoutModel = {
152
+ modelId: "BECF-1010A",
153
+ attributes: {
154
+ length: 60, // box length (mm)
155
+ width: 25, // box width (mm)
156
+ height: 100, // box height (mm)
157
+ glueArea: 15, // glue flap width (mm)
158
+ dustFlap: 15, // dust flap extension (mm)
159
+ tuckFlap: 15, // tuck flap height (mm)
160
+ },
161
+ };
162
+ ```
163
+
164
+ **Example — Standard Box:**
165
+
166
+ ```typescript
167
+ const model: AutoLayoutModel = {
168
+ modelId: "BECF-11D01",
169
+ attributes: {
170
+ length: 100,
171
+ width: 50,
172
+ height: 150,
173
+ flapHeight: 50,
174
+ glueArea: 13,
175
+ },
176
+ };
177
+ ```
178
+
179
+ **Example — Carton Bag:**
180
+
181
+ ```typescript
182
+ const model: AutoLayoutModel = {
183
+ modelId: "BECF-12101",
184
+ attributes: {
185
+ length: 100, // A — front/back panel width (mm)
186
+ width: 50, // B — side panel / gusset (mm)
187
+ height: 150, // C — bag body height (mm)
188
+ glueArea: 13, // glue flap width (mm)
189
+ },
190
+ };
191
+ ```
192
+
193
+ **Tip:** You can use pre-defined default attributes instead of hardcoding:
194
+
195
+ ```typescript
196
+ import {
197
+ BECF_1010A_DEFAULT_ATTRIBUTES,
198
+ BECF_12101_DEFAULT_ATTRIBUTES,
79
199
  } from "@lucablockltd/ultimate-packaging";
80
200
 
81
- const ref = useRef<AutoLayoutRef>(null);
82
- const [result, setResult] = useState<AutoLayoutResult | null>(null);
201
+ const model: AutoLayoutModel = {
202
+ modelId: "BECF-1010A",
203
+ attributes: { ...BECF_1010A_DEFAULT_ATTRIBUTES },
204
+ };
205
+ ```
206
+
207
+ #### Required Field #3: `quantity` — Total pieces needed
208
+
209
+ A positive integer. The engine calculates how many sheets are needed to produce this quantity.
210
+
211
+ ```typescript
212
+ quantity: 1000 // need 1000 pieces total
213
+ ```
214
+
215
+ #### Optional Print Settings (all have defaults)
216
+
217
+ These 5 fields control the printing press layout. **You can omit any or all of them.**
83
218
 
219
+ | Field | Type | Default | What it does |
220
+ | ---------------- | --------- | ------- | ------------------------------------------------------------------------------------------------ |
221
+ | `layoutDistance` | `number` | `3` | Gap between piece cut-lines in mm. Creates an offset contour around each piece (half on each side). Set to `0` for pieces touching edge-to-edge. |
222
+ | `spacing` | `number` | `5` | Margin from all paper edges in mm. Reserved border where no pieces are placed. |
223
+ | `griper` | `number` | `10` | Machine gripper zone depth in mm. Area reserved for the printing press feed mechanism. Placed on the bottom edge (landscape) or left edge (portrait). |
224
+ | `colorbarHeight` | `number` | `5` | Height of the color test strip in mm. A row of colored squares for print registration, placed on the opposite side of the gripper. |
225
+ | `isShowColorbar` | `boolean` | `true` | Whether to show the colorbar. If `false`, `colorbarHeight` is ignored and that space becomes usable for pieces. |
226
+
227
+ ### Minimal Config Example (only required fields)
228
+
229
+ This is the **simplest possible config** — all print settings use defaults:
230
+
231
+ ```tsx
232
+ const config: AutoLayoutConfig = {
233
+ papers: [
234
+ { paperId: "1", paperName: '20x28"', paperWidth: 508, paperHeight: 711.2 },
235
+ ],
236
+ model: {
237
+ modelId: "BECF-1010A",
238
+ attributes: { length: 60, width: 25, height: 100, glueArea: 15, dustFlap: 15, tuckFlap: 15 },
239
+ },
240
+ quantity: 1000,
241
+ // layoutDistance → defaults to 3
242
+ // spacing → defaults to 5
243
+ // griper → defaults to 10
244
+ // colorbarHeight → defaults to 5
245
+ // isShowColorbar → defaults to true
246
+ };
247
+ ```
248
+
249
+ ### Full Config Example (all fields explicit)
250
+
251
+ ```tsx
84
252
  const config: AutoLayoutConfig = {
85
253
  papers: [
86
254
  { paperId: "1", paperName: '20x28"', paperWidth: 508, paperHeight: 711.2 },
@@ -98,52 +266,153 @@ const config: AutoLayoutConfig = {
98
266
  },
99
267
  },
100
268
  quantity: 1000,
101
- layoutDistance: 3, // mm gap between pieces (offset contour)
102
- spacing: 5, // mm margin on sides
103
- griper: 10, // mm machine gripper zone
104
- colorbarHeight: 5, // mm colorbar strip height
269
+ layoutDistance: 3,
270
+ spacing: 5,
271
+ griper: 10,
272
+ colorbarHeight: 5,
105
273
  isShowColorbar: true,
106
274
  };
275
+ ```
276
+
277
+ ### Using the AUTO_LAYOUT Component (React)
278
+
279
+ ```tsx
280
+ import { AUTO_LAYOUT } from "@lucablockltd/ultimate-packaging";
281
+ import type {
282
+ AutoLayoutRef,
283
+ AutoLayoutConfig,
284
+ AutoLayoutResult,
285
+ } from "@lucablockltd/ultimate-packaging";
286
+
287
+ const ref = useRef<AutoLayoutRef>(null);
288
+ const [result, setResult] = useState<AutoLayoutResult | null>(null);
107
289
 
108
290
  <AUTO_LAYOUT ref={ref} config={config} onResult={setResult} />;
109
291
  ```
110
292
 
111
293
  ### AUTO_LAYOUT Props
112
294
 
113
- | Prop | Type | Required | Description |
114
- | ------------------ | -------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
115
- | `config` | `AutoLayoutConfig \| null` | YES | Layout configuration (null = no render) |
116
- | `onResult` | `(result: AutoLayoutResult \| null) => void` | no | Called when layout is calculated |
117
- | `onModifiedPapers` | `(papers: AutoLayoutPaperResult[]) => void` | no | Called when user modifies layout manually |
118
- | `isShowSummary` | `boolean` | no | Show/hide summary panel (default: `true`) |
119
- | `isShowAction` | `AutoLayoutAction[]` | no | Which action buttons to show. If omitted, all are shown. Values: `"EXPORT_SHEET"`, `"EXPORT_PDF"`, `"MODIFY_LAYOUT"` |
295
+ | Prop | Type | Required | Default | Description |
296
+ | ------------------ | -------------------------------------------- | -------- | ---------------- | ----------------------------------------------------------------------------------------------------------------- |
297
+ | `config` | `AutoLayoutConfig \| null` | YES | — | Layout configuration. Pass `null` to clear/hide the layout. |
298
+ | `onResult` | `(result: AutoLayoutResult \| null) => void` | no | — | Callback fired when layout calculation completes. Receives the full result object. |
299
+ | `onModifiedPapers` | `(papers: AutoLayoutPaperResult[]) => void` | no | — | Callback fired when user manually drags/modifies piece positions on the layout. |
300
+ | `isShowSummary` | `boolean` | no | `true` | Show/hide the summary stats panel above each paper (pieces/sheet, waste %, etc.) |
301
+ | `isShowAction` | `AutoLayoutAction[]` | no | all actions shown | Which action buttons to show. Values: `"EXPORT_SHEET"`, `"EXPORT_PDF"`, `"MODIFY_LAYOUT"`. Omit to show all. |
120
302
 
121
303
  ### AUTO_LAYOUT Ref Methods
122
304
 
305
+ Access these via `ref.current` after the component mounts:
306
+
123
307
  ```tsx
124
- // Get calculation result
125
- ref.current.getResult(); // → AutoLayoutResult
308
+ const ref = useRef<AutoLayoutRef>(null);
309
+
310
+ // 1. Get the full calculation result
311
+ const result = ref.current.getResult();
312
+ // → AutoLayoutResult | null
313
+
314
+ // 2. Export a specific paper's layout as PNG image
315
+ const pngBlob = await ref.current.exportImage(0); // 0 = first paper index
316
+ // → Blob (image/png)
126
317
 
127
- // Export layout image (PNG) for specific paper
128
- const png = await ref.current.exportImage(0); // paper index 0
318
+ // 3. Export a specific paper's layout as PDF
319
+ const pdfBlob = await ref.current.exportPdf(0);
320
+ // → Blob (application/pdf)
129
321
 
130
- // Export layout as PDF
131
- const pdf = await ref.current.exportPdf(0);
322
+ // 4. Export the dieline pattern as PNG
323
+ const dielineBlob = await ref.current.exportDielineImage();
324
+ // → Blob (image/png)
132
325
 
133
- // Get packed result with dieline + layout image files
326
+ // 5. Get packed result includes images as File objects (useful for upload/FormData)
134
327
  const packed = await ref.current.getPackedResult(0);
135
- // → { ...paperResult, quantity, dielineFile: File, layoutFile: File }
328
+ // → AutoLayoutPackedResult {
329
+ // ...all AutoLayoutPaperResult fields,
330
+ // quantity: number,
331
+ // dielineFile: File, // dieline pattern PNG
332
+ // layoutFile: File, // layout arrangement PNG
333
+ // }
136
334
  ```
137
335
 
138
- ### Programmatic Calculation (No UI)
336
+ ### Programmatic Calculation (No UI / No React)
337
+
338
+ Use `calculateAutoLayout()` to compute layout without rendering any component.
339
+ Same config, same result — just no visual output.
139
340
 
140
341
  ```tsx
141
342
  import { calculateAutoLayout } from "@lucablockltd/ultimate-packaging";
343
+ import type { AutoLayoutConfig, AutoLayoutResult } from "@lucablockltd/ultimate-packaging";
344
+
345
+ const config: AutoLayoutConfig = {
346
+ papers: [
347
+ { paperId: "A", paperName: '20x28"', paperWidth: 508, paperHeight: 711.2 },
348
+ { paperId: "B", paperName: '25x36"', paperWidth: 635, paperHeight: 914.4 },
349
+ ],
350
+ model: {
351
+ modelId: "BECF-1010A",
352
+ attributes: { length: 60, width: 25, height: 100, glueArea: 15, dustFlap: 15, tuckFlap: 15 },
353
+ },
354
+ quantity: 1000,
355
+ // print settings are optional — defaults will be used
356
+ };
142
357
 
143
- const result = calculateAutoLayout(config);
144
- // → AutoLayoutResult { papers, quantity, totalProduced, totalSheets, remainingNeeded, recommendedPaperId }
358
+ const result: AutoLayoutResult = calculateAutoLayout(config);
359
+
360
+ // Result structure:
361
+ // result.recommendedPaperId → "B" (best paper by least total area)
362
+ // result.quantity → 1000
363
+ // result.totalProduced → 1008 (may exceed quantity due to full sheets)
364
+ // result.totalSheets → total sheets across all papers
365
+ // result.remainingNeeded → 0 (if all produced)
366
+ // result.papers → AutoLayoutPaperResult[] (one per paper, sorted best-first)
367
+ ```
368
+
369
+ ### AutoLayoutResult — Output Reference
370
+
371
+ ```typescript
372
+ interface AutoLayoutResult {
373
+ papers: AutoLayoutPaperResult[]; // Results per paper size, sorted by efficiency (best first)
374
+ quantity: number; // Original requested quantity
375
+ totalProduced: number; // Total pieces produced (may exceed quantity)
376
+ totalSheets: number; // Total sheets needed across all papers
377
+ remainingNeeded: number; // Shortfall (0 if quantity is met)
378
+ recommendedPaperId: string | null; // paperId of the most efficient paper (least total area)
379
+ }
380
+
381
+ interface AutoLayoutPaperResult {
382
+ paperId: string; // Matches the input paper's paperId
383
+ paperName: string; // Display name
384
+ paperWidth: number; // mm
385
+ paperHeight: number; // mm
386
+ producedPerSheet: number; // How many pieces fit on ONE sheet
387
+ totalSheets: number; // Sheets needed for the requested quantity
388
+ totalProduced: number; // producedPerSheet × totalSheets
389
+ excessCount: number; // Overproduction beyond quantity
390
+ wastePercent: number; // Unused paper area percentage (0–100)
391
+ independentSheets: number; // Sheets needed if ONLY this paper is used
392
+ independentTotalArea: number; // Total paper area in mm² if only this paper
393
+ placements: AutoLayoutPlacement[]; // Position of each piece on the sheet
394
+ gripperSide: GripperSide; // Which edge the gripper is on
395
+ }
396
+
397
+ interface AutoLayoutPlacement {
398
+ x: number; // mm from paper left edge
399
+ y: number; // mm from paper top edge
400
+ rotation: number; // 0 | 90 | 180 | 270 degrees
401
+ }
402
+
403
+ type GripperSide = "top" | "bottom" | "left" | "right";
404
+ // Automatically determined: landscape paper → "bottom", portrait → "left"
145
405
  ```
146
406
 
407
+ ### Layout Algorithm Summary
408
+
409
+ 1. The engine tries all 4 rotations (0°, 90°, 180°, 270°) for each piece on each paper
410
+ 2. For each rotation, it packs pieces in a grid within the **usable bounds**
411
+ 3. **Usable bounds** = paper area minus: `spacing` (all edges) + `griper` (one edge) + `colorbarHeight` (opposite edge)
412
+ 4. The rotation that fits the **most pieces** wins
413
+ 5. Papers are sorted by `independentTotalArea` (ascending) — the paper that uses the least total area to fulfill quantity is ranked #1
414
+ 6. `recommendedPaperId` = the #1 ranked paper
415
+
147
416
  ---
148
417
 
149
418
  ## 3. Available Models & Attributes
package/dist/index.d.mts CHANGED
@@ -10,7 +10,7 @@ interface TuckEndBoxAttributes$2 {
10
10
  tuckFlap: number;
11
11
  }
12
12
 
13
- interface GetAttributesResult$5 {
13
+ interface GetAttributesResult$7 {
14
14
  modelId: string;
15
15
  overallWidth: number;
16
16
  overallHeight: number;
@@ -21,13 +21,13 @@ interface GetAttributesResult$5 {
21
21
  dustFlap: number;
22
22
  tuckFlap: number;
23
23
  }
24
- interface ExportImageOptions$5 {
24
+ interface ExportImageOptions$7 {
25
25
  isShowDimension: boolean;
26
26
  originalSize: boolean;
27
27
  }
28
28
  interface DieLineBecf1010aRef {
29
- getAttributes: () => GetAttributesResult$5;
30
- exportImage: (options: ExportImageOptions$5) => Promise<Blob>;
29
+ getAttributes: () => GetAttributesResult$7;
30
+ exportImage: (options: ExportImageOptions$7) => Promise<Blob>;
31
31
  exportDimension: () => Promise<Blob>;
32
32
  }
33
33
  interface CanvasBecf1010aRef extends DieLineBecf1010aRef {
@@ -62,7 +62,7 @@ interface TuckEndBoxAttributes$1 {
62
62
  tuckFlap: number;
63
63
  }
64
64
 
65
- interface GetAttributesResult$4 {
65
+ interface GetAttributesResult$6 {
66
66
  modelId: string;
67
67
  overallWidth: number;
68
68
  overallHeight: number;
@@ -73,13 +73,13 @@ interface GetAttributesResult$4 {
73
73
  dustFlap: number;
74
74
  tuckFlap: number;
75
75
  }
76
- interface ExportImageOptions$4 {
76
+ interface ExportImageOptions$6 {
77
77
  isShowDimension: boolean;
78
78
  originalSize: boolean;
79
79
  }
80
80
  interface DieLineBecf1030aRef {
81
- getAttributes: () => GetAttributesResult$4;
82
- exportImage: (options: ExportImageOptions$4) => Promise<Blob>;
81
+ getAttributes: () => GetAttributesResult$6;
82
+ exportImage: (options: ExportImageOptions$6) => Promise<Blob>;
83
83
  exportDimension: () => Promise<Blob>;
84
84
  }
85
85
  interface CanvasBecf1030aRef extends DieLineBecf1030aRef {
@@ -104,7 +104,7 @@ interface TuckEndBoxAttributes {
104
104
  tuckFlap: number;
105
105
  }
106
106
 
107
- interface GetAttributesResult$3 {
107
+ interface GetAttributesResult$5 {
108
108
  modelId: string;
109
109
  overallWidth: number;
110
110
  overallHeight: number;
@@ -115,13 +115,13 @@ interface GetAttributesResult$3 {
115
115
  dustFlap: number;
116
116
  tuckFlap: number;
117
117
  }
118
- interface ExportImageOptions$3 {
118
+ interface ExportImageOptions$5 {
119
119
  isShowDimension: boolean;
120
120
  originalSize: boolean;
121
121
  }
122
122
  interface DieLineBecf1040aRef {
123
- getAttributes: () => GetAttributesResult$3;
124
- exportImage: (options: ExportImageOptions$3) => Promise<Blob>;
123
+ getAttributes: () => GetAttributesResult$5;
124
+ exportImage: (options: ExportImageOptions$5) => Promise<Blob>;
125
125
  exportDimension: () => Promise<Blob>;
126
126
  }
127
127
  interface CanvasBecf1040aRef extends DieLineBecf1040aRef {
@@ -145,7 +145,7 @@ interface StandardBoxAttributes {
145
145
  glueArea: number;
146
146
  }
147
147
 
148
- interface GetAttributesResult$2 {
148
+ interface GetAttributesResult$4 {
149
149
  modelId: string;
150
150
  overallWidth: number;
151
151
  overallHeight: number;
@@ -155,13 +155,13 @@ interface GetAttributesResult$2 {
155
155
  flapHeight: number;
156
156
  glueArea: number;
157
157
  }
158
- interface ExportImageOptions$2 {
158
+ interface ExportImageOptions$4 {
159
159
  isShowDimension: boolean;
160
160
  originalSize: boolean;
161
161
  }
162
162
  interface DieLineBecf11d01Ref {
163
- getAttributes: () => GetAttributesResult$2;
164
- exportImage: (options: ExportImageOptions$2) => Promise<Blob>;
163
+ getAttributes: () => GetAttributesResult$4;
164
+ exportImage: (options: ExportImageOptions$4) => Promise<Blob>;
165
165
  exportDimension: () => Promise<Blob>;
166
166
  }
167
167
  interface CanvasBecf11d01Ref extends DieLineBecf11d01Ref {
@@ -184,7 +184,7 @@ interface CartonBagAttributes {
184
184
  glueArea?: number;
185
185
  }
186
186
 
187
- interface GetAttributesResult$1 {
187
+ interface GetAttributesResult$3 {
188
188
  modelId: string;
189
189
  overallWidth: number;
190
190
  overallHeight: number;
@@ -199,13 +199,13 @@ interface GetAttributesResult$1 {
199
199
  ropeY: number;
200
200
  ropeX: number;
201
201
  }
202
- interface ExportImageOptions$1 {
202
+ interface ExportImageOptions$3 {
203
203
  isShowDimension: boolean;
204
204
  originalSize: boolean;
205
205
  }
206
206
  interface DieLineBecf12101Ref {
207
- getAttributes: () => GetAttributesResult$1;
208
- exportImage: (options: ExportImageOptions$1) => Promise<Blob>;
207
+ getAttributes: () => GetAttributesResult$3;
208
+ exportImage: (options: ExportImageOptions$3) => Promise<Blob>;
209
209
  exportDimension: () => Promise<Blob>;
210
210
  }
211
211
  interface CanvasBecf12101Ref extends DieLineBecf12101Ref {
@@ -228,7 +228,7 @@ interface CartonBag12109Attributes {
228
228
  glueArea?: number;
229
229
  }
230
230
 
231
- interface GetAttributesResult {
231
+ interface GetAttributesResult$2 {
232
232
  modelId: string;
233
233
  overallWidth: number;
234
234
  overallHeight: number;
@@ -243,13 +243,13 @@ interface GetAttributesResult {
243
243
  ropeY: number;
244
244
  ropeX: number;
245
245
  }
246
- interface ExportImageOptions {
246
+ interface ExportImageOptions$2 {
247
247
  isShowDimension: boolean;
248
248
  originalSize: boolean;
249
249
  }
250
250
  interface DieLineBecf12109Ref {
251
- getAttributes: () => GetAttributesResult;
252
- exportImage: (options: ExportImageOptions) => Promise<Blob>;
251
+ getAttributes: () => GetAttributesResult$2;
252
+ exportImage: (options: ExportImageOptions$2) => Promise<Blob>;
253
253
  exportDimension: () => Promise<Blob>;
254
254
  }
255
255
  interface CanvasBecf12109Ref extends DieLineBecf12109Ref {
@@ -265,6 +265,96 @@ interface ModelBecf12109Props {
265
265
  }
266
266
  declare const MODEL_BECF_12109: react.ForwardRefExoticComponent<ModelBecf12109Props & react.RefAttributes<DieLineBecf12109Ref | CanvasBecf12109Ref>>;
267
267
 
268
+ interface CartonBagC12101Attributes {
269
+ length: number;
270
+ width: number;
271
+ height: number;
272
+ glueArea?: number;
273
+ }
274
+
275
+ interface GetAttributesResult$1 {
276
+ modelId: string;
277
+ overallWidth: number;
278
+ overallHeight: number;
279
+ length: number;
280
+ width: number;
281
+ height: number;
282
+ glueArea: number;
283
+ d: number;
284
+ kulak: number;
285
+ dip: number;
286
+ ribbonHW: number;
287
+ ribbonDX: number;
288
+ ribbonDY: number;
289
+ ribbonX: number;
290
+ }
291
+ interface ExportImageOptions$1 {
292
+ isShowDimension: boolean;
293
+ originalSize: boolean;
294
+ }
295
+ interface DieLineBecfC12101Ref {
296
+ getAttributes: () => GetAttributesResult$1;
297
+ exportImage: (options: ExportImageOptions$1) => Promise<Blob>;
298
+ exportDimension: () => Promise<Blob>;
299
+ }
300
+ interface CanvasBecfC12101Ref extends DieLineBecfC12101Ref {
301
+ resetView: () => void;
302
+ fitView: () => void;
303
+ }
304
+
305
+ interface ModelBecfC12101Props {
306
+ attributes: CartonBagC12101Attributes;
307
+ unit?: "mm" | "cm" | "in";
308
+ mode?: ModelMode;
309
+ isShowDimensions?: boolean;
310
+ }
311
+ declare const MODEL_BECF_C_12101: react.ForwardRefExoticComponent<ModelBecfC12101Props & react.RefAttributes<DieLineBecfC12101Ref | CanvasBecfC12101Ref>>;
312
+
313
+ interface CartonBagC12109Attributes {
314
+ length: number;
315
+ width: number;
316
+ height: number;
317
+ glueArea?: number;
318
+ }
319
+
320
+ interface GetAttributesResult {
321
+ modelId: string;
322
+ overallWidth: number;
323
+ overallHeight: number;
324
+ length: number;
325
+ width: number;
326
+ height: number;
327
+ glueArea: number;
328
+ d: number;
329
+ kulak: number;
330
+ dip: number;
331
+ ribbonHW: number;
332
+ ribbonDX: number;
333
+ ribbonDY: number;
334
+ ribbonX: number;
335
+ }
336
+ interface ExportImageOptions {
337
+ isShowDimension: boolean;
338
+ originalSize: boolean;
339
+ }
340
+ interface DieLineBecfC12109Ref {
341
+ getAttributes: () => GetAttributesResult;
342
+ exportImage: (options: ExportImageOptions) => Promise<Blob>;
343
+ exportDimension: () => Promise<Blob>;
344
+ }
345
+ interface CanvasBecfC12109Ref extends DieLineBecfC12109Ref {
346
+ resetView: () => void;
347
+ fitView: () => void;
348
+ }
349
+
350
+ interface ModelBecfC12109Props {
351
+ attributes: CartonBagC12109Attributes;
352
+ unit?: "mm" | "cm" | "in";
353
+ mode?: ModelMode;
354
+ isShowDimensions?: boolean;
355
+ }
356
+ declare const MODEL_BECF_C_12109: react.ForwardRefExoticComponent<ModelBecfC12109Props & react.RefAttributes<DieLineBecfC12109Ref | CanvasBecfC12109Ref>>;
357
+
268
358
  type GripperSide = "top" | "bottom" | "left" | "right";
269
359
  interface AutoLayoutPaper {
270
360
  paperId: string;
@@ -426,6 +516,20 @@ declare const BECF_12109_DEFAULT_ATTRIBUTES: {
426
516
  glueArea: number;
427
517
  };
428
518
 
519
+ declare const BECF_C_12101_DEFAULT_ATTRIBUTES: {
520
+ length: number;
521
+ width: number;
522
+ height: number;
523
+ glueArea: number;
524
+ };
525
+
526
+ declare const BECF_C_12109_DEFAULT_ATTRIBUTES: {
527
+ length: number;
528
+ width: number;
529
+ height: number;
530
+ glueArea: number;
531
+ };
532
+
429
533
  interface ModelThemeConfig {
430
534
  colorBackground: string;
431
535
  colorDieLine: string;
@@ -453,4 +557,4 @@ interface UltimatePackagingConfig {
453
557
  }
454
558
  declare function configurePackaging(config: UltimatePackagingConfig): void;
455
559
 
456
- export { AUTO_LAYOUT, AUTO_LAYOUT_THEME_CONFIG, type AutoLayoutConfig, type AutoLayoutModel, type AutoLayoutPaper, type AutoLayoutPaperResult, type AutoLayoutPlacement, type AutoLayoutProps, type AutoLayoutRef, type AutoLayoutResult, type AutoLayoutThemeConfig, BECF_1010A_DEFAULT_ATTRIBUTES, BECF_1030A_DEFAULT_ATTRIBUTES, BECF_1040A_DEFAULT_ATTRIBUTES, BECF_11D01_DEFAULT_ATTRIBUTES, BECF_12101_DEFAULT_ATTRIBUTES, BECF_12109_DEFAULT_ATTRIBUTES, type CartonBag12109Attributes, type CartonBagAttributes, Colorbar, type ColorbarProps, DIE_LINE_LAYOUT, type DieLineLayoutProps, type DieLineLayoutRef, type ExportImageOptions$5 as ExportImageOptions, type GetAttributesResult$5 as GetAttributesResult, Gripper, type GripperProps, type GripperSide, MODEL_BECF_1010A, MODEL_BECF_1030A, MODEL_BECF_1040A, MODEL_BECF_11D01, MODEL_BECF_12101, MODEL_BECF_12109, MODEL_THEME_CONFIG, type ModelBecf1010aProps, type CanvasBecf1010aRef as ModelBecf1010aRef, type ModelBecf1030aProps, type CanvasBecf1030aRef as ModelBecf1030aRef, type ModelBecf1040aProps, type CanvasBecf1040aRef as ModelBecf1040aRef, type ModelBecf11d01Props, type CanvasBecf11d01Ref as ModelBecf11d01Ref, type ModelBecf12101Props, type CanvasBecf12101Ref as ModelBecf12101Ref, type ModelBecf12109Props, type CanvasBecf12109Ref as ModelBecf12109Ref, type ModelMode, type ModelThemeConfig, type PackagingModel, type StandardBoxAttributes, type TuckEndBoxAttributes$2 as TuckEndBoxAttributes, type UltimatePackagingConfig, appendColorbarToSvg, appendGripperToSvg, calculateAutoLayout, configurePackaging, modelList };
560
+ export { AUTO_LAYOUT, AUTO_LAYOUT_THEME_CONFIG, type AutoLayoutConfig, type AutoLayoutModel, type AutoLayoutPaper, type AutoLayoutPaperResult, type AutoLayoutPlacement, type AutoLayoutProps, type AutoLayoutRef, type AutoLayoutResult, type AutoLayoutThemeConfig, BECF_1010A_DEFAULT_ATTRIBUTES, BECF_1030A_DEFAULT_ATTRIBUTES, BECF_1040A_DEFAULT_ATTRIBUTES, BECF_11D01_DEFAULT_ATTRIBUTES, BECF_12101_DEFAULT_ATTRIBUTES, BECF_12109_DEFAULT_ATTRIBUTES, BECF_C_12101_DEFAULT_ATTRIBUTES, BECF_C_12109_DEFAULT_ATTRIBUTES, type CartonBag12109Attributes, type CartonBagAttributes, type CartonBagC12101Attributes, type CartonBagC12109Attributes, Colorbar, type ColorbarProps, DIE_LINE_LAYOUT, type DieLineLayoutProps, type DieLineLayoutRef, type ExportImageOptions$7 as ExportImageOptions, type GetAttributesResult$7 as GetAttributesResult, Gripper, type GripperProps, type GripperSide, MODEL_BECF_1010A, MODEL_BECF_1030A, MODEL_BECF_1040A, MODEL_BECF_11D01, MODEL_BECF_12101, MODEL_BECF_12109, MODEL_BECF_C_12101, MODEL_BECF_C_12109, MODEL_THEME_CONFIG, type ModelBecf1010aProps, type CanvasBecf1010aRef as ModelBecf1010aRef, type ModelBecf1030aProps, type CanvasBecf1030aRef as ModelBecf1030aRef, type ModelBecf1040aProps, type CanvasBecf1040aRef as ModelBecf1040aRef, type ModelBecf11d01Props, type CanvasBecf11d01Ref as ModelBecf11d01Ref, type ModelBecf12101Props, type CanvasBecf12101Ref as ModelBecf12101Ref, type ModelBecf12109Props, type CanvasBecf12109Ref as ModelBecf12109Ref, type ModelBecfC12101Props, type CanvasBecfC12101Ref as ModelBecfC12101Ref, type ModelBecfC12109Props, type CanvasBecfC12109Ref as ModelBecfC12109Ref, type ModelMode, type ModelThemeConfig, type PackagingModel, type StandardBoxAttributes, type TuckEndBoxAttributes$2 as TuckEndBoxAttributes, type UltimatePackagingConfig, appendColorbarToSvg, appendGripperToSvg, calculateAutoLayout, configurePackaging, modelList };