@measured/puck 0.21.0-canary.f5820ce9 → 0.21.0-canary.fee2ba98

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/dist/Editor-EHVB6NFF.mjs +204 -0
  2. package/dist/Editor-F2LSS6SE.css +403 -0
  3. package/dist/Render-OFE6QLI2.mjs +55 -0
  4. package/dist/Render-QEMDIDQC.css +101 -0
  5. package/dist/{walk-tree-Ctf3FZQI.d.mts → actions-DwdqNb63.d.mts} +265 -75
  6. package/dist/{walk-tree-Ctf3FZQI.d.ts → actions-DwdqNb63.d.ts} +265 -75
  7. package/dist/chunk-2334PLLL.mjs +111 -0
  8. package/dist/chunk-4N3WJM5Y.mjs +33 -0
  9. package/dist/{chunk-AO6Y47WD.mjs → chunk-6AGLD64M.mjs} +4819 -6477
  10. package/dist/chunk-CSSRLPHM.mjs +11 -0
  11. package/dist/chunk-D6RJOV2Z.mjs +1727 -0
  12. package/dist/chunk-M6W7YEVX.mjs +95 -0
  13. package/dist/chunk-NLUHDYVR.mjs +416 -0
  14. package/dist/chunk-NQEE2254.mjs +706 -0
  15. package/dist/chunk-PXYVL42X.mjs +53 -0
  16. package/dist/chunk-QBGM4ELA.mjs +528 -0
  17. package/dist/chunk-QLQZDFXM.mjs +63 -0
  18. package/dist/chunk-T3WX7XJ6.mjs +132 -0
  19. package/dist/chunk-V5I7CVLT.mjs +103 -0
  20. package/dist/chunk-Y2EFNT5P.mjs +108 -0
  21. package/dist/chunk-Y656T6AQ.mjs +419 -0
  22. package/dist/full-2GJTAAZE.css +301 -0
  23. package/dist/full-TVZATY2K.mjs +93 -0
  24. package/dist/index-AfAtzigt.d.ts +117 -0
  25. package/dist/index-jxA1wrW4.d.mts +117 -0
  26. package/dist/index.css +278 -22
  27. package/dist/index.d.mts +99 -113
  28. package/dist/index.d.ts +99 -113
  29. package/dist/index.js +6647 -3315
  30. package/dist/index.mjs +26 -12
  31. package/dist/internal.d.mts +27 -0
  32. package/dist/internal.d.ts +27 -0
  33. package/dist/internal.js +908 -0
  34. package/dist/internal.mjs +13 -0
  35. package/dist/loaded-ICVILKS6.mjs +60 -0
  36. package/dist/loaded-IHAGHNLA.mjs +57 -0
  37. package/dist/loaded-ONU7LATV.mjs +57 -0
  38. package/dist/loaded-RVWBFK7L.css +87 -0
  39. package/dist/no-external.css +425 -165
  40. package/dist/no-external.d.mts +19 -2
  41. package/dist/no-external.d.ts +19 -2
  42. package/dist/no-external.js +6646 -3311
  43. package/dist/no-external.mjs +28 -9
  44. package/dist/rsc.css +101 -0
  45. package/dist/rsc.d.mts +17 -2
  46. package/dist/rsc.d.ts +17 -2
  47. package/dist/rsc.js +417 -30
  48. package/dist/rsc.mjs +18 -9
  49. package/dist/walk-tree-DRy9ca1P.d.ts +29 -0
  50. package/dist/walk-tree-Dppc3XGY.d.mts +29 -0
  51. package/package.json +31 -4
  52. package/dist/chunk-VBJEDLUM.mjs +0 -965
