fable-editor 1.2.3 → 1.2.5
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/README.md +226 -226
- package/dist/angular/README.md +226 -226
- package/dist/angular/angular/fable-editor.component.d.ts +1 -0
- package/dist/angular/core/editor.d.ts +9 -0
- package/dist/angular/core/types.d.ts +1 -0
- package/dist/angular/esm2022/angular/fable-editor.component.mjs +4 -1
- package/dist/angular/esm2022/core/editor.mjs +46 -11
- package/dist/angular/esm2022/core/i18n.mjs +1 -1
- package/dist/angular/esm2022/core/types.mjs +1 -1
- package/dist/angular/fesm2022/fable-editor.mjs +48 -10
- package/dist/angular/fesm2022/fable-editor.mjs.map +1 -1
- package/dist/core/editor.d.ts +9 -0
- package/dist/core/editor.d.ts.map +1 -1
- package/dist/core/index.cjs +3 -3
- package/dist/core/index.mjs +59 -33
- package/dist/core/types.d.ts +1 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/react/FableEditor.d.ts.map +1 -1
- package/dist/react/index.cjs +8 -8
- package/dist/react/index.mjs +77 -47
- package/package.json +113 -113
package/dist/react/index.mjs
CHANGED
|
@@ -48,17 +48,17 @@ function je() {
|
|
|
48
48
|
{
|
|
49
49
|
for (var f = arguments.length, v = new Array(f > 1 ? f - 1 : 0), T = 1; T < f; T++)
|
|
50
50
|
v[T - 1] = arguments[T];
|
|
51
|
-
|
|
51
|
+
I("error", a, v);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function I(a, f, v) {
|
|
55
55
|
{
|
|
56
56
|
var T = w.ReactDebugCurrentFrame, L = T.getStackAddendum();
|
|
57
57
|
L !== "" && (f += "%s", v = v.concat([L]));
|
|
58
|
-
var
|
|
58
|
+
var A = v.map(function(M) {
|
|
59
59
|
return String(M);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
A.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, A);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
var H = !1, $ = !1, O = !1, _ = !1, et = !1, Mt;
|
|
@@ -115,9 +115,9 @@ function je() {
|
|
|
115
115
|
var T = a.displayName || null;
|
|
116
116
|
return T !== null ? T : W(a.type) || "Memo";
|
|
117
117
|
case m: {
|
|
118
|
-
var L = a,
|
|
118
|
+
var L = a, A = L._payload, M = L._init;
|
|
119
119
|
try {
|
|
120
|
-
return W(M(
|
|
120
|
+
return W(M(A));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,14 +125,14 @@ function je() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var V = Object.assign, G = 0, Lt, Ht,
|
|
128
|
+
var V = Object.assign, G = 0, Lt, Ht, At, It, qt, Rt, Pt;
|
|
129
129
|
function Bt() {
|
|
130
130
|
}
|
|
131
131
|
Bt.__reactDisabledLog = !0;
|
|
132
132
|
function pe() {
|
|
133
133
|
{
|
|
134
134
|
if (G === 0) {
|
|
135
|
-
Lt = console.log, Ht = console.info,
|
|
135
|
+
Lt = console.log, Ht = console.info, At = console.warn, It = console.error, qt = console.group, Rt = console.groupCollapsed, Pt = console.groupEnd;
|
|
136
136
|
var a = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
@@ -168,10 +168,10 @@ function je() {
|
|
|
168
168
|
value: Ht
|
|
169
169
|
}),
|
|
170
170
|
warn: V({}, a, {
|
|
171
|
-
value:
|
|
171
|
+
value: At
|
|
172
172
|
}),
|
|
173
173
|
error: V({}, a, {
|
|
174
|
-
value:
|
|
174
|
+
value: It
|
|
175
175
|
}),
|
|
176
176
|
group: V({}, a, {
|
|
177
177
|
value: qt
|
|
@@ -218,8 +218,8 @@ function je() {
|
|
|
218
218
|
ft = !0;
|
|
219
219
|
var L = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var A;
|
|
222
|
+
A = pt.current, pt.current = null, pe();
|
|
223
223
|
try {
|
|
224
224
|
if (f) {
|
|
225
225
|
var M = function() {
|
|
@@ -272,7 +272,7 @@ function je() {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
ft = !1, pt.current =
|
|
275
|
+
ft = !1, pt.current = A, me(), Error.prepareStackTrace = L;
|
|
276
276
|
}
|
|
277
277
|
var Q = a ? a.displayName || a.name : "", U = Q ? it(Q) : "";
|
|
278
278
|
return typeof a == "function" && st.set(a, U), U;
|
|
@@ -304,9 +304,9 @@ function je() {
|
|
|
304
304
|
case u:
|
|
305
305
|
return nt(a.type, f, v);
|
|
306
306
|
case m: {
|
|
307
|
-
var T = a, L = T._payload,
|
|
307
|
+
var T = a, L = T._payload, A = T._init;
|
|
308
308
|
try {
|
|
309
|
-
return nt(
|
|
309
|
+
return nt(A(L), f, v);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
@@ -323,9 +323,9 @@ function je() {
|
|
|
323
323
|
}
|
|
324
324
|
function be(a, f, v, T, L) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
326
|
+
var A = Function.call.bind(K);
|
|
327
327
|
for (var M in a)
|
|
328
|
-
if (
|
|
328
|
+
if (A(a, M)) {
|
|
329
329
|
var S = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof a[M] != "function") {
|
|
@@ -411,7 +411,7 @@ function je() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var Le = function(a, f, v, T, L,
|
|
414
|
+
var Le = function(a, f, v, T, L, A, M) {
|
|
415
415
|
var S = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
417
|
$$typeof: t,
|
|
@@ -421,7 +421,7 @@ function je() {
|
|
|
421
421
|
ref: v,
|
|
422
422
|
props: M,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
|
-
_owner:
|
|
424
|
+
_owner: A
|
|
425
425
|
};
|
|
426
426
|
return S._store = {}, Object.defineProperty(S._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
@@ -442,14 +442,14 @@ function je() {
|
|
|
442
442
|
};
|
|
443
443
|
function He(a, f, v, T, L) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
445
|
+
var A, M = {}, S = null, N = null;
|
|
446
446
|
v !== void 0 && (_t(v), S = "" + v), Ee(f) && (_t(f.key), S = "" + f.key), Te(f) && (N = f.ref, Se(f, L));
|
|
447
|
-
for (
|
|
448
|
-
K.call(f,
|
|
447
|
+
for (A in f)
|
|
448
|
+
K.call(f, A) && !we.hasOwnProperty(A) && (M[A] = f[A]);
|
|
449
449
|
if (a && a.defaultProps) {
|
|
450
450
|
var R = a.defaultProps;
|
|
451
|
-
for (
|
|
452
|
-
M[
|
|
451
|
+
for (A in R)
|
|
452
|
+
M[A] === void 0 && (M[A] = R[A]);
|
|
453
453
|
}
|
|
454
454
|
if (S || N) {
|
|
455
455
|
var P = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
@@ -483,11 +483,11 @@ Check the render method of \`` + a + "`.";
|
|
|
483
483
|
return "";
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Ae(a) {
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
489
|
var Ut = {};
|
|
490
|
-
function
|
|
490
|
+
function Ie(a) {
|
|
491
491
|
{
|
|
492
492
|
var f = Vt();
|
|
493
493
|
if (!f) {
|
|
@@ -504,7 +504,7 @@ Check the top-level render call using <` + v + ">.");
|
|
|
504
504
|
if (!a._store || a._store.validated || a.key != null)
|
|
505
505
|
return;
|
|
506
506
|
a._store.validated = !0;
|
|
507
|
-
var v =
|
|
507
|
+
var v = Ie(f);
|
|
508
508
|
if (Ut[v])
|
|
509
509
|
return;
|
|
510
510
|
Ut[v] = !0;
|
|
@@ -526,7 +526,7 @@ Check the top-level render call using <` + v + ">.");
|
|
|
526
526
|
else if (a) {
|
|
527
527
|
var L = x(a);
|
|
528
528
|
if (typeof L == "function" && L !== a.entries)
|
|
529
|
-
for (var
|
|
529
|
+
for (var A = L.call(a), M; !(M = A.next()).done; )
|
|
530
530
|
yt(M.value) && zt(M.value, f);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
@@ -569,18 +569,18 @@ Check the top-level render call using <` + v + ">.");
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
var Yt = {};
|
|
572
|
-
function Qt(a, f, v, T, L,
|
|
572
|
+
function Qt(a, f, v, T, L, A) {
|
|
573
573
|
{
|
|
574
574
|
var M = de(a);
|
|
575
575
|
if (!M) {
|
|
576
576
|
var S = "";
|
|
577
577
|
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (S += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
578
|
-
var N =
|
|
578
|
+
var N = Ae();
|
|
579
579
|
N ? S += N : S += Vt();
|
|
580
580
|
var R;
|
|
581
581
|
a === null ? R = "null" : gt(a) ? R = "array" : a !== void 0 && a.$$typeof === t ? (R = "<" + (W(a.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : R = typeof a, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, S);
|
|
582
582
|
}
|
|
583
|
-
var P = He(a, f, v, L,
|
|
583
|
+
var P = He(a, f, v, L, A);
|
|
584
584
|
if (P == null)
|
|
585
585
|
return P;
|
|
586
586
|
if (M) {
|
|
@@ -2516,10 +2516,10 @@ function oi(p) {
|
|
|
2516
2516
|
}), e.forEach((s) => {
|
|
2517
2517
|
const n = [], l = s[0];
|
|
2518
2518
|
s.forEach((r) => {
|
|
2519
|
-
var w, E,
|
|
2519
|
+
var w, E, I;
|
|
2520
2520
|
const c = +(((w = (r.getAttribute("style") || "").match(/level(\d+)/i)) == null ? void 0 : w[1]) || 1), d = Array.from(r.querySelectorAll("span")).find(
|
|
2521
2521
|
(H) => /mso-list\s*:\s*ignore/i.test(H.getAttribute("style") || "")
|
|
2522
|
-
), u = d ? ((E = d.textContent) == null ? void 0 : E.trim()) || "" : (((
|
|
2522
|
+
), u = d ? ((E = d.textContent) == null ? void 0 : E.trim()) || "" : (((I = r.textContent) == null ? void 0 : I.trim().match(/^\S{1,4}/)) || [""])[0], { ordered: m, style: b } = li(u);
|
|
2523
2523
|
for (d && d.remove(); n.length && n[n.length - 1].level > c; ) n.pop();
|
|
2524
2524
|
if (!n.length || n[n.length - 1].level < c) {
|
|
2525
2525
|
const H = p.createElement(m ? "ol" : "ul");
|
|
@@ -2887,10 +2887,10 @@ async function bi(p) {
|
|
|
2887
2887
|
for (const [y, g] of c) {
|
|
2888
2888
|
const x = g.startsWith("/") ? g.slice(1) : "word/" + g.replace(/^\.\//, ""), w = e.get(x);
|
|
2889
2889
|
if (!w) continue;
|
|
2890
|
-
const E = (x.split(".").pop() || "").toLowerCase(),
|
|
2891
|
-
if (
|
|
2890
|
+
const E = (x.split(".").pop() || "").toLowerCase(), I = fi[E];
|
|
2891
|
+
if (I)
|
|
2892
2892
|
try {
|
|
2893
|
-
u.set(y, `data:${
|
|
2893
|
+
u.set(y, `data:${I};base64,${gi(await le(t, w))}`);
|
|
2894
2894
|
} catch {
|
|
2895
2895
|
}
|
|
2896
2896
|
}
|
|
@@ -2899,8 +2899,8 @@ async function bi(p) {
|
|
|
2899
2899
|
const y = /* @__PURE__ */ new Map(), g = Array.from(b.getElementsByTagName("*"));
|
|
2900
2900
|
for (const x of g) {
|
|
2901
2901
|
if (x.localName !== "abstractNum") continue;
|
|
2902
|
-
const w = q(x, "abstractNumId"), E = dt(x, "lvl").find((H) => q(H, "ilvl") === "0") || dt(x, "lvl")[0],
|
|
2903
|
-
y.set(w,
|
|
2902
|
+
const w = q(x, "abstractNumId"), E = dt(x, "lvl").find((H) => q(H, "ilvl") === "0") || dt(x, "lvl")[0], I = E ? q(B(E, "numFmt")) : "";
|
|
2903
|
+
y.set(w, I === "bullet" ? "ul" : "ol");
|
|
2904
2904
|
}
|
|
2905
2905
|
for (const x of g) {
|
|
2906
2906
|
if (x.localName !== "num") continue;
|
|
@@ -3148,6 +3148,32 @@ let Ei = (j = class {
|
|
|
3148
3148
|
getContent() {
|
|
3149
3149
|
return this.ed.innerHTML;
|
|
3150
3150
|
}
|
|
3151
|
+
/** Same HTML as getContent(), wrapped so its RTL/LTR direction survives being
|
|
3152
|
+
* dropped into a fixed-alignment host (e.g. an email template's
|
|
3153
|
+
* `<td align="left">`), which otherwise forces left alignment onto any
|
|
3154
|
+
* descendant that has no `text-align` of its own — even one with its own
|
|
3155
|
+
* dir="rtl". Elements that already carry their own dir (preserved as-is by
|
|
3156
|
+
* the paste engine) each get their own matching text-align only if they
|
|
3157
|
+
* don't already have one, so mixed-direction content and any alignment the
|
|
3158
|
+
* user explicitly set are left untouched. */
|
|
3159
|
+
getContentForEmail() {
|
|
3160
|
+
const t = (l, r) => {
|
|
3161
|
+
const o = (l.getAttribute("style") || "").trim();
|
|
3162
|
+
l.setAttribute("style", o ? o.replace(/;?$/, "; ") + r : r);
|
|
3163
|
+
}, e = document.createElement("div");
|
|
3164
|
+
e.innerHTML = this.ed.innerHTML;
|
|
3165
|
+
let i = null;
|
|
3166
|
+
e.querySelectorAll("[dir]").forEach((l) => {
|
|
3167
|
+
const r = (l.getAttribute("dir") || "").toLowerCase();
|
|
3168
|
+
if (r !== "rtl" && r !== "ltr") return;
|
|
3169
|
+
const o = r;
|
|
3170
|
+
i || (i = o), /text-align\s*:/i.test(l.getAttribute("style") || "") || t(l, `text-align:${o === "rtl" ? "right" : "left"}`);
|
|
3171
|
+
});
|
|
3172
|
+
const s = i || this.ed.getAttribute("dir") || this.dir();
|
|
3173
|
+
return e.querySelectorAll("table:not([dir])").forEach((l) => {
|
|
3174
|
+
l.setAttribute("dir", s), /direction\s*:/i.test(l.getAttribute("style") || "") || t(l, `direction:${s}`);
|
|
3175
|
+
}), `<div dir="${s}" style="direction:${s};text-align:${s === "rtl" ? "right" : "left"}">${e.innerHTML}</div>`;
|
|
3176
|
+
}
|
|
3151
3177
|
setContent(t) {
|
|
3152
3178
|
this.ed.innerHTML = t || "<p><br></p>", this.refreshState(), this.clearTableHandles(), this.clearImageHandles(), this.clearImgPlaceholderSel(), this.clearTplSel(), this.clearVphPlaceholderSel(), this.clearVidHandles(), this.clearCodeSel(), this.clearSelToolbar(), this.onChange();
|
|
3153
3179
|
}
|
|
@@ -4066,13 +4092,13 @@ let Ei = (j = class {
|
|
|
4066
4092
|
this.dialog(
|
|
4067
4093
|
this.t("tablepropsttl"),
|
|
4068
4094
|
(E) => {
|
|
4069
|
-
const
|
|
4095
|
+
const I = (H, $) => {
|
|
4070
4096
|
const O = document.createElement("div");
|
|
4071
4097
|
O.style.cssText = r;
|
|
4072
4098
|
const _ = document.createElement("span");
|
|
4073
4099
|
_.style.cssText = o, _.textContent = this.t(H), O.append(_, $), E.appendChild(O);
|
|
4074
4100
|
};
|
|
4075
|
-
e = document.createElement("input"), e.type = "text", e.style.cssText = c, e.placeholder = "e.g. 600px or 100%", e.value = u,
|
|
4101
|
+
e = document.createElement("input"), e.type = "text", e.style.cssText = c, e.placeholder = "e.g. 600px or 100%", e.value = u, I("tblwidth", e), i = document.createElement("input"), i.type = "number", i.min = "0", i.style.cssText = c, i.value = String(m), I("tblcellpadding", i), s = document.createElement("input"), s.type = "number", s.min = "0", s.style.cssText = c, s.value = String(b), I("tblcellspacing", s), n = document.createElement("input"), n.type = "number", n.min = "0", n.style.cssText = c, n.value = String(y), I("tblborder", n), l = document.createElement("select"), l.style.cssText = c, [
|
|
4076
4102
|
["", "alignnone"],
|
|
4077
4103
|
["left", "alignleft"],
|
|
4078
4104
|
["center", "aligncenter"],
|
|
@@ -4080,7 +4106,7 @@ let Ei = (j = class {
|
|
|
4080
4106
|
].forEach(([H, $]) => {
|
|
4081
4107
|
const O = document.createElement("option");
|
|
4082
4108
|
O.value = H, O.textContent = this.t($), H === w && (O.selected = !0), l.appendChild(O);
|
|
4083
|
-
}),
|
|
4109
|
+
}), I("tblalign", l);
|
|
4084
4110
|
},
|
|
4085
4111
|
[
|
|
4086
4112
|
{ label: this.t("cancel"), action: () => this.closeDlg() },
|
|
@@ -4652,8 +4678,8 @@ let Ei = (j = class {
|
|
|
4652
4678
|
w.type = "button", w.textContent = this.t(g);
|
|
4653
4679
|
const E = document.createElement("div");
|
|
4654
4680
|
E.className = "dtabpanel", x(E);
|
|
4655
|
-
const
|
|
4656
|
-
u.push(E), w.addEventListener("click", () => b(
|
|
4681
|
+
const I = u.length;
|
|
4682
|
+
u.push(E), w.addEventListener("click", () => b(I)), d.appendChild(w);
|
|
4657
4683
|
}, b = (g) => {
|
|
4658
4684
|
d.querySelectorAll("button").forEach((x, w) => x.classList.toggle("on", w === g)), u.forEach((x, w) => x.style.display = w === g ? "" : "none");
|
|
4659
4685
|
};
|
|
@@ -4684,8 +4710,8 @@ let Ei = (j = class {
|
|
|
4684
4710
|
_.onload = () => $(_.result), _.readAsDataURL(H);
|
|
4685
4711
|
}
|
|
4686
4712
|
}), x.append(t, w, E), t.style.flex = "1", g.appendChild(r("vidsource", x));
|
|
4687
|
-
const
|
|
4688
|
-
|
|
4713
|
+
const I = document.createElement("div");
|
|
4714
|
+
I.className = "drow", e = document.createElement("input"), e.type = "number", e.value = "560", i = document.createElement("input"), i.type = "number", i.value = "314", I.append(r("tblwidth", e), r("tblheight", i)), g.appendChild(I);
|
|
4689
4715
|
}), m("vidembed", (g) => {
|
|
4690
4716
|
const x = document.createElement("p");
|
|
4691
4717
|
x.textContent = this.t("vidembedhint"), x.style.cssText = "margin:0 0 8px;color:#556;font-size:13.5px", s = document.createElement("textarea"), s.style.cssText = "width:100%;box-sizing:border-box;height:160px", g.append(x, s);
|
|
@@ -5378,6 +5404,10 @@ const Si = _e(
|
|
|
5378
5404
|
var g;
|
|
5379
5405
|
return ((g = c.current) == null ? void 0 : g.getContent()) ?? "";
|
|
5380
5406
|
},
|
|
5407
|
+
getContentForEmail: () => {
|
|
5408
|
+
var g;
|
|
5409
|
+
return ((g = c.current) == null ? void 0 : g.getContentForEmail()) ?? "";
|
|
5410
|
+
},
|
|
5381
5411
|
setContent: (g) => {
|
|
5382
5412
|
var x;
|
|
5383
5413
|
return (x = c.current) == null ? void 0 : x.setContent(g);
|
|
@@ -5449,8 +5479,8 @@ const Si = _e(
|
|
|
5449
5479
|
if (m.current === null) return;
|
|
5450
5480
|
const E = w.relatedTarget;
|
|
5451
5481
|
if (E && g.contains(E)) return;
|
|
5452
|
-
const
|
|
5453
|
-
m.current = null, u.current =
|
|
5482
|
+
const I = m.current;
|
|
5483
|
+
m.current = null, u.current = I, (H = c.current) == null || H.setContent(I);
|
|
5454
5484
|
};
|
|
5455
5485
|
return g.addEventListener("focusout", x), () => g.removeEventListener("focusout", x);
|
|
5456
5486
|
}, []), ot(() => {
|
package/package.json
CHANGED
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fable-editor",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "FableEditor — a rich text editor with React and Angular wrappers",
|
|
5
|
-
"author": "Sajin Satheesan <an.sajinsatheesan@gmail.com>",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/an-sajinsatheesan/fable-editor.git"
|
|
9
|
-
},
|
|
10
|
-
"bugs": {
|
|
11
|
-
"url": "https://github.com/an-sajinsatheesan/fable-editor/issues"
|
|
12
|
-
},
|
|
13
|
-
"homepage": "https://github.com/an-sajinsatheesan/fable-editor#readme",
|
|
14
|
-
"main": "./dist/core/index.cjs",
|
|
15
|
-
"module": "./dist/core/index.mjs",
|
|
16
|
-
"types": "./dist/core/index.d.ts",
|
|
17
|
-
"exports": {
|
|
18
|
-
".": {
|
|
19
|
-
"import": "./dist/core/index.mjs",
|
|
20
|
-
"require": "./dist/core/index.cjs",
|
|
21
|
-
"types": "./dist/core/index.d.ts"
|
|
22
|
-
},
|
|
23
|
-
"./react": {
|
|
24
|
-
"import": "./dist/react/index.mjs",
|
|
25
|
-
"require": "./dist/react/index.cjs",
|
|
26
|
-
"types": "./dist/react/index.d.ts"
|
|
27
|
-
},
|
|
28
|
-
"./angular": {
|
|
29
|
-
"default": "./dist/angular/fesm2022/fable-editor.mjs",
|
|
30
|
-
"types": "./dist/angular/index.d.ts"
|
|
31
|
-
},
|
|
32
|
-
"./style.css": "./style.css"
|
|
33
|
-
},
|
|
34
|
-
"files": [
|
|
35
|
-
"dist",
|
|
36
|
-
"style.css",
|
|
37
|
-
"README.md"
|
|
38
|
-
],
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build:core": "vite build --config vite.core.config.ts && cp src/core/editor.css dist/core/editor.css && cp src/core/editor.css style.css",
|
|
41
|
-
"build:react": "vite build --config vite.react.config.ts",
|
|
42
|
-
"build:angular": "ng-packagr -p ng-package.json && rm -f dist/angular/package.json",
|
|
43
|
-
"build": "npm run build:core && npm run build:react && npm run build:angular",
|
|
44
|
-
"dev": "vite --open /demo/index.html",
|
|
45
|
-
"demo": "vite --open /demo/index.html",
|
|
46
|
-
"demo:react": "cd examples/react && npm run dev",
|
|
47
|
-
"demo:angular": "cd examples/angular && npm start",
|
|
48
|
-
"test": "vitest run",
|
|
49
|
-
"test:watch": "vitest",
|
|
50
|
-
"typecheck": "tsc --noEmit"
|
|
51
|
-
},
|
|
52
|
-
"keywords": [
|
|
53
|
-
"editor",
|
|
54
|
-
"wysiwyg",
|
|
55
|
-
"fable-editor",
|
|
56
|
-
"react",
|
|
57
|
-
"angular",
|
|
58
|
-
"rich-text-editor"
|
|
59
|
-
],
|
|
60
|
-
"license": "MIT",
|
|
61
|
-
"peerDependencies": {
|
|
62
|
-
"@angular/common": ">=14.0.0",
|
|
63
|
-
"@angular/core": ">=14.0.0",
|
|
64
|
-
"@angular/forms": ">=14.0.0",
|
|
65
|
-
"react": ">=16.8.0",
|
|
66
|
-
"react-dom": ">=16.8.0",
|
|
67
|
-
"rxjs": ">=6.0.0"
|
|
68
|
-
},
|
|
69
|
-
"peerDependenciesMeta": {
|
|
70
|
-
"react": {
|
|
71
|
-
"optional": true
|
|
72
|
-
},
|
|
73
|
-
"react-dom": {
|
|
74
|
-
"optional": true
|
|
75
|
-
},
|
|
76
|
-
"@angular/core": {
|
|
77
|
-
"optional": true
|
|
78
|
-
},
|
|
79
|
-
"@angular/common": {
|
|
80
|
-
"optional": true
|
|
81
|
-
},
|
|
82
|
-
"@angular/forms": {
|
|
83
|
-
"optional": true
|
|
84
|
-
},
|
|
85
|
-
"rxjs": {
|
|
86
|
-
"optional": true
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"devDependencies": {
|
|
90
|
-
"@angular/common": "^18.0.0",
|
|
91
|
-
"@angular/compiler": "^18.0.0",
|
|
92
|
-
"@angular/compiler-cli": "^18.0.0",
|
|
93
|
-
"@angular/core": "^18.0.0",
|
|
94
|
-
"@angular/forms": "^18.0.0",
|
|
95
|
-
"@playwright/test": "^1.61.1",
|
|
96
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
97
|
-
"@testing-library/react": "^16.3.2",
|
|
98
|
-
"@types/react": "^18.3.0",
|
|
99
|
-
"@types/react-dom": "^18.3.0",
|
|
100
|
-
"@vitejs/plugin-react": "^4.3.0",
|
|
101
|
-
"jsdom": "^29.1.1",
|
|
102
|
-
"ng-packagr": "^18.0.0",
|
|
103
|
-
"playwright": "^1.61.1",
|
|
104
|
-
"react": "^18.3.0",
|
|
105
|
-
"react-dom": "^18.3.0",
|
|
106
|
-
"rxjs": "^7.8.0",
|
|
107
|
-
"tslib": "^2.6.0",
|
|
108
|
-
"typescript": "^5.4.5",
|
|
109
|
-
"vite": "^5.3.0",
|
|
110
|
-
"vite-plugin-dts": "^3.9.0",
|
|
111
|
-
"vitest": "^4.1.9"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "fable-editor",
|
|
3
|
+
"version": "1.2.5",
|
|
4
|
+
"description": "FableEditor — a rich text editor with React and Angular wrappers",
|
|
5
|
+
"author": "Sajin Satheesan <an.sajinsatheesan@gmail.com>",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/an-sajinsatheesan/fable-editor.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/an-sajinsatheesan/fable-editor/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/an-sajinsatheesan/fable-editor#readme",
|
|
14
|
+
"main": "./dist/core/index.cjs",
|
|
15
|
+
"module": "./dist/core/index.mjs",
|
|
16
|
+
"types": "./dist/core/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": "./dist/core/index.mjs",
|
|
20
|
+
"require": "./dist/core/index.cjs",
|
|
21
|
+
"types": "./dist/core/index.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./react": {
|
|
24
|
+
"import": "./dist/react/index.mjs",
|
|
25
|
+
"require": "./dist/react/index.cjs",
|
|
26
|
+
"types": "./dist/react/index.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./angular": {
|
|
29
|
+
"default": "./dist/angular/fesm2022/fable-editor.mjs",
|
|
30
|
+
"types": "./dist/angular/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./style.css": "./style.css"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"style.css",
|
|
37
|
+
"README.md"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build:core": "vite build --config vite.core.config.ts && cp src/core/editor.css dist/core/editor.css && cp src/core/editor.css style.css",
|
|
41
|
+
"build:react": "vite build --config vite.react.config.ts",
|
|
42
|
+
"build:angular": "ng-packagr -p ng-package.json && rm -f dist/angular/package.json",
|
|
43
|
+
"build": "npm run build:core && npm run build:react && npm run build:angular",
|
|
44
|
+
"dev": "vite --open /demo/index.html",
|
|
45
|
+
"demo": "vite --open /demo/index.html",
|
|
46
|
+
"demo:react": "cd examples/react && npm run dev",
|
|
47
|
+
"demo:angular": "cd examples/angular && npm start",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"test:watch": "vitest",
|
|
50
|
+
"typecheck": "tsc --noEmit"
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"editor",
|
|
54
|
+
"wysiwyg",
|
|
55
|
+
"fable-editor",
|
|
56
|
+
"react",
|
|
57
|
+
"angular",
|
|
58
|
+
"rich-text-editor"
|
|
59
|
+
],
|
|
60
|
+
"license": "MIT",
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@angular/common": ">=14.0.0",
|
|
63
|
+
"@angular/core": ">=14.0.0",
|
|
64
|
+
"@angular/forms": ">=14.0.0",
|
|
65
|
+
"react": ">=16.8.0",
|
|
66
|
+
"react-dom": ">=16.8.0",
|
|
67
|
+
"rxjs": ">=6.0.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"react": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"react-dom": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"@angular/core": {
|
|
77
|
+
"optional": true
|
|
78
|
+
},
|
|
79
|
+
"@angular/common": {
|
|
80
|
+
"optional": true
|
|
81
|
+
},
|
|
82
|
+
"@angular/forms": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"rxjs": {
|
|
86
|
+
"optional": true
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"devDependencies": {
|
|
90
|
+
"@angular/common": "^18.0.0",
|
|
91
|
+
"@angular/compiler": "^18.0.0",
|
|
92
|
+
"@angular/compiler-cli": "^18.0.0",
|
|
93
|
+
"@angular/core": "^18.0.0",
|
|
94
|
+
"@angular/forms": "^18.0.0",
|
|
95
|
+
"@playwright/test": "^1.61.1",
|
|
96
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
97
|
+
"@testing-library/react": "^16.3.2",
|
|
98
|
+
"@types/react": "^18.3.0",
|
|
99
|
+
"@types/react-dom": "^18.3.0",
|
|
100
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
101
|
+
"jsdom": "^29.1.1",
|
|
102
|
+
"ng-packagr": "^18.0.0",
|
|
103
|
+
"playwright": "^1.61.1",
|
|
104
|
+
"react": "^18.3.0",
|
|
105
|
+
"react-dom": "^18.3.0",
|
|
106
|
+
"rxjs": "^7.8.0",
|
|
107
|
+
"tslib": "^2.6.0",
|
|
108
|
+
"typescript": "^5.4.5",
|
|
109
|
+
"vite": "^5.3.0",
|
|
110
|
+
"vite-plugin-dts": "^3.9.0",
|
|
111
|
+
"vitest": "^4.1.9"
|
|
112
|
+
}
|
|
113
|
+
}
|