@maily-to/core 0.0.24 → 0.0.25
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/extensions/index.js +64 -14
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/index.mjs +61 -11
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.js +87 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3662,6 +3662,54 @@ var LinkExtension = TiptapLink.extend({
|
|
|
3662
3662
|
}
|
|
3663
3663
|
});
|
|
3664
3664
|
|
|
3665
|
+
// src/editor/nodes/heading/heading.ts
|
|
3666
|
+
import TiptapHeading from "@tiptap/extension-heading";
|
|
3667
|
+
var HeadingExtension = TiptapHeading.extend({
|
|
3668
|
+
addAttributes() {
|
|
3669
|
+
var _a;
|
|
3670
|
+
return __spreadProps(__spreadValues({}, ((_a = this == null ? void 0 : this.parent) == null ? void 0 : _a.call(this)) || {}), {
|
|
3671
|
+
showIfKey: {
|
|
3672
|
+
default: DEFAULT_SECTION_SHOW_IF_KEY,
|
|
3673
|
+
parseHTML: (element) => {
|
|
3674
|
+
return element.getAttribute("data-show-if-key") || DEFAULT_SECTION_SHOW_IF_KEY;
|
|
3675
|
+
},
|
|
3676
|
+
renderHTML(attributes) {
|
|
3677
|
+
if (!attributes.showIfKey) {
|
|
3678
|
+
return {};
|
|
3679
|
+
}
|
|
3680
|
+
return {
|
|
3681
|
+
"data-show-if-key": attributes.showIfKey
|
|
3682
|
+
};
|
|
3683
|
+
}
|
|
3684
|
+
}
|
|
3685
|
+
});
|
|
3686
|
+
}
|
|
3687
|
+
});
|
|
3688
|
+
|
|
3689
|
+
// src/editor/nodes/paragraph/paragraph.ts
|
|
3690
|
+
import TiptapParagraph from "@tiptap/extension-paragraph";
|
|
3691
|
+
var ParagraphExtension = TiptapParagraph.extend({
|
|
3692
|
+
addAttributes() {
|
|
3693
|
+
var _a;
|
|
3694
|
+
return __spreadProps(__spreadValues({}, ((_a = this == null ? void 0 : this.parent) == null ? void 0 : _a.call(this)) || {}), {
|
|
3695
|
+
showIfKey: {
|
|
3696
|
+
default: DEFAULT_SECTION_SHOW_IF_KEY,
|
|
3697
|
+
parseHTML: (element) => {
|
|
3698
|
+
return element.getAttribute("data-show-if-key") || DEFAULT_SECTION_SHOW_IF_KEY;
|
|
3699
|
+
},
|
|
3700
|
+
renderHTML(attributes) {
|
|
3701
|
+
if (!attributes.showIfKey) {
|
|
3702
|
+
return {};
|
|
3703
|
+
}
|
|
3704
|
+
return {
|
|
3705
|
+
"data-show-if-key": attributes.showIfKey
|
|
3706
|
+
};
|
|
3707
|
+
}
|
|
3708
|
+
}
|
|
3709
|
+
});
|
|
3710
|
+
}
|
|
3711
|
+
});
|
|
3712
|
+
|
|
3665
3713
|
// src/editor/extensions/maily-kit.tsx
|
|
3666
3714
|
var MailyKit = Extension.create({
|
|
3667
3715
|
name: "maily-kit",
|
|
@@ -3683,12 +3731,6 @@ var MailyKit = Extension.create({
|
|
|
3683
3731
|
content: "(block|columns)+"
|
|
3684
3732
|
}),
|
|
3685
3733
|
StarterKit.configure({
|
|
3686
|
-
heading: {
|
|
3687
|
-
levels: [1, 2, 3],
|
|
3688
|
-
HTMLAttributes: {
|
|
3689
|
-
class: "mly-relative"
|
|
3690
|
-
}
|
|
3691
|
-
},
|
|
3692
3734
|
code: {
|
|
3693
3735
|
HTMLAttributes: {
|
|
3694
3736
|
class: "mly-px-1 mly-relative mly-py-0.5 mly-bg-[#efefef] mly-text-sm mly-rounded-md mly-tracking-normal mly-font-normal"
|
|
@@ -3699,11 +3741,6 @@ var MailyKit = Extension.create({
|
|
|
3699
3741
|
class: "mly-not-prose mly-border-l-4 mly-border-gray-300 mly-pl-4 mly-mt-4 mly-mb-4 mly-relative"
|
|
3700
3742
|
}
|
|
3701
3743
|
},
|
|
3702
|
-
paragraph: {
|
|
3703
|
-
HTMLAttributes: {
|
|
3704
|
-
class: "mly-relative"
|
|
3705
|
-
}
|
|
3706
|
-
},
|
|
3707
3744
|
bulletList: {
|
|
3708
3745
|
HTMLAttributes: {
|
|
3709
3746
|
class: "mly-relative"
|
|
@@ -3714,6 +3751,8 @@ var MailyKit = Extension.create({
|
|
|
3714
3751
|
class: "mly-relative"
|
|
3715
3752
|
}
|
|
3716
3753
|
},
|
|
3754
|
+
heading: false,
|
|
3755
|
+
paragraph: false,
|
|
3717
3756
|
horizontalRule: false,
|
|
3718
3757
|
dropcursor: false,
|
|
3719
3758
|
document: false
|
|
@@ -3749,6 +3788,17 @@ var MailyKit = Extension.create({
|
|
|
3749
3788
|
color: "#555",
|
|
3750
3789
|
width: 3,
|
|
3751
3790
|
class: "ProseMirror-dropcursor"
|
|
3791
|
+
}),
|
|
3792
|
+
HeadingExtension.configure({
|
|
3793
|
+
levels: [1, 2, 3],
|
|
3794
|
+
HTMLAttributes: {
|
|
3795
|
+
class: "mly-relative"
|
|
3796
|
+
}
|
|
3797
|
+
}),
|
|
3798
|
+
ParagraphExtension.configure({
|
|
3799
|
+
HTMLAttributes: {
|
|
3800
|
+
class: "mly-relative"
|
|
3801
|
+
}
|
|
3752
3802
|
})
|
|
3753
3803
|
];
|
|
3754
3804
|
if (this.options.linkCard !== false) {
|