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

@milkdown/exception

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@milkdown/exception - npm Package Compare versions

Comparing version 6.3.0 to 6.3.1

4

lib/code.d.ts

@@ -18,6 +18,8 @@ export declare const enum ErrorCode {

missingIcon = "missingIcon",
vueRendererCallOutOfScope = "vueRendererCallOutOfScope",
ctxNotBind = "ctxNotBind",
missingYjsDoc = "missingYjsDoc",
vueRendererCallOutOfScope = "vueRendererCallOutOfScope"
repeatCallsToMenuWrapperInit = "repeatCallsToMenuWrapperInit",
missingMenuWrapper = "missingMenuWrapper"
}
//# sourceMappingURL=code.d.ts.map

@@ -21,2 +21,4 @@ import { MilkdownError } from './error';

export declare const vueRendererCallOutOfScope: () => MilkdownError;
export declare const missingMenuWrapper: () => MilkdownError;
export declare const repeatCallsToMenuWrapperInit: () => MilkdownError;
//# sourceMappingURL=index.d.ts.map

@@ -1,3 +0,3 @@

var t = /* @__PURE__ */ ((e) => (e.docTypeError = "docTypeError", e.contextNotFound = "contextNotFound", e.timerNotFound = "timerNotFound", e.ctxCallOutOfScope = "ctxCallOutOfScope", e.createNodeInParserFail = "createNodeInParserFail", e.stackOverFlow = "stackOverFlow", e.parserMatchError = "parserMatchError", e.serializerMatchError = "serializerMatchError", e.getAtomFromSchemaFail = "getAtomFromSchemaFail", e.expectDomTypeError = "expectDomTypeError", e.callCommandBeforeEditorView = "callCommandBeforeEditorView", e.themeMustInstalled = "themeMustInstalled", e.missingRootElement = "missingRootElement", e.missingNodeInSchema = "missingNodeInSchema", e.missingMarkInSchema = "missingMarkInSchema", e.missingIcon = "missingIcon", e.ctxNotBind = "ctxNotBind", e.missingYjsDoc = "missingYjsDoc", e.vueRendererCallOutOfScope = "vueRendererCallOutOfScope", e))(t || {});
class n extends Error {
var n = /* @__PURE__ */ ((e) => (e.docTypeError = "docTypeError", e.contextNotFound = "contextNotFound", e.timerNotFound = "timerNotFound", e.ctxCallOutOfScope = "ctxCallOutOfScope", e.createNodeInParserFail = "createNodeInParserFail", e.stackOverFlow = "stackOverFlow", e.parserMatchError = "parserMatchError", e.serializerMatchError = "serializerMatchError", e.getAtomFromSchemaFail = "getAtomFromSchemaFail", e.expectDomTypeError = "expectDomTypeError", e.callCommandBeforeEditorView = "callCommandBeforeEditorView", e.themeMustInstalled = "themeMustInstalled", e.missingRootElement = "missingRootElement", e.missingNodeInSchema = "missingNodeInSchema", e.missingMarkInSchema = "missingMarkInSchema", e.missingIcon = "missingIcon", e.vueRendererCallOutOfScope = "vueRendererCallOutOfScope", e.ctxNotBind = "ctxNotBind", e.missingYjsDoc = "missingYjsDoc", e.repeatCallsToMenuWrapperInit = "repeatCallsToMenuWrapperInit", e.missingMenuWrapper = "missingMenuWrapper", e))(n || {});
class t extends Error {
constructor(o, s) {

@@ -7,3 +7,3 @@ super(s), this.name = "MilkdownError", this.code = o;

}
const l = (e, o) => typeof o == "function" ? "[Function]" : o, r = (e) => JSON.stringify(e, l), d = (e) => new n(t.docTypeError, `Doc type error, unsupported type: ${r(e)}`), u = (e) => new n(t.contextNotFound, `Context "${e}" not found, do you forget to inject it?`), h = (e) => new n(t.timerNotFound, `Timer "${e}" not found, do you forget to record it?`), p = () => new n(t.ctxCallOutOfScope, "Should not call a context out of the plugin."), f = (...e) => {
const l = (e, o) => typeof o == "function" ? "[Function]" : o, r = (e) => JSON.stringify(e, l), p = (e) => new t(n.docTypeError, `Doc type error, unsupported type: ${r(e)}`), u = (e) => new t(n.contextNotFound, `Context "${e}" not found, do you forget to inject it?`), d = (e) => new t(n.timerNotFound, `Timer "${e}" not found, do you forget to record it?`), h = () => new t(n.ctxCallOutOfScope, "Should not call a context out of the plugin."), g = (...e) => {
const o = e.reduce((s, a) => {

@@ -15,25 +15,27 @@ if (!a)

}, "Create prosemirror node from remark failed in parser");
return new n(t.createNodeInParserFail, o);
}, g = () => new n(t.stackOverFlow, "Stack over flow, cannot pop on an empty stack."), w = (e) => new n(t.parserMatchError, `Cannot match target parser for node: ${r(e)}.`), S = (e) => new n(t.serializerMatchError, `Cannot match target serializer for node: ${r(e)}.`), y = (e, o) => new n(t.getAtomFromSchemaFail, `Cannot get ${e}: ${o} from schema.`), F = (e) => new n(t.expectDomTypeError, `Expect to be a dom, but get: ${r(e)}.`), M = () => new n(t.callCommandBeforeEditorView, "You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized"), N = () => new n(t.themeMustInstalled, "It seems that no theme found in editor, please make sure you have use theme in front of all plugins.\nIf you prefer to use an empty theme, you can use `themeFactory({})`."), O = () => new n(t.missingRootElement, "Missing root element, milkdown cannot find root element of the editor."), k = (e) => new n(t.missingNodeInSchema, `Missing node in schema, milkdown cannot find "${e}" in schema.`), I = (e) => new n(t.missingMarkInSchema, `Missing mark in schema, milkdown cannot find "${e}" in schema.`), x = (e) => new n(t.missingIcon, `Missing icon in theme, milkdown cannot find icon "${e}" in theme.`), v = () => new n(t.ctxNotBind, "Context not bind, please make sure the plugin has been initialized."), $ = () => new n(t.missingYjsDoc, "Missing yjs doc, please make sure you have bind one."), E = () => new n(t.vueRendererCallOutOfScope, "Should not call vue renderer before it has been created.");
return new t(n.createNodeInParserFail, o);
}, f = () => new t(n.stackOverFlow, "Stack over flow, cannot pop on an empty stack."), w = (e) => new t(n.parserMatchError, `Cannot match target parser for node: ${r(e)}.`), M = (e) => new t(n.serializerMatchError, `Cannot match target serializer for node: ${r(e)}.`), S = (e, o) => new t(n.getAtomFromSchemaFail, `Cannot get ${e}: ${o} from schema.`), y = (e) => new t(n.expectDomTypeError, `Expect to be a dom, but get: ${r(e)}.`), F = () => new t(n.callCommandBeforeEditorView, "You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized"), I = () => new t(n.themeMustInstalled, "It seems that no theme found in editor, please make sure you have use theme in front of all plugins.\nIf you prefer to use an empty theme, you can use `themeFactory({})`."), N = () => new t(n.missingRootElement, "Missing root element, milkdown cannot find root element of the editor."), O = (e) => new t(n.missingNodeInSchema, `Missing node in schema, milkdown cannot find "${e}" in schema.`), k = (e) => new t(n.missingMarkInSchema, `Missing mark in schema, milkdown cannot find "${e}" in schema.`), x = (e) => new t(n.missingIcon, `Missing icon in theme, milkdown cannot find icon "${e}" in theme.`), v = () => new t(n.ctxNotBind, "Context not bind, please make sure the plugin has been initialized."), T = () => new t(n.missingYjsDoc, "Missing yjs doc, please make sure you have bind one."), $ = () => new t(n.vueRendererCallOutOfScope, "Should not call vue renderer before it has been created."), z = () => new t(n.missingMenuWrapper, "Missing menu wrapper, should init menu wrapper first."), R = () => new t(n.repeatCallsToMenuWrapperInit, "Repeated calls to menu wrapper initialization");
export {
M as callCommandBeforeEditorView,
F as callCommandBeforeEditorView,
u as contextNotFound,
f as createNodeInParserFail,
p as ctxCallOutOfScope,
g as createNodeInParserFail,
h as ctxCallOutOfScope,
v as ctxNotBind,
d as docTypeError,
F as expectDomTypeError,
y as getAtomFromSchemaFail,
p as docTypeError,
y as expectDomTypeError,
S as getAtomFromSchemaFail,
x as missingIcon,
I as missingMarkInSchema,
k as missingNodeInSchema,
O as missingRootElement,
$ as missingYjsDoc,
k as missingMarkInSchema,
z as missingMenuWrapper,
O as missingNodeInSchema,
N as missingRootElement,
T as missingYjsDoc,
w as parserMatchError,
S as serializerMatchError,
g as stackOverFlow,
N as themeMustInstalled,
h as timerNotFound,
E as vueRendererCallOutOfScope
R as repeatCallsToMenuWrapperInit,
M as serializerMatchError,
f as stackOverFlow,
I as themeMustInstalled,
d as timerNotFound,
$ as vueRendererCallOutOfScope
};
//# sourceMappingURL=index.es.js.map
{
"name": "@milkdown/exception",
"version": "6.3.0",
"version": "6.3.1",
"type": "module",

@@ -5,0 +5,0 @@ "main": "./lib/index.es.js",

@@ -22,2 +22,5 @@ /* Copyright 2021, Milkdown by Mirone. */

// vue
vueRendererCallOutOfScope = 'vueRendererCallOutOfScope',
// collab plugin

@@ -27,4 +30,5 @@ ctxNotBind = 'ctxNotBind',

// vue
vueRendererCallOutOfScope = 'vueRendererCallOutOfScope',
// menu plugin
repeatCallsToMenuWrapperInit = 'repeatCallsToMenuWrapperInit',
missingMenuWrapper = 'missingMenuWrapper',
}

@@ -103,1 +103,7 @@ /* Copyright 2021, Milkdown by Mirone. */

new MilkdownError(ErrorCode.vueRendererCallOutOfScope, 'Should not call vue renderer before it has been created.');
export const missingMenuWrapper = () =>
new MilkdownError(ErrorCode.missingMenuWrapper, 'Missing menu wrapper, should init menu wrapper first.');
export const repeatCallsToMenuWrapperInit = () =>
new MilkdownError(ErrorCode.repeatCallsToMenuWrapperInit, 'Repeated calls to menu wrapper initialization');

Sorry, the diff of this file is not supported yet

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