@measured/puck 0.21.0-canary.7ed9655b → 0.21.0-canary.8358d3e1

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 (41) hide show
  1. package/dist/Editor-F2LSS6SE.css +403 -0
  2. package/dist/Editor-N46HUQEC.mjs +201 -0
  3. package/dist/Render-QEMDIDQC.css +101 -0
  4. package/dist/Render-Y567PGZ7.mjs +53 -0
  5. package/dist/chunk-3QHWXJEI.mjs +33 -0
  6. package/dist/chunk-7KY6RHEY.mjs +2230 -0
  7. package/dist/chunk-C2TVYIYC.mjs +415 -0
  8. package/dist/chunk-DCSQEDMK.mjs +194 -0
  9. package/dist/chunk-DJSH5REF.mjs +537 -0
  10. package/dist/chunk-DNF2EMM4.mjs +63 -0
  11. package/dist/chunk-FNWOH4R6.mjs +109 -0
  12. package/dist/chunk-GQKMOYLG.mjs +53 -0
  13. package/dist/chunk-K3V4LVUL.mjs +704 -0
  14. package/dist/{chunk-QOZ6ZSWO.mjs → chunk-N5XMZOMC.mjs} +4383 -6689
  15. package/dist/chunk-R6CVX2IY.mjs +103 -0
  16. package/dist/chunk-WUWXFMEM.mjs +11 -0
  17. package/dist/full-2GJTAAZE.css +301 -0
  18. package/dist/full-NLUNPJWS.mjs +90 -0
  19. package/dist/index.css +636 -759
  20. package/dist/index.d.mts +99 -20
  21. package/dist/index.d.ts +99 -20
  22. package/dist/index.js +7840 -5142
  23. package/dist/index.mjs +25 -15
  24. package/dist/loaded-EV34KGYJ.mjs +57 -0
  25. package/dist/loaded-HMSPJUZM.mjs +54 -0
  26. package/dist/loaded-RVWBFK7L.css +87 -0
  27. package/dist/loaded-ZXOU6S6R.mjs +54 -0
  28. package/dist/no-external.css +636 -759
  29. package/dist/no-external.d.mts +17 -2
  30. package/dist/no-external.d.ts +17 -2
  31. package/dist/no-external.js +7840 -5142
  32. package/dist/no-external.mjs +25 -15
  33. package/dist/rsc.css +101 -0
  34. package/dist/rsc.d.mts +17 -2
  35. package/dist/rsc.d.ts +17 -2
  36. package/dist/rsc.js +409 -25
  37. package/dist/rsc.mjs +16 -9
  38. package/dist/{walk-tree-CI7CLsRf.d.mts → walk-tree-Ja9bNCM9.d.mts} +209 -23
  39. package/dist/{walk-tree-CI7CLsRf.d.ts → walk-tree-Ja9bNCM9.d.ts} +209 -23
  40. package/package.json +23 -1
  41. package/dist/chunk-IDP5ATXM.mjs +0 -968
@@ -0,0 +1,53 @@
1
+ import {
2
+ AlignCenter,
3
+ AlignJustify,
4
+ AlignLeft,
5
+ AlignRight
6
+ } from "./chunk-7KY6RHEY.mjs";
7
+ import {
8
+ init_react_import
9
+ } from "./chunk-DCSQEDMK.mjs";
10
+
11
+ // components/RichTextMenu/controls/AlignSelect/use-options.ts
12
+ init_react_import();
13
+ 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 }
19
+ };
20
+ var useAlignOptions = (fieldOptions) => {
21
+ var _a;
22
+ let blockOptions = [];
23
+ if ((fieldOptions == null ? void 0 : fieldOptions.textAlign) !== false) {
24
+ if (!((_a = fieldOptions == null ? void 0 : fieldOptions.textAlign) == null ? void 0 : _a.alignments)) {
25
+ blockOptions = ["left", "center", "right", "justify"];
26
+ } else {
27
+ if (fieldOptions == null ? void 0 : fieldOptions.textAlign.alignments.includes("left")) {
28
+ blockOptions.push("left");
29
+ }
30
+ if (fieldOptions == null ? void 0 : fieldOptions.textAlign.alignments.includes("center")) {
31
+ blockOptions.push("center");
32
+ }
33
+ if (fieldOptions == null ? void 0 : fieldOptions.textAlign.alignments.includes("right")) {
34
+ blockOptions.push("right");
35
+ }
36
+ if (fieldOptions == null ? void 0 : fieldOptions.textAlign.alignments.includes("justify")) {
37
+ blockOptions.push("justify");
38
+ }
39
+ }
40
+ }
41
+ return useMemo(
42
+ () => blockOptions.map((item) => ({
43
+ value: item,
44
+ label: optionNodes[item].label,
45
+ icon: optionNodes[item].icon
46
+ })),
47
+ [blockOptions]
48
+ );
49
+ };
50
+
51
+ export {
52
+ useAlignOptions
53
+ };