@puckeditor/core 0.22.1 → 0.23.0-canary.7ca16bcb

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.
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  List,
3
- ListOrdered
4
- } from "./chunk-54LFCIWQ.mjs";
3
+ ListOrdered,
4
+ useMessage
5
+ } from "./chunk-2KHLVDRT.mjs";
5
6
  import {
6
7
  init_react_import
7
8
  } from "./chunk-M6W7YEVX.mjs";
@@ -9,11 +10,17 @@ import {
9
10
  // components/RichTextMenu/controls/ListSelect/use-options.ts
10
11
  init_react_import();
11
12
  import { useMemo } from "react";
12
- var optionNodes = {
13
- ul: { label: "Bullet list", icon: List },
14
- ol: { label: "Numbered list", icon: ListOrdered }
13
+ var optionIcons = {
14
+ ul: List,
15
+ ol: ListOrdered
15
16
  };
16
17
  var useListOptions = (fieldOptions) => {
18
+ const ulString = useMessage("field-richtext-listselect-bullet");
19
+ const olString = useMessage("field-richtext-listselect-ordered");
20
+ const optionLabels = {
21
+ ul: ulString,
22
+ ol: olString
23
+ };
17
24
  let blockOptions = [];
18
25
  if ((fieldOptions == null ? void 0 : fieldOptions.listItem) !== false) {
19
26
  blockOptions = ["ul", "ol"];
@@ -21,10 +28,10 @@ var useListOptions = (fieldOptions) => {
21
28
  return useMemo(
22
29
  () => blockOptions.map((item) => ({
23
30
  value: item,
24
- label: optionNodes[item].label,
25
- icon: optionNodes[item].icon
31
+ label: optionLabels[item],
32
+ icon: optionIcons[item]
26
33
  })),
27
- [blockOptions]
34
+ [blockOptions, optionLabels]
28
35
  );
29
36
  };
30
37
 
@@ -2,8 +2,9 @@ import {
2
2
  AlignCenter,
3
3
  AlignJustify,
4
4
  AlignLeft,
5
- AlignRight
6
- } from "./chunk-54LFCIWQ.mjs";
5
+ AlignRight,
6
+ useMessage
7
+ } from "./chunk-2KHLVDRT.mjs";
7
8
  import {
8
9
  init_react_import
9
10
  } from "./chunk-M6W7YEVX.mjs";
@@ -11,14 +12,24 @@ import {
11
12
  // components/RichTextMenu/controls/AlignSelect/use-options.ts
12
13
  init_react_import();
13
14
  import { useMemo } from "react";
14
- var optionNodes = {
15
- left: { label: "Left", icon: AlignLeft },
16
- center: { label: "Center", icon: AlignCenter },
17
- right: { label: "Right", icon: AlignRight },
18
- justify: { label: "Justify", icon: AlignJustify }
15
+ var optionIcons = {
16
+ left: AlignLeft,
17
+ center: AlignCenter,
18
+ right: AlignRight,
19
+ justify: AlignJustify
19
20
  };
20
21
  var useAlignOptions = (fieldOptions) => {
21
22
  var _a;
23
+ const leftString = useMessage("field-richtext-alignselect-left");
24
+ const centerString = useMessage("field-richtext-alignselect-center");
25
+ const rightString = useMessage("field-richtext-alignselect-right");
26
+ const justifyString = useMessage("field-richtext-alignselect-justify");
27
+ const optionLabels = {
28
+ left: leftString,
29
+ center: centerString,
30
+ right: rightString,
31
+ justify: justifyString
32
+ };
22
33
  let blockOptions = [];
23
34
  if ((fieldOptions == null ? void 0 : fieldOptions.textAlign) !== false) {
24
35
  if (!((_a = fieldOptions == null ? void 0 : fieldOptions.textAlign) == null ? void 0 : _a.alignments)) {
@@ -41,10 +52,10 @@ var useAlignOptions = (fieldOptions) => {
41
52
  return useMemo(
42
53
  () => blockOptions.map((item) => ({
43
54
  value: item,
44
- label: optionNodes[item].label,
45
- icon: optionNodes[item].icon
55
+ label: optionLabels[item],
56
+ icon: optionIcons[item]
46
57
  })),
47
- [blockOptions]
58
+ [blockOptions, optionLabels]
48
59
  );
49
60
  };
50
61
 
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-2AATV7NG.mjs";
3
+ } from "./chunk-G3YMTKUD.mjs";
4
4
  import {
5
5
  useHeadingOptions
6
- } from "./chunk-BVKXFA4V.mjs";
6
+ } from "./chunk-X4NMPUXH.mjs";
7
7
  import {
8
8
  useListOptions
9
- } from "./chunk-DATOBXTJ.mjs";
9
+ } from "./chunk-EQADD6J2.mjs";
10
10
  import {
11
11
  Action,
12
12
  AlignCenter,
@@ -27,8 +27,9 @@ import {
27
27
  SquareCode,
28
28
  Strikethrough,
29
29
  Underline,
30
- useControlContext
31
- } from "./chunk-54LFCIWQ.mjs";
30
+ useControlContext,
31
+ useMessage
32
+ } from "./chunk-2KHLVDRT.mjs";
32
33
  import {
33
34
  get_class_name_factory_default
34
35
  } from "./chunk-Y2EFNT5P.mjs";
@@ -98,6 +99,7 @@ function Control({
98
99
  import { jsx as jsx2 } from "react/jsx-runtime";
99
100
  function AlignLeft2() {
100
101
  const { editor, editorState } = useControlContext();
102
+ const alignLeftLabel = useMessage("field-richtext-align-left");
101
103
  return /* @__PURE__ */ jsx2(
102
104
  Control,
103
105
  {
@@ -108,7 +110,7 @@ function AlignLeft2() {
108
110
  },
109
111
  disabled: !(editorState == null ? void 0 : editorState.canAlignLeft),
110
112
  active: editorState == null ? void 0 : editorState.isAlignLeft,
111
- title: "Align left"
113
+ title: alignLeftLabel
112
114
  }
113
115
  );
114
116
  }
@@ -118,6 +120,7 @@ init_react_import();
118
120
  import { jsx as jsx3 } from "react/jsx-runtime";
119
121
  function AlignCenter2() {
120
122
  const { editor, editorState } = useControlContext();
123
+ const alignCenterLabel = useMessage("field-richtext-align-center");
121
124
  return /* @__PURE__ */ jsx3(
122
125
  Control,
123
126
  {
@@ -128,7 +131,7 @@ function AlignCenter2() {
128
131
  },
129
132
  disabled: !(editorState == null ? void 0 : editorState.canAlignCenter),
130
133
  active: editorState == null ? void 0 : editorState.isAlignCenter,
131
- title: "Align center"
134
+ title: alignCenterLabel
132
135
  }
133
136
  );
134
137
  }
@@ -138,6 +141,7 @@ init_react_import();
138
141
  import { jsx as jsx4 } from "react/jsx-runtime";
139
142
  function AlignRight2() {
140
143
  const { editor, editorState } = useControlContext();
144
+ const alignRightLabel = useMessage("field-richtext-align-right");
141
145
  return /* @__PURE__ */ jsx4(
142
146
  Control,
143
147
  {
@@ -148,7 +152,7 @@ function AlignRight2() {
148
152
  },
149
153
  disabled: !(editorState == null ? void 0 : editorState.canAlignRight),
150
154
  active: editorState == null ? void 0 : editorState.isAlignRight,
151
- title: "Align right"
155
+ title: alignRightLabel
152
156
  }
153
157
  );
154
158
  }
@@ -158,6 +162,7 @@ init_react_import();
158
162
  import { jsx as jsx5 } from "react/jsx-runtime";
159
163
  function AlignJustify2() {
160
164
  const { editor, editorState } = useControlContext();
165
+ const alignJustifyLabel = useMessage("field-richtext-align-justify");
161
166
  return /* @__PURE__ */ jsx5(
162
167
  Control,
163
168
  {
@@ -168,7 +173,7 @@ function AlignJustify2() {
168
173
  },
169
174
  disabled: !(editorState == null ? void 0 : editorState.canAlignJustify),
170
175
  active: editorState == null ? void 0 : editorState.isAlignJustify,
171
- title: "Justify"
176
+ title: alignJustifyLabel
172
177
  }
173
178
  );
174
179
  }
@@ -199,7 +204,7 @@ function AlignSelectFallback() {
199
204
  // components/RichTextMenu/controls/AlignSelect/index.tsx
200
205
  import { jsx as jsx7 } from "react/jsx-runtime";
201
206
  var AlignSelectLoaded = lazy(
202
- () => import("./loaded-EFZRGV2Y.mjs").then((m) => ({
207
+ () => import("./loaded-A7IXFU7M.mjs").then((m) => ({
203
208
  default: m.AlignSelectLoaded
204
209
  }))
205
210
  );
@@ -210,6 +215,7 @@ init_react_import();
210
215
  import { jsx as jsx8 } from "react/jsx-runtime";
211
216
  function Bold2() {
212
217
  const { editor, editorState } = useControlContext();
218
+ const boldLabel = useMessage("field-richtext-bold");
213
219
  return /* @__PURE__ */ jsx8(
214
220
  Control,
215
221
  {
@@ -220,7 +226,7 @@ function Bold2() {
220
226
  },
221
227
  disabled: !(editorState == null ? void 0 : editorState.canBold),
222
228
  active: editorState == null ? void 0 : editorState.isBold,
223
- title: "Bold"
229
+ title: boldLabel
224
230
  }
225
231
  );
226
232
  }
@@ -230,6 +236,7 @@ init_react_import();
230
236
  import { jsx as jsx9 } from "react/jsx-runtime";
231
237
  function Italic2() {
232
238
  const { editor, editorState } = useControlContext();
239
+ const italicLabel = useMessage("field-richtext-italic");
233
240
  return /* @__PURE__ */ jsx9(
234
241
  Control,
235
242
  {
@@ -240,7 +247,7 @@ function Italic2() {
240
247
  },
241
248
  disabled: !(editorState == null ? void 0 : editorState.canItalic),
242
249
  active: editorState == null ? void 0 : editorState.isItalic,
243
- title: "Italic"
250
+ title: italicLabel
244
251
  }
245
252
  );
246
253
  }
@@ -250,6 +257,7 @@ init_react_import();
250
257
  import { jsx as jsx10 } from "react/jsx-runtime";
251
258
  function Underline2() {
252
259
  const { editor, editorState } = useControlContext();
260
+ const underlineLabel = useMessage("field-richtext-underline");
253
261
  return /* @__PURE__ */ jsx10(
254
262
  Control,
255
263
  {
@@ -260,7 +268,7 @@ function Underline2() {
260
268
  },
261
269
  disabled: !(editorState == null ? void 0 : editorState.canUnderline),
262
270
  active: editorState == null ? void 0 : editorState.isUnderline,
263
- title: "Underline"
271
+ title: underlineLabel
264
272
  }
265
273
  );
266
274
  }
@@ -270,6 +278,7 @@ init_react_import();
270
278
  import { jsx as jsx11 } from "react/jsx-runtime";
271
279
  function Strikethrough2() {
272
280
  const { editor, editorState } = useControlContext();
281
+ const strikethroughLabel = useMessage("field-richtext-strikethrough");
273
282
  return /* @__PURE__ */ jsx11(
274
283
  Control,
275
284
  {
@@ -280,7 +289,7 @@ function Strikethrough2() {
280
289
  },
281
290
  disabled: !(editorState == null ? void 0 : editorState.canStrike),
282
291
  active: editorState == null ? void 0 : editorState.isStrike,
283
- title: "Strikethrough"
292
+ title: strikethroughLabel
284
293
  }
285
294
  );
286
295
  }
@@ -290,6 +299,7 @@ init_react_import();
290
299
  import { jsx as jsx12 } from "react/jsx-runtime";
291
300
  function InlineCode() {
292
301
  const { editor, editorState } = useControlContext();
302
+ const inlineCodeLabel = useMessage("field-richtext-code-inline");
293
303
  return /* @__PURE__ */ jsx12(
294
304
  Control,
295
305
  {
@@ -300,7 +310,7 @@ function InlineCode() {
300
310
  },
301
311
  disabled: !(editorState == null ? void 0 : editorState.canInlineCode),
302
312
  active: editorState == null ? void 0 : editorState.isInlineCode,
303
- title: "Inline code"
313
+ title: inlineCodeLabel
304
314
  }
305
315
  );
306
316
  }
@@ -310,6 +320,7 @@ init_react_import();
310
320
  import { jsx as jsx13 } from "react/jsx-runtime";
311
321
  function BulletList() {
312
322
  const { editor, editorState } = useControlContext();
323
+ const bulletListLabel = useMessage("field-richtext-list-bullet");
313
324
  return /* @__PURE__ */ jsx13(
314
325
  Control,
315
326
  {
@@ -320,7 +331,7 @@ function BulletList() {
320
331
  },
321
332
  disabled: !(editorState == null ? void 0 : editorState.canBulletList),
322
333
  active: editorState == null ? void 0 : editorState.isBulletList,
323
- title: "Bullet list"
334
+ title: bulletListLabel
324
335
  }
325
336
  );
326
337
  }
@@ -330,6 +341,7 @@ init_react_import();
330
341
  import { jsx as jsx14 } from "react/jsx-runtime";
331
342
  function OrderedList() {
332
343
  const { editor, editorState } = useControlContext();
344
+ const orderedListLabel = useMessage("field-richtext-list-ordered");
333
345
  return /* @__PURE__ */ jsx14(
334
346
  Control,
335
347
  {
@@ -340,7 +352,7 @@ function OrderedList() {
340
352
  },
341
353
  disabled: !(editorState == null ? void 0 : editorState.canOrderedList),
342
354
  active: editorState == null ? void 0 : editorState.isOrderedList,
343
- title: "Ordered list"
355
+ title: orderedListLabel
344
356
  }
345
357
  );
346
358
  }
@@ -350,6 +362,7 @@ init_react_import();
350
362
  import { jsx as jsx15 } from "react/jsx-runtime";
351
363
  function CodeBlock() {
352
364
  const { editor, editorState } = useControlContext();
365
+ const codeBlockLabel = useMessage("field-richtext-code-block");
353
366
  return /* @__PURE__ */ jsx15(
354
367
  Control,
355
368
  {
@@ -360,7 +373,7 @@ function CodeBlock() {
360
373
  },
361
374
  disabled: !(editorState == null ? void 0 : editorState.canCodeBlock),
362
375
  active: editorState == null ? void 0 : editorState.isCodeBlock,
363
- title: "Code block"
376
+ title: codeBlockLabel
364
377
  }
365
378
  );
366
379
  }
@@ -370,6 +383,7 @@ init_react_import();
370
383
  import { jsx as jsx16 } from "react/jsx-runtime";
371
384
  function Blockquote() {
372
385
  const { editor, editorState } = useControlContext();
386
+ const blockquoteLabel = useMessage("field-richtext-blockquote");
373
387
  return /* @__PURE__ */ jsx16(
374
388
  Control,
375
389
  {
@@ -380,7 +394,7 @@ function Blockquote() {
380
394
  },
381
395
  disabled: !(editorState == null ? void 0 : editorState.canBlockquote),
382
396
  active: editorState == null ? void 0 : editorState.isBlockquote,
383
- title: "Blockquote"
397
+ title: blockquoteLabel
384
398
  }
385
399
  );
386
400
  }
@@ -390,6 +404,7 @@ init_react_import();
390
404
  import { jsx as jsx17 } from "react/jsx-runtime";
391
405
  function HorizontalRule() {
392
406
  const { editor, editorState } = useControlContext();
407
+ const horizontalRuleLabel = useMessage("field-richtext-horizontalrule");
393
408
  return /* @__PURE__ */ jsx17(
394
409
  Control,
395
410
  {
@@ -399,7 +414,7 @@ function HorizontalRule() {
399
414
  editor == null ? void 0 : editor.chain().focus().setHorizontalRule().run();
400
415
  },
401
416
  disabled: !(editorState == null ? void 0 : editorState.canHorizontalRule),
402
- title: "Horizontal rule"
417
+ title: horizontalRuleLabel
403
418
  }
404
419
  );
405
420
  }
@@ -430,7 +445,7 @@ function HeadingSelectFallback() {
430
445
  // components/RichTextMenu/controls/HeadingSelect/index.tsx
431
446
  import { jsx as jsx19 } from "react/jsx-runtime";
432
447
  var HeadingSelectLoaded = lazy2(
433
- () => import("./loaded-B7563MDT.mjs").then((m) => ({
448
+ () => import("./loaded-7EVGM4NA.mjs").then((m) => ({
434
449
  default: m.HeadingSelectLoaded
435
450
  }))
436
451
  );
@@ -462,7 +477,7 @@ function ListSelectFallback() {
462
477
  // components/RichTextMenu/controls/ListSelect/index.tsx
463
478
  import { jsx as jsx21 } from "react/jsx-runtime";
464
479
  var ListSelectLoaded = lazy3(
465
- () => import("./loaded-HECCGJKO.mjs").then((m) => ({
480
+ () => import("./loaded-QAIOZVXW.mjs").then((m) => ({
466
481
  default: m.ListSelectLoaded
467
482
  }))
468
483
  );
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-H635BA2V.mjs";
4
4
  import {
5
5
  LoadedRichTextMenuInner
6
- } from "./chunk-73XKHVBN.mjs";
6
+ } from "./chunk-OI2LQGRV.mjs";
7
7
  import {
8
8
  useAppStore,
9
9
  useAppStoreApi
10
- } from "./chunk-54LFCIWQ.mjs";
10
+ } from "./chunk-2KHLVDRT.mjs";
11
11
  import {
12
12
  get_class_name_factory_default
13
13
  } from "./chunk-Y2EFNT5P.mjs";
@@ -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-7JVAMOPS.mjs").then((m) => ({
103
+ () => import("./full-GSJGH3OO.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -4,8 +4,9 @@ import {
4
4
  Heading3,
5
5
  Heading4,
6
6
  Heading5,
7
- Heading6
8
- } from "./chunk-54LFCIWQ.mjs";
7
+ Heading6,
8
+ useMessage
9
+ } from "./chunk-2KHLVDRT.mjs";
9
10
  import {
10
11
  init_react_import
11
12
  } from "./chunk-M6W7YEVX.mjs";
@@ -13,16 +14,30 @@ import {
13
14
  // components/RichTextMenu/controls/HeadingSelect/use-options.ts
14
15
  init_react_import();
15
16
  import { useMemo } from "react";
16
- var optionNodes = {
17
- h1: { label: "Heading 1", icon: Heading1 },
18
- h2: { label: "Heading 2", icon: Heading2 },
19
- h3: { label: "Heading 3", icon: Heading3 },
20
- h4: { label: "Heading 4", icon: Heading4 },
21
- h5: { label: "Heading 5", icon: Heading5 },
22
- h6: { label: "Heading 6", icon: Heading6 }
17
+ var optionIcons = {
18
+ h1: Heading1,
19
+ h2: Heading2,
20
+ h3: Heading3,
21
+ h4: Heading4,
22
+ h5: Heading5,
23
+ h6: Heading6
23
24
  };
24
25
  var useHeadingOptions = (fieldOptions) => {
25
26
  var _a;
27
+ const h1String = useMessage("field-richtext-headingselect-1");
28
+ const h2String = useMessage("field-richtext-headingselect-2");
29
+ const h3String = useMessage("field-richtext-headingselect-3");
30
+ const h4String = useMessage("field-richtext-headingselect-4");
31
+ const h5String = useMessage("field-richtext-headingselect-5");
32
+ const h6String = useMessage("field-richtext-headingselect-6");
33
+ const optionLabels = {
34
+ h1: h1String,
35
+ h2: h2String,
36
+ h3: h3String,
37
+ h4: h4String,
38
+ h5: h5String,
39
+ h6: h6String
40
+ };
26
41
  let blockOptions = [];
27
42
  if ((fieldOptions == null ? void 0 : fieldOptions.heading) !== false) {
28
43
  if (!((_a = fieldOptions == null ? void 0 : fieldOptions.heading) == null ? void 0 : _a.levels)) {
@@ -51,10 +66,10 @@ var useHeadingOptions = (fieldOptions) => {
51
66
  return useMemo(
52
67
  () => blockOptions.map((item) => ({
53
68
  value: item,
54
- label: optionNodes[item].label,
55
- icon: optionNodes[item].icon
69
+ label: optionLabels[item],
70
+ icon: optionIcons[item]
56
71
  })),
57
- [blockOptions]
72
+ [blockOptions, optionLabels]
58
73
  );
59
74
  };
60
75
 
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-73XKHVBN.mjs";
4
- import "./chunk-2AATV7NG.mjs";
5
- import "./chunk-BVKXFA4V.mjs";
6
- import "./chunk-DATOBXTJ.mjs";
7
- import "./chunk-54LFCIWQ.mjs";
3
+ } from "./chunk-OI2LQGRV.mjs";
4
+ import "./chunk-G3YMTKUD.mjs";
5
+ import "./chunk-X4NMPUXH.mjs";
6
+ import "./chunk-EQADD6J2.mjs";
7
+ import "./chunk-2KHLVDRT.mjs";
8
8
  import "./chunk-HRNJ42TO.mjs";
9
9
  import "./chunk-GR7NLT4T.mjs";
10
10
  import "./chunk-Y2EFNT5P.mjs";
@@ -60,6 +60,89 @@ type FieldsSlice = {
60
60
  id: string | undefined;
61
61
  };
62
62
 
63
+ /**
64
+ * Default messages for every hard-coded string shown in the Puck editor UI.
65
+ *
66
+ * Tokens follow a `{area}-{name}-{variant}` structure, where hyphens only
67
+ * separate segments (compound words within a segment are concatenated, e.g.
68
+ * `field-arrayitem-summary`).
69
+ */
70
+ declare const defaultDictionary: {
71
+ readonly "header-publish": "Publish";
72
+ readonly "header-undo": "undo";
73
+ readonly "header-redo": "redo";
74
+ readonly "header-toggle-leftsidebar": "Toggle left sidebar";
75
+ readonly "header-toggle-rightsidebar": "Toggle right sidebar";
76
+ readonly "header-toggle-menubar": "Toggle menu bar";
77
+ readonly "action-selectparent": "Select parent";
78
+ readonly "action-duplicate": "Duplicate";
79
+ readonly "action-delete": "Delete";
80
+ readonly "label-page": "Page";
81
+ readonly "label-component": "Component";
82
+ readonly "outline-empty": "No items";
83
+ readonly "outline-collapse": "Collapse";
84
+ readonly "outline-expand": "Expand";
85
+ readonly "drawer-category-collapse": "Collapse {title}";
86
+ readonly "drawer-category-expand": "Expand {title}";
87
+ readonly "drawer-category-other": "Other";
88
+ readonly "canvas-noconfig": "No configuration for {type}";
89
+ readonly "field-readonly": "Read-only";
90
+ readonly "field-arrayitem-summary": "Item #{index}";
91
+ readonly "field-arrayitem-duplicate": "Duplicate";
92
+ readonly "field-arrayitem-delete": "Delete";
93
+ readonly "field-external-selectdata": "Select data";
94
+ readonly "field-external-search": "Search";
95
+ readonly "field-external-togglefilters": "Toggle filters";
96
+ readonly "field-external-item": "External item";
97
+ readonly "field-external-result-singular": "{count} result";
98
+ readonly "field-external-result-plural": "{count} results";
99
+ readonly "field-richtext-bold": "Bold";
100
+ readonly "field-richtext-italic": "Italic";
101
+ readonly "field-richtext-underline": "Underline";
102
+ readonly "field-richtext-strikethrough": "Strikethrough";
103
+ readonly "field-richtext-blockquote": "Blockquote";
104
+ readonly "field-richtext-code-inline": "Inline code";
105
+ readonly "field-richtext-code-block": "Code block";
106
+ readonly "field-richtext-list-bullet": "Bullet list";
107
+ readonly "field-richtext-list-ordered": "Ordered list";
108
+ readonly "field-richtext-horizontalrule": "Horizontal rule";
109
+ readonly "field-richtext-align-left": "Align left";
110
+ readonly "field-richtext-align-center": "Align center";
111
+ readonly "field-richtext-align-right": "Align right";
112
+ readonly "field-richtext-align-justify": "Justify";
113
+ readonly "field-richtext-select": "Select";
114
+ readonly "field-richtext-headingselect-1": "Heading 1";
115
+ readonly "field-richtext-headingselect-2": "Heading 2";
116
+ readonly "field-richtext-headingselect-3": "Heading 3";
117
+ readonly "field-richtext-headingselect-4": "Heading 4";
118
+ readonly "field-richtext-headingselect-5": "Heading 5";
119
+ readonly "field-richtext-headingselect-6": "Heading 6";
120
+ readonly "field-richtext-alignselect-left": "Left";
121
+ readonly "field-richtext-alignselect-center": "Center";
122
+ readonly "field-richtext-alignselect-right": "Right";
123
+ readonly "field-richtext-alignselect-justify": "Justify";
124
+ readonly "field-richtext-listselect-bullet": "Bullet list";
125
+ readonly "field-richtext-listselect-ordered": "Ordered list";
126
+ readonly "viewport-zoom-in": "Zoom viewport in";
127
+ readonly "viewport-zoom-out": "Zoom viewport out";
128
+ readonly "viewport-zoom-auto": "{zoom}% (Auto)";
129
+ readonly "viewport-toggle-menu": "Toggle viewport menu";
130
+ readonly "viewport-switch": "Switch to {label} viewport";
131
+ readonly "viewport-switch-default": "Switch viewport";
132
+ readonly "plugin-blocks": "Blocks";
133
+ readonly "plugin-outline": "Outline";
134
+ readonly "plugin-fields": "Fields";
135
+ readonly "plugin-components": "Components";
136
+ readonly "layout-maximize": "maximize";
137
+ readonly "layout-minimize": "minimize";
138
+ readonly "loader-loading": "loading";
139
+ };
140
+ type DictionaryKey = keyof typeof defaultDictionary;
141
+ /**
142
+ * Override any of Puck's built-in UI strings, or provide your own custom strings.
143
+ */
144
+ type Dictionary = Partial<Record<DictionaryKey, string> & Record<string, string>>;
145
+
63
146
  type Status = "LOADING" | "MOUNTED" | "READY";
64
147
  type ZoomConfig = {
65
148
  autoZoom: number;
@@ -100,6 +183,7 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
100
183
  getComponentConfig: (type?: string) => ComponentConfig | null | undefined;
101
184
  onAction?: (action: PuckAction, newState: AppState, state: AppState) => void;
102
185
  metadata: Metadata;
186
+ dictionary: Dictionary;
103
187
  fields: FieldsSlice;
104
188
  history: HistorySlice;
105
189
  nodes: NodesSlice;
@@ -114,4 +198,4 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
114
198
  } | null;
115
199
  };
116
200
 
117
- export type { AppStore as A, GetPermissions as G, HistorySlice as H, RefreshPermissions as R };
201
+ export type { AppStore as A, Dictionary as D, GetPermissions as G, HistorySlice as H, RefreshPermissions as R };