@firecms/editor 3.0.0-canary.160 → 3.0.0-canary.161
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_extensions.d.ts +6 -0
- package/dist/index.es.js +51 -46
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +46 -42
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.umd.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
(function(global, factory) {
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("@firecms/ui"), require("@tiptap/react"), require("@tiptap/extension-document"), require("tiptap-markdown"), require("@tiptap/extension-underline"), require("@tiptap/extension-
|
3
|
-
})(this, function(exports2, jsxRuntime, React, ui, react, Document, tiptapMarkdown, Underline,
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("@firecms/ui"), require("@tiptap/react"), require("@tiptap/extension-document"), require("tiptap-markdown"), require("@tiptap/extension-underline"), require("@tiptap/extension-heading"), require("@tiptap/extension-text-style"), require("@tiptap/extension-color"), require("@tiptap/extension-highlight"), require("@tiptap/extension-bold"), require("@tiptap/extension-italic"), require("@tiptap/extension-strike"), require("react-compiler-runtime"), require("@radix-ui/react-slot"), require("@tiptap/starter-kit"), require("@tiptap/extension-horizontal-rule"), require("@tiptap/extension-link"), require("@tiptap/extension-image"), require("@tiptap/extension-placeholder"), require("@tiptap/extension-task-item"), require("@tiptap/extension-task-list"), require("@tiptap/core"), require("prosemirror-state"), require("prosemirror-view"), require("@tiptap/extension-ordered-list"), require("@tiptap/extension-bullet-list"), require("@tiptap/extension-list-item"), require("@tiptap/extension-code-block"), require("@tiptap/extension-blockquote"), require("@tiptap/extension-code"), require("@tiptap/pm/view"), require("@tiptap/pm/state"), require("@tiptap/suggestion"), require("tippy.js")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "@firecms/ui", "@tiptap/react", "@tiptap/extension-document", "tiptap-markdown", "@tiptap/extension-underline", "@tiptap/extension-heading", "@tiptap/extension-text-style", "@tiptap/extension-color", "@tiptap/extension-highlight", "@tiptap/extension-bold", "@tiptap/extension-italic", "@tiptap/extension-strike", "react-compiler-runtime", "@radix-ui/react-slot", "@tiptap/starter-kit", "@tiptap/extension-horizontal-rule", "@tiptap/extension-link", "@tiptap/extension-image", "@tiptap/extension-placeholder", "@tiptap/extension-task-item", "@tiptap/extension-task-list", "@tiptap/core", "prosemirror-state", "prosemirror-view", "@tiptap/extension-ordered-list", "@tiptap/extension-bullet-list", "@tiptap/extension-list-item", "@tiptap/extension-code-block", "@tiptap/extension-blockquote", "@tiptap/extension-code", "@tiptap/pm/view", "@tiptap/pm/state", "@tiptap/suggestion", "tippy.js"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["FireCMS Editor"] = {}, global.jsxRuntime, global.React, global.ui, global.react, global.Document, global.tiptapMarkdown, global.Underline, global.Heading, global.TextStyle, global.Color, global.Highlight, global.Bold, global.Italic, global.Strike, global.reactCompilerRuntime, global.reactSlot, global.StarterKit, global.HorizontalRule, global.TiptapLink, global.TiptapImage, global.Placeholder, global.extensionTaskItem, global.extensionTaskList, global.core, global.prosemirrorState, global.prosemirrorView, global.OrderedList, global.BulletList, global.ListItem, global.CodeBlock, global.Blockquote, global.Code, global.view, global.state, global.Suggestion, global.tippy));
|
3
|
+
})(this, function(exports2, jsxRuntime, React, ui, react, Document, tiptapMarkdown, Underline, Heading, TextStyle, Color, Highlight, Bold, Italic, Strike, reactCompilerRuntime, reactSlot, StarterKit, HorizontalRule, TiptapLink, TiptapImage, Placeholder, extensionTaskItem, extensionTaskList, core, prosemirrorState, prosemirrorView, OrderedList, BulletList, ListItem, CodeBlock, Blockquote, Code, view, state, Suggestion, tippy) {
|
4
4
|
"use strict";
|
5
5
|
const EditorBubble = React.forwardRef((t0, ref) => {
|
6
6
|
const $ = reactCompilerRuntime.c(21);
|
@@ -278,7 +278,7 @@
|
|
278
278
|
}
|
279
279
|
let t3;
|
280
280
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
281
|
-
t3 = /* @__PURE__ */ jsxRuntime.jsx(ui.
|
281
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardArrowDownIcon, { size: "small" });
|
282
282
|
$[4] = t3;
|
283
283
|
} else {
|
284
284
|
t3 = $[4];
|
@@ -673,7 +673,10 @@
|
|
673
673
|
if (node.type.name === "heading") {
|
674
674
|
return `Heading ${node.attrs.level}`;
|
675
675
|
}
|
676
|
-
|
676
|
+
if (node.type.name === "paragraph") {
|
677
|
+
return "Press '/' for commands";
|
678
|
+
}
|
679
|
+
return "";
|
677
680
|
},
|
678
681
|
includeChildren: true
|
679
682
|
});
|
@@ -718,38 +721,38 @@
|
|
718
721
|
class: ui.cls("mt-4 mb-6 border-t", ui.defaultBorderMixin)
|
719
722
|
}
|
720
723
|
});
|
724
|
+
const bulletList = BulletList.configure({
|
725
|
+
HTMLAttributes: {
|
726
|
+
class: ui.cls("list-disc list-outside leading-3 -mt-2")
|
727
|
+
}
|
728
|
+
});
|
729
|
+
const orderedList = OrderedList.configure({
|
730
|
+
HTMLAttributes: {
|
731
|
+
class: ui.cls("list-decimal list-outside leading-3 -mt-2")
|
732
|
+
}
|
733
|
+
});
|
734
|
+
const listItem = ListItem.configure({
|
735
|
+
HTMLAttributes: {
|
736
|
+
class: ui.cls("leading-normal -mb-2")
|
737
|
+
}
|
738
|
+
});
|
739
|
+
const blockquote = Blockquote.configure({
|
740
|
+
HTMLAttributes: {
|
741
|
+
class: ui.cls("border-l-4 border-primary")
|
742
|
+
}
|
743
|
+
});
|
744
|
+
const codeBlock = CodeBlock.configure({
|
745
|
+
HTMLAttributes: {
|
746
|
+
class: ui.cls("rounded bg-blue-50 dark:bg-surface-700 border p-5 font-mono font-medium", ui.defaultBorderMixin)
|
747
|
+
}
|
748
|
+
});
|
749
|
+
const code = Code.configure({
|
750
|
+
HTMLAttributes: {
|
751
|
+
class: ui.cls("rounded-md bg-surface-accent-50 dark:bg-surface-700 px-1.5 py-1 font-mono font-medium"),
|
752
|
+
spellcheck: "false"
|
753
|
+
}
|
754
|
+
});
|
721
755
|
const starterKit = StarterKit.configure({
|
722
|
-
bulletList: {
|
723
|
-
HTMLAttributes: {
|
724
|
-
class: ui.cls("list-disc list-outside leading-3 -mt-2")
|
725
|
-
}
|
726
|
-
},
|
727
|
-
orderedList: {
|
728
|
-
HTMLAttributes: {
|
729
|
-
class: ui.cls("list-decimal list-outside leading-3 -mt-2")
|
730
|
-
}
|
731
|
-
},
|
732
|
-
listItem: {
|
733
|
-
HTMLAttributes: {
|
734
|
-
class: ui.cls("leading-normal -mb-2")
|
735
|
-
}
|
736
|
-
},
|
737
|
-
blockquote: {
|
738
|
-
HTMLAttributes: {
|
739
|
-
class: ui.cls("border-l-4 border-primary")
|
740
|
-
}
|
741
|
-
},
|
742
|
-
codeBlock: {
|
743
|
-
HTMLAttributes: {
|
744
|
-
class: ui.cls("rounded bg-blue-50 dark:bg-surface-700 border p-5 font-mono font-medium", ui.defaultBorderMixin)
|
745
|
-
}
|
746
|
-
},
|
747
|
-
code: {
|
748
|
-
HTMLAttributes: {
|
749
|
-
class: ui.cls("rounded-md bg-surface-accent-50 dark:bg-surface-700 px-1.5 py-1 font-mono font-medium"),
|
750
|
-
spellcheck: "false"
|
751
|
-
}
|
752
|
-
},
|
753
756
|
document: false,
|
754
757
|
horizontalRule: false,
|
755
758
|
dropcursor: {
|
@@ -1366,7 +1369,7 @@
|
|
1366
1369
|
title: "Autocomplete",
|
1367
1370
|
description: "Add text based on the context.",
|
1368
1371
|
searchTerms: ["ai"],
|
1369
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.
|
1372
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.AutoFixHighIcon, { size: 18 }),
|
1370
1373
|
command: onDisabledAutocompleteClick
|
1371
1374
|
});
|
1372
1375
|
}
|
@@ -1608,7 +1611,7 @@
|
|
1608
1611
|
title: "Autocomplete",
|
1609
1612
|
description: "Add text based on the context.",
|
1610
1613
|
searchTerms: ["ai"],
|
1611
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.
|
1614
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.AutoFixHighIcon, { size: 18 }),
|
1612
1615
|
command: async ({
|
1613
1616
|
editor,
|
1614
1617
|
range,
|
@@ -1849,11 +1852,8 @@
|
|
1849
1852
|
TextLoadingDecorationExtension,
|
1850
1853
|
Underline,
|
1851
1854
|
Bold,
|
1852
|
-
BlockQuote,
|
1853
1855
|
TextStyle,
|
1854
|
-
CodeBlock,
|
1855
1856
|
Italic,
|
1856
|
-
Code,
|
1857
1857
|
Strike,
|
1858
1858
|
Color,
|
1859
1859
|
Highlight.configure({
|
@@ -1864,8 +1864,6 @@
|
|
1864
1864
|
// delimiter: "```custom"
|
1865
1865
|
// }),
|
1866
1866
|
Heading,
|
1867
|
-
OrderedList,
|
1868
|
-
BulletList,
|
1869
1867
|
CustomKeymap,
|
1870
1868
|
DragAndDrop,
|
1871
1869
|
placeholder,
|
@@ -1877,6 +1875,12 @@
|
|
1877
1875
|
html: true
|
1878
1876
|
}),
|
1879
1877
|
horizontalRule,
|
1878
|
+
bulletList,
|
1879
|
+
orderedList,
|
1880
|
+
listItem,
|
1881
|
+
blockquote,
|
1882
|
+
codeBlock,
|
1883
|
+
code,
|
1880
1884
|
SlashCommand.configure({
|
1881
1885
|
HTMLAttributes: {
|
1882
1886
|
class: "mention"
|