labellife-design-tool 0.3.0 → 0.5.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 -392
- package/dist/lib/CanvasEditor.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/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/index.css +0 -48
- package/dist/lib/index.js +536 -1007
- package/dist/lib/lib/index.d.ts +0 -9
- package/dist/lib/lib/index.d.ts.map +1 -1
- package/dist/lib/types/Config.d.ts +0 -24
- 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/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/package.json +17 -7
- package/dist/lib/contexts/ThemeContext.d.ts +0 -21
- package/dist/lib/contexts/ThemeContext.d.ts.map +0 -1
- package/dist/lib/i18n.d.ts +0 -9
- package/dist/lib/i18n.d.ts.map +0 -1
- package/dist/lib/registry/BuiltInPanels.d.ts +0 -36
- package/dist/lib/registry/BuiltInPanels.d.ts.map +0 -1
- package/dist/lib/registry/PanelRegistry.d.ts +0 -58
- package/dist/lib/registry/PanelRegistry.d.ts.map +0 -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,397 +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
|
-
#### 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
|
-
|
|
483
94
|
## Development
|
|
484
95
|
|
|
485
96
|
To run the development server:
|
|
@@ -501,6 +112,53 @@ To build the app:
|
|
|
501
112
|
bun run build:app
|
|
502
113
|
```
|
|
503
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
|
+
|
|
504
162
|
## Project Structure
|
|
505
163
|
|
|
506
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,
|
|
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,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":"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"}
|
package/dist/lib/index.css
CHANGED
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
--color-red-500: oklch(63.7% 0.237 25.331);
|
|
12
12
|
--color-red-600: oklch(57.7% 0.245 27.325);
|
|
13
13
|
--color-red-700: oklch(50.5% 0.213 27.518);
|
|
14
|
-
--color-green-600: oklch(62.7% 0.194 149.214);
|
|
15
|
-
--color-green-700: oklch(52.7% 0.154 150.069);
|
|
16
14
|
--color-blue-400: oklch(70.7% 0.165 254.624);
|
|
17
15
|
--color-blue-500: oklch(62.3% 0.214 259.815);
|
|
18
16
|
--color-blue-600: oklch(54.6% 0.245 262.881);
|
|
@@ -217,12 +215,6 @@
|
|
|
217
215
|
.inset-0 {
|
|
218
216
|
inset: calc(var(--spacing) * 0);
|
|
219
217
|
}
|
|
220
|
-
.-top-1\.5 {
|
|
221
|
-
top: calc(var(--spacing) * -1.5);
|
|
222
|
-
}
|
|
223
|
-
.-right-1\.5 {
|
|
224
|
-
right: calc(var(--spacing) * -1.5);
|
|
225
|
-
}
|
|
226
218
|
.bottom-4 {
|
|
227
219
|
bottom: calc(var(--spacing) * 4);
|
|
228
220
|
}
|
|
@@ -322,9 +314,6 @@
|
|
|
322
314
|
.h-8 {
|
|
323
315
|
height: calc(var(--spacing) * 8);
|
|
324
316
|
}
|
|
325
|
-
.h-10 {
|
|
326
|
-
height: calc(var(--spacing) * 10);
|
|
327
|
-
}
|
|
328
317
|
.h-12 {
|
|
329
318
|
height: calc(var(--spacing) * 12);
|
|
330
319
|
}
|
|
@@ -358,9 +347,6 @@
|
|
|
358
347
|
.w-8 {
|
|
359
348
|
width: calc(var(--spacing) * 8);
|
|
360
349
|
}
|
|
361
|
-
.w-10 {
|
|
362
|
-
width: calc(var(--spacing) * 10);
|
|
363
|
-
}
|
|
364
350
|
.w-12 {
|
|
365
351
|
width: calc(var(--spacing) * 12);
|
|
366
352
|
}
|
|
@@ -581,12 +567,6 @@
|
|
|
581
567
|
.bg-gray-900 {
|
|
582
568
|
background-color: var(--color-gray-900);
|
|
583
569
|
}
|
|
584
|
-
.bg-green-600 {
|
|
585
|
-
background-color: var(--color-green-600);
|
|
586
|
-
}
|
|
587
|
-
.bg-red-500 {
|
|
588
|
-
background-color: var(--color-red-500);
|
|
589
|
-
}
|
|
590
570
|
.bg-red-700 {
|
|
591
571
|
background-color: var(--color-red-700);
|
|
592
572
|
}
|
|
@@ -673,10 +653,6 @@
|
|
|
673
653
|
font-size: var(--text-xs);
|
|
674
654
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
675
655
|
}
|
|
676
|
-
.leading-none {
|
|
677
|
-
--tw-leading: 1;
|
|
678
|
-
line-height: 1;
|
|
679
|
-
}
|
|
680
656
|
.font-bold {
|
|
681
657
|
--tw-font-weight: var(--font-weight-bold);
|
|
682
658
|
font-weight: var(--font-weight-bold);
|
|
@@ -729,10 +705,6 @@
|
|
|
729
705
|
--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
|
|
730
706
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
731
707
|
}
|
|
732
|
-
.shadow-sm {
|
|
733
|
-
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
734
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
735
|
-
}
|
|
736
708
|
.outline {
|
|
737
709
|
outline-style: var(--tw-outline-style);
|
|
738
710
|
outline-width: 1px;
|
|
@@ -853,13 +825,6 @@
|
|
|
853
825
|
}
|
|
854
826
|
}
|
|
855
827
|
}
|
|
856
|
-
.hover\:bg-green-700 {
|
|
857
|
-
&:hover {
|
|
858
|
-
@media (hover: hover) {
|
|
859
|
-
background-color: var(--color-green-700);
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
828
|
.hover\:bg-red-500 {
|
|
864
829
|
&:hover {
|
|
865
830
|
@media (hover: hover) {
|
|
@@ -881,14 +846,6 @@
|
|
|
881
846
|
}
|
|
882
847
|
}
|
|
883
848
|
}
|
|
884
|
-
.hover\:shadow {
|
|
885
|
-
&:hover {
|
|
886
|
-
@media (hover: hover) {
|
|
887
|
-
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
888
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
849
|
.focus\:border-blue-500 {
|
|
893
850
|
&:focus {
|
|
894
851
|
border-color: var(--color-blue-500);
|
|
@@ -952,10 +909,6 @@
|
|
|
952
909
|
inherits: false;
|
|
953
910
|
initial-value: solid;
|
|
954
911
|
}
|
|
955
|
-
@property --tw-leading {
|
|
956
|
-
syntax: "*";
|
|
957
|
-
inherits: false;
|
|
958
|
-
}
|
|
959
912
|
@property --tw-font-weight {
|
|
960
913
|
syntax: "*";
|
|
961
914
|
inherits: false;
|
|
@@ -1113,7 +1066,6 @@
|
|
|
1113
1066
|
--tw-space-y-reverse: 0;
|
|
1114
1067
|
--tw-space-x-reverse: 0;
|
|
1115
1068
|
--tw-border-style: solid;
|
|
1116
|
-
--tw-leading: initial;
|
|
1117
1069
|
--tw-font-weight: initial;
|
|
1118
1070
|
--tw-shadow: 0 0 #0000;
|
|
1119
1071
|
--tw-shadow-color: initial;
|