@measured/puck 0.21.0-canary.af48a401 → 0.21.0-canary.b353d921
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-F2LSS6SE.css +403 -0
- package/dist/Editor-N46HUQEC.mjs +201 -0
- package/dist/Render-QEMDIDQC.css +101 -0
- package/dist/Render-Y567PGZ7.mjs +53 -0
- package/dist/chunk-3QHWXJEI.mjs +33 -0
- package/dist/chunk-7KY6RHEY.mjs +2230 -0
- package/dist/chunk-C2TVYIYC.mjs +415 -0
- package/dist/chunk-DCSQEDMK.mjs +194 -0
- package/dist/{chunk-JA7SEUEH.mjs → chunk-DJSH5REF.mjs} +70 -499
- package/dist/chunk-DNF2EMM4.mjs +63 -0
- package/dist/chunk-FNWOH4R6.mjs +109 -0
- package/dist/chunk-GQKMOYLG.mjs +53 -0
- package/dist/chunk-K3V4LVUL.mjs +704 -0
- package/dist/chunk-R6CVX2IY.mjs +103 -0
- package/dist/{chunk-UABEUL66.mjs → chunk-TB3SSIAY.mjs} +958 -2722
- package/dist/chunk-WUWXFMEM.mjs +11 -0
- package/dist/full-2GJTAAZE.css +301 -0
- package/dist/full-NLUNPJWS.mjs +90 -0
- package/dist/index.css +278 -22
- package/dist/index.d.mts +98 -7
- package/dist/index.d.ts +98 -7
- package/dist/index.js +5737 -2502
- package/dist/index.mjs +25 -9
- package/dist/loaded-EV34KGYJ.mjs +57 -0
- package/dist/loaded-HMSPJUZM.mjs +54 -0
- package/dist/loaded-RVWBFK7L.css +87 -0
- package/dist/loaded-ZXOU6S6R.mjs +54 -0
- package/dist/no-external.css +278 -22
- package/dist/no-external.d.mts +17 -2
- package/dist/no-external.d.ts +17 -2
- package/dist/no-external.js +5737 -2502
- package/dist/no-external.mjs +25 -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 +407 -21
- package/dist/rsc.mjs +16 -9
- package/dist/{walk-tree-CgWnYC1X.d.mts → walk-tree-Ja9bNCM9.d.mts} +202 -3
- package/dist/{walk-tree-CgWnYC1X.d.ts → walk-tree-Ja9bNCM9.d.ts} +202 -3
- package/package.json +23 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues,
|
|
3
|
+
init_react_import
|
|
4
|
+
} from "./chunk-DCSQEDMK.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
|
+
};
|