@@ -0,0 +1,13 @@
1
+ import {
2
+ createReducer
3
+ } from "./chunk-QBGM4ELA.mjs";
4
+ import "./chunk-NLUHDYVR.mjs";
5
+ import {
6
+ init_react_import
7
+ } from "./chunk-M6W7YEVX.mjs";
8
+
9
+ // bundle/internal.ts
10
+ init_react_import();
11
+ export {
12
+ createReducer
13
+ };
@@ -0,0 +1,60 @@
1
+ import {
2
+ useHeadingOptions
3
+ } from "./chunk-QLQZDFXM.mjs";
4
+ import {
5
+ Heading,
6
+ SelectControl,
7
+ useControlContext
8
+ } from "./chunk-D6RJOV2Z.mjs";
9
+ import "./chunk-QBGM4ELA.mjs";
10
+ import "./chunk-T3WX7XJ6.mjs";
11
+ import "./chunk-Y2EFNT5P.mjs";
12
+ import "./chunk-NLUHDYVR.mjs";
13
+ import {
14
+ init_react_import
15
+ } from "./chunk-M6W7YEVX.mjs";
16
+
17
+ // components/RichTextMenu/controls/HeadingSelect/loaded.tsx
18
+ init_react_import();
19
+ import { useEditorState } from "@tiptap/react";
20
+ import { jsx } from "react/jsx-runtime";
21
+ function HeadingSelectLoaded() {
22
+ const { options } = useControlContext();
23
+ const headingOptions = useHeadingOptions(options);
24
+ const { editor } = useControlContext();
25
+ const currentValue = useEditorState({
26
+ editor,
27
+ selector: (ctx) => {
28
+ var _a, _b;
29
+ if ((_a = ctx.editor) == null ? void 0 : _a.isActive("paragraph")) return "p";
30
+ for (let level = 1; level <= 6; level++) {
31
+ if ((_b = ctx.editor) == null ? void 0 : _b.isActive("heading", { level })) {
32
+ return `h${level}`;
33
+ }
34
+ }
35
+ return "p";
36
+ }
37
+ });
38
+ const handleChange = (val) => {
39
+ const chain = editor == null ? void 0 : editor.chain();
40
+ if (val === "p") {
41
+ chain == null ? void 0 : chain.focus().setParagraph().run();
42
+ } else {
43
+ const level = parseInt(val.replace("h", ""), 10);
44
+ chain == null ? void 0 : chain.focus().toggleHeading({ level }).run();
45
+ }
46
+ };
47
+ return /* @__PURE__ */ jsx(
48
+ SelectControl,
49
+ {
50
+ options: headingOptions,
51
+ onChange: handleChange,
52
+ value: currentValue != null ? currentValue : "p",
53
+ defaultValue: "p",
54
+ renderDefaultIcon: Heading
55
+ }
56
+ );
57
+ }
58
+ export {
59
+ HeadingSelectLoaded
60
+ };
@@ -0,0 +1,57 @@
1
+ import {
2
+ useListOptions
3
+ } from "./chunk-4N3WJM5Y.mjs";
4
+ import {
5
+ List,
6
+ SelectControl,
7
+ useControlContext
8
+ } from "./chunk-D6RJOV2Z.mjs";
9
+ import "./chunk-QBGM4ELA.mjs";
10
+ import "./chunk-T3WX7XJ6.mjs";
11
+ import "./chunk-Y2EFNT5P.mjs";
12
+ import "./chunk-NLUHDYVR.mjs";
13
+ import {
14
+ init_react_import
15
+ } from "./chunk-M6W7YEVX.mjs";
16
+
17
+ // components/RichTextMenu/controls/ListSelect/loaded.tsx
18
+ init_react_import();
19
+ import { useEditorState } from "@tiptap/react";
20
+ import { jsx } from "react/jsx-runtime";
21
+ function ListSelectLoaded() {
22
+ const { options } = useControlContext();
23
+ const listOptions = useListOptions(options);
24
+ const { editor } = useControlContext();
25
+ const currentValue = useEditorState({
26
+ editor,
27
+ selector: (ctx) => {
28
+ var _a, _b;
29
+ if ((_a = ctx.editor) == null ? void 0 : _a.isActive("bulletList")) return "ul";
30
+ if ((_b = ctx.editor) == null ? void 0 : _b.isActive("orderedList")) return "ol";
31
+ return "p";
32
+ }
33
+ });
34
+ const handleChange = (val) => {
35
+ const chain = editor == null ? void 0 : editor.chain();
36
+ if (val === "p") {
37
+ chain == null ? void 0 : chain.focus().setParagraph().run();
38
+ } else if (val === "ol") {
39
+ chain == null ? void 0 : chain.focus().toggleOrderedList().run();
40
+ } else if (val === "ul") {
41
+ chain == null ? void 0 : chain.focus().toggleBulletList().run();
42
+ }
43
+ };
44
+ return /* @__PURE__ */ jsx(
45
+ SelectControl,
46
+ {
47
+ options: listOptions,
48
+ onChange: handleChange,
49
+ value: currentValue != null ? currentValue : "p",
50
+ defaultValue: "p",
51
+ renderDefaultIcon: List
52
+ }
53
+ );
54
+ }
55
+ export {
56
+ ListSelectLoaded
57
+ };
@@ -0,0 +1,57 @@
1
+ import {
2
+ useAlignOptions
3
+ } from "./chunk-PXYVL42X.mjs";
4
+ import {
5
+ AlignLeft,
6
+ SelectControl,
7
+ useControlContext
8
+ } from "./chunk-D6RJOV2Z.mjs";
9
+ import "./chunk-QBGM4ELA.mjs";
10
+ import "./chunk-T3WX7XJ6.mjs";
11
+ import "./chunk-Y2EFNT5P.mjs";
12
+ import "./chunk-NLUHDYVR.mjs";
13
+ import {
14
+ init_react_import
15
+ } from "./chunk-M6W7YEVX.mjs";
16
+
17
+ // components/RichTextMenu/controls/AlignSelect/loaded.tsx
18
+ init_react_import();
19
+ import { useEditorState } from "@tiptap/react";
20
+ import { jsx } from "react/jsx-runtime";
21
+ function AlignSelectLoaded() {
22
+ var _a;
23
+ const { options } = useControlContext();
24
+ const alignOptions = useAlignOptions(options);
25
+ const { editor } = useControlContext();
26
+ const currentValue = (_a = useEditorState({
27
+ editor,
28
+ selector: (ctx) => {
29
+ var _a2, _b, _c, _d;
30
+ if ((_a2 = ctx.editor) == null ? void 0 : _a2.isActive({ textAlign: "center" })) {
31
+ return "center";
32
+ } else if ((_b = ctx.editor) == null ? void 0 : _b.isActive({ textAlign: "right" })) {
33
+ return "right";
34
+ } else if ((_c = ctx.editor) == null ? void 0 : _c.isActive({ textAlign: "justify" })) {
35
+ return "justify";
36
+ }
37
+ return (options == null ? void 0 : options.textAlign) ? (_d = options.textAlign.defaultAlignment) != null ? _d : "left" : "left";
38
+ }
39
+ })) != null ? _a : "left";
40
+ const handleChange = (val) => {
41
+ const chain = editor == null ? void 0 : editor.chain();
42
+ chain == null ? void 0 : chain.focus().setTextAlign(val).run();
43
+ };
44
+ return /* @__PURE__ */ jsx(
45
+ SelectControl,
46
+ {
47
+ options: alignOptions,
48
+ onChange: handleChange,
49
+ value: currentValue,
50
+ defaultValue: "left",
51
+ renderDefaultIcon: AlignLeft
52
+ }
53
+ );
54
+ }
55
+ export {
56
+ AlignSelectLoaded
57
+ };
@@ -0,0 +1,87 @@
1
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/Select/styles.module.css/#css-module-data */
2
+ ._Select_xjbef_1 {
3
+ position: relative;
4
+ z-index: 1;
5
+ }
6
+ ._Select-button_xjbef_6 {
7
+ align-items: center;
8
+ background: transparent;
9
+ border: none;
10
+ border-radius: 4px;
11
+ display: flex;
12
+ justify-content: center;
13
+ gap: 0px;
14
+ height: 100%;
15
+ padding: 4px;
16
+ padding-right: 2px;
17
+ }
18
+ ._Select--hasOptions_xjbef_19 ._Select-button_xjbef_6 {
19
+ color: currentColor;
20
+ }
21
+ ._Select--hasOptions_xjbef_19:not(._Select--disabled_xjbef_23) ._Select-button_xjbef_6 {
22
+ cursor: pointer;
23
+ }
24
+ ._Select-buttonIcon_xjbef_27 {
25
+ align-items: center;
26
+ display: flex;
27
+ justify-content: center;
28
+ }
29
+ ._Select--standalone_xjbef_33 ._Select-buttonIcon_xjbef_27 .lucide {
30
+ height: 18px;
31
+ width: 18px;
32
+ }
33
+ ._Select--actionBar_xjbef_38 ._Select-buttonIcon_xjbef_27 .lucide {
34
+ height: 16px;
35
+ width: 16px;
36
+ }
37
+ ._Select--hasOptions_xjbef_19:not(._Select--disabled_xjbef_23) ._Select-button_xjbef_6:hover,
38
+ ._Select--hasValue_xjbef_44 ._Select-button_xjbef_6 {
39
+ background: var(--puck-color-grey-10);
40
+ color: var(--puck-color-azure-04);
41
+ }
42
+ ._Select--disabled_xjbef_23 ._Select-button_xjbef_6 {
43
+ color: var(--puck-color-grey-07);
44
+ }
45
+ ._Select--actionBar_xjbef_38 {
46
+ &._Select--hasOptions_xjbef_19 ._Select-button_xjbef_6:hover,
47
+ &._Select--hasValue_xjbef_44 ._Select-button_xjbef_6 {
48
+ background: none;
49
+ color: var(--puck-color-azure-07);
50
+ }
51
+ }
52
+ ._Select-items_xjbef_61 {
53
+ background: white;
54
+ border: 1px solid var(--puck-color-grey-09);
55
+ border-radius: 8px;
56
+ margin: 10px 8px;
57
+ margin-left: 0;
58
+ padding: 4px;
59
+ z-index: 2;
60
+ list-style: none;
61
+ }
62
+ ._SelectItem_xjbef_72 {
63
+ background: transparent;
64
+ border-radius: 4px;
65
+ border: none;
66
+ color: var(--puck-color-grey-04);
67
+ cursor: pointer;
68
+ display: flex;
69
+ gap: 8px;
70
+ align-items: center;
71
+ font-size: var(--puck-font-size-xxs);
72
+ margin: 0;
73
+ padding: 8px 12px;
74
+ width: 100%;
75
+ }
76
+ ._SelectItem--isSelected_xjbef_87 {
77
+ background: var(--puck-color-azure-11);
78
+ color: var(--puck-color-azure-04);
79
+ font-weight: 500;
80
+ }
81
+ ._SelectItem--isSelected_xjbef_87 ._SelectItem-icon_xjbef_93 {
82
+ color: var(--puck-color-azure-04);
83
+ }
84
+ ._SelectItem_xjbef_72:hover {
85
+ background: var(--puck-color-azure-11);
86
+ color: var(--puck-color-azure-04);
87
+ }