@puckeditor/core 0.22.0-canary.3ef233f7 → 0.22.0-canary.3f4b053e

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,9 +4,9 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-4V66DSMA.mjs";
7
+ } from "./chunk-AYW7BYRA.mjs";
8
8
  import "./chunk-AOEDIUVK.mjs";
9
- import "./chunk-6PUO3QRB.mjs";
9
+ import "./chunk-NWL4JLKR.mjs";
10
10
  import "./chunk-4X2SLJRQ.mjs";
11
11
  import "./chunk-GFIZBMKN.mjs";
12
12
  import "./chunk-MQKADUDK.mjs";
@@ -41,7 +41,7 @@
41
41
  }
42
42
 
43
43
  /* css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
44
- ._IconButton_ffob9_1 {
44
+ ._IconButton_1c68y_1 {
45
45
  align-items: center;
46
46
  background: transparent;
47
47
  border: none;
@@ -53,35 +53,26 @@
53
53
  padding: 4px;
54
54
  transition: background-color 50ms ease-in, color 50ms ease-in;
55
55
  }
56
- ._IconButton--active_ffob9_14 {
56
+ ._IconButton--active_1c68y_14 {
57
57
  color: var(--puck-color-azure-04);
58
58
  }
59
- ._IconButton_ffob9_1:focus-visible {
59
+ ._IconButton_1c68y_1:focus-visible {
60
60
  outline: 2px solid var(--puck-color-azure-05);
61
61
  outline-offset: -2px;
62
62
  }
63
63
  @media (hover: hover) and (pointer: fine) {
64
- ._IconButton_ffob9_1:hover:not(._IconButton--disabled_ffob9_24) {
64
+ ._IconButton_1c68y_1:hover:not(._IconButton--disabled_1c68y_24) {
65
65
  background: var(--puck-color-grey-10);
66
66
  color: var(--puck-color-azure-04);
67
67
  cursor: pointer;
68
68
  transition: none;
69
69
  }
70
70
  }
71
- ._IconButton_ffob9_1:active {
71
+ ._IconButton_1c68y_1:active {
72
72
  background: var(--puck-color-azure-11);
73
73
  transition: none;
74
74
  }
75
- ._IconButton-title_ffob9_37 {
76
- clip: rect(0 0 0 0);
77
- clip-path: inset(100%);
78
- height: 1px;
79
- overflow: hidden;
80
- position: absolute;
81
- white-space: nowrap;
82
- width: 1px;
83
- }
84
- ._IconButton--disabled_ffob9_24 {
75
+ ._IconButton--disabled_1c68y_24 {
85
76
  color: var(--puck-color-grey-07);
86
77
  }
87
78
 
@@ -32,6 +32,9 @@ function RichTextRender({
32
32
  return content;
33
33
  }
34
34
  if (typeof content === "string") {
35
+ if (!content) {
36
+ return { type: "doc", content: [] };
37
+ }
35
38
  const isHtml = /<\/?[a-z][\s\S]*>/i.test(content);
36
39
  if (isHtml) {
37
40
  return generateJSON(content, loadedExtensions);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-AOEDIUVK.mjs";
4
4
  import {
5
5
  LoadedRichTextMenuInner
6
- } from "./chunk-6PUO3QRB.mjs";
6
+ } from "./chunk-NWL4JLKR.mjs";
7
7
  import {
8
8
  useAppStore,
9
9
  useAppStoreApi
@@ -100,7 +100,7 @@ init_react_import();
100
100
  import { lazy, Suspense } from "react";
101
101
  import { jsx as jsx2 } from "react/jsx-runtime";
102
102
  var LoadedRichTextMenuFull = lazy(
103
- () => import("./full-YKFH7JSW.mjs").then((m) => ({
103
+ () => import("./full-7TOUYV6S.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -402,7 +402,7 @@ function useRichtextProps(fields, props) {
402
402
  const richtextProps = useMemo2(() => {
403
403
  if (!(richtextKeys == null ? void 0 : richtextKeys.length)) return {};
404
404
  const RichTextRender = lazy(
405
- () => import("./Render-CU35UAWV.mjs").then((m) => ({
405
+ () => import("./Render-MJ563JES.mjs").then((m) => ({
406
406
  default: m.RichTextRender
407
407
  }))
408
408
  );
@@ -95,7 +95,7 @@ import { useState } from "react";
95
95
 
96
96
  // css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css#css-module
97
97
  init_react_import();
98
- var IconButton_module_default = { "IconButton": "_IconButton_ffob9_1", "IconButton--active": "_IconButton--active_ffob9_14", "IconButton--disabled": "_IconButton--disabled_ffob9_24", "IconButton-title": "_IconButton-title_ffob9_37" };
98
+ var IconButton_module_default = { "IconButton": "_IconButton_1c68y_1", "IconButton--active": "_IconButton--active_1c68y_14", "IconButton--disabled": "_IconButton--disabled_1c68y_24" };
99
99
 
100
100
  // components/Loader/index.tsx
101
101
  init_react_import();
@@ -169,9 +169,9 @@ var IconButton = ({
169
169
  rel: newTab ? "noreferrer" : void 0,
170
170
  href,
171
171
  title,
172
+ "aria-label": title,
172
173
  suppressHydrationWarning,
173
174
  children: [
174
- /* @__PURE__ */ jsx3("span", { className: getClassName3("title"), children: title }),
175
175
  children,
