@innovastudio/contentbuilder 1.5.219 → 1.5.221

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/index.d.ts CHANGED
@@ -1,4 +1,10 @@
1
1
  interface ContentBuilderOptions {
2
+ /** Drag & drop engine.
3
+ * 'letak' (default): drops into an iframe work on touch devices (iPad
4
+ * included), placement on a canvas follows the pointer at any zoom, and
5
+ * blocks can be moved with the keyboard.
6
+ * 'sortable': the previous engine. */
7
+ dragDropEngine?: 'letak' | 'sortable';
2
8
  page?: string;
3
9
  container?: string;
4
10
  siteToken?: string;
@@ -190,6 +196,19 @@ interface ContentBuilderOptions {
190
196
  moduleConfig?: any[];
191
197
  elementAnimate?: boolean;
192
198
  cleanAOS?: boolean;
199
+ /** Stop browser extensions from running inside the editing areas. Default false (saved content is cleaned either way). */
200
+ disableEditorExtensions?: boolean;
201
+ /** Extra markup to remove from the saved HTML, on top of the built-in browser-extension lists. */
202
+ extensionArtifacts?: {
203
+ /** Selectors for injected elements to remove entirely. */
204
+ elements?: string[];
205
+ /** Selectors for injected wrappers to remove, keeping their content. */
206
+ wrappers?: string[];
207
+ /** Attribute name prefixes to remove, e.g. 'data-gramm'. */
208
+ attributePrefixes?: string[];
209
+ /** CSS property prefixes to remove from style attributes, e.g. '--darkreader-'. */
210
+ stylePrefixes?: string[];
211
+ };
193
212
  framework?: string;
194
213
  cellFormat?: string;
195
214
  rowFormat?: string;
@@ -449,6 +468,12 @@ declare class ContentBuilder {
449
468
  * swatch's inner `<span>` and toggle its empty (checkerboard) state. Public
450
469
  * counterpart to `colorPicker` for external swatches. Pass '' to clear. */
451
470
  paintColorButton(btn: HTMLElement, value: string): void;
471
+ /** Open the image editor on any image URL, for a host app's own panel (a
472
+ * CSS background image, a thumbnail in a custom dialog) where there is no
473
+ * <img> for the element toolbar's Edit button. The edited image is saved
474
+ * through the configured upload handler under a new name (a data URL when
475
+ * no upload handler is set) and handed to the callback. */
476
+ openImageEditor(url: string, callback?: (newUrl: string, filename: string) => void, trigger?: HTMLElement): void;
452
477
  viewConfig(): void;
453
478
  setUIColor(mode: string, csslink?: string): void;
454
479
  viewHtml(): void;
@@ -492,6 +517,9 @@ declare class ContentBuilder {
492
517
  openEditor?: boolean;
493
518
  }
494
519
  ): HTMLElement | null;
520
+ /** Make a list in a plugin's settings panel sortable. In onSort the list is already in its new order. */
521
+ sortableList(el: HTMLElement, opts?: { handle?: string; animation?: number; onSort?: () => void }): void;
522
+
495
523
  /**
496
524
  * Create a rich-text editor (Inscribe) inside a plugin settings panel — a
497
525
  * modern, execCommand-free replacement for a raw contenteditable. Returns the
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@innovastudio/contentbuilder",
4
- "version": "1.5.219",
4
+ "version": "1.5.221",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -30,6 +30,9 @@
30
30
  "@babel/plugin-transform-runtime": "^7.18.2",
31
31
  "@babel/preset-env": "^7.15.6",
32
32
  "@fal-ai/client": "^1.4.0",
33
+ "@gltf-transform/core": "^4.5.0",
34
+ "@gltf-transform/extensions": "^4.5.0",
35
+ "@gltf-transform/functions": "^4.5.0",
33
36
  "@google/genai": "^0.12.0",
34
37
  "@rollup/plugin-babel": "^5.3.0",
35
38
  "@rollup/plugin-commonjs": "^20.0.0",
@@ -46,6 +49,7 @@
46
49
  "express-session": "^1.17.2",
47
50
  "formidable-serverless": "^1.1.1",
48
51
  "jsdom": "^29.1.1",
52
+ "meshoptimizer": "^1.2.0",
49
53
  "mini-css-extract-plugin": "^2.3.0",
50
54
  "multer": "^1.4.5-lts.1",
51
55
  "openai": "^4.96.2",
@@ -62,14 +66,10 @@
62
66
  "webpack-dev-server": "^4.2.1"
63
67
  },
64
68
  "dependencies": {
65
- "@gltf-transform/core": "^4.5.0",
66
- "@gltf-transform/extensions": "^4.5.0",
67
- "@gltf-transform/functions": "^4.5.0",
68
69
  "@monaco-editor/loader": "^1.6.1",
69
70
  "cropperjs": "^1.5.12",
70
71
  "js-beautify": "^1.14.0",
71
72
  "marked": "^17.0.0",
72
- "meshoptimizer": "^1.2.0",
73
73
  "sortablejs": "^1.15.2"
74
74
  }
75
75
  }