@fraczled/sdk 1.30.1 → 1.30.3
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 +44 -0
- package/dist/fraczled-sdk.es.js +1 -1
- package/dist/fraczled-sdk.umd.js +210 -210
- package/dist/{index-CXZBVuuc.js → index-B5pLe-q9.js} +8444 -8399
- package/dist/{index.es-pJvmGaCj.js → index.es-DVW0Ygin.js} +1 -1
- package/index.d.ts +31 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -325,6 +325,7 @@ export interface SDKAssetsConfig {
|
|
|
325
325
|
export interface EditorUiConfig {
|
|
326
326
|
hideDefaultPanels?: boolean;
|
|
327
327
|
hiddenPanels?: PanelId[];
|
|
328
|
+
topbarMode?: 'default' | 'custom';
|
|
328
329
|
}
|
|
329
330
|
|
|
330
331
|
export type TemplateCategory = 'social-media' | 'business' | 'marketing' | 'personal' | (string & {});
|
|
@@ -403,6 +404,22 @@ export interface ToolbarContext {
|
|
|
403
404
|
store: Store;
|
|
404
405
|
selection: string[];
|
|
405
406
|
element?: CanvasElement;
|
|
407
|
+
topbar?: TopbarActionsContext;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export interface TopbarActionsContext {
|
|
411
|
+
onUndo?: () => void;
|
|
412
|
+
onRedo?: () => void;
|
|
413
|
+
canUndo?: boolean;
|
|
414
|
+
canRedo?: boolean;
|
|
415
|
+
onNewDesign?: () => void;
|
|
416
|
+
onSaveDesign?: () => void;
|
|
417
|
+
onExport?: (type: 'json' | 'web' | 'print_png' | 'print_pdf') => void;
|
|
418
|
+
onCustomExport?: (format: CustomExportFormat) => void;
|
|
419
|
+
exportAccess?: { web?: boolean; print?: boolean };
|
|
420
|
+
canSaveLoadJson?: boolean;
|
|
421
|
+
upgradeUrl?: string;
|
|
422
|
+
isExporting?: boolean;
|
|
406
423
|
}
|
|
407
424
|
|
|
408
425
|
export interface CustomToolbarItem {
|
|
@@ -458,6 +475,20 @@ export interface CustomTemplatesConfig {
|
|
|
458
475
|
fetchTemplates?: () => Promise<DesignTemplate[]>;
|
|
459
476
|
hideDefaultTemplates?: boolean;
|
|
460
477
|
categories?: TemplateCategory[];
|
|
478
|
+
saveAction?: TemplateSaveAction;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
export interface TemplateActionContext {
|
|
482
|
+
store: Store;
|
|
483
|
+
getState: () => DesignState;
|
|
484
|
+
openSaveModal: () => void;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export interface TemplateSaveAction {
|
|
488
|
+
label?: string;
|
|
489
|
+
icon?: React.ComponentType<{ size?: number }>;
|
|
490
|
+
onClick?: (context: TemplateActionContext) => void;
|
|
491
|
+
render?: (context: TemplateActionContext) => React.ReactNode;
|
|
461
492
|
}
|
|
462
493
|
|
|
463
494
|
export interface ExportCaptureOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fraczled/sdk",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.3",
|
|
4
4
|
"description": "Fraczled Design Studio SDK - Embed a powerful design editor in your application",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vite build --config ../vite.sdk.config.ts && vite build --config ../vite.sdk.umd.config.ts",
|