@puckeditor/core 0.24.0-canary.fcfd4b94 → 0.24.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +1244 -0
  2. package/LICENSE +21 -0
  3. package/dist/{Editor-T7TKW6NT.css → Editor-CSDMK75G.css} +24 -16
  4. package/dist/{Editor-7HVJABBS.mjs → Editor-LJSLIQQP.mjs} +9 -9
  5. package/dist/{Render-DQXAYUBI.mjs → Render-H3USS5FU.mjs} +2 -2
  6. package/dist/{actions-DzP_zhsF.d.ts → actions-Dgllwd-W.d.mts} +24 -4
  7. package/dist/{actions-DzP_zhsF.d.mts → actions-Dgllwd-W.d.ts} +24 -4
  8. package/dist/{chunk-DWQZNG26.mjs → chunk-3GJJSXCL.mjs} +85 -52
  9. package/dist/{chunk-FHGOTDB5.mjs → chunk-5L3MP6BU.mjs} +8 -8
  10. package/dist/{chunk-PI2N6YRG.mjs → chunk-DQXMVPVM.mjs} +2536 -1426
  11. package/dist/{chunk-OOTCJDR3.mjs → chunk-FWBFOZBF.mjs} +189 -139
  12. package/dist/{chunk-75VT4L37.mjs → chunk-M6VGZJMS.mjs} +1 -1
  13. package/dist/{chunk-YBKRDXOL.mjs → chunk-OGTX6PQW.mjs} +1 -1
  14. package/dist/{chunk-Y2EFNT5P.mjs → chunk-OT7NKYY4.mjs} +2 -2
  15. package/dist/{chunk-FVMO3IOJ.mjs → chunk-UIJZMSVU.mjs} +4 -4
  16. package/dist/{chunk-ZRAERXB4.mjs → chunk-XMN55NON.mjs} +3 -2
  17. package/dist/{chunk-L24AF7CT.mjs → chunk-ZO7CHPM6.mjs} +1 -1
  18. package/dist/{chunk-2CNEFIQP.mjs → chunk-ZOLLDKZQ.mjs} +4 -1
  19. package/dist/{full-AAZK6KLI.css → full-F3CBWTKQ.css} +24 -16
  20. package/dist/{full-35XZI7ZG.mjs → full-H4FZ3HN3.mjs} +7 -7
  21. package/dist/{index-Cv-eVWCd.d.ts → index-D0qqZNSQ.d.mts} +2 -1
  22. package/dist/{index-poi3aTIz.d.mts → index-dKPCNzR1.d.ts} +2 -1
  23. package/dist/index.css +371 -127
  24. package/dist/index.d.mts +64 -8
  25. package/dist/index.d.ts +64 -8
  26. package/dist/index.js +5731 -4535
  27. package/dist/index.mjs +16 -10
  28. package/dist/internal.d.mts +2 -2
  29. package/dist/internal.d.ts +2 -2
  30. package/dist/{loaded-ESP3PLMN.mjs → loaded-P5HN7RJY.mjs} +4 -4
  31. package/dist/{loaded-RS7ITDTL.mjs → loaded-PFIA543C.mjs} +4 -4
  32. package/dist/{loaded-CA3Q7UHH.css → loaded-UDM5EYPG.css} +24 -16
  33. package/dist/{loaded-2NYAMF3O.mjs → loaded-WFQRY2XL.mjs} +4 -4
  34. package/dist/no-external.css +371 -127
  35. package/dist/no-external.d.mts +4 -4
  36. package/dist/no-external.d.ts +4 -4
  37. package/dist/no-external.js +5731 -4535
  38. package/dist/no-external.mjs +16 -10
  39. package/dist/rsc.d.mts +4 -3
  40. package/dist/rsc.d.ts +4 -3
  41. package/dist/rsc.js +139 -70
  42. package/dist/rsc.mjs +51 -21
  43. package/dist/{walk-tree-iWDqHBcM.d.mts → walk-tree-BA4pi921.d.mts} +1 -1
  44. package/dist/{walk-tree-Bu3IHwm_.d.ts → walk-tree-zKkZGcaE.d.ts} +1 -1
  45. package/package.json +37 -35
@@ -2,7 +2,7 @@ import {
2
2
  List,
3
3
  ListOrdered,
4
4
  useMessage
5
- } from "./chunk-OOTCJDR3.mjs";
5
+ } from "./chunk-FWBFOZBF.mjs";
6
6
  import {
7
7
  init_react_import
8
8
  } from "./chunk-M6W7YEVX.mjs";
