@puckeditor/core 0.22.1 → 0.23.0-canary.4bf6887d

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,7 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-VOB4L2BJ.mjs";
4
+ } from "./chunk-WABMBXFK.mjs";
5
5
  import {
6
6
  RichTextRenderFallback,
7
7
  SlotRender,
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-FKYOVZNF.mjs";
14
14
  import {
15
15
  LoadedRichTextMenuInner
16
- } from "./chunk-73XKHVBN.mjs";
16
+ } from "./chunk-OI2LQGRV.mjs";
17
17
  import {
18
18
  ActionBar,
19
19
  ChevronDown,
@@ -63,12 +63,13 @@ import {
63
63
  useAppStore,
64
64
  useAppStoreApi,
65
65
  useHotkey,
66
+ useMessage,
66
67
  useMonitorHotkeys,
67
68
  useRegisterFieldsSlice,
68
69
  useRegisterHistorySlice,
69
70
  useRegisterPermissionsSlice,
70
71
  useResetAutoZoom
71
- } from "./chunk-54LFCIWQ.mjs";
72
+ } from "./chunk-2KHLVDRT.mjs";
72
73
  import {
73
74
  generateId,
74
75
  getItem,
@@ -263,11 +264,12 @@ var FieldLabel = ({
263
264
  className
264
265
  }) => {
265
266
  const El = el;
267
+ const readOnlyLabel = useMessage("field-readonly");
266
268
  return /* @__PURE__ */ jsxs2(El, { className, children: [
267
269
  /* @__PURE__ */ jsxs2("div", { className: getClassName2("label"), children: [
268
270
  icon ? /* @__PURE__ */ jsx2("div", { className: getClassName2("labelIcon"), children: icon }) : /* @__PURE__ */ jsx2(Fragment, {}),
269
271
  label,
270
- readOnly && /* @__PURE__ */ jsx2("div", { className: getClassName2("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ jsx2(Lock, { size: "12" }) })
272
+ readOnly && /* @__PURE__ */ jsx2("div", { className: getClassName2("disabledIcon"), title: readOnlyLabel, children: /* @__PURE__ */ jsx2(Lock, { size: "12" }) })
271
273
  ] }),
272
274
  children
273
275
  ] });
@@ -956,12 +958,15 @@ var ItemSummaryInner = ({
956
958
  const path = `${[name]}[${index}]`;
957
959
  return getDeep(s, path);
958
960
  });
961
+ const fallbackSummary = useMessage("field-arrayitem-summary", {
962
+ index: originalIndex
963
+ });
959
964
  const itemSummary = useMemo3(() => {
960
965
  if (data && field.getItemSummary) {
961
966
  return field.getItemSummary(data, index);
962
967
  }
963
- return `Item #${originalIndex}`;
964
- }, [data, field, originalIndex, index]);
968
+ return fallbackSummary;
969
+ }, [data, field, originalIndex, index, fallbackSummary]);
965
970
  return itemSummary;
966
971
  };
967
972
  var ItemSummary = memo2(ItemSummaryInner);
@@ -1183,6 +1188,8 @@ var ArrayField = ({
1183
1188
  const newArrayState = regenerateArrayState(getValue());
1184
1189
  setUi(mapArrayStateToUi(newArrayState), false);
1185
1190
  }, [numItems]);
1191
+ const duplicateLabel = useMessage("field-arrayitem-duplicate");
1192
+ const deleteLabel = useMessage("field-arrayitem-delete");
1186
1193
  if (field.type !== "array" || !field.arrayFields) {
1187
1194
  return null;
1188
1195
  }
@@ -1294,7 +1301,7 @@ var ArrayField = ({
1294
1301
  existingValue.splice(index, 0, newItem);
1295
1302
  updateValue(existingValue);
1296
1303
  },
1297
- title: "Duplicate",
1304
+ title: duplicateLabel,
1298
1305
  children: /* @__PURE__ */ jsx8(Copy, { size: 16 })
1299
1306
  }
1300
1307
  ) }),
@@ -1310,7 +1317,7 @@ var ArrayField = ({
1310
1317
  existingValue.splice(index, 1);
1311
1318
  updateValue(existingValue);
1312
1319
  },
1313
- title: "Delete",
1320
+ title: deleteLabel,
1314
1321
  children: /* @__PURE__ */ jsx8(Trash, { size: 16 })
1315
1322
  }
1316
1323
  ) })
@@ -1532,6 +1539,11 @@ init_react_import();
1532
1539
  import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
1533
1540
  var getClassName8 = get_class_name_factory_default("ExternalInput", styles_module_default4);
1534
1541
  var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_module_default4);
1542
+ var DefaultFooter = ({ count }) => {
1543
+ const singular = useMessage("field-external-result-singular", { count });
1544
+ const plural = useMessage("field-external-result-plural", { count });
1545
+ return /* @__PURE__ */ jsx12("span", { className: getClassNameModal("footer"), children: count === 1 ? singular : plural });
1546
+ };
1535
1547
  var dataCache = {};
