@arbisoft/react-design-tool 1.0.48 → 1.0.50
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/README.md +65 -3
- package/dist/cjs/index.js +1292 -614
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1293 -615
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,13 +40,13 @@ yarn add @arbisoft/react-design-tool
|
|
|
40
40
|
#### ⚠️ Important: Installation Guide for React 18 and Below
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npm install @arbisoft/react-design-tool@1.0.
|
|
43
|
+
npm install @arbisoft/react-design-tool@1.0.49
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
OR
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
yarn add @arbisoft/react-design-tool@1.0.
|
|
49
|
+
yarn add @arbisoft/react-design-tool@1.0.49
|
|
50
50
|
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -413,4 +413,66 @@ Used to set configure allowed images formats for our gallert
|
|
|
413
413
|
|
|
414
414
|
```jsx
|
|
415
415
|
<Studio allowedFormats={['png', 'jpg']} />
|
|
416
|
-
```
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### (New) QR ID Controls
|
|
419
|
+
|
|
420
|
+
#### 24. `showQrIdToggle` (Boolean)
|
|
421
|
+
|
|
422
|
+
Shows the **“Show QR ID”** toggle in the Templates sidebar.
|
|
423
|
+
If `true`, the user can add/remove a QR ID text element on the canvas.
|
|
424
|
+
|
|
425
|
+
**Example:**
|
|
426
|
+
```jsx
|
|
427
|
+
<Studio showQrIdToggle />
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
#### 25. `qrId` (String | Number)
|
|
431
|
+
|
|
432
|
+
The value to render as the **QR ID** when the “Show QR ID” toggle is enabled.
|
|
433
|
+
|
|
434
|
+
- If `qrId` is falsy (`null`, `undefined`, `''`, `0`), enabling the toggle will **not** add the QR ID text.
|
|
435
|
+
- When toggled off and back on, the QR ID text is restored with the **last used** position/style (cached).
|
|
436
|
+
|
|
437
|
+
**Example:**
|
|
438
|
+
```jsx
|
|
439
|
+
<Studio
|
|
440
|
+
showQrIdToggle
|
|
441
|
+
qrId="FA-98231"
|
|
442
|
+
/>
|
|
443
|
+
```
|
|
444
|
+
#### 26. `qrIdText` (Object)
|
|
445
|
+
|
|
446
|
+
Controls the **initial placement and appearance** of the QR ID text *only on first insert*.
|
|
447
|
+
If the user later moves/edits it and toggles off/on, the element is restored from cache (last known position/style), so these options won’t re-apply until no cached version exists.
|
|
448
|
+
|
|
449
|
+
> **Coordinates are in base canvas units** (unscaled page size, not affected by zoom).
|
|
450
|
+
|
|
451
|
+
| Field | Type | Default | Description |
|
|
452
|
+
|-------------|----------------------------------|-------------|-----------------------------------------------------------------------------------------------|
|
|
453
|
+
| `x` | `number` | — | **Required** for custom placement. X position (base canvas units). |
|
|
454
|
+
| `y` | `number` | — | **Required** for custom placement. Y position (base canvas units). |
|
|
455
|
+
| `color` | `string` | theme text | Text color (e.g., `'#111'`, `'rgba(255,255,255,0.9)'`). |
|
|
456
|
+
| `width` | `number` | `240` | Text box width (enables neat alignment). |
|
|
457
|
+
| `textAlign` | `'left' \| 'center' \| 'right'` | `'center'` | Horizontal alignment within the text box. |
|
|
458
|
+
| `pill` | `boolean` | `false` | If `true`, renders a subtle rounded pill behind the text for readability. |
|
|
459
|
+
| `pillColor` | `string` | auto | Pill fill color. If omitted (and `pill: true`), a sensible default is chosen from text color. |
|
|
460
|
+
| `outline` | `boolean` | `false` | If `true`, adds a thin text stroke and soft shadow for contrast on busy/dark backgrounds. |
|
|
461
|
+
|
|
462
|
+
**Example:**
|
|
463
|
+
```jsx
|
|
464
|
+
<Studio
|
|
465
|
+
showQrIdToggle
|
|
466
|
+
qrId="LOT-22-7B"
|
|
467
|
+
qrIdText={{
|
|
468
|
+
x: 420, // base canvas coords (unscaled)
|
|
469
|
+
y: 760,
|
|
470
|
+
width: 180,
|
|
471
|
+
textAlign: 'right',
|
|
472
|
+
color: '#FFFFFF',
|
|
473
|
+
pill: true,
|
|
474
|
+
pillColor: 'rgba(0,0,0,0.45)',
|
|
475
|
+
outline: true,
|
|
476
|
+
}}
|
|
477
|
+
/>
|
|
478
|
+
```
|