@puckeditor/core 0.21.3 → 0.22.0-canary.0c2f7ab8

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 (52) hide show
  1. package/README.md +1 -4
  2. package/dist/{Editor-MCVDFQH6.mjs → Editor-FJJNKTC3.mjs} +10 -11
  3. package/dist/Editor-ZZW3KF2T.css +385 -0
  4. package/dist/{Render-MJ563JES.mjs → Render-DQXAYUBI.mjs} +1 -1
  5. package/dist/Render-EKEWMTMI.css +117 -0
  6. package/dist/{actions-C3e2nJ9v.d.mts → actions-Csn3gOP8.d.mts} +3 -1
  7. package/dist/{actions-C3e2nJ9v.d.ts → actions-Csn3gOP8.d.ts} +3 -1
  8. package/dist/{chunk-ZMTK7SMX.mjs → chunk-3RQGAM3Z.mjs} +1 -1
  9. package/dist/{chunk-HGJWUFLT.mjs → chunk-4US666EQ.mjs} +91 -248
  10. package/dist/{chunk-4HOGLOEA.mjs → chunk-6MO3E35Y.mjs} +5 -3
  11. package/dist/{chunk-6XCJ3Y7O.mjs → chunk-DVZWVU66.mjs} +55 -2
  12. package/dist/{chunk-TDQEUXB2.mjs → chunk-GKUX6MNS.mjs} +4 -4
  13. package/dist/{chunk-AOEDIUVK.mjs → chunk-H635BA2V.mjs} +1 -1
  14. package/dist/{chunk-DPDJ67KA.mjs → chunk-M5GPDW62.mjs} +1 -1
  15. package/dist/{chunk-YXFTA2VL.mjs → chunk-SLDNFU3H.mjs} +3378 -432
  16. package/dist/{chunk-X2ZFWNCU.mjs → chunk-SSXLOL3N.mjs} +18 -15
  17. package/dist/{chunk-LODTL5KW.mjs → chunk-XIGSFEU7.mjs} +1 -1
  18. package/dist/{chunk-O7FT3KAM.mjs → chunk-XQHCQEAF.mjs} +233 -54
  19. package/dist/{full-5QCBHXRC.mjs → full-6ZILLKCS.mjs} +7 -7
  20. package/dist/full-S3QQ2IBQ.css +267 -0
  21. package/dist/{index-Cx46WIFC.d.ts → index-B1b1cFug.d.ts} +1 -1
  22. package/dist/{index-zHrchQGY.d.mts → index-ClzBCbx_.d.mts} +1 -1
  23. package/dist/index.css +1293 -1162
  24. package/dist/index.d.mts +13 -13
  25. package/dist/index.d.ts +13 -13
  26. package/dist/index.js +3788 -752
  27. package/dist/index.mjs +13 -12
  28. package/dist/internal.d.mts +2 -2
  29. package/dist/internal.d.ts +2 -2
  30. package/dist/internal.js +48 -2
  31. package/dist/internal.mjs +1 -1
  32. package/dist/loaded-FVWRAJR3.css +215 -0
  33. package/dist/{loaded-OMRIYZIQ.mjs → loaded-LAKI4KDY.mjs} +4 -4
  34. package/dist/{loaded-Y4ZWZC55.mjs → loaded-PILFUJGA.mjs} +4 -4
  35. package/dist/{loaded-54625GTL.mjs → loaded-QH5RKCGC.mjs} +4 -4
  36. package/dist/no-external.css +1293 -1162
  37. package/dist/no-external.d.mts +3 -3
  38. package/dist/no-external.d.ts +3 -3
  39. package/dist/no-external.js +3788 -752
  40. package/dist/no-external.mjs +13 -12
  41. package/dist/rsc.css +61 -46
  42. package/dist/rsc.d.mts +2 -2
  43. package/dist/rsc.d.ts +2 -2
  44. package/dist/rsc.js +22 -17
  45. package/dist/rsc.mjs +3 -3
  46. package/dist/{walk-tree-BJoNgZ0l.d.mts → walk-tree-BrW9VQ_t.d.mts} +1 -1
  47. package/dist/{walk-tree-f8Yzs5o3.d.ts → walk-tree-CWrsBHHe.d.ts} +1 -1
  48. package/package.json +13 -5
  49. package/dist/Editor-SWYBDXGU.css +0 -395
  50. package/dist/Render-3OV4N4MT.css +0 -102
  51. package/dist/full-FFFM5OTN.css +0 -292
  52. package/dist/loaded-RVWBFK7L.css +0 -87
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  styles_module_default
3
- } from "./chunk-AOEDIUVK.mjs";
3
+ } from "./chunk-H635BA2V.mjs";
4
4
  import {
5
5
  defaultAppState,
6
6
  resolveComponentData
7
- } from "./chunk-4HOGLOEA.mjs";
7
+ } from "./chunk-6MO3E35Y.mjs";
8
8
  import {
9
9
  get_class_name_factory_default
10
10
  } from "./chunk-Y2EFNT5P.mjs";
