@puckeditor/core 0.21.0 → 0.21.1-canary.274c5f6a

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.
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-ZPR7EC3T.mjs";
7
+ } from "./chunk-UZZ6SRV3.mjs";
8
8
  import "./chunk-AOEDIUVK.mjs";
9
9
  import "./chunk-RYILZVCB.mjs";
10
10
  import "./chunk-UFXHMVJE.mjs";
@@ -50,6 +50,9 @@ var EditorInner = memo(
50
50
  event.preventDefault();
51
51
  (_b = editor == null ? void 0 : (_a = editor.commands).toggleItalic) == null ? void 0 : _b.call(_a);
52
52
  }
53
+ if (event.key.toLowerCase() === "backspace") {
54
+ event.stopPropagation();
55
+ }
53
56
  },
54
57
  [editor]
55
58
  );
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-ZPR7EC3T.mjs";
4
+ } from "./chunk-UZZ6SRV3.mjs";
5
5
  import {
6
6
  RichTextRenderFallback,
7
7
  SlotRender,
@@ -1971,7 +1971,7 @@ EditorFallback.displayName = "EditorFallback";
1971
1971
  // components/AutoField/fields/RichtextField/index.tsx
1972
1972
  import { Fragment as Fragment4, jsx as jsx17 } from "react/jsx-runtime";
1973
1973
  var Editor = lazy(
1974
- () => import("./Editor-L7XD2QW3.mjs").then((m) => ({
1974
+ () => import("./Editor-T7APPU5O.mjs").then((m) => ({
1975
1975
  default: m.Editor
1976
1976
  }))
1977
1977
  );
@@ -3604,7 +3604,7 @@ import {
3604
3604
  } from "react";
3605
3605
  import { jsx as jsx27 } from "react/jsx-runtime";
3606
3606
  var Editor2 = lazy2(
3607
- () => import("./Editor-L7XD2QW3.mjs").then((m) => ({
3607
+ () => import("./Editor-T7APPU5O.mjs").then((m) => ({
3608
3608
  default: m.Editor
3609
3609
  }))
3610
3610
  );
@@ -7715,10 +7715,11 @@ var Layout = ({ children }) => {
7715
7715
  const pluginItems = useMemo23(() => {
7716
7716
  const details = {};
7717
7717
  const defaultPlugins = [blocksPlugin(), outlinePlugin()];
7718
+ const isLegacy = (plugin) => plugin.name === "legacy-side-bar" ? -1 : 0;
7718
7719
  const combinedPlugins = [
7719
7720
  ...defaultPlugins,
7720
7721
  ...plugins != null ? plugins : []
7721
- ].sort((a) => a.name === "legacy-side-bar" ? -1 : 1);
7722
+ ].sort((a, b) => isLegacy(a) - isLegacy(b));
7722
7723
  if (!(plugins == null ? void 0 : plugins.some((p) => p.name === "fields"))) {
7723
7724
  combinedPlugins.push(fieldsPlugin());
7724
7725
  }
package/dist/index.js CHANGED
@@ -5060,6 +5060,9 @@ var init_EditorInner = __esm({
5060
5060
  event.preventDefault();
5061
5061
  (_b = editor == null ? void 0 : (_a = editor.commands).toggleItalic) == null ? void 0 : _b.call(_a);
5062
5062
  }
5063
+ if (event.key.toLowerCase() === "backspace") {
5064
+ event.stopPropagation();
5065
+ }
5063
5066
  },
5064
5067
  [editor]
5065
5068
  );
@@ -13491,10 +13494,11 @@ var Layout = ({ children }) => {
13491
13494
  const pluginItems = (0, import_react92.useMemo)(() => {
13492
13495
  const details = {};
13493
13496
  const defaultPlugins = [blocksPlugin(), outlinePlugin()];
13497
+ const isLegacy = (plugin) => plugin.name === "legacy-side-bar" ? -1 : 0;
13494
13498
  const combinedPlugins = [
13495
13499
  ...defaultPlugins,
13496
13500
  ...plugins != null ? plugins : []
13497
- ].sort((a) => a.name === "legacy-side-bar" ? -1 : 1);
13501
+ ].sort((a, b) => isLegacy(a) - isLegacy(b));
13498
13502
  if (!(plugins == null ? void 0 : plugins.some((p) => p.name === "fields"))) {
13499
13503
  combinedPlugins.push(fieldsPlugin());
13500
13504
  }
package/dist/index.mjs CHANGED
@@ -17,8 +17,8 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-K66K75HC.mjs";
21
- import "./chunk-ZPR7EC3T.mjs";
20
+ } from "./chunk-WXA7ZO3I.mjs";
21
+ import "./chunk-UZZ6SRV3.mjs";
22
22
  import {
23
23
  migrate,
24
24
  resolveAllData,
@@ -5060,6 +5060,9 @@ var init_EditorInner = __esm({
5060
5060
  event.preventDefault();
5061
5061
  (_b = editor == null ? void 0 : (_a = editor.commands).toggleItalic) == null ? void 0 : _b.call(_a);
5062
5062
  }
5063
+ if (event.key.toLowerCase() === "backspace") {
5064
+ event.stopPropagation();
5065
+ }
5063
5066
  },
5064
5067
  [editor]
5065
5068
  );
@@ -13494,10 +13497,11 @@ var Layout = ({ children }) => {
13494
13497
  const pluginItems = (0, import_react92.useMemo)(() => {
13495
13498
  const details = {};
13496
13499
  const defaultPlugins = [blocksPlugin(), outlinePlugin()];
13500
+ const isLegacy = (plugin) => plugin.name === "legacy-side-bar" ? -1 : 0;
13497
13501
  const combinedPlugins = [
13498
13502
  ...defaultPlugins,
13499
13503
  ...plugins != null ? plugins : []
13500
- ].sort((a) => a.name === "legacy-side-bar" ? -1 : 1);
13504
+ ].sort((a, b) => isLegacy(a) - isLegacy(b));
13501
13505
  if (!(plugins == null ? void 0 : plugins.some((p) => p.name === "fields"))) {
13502
13506
  combinedPlugins.push(fieldsPlugin());
13503
13507
  }
@@ -17,8 +17,8 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-K66K75HC.mjs";
21
- import "./chunk-ZPR7EC3T.mjs";
20
+ } from "./chunk-WXA7ZO3I.mjs";
21
+ import "./chunk-UZZ6SRV3.mjs";
22
22
  import {
23
23
  migrate,
24
24
  resolveAllData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/core",
3
- "version": "0.21.0",
3
+ "version": "0.21.1-canary.274c5f6a",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "puckeditor/puck",