@measured/puck 0.21.0-canary.5333fc7e → 0.21.0-canary.56be3202
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.
- package/dist/Editor-CYTATURR.mjs +204 -0
- package/dist/Editor-F2LSS6SE.css +403 -0
- package/dist/Render-OFE6QLI2.mjs +55 -0
- package/dist/Render-QEMDIDQC.css +101 -0
- package/dist/{walk-tree-Ctf3FZQI.d.mts → actions-tsxxcX1z.d.mts} +285 -82
- package/dist/{walk-tree-Ctf3FZQI.d.ts → actions-tsxxcX1z.d.ts} +285 -82
- package/dist/chunk-72SA22GI.mjs +134 -0
- package/dist/chunk-CSSRLPHM.mjs +11 -0
- package/dist/chunk-M4QBB3JM.mjs +111 -0
- package/dist/chunk-M6W7YEVX.mjs +95 -0
- package/dist/chunk-MLTVJA2A.mjs +63 -0
- package/dist/chunk-MVJKIFF6.mjs +419 -0
- package/dist/chunk-NLUHDYVR.mjs +416 -0
- package/dist/chunk-NOJQSXRU.mjs +33 -0
- package/dist/{chunk-KNAV6QTS.mjs → chunk-PZ4SED7H.mjs} +5734 -7058
- package/dist/chunk-QBGM4ELA.mjs +528 -0
- package/dist/chunk-UNQOU2OI.mjs +53 -0
- package/dist/chunk-UUOBSXZR.mjs +1807 -0
- package/dist/chunk-V5I7CVLT.mjs +103 -0
- package/dist/chunk-V7333LON.mjs +708 -0
- package/dist/chunk-Y2EFNT5P.mjs +108 -0
- package/dist/full-2GJTAAZE.css +301 -0
- package/dist/full-GZ4L3XCF.mjs +93 -0
- package/dist/index-Ca6V6NQD.d.ts +118 -0
- package/dist/index-mQvUCH3C.d.mts +118 -0
- package/dist/index.css +1030 -384
- package/dist/index.d.mts +116 -114
- package/dist/index.d.ts +116 -114
- package/dist/index.js +8757 -4948
- package/dist/index.mjs +34 -12
- package/dist/internal.d.mts +27 -0
- package/dist/internal.d.ts +27 -0
- package/dist/internal.js +908 -0
- package/dist/internal.mjs +13 -0
- package/dist/loaded-2MNXXPJP.mjs +57 -0
- package/dist/loaded-6QT4HD2O.mjs +57 -0
- package/dist/loaded-RVWBFK7L.css +87 -0
- package/dist/loaded-ZVPBQVNE.mjs +60 -0
- package/dist/no-external.css +1163 -513
- package/dist/no-external.d.mts +19 -2
- package/dist/no-external.d.ts +19 -2
- package/dist/no-external.js +8759 -4947
- package/dist/no-external.mjs +36 -9
- package/dist/rsc.css +101 -0
- package/dist/rsc.d.mts +17 -2
- package/dist/rsc.d.ts +17 -2
- package/dist/rsc.js +421 -32
- package/dist/rsc.mjs +18 -9
- package/dist/walk-tree-Bh85NMeo.d.ts +29 -0
- package/dist/walk-tree-CDA3K5S3.d.mts +29 -0
- package/package.json +31 -4
- package/dist/chunk-X7YZ3YE7.mjs +0 -964
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues,
|
|
3
|
+
init_react_import
|
|
4
|
+
} from "./chunk-M6W7YEVX.mjs";
|
|
5
|
+
|
|
6
|
+
// components/RichTextEditor/extension.ts
|
|
7
|
+
init_react_import();
|
|
8
|
+
import { Extension } from "@tiptap/core";
|
|
9
|
+
import { Blockquote } from "@tiptap/extension-blockquote";
|
|
10
|
+
import { Bold } from "@tiptap/extension-bold";
|
|
11
|
+
import { Code } from "@tiptap/extension-code";
|
|
12
|
+
import { CodeBlock } from "@tiptap/extension-code-block";
|
|
13
|
+
import { Document } from "@tiptap/extension-document";
|
|
14
|
+
import { HardBreak } from "@tiptap/extension-hard-break";
|
|
15
|
+
import { Heading } from "@tiptap/extension-heading";
|
|
16
|
+
import { HorizontalRule } from "@tiptap/extension-horizontal-rule";
|
|
17
|
+
import { Italic } from "@tiptap/extension-italic";
|
|
18
|
+
import { Link } from "@tiptap/extension-link";
|
|
19
|
+
import {
|
|
20
|
+
BulletList,
|
|
21
|
+
ListItem,
|
|
22
|
+
ListKeymap,
|
|
23
|
+
OrderedList
|
|
24
|
+
} from "@tiptap/extension-list";
|
|
25
|
+
import { Paragraph } from "@tiptap/extension-paragraph";
|
|
26
|
+
import { Strike } from "@tiptap/extension-strike";
|
|
27
|
+
import { Text } from "@tiptap/extension-text";
|
|
28
|
+
import TextAlign from "@tiptap/extension-text-align";
|
|
29
|
+
import { Underline } from "@tiptap/extension-underline";
|
|
30
|
+
var defaultPuckRichTextOptions = {
|
|
31
|
+
textAlign: {
|
|
32
|
+
types: ["heading", "paragraph"]
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var PuckRichText = Extension.create({
|
|
36
|
+
name: "puckRichText",
|
|
37
|
+
addExtensions() {
|
|
38
|
+
const extensions = [];
|
|
39
|
+
const options = __spreadValues(__spreadValues({}, this.options), defaultPuckRichTextOptions);
|
|
40
|
+
if (options.bold !== false) {
|
|
41
|
+
extensions.push(Bold.configure(options.bold));
|
|
42
|
+
}
|
|
43
|
+
if (options.blockquote !== false) {
|
|
44
|
+
extensions.push(Blockquote.configure(options.blockquote));
|
|
45
|
+
}
|
|
46
|
+
if (options.bulletList !== false) {
|
|
47
|
+
extensions.push(BulletList.configure(options.bulletList));
|
|
48
|
+
}
|
|
49
|
+
if (options.code !== false) {
|
|
50
|
+
extensions.push(Code.configure(options.code));
|
|
51
|
+
}
|
|
52
|
+
if (options.codeBlock !== false) {
|
|
53
|
+
extensions.push(CodeBlock.configure(options.codeBlock));
|
|
54
|
+
}
|
|
55
|
+
if (options.document !== false) {
|
|
56
|
+
extensions.push(Document.configure(options.document));
|
|
57
|
+
}
|
|
58
|
+
if (options.hardBreak !== false) {
|
|
59
|
+
extensions.push(HardBreak.configure(options.hardBreak));
|
|
60
|
+
}
|
|
61
|
+
if (options.heading !== false) {
|
|
62
|
+
extensions.push(Heading.configure(options.heading));
|
|
63
|
+
}
|
|
64
|
+
if (options.horizontalRule !== false) {
|
|
65
|
+
extensions.push(HorizontalRule.configure(options.horizontalRule));
|
|
66
|
+
}
|
|
67
|
+
if (options.italic !== false) {
|
|
68
|
+
extensions.push(Italic.configure(options.italic));
|
|
69
|
+
}
|
|
70
|
+
if (options.listItem !== false) {
|
|
71
|
+
extensions.push(ListItem.configure(options.listItem));
|
|
72
|
+
}
|
|
73
|
+
if (options.listKeymap !== false) {
|
|
74
|
+
extensions.push(ListKeymap.configure(options == null ? void 0 : options.listKeymap));
|
|
75
|
+
}
|
|
76
|
+
if (options.link !== false) {
|
|
77
|
+
extensions.push(Link.configure(options == null ? void 0 : options.link));
|
|
78
|
+
}
|
|
79
|
+
if (options.orderedList !== false) {
|
|
80
|
+
extensions.push(OrderedList.configure(options.orderedList));
|
|
81
|
+
}
|
|
82
|
+
if (options.paragraph !== false) {
|
|
83
|
+
extensions.push(Paragraph.configure(options.paragraph));
|
|
84
|
+
}
|
|
85
|
+
if (options.strike !== false) {
|
|
86
|
+
extensions.push(Strike.configure(options.strike));
|
|
87
|
+
}
|
|
88
|
+
if (options.text !== false) {
|
|
89
|
+
extensions.push(Text.configure(options.text));
|
|
90
|
+
}
|
|
91
|
+
if (options.textAlign !== false) {
|
|
92
|
+
extensions.push(TextAlign.configure(options.textAlign));
|
|
93
|
+
}
|
|
94
|
+
if (options.underline !== false) {
|
|
95
|
+
extensions.push(Underline.configure(options == null ? void 0 : options.underline));
|
|
96
|
+
}
|
|
97
|
+
return extensions;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
PuckRichText
|
|
103
|
+
};
|