1536
1548
  var ExternalInput = ({
1537
1549
  field,
@@ -1590,16 +1602,16 @@ var ExternalInput = ({
1590
1602
  [id, field]
1591
1603
  );
1592
1604
  const Footer = useCallback3(
1593
- (props) => field.renderFooter ? field.renderFooter(props) : /* @__PURE__ */ jsxs5("span", { className: getClassNameModal("footer"), children: [
1594
- props.items.length,
1595
- " result",
1596
- props.items.length === 1 ? "" : "s"
1597
- ] }),
1605
+ (props) => field.renderFooter ? field.renderFooter(props) : /* @__PURE__ */ jsx12(DefaultFooter, { count: props.items.length }),
1598
1606
  [field.renderFooter]
1599
1607
  );
1600
1608
  useEffect5(() => {
1601
1609
  search(searchQuery, filters);
1602
1610
  }, []);
1611
+ const externalItemLabel = useMessage("field-external-item");
1612
+ const searchLabel = useMessage("field-external-search");
1613
+ const toggleFiltersLabel = useMessage("field-external-togglefilters");
1614
+ const selectDataLabel = useMessage("field-external-selectdata");
1603
1615
  return /* @__PURE__ */ jsxs5(
1604
1616
  "div",
1605
1617
  {
@@ -1618,7 +1630,7 @@ var ExternalInput = ({
1618
1630
  onClick: () => setOpen(true),
1619
1631
  className: getClassName8("button"),
1620
1632
  disabled: readOnly,
1621
- children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ jsxs5(Fragment4, { children: [
1633
+ children: value ? field.getItemSummary ? field.getItemSummary(value) : externalItemLabel : /* @__PURE__ */ jsxs5(Fragment4, { children: [
1622
1634
  /* @__PURE__ */ jsx12(Link, { size: "16" }),
1623
1635
  /* @__PURE__ */ jsx12("span", { children: field.placeholder })
1624
1636
  ] })
@@ -1654,7 +1666,7 @@ var ExternalInput = ({
1654
1666
  children: [
1655
1667
  /* @__PURE__ */ jsx12("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ jsxs5("div", { className: getClassNameModal("searchForm"), children: [
1656
1668
  /* @__PURE__ */ jsxs5("label", { className: getClassNameModal("search"), children: [
1657
- /* @__PURE__ */ jsx12("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
1669
+ /* @__PURE__ */ jsx12("span", { className: getClassNameModal("searchIconText"), children: searchLabel }),
1658
1670
  /* @__PURE__ */ jsx12("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ jsx12(Search, { size: "18" }) }),
1659
1671
  /* @__PURE__ */ jsx12(
1660
1672
  "input",
@@ -1672,12 +1684,12 @@ var ExternalInput = ({
1672
1684
  )
1673
1685
  ] }),
1674
1686
  /* @__PURE__ */ jsxs5("div", { className: getClassNameModal("searchActions"), children: [
1675
- /* @__PURE__ */ jsx12(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
1687
+ /* @__PURE__ */ jsx12(Button, { type: "submit", loading: isLoading, fullWidth: true, children: searchLabel }),
1676
1688
  hasFilterFields && /* @__PURE__ */ jsx12("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ jsx12(
1677
1689
  IconButton,
1678
1690
  {
1679
1691
  type: "button",
1680
- title: "Toggle filters",
1692
+ title: toggleFiltersLabel,
1681
1693
  onClick: (e) => {
1682
1694
  e.preventDefault();
1683
1695
  e.stopPropagation();
@@ -1687,7 +1699,7 @@ var ExternalInput = ({
1687
1699
  }
1688
1700
  ) })
1689
1701
  ] })
1690
- ] }) : /* @__PURE__ */ jsx12(Heading, { rank: "2", size: "xs", children: field.placeholder || "Select data" }) }),
1702
+ ] }) : /* @__PURE__ */ jsx12(Heading, { rank: "2", size: "xs", children: field.placeholder || selectDataLabel }) }),
1691
1703
  /* @__PURE__ */ jsxs5("div", { className: getClassNameModal("grid"), children: [
1692
1704
  hasFilterFields && /* @__PURE__ */ jsx12("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
1693
1705
  const filterField = filterFields[fieldName];
@@ -1771,6 +1783,7 @@ var ExternalField = ({
1771
1783
  const value = useDeepField(name);
1772
1784
  const validField = field;
1773
1785
  const deprecatedField = field;
1786
+ const selectDataLabel = useMessage("field-external-selectdata");
1774
1787
  useEffect6(() => {
1775
1788
  if (deprecatedField.adaptor) {
1776
1789
  console.error(
@@ -1793,7 +1806,7 @@ var ExternalField = ({
1793
1806
  name,
1794
1807
  field: __spreadProps(__spreadValues({}, validField), {
1795
1808
  // DEPRECATED
1796
- placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
1809
+ placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || selectDataLabel,
1797
1810
  mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
1798
1811
  mapRow: validField.mapRow,
1799
1812
  fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(null, null, function* () {
@@ -1999,7 +2012,7 @@ EditorFallback.displayName = "EditorFallback";
1999
2012
  // components/AutoField/fields/RichtextField/index.tsx
2000
2013
  import { Fragment as Fragment5, jsx as jsx18 } from "react/jsx-runtime";
2001
2014
  var Editor = lazy(
2002
- () => import("./Editor-MXSH3OSX.mjs").then((m) => ({
2015
+ () => import("./Editor-V2RQPQAL.mjs").then((m) => ({
2003
2016
  default: m.Editor
2004
2017
  }))
2005
2018
  );
@@ -2944,9 +2957,12 @@ var DraggableComponent = ({
2944
2957
  }
2945
2958
  setDragAxis(autoDragAxis);
2946
2959
  }, [ref, userDragAxis, autoDragAxis]);
2960
+ const selectParentLabel = useMessage("action-selectparent");
2961
+ const duplicateLabel = useMessage("action-duplicate");
2962
+ const deleteLabel = useMessage("action-delete");
2947
2963
  const parentAction = useMemo7(
2948
- () => (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ jsx22(ActionBar.Action, { onClick: onSelectParent, label: "Select parent", children: /* @__PURE__ */ jsx22(CornerLeftUp, { size: 16 }) }),
2949
- [ctx == null ? void 0 : ctx.areaId]
2964
+ () => (ctx == null ? void 0 : ctx.areaId) && (ctx == null ? void 0 : ctx.areaId) !== "root" && /* @__PURE__ */ jsx22(ActionBar.Action, { onClick: onSelectParent, label: selectParentLabel, children: /* @__PURE__ */ jsx22(CornerLeftUp, { size: 16 }) }),
2965
+ [ctx == null ? void 0 : ctx.areaId, selectParentLabel]
2950
2966
  );
2951
2967
  const nextContextValue = useMemo7(
2952
2968
  () => __spreadProps(__spreadValues({}, ctx), {
@@ -3026,8 +3042,15 @@ var DraggableComponent = ({
3026
3042
  ),
3027
3043
  hasNormalActions && /* @__PURE__ */ jsx22(ActionBar.Separator, {})
3028
3044
  ] }),
3029
- permissions.duplicate && /* @__PURE__ */ jsx22(ActionBar.Action, { onClick: onDuplicate, label: "Duplicate", children: /* @__PURE__ */ jsx22(Copy, { className: getClassName14("actionsAction") }) }),
3030
- permissions.delete && /* @__PURE__ */ jsx22(ActionBar.Action, { onClick: onDelete, label: "Delete", children: /* @__PURE__ */ jsx22(Trash, { className: getClassName14("actionsAction") }) })
3045
+ permissions.duplicate && /* @__PURE__ */ jsx22(
3046
+ ActionBar.Action,
3047
+ {
3048
+ onClick: onDuplicate,
3049
+ label: duplicateLabel,
3050
+ children: /* @__PURE__ */ jsx22(Copy, { className: getClassName14("actionsAction") })
3051
+ }
3052
+ ),
3053
+ permissions.delete && /* @__PURE__ */ jsx22(ActionBar.Action, { onClick: onDelete, label: deleteLabel, children: /* @__PURE__ */ jsx22(Trash, { className: getClassName14("actionsAction") }) })
3031
3054
  ]
3032
3055
  }
3033
3056
  )
@@ -4499,7 +4522,7 @@ import {
4499
4522
  } from "react";
4500
4523
  import { jsx as jsx28 } from "react/jsx-runtime";
4501
4524
  var Editor2 = lazy2(
4502
- () => import("./Editor-MXSH3OSX.mjs").then((m) => ({
4525
+ () => import("./Editor-V2RQPQAL.mjs").then((m) => ({
4503
4526
  default: m.Editor
4504
4527
  }))
4505
4528
  );
@@ -4868,7 +4891,7 @@ var VirtualizedDropZone = ({
4868
4891
  };
4869
4892
 
4870
4893
  // components/DropZone/index.tsx
4871
- import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
4894
+ import { Fragment as Fragment9, jsx as jsx31 } from "react/jsx-runtime";
4872
4895
  var getClassName17 = get_class_name_factory_default("DropZone", styles_module_default9);
4873
4896
  var getRandomColor = () => `#${Math.floor(Math.random() * 16777215).toString(16)}`;
4874
4897
  var RENDER_DEBUG = false;
@@ -4895,7 +4918,7 @@ var DropZoneChild = ({
4895
4918
  inDroppableZone,
4896
4919
  itemRef
4897
4920
  }) => {
4898
- var _a, _b;
4921
+ var _a, _b, _c, _d;
4899
4922
  const metadata = useAppStore((s) => s.metadata);
4900
4923
  const ctx = useContext9(dropZoneContext);
4901
4924
  const { depth = 1 } = ctx != null ? ctx : {};
@@ -4963,7 +4986,11 @@ var DropZoneChild = ({
4963
4986
  return ((_a2 = s.selectedItem) == null ? void 0 : _a2.props.id) === componentId || false;
4964
4987
  }
4965
4988
  );
4966
- let label = (_b = (_a = componentConfig == null ? void 0 : componentConfig.label) != null ? _a : item == null ? void 0 : item.type.toString()) != null ? _b : "Component";
4989
+ const componentLabel = useMessage("label-component");
4990
+ const noConfigMessage = useMessage("canvas-noconfig", {
4991
+ type: (_b = (_a = item == null ? void 0 : item.type) == null ? void 0 : _a.toString()) != null ? _b : ""
4992
+ });
4993
+ let label = (_d = (_c = componentConfig == null ? void 0 : componentConfig.label) != null ? _c : item == null ? void 0 : item.type.toString()) != null ? _d : componentLabel;
4967
4994
  const defaultsProps = useMemo12(
4968
4995
  () => __spreadProps(__spreadValues(__spreadValues({}, componentConfig == null ? void 0 : componentConfig.defaultProps), item == null ? void 0 : item.props), {
4969
4996
  puck: puckProps,
@@ -4997,10 +5024,7 @@ var DropZoneChild = ({
4997
5024
  isLoading
4998
5025
  );
4999
5026
  if (!item) return;
5000
- const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ jsxs10("div", { style: { padding: 48, textAlign: "center" }, children: [
5001
- "No configuration for ",
5002
- item.type
5003
- ] });
5027
+ const Render2 = componentConfig ? componentConfig.render : () => /* @__PURE__ */ jsx31("div", { style: { padding: 48, textAlign: "center" }, children: noConfigMessage });
5004
5028
  let componentType = item.type;
5005
5029
  const isInserting = "previewType" in item ? item.previewType === "insert" : false;
5006
5030
  return /* @__PURE__ */ jsx31(
@@ -5492,7 +5516,8 @@ var generateUsePuck = (store, getState) => {
5492
5516
  const parentNode = store.state.indexes.nodes[parentId];
5493
5517
  if (!parentNode) return;
5494
5518
  return parentNode.data;
5495
- }
5519
+ },
5520
+ dictionary: store.dictionary
5496
5521
  };
5497
5522
  storeData.__private = {
5498
5523
  appState: store.state
@@ -5509,7 +5534,8 @@ var convertToPickedStore = (store) => {
5509
5534
  dispatch: store.dispatch,
5510
5535
  permissions: store.permissions,
5511
5536
  history: store.history,
5512
- selectedItem: store.selectedItem
5537
+ selectedItem: store.selectedItem,
5538
+ dictionary: store.dictionary
5513
5539
  };
5514
5540
  };
5515
5541
  var useRegisterUsePuckStore = (appStore) => {
@@ -5579,7 +5605,7 @@ var styles_module_default12 = { "ComponentList": "_ComponentList_htktj_1", "Comp
5579
5605
 
5580
5606
  // components/ComponentList/index.tsx
5581
5607
  import { useEffect as useEffect18 } from "react";
5582
- import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
5608
+ import { jsx as jsx33, jsxs as jsxs10 } from "react/jsx-runtime";
5583
5609
  var getClassName18 = get_class_name_factory_default("ComponentList", styles_module_default12);
5584
5610
  var ComponentListItem = ({
5585
5611
  name,
@@ -5611,8 +5637,14 @@ var ComponentList = ({
5611
5637
  const componentList = useAppStore((s) => s.state.ui.componentList);
5612
5638
  const { expanded = true } = componentList[id] || {};
5613
5639
  const contentId = `puck-drawer-category-${id}`;
5614
- return /* @__PURE__ */ jsxs11("div", { className: getClassName18({ isExpanded: expanded }), children: [
5615
- title && /* @__PURE__ */ jsxs11(
5640
+ const collapseTitle = useMessage("drawer-category-collapse", {
5641
+ title: title != null ? title : ""
5642
+ });
5643
+ const expandTitle = useMessage("drawer-category-expand", {
5644
+ title: title != null ? title : ""
5645
+ });
5646
+ return /* @__PURE__ */ jsxs10("div", { className: getClassName18({ isExpanded: expanded }), children: [
5647
+ title && /* @__PURE__ */ jsxs10(
5616
5648
  "button",
5617
5649
  {
5618
5650
  type: "button",
@@ -5626,7 +5658,7 @@ var ComponentList = ({
5626
5658
  })
5627
5659
  })
5628
5660
  }),
5629
- title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
5661
+ title: expanded ? collapseTitle : expandTitle,
5630
5662
  children: [
5631
5663
  /* @__PURE__ */ jsx33("div", { children: title }),
5632
5664
  /* @__PURE__ */ jsx33("div", { className: getClassName18("titleIcon"), children: expanded ? /* @__PURE__ */ jsx33(ChevronUp, { size: 12 }) : /* @__PURE__ */ jsx33(ChevronDown, { size: 12 }) })
@@ -5654,6 +5686,7 @@ var useComponentList = () => {
5654
5686
  const [componentList, setComponentList] = useState17();
5655
5687
  const config = useAppStore((s) => s.config);
5656
5688
  const uiComponentList = useAppStore((s) => s.state.ui.componentList);
5689
+ const otherLabel = useMessage("drawer-category-other");
5657
5690
  useEffect19(() => {
5658
5691
  var _a, _b, _c;
5659
5692
  if (Object.keys(uiComponentList).length > 0) {
@@ -5661,6 +5694,7 @@ var useComponentList = () => {
5661
5694
  let _componentList;
5662
5695
  _componentList = Object.entries(uiComponentList).map(
5663
5696
  ([categoryKey, category]) => {
5697
+ var _a2, _b2;
5664
5698
  if (!category.components) {
5665
5699
  return null;
5666
5700
  }
@@ -5674,14 +5708,14 @@ var useComponentList = () => {
5674
5708
  ComponentList,
5675
5709
  {
5676
5710
  id: categoryKey,
5677
- title: category.title || categoryKey,
5711
+ title: ((_b2 = (_a2 = config.categories) == null ? void 0 : _a2[categoryKey]) == null ? void 0 : _b2.title) || category.title || categoryKey,
5678
5712
  children: category.components.map((componentName, i) => {
5679
- var _a2;
5713
+ var _a3;
5680
5714
  const componentConf = config.components[componentName] || {};
5681
5715
  return /* @__PURE__ */ jsx34(
5682
5716
  ComponentList.Item,
5683
5717
  {
5684
- label: (_a2 = componentConf["label"]) != null ? _a2 : componentName,
5718
+ label: (_a3 = componentConf["label"]) != null ? _a3 : componentName,
5685
5719
  name: componentName,
5686
5720
  index: i
5687
5721
  },
@@ -5702,7 +5736,7 @@ var useComponentList = () => {
5702
5736
  ComponentList,
5703
5737
  {
5704
5738
  id: "other",
5705
- title: ((_c = uiComponentList.other) == null ? void 0 : _c.title) || "Other",
5739
+ title: ((_c = uiComponentList.other) == null ? void 0 : _c.title) || otherLabel,
5706
5740
  children: remainingComponents.map((componentName, i) => {
5707
5741
  var _a2;
5708
5742
  const componentConf = config.components[componentName] || {};
@@ -5723,7 +5757,7 @@ var useComponentList = () => {
5723
5757
  }
5724
5758
  setComponentList(_componentList);
5725
5759
  }
5726
- }, [config.categories, config.components, uiComponentList]);
5760
+ }, [config.categories, config.components, uiComponentList, otherLabel]);
5727
5761
  return componentList;
5728
5762
  };
5729
5763
 
@@ -5751,12 +5785,15 @@ var styles_module_default13 = { "BlocksPlugin": "_BlocksPlugin_9af19_1" };
5751
5785
  // plugins/blocks/index.tsx
5752
5786
  import { jsx as jsx36 } from "react/jsx-runtime";
5753
5787
  var getClassName19 = get_class_name_factory_default("BlocksPlugin", styles_module_default13);
5754
- var blocksPlugin = () => ({
5755
- name: "blocks",
5756
- label: "Blocks",
5757
- render: () => /* @__PURE__ */ jsx36("div", { className: getClassName19(), children: /* @__PURE__ */ jsx36(Components, {}) }),
5758
- icon: /* @__PURE__ */ jsx36(Hammer, {})
5759
- });
5788
+ var blocksPlugin = (props = {}) => {
5789
+ var _a, _b;
5790
+ return {
5791
+ name: "blocks",
5792
+ label: (_a = props.label) != null ? _a : "Blocks",
5793
+ render: () => /* @__PURE__ */ jsx36("div", { className: getClassName19(), children: /* @__PURE__ */ jsx36(Components, {}) }),
5794
+ icon: (_b = props.icon) != null ? _b : /* @__PURE__ */ jsx36(Hammer, {})
5795
+ };
5796
+ };
5760
5797
 
5761
5798
  // plugins/outline/index.tsx
5762
5799
  init_react_import();
@@ -5779,7 +5816,7 @@ import {
5779
5816
  useRef as useRef10
5780
5817
  } from "react";
5781
5818
  import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
5782
- import { Fragment as Fragment10, jsx as jsx37, jsxs as jsxs12 } from "react/jsx-runtime";
5819
+ import { Fragment as Fragment10, jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
5783
5820
  var getClassName20 = get_class_name_factory_default("LayerTree", styles_module_default14);
5784
5821
  var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default14);
5785
5822
  var DEFAULT_LAYER_ROW_HEIGHT = 32;
@@ -5813,11 +5850,12 @@ var buildLayerNode = ({
5813
5850
  nodes,
5814
5851
  zoneCompound,
5815
5852
  zones,
5816
- zonesByParent
5853
+ zonesByParent,
5854
+ componentFallbackLabel = "Component"
5817
5855
  }) => {
5818
5856
  var _a, _b, _c;
5819
5857
  const nodeData = nodes[itemId];
5820
- const componentType = ((_a = nodeData == null ? void 0 : nodeData.data.type) == null ? void 0 : _a.toString()) || "Component";
5858
+ const componentType = ((_a = nodeData == null ? void 0 : nodeData.data.type) == null ? void 0 : _a.toString()) || componentFallbackLabel;
5821
5859
  const label = (_c = (_b = config.components[componentType]) == null ? void 0 : _b.label) != null ? _c : componentType;
5822
5860
  const childZoneCompounds = zonesByParent[itemId] || [];
5823
5861
  return {
@@ -5827,7 +5865,8 @@ var buildLayerNode = ({
5827
5865
  nodes,
5828
5866
  zoneCompound: childZoneCompound,
5829
5867
  zones,
5830
- zonesByParent
5868
+ zonesByParent,
5869
+ componentFallbackLabel
5831
5870
  })
5832
5871
  ),
5833
5872
  componentType,
@@ -5843,7 +5882,8 @@ var buildLayerTree = ({
5843
5882
  nodes,
5844
5883
  zoneCompound,
5845
5884
  zones,
5846
- zonesByParent = getZonesByParent(zones)
5885
+ zonesByParent = getZonesByParent(zones),
5886
+ componentFallbackLabel = "Component"
5847
5887
  }) => {
5848
5888
  var _a, _b;
5849
5889
  const contentIds = (_b = (_a = zones[zoneCompound]) == null ? void 0 : _a.contentIds) != null ? _b : [];
@@ -5856,7 +5896,8 @@ var buildLayerTree = ({
5856
5896
  nodes,
5857
5897
  zoneCompound,
5858
5898
  zones,
5859
- zonesByParent
5899
+ zonesByParent,
5900
+ componentFallbackLabel
5860
5901
  })
5861
5902
  ),
5862
5903
  label: getZoneLabel(zoneCompound, nodes, config, label),
@@ -5901,6 +5942,8 @@ var Layer = forwardRef2(function Layer2({
5901
5942
  (s) => s.hoveringComponent === node.itemId
5902
5943
  );
5903
5944
  const containsZone = node.childZones.length > 0;
5945
+ const collapseLabel = useMessage("outline-collapse");
5946
+ const expandLabel = useMessage("outline-expand");
5904
5947
  const setItemSelector = useCallback14(
5905
5948
  (itemSelector) => {
5906
5949
  dispatch({ type: "setUi", ui: { itemSelector } });
@@ -5908,7 +5951,7 @@ var Layer = forwardRef2(function Layer2({
5908
5951
  [dispatch]
5909
5952
  );
5910
5953
  const shouldRenderChildren = isSelected || childIsSelected;
5911
- return /* @__PURE__ */ jsxs12(
5954
+ return /* @__PURE__ */ jsxs11(
5912
5955
  "li",
5913
5956
  {
5914
5957
  ref,
@@ -5921,7 +5964,7 @@ var Layer = forwardRef2(function Layer2({
5921
5964
  "data-index": dataIndex,
5922
5965
  "data-puck-layer-tree-id": node.itemId,
5923
5966
  children: [
5924
- /* @__PURE__ */ jsx37("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs12(
5967
+ /* @__PURE__ */ jsx37("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ jsxs11(
5925
5968
  "button",
5926
5969
  {
5927
5970
  type: "button",
@@ -5950,11 +5993,11 @@ var Layer = forwardRef2(function Layer2({
5950
5993
  "div",
5951
5994
  {
5952
5995
  className: getClassNameLayer("chevron"),
5953
- title: isSelected ? "Collapse" : "Expand",
5996
+ title: isSelected ? collapseLabel : expandLabel,
5954
5997
  children: /* @__PURE__ */ jsx37(ChevronDown, { size: "12" })
5955
5998
  }
5956
5999
  ),
5957
- /* @__PURE__ */ jsxs12("div", { className: getClassNameLayer("title"), children: [
6000
+ /* @__PURE__ */ jsxs11("div", { className: getClassNameLayer("title"), children: [
5958
6001
  /* @__PURE__ */ jsx37("div", { className: getClassNameLayer("icon"), children: node.componentType === "Text" || node.componentType === "Heading" ? /* @__PURE__ */ jsx37(Type, { size: "16" }) : /* @__PURE__ */ jsx37(LayoutGrid, { size: "16" }) }),
5959
6002
  /* @__PURE__ */ jsx37("div", { className: getClassNameLayer("name"), children: node.label })
5960
6003
  ] })
@@ -5988,8 +6031,8 @@ var LayerTreeZone = ({
5988
6031
  tree
5989
6032
  }) => {
5990
6033
  const shouldVirtualize = depth === 0 && tree.items.length >= MIN_VIRTUALIZED_LAYER_COUNT;
5991
- return /* @__PURE__ */ jsxs12(Fragment10, { children: [
5992
- tree.label && /* @__PURE__ */ jsxs12("div", { className: getClassName20("zoneTitle"), children: [
6034
+ return /* @__PURE__ */ jsxs11(Fragment10, { children: [
6035
+ tree.label && /* @__PURE__ */ jsxs11("div", { className: getClassName20("zoneTitle"), children: [
5993
6036
  /* @__PURE__ */ jsx37("div", { className: getClassName20("zoneIcon"), children: /* @__PURE__ */ jsx37(Layers, { size: "16" }) }),
5994
6037
  tree.label
5995
6038
  ] }),
@@ -6018,8 +6061,9 @@ var StaticLayerTreeItems = ({
6018
6061
  selectedPathIds,
6019
6062
  tree
6020
6063
  }) => {
6021
- return /* @__PURE__ */ jsxs12("ul", { className: getClassName20(), children: [
6022
- tree.items.length === 0 && /* @__PURE__ */ jsx37("div", { className: getClassName20("helper"), children: "No items" }),
6064
+ const noItemsLabel = useMessage("outline-empty");
6065
+ return /* @__PURE__ */ jsxs11("ul", { className: getClassName20(), children: [
6066
+ tree.items.length === 0 && /* @__PURE__ */ jsx37("div", { className: getClassName20("helper"), children: noItemsLabel }),
6023
6067
  tree.items.map((node) => /* @__PURE__ */ jsx37(
6024
6068
  Layer,
6025
6069
  {
@@ -6041,6 +6085,7 @@ var VirtualizedLayerTreeItems = ({
6041
6085
  tree
6042
6086
  }) => {
6043
6087
  const listRef = useRef10(null);
6088
+ const noItemsLabel = useMessage("outline-empty");
6044
6089
  const virtualizer = useVirtualizer2({
6045
6090
  count: tree.items.length,
6046
6091
  estimateSize: (index) => getEstimatedRowHeight(tree.items[index].itemId),
@@ -6108,8 +6153,8 @@ var VirtualizedLayerTreeItems = ({
6108
6153
  )
6109
6154
  );
6110
6155
  }
6111
- return /* @__PURE__ */ jsxs12("ul", { className: getClassName20(), ref: listRef, children: [
6112
- tree.items.length === 0 && /* @__PURE__ */ jsx37("div", { className: getClassName20("helper"), children: "No items" }),
6156
+ return /* @__PURE__ */ jsxs11("ul", { className: getClassName20(), ref: listRef, children: [
6157
+ tree.items.length === 0 && /* @__PURE__ */ jsx37("div", { className: getClassName20("helper"), children: noItemsLabel }),
6113
6158
  renderedItems
6114
6159
  ] });
6115
6160
  };
@@ -6153,6 +6198,7 @@ var Outline = () => {
6153
6198
  var _a;
6154
6199
  return ((_a = s.selectedItem) == null ? void 0 : _a.props.id) || null;
6155
6200
  });
6201
+ const componentFallbackLabel = useMessage("label-component");
6156
6202
  const rootZones = useAppStore(
6157
6203
  useShallow7((s) => findZonesForArea(s.state, "root"))
6158
6204
  );
@@ -6170,10 +6216,11 @@ var Outline = () => {
6170
6216
  label: rootZones.length === 1 ? "" : zoneCompound.split(":")[1],
6171
6217
  nodes,
6172
6218
  zoneCompound,
6173
- zones
6219
+ zones,
6220
+ componentFallbackLabel
6174
6221
  })
6175
6222
  ),
6176
- [config, nodes, rootZones, zones]
6223
+ [config, nodes, rootZones, zones, componentFallbackLabel]
6177
6224
  );
6178
6225
  const Wrapper = useMemo15(() => outlineOverride || "div", [outlineOverride]);
6179
6226
  return /* @__PURE__ */ jsx38(Wrapper, { children: /* @__PURE__ */ jsx38(
@@ -6193,12 +6240,15 @@ var styles_module_default15 = { "OutlinePlugin": "_OutlinePlugin_16k03_1" };
6193
6240
  // plugins/outline/index.tsx
6194
6241
  import { jsx as jsx39 } from "react/jsx-runtime";
6195
6242
  var getClassName21 = get_class_name_factory_default("OutlinePlugin", styles_module_default15);
6196
- var outlinePlugin = () => ({
6197
- name: "outline",
6198
- label: "Outline",
6199
- render: () => /* @__PURE__ */ jsx39("div", { className: getClassName21(), children: /* @__PURE__ */ jsx39(Outline, {}) }),
6200
- icon: /* @__PURE__ */ jsx39(Layers, {})
6201
- });
6243
+ var outlinePlugin = (props = {}) => {
6244
+ var _a, _b;
6245
+ return {
6246
+ name: "outline",
6247
+ label: (_a = props.label) != null ? _a : "Outline",
6248
+ render: () => /* @__PURE__ */ jsx39("div", { className: getClassName21(), children: /* @__PURE__ */ jsx39(Outline, {}) }),
6249
+ icon: (_b = props.icon) != null ? _b : /* @__PURE__ */ jsx39(Layers, {})
6250
+ };
6251
+ };
6202
6252
 
6203
6253
  // plugins/fields/index.tsx
6204
6254
  init_react_import();
@@ -6224,13 +6274,15 @@ var useBreadcrumbs = (renderCount) => {
6224
6274
  return (_a = s.state.indexes.nodes[selectedId]) == null ? void 0 : _a.path;
6225
6275
  });
6226
6276
  const appStore = useAppStoreApi();
6277
+ const pageLabel = useMessage("label-page");
6278
+ const componentLabel = useMessage("label-component");
6227
6279
  return useMemo16(() => {
6228
6280
  const breadcrumbs = (path == null ? void 0 : path.map((zoneCompound) => {
6229
6281
  var _a, _b, _c, _d;
6230
6282
  const [componentId] = zoneCompound.split(":");
6231
6283
  if (componentId === "root") {
6232
6284
  return {
6233
- label: ((_a = config == null ? void 0 : config.root) == null ? void 0 : _a.label) || "Page",
6285
+ label: ((_a = config == null ? void 0 : config.root) == null ? void 0 : _a.label) || pageLabel,
6234
6286
  selector: null
6235
6287
  };
6236
6288
  }
@@ -6238,7 +6290,7 @@ var useBreadcrumbs = (renderCount) => {
6238
6290
  const parentId = node.path[node.path.length - 1];
6239
6291
  const contentIds = ((_b = appStore.getState().state.indexes.zones[parentId]) == null ? void 0 : _b.contentIds) || [];
6240
6292
  const index = contentIds.indexOf(componentId);
6241
- const label = node ? (_d = (_c = config.components[node.data.type]) == null ? void 0 : _c.label) != null ? _d : node.data.type : "Component";
6293
+ const label = node ? (_d = (_c = config.components[node.data.type]) == null ? void 0 : _c.label) != null ? _d : node.data.type : componentLabel;
6242
6294
  return {
6243
6295
  label,
6244
6296
  selector: node ? {
@@ -6251,11 +6303,11 @@ var useBreadcrumbs = (renderCount) => {
6251
6303
  return breadcrumbs.slice(breadcrumbs.length - renderCount);
6252
6304
  }
6253
6305
  return breadcrumbs;
6254
- }, [path, renderCount]);
6306
+ }, [path, renderCount, pageLabel, componentLabel]);
6255
6307
  };
6256
6308
 
6257
6309
  // components/Breadcrumbs/index.tsx
6258
- import { jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
6310
+ import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
6259
6311
  var getClassName22 = get_class_name_factory_default("Breadcrumbs", styles_module_default16);
6260
6312
  var Breadcrumbs = ({
6261
6313
  children,
@@ -6263,8 +6315,8 @@ var Breadcrumbs = ({
6263
6315
  }) => {
6264
6316
  const setUi = useAppStore((s) => s.setUi);
6265
6317
  const breadcrumbs = useBreadcrumbs(numParents);
6266
- return /* @__PURE__ */ jsxs13("div", { className: getClassName22(), children: [
6267
- breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs13("div", { className: getClassName22("breadcrumb"), children: [
6318
+ return /* @__PURE__ */ jsxs12("div", { className: getClassName22(), children: [
6319
+ breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs12("div", { className: getClassName22("breadcrumb"), children: [
6268
6320
  /* @__PURE__ */ jsx40(
6269
6321
  "button",
6270
6322
  {
@@ -6296,7 +6348,7 @@ import {
6296
6348
  useMemo as useMemo17
6297
6349
  } from "react";
6298
6350
  import { useShallow as useShallow8 } from "zustand/react/shallow";
6299
- import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
6351
+ import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs13 } from "react/jsx-runtime";
6300
6352
  var getClassName23 = get_class_name_factory_default("PuckFields", styles_module_default17);
6301
6353
  var DefaultFields = ({
6302
6354
  children
@@ -6427,7 +6479,7 @@ var FieldsInternal = ({ wrapFields = true }) => {
6427
6479
  );
6428
6480
  const isLoading = fieldsLoading || componentResolving;
6429
6481
  const Wrapper = useMemo17(() => overrides.fields || DefaultFields, [overrides]);
6430
- return /* @__PURE__ */ jsxs14(
6482
+ return /* @__PURE__ */ jsxs13(
6431
6483
  "form",
6432
6484
  {
6433
6485
  className: getClassName23({ wrapFields }),
@@ -6448,24 +6500,25 @@ init_react_import();
6448
6500
  var styles_module_default18 = { "FieldsPlugin": "_FieldsPlugin_18cj3_1", "FieldsPlugin-header": "_FieldsPlugin-header_18cj3_7" };
6449
6501
 
6450
6502
  // plugins/fields/index.tsx
6451
- import { jsx as jsx42, jsxs as jsxs15 } from "react/jsx-runtime";
6503
+ import { jsx as jsx42, jsxs as jsxs14 } from "react/jsx-runtime";
6452
6504
  var getClassName24 = get_class_name_factory_default("FieldsPlugin", styles_module_default18);
6453
6505
  var CurrentTitle = () => {
6506
+ const pageLabel = useMessage("label-page");
6454
6507
  const label = useAppStore((s) => {
6455
6508
  var _a, _b;
6456
6509
  const selectedItem = s.selectedItem;
6457
- return selectedItem ? (_b = (_a = s.config.components[selectedItem.type]) == null ? void 0 : _a.label) != null ? _b : selectedItem.type : "Page";
6510
+ return selectedItem ? (_b = (_a = s.config.components[selectedItem.type]) == null ? void 0 : _a.label) != null ? _b : selectedItem.type : null;
6458
6511
  });
6459
- return label;
6512
+ return label != null ? label : pageLabel;
6460
6513
  };
6461
- var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
6514
+ var fieldsPlugin = ({ desktopSideBar = "right", label, icon } = {}) => ({
6462
6515
  name: "fields",
6463
- label: "Fields",
6464
- render: () => /* @__PURE__ */ jsxs15("div", { className: getClassName24(), children: [
6516
+ label: label != null ? label : "Fields",
6517
+ render: () => /* @__PURE__ */ jsxs14("div", { className: getClassName24(), children: [
6465
6518
  /* @__PURE__ */ jsx42("div", { className: getClassName24("header"), children: /* @__PURE__ */ jsx42(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ jsx42(CurrentTitle, {}) }) }),
6466
6519
  /* @__PURE__ */ jsx42(Fields, {})
6467
6520
  ] }),
6468
- icon: /* @__PURE__ */ jsx42(RectangleEllipsis, {}),
6521
+ icon: icon != null ? icon : /* @__PURE__ */ jsx42(RectangleEllipsis, {}),
6469
6522
  mobileOnly: desktopSideBar === "right"
6470
6523
  });
6471
6524
 
@@ -9980,7 +10033,7 @@ init_react_import();
9980
10033
  var styles_module_default21 = { "MenuBar": "_MenuBar_1hxnj_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_1hxnj_14", "MenuBar-inner": "_MenuBar-inner_1hxnj_29", "MenuBar-history": "_MenuBar-history_1hxnj_45" };
9981
10034
 
9982
10035
  // components/MenuBar/index.tsx
9983
- import { Fragment as Fragment15, jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
10036
+ import { Fragment as Fragment15, jsx as jsx46, jsxs as jsxs15 } from "react/jsx-runtime";
9984
10037
  var getClassName26 = get_class_name_factory_default("MenuBar", styles_module_default21);
9985
10038
  function MenuBar({
9986
10039
  menuOpen = false,
@@ -9991,6 +10044,8 @@ function MenuBar({
9991
10044
  const forward = useAppStore((s) => s.history.forward);
9992
10045
  const hasFuture = useAppStore((s) => s.history.hasFuture());
9993
10046
  const hasPast = useAppStore((s) => s.history.hasPast());
10047
+ const undoLabel = useMessage("header-undo");
10048
+ const redoLabel = useMessage("header-redo");
9994
10049
  return /* @__PURE__ */ jsx46(
9995
10050
  "div",
9996
10051
  {
@@ -10005,13 +10060,13 @@ function MenuBar({
10005
10060
  setMenuOpen(false);
10006
10061
  }
10007
10062
  },
10008
- children: /* @__PURE__ */ jsxs16("div", { className: getClassName26("inner"), children: [
10009
- /* @__PURE__ */ jsxs16("div", { className: getClassName26("history"), children: [
10063
+ children: /* @__PURE__ */ jsxs15("div", { className: getClassName26("inner"), children: [
10064
+ /* @__PURE__ */ jsxs15("div", { className: getClassName26("history"), children: [
10010
10065
  /* @__PURE__ */ jsx46(
10011
10066
  IconButton,
10012
10067
  {
10013
10068
  type: "button",
10014
- title: "undo",
10069
+ title: undoLabel,
10015
10070
  disabled: !hasPast,
10016
10071
  onClick: back,
10017
10072
  children: /* @__PURE__ */ jsx46(Undo2, { size: 21 })
@@ -10021,7 +10076,7 @@ function MenuBar({
10021
10076
  IconButton,
10022
10077
  {
10023
10078
  type: "button",
10024
- title: "redo",
10079
+ title: redoLabel,
10025
10080
  disabled: !hasFuture,
10026
10081
  onClick: forward,
10027
10082
  children: /* @__PURE__ */ jsx46(Redo2, { size: 21 })
@@ -10039,7 +10094,7 @@ init_react_import();
10039
10094
  var styles_module_default22 = { "PuckHeader": "_PuckHeader_c2nei_1", "PuckHeader--hidePlugins": "_PuckHeader--hidePlugins_c2nei_21", "PuckHeader-inner": "_PuckHeader-inner_c2nei_26", "PuckHeader-toggle": "_PuckHeader-toggle_c2nei_46", "PuckHeader-rightSideBarToggle": "_PuckHeader-rightSideBarToggle_c2nei_52", "PuckHeader-leftSideBarToggle": "_PuckHeader-leftSideBarToggle_c2nei_53", "PuckHeader-title": "_PuckHeader-title_c2nei_64", "PuckHeader-path": "_PuckHeader-path_c2nei_68", "PuckHeader-tools": "_PuckHeader-tools_c2nei_75", "PuckHeader-menuButton": "_PuckHeader-menuButton_c2nei_81", "PuckHeader--menuOpen": "_PuckHeader--menuOpen_c2nei_86" };
10040
10095
 
10041
10096
  // components/Puck/components/Header/index.tsx
10042
- import { Fragment as Fragment16, jsx as jsx47, jsxs as jsxs17 } from "react/jsx-runtime";
10097
+ import { Fragment as Fragment16, jsx as jsx47, jsxs as jsxs16 } from "react/jsx-runtime";
10043
10098
  var getClassName27 = get_class_name_factory_default("PuckHeader", styles_module_default22);
10044
10099
  var HeaderInner = ({
10045
10100
  hidePlugins
@@ -10113,6 +10168,11 @@ var HeaderInner = ({
10113
10168
  },
10114
10169
  [dispatch, leftSideBarVisible, rightSideBarVisible]
10115
10170
  );
10171
+ const publishLabel = useMessage("header-publish");
10172
+ const pageLabel = useMessage("label-page");
10173
+ const toggleLeftLabel = useMessage("header-toggle-leftsidebar");
10174
+ const toggleRightLabel = useMessage("header-toggle-rightsidebar");
10175
+ const toggleMenuLabel = useMessage("header-toggle-menubar");
10116
10176
  return /* @__PURE__ */ jsx47(
10117
10177
  CustomHeader,
10118
10178
  {
@@ -10124,7 +10184,7 @@ var HeaderInner = ({
10124
10184
  onPublish && onPublish(data);
10125
10185
  },
10126
10186
  icon: /* @__PURE__ */ jsx47(Globe, { size: "14px" }),
10127
- children: "Publish"
10187
+ children: publishLabel
10128
10188
  }
10129
10189
  ) }) }),
10130
10190
  children: /* @__PURE__ */ jsx47(
@@ -10135,8 +10195,8 @@ var HeaderInner = ({
10135
10195
  rightSideBarVisible,
10136
10196
  hidePlugins
10137
10197
  }),
10138
- children: /* @__PURE__ */ jsxs17("div", { className: getClassName27("inner"), children: [
10139
- /* @__PURE__ */ jsxs17("div", { className: getClassName27("toggle"), children: [
10198
+ children: /* @__PURE__ */ jsxs16("div", { className: getClassName27("inner"), children: [
10199
+ /* @__PURE__ */ jsxs16("div", { className: getClassName27("toggle"), children: [
10140
10200
  /* @__PURE__ */ jsx47("div", { className: getClassName27("leftSideBarToggle"), children: /* @__PURE__ */ jsx47(
10141
10201
  IconButton,
10142
10202
  {
@@ -10144,7 +10204,7 @@ var HeaderInner = ({
10144
10204
  onClick: () => {
10145
10205
  toggleSidebars("left");
10146
10206
  },
10147
- title: "Toggle left sidebar",
10207
+ title: toggleLeftLabel,
10148
10208
  children: /* @__PURE__ */ jsx47(PanelLeft, { focusable: "false" })
10149
10209
  }
10150
10210
  ) }),
@@ -10155,19 +10215,19 @@ var HeaderInner = ({
10155
10215
  onClick: () => {
10156
10216
  toggleSidebars("right");
10157
10217
  },
10158
- title: "Toggle right sidebar",
10218
+ title: toggleRightLabel,
10159
10219
  children: /* @__PURE__ */ jsx47(PanelRight, { focusable: "false" })
10160
10220
  }
10161
10221
  ) })
10162
10222
  ] }),
10163
- /* @__PURE__ */ jsx47("div", { className: getClassName27("title"), children: /* @__PURE__ */ jsxs17(Heading, { rank: "2", size: "xs", children: [
10164
- headerTitle || rootTitle || "Page",
10165
- headerPath && /* @__PURE__ */ jsxs17(Fragment16, { children: [
10223
+ /* @__PURE__ */ jsx47("div", { className: getClassName27("title"), children: /* @__PURE__ */ jsxs16(Heading, { rank: "2", size: "xs", children: [
10224
+ headerTitle || rootTitle || pageLabel,
10225
+ headerPath && /* @__PURE__ */ jsxs16(Fragment16, { children: [
10166
10226
  " ",
10167
10227
  /* @__PURE__ */ jsx47("code", { className: getClassName27("path"), children: headerPath })
10168
10228
  ] })
10169
10229
  ] }) }),
10170
- /* @__PURE__ */ jsxs17("div", { className: getClassName27("tools"), children: [
10230
+ /* @__PURE__ */ jsxs16("div", { className: getClassName27("tools"), children: [
10171
10231
  /* @__PURE__ */ jsx47("div", { className: getClassName27("menuButton"), children: /* @__PURE__ */ jsx47(
10172
10232
  IconButton,
10173
10233
  {
@@ -10175,7 +10235,7 @@ var HeaderInner = ({
10175
10235
  onClick: () => {
10176
10236
  return setMenuOpen(!menuOpen);
10177
10237
  },
10178
- title: "Toggle menu bar",
10238
+ title: toggleMenuLabel,
10179
10239
  children: menuOpen ? /* @__PURE__ */ jsx47(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ jsx47(ChevronDown, { focusable: "false" })
10180
10240
  }
10181
10241
  ) }),
@@ -10193,7 +10253,7 @@ var HeaderInner = ({
10193
10253
  onPublish && onPublish(data);
10194
10254
  },
10195
10255
  icon: /* @__PURE__ */ jsx47(Globe, { size: "14px" }),
10196
- children: "Publish"
10256
+ children: publishLabel
10197
10257
  }
10198
10258
  ) }),
10199
10259
  setMenuOpen
@@ -10216,7 +10276,7 @@ init_react_import();
10216
10276
  var styles_module_default23 = { "SidebarSection": "_SidebarSection_1uv88_1", "SidebarSection-title": "_SidebarSection-title_1uv88_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_1uv88_20", "SidebarSection-content": "_SidebarSection-content_1uv88_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_1uv88_33", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_1uv88_62", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_1uv88_33", "SidebarSection-heading": "_SidebarSection-heading_1uv88_74", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_1uv88_78" };
10217
10277
 
10218
10278
  // components/SidebarSection/index.tsx
10219
- import { jsx as jsx48, jsxs as jsxs18 } from "react/jsx-runtime";
10279
+ import { jsx as jsx48, jsxs as jsxs17 } from "react/jsx-runtime";
10220
10280
  var getClassName28 = get_class_name_factory_default("SidebarSection", styles_module_default23);
10221
10281
  var SidebarSection = ({
10222
10282
  children,
@@ -10226,8 +10286,8 @@ var SidebarSection = ({
10226
10286
  noBorderTop,
10227
10287
  isLoading
10228
10288
  }) => {
10229
- return /* @__PURE__ */ jsxs18("div", { className: getClassName28({ noBorderTop }), style: { background }, children: [
10230
- /* @__PURE__ */ jsx48("div", { className: getClassName28("title"), children: /* @__PURE__ */ jsxs18("div", { className: getClassName28("breadcrumbs"), children: [
10289
+ return /* @__PURE__ */ jsxs17("div", { className: getClassName28({ noBorderTop }), style: { background }, children: [
10290
+ /* @__PURE__ */ jsx48("div", { className: getClassName28("title"), children: /* @__PURE__ */ jsxs17("div", { className: getClassName28("breadcrumbs"), children: [
10231
10291
  showBreadcrumbs && /* @__PURE__ */ jsx48(Breadcrumbs, {}),
10232
10292
  /* @__PURE__ */ jsx48("div", { className: getClassName28("heading"), children: /* @__PURE__ */ jsx48(Heading, { rank: "2", size: "xs", children: title }) })
10233
10293
  ] }) }),
@@ -10255,7 +10315,7 @@ init_react_import();
10255
10315
  var styles_module_default24 = { "ViewportControls": "_ViewportControls_v26yb_1", "ViewportControls--fullScreen": "_ViewportControls--fullScreen_v26yb_5", "ViewportControls-toggleButton": "_ViewportControls-toggleButton_v26yb_14", "ViewportControls-actions": "_ViewportControls-actions_v26yb_39", "ViewportControls-actionsInner": "_ViewportControls-actionsInner_v26yb_43", "ViewportControls--isExpanded": "_ViewportControls--isExpanded_v26yb_67", "ViewportControls-divider": "_ViewportControls-divider_v26yb_72", "ViewportControls-zoomSelect": "_ViewportControls-zoomSelect_v26yb_79", "ViewportControls-zoom": "_ViewportControls-zoom_v26yb_79", "ViewportButton-inner": "_ViewportButton-inner_v26yb_110", "ViewportButton--isActive": "_ViewportButton--isActive_v26yb_118" };
10256
10316
 
10257
10317
  // components/ViewportControls/index.tsx
10258
- import { jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
10318
+ import { jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
10259
10319
  var icons = {
10260
10320
  Smartphone: /* @__PURE__ */ jsx49(Smartphone, { size: 16 }),
10261
10321
  Tablet: /* @__PURE__ */ jsx49(Tablet, { size: 16 }),
@@ -10292,6 +10352,26 @@ var defaultZoomOptions = [
10292
10352
  { label: "150%", value: 1.5 },
10293
10353
  { label: "200%", value: 2 }
10294
10354
  ];
10355
+ var ViewportButton = ({
10356
+ viewport,
10357
+ isActive,
10358
+ onClick
10359
+ }) => {
10360
+ var _a;
10361
+ const switchTitle = useMessage("viewport-switch", {
10362
+ label: (_a = viewport.label) != null ? _a : ""
10363
+ });
10364
+ const switchDefaultTitle = useMessage("viewport-switch-default");
10365
+ return /* @__PURE__ */ jsx49(
10366
+ ActionButton,
10367
+ {
10368
+ title: viewport.label ? switchTitle : switchDefaultTitle,
10369
+ onClick,
10370
+ isActive,
10371
+ children: typeof viewport.icon === "string" ? icons[viewport.icon] || viewport.icon : viewport.icon || icons.Smartphone
10372
+ }
10373
+ );
10374
+ };
10295
10375
  var ViewportControls = ({
10296
10376
  autoZoom,
10297
10377
  zoom,
@@ -10305,17 +10385,20 @@ var ViewportControls = ({
10305
10385
  const defaultsContainAutoZoom = defaultZoomOptions.find(
10306
10386
  (option) => option.value === autoZoom
10307
10387
  );
10388
+ const autoZoomLabel = useMessage("viewport-zoom-auto", {
10389
+ zoom: (autoZoom * 100).toFixed(0)
10390
+ });
10308
10391
  const zoomOptions = useMemo21(
10309
10392
  () => [
10310
10393
  ...defaultZoomOptions,
10311
10394
  ...defaultsContainAutoZoom ? [] : [
10312
10395
  {
10313
10396
  value: autoZoom,
10314
- label: `${(autoZoom * 100).toFixed(0)}% (Auto)`
10397
+ label: autoZoomLabel
10315
10398
  }
10316
10399
  ]
10317
10400
  ].filter((a) => a.value <= autoZoom).sort((a, b) => a.value > b.value ? 1 : -1),
10318
- [autoZoom]
10401
+ [autoZoom, autoZoomLabel]
10319
10402
  );
10320
10403
  const [activeViewport, setActiveViewport] = useState20(
10321
10404
  uiViewports.current.width
@@ -10324,23 +10407,25 @@ var ViewportControls = ({
10324
10407
  setActiveViewport(uiViewports.current.width);
10325
10408
  }, [uiViewports.current]);
10326
10409
  const [isExpanded, setIsExpanded] = useState20(false);
10327
- return /* @__PURE__ */ jsxs19(
10410
+ const zoomOutLabel = useMessage("viewport-zoom-out");
10411
+ const zoomInLabel = useMessage("viewport-zoom-in");
10412
+ const toggleMenuLabel = useMessage("viewport-toggle-menu");
10413
+ return /* @__PURE__ */ jsxs18(
10328
10414
  "div",
10329
10415
  {
10330
10416
  className: getClassName29({ isExpanded, fullScreen }),
10331
10417
  suppressHydrationWarning: true,
10332
10418
  children: [
10333
- /* @__PURE__ */ jsx49("div", { className: getClassName29("actions"), children: /* @__PURE__ */ jsxs19("div", { className: getClassName29("actionsInner"), children: [
10419
+ /* @__PURE__ */ jsx49("div", { className: getClassName29("actions"), children: /* @__PURE__ */ jsxs18("div", { className: getClassName29("actionsInner"), children: [
10334
10420
  viewports.map((viewport, i) => /* @__PURE__ */ jsx49(
10335
- ActionButton,
10421
+ ViewportButton,
10336
10422
  {
10337
- title: viewport.label ? `Switch to ${viewport.label} viewport` : "Switch viewport",
10423
+ viewport,
10338
10424
  onClick: () => {
10339
10425
  setActiveViewport(viewport.width);
10340
10426
  onViewportChange(viewport);
10341
10427
  },
10342
- isActive: activeViewport === viewport.width,
10343
- children: typeof viewport.icon === "string" ? icons[viewport.icon] || viewport.icon : viewport.icon || icons.Smartphone
10428
+ isActive: activeViewport === viewport.width
10344
10429
  },
10345
10430
  i
10346
10431
  )),
@@ -10348,7 +10433,7 @@ var ViewportControls = ({
10348
10433
  /* @__PURE__ */ jsx49(
10349
10434
  ActionButton,
10350
10435
  {
10351
- title: "Zoom viewport out",
10436
+ title: zoomOutLabel,
10352
10437
  disabled: zoom <= ((_a = zoomOptions[0]) == null ? void 0 : _a.value),
10353
10438
  onClick: (e) => {
10354
10439
  e.stopPropagation();
@@ -10365,7 +10450,7 @@ var ViewportControls = ({
10365
10450
  /* @__PURE__ */ jsx49(
10366
10451
  ActionButton,
10367
10452
  {
10368
- title: "Zoom viewport in",
10453
+ title: zoomInLabel,
10369
10454
  disabled: zoom >= ((_b = zoomOptions[zoomOptions.length - 1]) == null ? void 0 : _b.value),
10370
10455
  onClick: (e) => {
10371
10456
  e.stopPropagation();
@@ -10379,7 +10464,7 @@ var ViewportControls = ({
10379
10464
  children: /* @__PURE__ */ jsx49(ZoomIn, { size: 16 })
10380
10465
  }
10381
10466
  ),
10382
- /* @__PURE__ */ jsxs19("div", { className: getClassName29("zoom"), children: [
10467
+ /* @__PURE__ */ jsxs18("div", { className: getClassName29("zoom"), children: [
10383
10468
  /* @__PURE__ */ jsx49("div", { className: getClassName29("divider") }),
10384
10469
  /* @__PURE__ */ jsx49(
10385
10470
  "select",
@@ -10408,7 +10493,7 @@ var ViewportControls = ({
10408
10493
  "button",
10409
10494
  {
10410
10495
  className: getClassName29("toggleButton"),
10411
- title: "Toggle viewport menu",
10496
+ title: toggleMenuLabel,
10412
10497
  onClick: () => setIsExpanded((s) => !s),
10413
10498
  children: isExpanded ? /* @__PURE__ */ jsx49(X, { size: 16 }) : /* @__PURE__ */ jsx49(Monitor, { size: 16 })
10414
10499
  }
@@ -10456,7 +10541,7 @@ var useCanvasFrame = () => {
10456
10541
  };
10457
10542
 
10458
10543
  // components/Puck/components/Canvas/index.tsx
10459
- import { Fragment as Fragment17, jsx as jsx51, jsxs as jsxs20 } from "react/jsx-runtime";
10544
+ import { Fragment as Fragment17, jsx as jsx51, jsxs as jsxs19 } from "react/jsx-runtime";
10460
10545
  var getClassName30 = get_class_name_factory_default("PuckCanvas", styles_module_default25);
10461
10546
  var ZOOM_ON_CHANGE = true;
10462
10547
  var TRANSITION_DURATION = 150;
@@ -10612,7 +10697,7 @@ var Canvas = () => {
10612
10697
  appStoreApi,
10613
10698
  (_a = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a.current
10614
10699
  ]);
10615
- return /* @__PURE__ */ jsxs20(
10700
+ return /* @__PURE__ */ jsxs19(
10616
10701
  "div",
10617
10702
  {
10618
10703
  className: getClassName30({
@@ -10661,7 +10746,7 @@ var Canvas = () => {
10661
10746
  }
10662
10747
  }
10663
10748
  ) }),
10664
- /* @__PURE__ */ jsxs20("div", { className: getClassName30("inner"), ref: frameRef, children: [
10749
+ /* @__PURE__ */ jsxs19("div", { className: getClassName30("inner"), ref: frameRef, children: [
10665
10750
  /* @__PURE__ */ jsx51(
10666
10751
  "div",
10667
10752
  {
@@ -10856,7 +10941,7 @@ init_react_import();
10856
10941
  var styles_module_default27 = { "Sidebar": "_Sidebar_16oed_1", "Sidebar--isVisible": "_Sidebar--isVisible_16oed_10", "Sidebar--left": "_Sidebar--left_16oed_14", "Sidebar--right": "_Sidebar--right_16oed_34", "Sidebar-resizeHandle": "_Sidebar-resizeHandle_16oed_51" };
10857
10942
 
10858
10943
  // components/Puck/components/Sidebar/index.tsx
10859
- import { Fragment as Fragment18, jsx as jsx53, jsxs as jsxs21 } from "react/jsx-runtime";
10944
+ import { Fragment as Fragment18, jsx as jsx53, jsxs as jsxs20 } from "react/jsx-runtime";
10860
10945
  var getClassName32 = get_class_name_factory_default("Sidebar", styles_module_default27);
10861
10946
  var Sidebar = ({
10862
10947
  position,
@@ -10866,7 +10951,7 @@ var Sidebar = ({
10866
10951
  onResizeEnd,
10867
10952
  children
10868
10953
  }) => {
10869
- return /* @__PURE__ */ jsxs21(Fragment18, { children: [
10954
+ return /* @__PURE__ */ jsxs20(Fragment18, { children: [
10870
10955
  /* @__PURE__ */ jsx53(
10871
10956
  "div",
10872
10957
  {
@@ -10956,7 +11041,7 @@ init_react_import();
10956
11041
  var styles_module_default28 = { "Nav": "_Nav_vll2r_1", "Nav-list": "_Nav-list_vll2r_5", "Nav-mobileActions": "_Nav-mobileActions_vll2r_23", "NavItem-link": "_NavItem-link_vll2r_39", "NavItem": "_NavItem_vll2r_39", "NavItem-linkIcon": "_NavItem-linkIcon_vll2r_90", "NavItem--active": "_NavItem--active_vll2r_100", "NavItem--mobileOnly": "_NavItem--mobileOnly_vll2r_136", "NavItem--desktopOnly": "_NavItem--desktopOnly_vll2r_141" };
10957
11042
 
10958
11043
  // components/Puck/components/Nav/index.tsx
10959
- import { jsx as jsx54, jsxs as jsxs22 } from "react/jsx-runtime";
11044
+ import { jsx as jsx54, jsxs as jsxs21 } from "react/jsx-runtime";
10960
11045
  var getClassName33 = get_class_name_factory_default("Nav", styles_module_default28);
10961
11046
  var getClassNameItem3 = get_class_name_factory_default("NavItem", styles_module_default28);
10962
11047
  var MenuItem = ({
@@ -10975,7 +11060,7 @@ var MenuItem = ({
10975
11060
  mobileOnly,
10976
11061
  desktopOnly
10977
11062
  }),
10978
- children: onClick && /* @__PURE__ */ jsxs22("div", { className: getClassNameItem3("link"), onClick, children: [
11063
+ children: onClick && /* @__PURE__ */ jsxs21("div", { className: getClassNameItem3("link"), onClick, children: [
10979
11064
  icon && /* @__PURE__ */ jsx54("span", { className: getClassNameItem3("linkIcon"), children: icon }),
10980
11065
  /* @__PURE__ */ jsx54("span", { className: getClassNameItem3("linkLabel"), children: label })
10981
11066
  ] })
@@ -10986,7 +11071,7 @@ var Nav = ({
10986
11071
  items,
10987
11072
  mobileActions
10988
11073
  }) => {
10989
- return /* @__PURE__ */ jsxs22("nav", { className: getClassName33(), children: [
11074
+ return /* @__PURE__ */ jsxs21("nav", { className: getClassName33(), children: [
10990
11075
  /* @__PURE__ */ jsx54("ul", { className: getClassName33("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ jsx54(MenuItem, __spreadValues({}, item), key)) }),
10991
11076
  mobileActions && /* @__PURE__ */ jsx54("div", { className: getClassName33("mobileActions"), children: mobileActions })
10992
11077
  ] });
@@ -11001,19 +11086,20 @@ var normalizeIframeConfig = (iframe) => __spreadValues({
11001
11086
  }, iframe);
11002
11087
 
11003
11088
  // components/Puck/components/Layout/index.tsx
11004
- import { jsx as jsx55, jsxs as jsxs23 } from "react/jsx-runtime";
11089
+ import { jsx as jsx55, jsxs as jsxs22 } from "react/jsx-runtime";
11005
11090
  var getClassName34 = get_class_name_factory_default("Puck", styles_module_default20);
11006
11091
  var getLayoutClassName = get_class_name_factory_default("PuckLayout", styles_module_default20);
11007
11092
  var getPluginTabClassName = get_class_name_factory_default("PuckPluginTab", styles_module_default20);
11008
11093
  var useBrowserLayoutEffect = typeof window === "undefined" ? useEffect28 : useLayoutEffect2;
11009
11094
  var FieldSideBar = () => {
11095
+ const pageLabel = useMessage("label-page");
11010
11096
  const title = useAppStore(
11011
11097
  (s) => {
11012
11098
  var _a, _b, _c;
11013
- return s.selectedItem ? (_b = (_a = s.config.components[s.selectedItem.type]) == null ? void 0 : _a["label"]) != null ? _b : s.selectedItem.type.toString() : ((_c = s.config.root) == null ? void 0 : _c.label) || "Page";
11099
+ return s.selectedItem ? (_b = (_a = s.config.components[s.selectedItem.type]) == null ? void 0 : _a["label"]) != null ? _b : s.selectedItem.type.toString() : (_c = s.config.root) == null ? void 0 : _c.label;
11014
11100
  }
11015
11101
  );
11016
- return /* @__PURE__ */ jsx55(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ jsx55(Fields, {}) });
11102
+ return /* @__PURE__ */ jsx55(SidebarSection, { noBorderTop: true, showBreadcrumbs: true, title: title || pageLabel, children: /* @__PURE__ */ jsx55(Fields, {}) });
11017
11103
  };
11018
11104
  var PluginTab = ({
11019
11105
  children,
@@ -11115,16 +11201,22 @@ var Layout = ({ children }) => {
11115
11201
  () => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
11116
11202
  [plugins]
11117
11203
  );
11204
+ const blocksLabel = useMessage("plugin-blocks");
11205
+ const outlineLabel = useMessage("plugin-outline");
11206
+ const fieldsLabel = useMessage("plugin-fields");
11118
11207
  const pluginItems = useMemo24(() => {
11119
11208
  const details = {};
11120
- const defaultPlugins = [blocksPlugin(), outlinePlugin()];
11209
+ const defaultPlugins = [
11210
+ blocksPlugin({ label: blocksLabel }),
11211
+ outlinePlugin({ label: outlineLabel })
11212
+ ];
11121
11213
  const isLegacy = (plugin) => plugin.name === "legacy-side-bar" ? -1 : 0;
11122
11214
  const combinedPlugins = [
11123
11215
  ...defaultPlugins,
11124
11216
  ...plugins != null ? plugins : []
11125
11217
  ].sort((a, b) => isLegacy(a) - isLegacy(b));
11126
11218
  if (!(plugins == null ? void 0 : plugins.some((p) => p.name === "fields"))) {
11127
- combinedPlugins.push(fieldsPlugin());
11219
+ combinedPlugins.push(fieldsPlugin({ label: fieldsLabel }));
11128
11220
  }
11129
11221
  combinedPlugins == null ? void 0 : combinedPlugins.forEach((plugin) => {
11130
11222
  var _a, _b;
@@ -11161,7 +11253,15 @@ var Layout = ({ children }) => {
11161
11253
  }
11162
11254
  });
11163
11255
  return details;
11164
- }, [plugins, currentPlugin, appStoreApi, leftSideBarVisible]);
11256
+ }, [
11257
+ plugins,
11258
+ currentPlugin,
11259
+ appStoreApi,
11260
+ leftSideBarVisible,
11261
+ blocksLabel,
11262
+ outlineLabel,
11263
+ fieldsLabel
11264
+ ]);
11165
11265
  useEffect28(() => {
11166
11266
  if (!currentPlugin) {
11167
11267
  const names = Object.keys(pluginItems);
@@ -11175,7 +11275,9 @@ var Layout = ({ children }) => {
11175
11275
  return (_a = s.state.ui.mobilePanelExpanded) != null ? _a : false;
11176
11276
  }
11177
11277
  );
11178
- return /* @__PURE__ */ jsxs23(
11278
+ const maximizeLabel = useMessage("layout-maximize");
11279
+ const minimizeLabel = useMessage("layout-minimize");
11280
+ return /* @__PURE__ */ jsxs22(
11179
11281
  "div",
11180
11282
  {
11181
11283
  className: `Puck ${getClassName34({
@@ -11196,7 +11298,7 @@ var Layout = ({ children }) => {
11196
11298
  mobilePanelHeightMinContent: mobilePanelHeightMode === "min-content"
11197
11299
  }),
11198
11300
  style: { height },
11199
- children: /* @__PURE__ */ jsxs23(
11301
+ children: /* @__PURE__ */ jsxs22(
11200
11302
  "div",
11201
11303
  {
11202
11304
  className: getLayoutClassName("inner"),
@@ -11211,7 +11313,7 @@ var Layout = ({ children }) => {
11211
11313
  IconButton,
11212
11314
  {
11213
11315
  type: "button",
11214
- title: "maximize",
11316
+ title: mobilePanelExpanded ? minimizeLabel : maximizeLabel,
11215
11317
  onClick: () => {
11216
11318
  setUi({
11217
11319
  mobilePanelExpanded: !mobilePanelExpanded
@@ -11286,6 +11388,7 @@ function PuckProvider({ children }) {
11286
11388
  iframe: _iframe,
11287
11389
  initialHistory: _initialHistory,
11288
11390
  metadata,
11391
+ dictionary,
11289
11392
  onAction,
11290
11393
  fieldTransforms,
11291
11394
  _experimentalFullScreenCanvas,
@@ -11383,6 +11486,7 @@ function PuckProvider({ children }) {
11383
11486
  _experimentalVirtualization: !!_experimentalVirtualization,
11384
11487
  onAction,
11385
11488
  metadata,
11489
+ dictionary: dictionary || {},
11386
11490
  fieldTransforms: loadedFieldTransforms
11387
11491
  };
11388
11492
  },
@@ -11398,6 +11502,7 @@ function PuckProvider({ children }) {
11398
11502
  _experimentalVirtualization,
11399
11503
  onAction,
11400
11504
  metadata,
11505
+ dictionary,
11401
11506
  loadedFieldTransforms
11402
11507
  ]
11403
11508
  );
@@ -11452,13 +11557,29 @@ Puck.Preview = Preview2;
11452
11557
 
11453
11558
  // plugins/legacy-side-bar/index.tsx
11454
11559
  init_react_import();
11455
- import { jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
11456
- var legacySideBarPlugin = () => ({
11560
+ import { jsx as jsx57, jsxs as jsxs23 } from "react/jsx-runtime";
11561
+ var LegacySideBar = ({
11562
+ outlineLabel,
11563
+ componentsLabel
11564
+ }) => {
11565
+ const componentsLabelMessage = useMessage("plugin-components");
11566
+ const outlineLabelMessage = useMessage("plugin-outline");
11567
+ const resolvedComponentsLabel = componentsLabel != null ? componentsLabel : componentsLabelMessage;
11568
+ const resolvedOutlineLabel = outlineLabel != null ? outlineLabel : outlineLabelMessage;
11569
+ return /* @__PURE__ */ jsxs23("div", { style: { overflowY: "auto" }, children: [
11570
+ /* @__PURE__ */ jsx57(SidebarSection, { title: resolvedComponentsLabel, noBorderTop: true, children: /* @__PURE__ */ jsx57(Components, {}) }),
11571
+ /* @__PURE__ */ jsx57(SidebarSection, { title: resolvedOutlineLabel, children: /* @__PURE__ */ jsx57(Outline, {}) })
11572
+ ] });
11573
+ };
11574
+ var legacySideBarPlugin = (props = {}) => ({
11457
11575
  name: "legacy-side-bar",
11458
- render: () => /* @__PURE__ */ jsxs24("div", { style: { overflowY: "auto" }, children: [
11459
- /* @__PURE__ */ jsx57(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ jsx57(Components, {}) }),
11460
- /* @__PURE__ */ jsx57(SidebarSection, { title: "Outline", children: /* @__PURE__ */ jsx57(Outline, {}) })
11461
- ] })
11576
+ render: () => /* @__PURE__ */ jsx57(
11577
+ LegacySideBar,
11578
+ {
11579
+ outlineLabel: props.outlineLabel,
11580
+ componentsLabel: props.componentsLabel
11581
+ }
11582
+ )
11462
11583
  });
11463
11584
 
11464
11585
  // bundle/core.ts