@pixerate/editor 0.4.1 → 0.4.3
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.cjs +41 -28
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.js +32 -17
- package/dist/extensions/index.js.map +1 -1
- package/dist/index.cjs +41 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +32 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -359,7 +359,7 @@ var createGradientDecorations = (doc, options) => {
|
|
|
359
359
|
const start = pos + match.index;
|
|
360
360
|
const end = start + match[0].length;
|
|
361
361
|
const { from: colorFrom, to: colorTo } = colors;
|
|
362
|
-
const style = `--bg-size: ${speed * 300}%; --color-from: ${colorFrom}; --color-to: ${colorTo}; caret-color: #111 !important;`;
|
|
362
|
+
const style = `--bg-size: ${speed * 300}%; --color-from: ${colorFrom}; --color-to: ${colorTo}; caret-color: #111 !important; background-image: linear-gradient(to right, ${colorFrom}, ${colorTo}, ${colorFrom}); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;`;
|
|
363
363
|
decorations.push(
|
|
364
364
|
Decoration.inline(start, end, {
|
|
365
365
|
class: "inline animate-gradient bg-gradient-to-r from-[var(--color-from)] via-[var(--color-to)] to-[var(--color-from)] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent border border-(--color-to)/20 px-1 py-0.5 rounded-sm cursor-pointer",
|
|
@@ -382,7 +382,7 @@ var createGradientDecorations = (doc, options) => {
|
|
|
382
382
|
const start = pos + match.index;
|
|
383
383
|
const end = start + match[0].length;
|
|
384
384
|
const { from: colorFrom, to: colorTo } = colors;
|
|
385
|
-
const style = `--bg-size: ${speed * 300}%; --color-from: ${colorFrom}; --color-to: ${colorTo}; caret-color: #111 !important;`;
|
|
385
|
+
const style = `--bg-size: ${speed * 300}%; --color-from: ${colorFrom}; --color-to: ${colorTo}; caret-color: #111 !important; background-image: linear-gradient(to right, #fb7185, #8b5cf6, #fb7185); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;`;
|
|
386
386
|
decorations.push(
|
|
387
387
|
Decoration.inline(start, end, {
|
|
388
388
|
class: "italic animate-gradient bg-gradient-to-r from-rose-400 from-50% to-violet-500 to-50% bg-size-[200%_100%] bg-clip-text text-transparent inline-flex items-baseline gap-0.5",
|
|
@@ -810,22 +810,25 @@ var FontSize = Extension5.create({
|
|
|
810
810
|
|
|
811
811
|
// src/extensions/rich-text-preset.ts
|
|
812
812
|
import { wrappingInputRule, markInputRule } from "@tiptap/core";
|
|
813
|
-
import
|
|
814
|
-
import
|
|
815
|
-
import
|
|
816
|
-
import
|
|
817
|
-
import
|
|
818
|
-
import
|
|
819
|
-
import
|
|
813
|
+
import * as _StarterKit from "@tiptap/starter-kit";
|
|
814
|
+
import * as _Color from "@tiptap/extension-color";
|
|
815
|
+
import * as _Highlight from "@tiptap/extension-highlight";
|
|
816
|
+
import * as _Link from "@tiptap/extension-link";
|
|
817
|
+
import * as _TaskList from "@tiptap/extension-task-list";
|
|
818
|
+
import * as _TaskItem from "@tiptap/extension-task-item";
|
|
819
|
+
import * as _TextAlign from "@tiptap/extension-text-align";
|
|
820
820
|
import * as _TextStyle from "@tiptap/extension-text-style";
|
|
821
|
-
import
|
|
822
|
-
import
|
|
823
|
-
import
|
|
824
|
-
import
|
|
821
|
+
import * as _Typography from "@tiptap/extension-typography";
|
|
822
|
+
import * as _Underline from "@tiptap/extension-underline";
|
|
823
|
+
import * as _Placeholder from "@tiptap/extension-placeholder";
|
|
824
|
+
import * as _CharacterCount from "@tiptap/extension-character-count";
|
|
825
825
|
|
|
826
826
|
// src/extensions/mention.ts
|
|
827
|
-
import
|
|
828
|
-
|
|
827
|
+
import {
|
|
828
|
+
Mention as TipTapMention
|
|
829
|
+
} from "@tiptap/extension-mention";
|
|
830
|
+
var BaseMention = TipTapMention || TipTapMention?.default?.default || TipTapMention?.default || TipTapMention;
|
|
831
|
+
var Mention = BaseMention.extend({
|
|
829
832
|
addAttributes() {
|
|
830
833
|
return {
|
|
831
834
|
...this.parent?.(),
|
|
@@ -868,7 +871,19 @@ function createMentionExtension(options = {}) {
|
|
|
868
871
|
}
|
|
869
872
|
|
|
870
873
|
// src/extensions/rich-text-preset.ts
|
|
871
|
-
var
|
|
874
|
+
var resolveExt = (mod, name) => mod?.[name] || mod?.default?.[name] || mod?.default?.default || mod?.default || mod;
|
|
875
|
+
var StarterKit = resolveExt(_StarterKit, "StarterKit");
|
|
876
|
+
var Color = resolveExt(_Color, "Color");
|
|
877
|
+
var Highlight = resolveExt(_Highlight, "Highlight");
|
|
878
|
+
var Link = resolveExt(_Link, "Link");
|
|
879
|
+
var TaskList = resolveExt(_TaskList, "TaskList");
|
|
880
|
+
var TaskItem = resolveExt(_TaskItem, "TaskItem");
|
|
881
|
+
var TextAlign = resolveExt(_TextAlign, "TextAlign");
|
|
882
|
+
var TextStyle = resolveExt(_TextStyle, "TextStyle");
|
|
883
|
+
var Typography = resolveExt(_Typography, "Typography");
|
|
884
|
+
var Underline = resolveExt(_Underline, "Underline");
|
|
885
|
+
var Placeholder = resolveExt(_Placeholder, "Placeholder");
|
|
886
|
+
var CharacterCount = resolveExt(_CharacterCount, "CharacterCount");
|
|
872
887
|
function createRichTextPreset(options = {}) {
|
|
873
888
|
const {
|
|
874
889
|
placeholder = "Start typing...",
|
|
@@ -897,7 +912,7 @@ function createRichTextPreset(options = {}) {
|
|
|
897
912
|
}
|
|
898
913
|
}
|
|
899
914
|
}),
|
|
900
|
-
|
|
915
|
+
TextStyle,
|
|
901
916
|
Color,
|
|
902
917
|
Highlight.configure({ multicolor: true }),
|
|
903
918
|
Underline,
|