labellife-design-tool 0.1.0 → 0.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.
- package/README.md +392 -0
- 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 +2 -1
- 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/i18n.d.ts +9 -0
- package/dist/lib/i18n.d.ts.map +1 -0
- package/dist/lib/index.css +82 -38
- package/dist/lib/index.js +1193 -460
- package/dist/lib/lib/index.d.ts +9 -0
- package/dist/lib/lib/index.d.ts.map +1 -1
- package/dist/lib/registry/BuiltInPanels.d.ts +36 -0
- package/dist/lib/registry/BuiltInPanels.d.ts.map +1 -0
- package/dist/lib/registry/PanelRegistry.d.ts +58 -0
- package/dist/lib/registry/PanelRegistry.d.ts.map +1 -0
- package/dist/lib/types/Config.d.ts +24 -0
- package/dist/lib/types/Config.d.ts.map +1 -1
- package/dist/lib/types/Panel.d.ts +33 -3
- 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 +1 -2
- package/dist/lib/types/ToolType.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,6 +14,7 @@ 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
|
|
17
18
|
|
|
18
19
|
## Installation
|
|
19
20
|
|
|
@@ -88,6 +89,397 @@ function MyEditor() {
|
|
|
88
89
|
}
|
|
89
90
|
```
|
|
90
91
|
|
|
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
|
+
#### Template Input Configuration
|
|
179
|
+
|
|
180
|
+
Control how template input dialogs behave when importing templates:
|
|
181
|
+
|
|
182
|
+
```tsx
|
|
183
|
+
<CanvasEditor
|
|
184
|
+
name="Optional Template Inputs"
|
|
185
|
+
config={{
|
|
186
|
+
templateInput: {
|
|
187
|
+
show: true, // Whether to show the input dialog (default: true)
|
|
188
|
+
required: false, // Whether input fields are required (default: true)
|
|
189
|
+
}
|
|
190
|
+
}}
|
|
191
|
+
/>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Options:
|
|
195
|
+
- `show`: When set to `false`, no input dialog will appear when importing templates, and all template variables will remain as placeholders.
|
|
196
|
+
- `required`: When set to `false`, all input fields in the dialog will be marked as optional, allowing users to skip them if desired.
|
|
197
|
+
|
|
198
|
+
#### Theme Customization
|
|
199
|
+
|
|
200
|
+
Customize the visual appearance with themes:
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
<CanvasEditor
|
|
204
|
+
name="Custom Theme"
|
|
205
|
+
config={{
|
|
206
|
+
theme: {
|
|
207
|
+
colors: {
|
|
208
|
+
primary: '#10b981', // Green instead of blue
|
|
209
|
+
background: {
|
|
210
|
+
main: '#1e293b', // Slate-800
|
|
211
|
+
sidebar: '#0f172a', // Slate-900
|
|
212
|
+
},
|
|
213
|
+
button: {
|
|
214
|
+
primary: {
|
|
215
|
+
background: '#10b981', // Green-600
|
|
216
|
+
hover: '#059669', // Green-700
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}}
|
|
222
|
+
/>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Using Pre-built Themes
|
|
226
|
+
|
|
227
|
+
Use one of the built-in themes:
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
import { CanvasEditor, LIGHT_THEME, DARK_THEME } from 'labellife-design-tool';
|
|
231
|
+
|
|
232
|
+
<CanvasEditor
|
|
233
|
+
name="Light Theme Editor"
|
|
234
|
+
config={{
|
|
235
|
+
theme: {
|
|
236
|
+
colors: LIGHT_THEME
|
|
237
|
+
}
|
|
238
|
+
}}
|
|
239
|
+
/>
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Adding Custom Panels
|
|
243
|
+
|
|
244
|
+
You can add your own custom panels to extend the editor's functionality.
|
|
245
|
+
|
|
246
|
+
#### Step 1: Create Your Custom Panel Component
|
|
247
|
+
|
|
248
|
+
```tsx
|
|
249
|
+
import React from 'react';
|
|
250
|
+
import { PanelProps } from 'labellife-design-tool';
|
|
251
|
+
import { Settings } from 'lucide-react';
|
|
252
|
+
|
|
253
|
+
// Your custom panel component receives PanelProps
|
|
254
|
+
const MyCustomPanel: React.FC<PanelProps> = ({
|
|
255
|
+
design, // Current design state
|
|
256
|
+
currentPage, // Current page
|
|
257
|
+
selectedElement, // Currently selected element (or null)
|
|
258
|
+
selectedIds, // Array of selected element IDs
|
|
259
|
+
setDesign, // Function to update the design
|
|
260
|
+
updateElement, // Function to update an element
|
|
261
|
+
deleteElement, // Optional: Function to delete an element
|
|
262
|
+
}) => {
|
|
263
|
+
return (
|
|
264
|
+
<div className="p-4">
|
|
265
|
+
<h3 className="text-white font-semibold mb-4 flex items-center gap-2">
|
|
266
|
+
<Settings className="w-5 h-5" />
|
|
267
|
+
Custom Settings
|
|
268
|
+
</h3>
|
|
269
|
+
|
|
270
|
+
<div className="space-y-4">
|
|
271
|
+
{/* Display current design info */}
|
|
272
|
+
<div className="bg-gray-700 p-3 rounded">
|
|
273
|
+
<p className="text-sm text-gray-300">
|
|
274
|
+
Design: {design.name}
|
|
275
|
+
</p>
|
|
276
|
+
<p className="text-sm text-gray-300">
|
|
277
|
+
Pages: {design.pages.length}
|
|
278
|
+
</p>
|
|
279
|
+
<p className="text-sm text-gray-300">
|
|
280
|
+
Selected: {selectedElement?.name || 'None'}
|
|
281
|
+
</p>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
{/* Custom actions */}
|
|
285
|
+
<button
|
|
286
|
+
onClick={() => {
|
|
287
|
+
setDesign({
|
|
288
|
+
...design,
|
|
289
|
+
name: `Updated at ${new Date().toLocaleTimeString()}`,
|
|
290
|
+
});
|
|
291
|
+
}}
|
|
292
|
+
className="w-full bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700"
|
|
293
|
+
>
|
|
294
|
+
Update Design Name
|
|
295
|
+
</button>
|
|
296
|
+
|
|
297
|
+
{/* Update selected element */}
|
|
298
|
+
{selectedElement && (
|
|
299
|
+
<button
|
|
300
|
+
onClick={() => {
|
|
301
|
+
updateElement(selectedElement.id, {
|
|
302
|
+
opacity: selectedElement.opacity === 1 ? 0.5 : 1,
|
|
303
|
+
});
|
|
304
|
+
}}
|
|
305
|
+
className="w-full bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700"
|
|
306
|
+
>
|
|
307
|
+
Toggle Opacity
|
|
308
|
+
</button>
|
|
309
|
+
)}
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
);
|
|
313
|
+
};
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
#### Step 2: Configure and Add Your Custom Panel
|
|
317
|
+
|
|
318
|
+
```tsx
|
|
319
|
+
import { CanvasEditor, CustomPanelConfig } from 'labellife-design-tool';
|
|
320
|
+
import { Settings } from 'lucide-react';
|
|
321
|
+
import { MyCustomPanel } from './MyCustomPanel';
|
|
322
|
+
|
|
323
|
+
// Define your custom panel configuration
|
|
324
|
+
const customPanel: CustomPanelConfig = {
|
|
325
|
+
id: 'my-custom-panel', // Unique ID (must not conflict with built-in panels)
|
|
326
|
+
title: 'Custom Settings', // Title shown in the panel header
|
|
327
|
+
icon: Settings, // Optional: Icon component (from lucide-react or custom)
|
|
328
|
+
component: MyCustomPanel, // Your panel component
|
|
329
|
+
|
|
330
|
+
// Positioning options (choose one):
|
|
331
|
+
position: 'after', // 'before' | 'after' | number
|
|
332
|
+
afterPanel: 'text', // Insert after 'text' panel
|
|
333
|
+
// Or use:
|
|
334
|
+
// beforePanel: 'design', // Insert before 'design' panel
|
|
335
|
+
// position: 2, // Insert at index 2
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
// Use it in your editor
|
|
339
|
+
function App() {
|
|
340
|
+
return (
|
|
341
|
+
<CanvasEditor
|
|
342
|
+
name="My Editor"
|
|
343
|
+
config={{
|
|
344
|
+
panels: {
|
|
345
|
+
custom: [customPanel], // Add your custom panel
|
|
346
|
+
},
|
|
347
|
+
}}
|
|
348
|
+
/>
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
#### Panel Positioning Options
|
|
354
|
+
|
|
355
|
+
You can control where your custom panel appears:
|
|
356
|
+
|
|
357
|
+
```tsx
|
|
358
|
+
// Position after a specific panel
|
|
359
|
+
{
|
|
360
|
+
id: 'panel-after',
|
|
361
|
+
position: 'after',
|
|
362
|
+
afterPanel: 'text' // Appears after 'text' panel
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Position before a specific panel
|
|
366
|
+
{
|
|
367
|
+
id: 'panel-before',
|
|
368
|
+
position: 'before',
|
|
369
|
+
beforePanel: 'design' // Appears before 'design' panel
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// Position at a specific index
|
|
373
|
+
{
|
|
374
|
+
id: 'panel-index',
|
|
375
|
+
position: 2 // Appears at index 2 (0-based)
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// Default: Add to end (no position specified)
|
|
379
|
+
{
|
|
380
|
+
id: 'panel-end'
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
#### Complete Example: Custom Panel with Multiple Features
|
|
385
|
+
|
|
386
|
+
```tsx
|
|
387
|
+
import React from 'react';
|
|
388
|
+
import { CanvasEditor, CustomPanelConfig, PanelProps } from 'labellife-design-tool';
|
|
389
|
+
import { Palette, Layers } from 'lucide-react';
|
|
390
|
+
|
|
391
|
+
// Custom panel that manages design colors
|
|
392
|
+
const ColorPalettePanel: React.FC<PanelProps> = ({
|
|
393
|
+
design,
|
|
394
|
+
setDesign,
|
|
395
|
+
}) => {
|
|
396
|
+
const colors = ['#FF0000', '#00FF00', '#0000FF', '#FFFF00', '#FF00FF'];
|
|
397
|
+
|
|
398
|
+
return (
|
|
399
|
+
<div className="p-4">
|
|
400
|
+
<h3 className="text-white font-semibold mb-4">Color Palette</h3>
|
|
401
|
+
<div className="grid grid-cols-5 gap-2">
|
|
402
|
+
{colors.map((color) => (
|
|
403
|
+
<button
|
|
404
|
+
key={color}
|
|
405
|
+
onClick={() => {
|
|
406
|
+
setDesign({
|
|
407
|
+
...design,
|
|
408
|
+
colors: [...(design.colors || []), color],
|
|
409
|
+
});
|
|
410
|
+
}}
|
|
411
|
+
className="w-10 h-10 rounded"
|
|
412
|
+
style={{ backgroundColor: color }}
|
|
413
|
+
title={color}
|
|
414
|
+
/>
|
|
415
|
+
))}
|
|
416
|
+
</div>
|
|
417
|
+
</div>
|
|
418
|
+
);
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
// Custom panel configuration
|
|
422
|
+
const colorPalettePanel: CustomPanelConfig = {
|
|
423
|
+
id: 'color-palette',
|
|
424
|
+
title: 'Colors',
|
|
425
|
+
icon: Palette,
|
|
426
|
+
component: ColorPalettePanel,
|
|
427
|
+
position: 'after',
|
|
428
|
+
afterPanel: 'design',
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// Use multiple custom panels
|
|
432
|
+
function App() {
|
|
433
|
+
return (
|
|
434
|
+
<CanvasEditor
|
|
435
|
+
name="Custom Editor"
|
|
436
|
+
config={{
|
|
437
|
+
panels: {
|
|
438
|
+
custom: [colorPalettePanel], // Add custom panel
|
|
439
|
+
disable: ['variables'], // Hide variables panel
|
|
440
|
+
order: ['elements', 'text', 'color-palette', 'image'], // Custom order
|
|
441
|
+
},
|
|
442
|
+
}}
|
|
443
|
+
/>
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
#### Available Panel Props
|
|
449
|
+
|
|
450
|
+
Your custom panel component receives these props:
|
|
451
|
+
|
|
452
|
+
```tsx
|
|
453
|
+
interface PanelProps {
|
|
454
|
+
// Core editor state
|
|
455
|
+
design: CanvasDesign; // Current design
|
|
456
|
+
currentPage: Page; // Current page
|
|
457
|
+
selectedElement: CanvasElement | null; // Selected element
|
|
458
|
+
selectedIds: string[]; // Array of selected IDs
|
|
459
|
+
|
|
460
|
+
// Core editor actions
|
|
461
|
+
setDesign: (design: CanvasDesign) => void;
|
|
462
|
+
updateElement: (id: string, attrs: Partial<CanvasElement>) => void;
|
|
463
|
+
deleteElement?: (id: string) => void;
|
|
464
|
+
|
|
465
|
+
// Additional props (panel-specific)
|
|
466
|
+
[key: string]: any;
|
|
467
|
+
}
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
#### Built-in Panel IDs
|
|
471
|
+
|
|
472
|
+
Available built-in panel IDs you can reference:
|
|
473
|
+
- `'elements'` - Elements/Shapes panel
|
|
474
|
+
- `'text'` - Text panel
|
|
475
|
+
- `'image'` - Images panel
|
|
476
|
+
- `'design'` - Design panel
|
|
477
|
+
- `'background'` - Background panel
|
|
478
|
+
- `'variables'` - Variables panel (if enabled)
|
|
479
|
+
- `'export'` - Export panel (if enabled)
|
|
480
|
+
|
|
481
|
+
For more advanced examples and API documentation, see [MODULAR_USAGE_GUIDE.md](./MODULAR_USAGE_GUIDE.md).
|
|
482
|
+
|
|
91
483
|
## Development
|
|
92
484
|
|
|
93
485
|
To run the development server:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CanvasEditor.d.ts","sourceRoot":"","sources":["../../src/CanvasEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAqFjF,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,CAikC7D,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 } from "../types";
|
|
2
|
+
import { ToolType, ActivePanelId, PanelConfig } from "../types";
|
|
3
3
|
import { Config } from "../types/Config";
|
|
4
4
|
export interface LeftMenuProps {
|
|
5
5
|
tool: ToolType;
|
|
@@ -7,6 +7,7 @@ export interface LeftMenuProps {
|
|
|
7
7
|
onSetTool: (tool: ToolType) => void;
|
|
8
8
|
onSetActivePanel: (panel: ActivePanelId) => void;
|
|
9
9
|
config?: Config;
|
|
10
|
+
panels?: PanelConfig[];
|
|
10
11
|
}
|
|
11
12
|
export declare const LeftMenu: React.FC<LeftMenuProps>;
|
|
12
13
|
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,MAAM,UAAU,CAAC;
|
|
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,WAAW,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAsBzC,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;IAChB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAkL5C,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;AAI1B,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;AAG5C,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;AAK1B,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;AAK1B,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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scoped i18n instance for LabelLife Design Tool
|
|
3
|
+
* Uses namespace 'labellife-editor' to avoid conflicts with consumer's i18n
|
|
4
|
+
*/
|
|
5
|
+
declare const EDITOR_NAMESPACE = "labellife-editor";
|
|
6
|
+
declare const editorI18n: import("node_modules/i18next").i18n;
|
|
7
|
+
export default editorI18n;
|
|
8
|
+
export { EDITOR_NAMESPACE };
|
|
9
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,QAAA,MAAM,gBAAgB,qBAAqB,CAAC;AAG5C,QAAA,MAAM,UAAU,qCAAwB,CAAC;AA+BzC,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|