@fraczled/sdk 1.30.0 → 1.30.2
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 +27 -1
- package/dist/fraczled-sdk.es.js +1 -1
- package/dist/fraczled-sdk.umd.js +217 -217
- package/dist/{index-BaSHlmfB.js → index-H9Vygg46.js} +9473 -9354
- package/dist/{index.es-nZ_b4arL.js → index.es-BdnEhQbO.js} +1 -1
- package/index.d.ts +32 -0
- package/package.json +1 -1
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
|
}
|
|
@@ -83,7 +84,9 @@ By default, the SDK injects the Tailwind CDN and Google Fonts for convenience. F
|
|
|
83
84
|
set `assets.injectTailwind = false` and provide your own CSS bundle (and optionally your own fonts)
|
|
84
85
|
to avoid relying on external CDNs.
|
|
85
86
|
|
|
86
|
-
License validation is
|
|
87
|
+
License validation is handled by https://fraczled.com and requires outbound HTTPS access.
|
|
88
|
+
If you need to run offline, supply a signed offline license token via
|
|
89
|
+
`services.licenseRequest.offlineLicense` so the SDK can verify it locally.
|
|
87
90
|
|
|
88
91
|
## Server-side enforcement (recommended)
|
|
89
92
|
|
|
@@ -198,6 +201,29 @@ Notes:
|
|
|
198
201
|
- `feature` maps to `entitlements.features[feature]` and controls visibility/access based on licensing.
|
|
199
202
|
- `render` is called when the panel is active, so you can wire buttons directly to `store` methods or read from `state`.
|
|
200
203
|
|
|
204
|
+
### Custom topbar actions (SDK only)
|
|
205
|
+
|
|
206
|
+
You can replace the default topbar actions (save/new/export/undo/redo/zoom) with your own UI:
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
createFraczledEditor({
|
|
210
|
+
apiKey: "YOUR_LICENSE_KEY",
|
|
211
|
+
projectId: "YOUR_PROJECT_ID",
|
|
212
|
+
container: document.getElementById("editor"),
|
|
213
|
+
ui: { topbarMode: "custom" },
|
|
214
|
+
customToolbarItems: [
|
|
215
|
+
{
|
|
216
|
+
id: "my-topbar:action",
|
|
217
|
+
label: "My Action",
|
|
218
|
+
location: "topbar",
|
|
219
|
+
onClick: ({ topbar }) => topbar?.onExport?.("web")
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
});
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Note: `ui.topbarMode = "custom"` is gated by the `topbarActions` plan feature.
|
|
226
|
+
|
|
201
227
|
### Hide built-in tabs (SDK only)
|
|
202
228
|
|
|
203
229
|
You can hide vanilla sidebar tabs in SDK embeds:
|
package/dist/fraczled-sdk.es.js
CHANGED