labellife-design-tool 1.0.7 → 1.0.8
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 +106 -0
- package/dist/lib/lib/index.js +10 -2
- package/dist/lib/wordpress.js +10 -2
- package/dist/types/CanvasEditor.d.ts +1 -0
- package/dist/types/CanvasEditor.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/lib/CanvasEditor.d.ts +0 -17
- package/dist/lib/CanvasEditor.d.ts.map +0 -1
- package/dist/lib/components/Header.d.ts +0 -19
- package/dist/lib/components/Header.d.ts.map +0 -1
- package/dist/lib/components/LeftMenu.d.ts +0 -13
- package/dist/lib/components/LeftMenu.d.ts.map +0 -1
- package/dist/lib/components/TemplateInputModal.d.ts +0 -10
- package/dist/lib/components/TemplateInputModal.d.ts.map +0 -1
- package/dist/lib/components/header/AppName.d.ts +0 -7
- package/dist/lib/components/header/AppName.d.ts.map +0 -1
- package/dist/lib/components/header/ExportButton.d.ts +0 -8
- package/dist/lib/components/header/ExportButton.d.ts.map +0 -1
- package/dist/lib/components/header/HistoryControls.d.ts +0 -10
- package/dist/lib/components/header/HistoryControls.d.ts.map +0 -1
- package/dist/lib/components/header/ZoomControls.d.ts +0 -10
- package/dist/lib/components/header/ZoomControls.d.ts.map +0 -1
- package/dist/lib/components/sidebar/RightSidebar.d.ts +0 -16
- package/dist/lib/components/sidebar/RightSidebar.d.ts.map +0 -1
- package/dist/lib/config.d.ts +0 -11
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/constants/CanvasPresets.d.ts +0 -6
- package/dist/lib/constants/CanvasPresets.d.ts.map +0 -1
- package/dist/lib/constants/DefaultColors.d.ts +0 -2
- package/dist/lib/constants/DefaultColors.d.ts.map +0 -1
- package/dist/lib/constants/FontFamilies.d.ts +0 -2
- package/dist/lib/constants/FontFamilies.d.ts.map +0 -1
- package/dist/lib/constants/index.d.ts +0 -4
- package/dist/lib/constants/index.d.ts.map +0 -1
- package/dist/lib/constants/themes.d.ts +0 -17
- package/dist/lib/constants/themes.d.ts.map +0 -1
- package/dist/lib/elements/EditableTextElement.d.ts +0 -10
- package/dist/lib/elements/EditableTextElement.d.ts.map +0 -1
- package/dist/lib/elements/ShapeElement.d.ts +0 -10
- package/dist/lib/elements/ShapeElement.d.ts.map +0 -1
- package/dist/lib/elements/UrlImageElement.d.ts +0 -10
- package/dist/lib/elements/UrlImageElement.d.ts.map +0 -1
- package/dist/lib/elements/index.d.ts +0 -4
- package/dist/lib/elements/index.d.ts.map +0 -1
- package/dist/lib/index.js +0 -4429
- package/dist/lib/lib/index.d.ts +0 -11
- package/dist/lib/lib/index.d.ts.map +0 -1
- package/dist/lib/panels/BackgroundPanel.d.ts +0 -11
- package/dist/lib/panels/BackgroundPanel.d.ts.map +0 -1
- package/dist/lib/panels/DesignPanel.d.ts +0 -15
- package/dist/lib/panels/DesignPanel.d.ts.map +0 -1
- package/dist/lib/panels/ElementPanel.d.ts +0 -8
- package/dist/lib/panels/ElementPanel.d.ts.map +0 -1
- package/dist/lib/panels/ExportPanel.d.ts +0 -10
- package/dist/lib/panels/ExportPanel.d.ts.map +0 -1
- package/dist/lib/panels/ImagePanel.d.ts +0 -13
- package/dist/lib/panels/ImagePanel.d.ts.map +0 -1
- package/dist/lib/panels/TextPanel.d.ts +0 -11
- package/dist/lib/panels/TextPanel.d.ts.map +0 -1
- package/dist/lib/panels/VariablesPanel.d.ts +0 -11
- package/dist/lib/panels/VariablesPanel.d.ts.map +0 -1
- package/dist/lib/types/CanvasDesign.d.ts +0 -13
- package/dist/lib/types/CanvasDesign.d.ts.map +0 -1
- package/dist/lib/types/CanvasEditor.d.ts +0 -6
- package/dist/lib/types/CanvasEditor.d.ts.map +0 -1
- package/dist/lib/types/CanvasEditorRef.d.ts +0 -28
- package/dist/lib/types/CanvasEditorRef.d.ts.map +0 -1
- package/dist/lib/types/CanvasElement.d.ts +0 -80
- package/dist/lib/types/CanvasElement.d.ts.map +0 -1
- package/dist/lib/types/Config.d.ts +0 -40
- package/dist/lib/types/Config.d.ts.map +0 -1
- package/dist/lib/types/Feature.d.ts +0 -4
- package/dist/lib/types/Feature.d.ts.map +0 -1
- package/dist/lib/types/MenuElement.d.ts +0 -7
- package/dist/lib/types/MenuElement.d.ts.map +0 -1
- package/dist/lib/types/Page.d.ts +0 -9
- package/dist/lib/types/Page.d.ts.map +0 -1
- package/dist/lib/types/Panel.d.ts +0 -17
- package/dist/lib/types/Panel.d.ts.map +0 -1
- package/dist/lib/types/ShapeType.d.ts +0 -2
- package/dist/lib/types/ShapeType.d.ts.map +0 -1
- package/dist/lib/types/Theme.d.ts +0 -38
- package/dist/lib/types/Theme.d.ts.map +0 -1
- package/dist/lib/types/ToolType.d.ts +0 -3
- package/dist/lib/types/ToolType.d.ts.map +0 -1
- package/dist/lib/types/UnsplashSearchResult.d.ts +0 -11
- package/dist/lib/types/UnsplashSearchResult.d.ts.map +0 -1
- package/dist/lib/types/UserInput.d.ts +0 -21
- package/dist/lib/types/UserInput.d.ts.map +0 -1
- package/dist/lib/types/index.d.ts +0 -13
- package/dist/lib/types/index.d.ts.map +0 -1
- package/dist/lib/utils/exportImportUtils.d.ts +0 -35
- package/dist/lib/utils/exportImportUtils.d.ts.map +0 -1
- package/dist/lib/utils/objectUtils.d.ts +0 -11
- package/dist/lib/utils/objectUtils.d.ts.map +0 -1
- package/dist/lib/utils/themeUtils.d.ts +0 -8
- package/dist/lib/utils/themeUtils.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -116,6 +116,112 @@ The `CanvasEditorRef` interface provides the following properties and methods:
|
|
|
116
116
|
- `exportToJPG()`: Export the canvas to a JPG file
|
|
117
117
|
- `exportToJSON()`: Export the design to a JSON file
|
|
118
118
|
- `getDesign()`: Get the current design object
|
|
119
|
+
- `setCanvasSize(width, height)`: Set the canvas dimensions programmatically
|
|
120
|
+
|
|
121
|
+
### Canvas Size Management
|
|
122
|
+
|
|
123
|
+
The `setCanvasSize` method allows you to programmatically change the canvas dimensions. This is useful for responsive designs, template switching, or custom size inputs.
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
import { useRef } from 'react';
|
|
127
|
+
import { CanvasEditor, CanvasEditorRef } from 'labellife-design-tool';
|
|
128
|
+
|
|
129
|
+
function CanvasSizeExample() {
|
|
130
|
+
const editorRef = useRef<CanvasEditorRef>(null);
|
|
131
|
+
|
|
132
|
+
const handleSizeChange = (width: number, height: number) => {
|
|
133
|
+
if (editorRef.current) {
|
|
134
|
+
// Set canvas to custom dimensions
|
|
135
|
+
editorRef.current.setCanvasSize(width, height);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const presetSizes = [
|
|
140
|
+
{ name: 'Instagram Post', width: 1080, height: 1080 },
|
|
141
|
+
{ name: 'Instagram Story', width: 1080, height: 1920 },
|
|
142
|
+
{ name: 'Facebook Post', width: 1200, height: 630 },
|
|
143
|
+
{ name: 'YouTube Thumbnail', width: 1280, height: 720 },
|
|
144
|
+
];
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<div>
|
|
148
|
+
<CanvasEditor
|
|
149
|
+
ref={editorRef}
|
|
150
|
+
name="Resizable Canvas"
|
|
151
|
+
config={{
|
|
152
|
+
export: { png: true, jpg: true, json: true },
|
|
153
|
+
}}
|
|
154
|
+
/>
|
|
155
|
+
|
|
156
|
+
<div className="size-controls">
|
|
157
|
+
<h3>Canvas Size Controls</h3>
|
|
158
|
+
|
|
159
|
+
{/* Preset sizes */}
|
|
160
|
+
<div>
|
|
161
|
+
<h4>Preset Sizes:</h4>
|
|
162
|
+
{presetSizes.map((preset) => (
|
|
163
|
+
<button
|
|
164
|
+
key={preset.name}
|
|
165
|
+
onClick={() => handleSizeChange(preset.width, preset.height)}
|
|
166
|
+
>
|
|
167
|
+
{preset.name} ({preset.width}x{preset.height})
|
|
168
|
+
</button>
|
|
169
|
+
))}
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
{/* Custom size input */}
|
|
173
|
+
<div>
|
|
174
|
+
<h4>Custom Size:</h4>
|
|
175
|
+
<input
|
|
176
|
+
type="number"
|
|
177
|
+
placeholder="Width"
|
|
178
|
+
id="custom-width"
|
|
179
|
+
onChange={(e) => {
|
|
180
|
+
const width = parseInt(e.target.value);
|
|
181
|
+
const height = parseInt((document.getElementById('custom-height') as HTMLInputElement)?.value || '600');
|
|
182
|
+
if (width > 0) handleSizeChange(width, height);
|
|
183
|
+
}}
|
|
184
|
+
/>
|
|
185
|
+
<input
|
|
186
|
+
type="number"
|
|
187
|
+
placeholder="Height"
|
|
188
|
+
id="custom-height"
|
|
189
|
+
onChange={(e) => {
|
|
190
|
+
const height = parseInt(e.target.value);
|
|
191
|
+
const width = parseInt((document.getElementById('custom-width') as HTMLInputElement)?.value || '800');
|
|
192
|
+
if (height > 0) handleSizeChange(width, height);
|
|
193
|
+
}}
|
|
194
|
+
/>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### Function Signature
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
setCanvasSize(width: number, height: number): void
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Parameters:**
|
|
209
|
+
- `width` (number): The desired canvas width in pixels. Minimum value is 1.
|
|
210
|
+
- `height` (number): The desired canvas height in pixels. Minimum value is 1.
|
|
211
|
+
|
|
212
|
+
**Behavior:**
|
|
213
|
+
- Updates the canvas dimensions immediately
|
|
214
|
+
- Ensures minimum dimensions of 1x1 pixel to prevent invalid canvas sizes
|
|
215
|
+
- The change is persisted in the design state and included in exports
|
|
216
|
+
- Elements on the canvas maintain their relative positions
|
|
217
|
+
- The canvas is automatically re-rendered with the new dimensions
|
|
218
|
+
|
|
219
|
+
**Use Cases:**
|
|
220
|
+
- Template switching with different aspect ratios
|
|
221
|
+
- Responsive design tools
|
|
222
|
+
- Custom size input forms
|
|
223
|
+
- Batch resizing operations
|
|
224
|
+
- Integration with external size selection tools
|
|
119
225
|
|
|
120
226
|
### Advanced Usage with Types
|
|
121
227
|
|
package/dist/lib/lib/index.js
CHANGED
|
@@ -3059,6 +3059,13 @@ var CanvasEditor = forwardRef(({
|
|
|
3059
3059
|
const [pendingInputs, setPendingInputs] = useState3([]);
|
|
3060
3060
|
const [showJsonModal, setShowJsonModal] = useState3(false);
|
|
3061
3061
|
const [jsonInputText, setJsonInputText] = useState3("");
|
|
3062
|
+
const setCanvasSize = useCallback4((width, height) => {
|
|
3063
|
+
setDesign((prev) => ({
|
|
3064
|
+
...prev,
|
|
3065
|
+
width: Math.max(1, width),
|
|
3066
|
+
height: Math.max(1, height)
|
|
3067
|
+
}));
|
|
3068
|
+
}, []);
|
|
3062
3069
|
const stageRef = useRef5(null);
|
|
3063
3070
|
useImperativeHandle(ref, () => ({
|
|
3064
3071
|
stage: stageRef.current,
|
|
@@ -3071,8 +3078,9 @@ var CanvasEditor = forwardRef(({
|
|
|
3071
3078
|
exportToJPG(stageRef.current, design);
|
|
3072
3079
|
},
|
|
3073
3080
|
exportToJSON: () => exportToJSON(design),
|
|
3074
|
-
getDesign: () => design
|
|
3075
|
-
|
|
3081
|
+
getDesign: () => design,
|
|
3082
|
+
setCanvasSize
|
|
3083
|
+
}), [design, setCanvasSize]);
|
|
3076
3084
|
const fileInputRef = useRef5(null);
|
|
3077
3085
|
const jsonInputRef = useRef5(null);
|
|
3078
3086
|
const containerRef = useRef5(null);
|
package/dist/lib/wordpress.js
CHANGED
|
@@ -3059,6 +3059,13 @@ var CanvasEditor = forwardRef(({
|
|
|
3059
3059
|
const [pendingInputs, setPendingInputs] = useState3([]);
|
|
3060
3060
|
const [showJsonModal, setShowJsonModal] = useState3(false);
|
|
3061
3061
|
const [jsonInputText, setJsonInputText] = useState3("");
|
|
3062
|
+
const setCanvasSize = useCallback4((width, height) => {
|
|
3063
|
+
setDesign((prev) => ({
|
|
3064
|
+
...prev,
|
|
3065
|
+
width: Math.max(1, width),
|
|
3066
|
+
height: Math.max(1, height)
|
|
3067
|
+
}));
|
|
3068
|
+
}, []);
|
|
3062
3069
|
const stageRef = useRef5(null);
|
|
3063
3070
|
useImperativeHandle(ref, () => ({
|
|
3064
3071
|
stage: stageRef.current,
|
|
@@ -3071,8 +3078,9 @@ var CanvasEditor = forwardRef(({
|
|
|
3071
3078
|
exportToJPG(stageRef.current, design);
|
|
3072
3079
|
},
|
|
3073
3080
|
exportToJSON: () => exportToJSON(design),
|
|
3074
|
-
getDesign: () => design
|
|
3075
|
-
|
|
3081
|
+
getDesign: () => design,
|
|
3082
|
+
setCanvasSize
|
|
3083
|
+
}), [design, setCanvasSize]);
|
|
3076
3084
|
const fileInputRef = useRef5(null);
|
|
3077
3085
|
const jsonInputRef = useRef5(null);
|
|
3078
3086
|
const containerRef = useRef5(null);
|
|
@@ -8,6 +8,7 @@ export interface CanvasEditorRef {
|
|
|
8
8
|
exportToJPG: () => void;
|
|
9
9
|
exportToJSON: () => void;
|
|
10
10
|
getDesign: () => CanvasDesign;
|
|
11
|
+
setCanvasSize: (width: number, height: number) => void;
|
|
11
12
|
}
|
|
12
13
|
declare const CanvasEditor: React.ForwardRefExoticComponent<{
|
|
13
14
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAGzG,OAAO,KAAK,MAAM,OAAO,CAAC;AA0C1B,OAAO,EAEL,YAAY,EAKb,MAAM,SAAS,CAAC;AAiCjB,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAGzG,OAAO,KAAK,MAAM,OAAO,CAAC;AA0C1B,OAAO,EAEL,YAAY,EAKb,MAAM,SAAS,CAAC;AAiCjB,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,YAAY,CAAC;IAC9B,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD;AAED,QAAA,MAAM,YAAY;UAAuC,MAAM;aAAW,MAAM;yCAuoC9E,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Konva from "konva";
|
|
3
|
-
import { CanvasDesign } from "./types";
|
|
4
|
-
import { Config } from "./types/Config";
|
|
5
|
-
export interface CanvasEditorRef {
|
|
6
|
-
stage: Konva.Stage | null;
|
|
7
|
-
exportToPNG: () => void;
|
|
8
|
-
exportToJPG: () => void;
|
|
9
|
-
exportToJSON: () => void;
|
|
10
|
-
getDesign: () => CanvasDesign;
|
|
11
|
-
}
|
|
12
|
-
declare const CanvasEditor: React.ForwardRefExoticComponent<{
|
|
13
|
-
name: string;
|
|
14
|
-
config?: Config;
|
|
15
|
-
} & React.RefAttributes<CanvasEditorRef>>;
|
|
16
|
-
export default CanvasEditor;
|
|
17
|
-
//# sourceMappingURL=CanvasEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAGzG,OAAO,KAAK,MAAM,OAAO,CAAC;AAyC1B,OAAO,EAEL,YAAY,EAKb,MAAM,SAAS,CAAC;AAgCjB,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,YAAY,CAAC;CAC/B;AAED,QAAA,MAAM,YAAY;UAAuC,MAAM;aAAW,MAAM;yCA29B9E,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ActivePanelId } from '../types';
|
|
3
|
-
import { NavbarConfig } from '../types/Config';
|
|
4
|
-
export interface HeaderProps {
|
|
5
|
-
name?: string;
|
|
6
|
-
zoom: number;
|
|
7
|
-
historyIndex: number;
|
|
8
|
-
historyLength: number;
|
|
9
|
-
onUndo: () => void;
|
|
10
|
-
onRedo: () => void;
|
|
11
|
-
onZoomIn: () => void;
|
|
12
|
-
onZoomOut: () => void;
|
|
13
|
-
onZoomReset: () => void;
|
|
14
|
-
onSetActivePanel: (panel: ActivePanelId | "export") => void;
|
|
15
|
-
navbarConfig?: NavbarConfig;
|
|
16
|
-
}
|
|
17
|
-
export declare const Header: React.FC<HeaderProps>;
|
|
18
|
-
export default Header;
|
|
19
|
-
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAiB,MAAM,iBAAiB,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ,KAAK,IAAI,CAAC;IAC5D,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgKxC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ToolType, ActivePanelId } from "../types";
|
|
3
|
-
import { Config } from "../types/Config";
|
|
4
|
-
export interface LeftMenuProps {
|
|
5
|
-
tool: ToolType;
|
|
6
|
-
activePanel: ActivePanelId;
|
|
7
|
-
onSetTool: (tool: ToolType) => void;
|
|
8
|
-
onSetActivePanel: (panel: ActivePanelId) => void;
|
|
9
|
-
config?: Config;
|
|
10
|
-
}
|
|
11
|
-
export declare const LeftMenu: React.FC<LeftMenuProps>;
|
|
12
|
-
export default LeftMenu;
|
|
13
|
-
//# sourceMappingURL=LeftMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LeftMenu.d.ts","sourceRoot":"","sources":["../../../src/components/LeftMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAWzC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC,gBAAgB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqH5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { UserInputItem } from "../types/UserInput";
|
|
3
|
-
interface TemplateInputModalProps {
|
|
4
|
-
inputs: UserInputItem[];
|
|
5
|
-
onComplete: (values: Record<string, any>) => void;
|
|
6
|
-
onCancel: () => void;
|
|
7
|
-
}
|
|
8
|
-
declare const TemplateInputModal: React.FC<TemplateInputModalProps>;
|
|
9
|
-
export default TemplateInputModal;
|
|
10
|
-
//# sourceMappingURL=TemplateInputModal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateInputModal.d.ts","sourceRoot":"","sources":["../../../src/components/TemplateInputModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,UAAU,uBAAuB;IAC/B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA2ezD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppName.d.ts","sourceRoot":"","sources":["../../../../src/components/header/AppName.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAEnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ActivePanelId } from "../../types";
|
|
3
|
-
interface ExportButtonProps {
|
|
4
|
-
onSetActivePanel: (panel: ActivePanelId | "export") => void;
|
|
5
|
-
}
|
|
6
|
-
declare const ExportButton: React.FC<ExportButtonProps>;
|
|
7
|
-
export default ExportButton;
|
|
8
|
-
//# sourceMappingURL=ExportButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExportButton.d.ts","sourceRoot":"","sources":["../../../../src/components/header/ExportButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,UAAU,iBAAiB;IACzB,gBAAgB,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ,KAAK,IAAI,CAAC;CAC7D;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAW7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface HistoryControlsProps {
|
|
3
|
-
historyIndex: number;
|
|
4
|
-
historyLength: number;
|
|
5
|
-
onUndo: () => void;
|
|
6
|
-
onRedo: () => void;
|
|
7
|
-
}
|
|
8
|
-
declare const HistoryControls: React.FC<HistoryControlsProps>;
|
|
9
|
-
export default HistoryControls;
|
|
10
|
-
//# sourceMappingURL=HistoryControls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HistoryControls.d.ts","sourceRoot":"","sources":["../../../../src/components/header/HistoryControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,oBAAoB;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2BnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ZoomControlsProps {
|
|
3
|
-
zoom: number;
|
|
4
|
-
onZoomIn: () => void;
|
|
5
|
-
onZoomOut: () => void;
|
|
6
|
-
onZoomReset: () => void;
|
|
7
|
-
}
|
|
8
|
-
declare const ZoomControls: React.FC<ZoomControlsProps>;
|
|
9
|
-
export default ZoomControls;
|
|
10
|
-
//# sourceMappingURL=ZoomControls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomControls.d.ts","sourceRoot":"","sources":["../../../../src/components/header/ZoomControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmC7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CanvasElement } from "../../types";
|
|
3
|
-
interface RightSidebarProps {
|
|
4
|
-
currentPageElements: CanvasElement[];
|
|
5
|
-
selectedElement: CanvasElement | undefined | null;
|
|
6
|
-
selectedId: string | null;
|
|
7
|
-
onSelectElement: (id: string) => void;
|
|
8
|
-
onUpdateElement: (id: string, attrs: Partial<CanvasElement>) => void;
|
|
9
|
-
onDuplicateSelected: () => void;
|
|
10
|
-
onMoveElementUp: (id: string) => void;
|
|
11
|
-
onMoveElementDown: (id: string) => void;
|
|
12
|
-
onDeleteSelected: () => void;
|
|
13
|
-
}
|
|
14
|
-
declare const RightSidebar: React.FC<RightSidebarProps>;
|
|
15
|
-
export default RightSidebar;
|
|
16
|
-
//# sourceMappingURL=RightSidebar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RightSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/sidebar/RightSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,UAAU,iBAAiB;IACzB,mBAAmB,EAAE,aAAa,EAAE,CAAC;IACrC,eAAe,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC;IAClD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IACrE,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqL7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/dist/lib/config.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const UNSPLASH_ACCESS_KEY: string;
|
|
2
|
-
/**
|
|
3
|
-
* Set the Unsplash API access key programmatically
|
|
4
|
-
* @param key - Your Unsplash API access key
|
|
5
|
-
*/
|
|
6
|
-
export declare function setUnsplashAccessKey(key: string): void;
|
|
7
|
-
/**
|
|
8
|
-
* Get the current Unsplash API access key
|
|
9
|
-
*/
|
|
10
|
-
export declare function getUnsplashAccessKey(): string | undefined;
|
|
11
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/lib/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,mBAAmB,QAAwD,CAAC;AAEzF;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,SAAS,CAEzD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasPresets.d.ts","sourceRoot":"","sources":["../../../src/constants/CanvasPresets.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc;;;;GAS1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultColors.d.ts","sourceRoot":"","sources":["../../../src/constants/DefaultColors.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,UAgB1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FontFamilies.d.ts","sourceRoot":"","sources":["../../../src/constants/FontFamilies.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,UAczB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default theme configurations for LabelLife Design Tool
|
|
3
|
-
*/
|
|
4
|
-
import { ThemeColors } from '../types/Theme';
|
|
5
|
-
/**
|
|
6
|
-
* Default dark theme (matches current styling)
|
|
7
|
-
*/
|
|
8
|
-
export declare const DEFAULT_THEME: ThemeColors;
|
|
9
|
-
/**
|
|
10
|
-
* Light theme variant
|
|
11
|
-
*/
|
|
12
|
-
export declare const LIGHT_THEME: ThemeColors;
|
|
13
|
-
/**
|
|
14
|
-
* Dark theme variant with higher contrast
|
|
15
|
-
*/
|
|
16
|
-
export declare const DARK_THEME: ThemeColors;
|
|
17
|
-
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../src/constants/themes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,WA6B3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,WA6BzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,WA6BxB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CanvasElement } from "../types/CanvasElement";
|
|
3
|
-
export declare const EditableTextElement: React.FC<{
|
|
4
|
-
element: CanvasElement;
|
|
5
|
-
isSelected: boolean;
|
|
6
|
-
onSelect: () => void;
|
|
7
|
-
onChange: (attrs: Partial<CanvasElement>) => void;
|
|
8
|
-
}>;
|
|
9
|
-
export default EditableTextElement;
|
|
10
|
-
//# sourceMappingURL=EditableTextElement.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditableTextElement.d.ts","sourceRoot":"","sources":["../../../src/elements/EditableTextElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAuBvD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;CACnD,CAgNA,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CanvasElement } from "../types/CanvasElement";
|
|
3
|
-
export declare const ShapeElement: React.FC<{
|
|
4
|
-
element: CanvasElement;
|
|
5
|
-
isSelected: boolean;
|
|
6
|
-
onSelect: () => void;
|
|
7
|
-
onChange: (attrs: Partial<CanvasElement>) => void;
|
|
8
|
-
}>;
|
|
9
|
-
export default ShapeElement;
|
|
10
|
-
//# sourceMappingURL=ShapeElement.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeElement.d.ts","sourceRoot":"","sources":["../../../src/elements/ShapeElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAcjD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;CACnD,CA+YA,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CanvasElement } from "../types";
|
|
3
|
-
export declare const UrlImageElement: React.FC<{
|
|
4
|
-
element: CanvasElement;
|
|
5
|
-
isSelected: boolean;
|
|
6
|
-
onSelect: () => void;
|
|
7
|
-
onChange: (attrs: Partial<CanvasElement>) => void;
|
|
8
|
-
}>;
|
|
9
|
-
export default UrlImageElement;
|
|
10
|
-
//# sourceMappingURL=UrlImageElement.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UrlImageElement.d.ts","sourceRoot":"","sources":["../../../src/elements/UrlImageElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAIxE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IACrC,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;CACnD,CA6cA,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
|