@fraczled/sdk 1.30.2 → 1.30.6
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 +81 -0
- package/dist/fraczled-sdk.es.js +1 -1
- package/dist/fraczled-sdk.umd.js +211 -211
- package/dist/{index-H9Vygg46.js → index-BMcZvArF.js} +8821 -8743
- package/dist/{index.es-BdnEhQbO.js → index.es-lCvJPj8g.js} +1 -1
- package/index.d.ts +53 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -326,6 +326,45 @@ export interface EditorUiConfig {
|
|
|
326
326
|
hideDefaultPanels?: boolean;
|
|
327
327
|
hiddenPanels?: PanelId[];
|
|
328
328
|
topbarMode?: 'default' | 'custom';
|
|
329
|
+
newDesignModal?: NewDesignModalConfig;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface TemplateSizePreset {
|
|
333
|
+
id?: string;
|
|
334
|
+
name: string;
|
|
335
|
+
width: number;
|
|
336
|
+
height: number;
|
|
337
|
+
unit: Unit;
|
|
338
|
+
dpi?: number;
|
|
339
|
+
bleed?: number;
|
|
340
|
+
safeArea?: number;
|
|
341
|
+
icon?: React.ReactNode;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export interface NewDesignModalContext {
|
|
345
|
+
store: Store;
|
|
346
|
+
getState: () => DesignState;
|
|
347
|
+
onClose: () => void;
|
|
348
|
+
onSkipFuture: () => void;
|
|
349
|
+
applyTemplate: (template: DesignTemplate, options?: { transparentBackground?: boolean; skipFuture?: boolean }) => void;
|
|
350
|
+
applySizePreset: (preset: TemplateSizePreset, options?: { transparentBackground?: boolean; skipFuture?: boolean }) => void;
|
|
351
|
+
createCustom: (options: {
|
|
352
|
+
width: number;
|
|
353
|
+
height: number;
|
|
354
|
+
unit: Unit;
|
|
355
|
+
dpi?: number;
|
|
356
|
+
bleed?: number;
|
|
357
|
+
safeArea?: number;
|
|
358
|
+
transparentBackground?: boolean;
|
|
359
|
+
}) => void;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export interface NewDesignModalConfig {
|
|
363
|
+
render?: (context: NewDesignModalContext) => React.ReactNode;
|
|
364
|
+
sizePresets?: {
|
|
365
|
+
social?: TemplateSizePreset[];
|
|
366
|
+
print?: TemplateSizePreset[];
|
|
367
|
+
};
|
|
329
368
|
}
|
|
330
369
|
|
|
331
370
|
export type TemplateCategory = 'social-media' | 'business' | 'marketing' | 'personal' | (string & {});
|
|
@@ -475,6 +514,20 @@ export interface CustomTemplatesConfig {
|
|
|
475
514
|
fetchTemplates?: () => Promise<DesignTemplate[]>;
|
|
476
515
|
hideDefaultTemplates?: boolean;
|
|
477
516
|
categories?: TemplateCategory[];
|
|
517
|
+
saveAction?: TemplateSaveAction;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export interface TemplateActionContext {
|
|
521
|
+
store: Store;
|
|
522
|
+
getState: () => DesignState;
|
|
523
|
+
openSaveModal: () => void;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export interface TemplateSaveAction {
|
|
527
|
+
label?: string;
|
|
528
|
+
icon?: React.ComponentType<{ size?: number }>;
|
|
529
|
+
onClick?: (context: TemplateActionContext) => void;
|
|
530
|
+
render?: (context: TemplateActionContext) => React.ReactNode;
|
|
478
531
|
}
|
|
479
532
|
|
|
480
533
|
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.6",
|
|
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",
|