@crediblemark/build 0.22.0

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/LICENSE +21 -0
  2. package/dist/Editor-XZF6CWVW.css +404 -0
  3. package/dist/Editor-ZC67OU2A.mjs +205 -0
  4. package/dist/Render-JBFI6HYN.mjs +55 -0
  5. package/dist/Render-WCX4AXOX.css +102 -0
  6. package/dist/actions-CEH_5LMY.d.mts +838 -0
  7. package/dist/actions-CEH_5LMY.d.ts +838 -0
  8. package/dist/chunk-3AJBFQU4.mjs +560 -0
  9. package/dist/chunk-4SQOX3ZQ.mjs +476 -0
  10. package/dist/chunk-B4BOBGYB.mjs +42 -0
  11. package/dist/chunk-CDMESQDA.mjs +148 -0
  12. package/dist/chunk-DSXRK4QJ.mjs +704 -0
  13. package/dist/chunk-GUJDGRSM.mjs +469 -0
  14. package/dist/chunk-HHBUU7WF.mjs +35 -0
  15. package/dist/chunk-IJHL7BIR.mjs +11 -0
  16. package/dist/chunk-PHGC6QYB.mjs +105 -0
  17. package/dist/chunk-QF3GD5WQ.mjs +65 -0
  18. package/dist/chunk-U2NVBXAC.mjs +2064 -0
  19. package/dist/chunk-VFD76OD5.mjs +55 -0
  20. package/dist/chunk-VGDMWS44.mjs +107 -0
  21. package/dist/chunk-VKBVSWU3.mjs +8538 -0
  22. package/dist/chunk-YH7AXYKP.mjs +109 -0
  23. package/dist/full-ABQQRJAO.css +301 -0
  24. package/dist/full-LJRK5736.mjs +94 -0
  25. package/dist/index-CkSfgrvw.d.ts +117 -0
  26. package/dist/index-Cxwg4vUV.d.mts +117 -0
  27. package/dist/index.css +2576 -0
  28. package/dist/index.d.mts +310 -0
  29. package/dist/index.d.ts +310 -0
  30. package/dist/index.js +15012 -0
  31. package/dist/index.mjs +83 -0
  32. package/dist/internal.d.mts +27 -0
  33. package/dist/internal.d.ts +27 -0
  34. package/dist/internal.js +960 -0
  35. package/dist/internal.mjs +13 -0
  36. package/dist/loaded-DWCENJKQ.mjs +55 -0
  37. package/dist/loaded-N7VXUR4O.mjs +59 -0
  38. package/dist/loaded-NE2PIHUQ.mjs +56 -0
  39. package/dist/loaded-SMEIWWHS.css +87 -0
  40. package/dist/no-external.css +2574 -0
  41. package/dist/no-external.d.mts +21 -0
  42. package/dist/no-external.d.ts +21 -0
  43. package/dist/no-external.js +15012 -0
  44. package/dist/no-external.mjs +83 -0
  45. package/dist/rsc.css +102 -0
  46. package/dist/rsc.d.mts +27 -0
  47. package/dist/rsc.d.ts +27 -0
  48. package/dist/rsc.js +1466 -0
  49. package/dist/rsc.mjs +147 -0
  50. package/dist/walk-tree-B4ZvMfxS.d.ts +29 -0
  51. package/dist/walk-tree-C78ZVz19.d.mts +29 -0
  52. package/package.json +145 -0
