@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
package/dist/index.mjs CHANGED
@@ -1,34 +1,45 @@
1
1
  import {
2
- Action,
3
- ActionBar,
4
2
  AutoField,
5
3
  Button,
6
4
  Drawer,
7
5
  DropZone,
8
6
  FieldLabel,
9
- Group,
10
- IconButton,
11
- Label,
12
7
  Puck,
13
8
  Render,
14
- blocksPlugin,
15
9
  createUsePuck,
16
- fieldsPlugin,
17
- outlinePlugin,
18
10
  overrideKeys,
19
11
  registerOverlayPortal,
20
12
  renderContext,
21
13
  setDeep,
22
14
  useGetPuck,
23
15
  usePuck
24
- } from "./chunk-QOZ6ZSWO.mjs";
16
+ } from "./chunk-N5XMZOMC.mjs";
25
17
  import {
26
- init_react_import,
27
18
  migrate,
28
19
  resolveAllData,
29
- transformProps,
20
+ transformProps
21
+ } from "./chunk-C2TVYIYC.mjs";
22
+ import "./chunk-FNWOH4R6.mjs";
23
+ import "./chunk-WUWXFMEM.mjs";
24
+ import {
25
+ Action,
26
+ ActionBar,
27
+ Group,
28
+ IconButton,
29
+ Label,
30
+ RichTextMenu,
31
+ Separator
32
+ } from "./chunk-K3V4LVUL.mjs";
33
+ import "./chunk-GQKMOYLG.mjs";
34
+ import "./chunk-DNF2EMM4.mjs";
35
+ import "./chunk-3QHWXJEI.mjs";
36
+ import "./chunk-7KY6RHEY.mjs";
37
+ import {
30
38
  walkTree
31
- } from "./chunk-IDP5ATXM.mjs";
39
+ } from "./chunk-DJSH5REF.mjs";
40
+ import {
41
+ init_react_import
42
+ } from "./chunk-DCSQEDMK.mjs";
32
43
 
33
44
  // bundle/index.ts
34
45
  init_react_import();
