@fraczled/sdk 1.30.11 → 1.30.13
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 +29 -0
- package/dist/fraczled-sdk.es.js +1 -1
- package/dist/fraczled-sdk.umd.js +218 -218
- package/dist/{index-BFuI8-pC.js → index-D1XP3N62.js} +9125 -9081
- package/dist/{index.es-BrpA_Qq4.js → index.es-qA007ZUu.js} +1 -1
- package/index.d.ts +19 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -148,6 +148,8 @@ Creates a new editor instance.
|
|
|
148
148
|
- `save` - Fired when the user saves
|
|
149
149
|
- `select` - Fired when selection changes
|
|
150
150
|
- `export` - Fired when user exports
|
|
151
|
+
- `designSaved` - Fired when a saved design is created or updated (payload: SavedDesign)
|
|
152
|
+
- `designDeleted` - Fired when a saved design is deleted (payload: { id, design })
|
|
151
153
|
|
|
152
154
|
## Custom Sidebar Panels
|
|
153
155
|
|
|
@@ -245,6 +247,33 @@ createFraczledEditor({
|
|
|
245
247
|
|
|
246
248
|
Note: `ui.topbarMode = "custom"` is gated by the `topbarActions` plan feature.
|
|
247
249
|
|
|
250
|
+
### Customize export menu (SDK only)
|
|
251
|
+
|
|
252
|
+
You can customize the export button label/icon and override or hide dropdown items while keeping the native UI.
|
|
253
|
+
|
|
254
|
+
```tsx
|
|
255
|
+
import { createFraczledEditor } from "@fraczled/sdk";
|
|
256
|
+
import { Download, FileText } from "lucide-react";
|
|
257
|
+
|
|
258
|
+
createFraczledEditor({
|
|
259
|
+
apiKey: "YOUR_LICENSE_KEY",
|
|
260
|
+
projectId: "YOUR_PROJECT_ID",
|
|
261
|
+
container: document.getElementById("editor"),
|
|
262
|
+
ui: {
|
|
263
|
+
exportMenu: {
|
|
264
|
+
buttonLabel: "Download",
|
|
265
|
+
buttonIcon: Download,
|
|
266
|
+
items: [
|
|
267
|
+
{ id: "web", label: "Quick PNG", description: "Optimized for web" },
|
|
268
|
+
{ id: "print_pdf", label: "PDF (Press Ready)", icon: FileText },
|
|
269
|
+
{ id: "print_png", hidden: true },
|
|
270
|
+
{ id: "json", label: "Save Project File" }
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
```
|
|
276
|
+
|
|
248
277
|
### Custom new design modal (SDK only)
|
|
249
278
|
|
|
250
279
|
You can replace the Create New Design modal with your own UI:
|
package/dist/fraczled-sdk.es.js
CHANGED