@@ -0,0 +1,13 @@
1
+ import {
2
+ createReducer
3
+ } from "./chunk-3AJBFQU4.mjs";
4
+ import "./chunk-GUJDGRSM.mjs";
5
+ import {
6
+ init_react_import
7
+ } from "./chunk-B4BOBGYB.mjs";
8
+
9
+ // bundle/internal.ts
10
+ init_react_import();
11
+ export {
12
+ createReducer
13
+ };
@@ -0,0 +1,55 @@
1
+ import {
2
+ useAlignOptions
3
+ } from "./chunk-VFD76OD5.mjs";
4
+ import {
5
+ SelectControl,
6
+ TextAlignStart,
7
+ useControlContext
8
+ } from "./chunk-U2NVBXAC.mjs";
9
+ import "./chunk-3AJBFQU4.mjs";
10
+ import "./chunk-CDMESQDA.mjs";
11
+ import "./chunk-YH7AXYKP.mjs";
12
+ import "./chunk-GUJDGRSM.mjs";
13
+ import {
14
+ init_react_import
15
+ } from "./chunk-B4BOBGYB.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
+ const { options } = useControlContext();
23
+ const alignOptions = useAlignOptions(options);
24
+ const { editor } = useControlContext();
25
+ const currentValue = useEditorState({
26
+ editor,
27
+ selector: (ctx) => {
28
+ if (ctx.editor?.isActive({ textAlign: "center" })) {
29
+ return "center";
30
+ } else if (ctx.editor?.isActive({ textAlign: "right" })) {
31
+ return "right";
32
+ } else if (ctx.editor?.isActive({ textAlign: "justify" })) {
33
+ return "justify";
34
+ }
35
+ return options?.textAlign ? options.textAlign.defaultAlignment ?? "left" : "left";
36
+ }
37
+ }) ?? "left";
38
+ const handleChange = (val) => {
39
+ const chain = editor?.chain();
40
+ chain?.focus().setTextAlign(val).run();
41
+ };
42
+ return /* @__PURE__ */ jsx(
43
+ SelectControl,
44
+ {
45
+ options: alignOptions,
46
+ onChange: handleChange,
47
+ value: currentValue,
48
+ defaultValue: "left",
49
+ renderDefaultIcon: TextAlignStart
50
+ }
51
+ );
52
+ }
53
+ export {
54
+ AlignSelectLoaded
55
+ };
@@ -0,0 +1,59 @@
1
+ import {
2
+ useHeadingOptions
3
+ } from "./chunk-QF3GD5WQ.mjs";
4
+ import {
5
+ Heading,
6
+ SelectControl,
7
+ useControlContext
8
+ } from "./chunk-U2NVBXAC.mjs";
9
+ import "./chunk-3AJBFQU4.mjs";
10
+ import "./chunk-CDMESQDA.mjs";
11
+ import "./chunk-YH7AXYKP.mjs";
12
+ import "./chunk-GUJDGRSM.mjs";
13
+ import {
14
+ init_react_import
15
+ } from "./chunk-B4BOBGYB.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
+ if (ctx.editor?.isActive("paragraph")) return "p";
29
+ for (let level = 1; level <= 6; level++) {
30
+ if (ctx.editor?.isActive("heading", { level })) {
31
+ return `h${level}`;
32
+ }
33
+ }
34
+ return "p";
35
+ }
36
+ });
37
+ const handleChange = (val) => {
38
+ const chain = editor?.chain();
39
+ if (val === "p") {
40
+ chain?.focus().setParagraph().run();
41
+ } else {
42
+ const level = parseInt(val.replace("h", ""), 10);
43
+ chain?.focus().toggleHeading({ level }).run();
44
+ }
45
+ };
46
+ return /* @__PURE__ */ jsx(
47
+ SelectControl,
48
+ {
49
+ options: headingOptions,
50
+ onChange: handleChange,
51
+ value: currentValue ?? "p",
52
+ defaultValue: "p",
53
+ renderDefaultIcon: Heading
54
+ }
55
+ );
56
+ }
57
+ export {
58
+ HeadingSelectLoaded
59
+ };
@@ -0,0 +1,56 @@
1
+ import {
2
+ useListOptions
3
+ } from "./chunk-HHBUU7WF.mjs";
4
+ import {
5
+ List,
6
+ SelectControl,
7
+ useControlContext
8
+ } from "./chunk-U2NVBXAC.mjs";
9
+ import "./chunk-3AJBFQU4.mjs";
10
+ import "./chunk-CDMESQDA.mjs";
11
+ import "./chunk-YH7AXYKP.mjs";
12
+ import "./chunk-GUJDGRSM.mjs";
13
+ import {
14
+ init_react_import
15
+ } from "./chunk-B4BOBGYB.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
+ if (ctx.editor?.isActive("bulletList")) return "ul";
29
+ if (ctx.editor?.isActive("orderedList")) return "ol";
30
+ return "p";
31
+ }
32
+ });
33
+ const handleChange = (val) => {
34
+ const chain = editor?.chain();
35
+ if (val === "p") {
36
+ chain?.focus().setParagraph().run();
37
+ } else if (val === "ol") {
38
+ chain?.focus().toggleOrderedList().run();
39
+ } else if (val === "ul") {
40
+ chain?.focus().toggleBulletList().run();
41
+ }
42
+ };
43
+ return /* @__PURE__ */ jsx(
44
+ SelectControl,
45
+ {
46
+ options: listOptions,
47
+ onChange: handleChange,
48
+ value: currentValue ?? "p",
49
+ defaultValue: "p",
50
+ renderDefaultIcon: List
51
+ }
52
+ );
53
+ }
54
+ export {
55
+ ListSelectLoaded
56
+ };
@@ -0,0 +1,87 @@
1
+ /* css-module:/home/crediblemark/Project/NEXT_CMS/packages/components/Select/styles.module.css/#css-module-data */
2
+ ._Select_16son_1 {
3
+ position: relative;
4
+ z-index: 1;
5
+ }
6
+ ._Select-button_16son_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_16son_19 ._Select-button_16son_6 {
19
+ color: currentColor;
20
+ }
21
+ ._Select--hasOptions_16son_19:not(._Select--disabled_16son_23) ._Select-button_16son_6 {
22
+ cursor: pointer;
23
+ }
24
+ ._Select-buttonIcon_16son_27 {
25
+ align-items: center;
26
+ display: flex;
27
+ justify-content: center;
28
+ }
29
+ ._Select--standalone_16son_33 ._Select-buttonIcon_16son_27 .lucide {
30
+ height: 18px;
31
+ width: 18px;
32
+ }
33
+ ._Select--actionBar_16son_38 ._Select-buttonIcon_16son_27 .lucide {
34
+ height: 16px;
35
+ width: 16px;
36
+ }
37
+ ._Select--hasOptions_16son_19:not(._Select--disabled_16son_23) ._Select-button_16son_6:hover,
38
+ ._Select--hasValue_16son_44 ._Select-button_16son_6 {
39
+ background: var(--credbuild-color-grey-10);
40
+ color: var(--credbuild-color-azure-04);
41
+ }
42
+ ._Select--disabled_16son_23 ._Select-button_16son_6 {
43
+ color: var(--credbuild-color-grey-07);
44
+ }
45
+ ._Select--actionBar_16son_38 {
46
+ &._Select--hasOptions_16son_19 ._Select-button_16son_6:hover,
47
+ &._Select--hasValue_16son_44 ._Select-button_16son_6 {
48
+ background: none;
49
+ color: var(--credbuild-color-azure-07);
50
+ }
51
+ }
52
+ ._Select-items_16son_61 {
53
+ background: white;
54
+ border: 1px solid var(--credbuild-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_16son_72 {
63
+ background: transparent;
64
+ border-radius: 4px;
65
+ border: none;
66
+ color: var(--credbuild-color-grey-04);
67
+ cursor: pointer;
68
+ display: flex;
69
+ gap: 8px;
70
+ align-items: center;
71
+ font-size: var(--credbuild-font-size-xxs);
72
+ margin: 0;
73
+ padding: 8px 12px;
74
+ width: 100%;
75
+ }
76
+ ._SelectItem--isSelected_16son_87 {
77
+ background: var(--credbuild-color-azure-11);
78
+ color: var(--credbuild-color-azure-04);
79
+ font-weight: 500;
80
+ }
81
+ ._SelectItem--isSelected_16son_87 ._SelectItem-icon_16son_93 {
82
+ color: var(--credbuild-color-azure-04);
83
+ }
84
+ ._SelectItem_16son_72:hover {
85
+ background: var(--credbuild-color-azure-11);
86
+ color: var(--credbuild-color-azure-04);
87
+ }