Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@milkdown/core

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@milkdown/core - npm Package Compare versions

Comparing version 7.1.2-next.0 to 7.1.2-next.1

110

./lib/index.es.js

@@ -35,8 +35,8 @@ var Ae = Object.defineProperty;

}), t;
}, E = w("InitReady"), U = i([], "initTimer"), ke = i({}, "editor"), ye = i([], "inputRules"), I = i([], "prosePlugins"), we = i([], "remarkPlugins"), fe = i([], "nodeView"), Ce = i([], "markView"), T = i(pe().use(ue).use(he), "remark"), tt = {}, X = i(tt, "remarkStringifyOptions"), rt = (e) => {
const t = (r) => (r.inject(ke, e).inject(I).inject(we).inject(ye).inject(fe).inject(Ce).inject(X).inject(T, pe().use(ue).use(he)).inject(U, [A]).record(E), async () => {
await r.waitTimers(U);
const n = r.get(X);
}, E = w("InitReady"), Q = i([], "initTimer"), ke = i({}, "editor"), ye = i([], "inputRules"), I = i([], "prosePlugins"), we = i([], "remarkPlugins"), fe = i([], "nodeView"), Ce = i([], "markView"), T = i(pe().use(ue).use(he), "remark"), tt = {}, U = i(tt, "remarkStringifyOptions"), rt = (e) => {
const t = (r) => (r.inject(ke, e).inject(I).inject(we).inject(ye).inject(fe).inject(Ce).inject(U).inject(T, pe().use(ue).use(he)).inject(Q, [A]).record(E), async () => {
await r.waitTimers(Q);
const n = r.get(U);
return r.set(T, pe().use(ue).use(he, n)), r.done(E), () => {
r.remove(ke).remove(I).remove(we).remove(ye).remove(fe).remove(Ce).remove(X).remove(T).remove(U).clearTimer(E);
r.remove(ke).remove(I).remove(we).remove(ye).remove(fe).remove(Ce).remove(U).remove(T).remove(Q).clearTimer(E);
};

@@ -47,3 +47,3 @@ });

}), t;
}, j = w("schemaReady"), Z = i([], "schemaTimer"), k = i({}, "schema"), x = i([], "nodes"), ee = i([], "marks"), Oe = (e) => {
}, j = w("SchemaReady"), X = i([], "schemaTimer"), k = i({}, "schema"), Z = i([], "nodes"), x = i([], "marks"), Oe = (e) => {
var t;

@@ -54,7 +54,7 @@ return {

};
}, be = (e) => (e.inject(k).inject(x).inject(ee).inject(Z, [E]).record(j), async () => {
await e.waitTimers(Z);
}, be = (e) => (e.inject(k).inject(Z).inject(x).inject(X, [E]).record(j), async () => {
await e.waitTimers(X);
const t = e.get(T), n = e.get(we).reduce((p, d) => p.use(d), t);
e.set(T, n);
const o = Object.fromEntries(e.get(x).map(([p, d]) => [p, Oe(d)])), a = Object.fromEntries(e.get(ee).map(([p, d]) => [p, Oe(d)]));
const o = Object.fromEntries(e.get(Z).map(([p, d]) => [p, Oe(d)])), a = Object.fromEntries(e.get(x).map(([p, d]) => [p, Oe(d)]));
return e.set(

@@ -67,3 +67,3 @@ k,

), e.done(j), () => {
e.remove(k).remove(x).remove(ee).remove(Z).clearTimer(j);
e.remove(k).remove(Z).remove(x).remove(X).clearTimer(j);
};

@@ -76,7 +76,7 @@ });

throw Je();
}, "parser"), te = i([], "parserTimer"), Ee = (e) => (e.inject(L).inject(te, [j]).record(K), async () => {
await e.waitTimers(te);
}, "parser"), ee = i([], "parserTimer"), Ee = (e) => (e.inject(L).inject(ee, [j]).record(K), async () => {
await e.waitTimers(ee);
const t = e.get(T), r = e.get(k);
return e.set(L, Ge.create(r, t)), e.done(K), () => {
e.remove(L).remove(te).clearTimer(K);
e.remove(L).remove(ee).clearTimer(K);
};

@@ -87,7 +87,7 @@ });

});
const W = w("SerializerReady"), re = i([], "serializerTimer"), se = i(() => "", "serializer"), Ie = (e) => (e.inject(se).inject(re, [j]).record(W), async () => {
await e.waitTimers(re);
const W = w("SerializerReady"), te = i([], "serializerTimer"), re = i(() => "", "serializer"), Ie = (e) => (e.inject(re).inject(te, [j]).record(W), async () => {
await e.waitTimers(te);
const t = e.get(T), r = e.get(k);
return e.set(se, He.create(r, t)), e.done(W), () => {
e.remove(se).remove(re).clearTimer(W);
return e.set(re, He.create(r, t)), e.done(W), () => {
e.remove(re).remove(te).clearTimer(W);
};

@@ -98,3 +98,3 @@ });

});
const ie = i("", "defaultValue"), b = i({}, "editorState"), ne = i((e) => e, "stateOptions"), oe = i([], "editorStateTimer"), B = w("EditorStateReady"), st = (e, t, r) => {
const se = i("", "defaultValue"), b = i({}, "editorState"), ie = i((e) => e, "stateOptions"), ne = i([], "editorStateTimer"), B = w("EditorStateReady"), st = (e, t, r) => {
if (typeof e == "string")

@@ -107,5 +107,5 @@ return t(e);

throw $e(e);
}, it = new Re("MILKDOWN_STATE_TRACKER"), Ve = (e) => (e.inject(ie).inject(b).inject(ne).inject(oe, [K, W, J]).record(B), async () => {
await e.waitTimers(oe);
const t = e.get(k), r = e.get(L), n = e.get(ye), o = e.get(ne), a = e.get(I), p = e.get(ie), d = st(p, r, t), z = [
}, it = new Re("MILKDOWN_STATE_TRACKER"), Ve = (e) => (e.inject(se).inject(b).inject(ie).inject(ne, [K, W, q]).record(B), async () => {
await e.waitTimers(ne);
const t = e.get(k), r = e.get(L), n = e.get(ye), o = e.get(ie), a = e.get(I), p = e.get(se), d = st(p, r, t), z = [
...a,

@@ -117,3 +117,3 @@ new De({

},
apply: (ze, Q, dt, _e) => {
apply: (ze, H, dt, _e) => {
e.set(b, _e);

@@ -133,3 +133,3 @@ }

return e.set(b, m), e.done(B), () => {
e.remove(ie).remove(b).remove(ne).remove(oe).clearTimer(B);
e.remove(se).remove(b).remove(ie).remove(ne).clearTimer(B);
};

@@ -140,3 +140,3 @@ });

});
const Y = w("EditorViewReady"), q = i({}, "editorView"), ae = i([], "editorViewTimer"), ce = i({}, "editorViewOptions"), me = i(null, "root"), ge = i(null, "rootDOM"), ve = i({}, "rootAttrs"), nt = (e, t) => {
const oe = w("EditorViewReady"), Y = i({}, "editorView"), ae = i([], "editorViewTimer"), ce = i({}, "editorViewOptions"), me = i(null, "root"), ge = i(null, "rootDOM"), ve = i({}, "rootAttrs"), nt = (e, t) => {
const r = document.createElement("div");

@@ -148,3 +148,3 @@ r.className = "milkdown", e.appendChild(r), t.set(ge, r);

e.classList.add("editor"), e.setAttribute("role", "textbox");
}, at = new Re("MILKDOWN_VIEW_CLEAR"), Me = (e) => (e.inject(me, document.body).inject(q).inject(ce).inject(ge).inject(ve).inject(ae, [B]).record(Y), async () => {
}, at = new Re("MILKDOWN_VIEW_CLEAR"), Me = (e) => (e.inject(me, document.body).inject(Y).inject(ce).inject(ge).inject(ve).inject(ae, [B]).record(oe), async () => {
await e.wait(E);

@@ -159,4 +159,4 @@ const t = e.get(me) || document.body, r = typeof t == "string" ? document.querySelector(t) : t;

if (m && r) {
const Q = _.dom;
r.replaceChild(m, Q), m.appendChild(Q);
const H = _.dom;
r.replaceChild(m, H), m.appendChild(H);
}

@@ -178,4 +178,4 @@ })(), {

});
return ot(d.dom), e.set(q, d), e.done(Y), () => {
d == null || d.destroy(), e.remove(me).remove(q).remove(ce).remove(ge).remove(ve).remove(ae).clearTimer(Y);
return ot(d.dom), e.set(Y, d), e.done(oe), () => {
d == null || d.destroy(), e.remove(me).remove(Y).remove(ce).remove(ge).remove(ve).remove(ae).clearTimer(oe);
};

@@ -208,3 +208,3 @@ });

throw Fe();
const o = this.get(t)(r), a = s(this, S).get(q);
const o = this.get(t)(r), a = s(this, S).get(Y);
return o(a.state, a.dispatch, a);

@@ -214,4 +214,4 @@ }

O = new WeakMap(), S = new WeakMap();
const Ot = (e, t) => [e, t], St = (e = "cmdKey") => i(() => () => !1, e), de = i(new ct(), "commands"), le = i([j], "commandsTimer"), J = w("CommandsReady"), Ne = (e) => (e.inject(de).inject(le).record(J), e.get(de).setCtx(e), async () => (await e.waitTimers(le), e.done(J), await e.wait(Y), () => {
e.remove(de).remove(le).clearTimer(J);
const Ot = (e, t) => [e, t], St = (e = "cmdKey") => i(() => () => !1, e), de = i(new ct(), "commands"), le = i([j], "commandsTimer"), q = w("CommandsReady"), Ne = (e) => (e.inject(de).inject(le).record(q), e.get(de).setCtx(e), async () => (await e.waitTimers(le), e.done(q), () => {
e.remove(de).remove(le).clearTimer(q);
}));

@@ -221,3 +221,3 @@ f(Ne, {

});
var mt = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.OnCreate = "OnCreate", e.Created = "Created", e.OnDestroy = "OnDestroy", e.Destroyed = "Destroyed", e))(mt || {}), P, u, y, V, $, F, h, g, R, G, D, M, H, v, N;
var mt = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.OnCreate = "OnCreate", e.Created = "Created", e.OnDestroy = "OnDestroy", e.Destroyed = "Destroyed", e))(mt || {}), P, u, y, V, J, $, h, g, R, F, D, M, G, v, N;
const Te = class {

@@ -230,8 +230,8 @@ constructor() {

});
c(this, $, new Pe());
c(this, F, new Le());
c(this, J, new Pe());
c(this, $, new Le());
c(this, h, /* @__PURE__ */ new Map());
c(this, g, /* @__PURE__ */ new Map());
c(this, R, new We(s(this, $), s(this, F)));
c(this, G, () => {
c(this, R, new We(s(this, J), s(this, $)));
c(this, F, () => {
const t = et(async (n) => {

@@ -263,3 +263,3 @@ await Promise.all(s(this, y).map((o) => o(n)));

));
c(this, H, async () => {
c(this, G, async () => {
await Promise.all([...s(this, g).entries()].map(([t, { cleanup: r }]) => typeof r == "function" ? r() : r)), s(this, g).clear();

@@ -296,3 +296,3 @@ });

})) : (await s(this, M).call(this, [t].flat(), !0), this));
l(this, "create", async () => s(this, u) === "OnCreate" ? this : (s(this, u) === "Created" && await this.destroy(), s(this, v).call(this, "OnCreate"), s(this, G).call(this), s(this, D).call(this, [...s(this, h).keys()]), await Promise.all(
l(this, "create", async () => s(this, u) === "OnCreate" ? this : (s(this, u) === "Created" && await this.destroy(), s(this, v).call(this, "OnCreate"), s(this, F).call(this), s(this, D).call(this, [...s(this, h).keys()]), await Promise.all(
[

@@ -307,3 +307,3 @@ s(this, N).call(this, s(this, g)),

}, 50);
}) : (t && C(this, y, []), s(this, v).call(this, "OnDestroy"), await s(this, M).call(this, [...s(this, h).keys()], t), await s(this, H).call(this), s(this, v).call(this, "Destroyed"), this));
}) : (t && C(this, y, []), s(this, v).call(this, "OnDestroy"), await s(this, M).call(this, [...s(this, h).keys()], t), await s(this, G).call(this), s(this, v).call(this, "Destroyed"), this));
l(this, "action", (t) => t(s(this, R)));

@@ -326,6 +326,6 @@ l(this, "collectInspection", () => s(this, P) ? [...s(this, g).values(), ...s(this, h).values()].map(({ ctx: t }) => {

let Se = Te;
P = new WeakMap(), u = new WeakMap(), y = new WeakMap(), V = new WeakMap(), $ = new WeakMap(), F = new WeakMap(), h = new WeakMap(), g = new WeakMap(), R = new WeakMap(), G = new WeakMap(), D = new WeakMap(), M = new WeakMap(), H = new WeakMap(), v = new WeakMap(), N = new WeakMap();
P = new WeakMap(), u = new WeakMap(), y = new WeakMap(), V = new WeakMap(), J = new WeakMap(), $ = new WeakMap(), h = new WeakMap(), g = new WeakMap(), R = new WeakMap(), F = new WeakMap(), D = new WeakMap(), M = new WeakMap(), G = new WeakMap(), v = new WeakMap(), N = new WeakMap();
export {
ct as CommandManager,
J as CommandsReady,
q as CommandsReady,
A as ConfigReady,

@@ -335,3 +335,3 @@ Se as Editor,

mt as EditorStatus,
Y as EditorViewReady,
oe as EditorViewReady,
E as InitReady,

@@ -347,10 +347,10 @@ K as ParserReady,

St as createCmdKey,
ie as defaultValueCtx,
se as defaultValueCtx,
ke as editorCtx,
Ve as editorState,
b as editorStateCtx,
ne as editorStateOptionsCtx,
oe as editorStateTimerCtx,
ie as editorStateOptionsCtx,
ne as editorStateTimerCtx,
Me as editorView,
q as editorViewCtx,
Y as editorViewCtx,
ce as editorViewOptionsCtx,

@@ -360,11 +360,11 @@ ae as editorViewTimerCtx,

rt as init,
U as initTimerCtx,
Q as initTimerCtx,
ye as inputRulesCtx,
Ce as markViewCtx,
ee as marksCtx,
x as marksCtx,
fe as nodeViewCtx,
x as nodesCtx,
Z as nodesCtx,
Ee as parser,
L as parserCtx,
te as parserTimerCtx,
ee as parserTimerCtx,
I as prosePluginsCtx,

@@ -374,3 +374,3 @@ T as remarkCtx,

tt as remarkStringifyDefaultOptions,
X as remarkStringifyOptionsCtx,
U as remarkStringifyOptionsCtx,
ve as rootAttrsCtx,

@@ -381,7 +381,7 @@ me as rootCtx,

k as schemaCtx,
Z as schemaTimerCtx,
X as schemaTimerCtx,
Ie as serializer,
se as serializerCtx,
re as serializerTimerCtx
re as serializerCtx,
te as serializerTimerCtx
};
//# sourceMappingURL=index.es.js.map

@@ -35,8 +35,8 @@ var Ae = Object.defineProperty;

}), t;
}, E = w("InitReady"), U = i([], "initTimer"), ke = i({}, "editor"), ye = i([], "inputRules"), I = i([], "prosePlugins"), we = i([], "remarkPlugins"), fe = i([], "nodeView"), Ce = i([], "markView"), T = i(pe().use(ue).use(he), "remark"), tt = {}, X = i(tt, "remarkStringifyOptions"), rt = (e) => {
const t = (r) => (r.inject(ke, e).inject(I).inject(we).inject(ye).inject(fe).inject(Ce).inject(X).inject(T, pe().use(ue).use(he)).inject(U, [A]).record(E), async () => {
await r.waitTimers(U);
const n = r.get(X);
}, E = w("InitReady"), Q = i([], "initTimer"), ke = i({}, "editor"), ye = i([], "inputRules"), I = i([], "prosePlugins"), we = i([], "remarkPlugins"), fe = i([], "nodeView"), Ce = i([], "markView"), T = i(pe().use(ue).use(he), "remark"), tt = {}, U = i(tt, "remarkStringifyOptions"), rt = (e) => {
const t = (r) => (r.inject(ke, e).inject(I).inject(we).inject(ye).inject(fe).inject(Ce).inject(U).inject(T, pe().use(ue).use(he)).inject(Q, [A]).record(E), async () => {
await r.waitTimers(Q);
const n = r.get(U);
return r.set(T, pe().use(ue).use(he, n)), r.done(E), () => {
r.remove(ke).remove(I).remove(we).remove(ye).remove(fe).remove(Ce).remove(X).remove(T).remove(U).clearTimer(E);
r.remove(ke).remove(I).remove(we).remove(ye).remove(fe).remove(Ce).remove(U).remove(T).remove(Q).clearTimer(E);
};

@@ -47,3 +47,3 @@ });

}), t;
}, j = w("schemaReady"), Z = i([], "schemaTimer"), k = i({}, "schema"), x = i([], "nodes"), ee = i([], "marks"), Oe = (e) => {
}, j = w("SchemaReady"), X = i([], "schemaTimer"), k = i({}, "schema"), Z = i([], "nodes"), x = i([], "marks"), Oe = (e) => {
var t;

@@ -54,7 +54,7 @@ return {

};
}, be = (e) => (e.inject(k).inject(x).inject(ee).inject(Z, [E]).record(j), async () => {
await e.waitTimers(Z);
}, be = (e) => (e.inject(k).inject(Z).inject(x).inject(X, [E]).record(j), async () => {
await e.waitTimers(X);
const t = e.get(T), n = e.get(we).reduce((p, d) => p.use(d), t);
e.set(T, n);
const o = Object.fromEntries(e.get(x).map(([p, d]) => [p, Oe(d)])), a = Object.fromEntries(e.get(ee).map(([p, d]) => [p, Oe(d)]));
const o = Object.fromEntries(e.get(Z).map(([p, d]) => [p, Oe(d)])), a = Object.fromEntries(e.get(x).map(([p, d]) => [p, Oe(d)]));
return e.set(

@@ -67,3 +67,3 @@ k,

), e.done(j), () => {
e.remove(k).remove(x).remove(ee).remove(Z).clearTimer(j);
e.remove(k).remove(Z).remove(x).remove(X).clearTimer(j);
};

@@ -76,7 +76,7 @@ });

throw Je();
}, "parser"), te = i([], "parserTimer"), Ee = (e) => (e.inject(L).inject(te, [j]).record(K), async () => {
await e.waitTimers(te);
}, "parser"), ee = i([], "parserTimer"), Ee = (e) => (e.inject(L).inject(ee, [j]).record(K), async () => {
await e.waitTimers(ee);
const t = e.get(T), r = e.get(k);
return e.set(L, Ge.create(r, t)), e.done(K), () => {
e.remove(L).remove(te).clearTimer(K);
e.remove(L).remove(ee).clearTimer(K);
};

@@ -87,7 +87,7 @@ });

});
const W = w("SerializerReady"), re = i([], "serializerTimer"), se = i(() => "", "serializer"), Ie = (e) => (e.inject(se).inject(re, [j]).record(W), async () => {
await e.waitTimers(re);
const W = w("SerializerReady"), te = i([], "serializerTimer"), re = i(() => "", "serializer"), Ie = (e) => (e.inject(re).inject(te, [j]).record(W), async () => {
await e.waitTimers(te);
const t = e.get(T), r = e.get(k);
return e.set(se, He.create(r, t)), e.done(W), () => {
e.remove(se).remove(re).clearTimer(W);
return e.set(re, He.create(r, t)), e.done(W), () => {
e.remove(re).remove(te).clearTimer(W);
};

@@ -98,3 +98,3 @@ });

});
const ie = i("", "defaultValue"), b = i({}, "editorState"), ne = i((e) => e, "stateOptions"), oe = i([], "editorStateTimer"), B = w("EditorStateReady"), st = (e, t, r) => {
const se = i("", "defaultValue"), b = i({}, "editorState"), ie = i((e) => e, "stateOptions"), ne = i([], "editorStateTimer"), B = w("EditorStateReady"), st = (e, t, r) => {
if (typeof e == "string")

@@ -107,5 +107,5 @@ return t(e);

throw $e(e);
}, it = new Re("MILKDOWN_STATE_TRACKER"), Ve = (e) => (e.inject(ie).inject(b).inject(ne).inject(oe, [K, W, J]).record(B), async () => {
await e.waitTimers(oe);
const t = e.get(k), r = e.get(L), n = e.get(ye), o = e.get(ne), a = e.get(I), p = e.get(ie), d = st(p, r, t), z = [
}, it = new Re("MILKDOWN_STATE_TRACKER"), Ve = (e) => (e.inject(se).inject(b).inject(ie).inject(ne, [K, W, q]).record(B), async () => {
await e.waitTimers(ne);
const t = e.get(k), r = e.get(L), n = e.get(ye), o = e.get(ie), a = e.get(I), p = e.get(se), d = st(p, r, t), z = [
...a,

@@ -117,3 +117,3 @@ new De({

},
apply: (ze, Q, dt, _e) => {
apply: (ze, H, dt, _e) => {
e.set(b, _e);

@@ -133,3 +133,3 @@ }

return e.set(b, m), e.done(B), () => {
e.remove(ie).remove(b).remove(ne).remove(oe).clearTimer(B);
e.remove(se).remove(b).remove(ie).remove(ne).clearTimer(B);
};

@@ -140,3 +140,3 @@ });

});
const Y = w("EditorViewReady"), q = i({}, "editorView"), ae = i([], "editorViewTimer"), ce = i({}, "editorViewOptions"), me = i(null, "root"), ge = i(null, "rootDOM"), ve = i({}, "rootAttrs"), nt = (e, t) => {
const oe = w("EditorViewReady"), Y = i({}, "editorView"), ae = i([], "editorViewTimer"), ce = i({}, "editorViewOptions"), me = i(null, "root"), ge = i(null, "rootDOM"), ve = i({}, "rootAttrs"), nt = (e, t) => {
const r = document.createElement("div");

@@ -148,3 +148,3 @@ r.className = "milkdown", e.appendChild(r), t.set(ge, r);

e.classList.add("editor"), e.setAttribute("role", "textbox");
}, at = new Re("MILKDOWN_VIEW_CLEAR"), Me = (e) => (e.inject(me, document.body).inject(q).inject(ce).inject(ge).inject(ve).inject(ae, [B]).record(Y), async () => {
}, at = new Re("MILKDOWN_VIEW_CLEAR"), Me = (e) => (e.inject(me, document.body).inject(Y).inject(ce).inject(ge).inject(ve).inject(ae, [B]).record(oe), async () => {
await e.wait(E);

@@ -159,4 +159,4 @@ const t = e.get(me) || document.body, r = typeof t == "string" ? document.querySelector(t) : t;

if (m && r) {
const Q = _.dom;
r.replaceChild(m, Q), m.appendChild(Q);
const H = _.dom;
r.replaceChild(m, H), m.appendChild(H);
}

@@ -178,4 +178,4 @@ })(), {

});
return ot(d.dom), e.set(q, d), e.done(Y), () => {
d == null || d.destroy(), e.remove(me).remove(q).remove(ce).remove(ge).remove(ve).remove(ae).clearTimer(Y);
return ot(d.dom), e.set(Y, d), e.done(oe), () => {
d == null || d.destroy(), e.remove(me).remove(Y).remove(ce).remove(ge).remove(ve).remove(ae).clearTimer(oe);
};

@@ -208,3 +208,3 @@ });

throw Fe();
const o = this.get(t)(r), a = s(this, S).get(q);
const o = this.get(t)(r), a = s(this, S).get(Y);
return o(a.state, a.dispatch, a);

@@ -214,4 +214,4 @@ }

O = new WeakMap(), S = new WeakMap();
const Ot = (e, t) => [e, t], St = (e = "cmdKey") => i(() => () => !1, e), de = i(new ct(), "commands"), le = i([j], "commandsTimer"), J = w("CommandsReady"), Ne = (e) => (e.inject(de).inject(le).record(J), e.get(de).setCtx(e), async () => (await e.waitTimers(le), e.done(J), await e.wait(Y), () => {
e.remove(de).remove(le).clearTimer(J);
const Ot = (e, t) => [e, t], St = (e = "cmdKey") => i(() => () => !1, e), de = i(new ct(), "commands"), le = i([j], "commandsTimer"), q = w("CommandsReady"), Ne = (e) => (e.inject(de).inject(le).record(q), e.get(de).setCtx(e), async () => (await e.waitTimers(le), e.done(q), () => {
e.remove(de).remove(le).clearTimer(q);
}));

@@ -221,3 +221,3 @@ f(Ne, {

});
var mt = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.OnCreate = "OnCreate", e.Created = "Created", e.OnDestroy = "OnDestroy", e.Destroyed = "Destroyed", e))(mt || {}), P, u, y, V, $, F, h, g, R, G, D, M, H, v, N;
var mt = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.OnCreate = "OnCreate", e.Created = "Created", e.OnDestroy = "OnDestroy", e.Destroyed = "Destroyed", e))(mt || {}), P, u, y, V, J, $, h, g, R, F, D, M, G, v, N;
const Te = class {

@@ -230,8 +230,8 @@ constructor() {

});
c(this, $, new Pe());
c(this, F, new Le());
c(this, J, new Pe());
c(this, $, new Le());
c(this, h, /* @__PURE__ */ new Map());
c(this, g, /* @__PURE__ */ new Map());
c(this, R, new We(s(this, $), s(this, F)));
c(this, G, () => {
c(this, R, new We(s(this, J), s(this, $)));
c(this, F, () => {
const t = et(async (n) => {

@@ -263,3 +263,3 @@ await Promise.all(s(this, y).map((o) => o(n)));

));
c(this, H, async () => {
c(this, G, async () => {
await Promise.all([...s(this, g).entries()].map(([t, { cleanup: r }]) => typeof r == "function" ? r() : r)), s(this, g).clear();

@@ -296,3 +296,3 @@ });

})) : (await s(this, M).call(this, [t].flat(), !0), this));
l(this, "create", async () => s(this, u) === "OnCreate" ? this : (s(this, u) === "Created" && await this.destroy(), s(this, v).call(this, "OnCreate"), s(this, G).call(this), s(this, D).call(this, [...s(this, h).keys()]), await Promise.all(
l(this, "create", async () => s(this, u) === "OnCreate" ? this : (s(this, u) === "Created" && await this.destroy(), s(this, v).call(this, "OnCreate"), s(this, F).call(this), s(this, D).call(this, [...s(this, h).keys()]), await Promise.all(
[

@@ -307,3 +307,3 @@ s(this, N).call(this, s(this, g)),

}, 50);
}) : (t && C(this, y, []), s(this, v).call(this, "OnDestroy"), await s(this, M).call(this, [...s(this, h).keys()], t), await s(this, H).call(this), s(this, v).call(this, "Destroyed"), this));
}) : (t && C(this, y, []), s(this, v).call(this, "OnDestroy"), await s(this, M).call(this, [...s(this, h).keys()], t), await s(this, G).call(this), s(this, v).call(this, "Destroyed"), this));
l(this, "action", (t) => t(s(this, R)));

@@ -326,6 +326,6 @@ l(this, "collectInspection", () => s(this, P) ? [...s(this, g).values(), ...s(this, h).values()].map(({ ctx: t }) => {

let Se = Te;
P = new WeakMap(), u = new WeakMap(), y = new WeakMap(), V = new WeakMap(), $ = new WeakMap(), F = new WeakMap(), h = new WeakMap(), g = new WeakMap(), R = new WeakMap(), G = new WeakMap(), D = new WeakMap(), M = new WeakMap(), H = new WeakMap(), v = new WeakMap(), N = new WeakMap();
P = new WeakMap(), u = new WeakMap(), y = new WeakMap(), V = new WeakMap(), J = new WeakMap(), $ = new WeakMap(), h = new WeakMap(), g = new WeakMap(), R = new WeakMap(), F = new WeakMap(), D = new WeakMap(), M = new WeakMap(), G = new WeakMap(), v = new WeakMap(), N = new WeakMap();
export {
ct as CommandManager,
J as CommandsReady,
q as CommandsReady,
A as ConfigReady,

@@ -335,3 +335,3 @@ Se as Editor,

mt as EditorStatus,
Y as EditorViewReady,
oe as EditorViewReady,
E as InitReady,

@@ -347,10 +347,10 @@ K as ParserReady,

St as createCmdKey,
ie as defaultValueCtx,
se as defaultValueCtx,
ke as editorCtx,
Ve as editorState,
b as editorStateCtx,
ne as editorStateOptionsCtx,
oe as editorStateTimerCtx,
ie as editorStateOptionsCtx,
ne as editorStateTimerCtx,
Me as editorView,
q as editorViewCtx,
Y as editorViewCtx,
ce as editorViewOptionsCtx,

@@ -360,11 +360,11 @@ ae as editorViewTimerCtx,

rt as init,
U as initTimerCtx,
Q as initTimerCtx,
ye as inputRulesCtx,
Ce as markViewCtx,
ee as marksCtx,
x as marksCtx,
fe as nodeViewCtx,
x as nodesCtx,
Z as nodesCtx,
Ee as parser,
L as parserCtx,
te as parserTimerCtx,
ee as parserTimerCtx,
I as prosePluginsCtx,

@@ -374,3 +374,3 @@ T as remarkCtx,

tt as remarkStringifyDefaultOptions,
X as remarkStringifyOptionsCtx,
U as remarkStringifyOptionsCtx,
ve as rootAttrsCtx,

@@ -381,7 +381,7 @@ me as rootCtx,

k as schemaCtx,
Z as schemaTimerCtx,
X as schemaTimerCtx,
Ie as serializer,
se as serializerCtx,
re as serializerTimerCtx
re as serializerCtx,
te as serializerTimerCtx
};
//# sourceMappingURL=index.es.js.map
{
"name": "@milkdown/core",
"type": "module",
"version": "7.1.2-next.0",
"version": "7.1.2-next.1",
"license": "MIT",

@@ -37,8 +37,8 @@ "repository": {

"unified": "^10.1.0",
"@milkdown/exception": "7.1.2-next.0"
"@milkdown/exception": "7.1.2-next.1"
},
"devDependencies": {
"@milkdown/ctx": "7.1.2-next.0",
"@milkdown/prose": "7.1.2-next.0",
"@milkdown/transformer": "7.1.2-next.0"
"@milkdown/ctx": "7.1.2-next.1",
"@milkdown/prose": "7.1.2-next.1",
"@milkdown/transformer": "7.1.2-next.1"
},

@@ -45,0 +45,0 @@ "nx": {

@@ -8,3 +8,3 @@ /* Copyright 2021, Milkdown by Mirone. */

import { withMeta } from '../__internal__'
import { EditorViewReady, editorViewCtx } from './editor-view'
import { editorViewCtx } from './editor-view'
import { SchemaReady } from './schema'

@@ -105,3 +105,2 @@

ctx.done(CommandsReady)
await ctx.wait(EditorViewReady)

@@ -108,0 +107,0 @@ return () => {

@@ -13,3 +13,3 @@ /* Copyright 2021, Milkdown by Mirone. */

/// The timer which will be resolved when the schema plugin is ready.
export const SchemaReady = createTimer('schemaReady')
export const SchemaReady = createTimer('SchemaReady')

@@ -16,0 +16,0 @@ /// A slice which stores timers that need to be waited for before starting to run the plugin.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc