@milkdown/core
Advanced tools
Comparing version 7.1.2-next.1 to 7.1.2-next.2
@@ -35,8 +35,8 @@ var Ae = Object.defineProperty; | ||
}), t; | ||
}, 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 () => { | ||
}, E = w("InitReady"), Q = i([], "initTimer"), ke = i({}, "editor"), ye = i([], "inputRules"), V = 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(V).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(U).remove(T).remove(Q).clearTimer(E); | ||
r.remove(ke).remove(V).remove(we).remove(ye).remove(fe).remove(Ce).remove(U).remove(T).remove(Q).clearTimer(E); | ||
}; | ||
@@ -83,3 +83,3 @@ }); | ||
}); | ||
const W = w("SerializerReady"), te = i([], "serializerTimer"), re = i(() => "", "serializer"), Ie = (e) => (e.inject(re).inject(te, [j]).record(W), async () => { | ||
const W = w("SerializerReady"), te = i([], "serializerTimer"), re = i(() => "", "serializer"), Ve = (e) => (e.inject(re).inject(te, [j]).record(W), async () => { | ||
await e.waitTimers(te); | ||
@@ -91,3 +91,3 @@ const t = e.get(T), r = e.get(k); | ||
}); | ||
f(Ie, { | ||
f(Ve, { | ||
displayName: "Serializer" | ||
@@ -103,5 +103,5 @@ }); | ||
throw $e(e); | ||
}, it = new Re("MILKDOWN_STATE_TRACKER"), Ve = (e) => (e.inject(se).inject(b).inject(ie).inject(ne, [K, W, q]).record(B), async () => { | ||
}, it = new Re("MILKDOWN_STATE_TRACKER"), Ie = (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 = [ | ||
const t = e.get(k), r = e.get(L), n = e.get(ye), o = e.get(ie), a = e.get(V), p = e.get(se), d = st(p, r, t), z = [ | ||
...a, | ||
@@ -121,3 +121,3 @@ new De({ | ||
]; | ||
e.set(I, z); | ||
e.set(V, z); | ||
const _ = o({ | ||
@@ -132,3 +132,3 @@ schema: t, | ||
}); | ||
f(Ve, { | ||
f(Ie, { | ||
displayName: "EditorState" | ||
@@ -146,3 +146,3 @@ }); | ||
const t = e.get(me) || document.body, r = typeof t == "string" ? document.querySelector(t) : t; | ||
e.update(I, (z) => [ | ||
e.update(V, (z) => [ | ||
new De({ | ||
@@ -212,3 +212,3 @@ key: at, | ||
}); | ||
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; | ||
var mt = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.OnCreate = "OnCreate", e.Created = "Created", e.OnDestroy = "OnDestroy", e.Destroyed = "Destroyed", e))(mt || {}), P, u, y, I, J, $, h, g, R, F, D, M, G, v, N; | ||
const Te = class { | ||
@@ -219,3 +219,3 @@ constructor() { | ||
c(this, y, []); | ||
c(this, V, () => { | ||
c(this, I, () => { | ||
}); | ||
@@ -233,5 +233,5 @@ c(this, J, new Pe()); | ||
Ee, | ||
Ve, | ||
Ne, | ||
Ie, | ||
Ne, | ||
Ve, | ||
Me, | ||
@@ -259,3 +259,3 @@ rt(this), | ||
c(this, v, (t) => { | ||
C(this, u, t), s(this, V).call(this, t); | ||
C(this, u, t), s(this, I).call(this, t); | ||
}); | ||
@@ -270,3 +270,3 @@ c(this, N, (t) => [...t.entries()].map(async ([r, n]) => { | ||
l(this, "enableInspector", (t = !0) => (C(this, P, t), this)); | ||
l(this, "onStatusChange", (t) => (C(this, V, t), this)); | ||
l(this, "onStatusChange", (t) => (C(this, I, t), this)); | ||
l(this, "config", (t) => (s(this, y).push(t), this)); | ||
@@ -301,3 +301,3 @@ l(this, "removeConfig", (t) => (C(this, y, s(this, y).filter((r) => r !== t)), this)); | ||
l(this, "action", (t) => t(s(this, R))); | ||
l(this, "collectInspection", () => s(this, P) ? [...s(this, g).values(), ...s(this, h).values()].map(({ ctx: t }) => { | ||
l(this, "inspect", () => s(this, P) ? [...s(this, g).values(), ...s(this, h).values()].map(({ ctx: t }) => { | ||
var r; | ||
@@ -318,3 +318,3 @@ return (r = t == null ? void 0 : t.inspector) == null ? void 0 : r.read(); | ||
let Se = Te; | ||
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(); | ||
P = new WeakMap(), u = new WeakMap(), y = new WeakMap(), I = 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 { | ||
@@ -340,3 +340,3 @@ ct as CommandManager, | ||
ke as editorCtx, | ||
Ve as editorState, | ||
Ie as editorState, | ||
b as editorStateCtx, | ||
@@ -360,3 +360,3 @@ ie as editorStateOptionsCtx, | ||
ee as parserTimerCtx, | ||
I as prosePluginsCtx, | ||
V as prosePluginsCtx, | ||
T as remarkCtx, | ||
@@ -372,3 +372,3 @@ we as remarkPluginsCtx, | ||
X as schemaTimerCtx, | ||
Ie as serializer, | ||
Ve as serializer, | ||
re as serializerCtx, | ||
@@ -375,0 +375,0 @@ te as serializerTimerCtx |
@@ -1,2 +0,2 @@ | ||
import type { Inspection, MilkdownPlugin } from '@milkdown/ctx'; | ||
import type { MilkdownPlugin, Telemetry } from '@milkdown/ctx'; | ||
import { Ctx } from '@milkdown/ctx'; | ||
@@ -26,4 +26,4 @@ import type { Config } from '../internal-plugin'; | ||
readonly action: <T>(action: (ctx: Ctx) => T) => T; | ||
readonly collectInspection: () => Inspection[]; | ||
readonly inspect: () => Telemetry[]; | ||
} | ||
//# sourceMappingURL=editor.d.ts.map |
@@ -35,8 +35,8 @@ var Ae = Object.defineProperty; | ||
}), t; | ||
}, 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 () => { | ||
}, E = w("InitReady"), Q = i([], "initTimer"), ke = i({}, "editor"), ye = i([], "inputRules"), V = 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(V).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(U).remove(T).remove(Q).clearTimer(E); | ||
r.remove(ke).remove(V).remove(we).remove(ye).remove(fe).remove(Ce).remove(U).remove(T).remove(Q).clearTimer(E); | ||
}; | ||
@@ -83,3 +83,3 @@ }); | ||
}); | ||
const W = w("SerializerReady"), te = i([], "serializerTimer"), re = i(() => "", "serializer"), Ie = (e) => (e.inject(re).inject(te, [j]).record(W), async () => { | ||
const W = w("SerializerReady"), te = i([], "serializerTimer"), re = i(() => "", "serializer"), Ve = (e) => (e.inject(re).inject(te, [j]).record(W), async () => { | ||
await e.waitTimers(te); | ||
@@ -91,3 +91,3 @@ const t = e.get(T), r = e.get(k); | ||
}); | ||
f(Ie, { | ||
f(Ve, { | ||
displayName: "Serializer" | ||
@@ -103,5 +103,5 @@ }); | ||
throw $e(e); | ||
}, it = new Re("MILKDOWN_STATE_TRACKER"), Ve = (e) => (e.inject(se).inject(b).inject(ie).inject(ne, [K, W, q]).record(B), async () => { | ||
}, it = new Re("MILKDOWN_STATE_TRACKER"), Ie = (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 = [ | ||
const t = e.get(k), r = e.get(L), n = e.get(ye), o = e.get(ie), a = e.get(V), p = e.get(se), d = st(p, r, t), z = [ | ||
...a, | ||
@@ -121,3 +121,3 @@ new De({ | ||
]; | ||
e.set(I, z); | ||
e.set(V, z); | ||
const _ = o({ | ||
@@ -132,3 +132,3 @@ schema: t, | ||
}); | ||
f(Ve, { | ||
f(Ie, { | ||
displayName: "EditorState" | ||
@@ -146,3 +146,3 @@ }); | ||
const t = e.get(me) || document.body, r = typeof t == "string" ? document.querySelector(t) : t; | ||
e.update(I, (z) => [ | ||
e.update(V, (z) => [ | ||
new De({ | ||
@@ -212,3 +212,3 @@ key: at, | ||
}); | ||
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; | ||
var mt = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.OnCreate = "OnCreate", e.Created = "Created", e.OnDestroy = "OnDestroy", e.Destroyed = "Destroyed", e))(mt || {}), P, u, y, I, J, $, h, g, R, F, D, M, G, v, N; | ||
const Te = class { | ||
@@ -219,3 +219,3 @@ constructor() { | ||
c(this, y, []); | ||
c(this, V, () => { | ||
c(this, I, () => { | ||
}); | ||
@@ -233,5 +233,5 @@ c(this, J, new Pe()); | ||
Ee, | ||
Ve, | ||
Ne, | ||
Ie, | ||
Ne, | ||
Ve, | ||
Me, | ||
@@ -259,3 +259,3 @@ rt(this), | ||
c(this, v, (t) => { | ||
C(this, u, t), s(this, V).call(this, t); | ||
C(this, u, t), s(this, I).call(this, t); | ||
}); | ||
@@ -270,3 +270,3 @@ c(this, N, (t) => [...t.entries()].map(async ([r, n]) => { | ||
l(this, "enableInspector", (t = !0) => (C(this, P, t), this)); | ||
l(this, "onStatusChange", (t) => (C(this, V, t), this)); | ||
l(this, "onStatusChange", (t) => (C(this, I, t), this)); | ||
l(this, "config", (t) => (s(this, y).push(t), this)); | ||
@@ -301,3 +301,3 @@ l(this, "removeConfig", (t) => (C(this, y, s(this, y).filter((r) => r !== t)), this)); | ||
l(this, "action", (t) => t(s(this, R))); | ||
l(this, "collectInspection", () => s(this, P) ? [...s(this, g).values(), ...s(this, h).values()].map(({ ctx: t }) => { | ||
l(this, "inspect", () => s(this, P) ? [...s(this, g).values(), ...s(this, h).values()].map(({ ctx: t }) => { | ||
var r; | ||
@@ -318,3 +318,3 @@ return (r = t == null ? void 0 : t.inspector) == null ? void 0 : r.read(); | ||
let Se = Te; | ||
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(); | ||
P = new WeakMap(), u = new WeakMap(), y = new WeakMap(), I = 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 { | ||
@@ -340,3 +340,3 @@ ct as CommandManager, | ||
ke as editorCtx, | ||
Ve as editorState, | ||
Ie as editorState, | ||
b as editorStateCtx, | ||
@@ -360,3 +360,3 @@ ie as editorStateOptionsCtx, | ||
ee as parserTimerCtx, | ||
I as prosePluginsCtx, | ||
V as prosePluginsCtx, | ||
T as remarkCtx, | ||
@@ -372,3 +372,3 @@ we as remarkPluginsCtx, | ||
X as schemaTimerCtx, | ||
Ie as serializer, | ||
Ve as serializer, | ||
re as serializerCtx, | ||
@@ -375,0 +375,0 @@ te as serializerTimerCtx |
{ | ||
"name": "@milkdown/core", | ||
"type": "module", | ||
"version": "7.1.2-next.1", | ||
"version": "7.1.2-next.2", | ||
"license": "MIT", | ||
@@ -37,8 +37,8 @@ "repository": { | ||
"unified": "^10.1.0", | ||
"@milkdown/exception": "7.1.2-next.1" | ||
"@milkdown/exception": "7.1.2-next.2" | ||
}, | ||
"devDependencies": { | ||
"@milkdown/ctx": "7.1.2-next.1", | ||
"@milkdown/prose": "7.1.2-next.1", | ||
"@milkdown/transformer": "7.1.2-next.1" | ||
"@milkdown/ctx": "7.1.2-next.2", | ||
"@milkdown/prose": "7.1.2-next.2", | ||
"@milkdown/transformer": "7.1.2-next.2" | ||
}, | ||
@@ -45,0 +45,0 @@ "nx": { |
/* Copyright 2021, Milkdown by Mirone. */ | ||
import type { CtxRunner, Inspection, MilkdownPlugin } from '@milkdown/ctx' | ||
import type { CtxRunner, MilkdownPlugin, Telemetry } from '@milkdown/ctx' | ||
import { Clock, Container, Ctx } from '@milkdown/ctx' | ||
@@ -274,3 +274,3 @@ | ||
/// Make sure you have enabled inspector by `editor.enableInspector()` before calling this method. | ||
readonly collectInspection = (): Inspection[] => { | ||
readonly inspect = (): Telemetry[] => { | ||
if (!this.#enableInspector) { | ||
@@ -282,4 +282,4 @@ console.warn('[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first.') | ||
.map(({ ctx }) => ctx?.inspector?.read()) | ||
.filter((x): x is Inspection => Boolean(x)) | ||
.filter((x): x is Telemetry => Boolean(x)) | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124508
117
0
0
0
6
+ Added@milkdown/ctx@7.5.0(transitive)
+ Added@milkdown/exception@7.1.2-next.27.5.0(transitive)
+ Added@milkdown/prose@7.5.0(transitive)
+ Added@milkdown/transformer@7.5.0(transitive)
- Removed@milkdown/ctx@7.5.8(transitive)
- Removed@milkdown/exception@7.1.2-next.17.5.8(transitive)
- Removed@milkdown/prose@7.5.8(transitive)
- Removed@milkdown/transformer@7.5.8(transitive)