@bloklabs/angular 1.4.3 → 1.4.5

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.
@@ -2482,6 +2482,8 @@ class BlokEditorComponent {
2482
2482
  }
2483
2483
  // ---- Construction-only seed inputs (read once at construction) ----
2484
2484
  tools;
2485
+ /** Host-supplied per-type block migrations applied at load (merged across layers). */
2486
+ migrations;
2485
2487
  /**
2486
2488
  * Escape hatch: a full config object for keys without a dedicated input
2487
2489
  * (sanitizer, minHeight, …). Layered between provideBlok
@@ -2556,6 +2558,13 @@ class BlokEditorComponent {
2556
2558
  this.defaults.tools !== undefined) {
2557
2559
  cfg.tools = { ...this.defaults.tools, ...this.config?.tools, ...this.tools };
2558
2560
  }
2561
+ // migration registries merge like tools: shared defaults compose with
2562
+ // per-instance rules.
2563
+ if (this.migrations !== undefined ||
2564
+ this.config?.migrations !== undefined ||
2565
+ this.defaults.migrations !== undefined) {
2566
+ cfg.migrations = { ...this.defaults.migrations, ...this.config?.migrations, ...this.migrations };
2567
+ }
2559
2568
  const data = this.data$();
2560
2569
  if (data !== undefined) {
2561
2570
  cfg.data = data;
@@ -2803,7 +2812,7 @@ class BlokEditorComponent {
2803
2812
  this.readOnly$.set(isDisabled);
2804
2813
  }
2805
2814
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: BlokEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2806
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: BlokEditorComponent, isStandalone: true, selector: "blok-editor", inputs: { onBeforeRender: "onBeforeRender", onBeforePaste: "onBeforePaste", onError: "onError", readOnly: "readOnly", hideToolbar: "hideToolbar", inlineToolbar: "inlineToolbar", theme: "theme", width: "width", placeholder: "placeholder", styleTokens: "styleTokens", i18n: "i18n", autofocus: "autofocus", data: "data", tools: "tools", config: "config", recreateKey: "recreateKey" }, outputs: { ready: "ready", dataChange: "dataChange", save: "save", change: "change", afterRender: "afterRender", themeChange: "themeChange", blocksRendered: "blocksRendered", blockRendered: "blockRendered" }, providers: [
2815
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: BlokEditorComponent, isStandalone: true, selector: "blok-editor", inputs: { onBeforeRender: "onBeforeRender", onBeforePaste: "onBeforePaste", onError: "onError", readOnly: "readOnly", hideToolbar: "hideToolbar", inlineToolbar: "inlineToolbar", theme: "theme", width: "width", placeholder: "placeholder", styleTokens: "styleTokens", i18n: "i18n", autofocus: "autofocus", data: "data", tools: "tools", migrations: "migrations", config: "config", recreateKey: "recreateKey" }, outputs: { ready: "ready", dataChange: "dataChange", save: "save", change: "change", afterRender: "afterRender", themeChange: "themeChange", blocksRendered: "blocksRendered", blockRendered: "blockRendered" }, providers: [
2807
2816
  {
2808
2817
  provide: NG_VALUE_ACCESSOR,
2809
2818
  useExisting: forwardRef(() => BlokEditorComponent),
@@ -2875,6 +2884,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
2875
2884
  type: Input
2876
2885
  }], tools: [{
2877
2886
  type: Input
2887
+ }], migrations: [{
2888
+ type: Input
2878
2889
  }], config: [{
2879
2890
  type: Input
2880
2891
  }], recreateKey: [{