@milkdown/crepe 7.3.4 → 7.3.6
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/lib/core/crepe.d.ts +1 -1
- package/lib/core/crepe.d.ts.map +1 -1
- package/lib/feature/block-edit/handle/index.d.ts.map +1 -1
- package/lib/feature/block-edit/menu/index.d.ts.map +1 -1
- package/lib/feature/toolbar/index.d.ts.map +1 -1
- package/lib/{index-wbiYuOxV.js → index-BSv6537G.js} +93 -89
- package/lib/{index-kJIKUIIa.js → index-BoI246Ti.js} +18 -18
- package/lib/{index-KpfNv3rh.js → index-DDSXiQ90.js} +4 -4
- package/lib/{index-TsIsEZU1.js → index-ECCvmC6D.js} +12 -6
- package/lib/{index-hNRb95TL.js → index-EI1FcaSv.js} +4 -4
- package/lib/{index-h_6aZnx8.js → index-ESoQGvsE.js} +8 -8
- package/lib/{index-Gz6CQY-t.js → index-GOH7H2i9.js} +4 -4
- package/lib/{index-j2S9Lybz.js → index-GjFRg3RJ.js} +1 -1
- package/lib/index-GzVCh3P9.js +353 -0
- package/lib/{index-fJFWq6Y-.js → index-KCykNSJx.js} +7 -7
- package/lib/{index-yP4hAgM2.js → index-Ls2I7eOW.js} +61 -50
- package/lib/{index-7mRbGzci.js → index-P4-KqpEN.js} +5 -5
- package/lib/{index-bnwzlBfQ.js → index-Qcks_HSE.js} +6 -6
- package/lib/{index-YMk3n5vO.js → index-RKThEh9x.js} +4 -4
- package/lib/{index-qQMehYhQ.js → index-UqF8o9eD.js} +3246 -3092
- package/lib/{index-xkrG0YF8.js → index-_VrGF4z-.js} +5 -5
- package/lib/{index-H0TD0r41.js → index-cteyPSwp.js} +1 -1
- package/lib/{index-0c09be_R.js → index-f0pbmfJP.js} +4 -4
- package/lib/{index-kwrazjQE.js → index-gMYRN2wV.js} +7 -7
- package/lib/{index-5QLddZAp.js → index-jZuF1Iix.js} +4 -4
- package/lib/{index-Gg_apETx.js → index-kyD7hUif.js} +5 -5
- package/lib/{index-Zxe2neJQ.js → index-oszOFbwW.js} +149 -147
- package/lib/{index-b2y_N_O5.js → index-pC1MPpe2.js} +31 -31
- package/lib/{index-JGveSciI.js → index-q3iu4cef.js} +7 -7
- package/lib/{index-TRbxSkC1.js → index-qMeqmZtK.js} +4 -4
- package/lib/index-rs4SJ8Gd.js +253 -0
- package/lib/{index-oOHgRzEu.js → index-w-CiezW1.js} +21 -20
- package/lib/{index-WAhmZOxr.js → index-x6C6leag.js} +4 -4
- package/lib/{index-3qfZtuPz.js → index-xa7wUurf.js} +1 -1
- package/lib/{index-8NLp8LdC.js → index-xjkoF_Bn.js} +9 -9
- package/lib/{index-Ic30Lzgg.js → index-yrfirMbY.js} +4 -4
- package/lib/{index-2Cm9HHYj.js → index-zNGl_CdN.js} +1 -1
- package/lib/{index-ffdCLz6T.js → index-zc51oyS8.js} +2 -2
- package/lib/index.es.js +1 -1
- package/lib/{schema-t8-IDHY6.js → schema-ywm7RaKF.js} +1 -1
- package/lib/{tippy.esm-xX0Dh8mH.js → tippy.esm-4ny8MQOF.js} +33 -33
- package/lib/{tooltip-plugin-0UgO85XO.js → tooltip-plugin-NpyG8C5u.js} +17 -17
- package/package.json +14 -14
- package/src/core/crepe.ts +1 -0
- package/src/feature/block-edit/handle/index.ts +2 -1
- package/src/feature/block-edit/menu/index.ts +2 -0
- package/src/feature/toolbar/index.ts +2 -0
- package/lib/yaml-DnNTfjXK.js +0 -53
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { L as X } from "./index-
|
|
2
|
-
import { s as e, t as O, L as r, b as s, d as $, g as S, h as l, f as Z, j as Y, a as t } from "./index-
|
|
1
|
+
import { L as X } from "./index-ECCvmC6D.js";
|
|
2
|
+
import { s as e, t as O, L as r, b as s, d as $, g as S, h as l, f as Z, j as Y, a as t } from "./index-UqF8o9eD.js";
|
|
3
3
|
import "./meta-tAGyVRPE.js";
|
|
4
4
|
import "./icons-HYkfuR-O.js";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-Ls2I7eOW.js";
|
|
6
6
|
import "./hooks-82sqkbtE.js";
|
|
7
|
-
import "./index-
|
|
7
|
+
import "./index-cteyPSwp.js";
|
|
8
8
|
import "./clsx-7d8NmkQq.js";
|
|
9
9
|
const n = e({
|
|
10
10
|
null: O.null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as e } from "./prosemirror-noTDkx-k.js";
|
|
2
|
-
import { i as r } from "./index-
|
|
2
|
+
import { i as r } from "./index-Ls2I7eOW.js";
|
|
3
3
|
const i = '.milkdown{--crepe-color-background: #FFFDFB;--crepe-color-on-background: #1F1B16;--crepe-color-surface: #FFF8F4;--crepe-color-surface-low: #FFF1E5;--crepe-color-on-surface: #201B13;--crepe-color-on-surface-variant: #4F4539;--crepe-color-outline: #817567;--crepe-color-primary: #805610;--crepe-color-secondary: #FBDEBC;--crepe-color-on-secondary: #271904;--crepe-color-inverse: #362F27;--crepe-color-on-inverse: #FCEFE2;--crepe-color-inline-code: #BA1A1A;--crepe-color-error: #BA1A1A;--crepe-color-hover: #F9ECDF;--crepe-color-selected: #EDE0D4;--crepe-color-inline-area: #E4D8CC;--crepe-font-title: Georgia, Cambria, "Times New Roman", Times, serif;--crepe-font-default: "Open Sans", Arial, Helvetica, sans-serif;--crepe-font-code: Fira Code, Menlo, Monaco, "Courier New", Courier, monospace;--crepe-shadow-1: 0px 1px 3px 1px rgba(0, 0, 0, .15), 0px 1px 2px 0px rgba(0, 0, 0, .3);--crepe-shadow-2: 0px 2px 6px 2px rgba(0, 0, 0, .15), 0px 1px 2px 0px rgba(0, 0, 0, .3);font-family:var(--crepe-font-default);color:var(--crepe-color-on-background);background:var(--crepe-color-background)}.milkdown *{margin:0;padding:0;box-sizing:border-box}.milkdown button,.milkdown input{border:none;background:none;box-shadow:none}.milkdown button:focus,.milkdown input:focus{outline:none}.milkdown :focus-visible{outline:none}.milkdown .ProseMirror-focused{outline:none}.milkdown .ProseMirror{padding:60px 120px}.milkdown .ProseMirror>*{margin:20px 0 40px}.milkdown .ProseMirror *::selection{background:var(--crepe-color-selected)}.milkdown .ProseMirror li.ProseMirror-selectednode{outline:10px solid var(--crepe-color-selected)}.milkdown .ProseMirror li.ProseMirror-selectednode:after{all:unset}.milkdown .ProseMirror .ProseMirror-selectednode{background:var(--crepe-color-selected);outline:10px solid var(--crepe-color-selected)}.milkdown .ProseMirror img{vertical-align:bottom;max-width:100%}.milkdown .ProseMirror img.ProseMirror-selectednode{background:none;outline:2px solid var(--crepe-color-primary)}.milkdown .ProseMirror h1,.milkdown .ProseMirror h2,.milkdown .ProseMirror h3,.milkdown .ProseMirror h4,.milkdown .ProseMirror h5,.milkdown .ProseMirror h6{font-family:var(--crepe-font-title);font-weight:400}.milkdown .ProseMirror h1{font-size:42px;line-height:50px}.milkdown .ProseMirror h2{font-size:36px;line-height:44px}.milkdown .ProseMirror h3{font-size:32px;line-height:40px}.milkdown .ProseMirror h4{font-size:28px;line-height:36px}.milkdown .ProseMirror h5{font-size:24px;line-height:32px}.milkdown .ProseMirror h6{font-size:18px;font-weight:700;line-height:28px}.milkdown .ProseMirror p{font-size:16px;line-height:24px}.milkdown .ProseMirror code{color:var(--crepe-color-inline-code);background:color-mix(in srgb,var(--crepe-color-inline-area),transparent 40%);padding:0 10px;border-radius:4px}.milkdown .ProseMirror a{color:var(--crepe-color-primary)}.milkdown .ProseMirror pre{background:color-mix(in srgb,var(--crepe-color-inline-area),transparent 40%);padding:10px;border-radius:4px}.milkdown .ProseMirror pre code{padding:0;background:transparent}.milkdown .ProseMirror blockquote{position:relative;padding-left:40px}.milkdown .ProseMirror blockquote:before{content:"";width:4px;height:100%;left:0;position:absolute;background:var(--crepe-color-selected);border-radius:100px}.milkdown .ProseMirror blockquote hr{margin-bottom:16px}.milkdown .ProseMirror hr{border:none;border-bottom:1px solid color-mix(in srgb,var(--crepe-color-outline),transparent 80%);height:16px;position:relative}.milkdown .ProseMirror hr.ProseMirror-selectednode{outline:none;background:none;border-bottom:1px solid var(--crepe-color-outline)}.milkdown .ProseMirror .ProseMirror-gapcursor:after{box-sizing:border-box;border-top:1px solid var(--crepe-color-on-background);top:-40px}', c = (o) => {
|
|
4
4
|
o.config(r(e)).config(r(i));
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as b,
|
|
1
|
+
import { P as b, o as T, p, q as V, T as v, t as x, F as w, w as k, D, x as M, $ as O, y as P, i as F, a as N, C as y } from "./index-Ls2I7eOW.js";
|
|
2
2
|
function R(i = {}) {
|
|
3
3
|
return new b({
|
|
4
4
|
view(e) {
|
|
@@ -216,17 +216,17 @@ function L(i) {
|
|
|
216
216
|
function z() {
|
|
217
217
|
return new b({
|
|
218
218
|
props: {
|
|
219
|
-
decorations:
|
|
219
|
+
decorations: j,
|
|
220
220
|
createSelectionBetween(i, e, t) {
|
|
221
221
|
return e.pos == t.pos && a.valid(t) ? new a(t) : null;
|
|
222
222
|
},
|
|
223
|
-
handleClick:
|
|
224
|
-
handleKeyDown:
|
|
225
|
-
handleDOMEvents: { beforeinput:
|
|
223
|
+
handleClick: X,
|
|
224
|
+
handleKeyDown: J,
|
|
225
|
+
handleDOMEvents: { beforeinput: Y }
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
-
const
|
|
229
|
+
const J = V({
|
|
230
230
|
ArrowLeft: h("horiz", -1),
|
|
231
231
|
ArrowRight: h("horiz", 1),
|
|
232
232
|
ArrowUp: h("vert", -1),
|
|
@@ -245,7 +245,7 @@ function h(i, e) {
|
|
|
245
245
|
return c ? (r && r(o.tr.setSelection(new a(c))), !0) : !1;
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function X(i, e, t) {
|
|
249
249
|
if (!i || !i.editable)
|
|
250
250
|
return !1;
|
|
251
251
|
let o = i.state.doc.resolve(e);
|
|
@@ -254,7 +254,7 @@ function J(i, e, t) {
|
|
|
254
254
|
let r = i.posAtCoords({ left: t.clientX, top: t.clientY });
|
|
255
255
|
return r && r.inside > -1 && x.isSelectable(i.state.doc.nodeAt(r.inside)) ? !1 : (i.dispatch(i.state.tr.setSelection(new a(o))), !0);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Y(i, e) {
|
|
258
258
|
if (e.inputType != "insertCompositionText" || !(i.state.selection instanceof a))
|
|
259
259
|
return !1;
|
|
260
260
|
let { $from: t } = i.state.selection, o = t.parent.contentMatchAt(t.index()).findWrapping(i.state.schema.nodes.text);
|
|
@@ -266,7 +266,7 @@ function X(i, e) {
|
|
|
266
266
|
let l = i.state.tr.replace(t.pos, t.pos, new k(r, 0, 0));
|
|
267
267
|
return l.setSelection(v.near(l.doc.resolve(t.pos + 1))), i.dispatch(l), !1;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function j(i) {
|
|
270
270
|
if (!(i.selection instanceof a))
|
|
271
271
|
return null;
|
|
272
272
|
let e = document.createElement("div");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { E as P, C as G, L as g } from "./index-
|
|
2
|
-
import { s as _, t as Q, e as k, i as E, L as U, b as z, h as q, f as A, j as F, a as C, I, c as N,
|
|
1
|
+
import { E as P, C as G, L as g } from "./index-ECCvmC6D.js";
|
|
2
|
+
import { s as _, t as Q, e as k, i as E, L as U, b as z, h as q, f as A, j as F, a as C, I, c as N, D as L, F as x } from "./index-UqF8o9eD.js";
|
|
3
3
|
import "./meta-tAGyVRPE.js";
|
|
4
4
|
import "./icons-HYkfuR-O.js";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-Ls2I7eOW.js";
|
|
6
6
|
import "./hooks-82sqkbtE.js";
|
|
7
|
-
import "./index-
|
|
7
|
+
import "./index-cteyPSwp.js";
|
|
8
8
|
import "./clsx-7d8NmkQq.js";
|
|
9
9
|
const D = 1, Z = 201, u = 202, H = 203, m = 204, J = 205, B = 206, M = 207, K = 2, OO = 208, rO = 209, aO = 3, iO = 210, QO = 211, eO = 4, SO = 212, oO = 213, xO = 5, sO = 214, tO = 26, TO = 27, nO = 51, PO = 52, lO = 57, pO = 58, qO = 59, $O = 61, XO = 62, wO = 63, YO = 64, cO = 65, mO = 67, fO = 251, dO = 74, bO = 270, yO = 115, ZO = 133, uO = 154, WO = 155, VO = 158, t = 10, T = 13, Y = 32, l = 9, c = 35, RO = 40, vO = 46, f = 123, W = 39, V = 34, jO = 92, hO = /* @__PURE__ */ new Set([
|
|
10
10
|
TO,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as y, e as w, u as x, b as $, h as r, w as f } from "./meta-tAGyVRPE.js";
|
|
2
|
-
import { c as I, u as L, $ as C } from "./index-
|
|
2
|
+
import { c as I, u as L, $ as C } from "./index-cteyPSwp.js";
|
|
3
3
|
import { c as B } from "./clsx-7d8NmkQq.js";
|
|
4
|
-
import { $ as v, l as S, T as E, i as T } from "./index-
|
|
4
|
+
import { $ as v, l as S, T as E, i as T } from "./index-Ls2I7eOW.js";
|
|
5
5
|
const F = I`
|
|
6
6
|
:host > .list-item {
|
|
7
7
|
display: flex;
|
package/lib/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Z as Dr, _ as tt } from "./index-Ls2I7eOW.js";
|
|
2
2
|
function Mt(e = 0, t = 0, r = 0) {
|
|
3
3
|
return Math.min(Math.max(e, t), r);
|
|
4
4
|
}
|
|
@@ -95,11 +95,11 @@ function Nt(e) {
|
|
|
95
95
|
}
|
|
96
96
|
var _r = Hr;
|
|
97
97
|
const Ci = /* @__PURE__ */ Dr(_r);
|
|
98
|
-
var $ = "top",
|
|
98
|
+
var $ = "top", X = "bottom", Y = "right", W = "left", xt = "auto", Fe = [$, X, Y, W], Ae = "start", Ve = "end", qr = "clippingParents", Qt = "viewport", Re = "popper", zr = "reference", Rt = /* @__PURE__ */ Fe.reduce(function(e, t) {
|
|
99
99
|
return e.concat([t + "-" + Ae, t + "-" + Ve]);
|
|
100
100
|
}, []), er = /* @__PURE__ */ [].concat(Fe, [xt]).reduce(function(e, t) {
|
|
101
101
|
return e.concat([t, t + "-" + Ae, t + "-" + Ve]);
|
|
102
|
-
}, []),
|
|
102
|
+
}, []), Xr = "beforeRead", Yr = "read", Gr = "afterRead", Kr = "beforeMain", Jr = "main", Zr = "afterMain", Qr = "beforeWrite", en = "write", tn = "afterWrite", rn = [Xr, Yr, Gr, Kr, Jr, Zr, Qr, en, tn];
|
|
103
103
|
function te(e) {
|
|
104
104
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
105
105
|
}
|
|
@@ -301,9 +301,9 @@ var cn = function(t, r) {
|
|
|
301
301
|
})) : t, or(typeof t != "number" ? t : ar(t, Fe));
|
|
302
302
|
};
|
|
303
303
|
function fn(e) {
|
|
304
|
-
var t, r = e.state, n = e.name, o = e.options, u = r.elements.arrow, f = r.modifiersData.popperOffsets, c = ee(r.placement), s = At(c), d = [W,
|
|
304
|
+
var t, r = e.state, n = e.name, o = e.options, u = r.elements.arrow, f = r.modifiersData.popperOffsets, c = ee(r.placement), s = At(c), d = [W, Y].indexOf(c) >= 0, p = d ? "height" : "width";
|
|
305
305
|
if (!(!u || !f)) {
|
|
306
|
-
var g = cn(o.padding, r), w = Tt(u), m = s === "y" ? $ : W, O = s === "y" ?
|
|
306
|
+
var g = cn(o.padding, r), w = Tt(u), m = s === "y" ? $ : W, O = s === "y" ? X : Y, b = r.rects.reference[p] + r.rects.reference[s] - f[s] - r.rects.popper[p], y = f[s] - r.rects.reference[s], x = Ue(u), D = x ? s === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, S = b / 2 - y / 2, i = g[m], E = D - w[p] - g[O], l = D / 2 - w[p] / 2 + S, T = ke(i, l, E), j = s;
|
|
307
307
|
r.modifiersData[n] = (t = {}, t[j] = T, t.centerOffset = T - l, t);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
@@ -348,16 +348,16 @@ function Bt(e) {
|
|
|
348
348
|
var x = f.hasOwnProperty("x"), D = f.hasOwnProperty("y"), S = W, i = $, E = window;
|
|
349
349
|
if (d) {
|
|
350
350
|
var l = Ue(r), T = "clientHeight", j = "clientWidth";
|
|
351
|
-
if (l === _(r) && (l = fe(r), se(l).position !== "static" && c === "absolute" && (T = "scrollHeight", j = "scrollWidth")), l = l, o === $ || (o === W || o ===
|
|
352
|
-
i =
|
|
351
|
+
if (l === _(r) && (l = fe(r), se(l).position !== "static" && c === "absolute" && (T = "scrollHeight", j = "scrollWidth")), l = l, o === $ || (o === W || o === Y) && u === Ve) {
|
|
352
|
+
i = X;
|
|
353
353
|
var L = g && l === E && E.visualViewport ? E.visualViewport.height : (
|
|
354
354
|
// $FlowFixMe[prop-missing]
|
|
355
355
|
l[T]
|
|
356
356
|
);
|
|
357
357
|
b -= L - n.height, b *= s ? 1 : -1;
|
|
358
358
|
}
|
|
359
|
-
if (o === W || (o === $ || o ===
|
|
360
|
-
S =
|
|
359
|
+
if (o === W || (o === $ || o === X) && u === Ve) {
|
|
360
|
+
S = Y;
|
|
361
361
|
var P = g && l === E && E.visualViewport ? E.visualViewport.width : (
|
|
362
362
|
// $FlowFixMe[prop-missing]
|
|
363
363
|
l[j]
|
|
@@ -538,13 +538,13 @@ function ur(e) {
|
|
|
538
538
|
y: t.y - r.height
|
|
539
539
|
};
|
|
540
540
|
break;
|
|
541
|
-
case
|
|
541
|
+
case X:
|
|
542
542
|
s = {
|
|
543
543
|
x: f,
|
|
544
544
|
y: t.y + t.height
|
|
545
545
|
};
|
|
546
546
|
break;
|
|
547
|
-
case
|
|
547
|
+
case Y:
|
|
548
548
|
s = {
|
|
549
549
|
x: t.x + t.width,
|
|
550
550
|
y: c
|
|
@@ -592,7 +592,7 @@ function $e(e, t) {
|
|
|
592
592
|
if (w === Re && R) {
|
|
593
593
|
var N = R[o];
|
|
594
594
|
Object.keys(P).forEach(function(M) {
|
|
595
|
-
var H = [
|
|
595
|
+
var H = [Y, X].indexOf(M) >= 0 ? 1 : -1, F = [$, X].indexOf(M) >= 0 ? "y" : "x";
|
|
596
596
|
P[M] += N[F] * H;
|
|
597
597
|
});
|
|
598
598
|
}
|
|
@@ -637,13 +637,13 @@ function Sn(e) {
|
|
|
637
637
|
allowedAutoPlacements: b
|
|
638
638
|
}) : G);
|
|
639
639
|
}, []), E = t.rects.reference, l = t.rects.popper, T = /* @__PURE__ */ new Map(), j = !0, L = i[0], P = 0; P < i.length; P++) {
|
|
640
|
-
var R = i[P], N = ee(R), M = Se(R) === Ae, H = [$,
|
|
640
|
+
var R = i[P], N = ee(R), M = Se(R) === Ae, H = [$, X].indexOf(N) >= 0, F = H ? "width" : "height", B = $e(t, {
|
|
641
641
|
placement: R,
|
|
642
642
|
boundary: p,
|
|
643
643
|
rootBoundary: g,
|
|
644
644
|
altBoundary: w,
|
|
645
645
|
padding: d
|
|
646
|
-
}), I = H ? M ?
|
|
646
|
+
}), I = H ? M ? Y : W : M ? X : $;
|
|
647
647
|
E[F] > l[F] && (I = it(I));
|
|
648
648
|
var k = it(I), K = [];
|
|
649
649
|
if (u && K.push(B[N] <= 0), c && K.push(B[I] <= 0, B[k] <= 0), K.every(function(re) {
|
|
@@ -695,7 +695,7 @@ function $t(e, t, r) {
|
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
697
|
function Wt(e) {
|
|
698
|
-
return [$,
|
|
698
|
+
return [$, Y, X, W].some(function(t) {
|
|
699
699
|
return e[t] >= 0;
|
|
700
700
|
});
|
|
701
701
|
}
|
|
@@ -726,7 +726,7 @@ function Pn(e, t, r) {
|
|
|
726
726
|
var n = ee(e), o = [W, $].indexOf(n) >= 0 ? -1 : 1, u = typeof r == "function" ? r(Object.assign({}, t, {
|
|
727
727
|
placement: e
|
|
728
728
|
})) : r, f = u[0], c = u[1];
|
|
729
|
-
return f = f || 0, c = (c || 0) * o, [W,
|
|
729
|
+
return f = f || 0, c = (c || 0) * o, [W, Y].indexOf(n) >= 0 ? {
|
|
730
730
|
x: c,
|
|
731
731
|
y: f
|
|
732
732
|
} : {
|
|
@@ -786,14 +786,14 @@ function Vn(e) {
|
|
|
786
786
|
};
|
|
787
787
|
if (l) {
|
|
788
788
|
if (u) {
|
|
789
|
-
var M, H = i === "y" ? $ : W, F = i === "y" ?
|
|
789
|
+
var M, H = i === "y" ? $ : W, F = i === "y" ? X : Y, B = i === "y" ? "height" : "width", I = l[i], k = I + y[H], K = I - y[F], J = m ? -j[B] / 2 : 0, pe = D === Ae ? T[B] : j[B], Z = D === Ae ? -j[B] : -T[B], le = t.elements.arrow, re = m && le ? Tt(le) : {
|
|
790
790
|
width: 0,
|
|
791
791
|
height: 0
|
|
792
792
|
}, G = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ir(), ne = G[H], ye = G[F], ie = ke(0, T[B], re[B]), be = S ? T[B] / 2 - J - ie - ne - P.mainAxis : pe - ie - ne - P.mainAxis, ue = S ? -T[B] / 2 + J + ie + ye + P.mainAxis : Z + ie + ye + P.mainAxis, we = t.elements.arrow && Ue(t.elements.arrow), _e = we ? i === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, je = (M = R == null ? void 0 : R[i]) != null ? M : 0, qe = I + be - je - _e, ze = I + ue - je, Le = ke(m ? ot(k, qe) : k, I, m ? he(K, ze) : K);
|
|
793
793
|
l[i] = Le, N[i] = Le - I;
|
|
794
794
|
}
|
|
795
795
|
if (c) {
|
|
796
|
-
var Me,
|
|
796
|
+
var Me, Xe = i === "x" ? $ : W, Ye = i === "x" ? X : Y, oe = l[E], ce = E === "y" ? "height" : "width", Pe = oe + y[Xe], de = oe - y[Ye], Ne = [$, W].indexOf(x) !== -1, Ge = (Me = R == null ? void 0 : R[E]) != null ? Me : 0, Ke = Ne ? Pe : oe - T[ce] - j[ce] - Ge + P.altAxis, Je = Ne ? oe + T[ce] + j[ce] - Ge - P.altAxis : de, Ze = m && Ne ? un(Ke, oe, Je) : ke(m ? Ke : Pe, oe, m ? Je : de);
|
|
797
797
|
l[E] = Ze, N[E] = Ze - oe;
|
|
798
798
|
}
|
|
799
799
|
t.modifiersData[n] = N;
|
|
@@ -873,7 +873,7 @@ function zn(e) {
|
|
|
873
873
|
})), t;
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
|
-
function
|
|
876
|
+
function Xn(e) {
|
|
877
877
|
var t = e.reduce(function(r, n) {
|
|
878
878
|
var o = r[n.name];
|
|
879
879
|
return r[n.name] = o ? Object.assign({}, o, n, {
|
|
@@ -897,7 +897,7 @@ function Ft() {
|
|
|
897
897
|
return !(n && typeof n.getBoundingClientRect == "function");
|
|
898
898
|
});
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Yn(e) {
|
|
901
901
|
e === void 0 && (e = {});
|
|
902
902
|
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, o = t.defaultOptions, u = o === void 0 ? Ht : o;
|
|
903
903
|
return function(c, s, d) {
|
|
@@ -921,7 +921,7 @@ function Xn(e) {
|
|
|
921
921
|
reference: ge(c) ? Be(c) : c.contextElement ? Be(c.contextElement) : [],
|
|
922
922
|
popper: Be(s)
|
|
923
923
|
};
|
|
924
|
-
var S = qn(
|
|
924
|
+
var S = qn(Xn([].concat(n, p.options.modifiers)));
|
|
925
925
|
return p.orderedModifiers = S.filter(function(i) {
|
|
926
926
|
return i.enabled;
|
|
927
927
|
}), O(), m.update();
|
|
@@ -996,7 +996,7 @@ function Xn(e) {
|
|
|
996
996
|
return m;
|
|
997
997
|
};
|
|
998
998
|
}
|
|
999
|
-
var Gn = [yn, Bn, hn, tr, Rn, jn, $n, ln, Mn], Kn = /* @__PURE__ */
|
|
999
|
+
var Gn = [yn, Bn, hn, tr, Rn, jn, $n, ln, Mn], Kn = /* @__PURE__ */ Yn({
|
|
1000
1000
|
defaultModifiers: Gn
|
|
1001
1001
|
}), Jn = "tippy-box", cr = "tippy-content", Zn = "tippy-backdrop", fr = "tippy-arrow", pr = "tippy-svg-arrow", me = {
|
|
1002
1002
|
passive: !0,
|
|
@@ -1112,7 +1112,7 @@ function vt(e, t, r) {
|
|
|
1112
1112
|
e[n](o, r);
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function Xt(e, t) {
|
|
1116
1116
|
for (var r = t; r; ) {
|
|
1117
1117
|
var n;
|
|
1118
1118
|
if (e.contains(r))
|
|
@@ -1123,13 +1123,13 @@ function Yt(e, t) {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
var Q = {
|
|
1125
1125
|
isTouch: !1
|
|
1126
|
-
},
|
|
1126
|
+
}, Yt = 0;
|
|
1127
1127
|
function fi() {
|
|
1128
1128
|
Q.isTouch || (Q.isTouch = !0, window.performance && document.addEventListener("mousemove", vr));
|
|
1129
1129
|
}
|
|
1130
1130
|
function vr() {
|
|
1131
1131
|
var e = performance.now();
|
|
1132
|
-
e -
|
|
1132
|
+
e - Yt < 20 && (Q.isTouch = !1, document.removeEventListener("mousemove", vr)), Yt = e;
|
|
1133
1133
|
}
|
|
1134
1134
|
function pi() {
|
|
1135
1135
|
var e = document.activeElement;
|
|
@@ -1471,9 +1471,9 @@ function Ti(e, t) {
|
|
|
1471
1471
|
function Z(a) {
|
|
1472
1472
|
if (!(Q.isTouch && (s || a.type === "mousedown"))) {
|
|
1473
1473
|
var v = a.composedPath && a.composedPath()[0] || a.target;
|
|
1474
|
-
if (!(i.props.interactive &&
|
|
1474
|
+
if (!(i.props.interactive && Xt(l, v))) {
|
|
1475
1475
|
if (Te(i.props.triggerTarget || e).some(function(h) {
|
|
1476
|
-
return
|
|
1476
|
+
return Xt(h, v);
|
|
1477
1477
|
})) {
|
|
1478
1478
|
if (Q.isTouch || i.state.isVisible && i.props.trigger.indexOf("click") >= 0)
|
|
1479
1479
|
return;
|
|
@@ -1593,8 +1593,8 @@ function Ti(e, t) {
|
|
|
1593
1593
|
function Me(a) {
|
|
1594
1594
|
return Q.isTouch ? R() !== a.type.indexOf("touch") >= 0 : !1;
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1597
|
-
|
|
1596
|
+
function Xe() {
|
|
1597
|
+
Ye();
|
|
1598
1598
|
var a = i.props, v = a.popperOptions, h = a.placement, C = a.offset, A = a.getReferenceClientRect, V = a.moveTransition, q = N() ? Ot(l).arrow : null, Oe = A ? {
|
|
1599
1599
|
getBoundingClientRect: A,
|
|
1600
1600
|
contextElement: A.contextElement || M()
|
|
@@ -1650,12 +1650,12 @@ function Ti(e, t) {
|
|
|
1650
1650
|
modifiers: ve
|
|
1651
1651
|
}));
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function Ye() {
|
|
1654
1654
|
i.popperInstance && (i.popperInstance.destroy(), i.popperInstance = null);
|
|
1655
1655
|
}
|
|
1656
1656
|
function oe() {
|
|
1657
1657
|
var a = i.props.appendTo, v, h = M();
|
|
1658
|
-
i.props.interactive && a === lr || a === "parent" ? v = h.parentNode : v = dr(a, [h]), v.contains(l) || v.appendChild(l), i.state.isMounted = !0,
|
|
1658
|
+
i.props.interactive && a === lr || a === "parent" ? v = h.parentNode : v = dr(a, [h]), v.contains(l) || v.appendChild(l), i.state.isMounted = !0, Xe(), process.env.NODE_ENV !== "production" && ae(i.props.interactive && a === U.appendTo && h.nextElementSibling !== l, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
1659
1659
|
|
|
1660
1660
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
1661
1661
|
|
|
@@ -1704,7 +1704,7 @@ function Ti(e, t) {
|
|
|
1704
1704
|
}));
|
|
1705
1705
|
i.props = h, we(), v.interactiveDebounce !== h.interactiveDebounce && (pe(), O = Ut(qe, h.interactiveDebounce)), v.triggerTarget && !h.triggerTarget ? Te(v.triggerTarget).forEach(function(C) {
|
|
1706
1706
|
C.removeAttribute("aria-expanded");
|
|
1707
|
-
}) : h.triggerTarget && e.removeAttribute("aria-expanded"), J(), I(), T && T(v, h), i.popperInstance && (
|
|
1707
|
+
}) : h.triggerTarget && e.removeAttribute("aria-expanded"), J(), I(), T && T(v, h), i.popperInstance && (Xe(), ce().forEach(function(C) {
|
|
1708
1708
|
requestAnimationFrame(C._tippy.popperInstance.forceUpdate);
|
|
1709
1709
|
})), k("onAfterUpdate", [i, a]);
|
|
1710
1710
|
}
|
|
@@ -1751,7 +1751,7 @@ function Ti(e, t) {
|
|
|
1751
1751
|
process.env.NODE_ENV !== "production" && ae(i.state.isDestroyed, Ee("hideWithInteractivity")), H().addEventListener("mousemove", O), _t(nt, O), O(a);
|
|
1752
1752
|
}
|
|
1753
1753
|
function Er() {
|
|
1754
|
-
process.env.NODE_ENV !== "production" && ae(i.state.isDestroyed, Ee("unmount")), i.state.isVisible && i.hide(), i.state.isMounted && (
|
|
1754
|
+
process.env.NODE_ENV !== "production" && ae(i.state.isDestroyed, Ee("unmount")), i.state.isVisible && i.hide(), i.state.isMounted && (Ye(), ce().forEach(function(a) {
|
|
1755
1755
|
a._tippy.unmount();
|
|
1756
1756
|
}), l.parentNode && l.parentNode.removeChild(l), mt = mt.filter(function(a) {
|
|
1757
1757
|
return a !== i;
|
|
@@ -9,48 +9,48 @@ var s = (e, o, t) => (x(e, o, "read from private field"), t ? t.call(e) : o.get(
|
|
|
9
9
|
}, p = (e, o, t, i) => (x(e, o, "write to private field"), i ? i.call(e, t) : o.set(e, t), t);
|
|
10
10
|
var S = (e, o, t) => (x(e, o, "access private method"), t);
|
|
11
11
|
import { w, h as O } from "./meta-tAGyVRPE.js";
|
|
12
|
-
import { l as b, e as
|
|
13
|
-
import { $ as
|
|
14
|
-
import { t as E, p as F, d as q } from "./tippy.esm-
|
|
12
|
+
import { l as b, e as A, t as B } from "./icons-HYkfuR-O.js";
|
|
13
|
+
import { $ as f, T as N, y as M, P as R, A as _ } from "./index-Ls2I7eOW.js";
|
|
14
|
+
import { t as E, p as F, d as q } from "./tippy.esm-4ny8MQOF.js";
|
|
15
15
|
const K = {
|
|
16
16
|
mode: "preview"
|
|
17
|
-
}, L =
|
|
17
|
+
}, L = f({ ...K }, "linkTooltipStateCtx");
|
|
18
18
|
w(L, {
|
|
19
19
|
displayName: "State<link-tooltip>",
|
|
20
20
|
group: "LinkTooltip"
|
|
21
21
|
});
|
|
22
|
-
const
|
|
22
|
+
const D = {
|
|
23
23
|
addLink: () => {
|
|
24
24
|
},
|
|
25
25
|
editLink: () => {
|
|
26
26
|
},
|
|
27
27
|
removeLink: () => {
|
|
28
28
|
}
|
|
29
|
-
}, Q =
|
|
29
|
+
}, Q = f({ ...D }, "linkTooltipAPICtx");
|
|
30
30
|
w(L, {
|
|
31
31
|
displayName: "API<link-tooltip>",
|
|
32
32
|
group: "LinkTooltip"
|
|
33
33
|
});
|
|
34
|
-
const
|
|
34
|
+
const H = {
|
|
35
35
|
linkIcon: () => b,
|
|
36
|
-
editButton: () =>
|
|
37
|
-
removeButton: () =>
|
|
36
|
+
editButton: () => A,
|
|
37
|
+
removeButton: () => B,
|
|
38
38
|
confirmButton: () => O`Confirm ⏎`,
|
|
39
39
|
onCopyLink: () => {
|
|
40
40
|
},
|
|
41
41
|
inputPlaceholder: "Paste link..."
|
|
42
|
-
}, V =
|
|
43
|
-
...
|
|
42
|
+
}, V = f({
|
|
43
|
+
...H
|
|
44
44
|
}, "linkTooltipConfigCtx");
|
|
45
45
|
w(L, {
|
|
46
46
|
displayName: "Config<link-tooltip>",
|
|
47
47
|
group: "LinkTooltip"
|
|
48
48
|
});
|
|
49
|
-
var n, r, h, u, d,
|
|
49
|
+
var n, r, h, u, d, y, $;
|
|
50
50
|
class W {
|
|
51
51
|
constructor(o) {
|
|
52
52
|
/// @internal
|
|
53
|
-
l(this,
|
|
53
|
+
l(this, y);
|
|
54
54
|
/// @internal
|
|
55
55
|
l(this, n, void 0);
|
|
56
56
|
/// @internal
|
|
@@ -90,15 +90,15 @@ class W {
|
|
|
90
90
|
}, this.hide = () => {
|
|
91
91
|
var t;
|
|
92
92
|
(t = s(this, n)) == null || t.hide();
|
|
93
|
-
}, this.getInstance = () => s(this, n), this.element = o.content, p(this, r, o.tippyOptions ?? {}), p(this, h, o.debounce ?? 200), p(this, u, o.shouldShow ?? S(this,
|
|
93
|
+
}, this.getInstance = () => s(this, n), this.element = o.content, p(this, r, o.tippyOptions ?? {}), p(this, h, o.debounce ?? 200), p(this, u, o.shouldShow ?? S(this, y, $));
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
n = new WeakMap(), r = new WeakMap(), h = new WeakMap(), u = new WeakMap(), d = new WeakMap(),
|
|
97
|
-
const { doc: t, selection: i } = o.state, { empty: a, from: c, to: m } = i, g = !t.textBetween(c, m).length && o.state.selection instanceof
|
|
96
|
+
n = new WeakMap(), r = new WeakMap(), h = new WeakMap(), u = new WeakMap(), d = new WeakMap(), y = new WeakSet(), $ = function(o) {
|
|
97
|
+
const { doc: t, selection: i } = o.state, { empty: a, from: c, to: m } = i, g = !t.textBetween(c, m).length && o.state.selection instanceof N, k = this.element.contains(document.activeElement), T = !o.hasFocus() && !k, P = !o.editable;
|
|
98
98
|
return !(T || a || g || P);
|
|
99
99
|
};
|
|
100
100
|
function X(e) {
|
|
101
|
-
const o =
|
|
101
|
+
const o = f({}, `${e}_TOOLTIP_SPEC`), t = M((a) => {
|
|
102
102
|
const c = a.get(o.key);
|
|
103
103
|
return new R({
|
|
104
104
|
key: new _(`${e}_TOOLTIP`),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milkdown/crepe",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.6",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"nanoid": "^5.0.0",
|
|
40
40
|
"thememirror": "^2.0.1",
|
|
41
41
|
"tslib": "^2.5.0",
|
|
42
|
-
"@milkdown/components": "7.3.
|
|
43
|
-
"@milkdown/core": "7.3.
|
|
44
|
-
"@milkdown/ctx": "7.3.
|
|
45
|
-
"@milkdown/plugin-block": "7.3.
|
|
46
|
-
"@milkdown/plugin-clipboard": "7.3.
|
|
47
|
-
"@milkdown/plugin-cursor": "7.3.
|
|
48
|
-
"@milkdown/plugin-history": "7.3.
|
|
49
|
-
"@milkdown/plugin-indent": "7.3.
|
|
50
|
-
"@milkdown/plugin-slash": "7.3.
|
|
51
|
-
"@milkdown/plugin-tooltip": "7.3.
|
|
52
|
-
"@milkdown/preset-commonmark": "7.3.
|
|
53
|
-
"@milkdown/prose": "7.3.
|
|
54
|
-
"@milkdown/utils": "7.3.
|
|
42
|
+
"@milkdown/components": "7.3.6",
|
|
43
|
+
"@milkdown/core": "7.3.6",
|
|
44
|
+
"@milkdown/ctx": "7.3.6",
|
|
45
|
+
"@milkdown/plugin-block": "7.3.6",
|
|
46
|
+
"@milkdown/plugin-clipboard": "7.3.6",
|
|
47
|
+
"@milkdown/plugin-cursor": "7.3.6",
|
|
48
|
+
"@milkdown/plugin-history": "7.3.6",
|
|
49
|
+
"@milkdown/plugin-indent": "7.3.6",
|
|
50
|
+
"@milkdown/plugin-slash": "7.3.6",
|
|
51
|
+
"@milkdown/plugin-tooltip": "7.3.6",
|
|
52
|
+
"@milkdown/preset-commonmark": "7.3.6",
|
|
53
|
+
"@milkdown/prose": "7.3.6",
|
|
54
|
+
"@milkdown/utils": "7.3.6"
|
|
55
55
|
},
|
|
56
56
|
"nx": {
|
|
57
57
|
"targets": {
|
package/src/core/crepe.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { BlockProvider, block } from '@milkdown/plugin-block'
|
|
|
5
5
|
import type { Ctx } from '@milkdown/ctx'
|
|
6
6
|
import type { EditorView } from '@milkdown/prose/view'
|
|
7
7
|
import type { AtomicoThis } from 'atomico/types/dom'
|
|
8
|
-
import { editorViewCtx } from '@milkdown/core'
|
|
8
|
+
import { editorViewCtx, rootDOMCtx } from '@milkdown/core'
|
|
9
9
|
import { paragraphSchema } from '@milkdown/preset-commonmark'
|
|
10
10
|
import { menuAPI } from '../menu'
|
|
11
11
|
import type { BlockHandleProps } from './component'
|
|
@@ -25,6 +25,7 @@ export class BlockHandleView implements PluginView {
|
|
|
25
25
|
ctx,
|
|
26
26
|
content,
|
|
27
27
|
tippyOptions: {
|
|
28
|
+
appendTo: () => ctx.get(rootDOMCtx),
|
|
28
29
|
onShow: () => {
|
|
29
30
|
this.#content.show = true
|
|
30
31
|
},
|
|
@@ -5,6 +5,7 @@ import { SlashProvider, slashFactory } from '@milkdown/plugin-slash'
|
|
|
5
5
|
import type { Ctx } from '@milkdown/ctx'
|
|
6
6
|
import type { AtomicoThis } from 'atomico/types/dom'
|
|
7
7
|
import { $ctx } from '@milkdown/utils'
|
|
8
|
+
import { rootDOMCtx } from '@milkdown/core'
|
|
8
9
|
import { isInCodeBlock, isInList } from '../../../utils'
|
|
9
10
|
import type { MenuProps } from './component'
|
|
10
11
|
import { MenuElement } from './component'
|
|
@@ -43,6 +44,7 @@ class MenuView implements PluginView {
|
|
|
43
44
|
content: this.#content,
|
|
44
45
|
debounce: 20,
|
|
45
46
|
tippyOptions: {
|
|
47
|
+
appendTo: () => ctx.get(rootDOMCtx),
|
|
46
48
|
onShow: () => {
|
|
47
49
|
this.#content.show = true
|
|
48
50
|
},
|
|
@@ -5,6 +5,7 @@ import { TextSelection } from '@milkdown/prose/state'
|
|
|
5
5
|
import type { Ctx } from '@milkdown/ctx'
|
|
6
6
|
import type { EditorView } from '@milkdown/prose/view'
|
|
7
7
|
import type { AtomicoThis } from 'atomico/types/dom'
|
|
8
|
+
import { rootDOMCtx } from '@milkdown/core'
|
|
8
9
|
import type { DefineFeature } from '../shared'
|
|
9
10
|
import { injectStyle } from '../../core/slice'
|
|
10
11
|
import type { ToolbarProps } from './component'
|
|
@@ -26,6 +27,7 @@ class ToolbarView implements PluginView {
|
|
|
26
27
|
content: this.#content,
|
|
27
28
|
debounce: 20,
|
|
28
29
|
tippyOptions: {
|
|
30
|
+
appendTo: () => ctx.get(rootDOMCtx),
|
|
29
31
|
onShow: () => {
|
|
30
32
|
this.#content.show = true
|
|
31
33
|
},
|
package/lib/yaml-DnNTfjXK.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
var l = ["true", "false", "on", "off", "yes", "no"], f = new RegExp("\\b((" + l.join(")|(") + "))$", "i");
|
|
2
|
-
const a = {
|
|
3
|
-
name: "yaml",
|
|
4
|
-
token: function(n, i) {
|
|
5
|
-
var r = n.peek(), e = i.escaped;
|
|
6
|
-
if (i.escaped = !1, r == "#" && (n.pos == 0 || /\s/.test(n.string.charAt(n.pos - 1))))
|
|
7
|
-
return n.skipToEnd(), "comment";
|
|
8
|
-
if (n.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))
|
|
9
|
-
return "string";
|
|
10
|
-
if (i.literal && n.indentation() > i.keyCol)
|
|
11
|
-
return n.skipToEnd(), "string";
|
|
12
|
-
if (i.literal && (i.literal = !1), n.sol()) {
|
|
13
|
-
if (i.keyCol = 0, i.pair = !1, i.pairStart = !1, n.match("---") || n.match("..."))
|
|
14
|
-
return "def";
|
|
15
|
-
if (n.match(/^\s*-\s+/))
|
|
16
|
-
return "meta";
|
|
17
|
-
}
|
|
18
|
-
if (n.match(/^(\{|\}|\[|\])/))
|
|
19
|
-
return r == "{" ? i.inlinePairs++ : r == "}" ? i.inlinePairs-- : r == "[" ? i.inlineList++ : i.inlineList--, "meta";
|
|
20
|
-
if (i.inlineList > 0 && !e && r == ",")
|
|
21
|
-
return n.next(), "meta";
|
|
22
|
-
if (i.inlinePairs > 0 && !e && r == ",")
|
|
23
|
-
return i.keyCol = 0, i.pair = !1, i.pairStart = !1, n.next(), "meta";
|
|
24
|
-
if (i.pairStart) {
|
|
25
|
-
if (n.match(/^\s*(\||\>)\s*/))
|
|
26
|
-
return i.literal = !0, "meta";
|
|
27
|
-
if (n.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))
|
|
28
|
-
return "variable";
|
|
29
|
-
if (i.inlinePairs == 0 && n.match(/^\s*-?[0-9\.\,]+\s?$/) || i.inlinePairs > 0 && n.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))
|
|
30
|
-
return "number";
|
|
31
|
-
if (n.match(f))
|
|
32
|
-
return "keyword";
|
|
33
|
-
}
|
|
34
|
-
return !i.pair && n.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/) ? (i.pair = !0, i.keyCol = n.indentation(), "atom") : i.pair && n.match(/^:\s*/) ? (i.pairStart = !0, "meta") : (i.pairStart = !1, i.escaped = r == "\\", n.next(), null);
|
|
35
|
-
},
|
|
36
|
-
startState: function() {
|
|
37
|
-
return {
|
|
38
|
-
pair: !1,
|
|
39
|
-
pairStart: !1,
|
|
40
|
-
keyCol: 0,
|
|
41
|
-
inlinePairs: 0,
|
|
42
|
-
inlineList: 0,
|
|
43
|
-
literal: !1,
|
|
44
|
-
escaped: !1
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
languageData: {
|
|
48
|
-
commentTokens: { line: "#" }
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
export {
|
|
52
|
-
a as yaml
|
|
53
|
-
};
|