@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 CHANGED
@@ -72,6 +72,7 @@ interface EditorConfig {
72
72
  ui?: {
73
73
  hideDefaultPanels?: boolean;
74
74
  hiddenPanels?: PanelId[];
75
+ topbarMode?: 'default' | 'custom';
75
76
  };
76
77
  customPanels?: CustomSidebarPanel[];
77
78
  }
@@ -200,6 +201,49 @@ Notes:
200
201
  - `feature` maps to `entitlements.features[feature]` and controls visibility/access based on licensing.
201
202
  - `render` is called when the panel is active, so you can wire buttons directly to `store` methods or read from `state`.
202
203
 
204
+ ### Template save action (SDK only)
205
+
206
+ You can customize the "Save Current Design as Template" button in the Templates → Designs panel:
207
+
208
+ ```ts
209
+ createFraczledEditor({
210
+ apiKey: "YOUR_LICENSE_KEY",
211
+ projectId: "YOUR_PROJECT_ID",
212
+ container: document.getElementById("editor"),
213
+ customTemplates: {
214
+ saveAction: {
215
+ label: "Save as Brand Template",
216
+ onClick: ({ openSaveModal }) => openSaveModal()
217
+ }
218
+ }
219
+ });
220
+ ```
221
+
222
+ Note: This action is gated by the `templateSave` plan feature.
223
+
224
+ ### Custom topbar actions (SDK only)
225
+
226
+ You can replace the default topbar actions (save/new/export/undo/redo/zoom) with your own UI:
227
+
228
+ ```ts
229
+ createFraczledEditor({
230
+ apiKey: "YOUR_LICENSE_KEY",
231
+ projectId: "YOUR_PROJECT_ID",
232
+ container: document.getElementById("editor"),
233
+ ui: { topbarMode: "custom" },
234
+ customToolbarItems: [
235
+ {
236
+ id: "my-topbar:action",
237
+ label: "My Action",
238
+ location: "topbar",
239
+ onClick: ({ topbar }) => topbar?.onExport?.("web")
240
+ }
241
+ ]
242
+ });
243
+ ```
244
+
245
+ Note: `ui.topbarMode = "custom"` is gated by the `topbarActions` plan feature.
246
+
203
247
  ### Hide built-in tabs (SDK only)
204
248
 
205
249
  You can hide vanilla sidebar tabs in SDK embeds:
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "react-dom/client";
3
- import { S as o, b as p, a as c, d } from "./index-CXZBVuuc.js";
3
+ import { S as o, b as p, a as c, d } from "./index-B5pLe-q9.js";
4
4
  export {
5
5
  o as Store,
6
6
  p as createFraczledEditor,