176
176
  loading && /* @__PURE__ */ jsxs2(Fragment, { children: [
177
177
  "\xA0\xA0",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-4V66DSMA.mjs";
4
+ } from "./chunk-AYW7BYRA.mjs";
5
5
  import {
6
6
  RichTextRenderFallback,
7
7
  SlotRender,
@@ -10,13 +10,13 @@ import {
10
10
  getSlotTransform,
11
11
  useRichtextProps,
12
12
  useSlots
13
- } from "./chunk-7QEMMXYS.mjs";
13
+ } from "./chunk-CO6PRTVM.mjs";
14
14
  import {
15
15
  ActionBar,
16
16
  IconButton,
17
17
  LoadedRichTextMenuInner,
18
18
  Loader
19
- } from "./chunk-6PUO3QRB.mjs";
19
+ } from "./chunk-NWL4JLKR.mjs";
20
20
  import {
21
21
  ChevronDown,
22
22
  ChevronRight,
@@ -1996,7 +1996,7 @@ EditorFallback.displayName = "EditorFallback";
1996
1996
  // components/AutoField/fields/RichtextField/index.tsx
1997
1997
  import { Fragment as Fragment5, jsx as jsx18 } from "react/jsx-runtime";
1998
1998
  var Editor = lazy(
1999
- () => import("./Editor-HFELA66Z.mjs").then((m) => ({
1999
+ () => import("./Editor-DDIC67UK.mjs").then((m) => ({
2000
2000
  default: m.Editor
2001
2001
  }))
2002
2002
  );
@@ -4359,8 +4359,9 @@ var InlineTextFieldInternal = ({
4359
4359
  );
4360
4360
  }
4361
4361
  if (ref.current) {
4362
- if (value !== ref.current.innerText) {
4363
- ref.current.replaceChildren(value);
4362
+ const safeValue = value != null ? value : "";
4363
+ if (safeValue !== ref.current.innerText) {
4364
+ ref.current.replaceChildren(safeValue);
4364
4365
  }
4365
4366
  const cleanupPortal = registerOverlayPortal(ref.current);
4366
4367
  const handleInput = (e) => __async(null, null, function* () {
@@ -4495,12 +4496,12 @@ import {
4495
4496
  } from "react";
4496
4497
  import { jsx as jsx28 } from "react/jsx-runtime";
4497
4498
  var Editor2 = lazy2(
4498
- () => import("./Editor-HFELA66Z.mjs").then((m) => ({
4499
+ () => import("./Editor-DDIC67UK.mjs").then((m) => ({
4499
4500
  default: m.Editor
4500
4501
  }))
4501
4502
  );
4502
4503
  var RichTextRender = lazy2(
4503
- () => import("./Render-CU35UAWV.mjs").then((m) => ({
4504
+ () => import("./Render-MJ563JES.mjs").then((m) => ({
4504
4505
  default: m.RichTextRender
4505
4506
  }))
4506
4507
  );
@@ -7056,7 +7057,7 @@ textarea._Input-input_bsxfo_26 {
7056
7057
  }
7057
7058
 
7058
7059
  /* css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
7059
- ._IconButton_ffob9_1 {
7060
+ ._IconButton_1c68y_1 {
7060
7061
  align-items: center;
7061
7062
  background: transparent;
7062
7063
  border: none;
@@ -7068,35 +7069,26 @@ textarea._Input-input_bsxfo_26 {
7068
7069
  padding: 4px;
7069
7070
  transition: background-color 50ms ease-in, color 50ms ease-in;
7070
7071
  }
7071
- ._IconButton--active_ffob9_14 {
7072
+ ._IconButton--active_1c68y_14 {
7072
7073
  color: var(--puck-color-azure-04);
7073
7074
  }
7074
- ._IconButton_ffob9_1:focus-visible {
7075
+ ._IconButton_1c68y_1:focus-visible {
7075
7076
  outline: 2px solid var(--puck-color-azure-05);
7076
7077
  outline-offset: -2px;
7077
7078
  }
7078
7079
  @media (hover: hover) and (pointer: fine) {
7079
- ._IconButton_ffob9_1:hover:not(._IconButton--disabled_ffob9_24) {
7080
+ ._IconButton_1c68y_1:hover:not(._IconButton--disabled_1c68y_24) {
7080
7081
  background: var(--puck-color-grey-10);
7081
7082
  color: var(--puck-color-azure-04);
7082
7083
  cursor: pointer;
7083
7084
  transition: none;
7084
7085
  }
7085
7086
  }
7086
- ._IconButton_ffob9_1:active {
7087
+ ._IconButton_1c68y_1:active {
7087
7088
  background: var(--puck-color-azure-11);
7088
7089
  transition: none;
7089
7090
  }
7090
- ._IconButton-title_ffob9_37 {
7091
- clip: rect(0 0 0 0);
7092
- clip-path: inset(100%);
7093
- height: 1px;
7094
- overflow: hidden;
7095
- position: absolute;
7096
- white-space: nowrap;
7097
- width: 1px;
7098
- }
7099
- ._IconButton--disabled_ffob9_24 {
7091
+ ._IconButton--disabled_1c68y_24 {
7100
7092
  color: var(--puck-color-grey-07);
7101
7093
  }
7102
7094
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-6PUO3QRB.mjs";
3
+ } from "./chunk-NWL4JLKR.mjs";
4
4
  import "./chunk-4X2SLJRQ.mjs";
5
5
  import "./chunk-GFIZBMKN.mjs";
6
6
  import "./chunk-MQKADUDK.mjs";
@@ -41,7 +41,7 @@
41
41
  }
42
42
 
43
43
  /* css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
44
- ._IconButton_ffob9_1 {
44
+ ._IconButton_1c68y_1 {
45
45
  align-items: center;
46
46
  background: transparent;
47
47
  border: none;
@@ -53,35 +53,26 @@
53
53
  padding: 4px;
54
54
  transition: background-color 50ms ease-in, color 50ms ease-in;
55
55
  }
56
- ._IconButton--active_ffob9_14 {
56
+ ._IconButton--active_1c68y_14 {
57
57
  color: var(--puck-color-azure-04);
58
58
  }
59
- ._IconButton_ffob9_1:focus-visible {
59
+ ._IconButton_1c68y_1:focus-visible {
60
60
  outline: 2px solid var(--puck-color-azure-05);
61
61
  outline-offset: -2px;
62
62
  }
63
63
  @media (hover: hover) and (pointer: fine) {
64
- ._IconButton_ffob9_1:hover:not(._IconButton--disabled_ffob9_24) {
64
+ ._IconButton_1c68y_1:hover:not(._IconButton--disabled_1c68y_24) {
65
65
  background: var(--puck-color-grey-10);
66
66
  color: var(--puck-color-azure-04);
67
67
  cursor: pointer;
68
68
  transition: none;
69
69
  }
70
70
  }
71
- ._IconButton_ffob9_1:active {
71
+ ._IconButton_1c68y_1:active {
72
72
  background: var(--puck-color-azure-11);
73
73
  transition: none;
74
74
  }
75
- ._IconButton-title_ffob9_37 {
76
- clip: rect(0 0 0 0);
77
- clip-path: inset(100%);
78
- height: 1px;
79
- overflow: hidden;
80
- position: absolute;
81
- white-space: nowrap;
82
- width: 1px;
83
- }
84
- ._IconButton--disabled_ffob9_24 {
75
+ ._IconButton--disabled_1c68y_24 {
85
76
  color: var(--puck-color-grey-07);
86
77
  }
87
78
 
package/dist/index.css CHANGED
@@ -559,7 +559,7 @@ textarea._Input-input_bsxfo_26 {
559
559
  }
560
560
 
561
561
  /* css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
562
- ._IconButton_ffob9_1 {
562
+ ._IconButton_1c68y_1 {
563
563
  align-items: center;
564
564
  background: transparent;
565
565
  border: none;
@@ -571,35 +571,26 @@ textarea._Input-input_bsxfo_26 {
571
571
  padding: 4px;
572
572
  transition: background-color 50ms ease-in, color 50ms ease-in;
573
573
  }
574
- ._IconButton--active_ffob9_14 {
574
+ ._IconButton--active_1c68y_14 {
575
575
  color: var(--puck-color-azure-04);
576
576
  }
577
- ._IconButton_ffob9_1:focus-visible {
577
+ ._IconButton_1c68y_1:focus-visible {
578
578
  outline: 2px solid var(--puck-color-azure-05);
579
579
  outline-offset: -2px;
580
580
  }
581
581
  @media (hover: hover) and (pointer: fine) {
582
- ._IconButton_ffob9_1:hover:not(._IconButton--disabled_ffob9_24) {
582
+ ._IconButton_1c68y_1:hover:not(._IconButton--disabled_1c68y_24) {
583
583
  background: var(--puck-color-grey-10);
584
584
  color: var(--puck-color-azure-04);
585
585
  cursor: pointer;
586
586
  transition: none;
587
587
  }
588
588
  }
589
- ._IconButton_ffob9_1:active {
589
+ ._IconButton_1c68y_1:active {
590
590
  background: var(--puck-color-azure-11);
591
591
  transition: none;
592
592
  }
593
- ._IconButton-title_ffob9_37 {
594
- clip: rect(0 0 0 0);
595
- clip-path: inset(100%);
596
- height: 1px;
597
- overflow: hidden;
598
- position: absolute;
599
- white-space: nowrap;
600
- width: 1px;
601
- }
602
- ._IconButton--disabled_ffob9_24 {
593
+ ._IconButton--disabled_1c68y_24 {
603
594
  color: var(--puck-color-grey-07);
604
595
  }
605
596
 
package/dist/index.js CHANGED
@@ -1322,7 +1322,7 @@ var init_IconButton_module = __esm({
1322
1322
  "use strict";
1323
1323
  init_react_import();
1324
1324
  init_css_module_data2();
1325
- IconButton_module_default = { "IconButton": "_IconButton_ffob9_1", "IconButton--active": "_IconButton--active_ffob9_14", "IconButton--disabled": "_IconButton--disabled_ffob9_24", "IconButton-title": "_IconButton-title_ffob9_37" };
1325
+ IconButton_module_default = { "IconButton": "_IconButton_1c68y_1", "IconButton--active": "_IconButton--active_1c68y_14", "IconButton--disabled": "_IconButton--disabled_1c68y_24" };
1326
1326
  }
1327
1327
  });
1328
1328
 
@@ -3864,9 +3864,9 @@ var init_IconButton = __esm({
3864
3864
  rel: newTab ? "noreferrer" : void 0,
3865
3865
  href,
3866
3866
  title,
3867
+ "aria-label": title,
3867
3868
  suppressHydrationWarning,
3868
3869
  children: [
3869
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: getClassName3("title"), children: title }),
3870
3870
  children,
3871
3871
  loading && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
3872
3872
  "\xA0\xA0",
@@ -5599,6 +5599,9 @@ function RichTextRender({
5599
5599
  return content;
5600
5600
  }
5601
5601
  if (typeof content === "string") {
5602
+ if (!content) {
5603
+ return { type: "doc", content: [] };
5604
+ }
5602
5605
  const isHtml = /<\/?[a-z][\s\S]*>/i.test(content);
5603
5606
  if (isHtml) {
5604
5607
  return (0, import_html.generateJSON)(content, loadedExtensions);
@@ -9331,8 +9334,9 @@ var InlineTextFieldInternal = ({
9331
9334
  );
9332
9335
  }
9333
9336
  if (ref.current) {
9334
- if (value !== ref.current.innerText) {
9335
- ref.current.replaceChildren(value);
9337
+ const safeValue = value != null ? value : "";
9338
+ if (safeValue !== ref.current.innerText) {
9339
+ ref.current.replaceChildren(safeValue);
9336
9340
  }
9337
9341
  const cleanupPortal = registerOverlayPortal(ref.current);
9338
9342
  const handleInput = (e) => __async(null, null, function* () {
@@ -12158,7 +12162,7 @@ textarea._Input-input_bsxfo_26 {
12158
12162
  }
12159
12163
 
12160
12164
  /* css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
12161
- ._IconButton_ffob9_1 {
12165
+ ._IconButton_1c68y_1 {
12162
12166
  align-items: center;
12163
12167
  background: transparent;
12164
12168
  border: none;
@@ -12170,35 +12174,26 @@ textarea._Input-input_bsxfo_26 {
12170
12174
  padding: 4px;
12171
12175
  transition: background-color 50ms ease-in, color 50ms ease-in;
12172
12176
  }
12173
- ._IconButton--active_ffob9_14 {
12177
+ ._IconButton--active_1c68y_14 {
12174
12178
  color: var(--puck-color-azure-04);
12175
12179
  }
12176
- ._IconButton_ffob9_1:focus-visible {
12180
+ ._IconButton_1c68y_1:focus-visible {
12177
12181
  outline: 2px solid var(--puck-color-azure-05);
12178
12182
  outline-offset: -2px;
12179
12183
  }
12180
12184
  @media (hover: hover) and (pointer: fine) {
12181
- ._IconButton_ffob9_1:hover:not(._IconButton--disabled_ffob9_24) {
12185
+ ._IconButton_1c68y_1:hover:not(._IconButton--disabled_1c68y_24) {
12182
12186
  background: var(--puck-color-grey-10);
12183
12187
  color: var(--puck-color-azure-04);
12184
12188
  cursor: pointer;
12185
12189
  transition: none;
12186
12190
  }
12187
12191
  }
12188
- ._IconButton_ffob9_1:active {
12192
+ ._IconButton_1c68y_1:active {
12189
12193
  background: var(--puck-color-azure-11);
12190
12194
  transition: none;
12191
12195
  }
12192
- ._IconButton-title_ffob9_37 {
12193
- clip: rect(0 0 0 0);
12194
- clip-path: inset(100%);
12195
- height: 1px;
12196
- overflow: hidden;
12197
- position: absolute;
12198
- white-space: nowrap;
12199
- width: 1px;
12200
- }
12201
- ._IconButton--disabled_ffob9_24 {
12196
+ ._IconButton--disabled_1c68y_24 {
12202
12197
  color: var(--puck-color-grey-07);
12203
12198
  }
12204
12199
 
package/dist/index.mjs CHANGED
@@ -17,13 +17,13 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-FNE5FMBH.mjs";
21
- import "./chunk-4V66DSMA.mjs";
20
+ } from "./chunk-QZGZOWXN.mjs";
21
+ import "./chunk-AYW7BYRA.mjs";
22
22
  import {
23
23
  migrate,
24
24
  resolveAllData,
25
25
  transformProps
26
- } from "./chunk-7QEMMXYS.mjs";
26
+ } from "./chunk-CO6PRTVM.mjs";
27
27
  import "./chunk-AOEDIUVK.mjs";
28
28
  import {
29
29
  Action,
@@ -33,7 +33,7 @@ import {
33
33
  Label,
34
34
  RichTextMenu,
35
35
  Separator
36
- } from "./chunk-6PUO3QRB.mjs";
36
+ } from "./chunk-NWL4JLKR.mjs";
37
37
  import "./chunk-4X2SLJRQ.mjs";
38
38
  import "./chunk-GFIZBMKN.mjs";
39
39
  import "./chunk-MQKADUDK.mjs";
@@ -557,7 +557,7 @@ textarea._Input-input_bsxfo_26 {
557
557
  }
558
558
 
559
559
  /* css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
560
- ._IconButton_ffob9_1 {
560
+ ._IconButton_1c68y_1 {
561
561
  align-items: center;
562
562
  background: transparent;
563
563
  border: none;
@@ -569,35 +569,26 @@ textarea._Input-input_bsxfo_26 {
569
569
  padding: 4px;
570
570
  transition: background-color 50ms ease-in, color 50ms ease-in;
571
571
  }
572
- ._IconButton--active_ffob9_14 {
572
+ ._IconButton--active_1c68y_14 {
573
573
  color: var(--puck-color-azure-04);
574
574
  }
575
- ._IconButton_ffob9_1:focus-visible {
575
+ ._IconButton_1c68y_1:focus-visible {
576
576
  outline: 2px solid var(--puck-color-azure-05);
577
577
  outline-offset: -2px;
578
578
  }
579
579
  @media (hover: hover) and (pointer: fine) {
580
- ._IconButton_ffob9_1:hover:not(._IconButton--disabled_ffob9_24) {
580
+ ._IconButton_1c68y_1:hover:not(._IconButton--disabled_1c68y_24) {
581
581
  background: var(--puck-color-grey-10);
582
582
  color: var(--puck-color-azure-04);
583
583
  cursor: pointer;
584
584
  transition: none;
585
585
  }
586
586
  }
587
- ._IconButton_ffob9_1:active {
587
+ ._IconButton_1c68y_1:active {
588
588
  background: var(--puck-color-azure-11);
589
589
  transition: none;
590
590
  }
591
- ._IconButton-title_ffob9_37 {
592
- clip: rect(0 0 0 0);
593
- clip-path: inset(100%);
594
- height: 1px;
595
- overflow: hidden;
596
- position: absolute;
597
- white-space: nowrap;
598
- width: 1px;
599
- }
600
- ._IconButton--disabled_ffob9_24 {
591
+ ._IconButton--disabled_1c68y_24 {
601
592
  color: var(--puck-color-grey-07);
602
593
  }
603
594
 
@@ -1322,7 +1322,7 @@ var init_IconButton_module = __esm({
1322
1322
  "use strict";
1323
1323
  init_react_import();
1324
1324
  init_css_module_data2();
1325
- IconButton_module_default = { "IconButton": "_IconButton_ffob9_1", "IconButton--active": "_IconButton--active_ffob9_14", "IconButton--disabled": "_IconButton--disabled_ffob9_24", "IconButton-title": "_IconButton-title_ffob9_37" };
1325
+ IconButton_module_default = { "IconButton": "_IconButton_1c68y_1", "IconButton--active": "_IconButton--active_1c68y_14", "IconButton--disabled": "_IconButton--disabled_1c68y_24" };
1326
1326
  }
1327
1327
  });
1328
1328
 
@@ -3864,9 +3864,9 @@ var init_IconButton = __esm({
3864
3864
  rel: newTab ? "noreferrer" : void 0,
3865
3865
  href,
3866
3866
  title,
3867
+ "aria-label": title,
3867
3868
  suppressHydrationWarning,
3868
3869
  children: [
3869
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: getClassName3("title"), children: title }),
3870
3870
  children,
3871
3871
  loading && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
3872
3872
  "\xA0\xA0",
@@ -5599,6 +5599,9 @@ function RichTextRender({
5599
5599
  return content;
5600
5600
  }
5601
5601
  if (typeof content === "string") {
5602
+ if (!content) {
5603
+ return { type: "doc", content: [] };
5604
+ }
5602
5605
  const isHtml = /<\/?[a-z][\s\S]*>/i.test(content);
5603
5606
  if (isHtml) {
5604
5607
  return (0, import_html.generateJSON)(content, loadedExtensions);
@@ -9331,8 +9334,9 @@ var InlineTextFieldInternal = ({
9331
9334
  );
9332
9335
  }
9333
9336
  if (ref.current) {
9334
- if (value !== ref.current.innerText) {
9335
- ref.current.replaceChildren(value);
9337
+ const safeValue = value != null ? value : "";
9338
+ if (safeValue !== ref.current.innerText) {
9339
+ ref.current.replaceChildren(safeValue);
9336
9340
  }
9337
9341
  const cleanupPortal = registerOverlayPortal(ref.current);
9338
9342
  const handleInput = (e) => __async(null, null, function* () {
@@ -12158,7 +12162,7 @@ textarea._Input-input_bsxfo_26 {
12158
12162
  }
12159
12163
 
12160
12164
  /* css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
12161
- ._IconButton_ffob9_1 {
12165
+ ._IconButton_1c68y_1 {
12162
12166
  align-items: center;
12163
12167
  background: transparent;
12164
12168
  border: none;
@@ -12170,35 +12174,26 @@ textarea._Input-input_bsxfo_26 {
12170
12174
  padding: 4px;
12171
12175
  transition: background-color 50ms ease-in, color 50ms ease-in;
12172
12176
  }
12173
- ._IconButton--active_ffob9_14 {
12177
+ ._IconButton--active_1c68y_14 {
12174
12178
  color: var(--puck-color-azure-04);
12175
12179
  }
12176
- ._IconButton_ffob9_1:focus-visible {
12180
+ ._IconButton_1c68y_1:focus-visible {
12177
12181
  outline: 2px solid var(--puck-color-azure-05);
12178
12182
  outline-offset: -2px;
12179
12183
  }
12180
12184
  @media (hover: hover) and (pointer: fine) {
12181
- ._IconButton_ffob9_1:hover:not(._IconButton--disabled_ffob9_24) {
12185
+ ._IconButton_1c68y_1:hover:not(._IconButton--disabled_1c68y_24) {
12182
12186
  background: var(--puck-color-grey-10);
12183
12187
  color: var(--puck-color-azure-04);
12184
12188
  cursor: pointer;
12185
12189
  transition: none;
12186
12190
  }
12187
12191
  }
12188
- ._IconButton_ffob9_1:active {
12192
+ ._IconButton_1c68y_1:active {
12189
12193
  background: var(--puck-color-azure-11);
12190
12194
  transition: none;
12191
12195
  }
12192
- ._IconButton-title_ffob9_37 {
12193
- clip: rect(0 0 0 0);
12194
- clip-path: inset(100%);
12195
- height: 1px;
12196
- overflow: hidden;
12197
- position: absolute;
12198
- white-space: nowrap;
12199
- width: 1px;
12200
- }
12201
- ._IconButton--disabled_ffob9_24 {
12196
+ ._IconButton--disabled_1c68y_24 {
12202
12197
  color: var(--puck-color-grey-07);
12203
12198
  }
12204
12199
 
@@ -17,13 +17,13 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-FNE5FMBH.mjs";
21
- import "./chunk-4V66DSMA.mjs";
20
+ } from "./chunk-QZGZOWXN.mjs";
21
+ import "./chunk-AYW7BYRA.mjs";
22
22
  import {
23
23
  migrate,
24
24
  resolveAllData,
25
25
  transformProps
26
- } from "./chunk-7QEMMXYS.mjs";
26
+ } from "./chunk-CO6PRTVM.mjs";
27
27
  import "./chunk-AOEDIUVK.mjs";
28
28
  import {
29
29
  Action,
@@ -33,7 +33,7 @@ import {
33
33
  Label,
34
34
  RichTextMenu,
35
35
  Separator
36
- } from "./chunk-6PUO3QRB.mjs";
36
+ } from "./chunk-NWL4JLKR.mjs";
37
37
  import "./chunk-4X2SLJRQ.mjs";
38
38
  import "./chunk-GFIZBMKN.mjs";
39
39
  import "./chunk-MQKADUDK.mjs";
package/dist/rsc.js CHANGED
@@ -319,6 +319,9 @@ function RichTextRender({
319
319
  return content;
320
320
  }
321
321
  if (typeof content === "string") {
322
+ if (!content) {
323
+ return { type: "doc", content: [] };
324
+ }
322
325
  const isHtml = /<\/?[a-z][\s\S]*>/i.test(content);
323
326
  if (isHtml) {
324
327
  return (0, import_html.generateJSON)(content, loadedExtensions);
package/dist/rsc.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  transformProps,
6
6
  useRichtextProps,
7
7
  useSlots
8
- } from "./chunk-7QEMMXYS.mjs";
8
+ } from "./chunk-CO6PRTVM.mjs";
9
9
  import "./chunk-AOEDIUVK.mjs";
10
10
  import "./chunk-6MO3E35Y.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/core",
3
- "version": "0.22.0-canary.3ef233f7",
3
+ "version": "0.22.0-canary.3f4b053e",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "puckeditor/puck",