@arkitektbedriftene/fe-lib 2.3.4 → 2.4.0
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/icons.es.js +1 -1
- package/dist/{index.esm-da01383a.js → index.esm-787a7997.js} +55 -51
- package/dist/rich-text/Editor.d.ts +3 -1
- package/dist/rich-text/Plugins/DragDropPastePlugin.d.ts +1 -0
- package/dist/rich-text/Toolbar/InsertSelector.d.ts +1 -10
- package/dist/rich-text/editorContext.d.ts +8 -0
- package/dist/rich-text.es.js +658 -611
- package/dist/ui.es.js +34 -32
- package/package.json +1 -1
package/dist/icons.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { G as l, M as n, a as r, b as i, F as c, c as h, d, e as v } from "./index.esm-
|
|
2
|
+
import { G as l, M as n, a as r, b as i, F as c, c as h, d, e as v } from "./index.esm-787a7997.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function s(a) {
|
|
5
5
|
return l({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M4 2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1Zm3 0a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1Zm3.5-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1ZM4 5.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1ZM7.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1Zm2.5.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1ZM4.5 8a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1Zm2.5.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1Zm3.5-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1Z" } }, { tag: "path", attr: { d: "M2 1a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V1Zm11 0H3v14h3v-2.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5V15h3V1Z" } }] })(a);
|
|
@@ -7,38 +7,38 @@ var g = {
|
|
|
7
7
|
attr: void 0
|
|
8
8
|
}, s = i.createContext && i.createContext(g), l = globalThis && globalThis.__assign || function() {
|
|
9
9
|
return l = Object.assign || function(t) {
|
|
10
|
-
for (var
|
|
11
|
-
|
|
12
|
-
for (var n in
|
|
13
|
-
Object.prototype.hasOwnProperty.call(
|
|
10
|
+
for (var r, a = 1, c = arguments.length; a < c; a++) {
|
|
11
|
+
r = arguments[a];
|
|
12
|
+
for (var n in r)
|
|
13
|
+
Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
16
|
}, l.apply(this, arguments);
|
|
17
|
-
}, f = globalThis && globalThis.__rest || function(t,
|
|
17
|
+
}, f = globalThis && globalThis.__rest || function(t, r) {
|
|
18
18
|
var a = {};
|
|
19
19
|
for (var c in t)
|
|
20
|
-
Object.prototype.hasOwnProperty.call(t, c) &&
|
|
20
|
+
Object.prototype.hasOwnProperty.call(t, c) && r.indexOf(c) < 0 && (a[c] = t[c]);
|
|
21
21
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
22
22
|
for (var n = 0, c = Object.getOwnPropertySymbols(t); n < c.length; n++)
|
|
23
|
-
|
|
23
|
+
r.indexOf(c[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, c[n]) && (a[c[n]] = t[c[n]]);
|
|
24
24
|
return a;
|
|
25
25
|
};
|
|
26
26
|
function d(t) {
|
|
27
|
-
return t && t.map(function(
|
|
28
|
-
return i.createElement(
|
|
27
|
+
return t && t.map(function(r, a) {
|
|
28
|
+
return i.createElement(r.tag, l({
|
|
29
29
|
key: a
|
|
30
|
-
},
|
|
30
|
+
}, r.attr), d(r.child));
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return function(
|
|
33
|
+
function e(t) {
|
|
34
|
+
return function(r) {
|
|
35
35
|
return i.createElement(z, l({
|
|
36
36
|
attr: l({}, t.attr)
|
|
37
|
-
},
|
|
37
|
+
}, r), d(t.child));
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function z(t) {
|
|
41
|
-
var
|
|
41
|
+
var r = function(a) {
|
|
42
42
|
var c = t.attr, n = t.size, o = t.title, u = f(t, ["attr", "size", "title"]), v = n || a.size || "1em", h;
|
|
43
43
|
return a.className && (h = a.className), t.className && (h = (h ? h + " " : "") + t.className), i.createElement("svg", l({
|
|
44
44
|
stroke: "currentColor",
|
|
@@ -55,73 +55,77 @@ function z(t) {
|
|
|
55
55
|
}), o && i.createElement("title", null, o), t.children);
|
|
56
56
|
};
|
|
57
57
|
return s !== void 0 ? i.createElement(s.Consumer, null, function(a) {
|
|
58
|
-
return
|
|
59
|
-
}) :
|
|
58
|
+
return r(a);
|
|
59
|
+
}) : r(g);
|
|
60
60
|
}
|
|
61
61
|
function m(t) {
|
|
62
|
-
return
|
|
62
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H4v-2h16v2zm0-5H4V8h3v2h2V8h6v2h2V8h3v6z" } }] })(t);
|
|
63
63
|
}
|
|
64
64
|
function H(t) {
|
|
65
|
-
return
|
|
66
|
-
}
|
|
67
|
-
function w(t) {
|
|
68
|
-
return r({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M23 12l-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69L23 12zm-12.91 4.72l-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48-7.33 7.35z" } }] })(t);
|
|
65
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" } }] })(t);
|
|
69
66
|
}
|
|
70
67
|
function p(t) {
|
|
71
|
-
return
|
|
68
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M23 12l-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69L23 12zm-12.91 4.72l-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48-7.33 7.35z" } }] })(t);
|
|
69
|
+
}
|
|
70
|
+
function w(t) {
|
|
71
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" } }, { tag: "path", attr: { d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" } }] })(t);
|
|
72
72
|
}
|
|
73
73
|
function L(t) {
|
|
74
|
-
return
|
|
74
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" } }, { tag: "path", attr: { d: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z" } }] })(t);
|
|
75
75
|
}
|
|
76
76
|
function x(t) {
|
|
77
|
-
return
|
|
77
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" } }, { tag: "path", attr: { d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z" } }] })(t);
|
|
78
78
|
}
|
|
79
79
|
function V(t) {
|
|
80
|
-
return
|
|
80
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" } }] })(t);
|
|
81
81
|
}
|
|
82
82
|
function C(t) {
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
function y(t) {
|
|
86
|
-
return r({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M19.3 16.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S11 12 11 14.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l3.2 3.2 1.4-1.4-3.2-3.2zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12 20v2C6.48 22 2 17.52 2 12S6.48 2 12 2c4.84 0 8.87 3.44 9.8 8h-2.07A8 8 0 0015 4.59V5c0 1.1-.9 2-2 2h-2v2c0 .55-.45 1-1 1H8v2h2v3H9l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.41 3.59 8 8 8z" } }] })(t);
|
|
83
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" } }] })(t);
|
|
87
84
|
}
|
|
88
85
|
function B(t) {
|
|
89
|
-
return
|
|
86
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z" } }] })(t);
|
|
87
|
+
}
|
|
88
|
+
function y(t) {
|
|
89
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M19.3 16.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S11 12 11 14.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l3.2 3.2 1.4-1.4-3.2-3.2zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12 20v2C6.48 22 2 17.52 2 12S6.48 2 12 2c4.84 0 8.87 3.44 9.8 8h-2.07A8 8 0 0015 4.59V5c0 1.1-.9 2-2 2h-2v2c0 .55-.45 1-1 1H8v2h2v3H9l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.41 3.59 8 8 8z" } }] })(t);
|
|
90
90
|
}
|
|
91
91
|
function b(t) {
|
|
92
|
-
return
|
|
92
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M7.32 10.56L8.38 9.5 7.32 8.44l1.06-1.06L10.5 9.5l-2.12 2.12-1.06-1.06zM4.5 9c.03 0 .05.01.08.01A8.002 8.002 0 0112 4c2.19 0 4.16.88 5.61 2.3.15-.6.45-1.29.81-1.96A9.965 9.965 0 0011.99 2c-4.88 0-8.94 3.51-9.81 8.14C2.74 9.44 3.59 9 4.5 9zM21 10.5c-.42 0-.82-.09-1.19-.22.12.55.19 1.13.19 1.72 0 4.42-3.58 8-8 8-3.36 0-6.23-2.07-7.42-5.01-.03 0-.05.01-.08.01-.52 0-1.04-.14-1.5-.4-.32-.18-.59-.42-.82-.7.89 4.61 4.93 8.1 9.8 8.1C17.52 22 22 17.52 22 12c0-.55-.06-1.09-.14-1.62a3.5 3.5 0 01-.86.12zM21 3s-2 2.9-2 4 .9 2 2 2 2-.9 2-2-2-4-2-4zm-5.38 4.38L13.5 9.5l2.12 2.12 1.06-1.06-1.06-1.06 1.06-1.06-1.06-1.06zM8.56 17c.69-1.19 1.97-2 3.44-2s2.75.81 3.44 2h1.68c-.8-2.05-2.79-3.5-5.12-3.5-.87 0-1.7.2-2.43.57L5.99 12c0-.52-.26-1.02-.74-1.29-.72-.41-1.63-.17-2.05.55-.41.72-.17 1.63.55 2.05.48.28 1.05.25 1.49 0l2.97 1.72c-.57.53-1.03 1.21-1.33 1.97h1.68z" } }] })(t);
|
|
93
93
|
}
|
|
94
94
|
function O(t) {
|
|
95
|
-
return
|
|
95
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z" } }] })(t);
|
|
96
96
|
}
|
|
97
97
|
function E(t) {
|
|
98
|
-
return
|
|
98
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" } }] })(t);
|
|
99
99
|
}
|
|
100
100
|
function F(t) {
|
|
101
|
-
return
|
|
101
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM64 72c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8V72zm0 64c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zm192.81 248H304c8.84 0 16 7.16 16 16s-7.16 16-16 16h-47.19c-16.45 0-31.27-9.14-38.64-23.86-2.95-5.92-8.09-6.52-10.17-6.52s-7.22.59-10.02 6.19l-7.67 15.34a15.986 15.986 0 0 1-14.31 8.84c-.38 0-.75-.02-1.14-.05-6.45-.45-12-4.75-14.03-10.89L144 354.59l-10.61 31.88c-5.89 17.66-22.38 29.53-41 29.53H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h12.39c4.83 0 9.11-3.08 10.64-7.66l18.19-54.64c3.3-9.81 12.44-16.41 22.78-16.41s19.48 6.59 22.77 16.41l13.88 41.64c19.77-16.19 54.05-9.7 66 14.16 2.02 4.06 5.96 6.5 10.16 6.5zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z" } }] })(t);
|
|
102
102
|
}
|
|
103
103
|
function S(t) {
|
|
104
|
-
return
|
|
104
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M488 192H336v56c0 39.7-32.3 72-72 72s-72-32.3-72-72V126.4l-64.9 39C107.8 176.9 96 197.8 96 220.2v47.3l-80 46.2C.7 322.5-4.6 342.1 4.3 357.4l80 138.6c8.8 15.3 28.4 20.5 43.7 11.7L231.4 448H368c35.3 0 64-28.7 64-64h16c17.7 0 32-14.3 32-32v-64h8c13.3 0 24-10.7 24-24v-48c0-13.3-10.7-24-24-24zm147.7-37.4L555.7 16C546.9.7 527.3-4.5 512 4.3L408.6 64H306.4c-12 0-23.7 3.4-33.9 9.7L239 94.6c-9.4 5.8-15 16.1-15 27.1V248c0 22.1 17.9 40 40 40s40-17.9 40-40v-88h184c30.9 0 56 25.1 56 56v28.5l80-46.2c15.3-8.9 20.5-28.4 11.7-43.7z" } }] })(t);
|
|
105
105
|
}
|
|
106
106
|
function _(t) {
|
|
107
|
-
return
|
|
107
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z" } }] })(t);
|
|
108
|
+
}
|
|
109
|
+
function j(t) {
|
|
110
|
+
return e({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" } }] })(t);
|
|
108
111
|
}
|
|
109
112
|
export {
|
|
110
|
-
F,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
S as F,
|
|
114
|
+
e as G,
|
|
115
|
+
b as M,
|
|
113
116
|
y as a,
|
|
114
117
|
m as b,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
p as c,
|
|
119
|
+
B as d,
|
|
120
|
+
F as e,
|
|
121
|
+
C as f,
|
|
122
|
+
x as g,
|
|
123
|
+
L as h,
|
|
124
|
+
_ as i,
|
|
125
|
+
H as j,
|
|
126
|
+
O as k,
|
|
127
|
+
V as l,
|
|
128
|
+
w as m,
|
|
129
|
+
j as n,
|
|
130
|
+
E as o
|
|
127
131
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type ReactNode, type ReactElement } from "react";
|
|
2
2
|
import { type CSS } from "@ui";
|
|
3
3
|
import { type InitialConfigType } from "@lexical/react/LexicalComposer.js";
|
|
4
|
+
import { type UploadFn } from "./editorContext";
|
|
4
5
|
import type { EditorState, SerializedEditorState } from "lexical";
|
|
5
6
|
export type RichTextEditorState = EditorState | string | SerializedEditorState;
|
|
6
|
-
export declare const RichTextEditor: ({ isLoading, children, placeholderText, nodes, plugins, toolbar, toolbarContent, content, hideBorder, onBlur, defaultState, css, signUrl, }: {
|
|
7
|
+
export declare const RichTextEditor: ({ isLoading, children, placeholderText, nodes, plugins, toolbar, toolbarContent, content, hideBorder, onBlur, defaultState, css, signUrl, fileUpload, }: {
|
|
7
8
|
isLoading: boolean;
|
|
8
9
|
children: ReactNode;
|
|
9
10
|
placeholderText?: string | undefined;
|
|
@@ -22,4 +23,5 @@ export declare const RichTextEditor: ({ isLoading, children, placeholderText, no
|
|
|
22
23
|
utils: {};
|
|
23
24
|
}> | undefined;
|
|
24
25
|
signUrl?: ((url: string) => Promise<string>) | undefined;
|
|
26
|
+
fileUpload?: UploadFn | undefined;
|
|
25
27
|
}) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DragDropPastePlugin: () => null;
|
|
@@ -1,11 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
uploadFile: ({ file }: {
|
|
4
|
-
file: File;
|
|
5
|
-
}) => Promise<string>;
|
|
6
|
-
isLoading: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const InsertSelector: ({ uploadFile }: {
|
|
9
|
-
uploadFile?: UploadFile | undefined;
|
|
10
|
-
}) => JSX.Element;
|
|
11
|
-
export {};
|
|
2
|
+
export declare const InsertSelector: () => JSX.Element;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { type RefObject } from "react";
|
|
2
|
+
export type UploadFn = {
|
|
3
|
+
uploadFile: ({ file }: {
|
|
4
|
+
file: File;
|
|
5
|
+
}) => Promise<string>;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
};
|
|
2
8
|
export declare const richTextContext: import("react").Context<{
|
|
3
9
|
hasFocus: boolean;
|
|
4
10
|
editorRef: RefObject<HTMLElement | null>;
|
|
5
11
|
signUrl?: ((url: string) => Promise<string>) | undefined;
|
|
12
|
+
fileUpload?: UploadFn | undefined;
|
|
6
13
|
}>;
|
|
7
14
|
export declare const useHasFocusWithin: ({ onBlur }: {
|
|
8
15
|
onBlur?: (() => void) | undefined;
|
|
@@ -17,4 +24,5 @@ export declare const useRichTextContext: () => {
|
|
|
17
24
|
hasFocus: boolean;
|
|
18
25
|
editorRef: RefObject<HTMLElement | null>;
|
|
19
26
|
signUrl?: ((url: string) => Promise<string>) | undefined;
|
|
27
|
+
fileUpload?: UploadFn | undefined;
|
|
20
28
|
};
|