@@ -4,7 +4,7 @@ import {
4
4
  AlignLeft,
5
5
  AlignRight,
6
6
  useMessage
7
- } from "./chunk-OOTCJDR3.mjs";
7
+ } from "./chunk-FWBFOZBF.mjs";
8
8
  import {
9
9
  init_react_import
10
10
  } from "./chunk-M6W7YEVX.mjs";
@@ -5,9 +5,9 @@ import {
5
5
  init_react_import
6
6
  } from "./chunk-M6W7YEVX.mjs";
7
7
 
8
- // ../../node_modules/classnames/index.js
8
+ // ../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js
9
9
  var require_classnames = __commonJS({
10
- "../../node_modules/classnames/index.js"(exports, module) {
10
+ "../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js"(exports, module) {
11
11
  "use strict";
12
12
  init_react_import();
13
13
  (function() {
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-H635BA2V.mjs";
4
4
  import {
5
5
  LoadedRichTextMenuInner
6
- } from "./chunk-FHGOTDB5.mjs";
6
+ } from "./chunk-5L3MP6BU.mjs";
7
7
  import {
8
8
  useAppStore,
9
9
  useAppStoreApi
10
- } from "./chunk-OOTCJDR3.mjs";
10
+ } from "./chunk-FWBFOZBF.mjs";
11
11
  import {
12
12
  get_class_name_factory_default
13
- } from "./chunk-Y2EFNT5P.mjs";
13
+ } from "./chunk-OT7NKYY4.mjs";
14
14
  import {
15
15
  __spreadValues,
16
16
  init_react_import
@@ -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-35XZI7ZG.mjs").then((m) => ({
103
+ () => import("./full-H4FZ3HN3.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -37,7 +37,7 @@ var getChanged = (newItem, oldItem) => {
37
37
  // lib/resolve-component-data.ts
38
38
  import { deepEqual as deepEqual2 } from "fast-equals";
39
39
  var cache = { lastChange: {} };
40
- var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }, cacheStore = cache) {
40
+ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }, cacheStore = cache, resolveChild) {
41
41
  const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
42
42
  const resolvedItem = __spreadValues({}, item);
43
43
  const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
@@ -81,7 +81,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
81
81
  return yield Promise.all(
82
82
  content.map(
83
83
  (childItem) => __async(null, null, function* () {
84
- return (yield resolveComponentData(
84
+ return resolveChild ? resolveChild(childItem, itemAsComponentData) : (yield resolveComponentData(
85
85
  childItem,
86
86
  config,
87
87
  metadata,
@@ -134,6 +134,7 @@ var defaultAppState = {
134
134
  options: [],
135
135
  controlsVisible: true
136
136
  },
137
+ expandedFieldGroups: {},
137
138
  field: { focus: null },
138
139
  plugin: { current: null }
139
140
  },
@@ -6,7 +6,7 @@ import {
6
6
  Heading5,
7
7
  Heading6,
8
8
  useMessage
9
- } from "./chunk-OOTCJDR3.mjs";
9
+ } from "./chunk-FWBFOZBF.mjs";
10
10
  import {
11
11
  init_react_import
12
12
  } from "./chunk-M6W7YEVX.mjs";
@@ -36,7 +36,10 @@ var PuckRichText = Extension.create({
36
36
  name: "puckRichText",
37
37
  addExtensions() {
38
38
  const extensions = [];
39
- const options = __spreadValues(__spreadValues({}, this.options), defaultPuckRichTextOptions);
39
+ const options = __spreadValues({}, this.options);
40
+ if (options.textAlign !== false) {
41
+ options.textAlign = __spreadValues(__spreadValues({}, defaultPuckRichTextOptions.textAlign), options.textAlign);
42
+ }
40
43
  if (options.bold !== false) {
41
44
  extensions.push(Bold.configure(options.bold));
42
45
  }
@@ -99,7 +99,7 @@
99
99
  }
100
100
 
101
101
  /* css-module:/home/runner/work/puck/puck/packages/core/components/ActionBar/styles.module.css/#css-module-data */
102
- ._ActionBar_5vdfr_1 {
102
+ ._ActionBar_gr1cb_1 {
103
103
  align-items: center;
104
104
  cursor: default;
105
105
  display: flex;
@@ -114,7 +114,7 @@
114
114
  font-family: var(--puck-font-family);
115
115
  min-height: 26px;
116
116
  }
117
- ._ActionBar-label_5vdfr_17 {
117
+ ._ActionBar-label_gr1cb_17 {
118
118
  color: var(--puck-actionbar-color-text, var(--puck-color-text-inverse));
119
119
  font-size: var(--puck-actionbar-font-size, var(--puck-font-size-xxxs));
120
120
  opacity: var(--puck-actionbar-opacity-text, var(--puck-opacity-text-inverse));
@@ -126,13 +126,13 @@
126
126
  text-overflow: ellipsis;
127
127
  white-space: nowrap;
128
128
  }
129
- ._ActionBarAction_5vdfr_30 + ._ActionBar-label_5vdfr_17 {
129
+ ._ActionBarAction_gr1cb_30 + ._ActionBar-label_gr1cb_17 {
130
130
  padding-inline-start: 0;
131
131
  }
132
- ._ActionBar-label_5vdfr_17 + ._ActionBarAction_5vdfr_30 {
132
+ ._ActionBar-label_gr1cb_17 + ._ActionBarAction_gr1cb_30 {
133
133
  margin-inline-start: calc(var(--puck-space-1) * -1);
134
134
  }
135
- ._ActionBar-group_5vdfr_38 {
135
+ ._ActionBar-group_gr1cb_38 {
136
136
  align-items: center;
137
137
  border-inline-start: var(--puck-border-width-hairline) solid var(--puck-actionbar-color-separator, var(--puck-color-border-inverse));
138
138
  display: flex;
@@ -140,13 +140,13 @@
140
140
  padding-inline-start: var(--puck-space-1);
141
141
  padding-inline-end: var(--puck-space-1);
142
142
  }
143
- ._ActionBar-group_5vdfr_38:first-of-type {
143
+ ._ActionBar-group_gr1cb_38:first-of-type {
144
144
  border-inline-start: 0;
145
145
  }
146
- ._ActionBar-group_5vdfr_38:empty {
146
+ ._ActionBar-group_gr1cb_38:empty {
147
147
  display: none;
148
148
  }
149
- ._ActionBarAction_5vdfr_30 {
149
+ ._ActionBarAction_gr1cb_30 {
150
150
  background: transparent;
151
151
  border: none;
152
152
  color: var(--puck-actionbar-color-text, var(--puck-color-text-inverse));
@@ -162,35 +162,43 @@
162
162
  opacity: var(--puck-actionbar-opacity-text, var(--puck-opacity-text-inverse));
163
163
  transition: color var(--puck-duration-fast) var(--puck-ease-exit), opacity var(--puck-duration-fast) var(--puck-ease-exit);
164
164
  }
165
- ._ActionBarAction--disabled_5vdfr_74 {
165
+ ._ActionBarAction--disabled_gr1cb_74 {
166
166
  cursor: auto;
167
167
  color: var( --puck-actionbar-color-action-disabled, var(--puck-color-text-inverse) );
168
168
  opacity: var(--puck-actionbar-opacity-action-disabled, 0.54);
169
169
  }
170
- ._ActionBarAction_5vdfr_30 svg {
170
+ ._ActionBarAction--grab_gr1cb_83 {
171
+ cursor: grab;
172
+ touch-action: none;
173
+ }
174
+ ._ActionBarAction-icon_gr1cb_88 {
175
+ height: var(--puck-actionbar-action-size, var(--puck-icon-size-s));
176
+ width: var(--puck-actionbar-action-size, var(--puck-icon-size-s));
177
+ }
178
+ ._ActionBarAction_gr1cb_30 svg {
171
179
  max-width: none !important;
172
180
  }
173
- ._ActionBarAction_5vdfr_30:focus-visible {
181
+ ._ActionBarAction_gr1cb_30:focus-visible {
174
182
  outline: var(--puck-border-width-focus) solid var(--puck-color-focus-ring);
175
183
  outline-offset: calc(var(--puck-border-width-focus) * -1);
176
184
  }
177
185
  @media (hover: hover) and (pointer: fine) {
178
- ._ActionBarAction_5vdfr_30:hover:not(._ActionBarAction--disabled_5vdfr_74) {
186
+ ._ActionBarAction_gr1cb_30:hover:not(._ActionBarAction--disabled_gr1cb_74) {
179
187
  color: var( --puck-actionbar-color-action-hover, var(--puck-color-interactive-inverse-hover) );
180
188
  opacity: 1;
181
189
  transition: none;
182
190
  }
183
191
  }
184
- ._ActionBarAction_5vdfr_30:active:not(._ActionBarAction--disabled_5vdfr_74),
185
- ._ActionBarAction--active_5vdfr_104 {
192
+ ._ActionBarAction_gr1cb_30:active:not(._ActionBarAction--disabled_gr1cb_74),
193
+ ._ActionBarAction--active_gr1cb_114 {
186
194
  color: var( --puck-actionbar-color-action-active, var(--puck-color-interactive-inverse-active) );
187
195
  opacity: 1;
188
196
  transition: none;
189
197
  }
190
- ._ActionBar-group_5vdfr_38 * {
198
+ ._ActionBar-group_gr1cb_38 * {
191
199
  margin: 0;
192
200
  }
193
- ._ActionBar-separator_5vdfr_117 {
201
+ ._ActionBar-separator_gr1cb_127 {
194
202
  background: var( --puck-actionbar-color-separator, var(--puck-color-border-inverse) );
195
203
  margin-inline: var(--puck-space-1);
196
204
  width: var( --puck-border-width-hairline );
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-FHGOTDB5.mjs";
4
- import "./chunk-YBKRDXOL.mjs";
5
- import "./chunk-L24AF7CT.mjs";
6
- import "./chunk-75VT4L37.mjs";
7
- import "./chunk-OOTCJDR3.mjs";
3
+ } from "./chunk-5L3MP6BU.mjs";
4
+ import "./chunk-OGTX6PQW.mjs";
5
+ import "./chunk-ZO7CHPM6.mjs";
6
+ import "./chunk-M6VGZJMS.mjs";
7
+ import "./chunk-FWBFOZBF.mjs";
8
8
  import "./chunk-Z2MS6UIF.mjs";
9
- import "./chunk-ZRAERXB4.mjs";
10
- import "./chunk-Y2EFNT5P.mjs";
9
+ import "./chunk-XMN55NON.mjs";
10
+ import "./chunk-OT7NKYY4.mjs";
11
11
  import "./chunk-H65MT2JK.mjs";
12
12
  import {
13
13
  __spreadValues,
@@ -1,4 +1,4 @@
1
- import { R as History, a1 as Permissions, i as ComponentData, m as Config, ao as UserGenerics, Q as Fields, a5 as PuckAction, af as RootDataWithProps, aa as ResolveDataTrigger, a2 as Plugin, a0 as Overrides, aq as Viewports, S as IframeConfig, an as UiState, f as ComponentConfig, a as AppState, X as Metadata, y as DndConfig, P as FieldTransforms, ac as RichtextField } from './actions-DzP_zhsF.js';
1
+ import { T as History, a3 as Permissions, j as ComponentData, n as Config, aq as UserGenerics, S as Fields, a7 as PuckAction, ah as RootDataWithProps, ac as ResolveDataTrigger, a4 as Plugin, a2 as Overrides, as as Viewports, U as IframeConfig, ap as UiState, g as ComponentConfig, a as AppState, Z as Metadata, z as DndConfig, R as FieldTransforms, ae as RichtextField } from './actions-Dgllwd-W.mjs';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
@@ -75,6 +75,7 @@ declare const defaultDictionary: {
75
75
  readonly "header-toggle-rightsidebar": "Toggle right sidebar";
76
76
  readonly "header-toggle-menubar": "Toggle menu bar";
77
77
  readonly "action-selectparent": "Select parent";
78
+ readonly "action-drag": "Drag to reorder";
78
79
  readonly "action-duplicate": "Duplicate";
79
80
  readonly "action-delete": "Delete";
80
81
  readonly "label-page": "Page";
@@ -1,4 +1,4 @@
1
- import { R as History, a1 as Permissions, i as ComponentData, m as Config, ao as UserGenerics, Q as Fields, a5 as PuckAction, af as RootDataWithProps, aa as ResolveDataTrigger, a2 as Plugin, a0 as Overrides, aq as Viewports, S as IframeConfig, an as UiState, f as ComponentConfig, a as AppState, X as Metadata, y as DndConfig, P as FieldTransforms, ac as RichtextField } from './actions-DzP_zhsF.mjs';
1
+ import { T as History, a3 as Permissions, j as ComponentData, n as Config, aq as UserGenerics, S as Fields, a7 as PuckAction, ah as RootDataWithProps, ac as ResolveDataTrigger, a4 as Plugin, a2 as Overrides, as as Viewports, U as IframeConfig, ap as UiState, g as ComponentConfig, a as AppState, Z as Metadata, z as DndConfig, R as FieldTransforms, ae as RichtextField } from './actions-Dgllwd-W.js';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
@@ -75,6 +75,7 @@ declare const defaultDictionary: {
75
75
  readonly "header-toggle-rightsidebar": "Toggle right sidebar";
76
76
  readonly "header-toggle-menubar": "Toggle menu bar";
77
77
  readonly "action-selectparent": "Select parent";
78
+ readonly "action-drag": "Drag to reorder";
78
79
  readonly "action-duplicate": "Duplicate";
79
80
  readonly "action-delete": "Delete";
80
81
  readonly "label-page": "Page";