@fraczled/sdk 1.20.0 → 1.23.0
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 +36 -0
- package/dist/fraczled-sdk.es.js +1 -1
- package/dist/fraczled-sdk.umd.js +102 -102
- package/dist/{index-Y6dPwTHl.js → index-u_E-3nXa.js} +6427 -6417
- package/dist/{index.es-1XpxLogh.js → index.es-tMD5qpYa.js} +1 -1
- package/index.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,6 +63,10 @@ interface EditorConfig {
|
|
|
63
63
|
injectBaseStyles?: boolean;
|
|
64
64
|
showLoader?: boolean;
|
|
65
65
|
};
|
|
66
|
+
ui?: {
|
|
67
|
+
hideDefaultPanels?: boolean;
|
|
68
|
+
hiddenPanels?: PanelId[];
|
|
69
|
+
};
|
|
66
70
|
customPanels?: CustomSidebarPanel[];
|
|
67
71
|
}
|
|
68
72
|
```
|
|
@@ -188,6 +192,38 @@ Notes:
|
|
|
188
192
|
- `feature` maps to `entitlements.features[feature]` and controls visibility/access based on licensing.
|
|
189
193
|
- `render` is called when the panel is active, so you can wire buttons directly to `store` methods or read from `state`.
|
|
190
194
|
|
|
195
|
+
### Hide built-in tabs (SDK only)
|
|
196
|
+
|
|
197
|
+
You can hide vanilla sidebar tabs in SDK embeds:
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
import { createFraczledEditor, ToolType } from "@fraczled/sdk";
|
|
201
|
+
|
|
202
|
+
createFraczledEditor({
|
|
203
|
+
apiKey: "YOUR_LICENSE_KEY",
|
|
204
|
+
projectId: "YOUR_PROJECT_ID",
|
|
205
|
+
container: document.getElementById("editor"),
|
|
206
|
+
ui: {
|
|
207
|
+
hideDefaultPanels: true,
|
|
208
|
+
// or hide specific tabs:
|
|
209
|
+
// hiddenPanels: [ToolType.IMAGES, ToolType.BRAND, "my-product:approvals"]
|
|
210
|
+
},
|
|
211
|
+
customPanels: [
|
|
212
|
+
{
|
|
213
|
+
id: "my-product:approvals",
|
|
214
|
+
label: "Approvals",
|
|
215
|
+
render: ({ store }) => (
|
|
216
|
+
<button onClick={() => store.exportJSON()}>Export JSON</button>
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
});
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Notes:
|
|
224
|
+
- `hiddenPanels` applies to both default and custom panels by id.
|
|
225
|
+
- Removing the `ui` config restores the vanilla sidebar.
|
|
226
|
+
|
|
191
227
|
## Support
|
|
192
228
|
|
|
193
229
|
- Documentation: [fraczled.com/docs](https://fraczled.com/docs)
|
package/dist/fraczled-sdk.es.js
CHANGED