labellife-design-tool 0.2.0 → 0.4.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.
- package/README.md +50 -328
- package/dist/lib/CanvasEditor.d.ts.map +1 -1
- package/dist/lib/components/Header.d.ts.map +1 -1
- package/dist/lib/components/LeftMenu.d.ts +1 -2
- package/dist/lib/components/LeftMenu.d.ts.map +1 -1
- package/dist/lib/components/TemplateInputModal.d.ts.map +1 -1
- package/dist/lib/components/header/AppName.d.ts.map +1 -1
- package/dist/lib/components/header/ExportButton.d.ts.map +1 -1
- package/dist/lib/components/header/HistoryControls.d.ts.map +1 -1
- package/dist/lib/components/header/ZoomControls.d.ts.map +1 -1
- package/dist/lib/components/sidebar/RightSidebar.d.ts.map +1 -1
- package/dist/lib/constants/themes.d.ts +17 -0
- package/dist/lib/constants/themes.d.ts.map +1 -0
- package/dist/lib/contexts/ThemeContext.d.ts +21 -0
- package/dist/lib/contexts/ThemeContext.d.ts.map +1 -0
- package/dist/lib/index.css +34 -83
- package/dist/lib/index.js +705 -761
- package/dist/lib/lib/index.d.ts +0 -4
- package/dist/lib/lib/index.d.ts.map +1 -1
- package/dist/lib/types/Config.d.ts +0 -18
- package/dist/lib/types/Config.d.ts.map +1 -1
- package/dist/lib/types/Panel.d.ts +3 -33
- package/dist/lib/types/Panel.d.ts.map +1 -1
- package/dist/lib/types/Theme.d.ts +38 -0
- package/dist/lib/types/Theme.d.ts.map +1 -0
- package/dist/lib/types/ToolType.d.ts +2 -1
- package/dist/lib/types/ToolType.d.ts.map +1 -1
- package/dist/lib/utils/exportImportUtils.d.ts +11 -0
- package/dist/lib/utils/exportImportUtils.d.ts.map +1 -1
- package/dist/lib/utils/objectUtils.d.ts +11 -0
- package/dist/lib/utils/objectUtils.d.ts.map +1 -0
- package/dist/lib/utils/themeUtils.d.ts +8 -0
- package/dist/lib/utils/themeUtils.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,6 @@ Professional canvas editor built with React, TypeScript, and Konva.js. A powerfu
|
|
|
14
14
|
- 📥 **Template Import** - Import JSON templates with user input collection
|
|
15
15
|
- 🌐 **i18n Support** - Internationalization support (English, Dutch)
|
|
16
16
|
- ⚙️ **Configurable** - Customize features, panels, and behavior
|
|
17
|
-
- 🧩 **Modular Architecture** - Exclude panels, add custom panels, control features
|
|
18
17
|
|
|
19
18
|
## Installation
|
|
20
19
|
|
|
@@ -74,6 +73,9 @@ import {
|
|
|
74
73
|
CanvasDesign,
|
|
75
74
|
Config,
|
|
76
75
|
exportToPNG,
|
|
76
|
+
exportToJPG,
|
|
77
|
+
exportToJSON,
|
|
78
|
+
canvasToBlob,
|
|
77
79
|
importFromJSON
|
|
78
80
|
} from 'labellife-design-tool';
|
|
79
81
|
import type { CanvasElement } from 'labellife-design-tool';
|
|
@@ -89,333 +91,6 @@ function MyEditor() {
|
|
|
89
91
|
}
|
|
90
92
|
```
|
|
91
93
|
|
|
92
|
-
### Modular Configuration (v0.2.0+)
|
|
93
|
-
|
|
94
|
-
The library supports a modular architecture that allows you to customize panels, features, and tools.
|
|
95
|
-
|
|
96
|
-
#### Exclude Panels
|
|
97
|
-
|
|
98
|
-
Hide panels you don't need:
|
|
99
|
-
|
|
100
|
-
```tsx
|
|
101
|
-
import { CanvasEditor } from 'labellife-design-tool';
|
|
102
|
-
|
|
103
|
-
<CanvasEditor
|
|
104
|
-
name="Editor"
|
|
105
|
-
config={{
|
|
106
|
-
panels: {
|
|
107
|
-
disable: ['variables', 'export', 'background'], // Hide these panels
|
|
108
|
-
},
|
|
109
|
-
}}
|
|
110
|
-
/>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
#### Enable Only Specific Panels
|
|
114
|
-
|
|
115
|
-
Show only the panels you need:
|
|
116
|
-
|
|
117
|
-
```tsx
|
|
118
|
-
<CanvasEditor
|
|
119
|
-
name="Minimal Editor"
|
|
120
|
-
config={{
|
|
121
|
-
panels: {
|
|
122
|
-
enable: ['elements', 'text', 'image'], // Only show these three
|
|
123
|
-
},
|
|
124
|
-
}}
|
|
125
|
-
/>
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
#### Reorder Panels
|
|
129
|
-
|
|
130
|
-
Customize the panel order:
|
|
131
|
-
|
|
132
|
-
```tsx
|
|
133
|
-
<CanvasEditor
|
|
134
|
-
name="Custom Order"
|
|
135
|
-
config={{
|
|
136
|
-
panels: {
|
|
137
|
-
order: ['text', 'elements', 'image', 'design'], // Custom order
|
|
138
|
-
},
|
|
139
|
-
}}
|
|
140
|
-
/>
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
#### Feature Flags
|
|
144
|
-
|
|
145
|
-
Control which features are available:
|
|
146
|
-
|
|
147
|
-
```tsx
|
|
148
|
-
<CanvasEditor
|
|
149
|
-
name="No Unsplash"
|
|
150
|
-
config={{
|
|
151
|
-
features: {
|
|
152
|
-
unsplash: false, // Disable Unsplash integration
|
|
153
|
-
imageUpload: true, // Keep image upload enabled
|
|
154
|
-
textTools: true, // Keep text tools enabled
|
|
155
|
-
shapeTools: false, // Disable shape tools
|
|
156
|
-
},
|
|
157
|
-
}}
|
|
158
|
-
/>
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
#### Tool Configuration
|
|
162
|
-
|
|
163
|
-
Control which tools are available:
|
|
164
|
-
|
|
165
|
-
```tsx
|
|
166
|
-
<CanvasEditor
|
|
167
|
-
name="Limited Tools"
|
|
168
|
-
config={{
|
|
169
|
-
tools: {
|
|
170
|
-
disable: ['line'], // Disable line tool
|
|
171
|
-
// Or enable only specific tools:
|
|
172
|
-
// enable: ['select', 'text'],
|
|
173
|
-
},
|
|
174
|
-
}}
|
|
175
|
-
/>
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### Adding Custom Panels
|
|
179
|
-
|
|
180
|
-
You can add your own custom panels to extend the editor's functionality.
|
|
181
|
-
|
|
182
|
-
#### Step 1: Create Your Custom Panel Component
|
|
183
|
-
|
|
184
|
-
```tsx
|
|
185
|
-
import React from 'react';
|
|
186
|
-
import { PanelProps } from 'labellife-design-tool';
|
|
187
|
-
import { Settings } from 'lucide-react';
|
|
188
|
-
|
|
189
|
-
// Your custom panel component receives PanelProps
|
|
190
|
-
const MyCustomPanel: React.FC<PanelProps> = ({
|
|
191
|
-
design, // Current design state
|
|
192
|
-
currentPage, // Current page
|
|
193
|
-
selectedElement, // Currently selected element (or null)
|
|
194
|
-
selectedIds, // Array of selected element IDs
|
|
195
|
-
setDesign, // Function to update the design
|
|
196
|
-
updateElement, // Function to update an element
|
|
197
|
-
deleteElement, // Optional: Function to delete an element
|
|
198
|
-
}) => {
|
|
199
|
-
return (
|
|
200
|
-
<div className="p-4">
|
|
201
|
-
<h3 className="text-white font-semibold mb-4 flex items-center gap-2">
|
|
202
|
-
<Settings className="w-5 h-5" />
|
|
203
|
-
Custom Settings
|
|
204
|
-
</h3>
|
|
205
|
-
|
|
206
|
-
<div className="space-y-4">
|
|
207
|
-
{/* Display current design info */}
|
|
208
|
-
<div className="bg-gray-700 p-3 rounded">
|
|
209
|
-
<p className="text-sm text-gray-300">
|
|
210
|
-
Design: {design.name}
|
|
211
|
-
</p>
|
|
212
|
-
<p className="text-sm text-gray-300">
|
|
213
|
-
Pages: {design.pages.length}
|
|
214
|
-
</p>
|
|
215
|
-
<p className="text-sm text-gray-300">
|
|
216
|
-
Selected: {selectedElement?.name || 'None'}
|
|
217
|
-
</p>
|
|
218
|
-
</div>
|
|
219
|
-
|
|
220
|
-
{/* Custom actions */}
|
|
221
|
-
<button
|
|
222
|
-
onClick={() => {
|
|
223
|
-
setDesign({
|
|
224
|
-
...design,
|
|
225
|
-
name: `Updated at ${new Date().toLocaleTimeString()}`,
|
|
226
|
-
});
|
|
227
|
-
}}
|
|
228
|
-
className="w-full bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700"
|
|
229
|
-
>
|
|
230
|
-
Update Design Name
|
|
231
|
-
</button>
|
|
232
|
-
|
|
233
|
-
{/* Update selected element */}
|
|
234
|
-
{selectedElement && (
|
|
235
|
-
<button
|
|
236
|
-
onClick={() => {
|
|
237
|
-
updateElement(selectedElement.id, {
|
|
238
|
-
opacity: selectedElement.opacity === 1 ? 0.5 : 1,
|
|
239
|
-
});
|
|
240
|
-
}}
|
|
241
|
-
className="w-full bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700"
|
|
242
|
-
>
|
|
243
|
-
Toggle Opacity
|
|
244
|
-
</button>
|
|
245
|
-
)}
|
|
246
|
-
</div>
|
|
247
|
-
</div>
|
|
248
|
-
);
|
|
249
|
-
};
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
#### Step 2: Configure and Add Your Custom Panel
|
|
253
|
-
|
|
254
|
-
```tsx
|
|
255
|
-
import { CanvasEditor, CustomPanelConfig } from 'labellife-design-tool';
|
|
256
|
-
import { Settings } from 'lucide-react';
|
|
257
|
-
import { MyCustomPanel } from './MyCustomPanel';
|
|
258
|
-
|
|
259
|
-
// Define your custom panel configuration
|
|
260
|
-
const customPanel: CustomPanelConfig = {
|
|
261
|
-
id: 'my-custom-panel', // Unique ID (must not conflict with built-in panels)
|
|
262
|
-
title: 'Custom Settings', // Title shown in the panel header
|
|
263
|
-
icon: Settings, // Optional: Icon component (from lucide-react or custom)
|
|
264
|
-
component: MyCustomPanel, // Your panel component
|
|
265
|
-
|
|
266
|
-
// Positioning options (choose one):
|
|
267
|
-
position: 'after', // 'before' | 'after' | number
|
|
268
|
-
afterPanel: 'text', // Insert after 'text' panel
|
|
269
|
-
// Or use:
|
|
270
|
-
// beforePanel: 'design', // Insert before 'design' panel
|
|
271
|
-
// position: 2, // Insert at index 2
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
// Use it in your editor
|
|
275
|
-
function App() {
|
|
276
|
-
return (
|
|
277
|
-
<CanvasEditor
|
|
278
|
-
name="My Editor"
|
|
279
|
-
config={{
|
|
280
|
-
panels: {
|
|
281
|
-
custom: [customPanel], // Add your custom panel
|
|
282
|
-
},
|
|
283
|
-
}}
|
|
284
|
-
/>
|
|
285
|
-
);
|
|
286
|
-
}
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
#### Panel Positioning Options
|
|
290
|
-
|
|
291
|
-
You can control where your custom panel appears:
|
|
292
|
-
|
|
293
|
-
```tsx
|
|
294
|
-
// Position after a specific panel
|
|
295
|
-
{
|
|
296
|
-
id: 'panel-after',
|
|
297
|
-
position: 'after',
|
|
298
|
-
afterPanel: 'text' // Appears after 'text' panel
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
// Position before a specific panel
|
|
302
|
-
{
|
|
303
|
-
id: 'panel-before',
|
|
304
|
-
position: 'before',
|
|
305
|
-
beforePanel: 'design' // Appears before 'design' panel
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// Position at a specific index
|
|
309
|
-
{
|
|
310
|
-
id: 'panel-index',
|
|
311
|
-
position: 2 // Appears at index 2 (0-based)
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// Default: Add to end (no position specified)
|
|
315
|
-
{
|
|
316
|
-
id: 'panel-end'
|
|
317
|
-
}
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
#### Complete Example: Custom Panel with Multiple Features
|
|
321
|
-
|
|
322
|
-
```tsx
|
|
323
|
-
import React from 'react';
|
|
324
|
-
import { CanvasEditor, CustomPanelConfig, PanelProps } from 'labellife-design-tool';
|
|
325
|
-
import { Palette, Layers } from 'lucide-react';
|
|
326
|
-
|
|
327
|
-
// Custom panel that manages design colors
|
|
328
|
-
const ColorPalettePanel: React.FC<PanelProps> = ({
|
|
329
|
-
design,
|
|
330
|
-
setDesign,
|
|
331
|
-
}) => {
|
|
332
|
-
const colors = ['#FF0000', '#00FF00', '#0000FF', '#FFFF00', '#FF00FF'];
|
|
333
|
-
|
|
334
|
-
return (
|
|
335
|
-
<div className="p-4">
|
|
336
|
-
<h3 className="text-white font-semibold mb-4">Color Palette</h3>
|
|
337
|
-
<div className="grid grid-cols-5 gap-2">
|
|
338
|
-
{colors.map((color) => (
|
|
339
|
-
<button
|
|
340
|
-
key={color}
|
|
341
|
-
onClick={() => {
|
|
342
|
-
setDesign({
|
|
343
|
-
...design,
|
|
344
|
-
colors: [...(design.colors || []), color],
|
|
345
|
-
});
|
|
346
|
-
}}
|
|
347
|
-
className="w-10 h-10 rounded"
|
|
348
|
-
style={{ backgroundColor: color }}
|
|
349
|
-
title={color}
|
|
350
|
-
/>
|
|
351
|
-
))}
|
|
352
|
-
</div>
|
|
353
|
-
</div>
|
|
354
|
-
);
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
// Custom panel configuration
|
|
358
|
-
const colorPalettePanel: CustomPanelConfig = {
|
|
359
|
-
id: 'color-palette',
|
|
360
|
-
title: 'Colors',
|
|
361
|
-
icon: Palette,
|
|
362
|
-
component: ColorPalettePanel,
|
|
363
|
-
position: 'after',
|
|
364
|
-
afterPanel: 'design',
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
// Use multiple custom panels
|
|
368
|
-
function App() {
|
|
369
|
-
return (
|
|
370
|
-
<CanvasEditor
|
|
371
|
-
name="Custom Editor"
|
|
372
|
-
config={{
|
|
373
|
-
panels: {
|
|
374
|
-
custom: [colorPalettePanel], // Add custom panel
|
|
375
|
-
disable: ['variables'], // Hide variables panel
|
|
376
|
-
order: ['elements', 'text', 'color-palette', 'image'], // Custom order
|
|
377
|
-
},
|
|
378
|
-
}}
|
|
379
|
-
/>
|
|
380
|
-
);
|
|
381
|
-
}
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
#### Available Panel Props
|
|
385
|
-
|
|
386
|
-
Your custom panel component receives these props:
|
|
387
|
-
|
|
388
|
-
```tsx
|
|
389
|
-
interface PanelProps {
|
|
390
|
-
// Core editor state
|
|
391
|
-
design: CanvasDesign; // Current design
|
|
392
|
-
currentPage: Page; // Current page
|
|
393
|
-
selectedElement: CanvasElement | null; // Selected element
|
|
394
|
-
selectedIds: string[]; // Array of selected IDs
|
|
395
|
-
|
|
396
|
-
// Core editor actions
|
|
397
|
-
setDesign: (design: CanvasDesign) => void;
|
|
398
|
-
updateElement: (id: string, attrs: Partial<CanvasElement>) => void;
|
|
399
|
-
deleteElement?: (id: string) => void;
|
|
400
|
-
|
|
401
|
-
// Additional props (panel-specific)
|
|
402
|
-
[key: string]: any;
|
|
403
|
-
}
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
#### Built-in Panel IDs
|
|
407
|
-
|
|
408
|
-
Available built-in panel IDs you can reference:
|
|
409
|
-
- `'elements'` - Elements/Shapes panel
|
|
410
|
-
- `'text'` - Text panel
|
|
411
|
-
- `'image'` - Images panel
|
|
412
|
-
- `'design'` - Design panel
|
|
413
|
-
- `'background'` - Background panel
|
|
414
|
-
- `'variables'` - Variables panel (if enabled)
|
|
415
|
-
- `'export'` - Export panel (if enabled)
|
|
416
|
-
|
|
417
|
-
For more advanced examples and API documentation, see [MODULAR_USAGE_GUIDE.md](./MODULAR_USAGE_GUIDE.md).
|
|
418
|
-
|
|
419
94
|
## Development
|
|
420
95
|
|
|
421
96
|
To run the development server:
|
|
@@ -437,6 +112,53 @@ To build the app:
|
|
|
437
112
|
bun run build:app
|
|
438
113
|
```
|
|
439
114
|
|
|
115
|
+
### Canvas to Blob Export
|
|
116
|
+
|
|
117
|
+
The library provides a flexible `canvasToBlob` function that allows converting the canvas to a Blob for various use cases:
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
import { canvasToBlob } from 'labellife-design-tool';
|
|
121
|
+
|
|
122
|
+
// Example usage in a custom component
|
|
123
|
+
const handleExport = async () => {
|
|
124
|
+
if (stageRef.current) {
|
|
125
|
+
try {
|
|
126
|
+
// Get canvas as PNG blob
|
|
127
|
+
const blob = await canvasToBlob(stageRef.current, 'png', { pixelRatio: 2 });
|
|
128
|
+
|
|
129
|
+
// Example: Convert to base64
|
|
130
|
+
const reader = new FileReader();
|
|
131
|
+
reader.readAsDataURL(blob);
|
|
132
|
+
reader.onloadend = () => {
|
|
133
|
+
const base64data = reader.result;
|
|
134
|
+
console.log('Base64:', base64data);
|
|
135
|
+
|
|
136
|
+
// Use base64 data with APIs, embed in other applications, etc.
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// Example: Create File object for upload
|
|
140
|
+
const file = new File([blob], 'canvas-export.png', { type: 'image/png' });
|
|
141
|
+
|
|
142
|
+
// Example: Create object URL for display
|
|
143
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
144
|
+
// Remember to revoke URL when done
|
|
145
|
+
// URL.revokeObjectURL(blobUrl);
|
|
146
|
+
|
|
147
|
+
} catch (error) {
|
|
148
|
+
console.error('Error exporting canvas:', error);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
The `canvasToBlob` function parameters:
|
|
155
|
+
|
|
156
|
+
- `stage`: The Konva.Stage object to convert
|
|
157
|
+
- `format`: Output format ('png' or 'jpg')
|
|
158
|
+
- `options`: Additional options object
|
|
159
|
+
- `quality`: Quality for JPG format (0-1)
|
|
160
|
+
- `pixelRatio`: Resolution multiplier (default: 2)
|
|
161
|
+
|
|
440
162
|
## Project Structure
|
|
441
163
|
|
|
442
164
|
- `src/lib/index.ts` - Library entry point (npm package)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAmFxE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CA68B7D,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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;AAEzC,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;CAC7D;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
|
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;AAEzC,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;CAC7D;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0DxC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ToolType, ActivePanelId
|
|
2
|
+
import { ToolType, ActivePanelId } from "../types";
|
|
3
3
|
import { Config } from "../types/Config";
|
|
4
4
|
export interface LeftMenuProps {
|
|
5
5
|
tool: ToolType;
|
|
@@ -7,7 +7,6 @@ export interface LeftMenuProps {
|
|
|
7
7
|
onSetTool: (tool: ToolType) => void;
|
|
8
8
|
onSetActivePanel: (panel: ActivePanelId) => void;
|
|
9
9
|
config?: Config;
|
|
10
|
-
panels?: PanelConfig[];
|
|
11
10
|
}
|
|
12
11
|
export declare const LeftMenu: React.FC<LeftMenuProps>;
|
|
13
12
|
export default LeftMenu;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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 +1 @@
|
|
|
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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppName.d.ts","sourceRoot":"","sources":["../../../../src/components/header/AppName.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppName.d.ts","sourceRoot":"","sources":["../../../../src/components/header/AppName.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAGpB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HistoryControls.d.ts","sourceRoot":"","sources":["../../../../src/components/header/HistoryControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomControls.d.ts","sourceRoot":"","sources":["../../../../src/components/header/ZoomControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
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 +1 @@
|
|
|
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,
|
|
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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ThemeColors, ThemeConfig } from '../types/Theme';
|
|
3
|
+
/**
|
|
4
|
+
* Theme context type
|
|
5
|
+
*/
|
|
6
|
+
interface ThemeContextType {
|
|
7
|
+
theme: ThemeColors;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hook to access the current theme
|
|
11
|
+
*/
|
|
12
|
+
export declare const useTheme: () => ThemeContextType;
|
|
13
|
+
/**
|
|
14
|
+
* Theme provider component
|
|
15
|
+
*/
|
|
16
|
+
export declare const ThemeProvider: React.FC<{
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
themeConfig?: ThemeConfig;
|
|
19
|
+
}>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI1D;;GAEG;AACH,UAAU,gBAAgB;IACxB,KAAK,EAAE,WAAW,CAAC;CACpB;AASD;;GAEG;AACH,eAAO,MAAM,QAAQ,wBAAiC,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAYA,CAAC"}
|