@@ -210,7 +210,7 @@ function resolveAllData(_0, _1) {
210
210
  const defaultedData = defaultData(data);
211
211
  const zonesByComponent = groupZonesByComponent(defaultedData);
212
212
  let resolvedZones = {};
213
- const resolveNode = (_node, parent) => __async(null, null, function* () {
213
+ const resolveNode = (_node, parent, root) => __async(null, null, function* () {
214
214
  const node = toComponent(_node);
215
215
  onResolveStart == null ? void 0 : onResolveStart(node);
216
216
  const resolved = (yield resolveComponentData(
@@ -222,13 +222,14 @@ function resolveAllData(_0, _1) {
222
222
  () => {
223
223
  },
224
224
  "force",
225
- parent
225
+ parent,
226
+ root
226
227
  )).node;
227
228
  const resolvedAsComponent = toComponent(resolved);
228
229
  const resolvedDeepPromise = mapFields(
229
230
  resolved,
230
231
  {
231
- slot: ({ value }) => processContent(value, resolvedAsComponent)
232
+ slot: ({ value }) => processContent(value, resolvedAsComponent, root)
232
233
  },
233
234
  config
234
235
  );
@@ -238,7 +239,8 @@ function resolveAllData(_0, _1) {
238
239
  (_02) => __async(null, [_02], function* ({ zoneCompound, content }) {
239
240
  resolvedZones[zoneCompound] = yield processContent(
240
241
  content,
241
- resolvedAsComponent
242
+ resolvedAsComponent,
243
+ root
242
244
  );
243
245
  })
244
246
  );
@@ -248,14 +250,15 @@ function resolveAllData(_0, _1) {
248
250
  onResolveEnd == null ? void 0 : onResolveEnd(toComponent(resolvedDeep));
249
251
  return resolvedDeep;
250
252
  });
251
- const processContent = (content, parent) => __async(null, null, function* () {
252
- return Promise.all(content.map((item) => resolveNode(item, parent)));
253
+ const processContent = (content, parent, root) => __async(null, null, function* () {
254
+ return Promise.all(content.map((item) => resolveNode(item, parent, root)));
253
255
  });
254
256
  const result = defaultData({});
255
- result.root = yield resolveNode(defaultedData.root, null);
257
+ result.root = yield resolveNode(defaultedData.root, null, defaultedData.root);
256
258
  result.content = yield processContent(
257
259
  defaultedData.content,
258
- toComponent(result.root)
260
+ toComponent(result.root),
261
+ result.root
259
262
  );
260
263
  result.zones = resolvedZones;
261
264
  return result;
@@ -374,6 +377,11 @@ var mapDeep = (source, path, render) => {
374
377
 
375
378
  // components/RichTextEditor/lib/use-richtext-props.tsx
376
379
  import { jsx as jsx2 } from "react/jsx-runtime";
380
+ var RichTextRender = lazy(
381
+ () => import("./Render-DQXAYUBI.mjs").then((m) => ({
382
+ default: m.RichTextRender
383
+ }))
384
+ );
377
385
  function useRichtextProps(fields, props) {
378
386
  const findAllRichtextKeys = (fields2, path = []) => {
379
387
  if (!fields2) return [];
@@ -398,11 +406,6 @@ function useRichtextProps(fields, props) {
398
406
  const richtextKeys = useMemo2(() => findAllRichtextKeys(fields), [fields]);
399
407
  const richtextProps = useMemo2(() => {
400
408
  if (!(richtextKeys == null ? void 0 : richtextKeys.length)) return {};
401
- const RichTextRender = lazy(
402
- () => import("./Render-MJ563JES.mjs").then((m) => ({
403
- default: m.RichTextRender
404
- }))
405
- );
406
409
  let result = __spreadValues({}, props);
407
410
  for (const { path, field } of richtextKeys) {
408
411
  result = mapDeep(result, path, (content) => /* @__PURE__ */ jsx2(
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  List,
3
3
  ListOrdered
4
- } from "./chunk-O7FT3KAM.mjs";
4
+ } from "./chunk-XQHCQEAF.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -3,13 +3,13 @@ import {
3
3
  generateId,
4
4
  getItem,
5
5
  makeStatePublic
6
- } from "./chunk-6XCJ3Y7O.mjs";
6
+ } from "./chunk-DVZWVU66.mjs";
7
7
  import {
8
8
  defaultAppState,
9
9
  defaultViewports,
10
10
  getChanged,
11
11
  resolveComponentData
12
- } from "./chunk-4HOGLOEA.mjs";
12
+ } from "./chunk-6MO3E35Y.mjs";
13
13
  import {
14
14
  get_class_name_factory_default
15
15
  } from "./chunk-Y2EFNT5P.mjs";
@@ -24,12 +24,66 @@ import {
24
24
  init_react_import
25
25
  } from "./chunk-M6W7YEVX.mjs";
26
26
 
27
+ // components/ActionBar/index.tsx
28
+ init_react_import();
29
+ import { forwardRef } from "react";
30
+
31
+ // css-module:/home/runner/work/puck/puck/packages/core/components/ActionBar/styles.module.css#css-module
32
+ init_react_import();
33
+ var styles_module_default = { "ActionBar": "_ActionBar_5vdfr_1", "ActionBar-label": "_ActionBar-label_5vdfr_17", "ActionBarAction": "_ActionBarAction_5vdfr_30", "ActionBar-group": "_ActionBar-group_5vdfr_38", "ActionBarAction--disabled": "_ActionBarAction--disabled_5vdfr_74", "ActionBarAction--active": "_ActionBarAction--active_5vdfr_104", "ActionBar-separator": "_ActionBar-separator_5vdfr_117" };
34
+
35
+ // components/ActionBar/index.tsx
36
+ import { jsx, jsxs } from "react/jsx-runtime";
37
+ var getClassName = get_class_name_factory_default("ActionBar", styles_module_default);
38
+ var getActionClassName = get_class_name_factory_default("ActionBarAction", styles_module_default);
39
+ var ActionBar = ({
40
+ label,
41
+ children
42
+ }) => /* @__PURE__ */ jsxs(
43
+ "div",
44
+ {
45
+ className: getClassName(),
46
+ onClick: (e) => {
47
+ e.stopPropagation();
48
+ },
49
+ children: [
50
+ label && /* @__PURE__ */ jsx(ActionBar.Group, { children: /* @__PURE__ */ jsx("div", { className: getClassName("label"), children: label }) }),
51
+ children
52
+ ]
53
+ }
54
+ );
55
+ var Action = forwardRef((_a, ref) => {
56
+ var _b = _a, { children, label, onClick, active = false, disabled } = _b, rest = __objRest(_b, ["children", "label", "onClick", "active", "disabled"]);
57
+ return /* @__PURE__ */ jsx(
58
+ "button",
59
+ __spreadProps(__spreadValues({
60
+ type: "button"
61
+ }, rest), {
62
+ ref,
63
+ className: getActionClassName({ active, disabled }),
64
+ onClick,
65
+ title: label,
66
+ tabIndex: 0,
67
+ disabled,
68
+ children
69
+ })
70
+ );
71
+ });
72
+ Action.displayName = "Action";
73
+ var Group = ({ children }) => /* @__PURE__ */ jsx("div", { className: getClassName("group"), children });
74
+ var Label = ({ label }) => /* @__PURE__ */ jsx("div", { className: getClassName("label"), children: label });
75
+ var Separator = () => /* @__PURE__ */ jsx("div", { className: getClassName("separator") });
76
+ ActionBar.Action = Action;
77
+ ActionBar.Label = Label;
78
+ ActionBar.Group = Group;
79
+ ActionBar.Separator = Separator;
80
+
27
81
  // ../../node_modules/lucide-react/dist/esm/icons/align-left.js
28
82
  init_react_import();
29
83
 
30
84
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
31
85
  init_react_import();
32
- import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
86
+ import { forwardRef as forwardRef3, createElement as createElement2 } from "react";
33
87
 
34
88
  // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
35
89
  init_react_import();
@@ -40,7 +94,7 @@ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
40
94
 
41
95
  // ../../node_modules/lucide-react/dist/esm/Icon.js
42
96
  init_react_import();
43
- import { forwardRef, createElement } from "react";
97
+ import { forwardRef as forwardRef2, createElement } from "react";
44
98
 
45
99
  // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
46
100
  init_react_import();
@@ -57,7 +111,7 @@ var defaultAttributes = {
57
111
  };
58
112
 
59
113
  // ../../node_modules/lucide-react/dist/esm/Icon.js
60
- var Icon = forwardRef(
114
+ var Icon = forwardRef2(
61
115
  (_a, ref) => {
62
116
  var _b = _a, {
63
117
  color = "currentColor",
@@ -97,7 +151,7 @@ var Icon = forwardRef(
97
151
 
98
152
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
99
153
  var createLucideIcon = (iconName, iconNode) => {
100
- const Component = forwardRef2(
154
+ const Component = forwardRef3(
101
155
  (_a, ref) => {
102
156
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
103
157
  return createElement2(Icon, __spreadValues({
@@ -1305,7 +1359,8 @@ var createAppStore = (initialAppStore) => create2()(
1305
1359
  timeouts[id]();
1306
1360
  }),
1307
1361
  trigger,
1308
- parentData
1362
+ parentData,
1363
+ state.data.root
1309
1364
  );
1310
1365
  }),
1311
1366
  resolveAndCommitData: () => __async(null, null, function* () {
@@ -1356,33 +1411,16 @@ function useAppStoreApi() {
1356
1411
  return useContext(appStoreContext);
1357
1412
  }
1358
1413
 
1359
- // components/RichTextMenu/lib/use-control-context.ts
1414
+ // components/IconButton/IconButton.tsx
1360
1415
  init_react_import();
1361
- import { createContext as createContext2, useContext as useContext2 } from "react";
1362
- var ControlContext = createContext2({});
1363
- var useControlContext = () => {
1364
- return useContext2(ControlContext);
1365
- };
1416
+ import { forwardRef as forwardRef4, useState } from "react";
1366
1417
 
1367
- // components/RichTextMenu/components/SelectControl/index.tsx
1368
- init_react_import();
1369
- import { useMemo } from "react";
1370
-
1371
- // components/Select/index.tsx
1418
+ // css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css#css-module
1372
1419
  init_react_import();
1420
+ var IconButton_module_default = { "IconButton": "_IconButton_yuha3_1", "IconButton--active": "_IconButton--active_yuha3_15", "IconButton--disabled": "_IconButton--disabled_yuha3_28" };
1373
1421
 
1374
- // css-module:/home/runner/work/puck/puck/packages/core/components/Select/styles.module.css#css-module
1422
+ // components/Loader/index.tsx
1375
1423
  init_react_import();
1376
- var styles_module_default = { "Select": "_Select_xjbef_1", "Select-button": "_Select-button_xjbef_6", "Select--hasOptions": "_Select--hasOptions_xjbef_19", "Select--disabled": "_Select--disabled_xjbef_23", "Select-buttonIcon": "_Select-buttonIcon_xjbef_27", "Select--standalone": "_Select--standalone_xjbef_33", "Select--actionBar": "_Select--actionBar_xjbef_38", "Select--hasValue": "_Select--hasValue_xjbef_44", "Select-items": "_Select-items_xjbef_61", "SelectItem": "_SelectItem_xjbef_72", "SelectItem--isSelected": "_SelectItem--isSelected_xjbef_87", "SelectItem-icon": "_SelectItem-icon_xjbef_93" };
1377
-
1378
- // components/Select/index.tsx
1379
- import { useState } from "react";
1380
- import {
1381
- Popover,
1382
- PopoverContent,
1383
- PopoverPortal,
1384
- PopoverTrigger
1385
- } from "@radix-ui/react-popover";
1386
1424
 
1387
1425
  // lib/index.ts
1388
1426
  init_react_import();
@@ -1578,16 +1616,146 @@ var useResetAutoZoom = (frameRef) => {
1578
1616
  return resetAutoZoom;
1579
1617
  };
1580
1618
 
1619
+ // css-module:/home/runner/work/puck/puck/packages/core/components/Loader/styles.module.css#css-module
1620
+ init_react_import();
1621
+ var styles_module_default2 = { "Loader": "_Loader_1w5zn_13", "loader-animation": "_loader-animation_1w5zn_1" };
1622
+
1623
+ // components/Loader/index.tsx
1624
+ import { jsx as jsx2 } from "react/jsx-runtime";
1625
+ var getClassName2 = get_class_name_factory_default("Loader", styles_module_default2);
1626
+ var Loader = (_a) => {
1627
+ var _b = _a, {
1628
+ color,
1629
+ size = 16
1630
+ } = _b, props = __objRest(_b, [
1631
+ "color",
1632
+ "size"
1633
+ ]);
1634
+ return /* @__PURE__ */ jsx2(
1635
+ "span",
1636
+ __spreadValues({
1637
+ className: getClassName2(),
1638
+ style: {
1639
+ width: size,
1640
+ height: size,
1641
+ color
1642
+ },
1643
+ "aria-label": "loading"
1644
+ }, props)
1645
+ );
1646
+ };
1647
+
1648
+ // components/IconButton/IconButton.tsx
1649
+ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
1650
+ var getClassName3 = get_class_name_factory_default("IconButton", IconButton_module_default);
1651
+ var IconButton = forwardRef4(
1652
+ (_a, ref) => {
1653
+ var _b = _a, {
1654
+ active = false,
1655
+ children,
1656
+ href,
1657
+ onClick,
1658
+ type,
1659
+ disabled,
1660
+ tabIndex,
1661
+ newTab,
1662
+ fullWidth,
1663
+ title,
1664
+ suppressHydrationWarning
1665
+ } = _b, rest = __objRest(_b, [
1666
+ "active",
1667
+ "children",
1668
+ "href",
1669
+ "onClick",
1670
+ "type",
1671
+ "disabled",
1672
+ "tabIndex",
1673
+ "newTab",
1674
+ "fullWidth",
1675
+ "title",
1676
+ "suppressHydrationWarning"
1677
+ ]);
1678
+ const [loading, setLoading] = useState(false);
1679
+ const ElementType = href ? "a" : "button";
1680
+ return /* @__PURE__ */ jsxs2(
1681
+ ElementType,
1682
+ __spreadProps(__spreadValues({}, rest), {
1683
+ ref,
1684
+ className: getClassName3({
1685
+ active,
1686
+ disabled,
1687
+ fullWidth
1688
+ }),
1689
+ onClick: (e) => {
1690
+ if (!onClick) return;
1691
+ setLoading(true);
1692
+ Promise.resolve(onClick(e)).then(() => {
1693
+ setLoading(false);
1694
+ });
1695
+ },
1696
+ type,
1697
+ disabled: disabled || loading,
1698
+ tabIndex,
1699
+ target: newTab ? "_blank" : void 0,
1700
+ rel: newTab ? "noreferrer" : void 0,
1701
+ href,
1702
+ title,
1703
+ "aria-label": title,
1704
+ suppressHydrationWarning,
1705
+ children: [
1706
+ children,
1707
+ loading && /* @__PURE__ */ jsxs2(Fragment, { children: [
1708
+ "\xA0\xA0",
1709
+ /* @__PURE__ */ jsx3(Loader, { size: 14 })
1710
+ ] })
1711
+ ]
1712
+ })
1713
+ );
1714
+ }
1715
+ );
1716
+ IconButton.displayName = "IconButton";
1717
+
1718
+ // components/RichTextMenu/lib/use-control-context.ts
1719
+ init_react_import();
1720
+ import { createContext as createContext2, useContext as useContext2 } from "react";
1721
+ var ControlContext = createContext2({});
1722
+ var useControlContext = () => {
1723
+ return useContext2(ControlContext);
1724
+ };
1725
+
1726
+ // components/RichTextMenu/components/SelectControl/index.tsx
1727
+ init_react_import();
1728
+ import { useMemo } from "react";
1729
+
1581
1730
  // components/Select/index.tsx
1582
- import { jsx, jsxs } from "react/jsx-runtime";
1583
- var getClassName = get_class_name_factory_default("Select", styles_module_default);
1584
- var getItemClassName = get_class_name_factory_default("SelectItem", styles_module_default);
1731
+ init_react_import();
1732
+
1733
+ // css-module:/home/runner/work/puck/puck/packages/core/components/Select/styles.module.css#css-module
1734
+ init_react_import();
1735
+ var styles_module_default3 = { "Select": "_Select_1n4iv_1", "Select-buttonInner": "_Select-buttonInner_1n4iv_6", "Select-buttonIcon": "_Select-buttonIcon_1n4iv_11", "Select--standalone": "_Select--standalone_1n4iv_17", "Select--actionBar": "_Select--actionBar_1n4iv_22", "Select-items": "_Select-items_1n4iv_27", "SelectItem": "_SelectItem_1n4iv_38", "SelectItem--isSelected": "_SelectItem--isSelected_1n4iv_53", "SelectItem-icon": "_SelectItem-icon_1n4iv_59" };
1736
+
1737
+ // components/Select/index.tsx
1738
+ import { useState as useState2 } from "react";
1739
+ import {
1740
+ Popover,
1741
+ PopoverContent,
1742
+ PopoverPortal,
1743
+ PopoverTrigger
1744
+ } from "@radix-ui/react-popover";
1745
+
1746
+ // components/IconButton/index.ts
1747
+ init_react_import();
1748
+
1749
+ // components/Select/index.tsx
1750
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1751
+ var getClassName4 = get_class_name_factory_default("Select", styles_module_default3);
1752
+ var getItemClassName = get_class_name_factory_default("SelectItem", styles_module_default3);
1585
1753
  var Item = ({
1586
1754
  children,
1587
1755
  isSelected,
1588
1756
  onClick
1589
1757
  }) => {
1590
- return /* @__PURE__ */ jsx("button", { className: getItemClassName({ isSelected }), onClick, children });
1758
+ return /* @__PURE__ */ jsx4("button", { className: getItemClassName({ isSelected }), onClick, children });
1591
1759
  };
1592
1760
  var Select = ({
1593
1761
  children,
@@ -1598,30 +1766,34 @@ var Select = ({
1598
1766
  mode,
1599
1767
  disabled = false
1600
1768
  }) => {
1601
- const [open, setOpen] = useState(false);
1769
+ const [open, setOpen] = useState2(false);
1602
1770
  const hasOptions = options.length > 0;
1603
1771
  const isDisabled = disabled || !hasOptions;
1604
- return /* @__PURE__ */ jsx(
1772
+ const buttonInner = /* @__PURE__ */ jsxs3("div", { className: getClassName4("buttonInner"), children: [
1773
+ /* @__PURE__ */ jsx4("span", { className: getClassName4("buttonIcon"), children }),
1774
+ /* @__PURE__ */ jsx4(ChevronDown, { size: 12 })
1775
+ ] });
1776
+ const trigger = mode === "actionBar" ? /* @__PURE__ */ jsx4(Action, { active: value !== defaultValue, disabled: isDisabled, children: buttonInner }) : /* @__PURE__ */ jsx4(
1777
+ IconButton,
1778
+ {
1779
+ title: "Select",
1780
+ active: value !== defaultValue,
1781
+ disabled: isDisabled,
1782
+ children: buttonInner
1783
+ }
1784
+ );
1785
+ return /* @__PURE__ */ jsx4(
1605
1786
  "div",
1606
1787
  {
1607
- className: getClassName({
1608
- hasValue: value !== defaultValue,
1609
- hasOptions,
1788
+ className: getClassName4({
1610
1789
  actionBar: mode === "actionBar",
1611
- standalone: mode === "standalone",
1612
- disabled: isDisabled
1790
+ standalone: mode === "standalone"
1613
1791
  }),
1614
- children: /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
1615
- hasOptions ? /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: getClassName("button"), children: [
1616
- /* @__PURE__ */ jsx("span", { className: getClassName("buttonIcon"), children }),
1617
- /* @__PURE__ */ jsx(ChevronDown, { size: 12 })
1618
- ] }) }) : /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: getClassName("button"), children: [
1619
- /* @__PURE__ */ jsx("span", { className: getClassName("buttonIcon"), children }),
1620
- /* @__PURE__ */ jsx(ChevronDown, { size: 12 })
1621
- ] }) }),
1622
- options.length > 0 && /* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsx(PopoverContent, { align: "start", children: /* @__PURE__ */ jsx("ul", { className: getClassName("items"), "data-puck-rte-menu": true, children: options.map((option) => {
1792
+ children: /* @__PURE__ */ jsxs3(Popover, { open, onOpenChange: setOpen, children: [
1793
+ hasOptions ? /* @__PURE__ */ jsx4(PopoverTrigger, { asChild: true, children: trigger }) : trigger,
1794
+ options.length > 0 && /* @__PURE__ */ jsx4(PopoverPortal, { children: /* @__PURE__ */ jsx4(PopoverContent, { align: "start", children: /* @__PURE__ */ jsx4("ul", { className: getClassName4("items"), "data-puck-rte-menu": true, children: options.map((option) => {
1623
1795
  const Icon2 = option.icon;
1624
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
1796
+ return /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(
1625
1797
  Item,
1626
1798
  {
1627
1799
  isSelected: value === option.value,
@@ -1630,7 +1802,7 @@ var Select = ({
1630
1802
  setOpen(false);
1631
1803
  },
1632
1804
  children: [
1633
- Icon2 && /* @__PURE__ */ jsx("div", { className: getItemClassName("icon"), children: /* @__PURE__ */ jsx(Icon2, { size: 16 }) }),
1805
+ Icon2 && /* @__PURE__ */ jsx4("div", { className: getItemClassName("icon"), children: /* @__PURE__ */ jsx4(Icon2, { size: 16 }) }),
1634
1806
  option.label
1635
1807
  ]
1636
1808
  }
@@ -1642,7 +1814,7 @@ var Select = ({
1642
1814
  };
1643
1815
 
1644
1816
  // components/RichTextMenu/components/SelectControl/index.tsx
1645
- import { jsx as jsx2 } from "react/jsx-runtime";
1817
+ import { jsx as jsx5 } from "react/jsx-runtime";
1646
1818
  function SelectControl({
1647
1819
  renderDefaultIcon,
1648
1820
  onChange,
@@ -1660,7 +1832,7 @@ function SelectControl({
1660
1832
  [options]
1661
1833
  );
1662
1834
  const Node = (_b = value && ((_a = optionsByValue[value]) == null ? void 0 : _a.icon)) != null ? _b : renderDefaultIcon;
1663
- return /* @__PURE__ */ jsx2(
1835
+ return /* @__PURE__ */ jsx5(
1664
1836
  Select,
1665
1837
  {
1666
1838
  options,
@@ -1669,12 +1841,17 @@ function SelectControl({
1669
1841
  defaultValue,
1670
1842
  mode: inline ? "actionBar" : "standalone",
1671
1843
  disabled: readOnly,
1672
- children: /* @__PURE__ */ jsx2(Node, {})
1844
+ children: /* @__PURE__ */ jsx5(Node, {})
1673
1845
  }
1674
1846
  );
1675
1847
  }
1676
1848
 
1677
1849
  export {
1850
+ ActionBar,
1851
+ Action,
1852
+ Group,
1853
+ Label,
1854
+ Separator,
1678
1855
  AlignCenter,
1679
1856
  AlignJustify,
1680
1857
  AlignLeft,
@@ -1745,6 +1922,8 @@ export {
1745
1922
  useAppStoreApi,
1746
1923
  getBox,
1747
1924
  useResetAutoZoom,
1925
+ Loader,
1926
+ IconButton,
1748
1927
  ControlContext,
1749
1928
  useControlContext,
1750
1929
  SelectControl
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-HGJWUFLT.mjs";
4
- import "./chunk-DPDJ67KA.mjs";
5
- import "./chunk-ZMTK7SMX.mjs";
6
- import "./chunk-LODTL5KW.mjs";
7
- import "./chunk-O7FT3KAM.mjs";
8
- import "./chunk-6XCJ3Y7O.mjs";
9
- import "./chunk-4HOGLOEA.mjs";
3
+ } from "./chunk-4US666EQ.mjs";
4
+ import "./chunk-M5GPDW62.mjs";
5
+ import "./chunk-3RQGAM3Z.mjs";
6
+ import "./chunk-XIGSFEU7.mjs";
7
+ import "./chunk-XQHCQEAF.mjs";
8
+ import "./chunk-DVZWVU66.mjs";
9
+ import "./chunk-6MO3E35Y.mjs";
10
10
  import "./chunk-Y2EFNT5P.mjs";
11
11
  import "./chunk-SHVCBQDY.mjs";
12
12
  import {