@@ -45,11 +56,10 @@ export {
45
56
  Label,
46
57
  Puck,
47
58
  Render,
48
- blocksPlugin,
59
+ RichTextMenu,
60
+ Separator,
49
61
  createUsePuck,
50
- fieldsPlugin,
51
62
  migrate,
52
- outlinePlugin,
53
63
  overrideKeys,
54
64
  registerOverlayPortal,
55
65
  renderContext,
@@ -0,0 +1,57 @@
1
+ import {
2
+ useHeadingOptions
3
+ } from "./chunk-DNF2EMM4.mjs";
4
+ import {
5
+ Heading,
6
+ SelectControl,
7
+ useControlContext
8
+ } from "./chunk-7KY6RHEY.mjs";
9
+ import "./chunk-DJSH5REF.mjs";
10
+ import {
11
+ init_react_import
12
+ } from "./chunk-DCSQEDMK.mjs";
13
+
14
+ // components/RichTextMenu/controls/HeadingSelect/loaded.tsx
15
+ init_react_import();
16
+ import { useEditorState } from "@tiptap/react";
17
+ import { jsx } from "react/jsx-runtime";
18
+ function HeadingSelectLoaded() {
19
+ const { options } = useControlContext();
20
+ const headingOptions = useHeadingOptions(options);
21
+ const { editor } = useControlContext();
22
+ const currentValue = useEditorState({
23
+ editor,
24
+ selector: (ctx) => {
25
+ var _a, _b;
26
+ if ((_a = ctx.editor) == null ? void 0 : _a.isActive("paragraph")) return "p";
27
+ for (let level = 1; level <= 6; level++) {
28
+ if ((_b = ctx.editor) == null ? void 0 : _b.isActive("heading", { level })) {
29
+ return `h${level}`;
30
+ }
31
+ }
32
+ return "p";
33
+ }
34
+ });
35
+ const handleChange = (val) => {
36
+ const chain = editor == null ? void 0 : editor.chain();
37
+ if (val === "p") {
38
+ chain == null ? void 0 : chain.focus().setParagraph().run();
39
+ } else {
40
+ const level = parseInt(val.replace("h", ""), 10);
41
+ chain == null ? void 0 : chain.focus().toggleHeading({ level }).run();
42
+ }
43
+ };
44
+ return /* @__PURE__ */ jsx(
45
+ SelectControl,
46
+ {
47
+ options: headingOptions,
48
+ onChange: handleChange,
49
+ value: currentValue != null ? currentValue : "p",
50
+ defaultValue: "p",
51
+ renderDefaultIcon: Heading
52
+ }
53
+ );
54
+ }
55
+ export {
56
+ HeadingSelectLoaded
57
+ };
@@ -0,0 +1,54 @@
1
+ import {
2
+ useListOptions
3
+ } from "./chunk-3QHWXJEI.mjs";
4
+ import {
5
+ List,
6
+ SelectControl,
7
+ useControlContext
8
+ } from "./chunk-7KY6RHEY.mjs";
9
+ import "./chunk-DJSH5REF.mjs";
10
+ import {
11
+ init_react_import
12
+ } from "./chunk-DCSQEDMK.mjs";
13
+
14
+ // components/RichTextMenu/controls/ListSelect/loaded.tsx
15
+ init_react_import();
16
+ import { useEditorState } from "@tiptap/react";
17
+ import { jsx } from "react/jsx-runtime";
18
+ function ListSelectLoaded() {
19
+ const { options } = useControlContext();
20
+ const listOptions = useListOptions(options);
21
+ const { editor } = useControlContext();
22
+ const currentValue = useEditorState({
23
+ editor,
24
+ selector: (ctx) => {
25
+ var _a, _b;
26
+ if ((_a = ctx.editor) == null ? void 0 : _a.isActive("bulletList")) return "ul";
27
+ if ((_b = ctx.editor) == null ? void 0 : _b.isActive("orderedList")) return "ol";
28
+ return "p";
29
+ }
30
+ });
31
+ const handleChange = (val) => {
32
+ const chain = editor == null ? void 0 : editor.chain();
33
+ if (val === "p") {
34
+ chain == null ? void 0 : chain.focus().setParagraph().run();
35
+ } else if (val === "ol") {
36
+ chain == null ? void 0 : chain.focus().toggleOrderedList().run();
37
+ } else if (val === "ul") {
38
+ chain == null ? void 0 : chain.focus().toggleBulletList().run();
39
+ }
40
+ };
41
+ return /* @__PURE__ */ jsx(
42
+ SelectControl,
43
+ {
44
+ options: listOptions,
45
+ onChange: handleChange,
46
+ value: currentValue != null ? currentValue : "p",
47
+ defaultValue: "p",
48
+ renderDefaultIcon: List
49
+ }
50
+ );
51
+ }
52
+ export {
53
+ ListSelectLoaded
54
+ };
@@ -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
+ }
@@ -0,0 +1,54 @@
1
+ import {
2
+ useAlignOptions
3
+ } from "./chunk-GQKMOYLG.mjs";
4
+ import {
5
+ AlignLeft,
6
+ SelectControl,
7
+ useControlContext
8
+ } from "./chunk-7KY6RHEY.mjs";
9
+ import "./chunk-DJSH5REF.mjs";
10
+ import {
11
+ init_react_import
12
+ } from "./chunk-DCSQEDMK.mjs";
13
+
14
+ // components/RichTextMenu/controls/AlignSelect/loaded.tsx
15
+ init_react_import();
16
+ import { useEditorState } from "@tiptap/react";
17
+ import { jsx } from "react/jsx-runtime";
18
+ function AlignSelectLoaded() {
19
+ var _a;
20
+ const { options } = useControlContext();
21
+ const alignOptions = useAlignOptions(options);
22
+ const { editor } = useControlContext();
23
+ const currentValue = (_a = useEditorState({
24
+ editor,
25
+ selector: (ctx) => {
26
+ var _a2, _b, _c, _d;
27
+ if ((_a2 = ctx.editor) == null ? void 0 : _a2.isActive({ textAlign: "center" })) {
28
+ return "center";
29
+ } else if ((_b = ctx.editor) == null ? void 0 : _b.isActive({ textAlign: "right" })) {
30
+ return "right";
31
+ } else if ((_c = ctx.editor) == null ? void 0 : _c.isActive({ textAlign: "justify" })) {
32
+ return "justify";
33
+ }
34
+ return (options == null ? void 0 : options.textAlign) ? (_d = options.textAlign.defaultAlignment) != null ? _d : "left" : "left";
35
+ }
36
+ })) != null ? _a : "left";
37
+ const handleChange = (val) => {
38
+ const chain = editor == null ? void 0 : editor.chain();
39
+ chain == null ? void 0 : chain.focus().setTextAlign(val).run();
40
+ };
41
+ return /* @__PURE__ */ jsx(
42
+ SelectControl,
43
+ {
44
+ options: alignOptions,
45
+ onChange: handleChange,
46
+ value: currentValue,
47
+ defaultValue: "left",
48
+ renderDefaultIcon: AlignLeft
49
+ }
50
+ );
51
+ }
52
+ export {
53
+ AlignSelectLoaded
54
+ };