@milkdown/core
Advanced tools
Comparing version 4.9.6 to 4.10.0
import { ctxCallOutOfScope } from '@milkdown/exception'; | ||
import { clone } from 'lodash-es'; | ||
const clone = (x) => { | ||
if (Array.isArray(x)) { | ||
return [...x]; | ||
} | ||
if (typeof x === 'object') { | ||
return Object.assign({}, x); | ||
} | ||
return x; | ||
}; | ||
export const createCtx = (value) => { | ||
@@ -4,0 +12,0 @@ const id = Symbol('Context'); |
import { Configure, MilkdownPlugin } from '../utility'; | ||
export declare const Config: import("../timing").Timer; | ||
export declare const ConfigReady: import("../timing").Timer; | ||
export declare const config: (configure: Configure) => MilkdownPlugin; | ||
//# sourceMappingURL=config.d.ts.map |
import { __awaiter } from "tslib"; | ||
import { createTimer } from '../timing'; | ||
export const Config = createTimer('Config'); | ||
export const ConfigReady = createTimer('ConfigReady'); | ||
export const config = (configure) => (pre) => { | ||
pre.record(Config); | ||
pre.record(ConfigReady); | ||
return (ctx) => __awaiter(void 0, void 0, void 0, function* () { | ||
yield configure(ctx); | ||
ctx.done(Config); | ||
ctx.done(ConfigReady); | ||
}); | ||
}; | ||
//# sourceMappingURL=config.js.map |
export * from './init'; | ||
export * from './config'; | ||
export * from './theme'; | ||
export * from './schema'; | ||
@@ -4,0 +5,0 @@ export * from './parser'; |
export * from './init'; | ||
export * from './config'; | ||
export * from './theme'; | ||
export * from './schema'; | ||
@@ -4,0 +5,0 @@ export * from './parser'; |
import { __awaiter } from "tslib"; | ||
import re from 'remark'; | ||
import { createTimer } from '../timing'; | ||
import { Config } from './config'; | ||
import { ConfigReady } from './config'; | ||
import { createCtx } from '../context'; | ||
@@ -17,3 +17,3 @@ import { prosePluginsCtx } from './prose-plugin-factory'; | ||
.inject(remarkCtx, re()) | ||
.inject(initTimerCtx, [Config]) | ||
.inject(initTimerCtx, [ConfigReady]) | ||
.record(Initialize); | ||
@@ -20,0 +20,0 @@ return (ctx) => __awaiter(void 0, void 0, void 0, function* () { |
import { __awaiter } from "tslib"; | ||
import { fromPairs } from 'lodash-es'; | ||
import { createCtx } from '../context'; | ||
@@ -27,3 +26,3 @@ import { createTimer } from '../timing'; | ||
const markViewMap = getViewMap(marks, false); | ||
const nodeView = fromPairs([...nodeViewMap, ...markViewMap]); | ||
const nodeView = Object.fromEntries([...nodeViewMap, ...markViewMap]); | ||
ctx.set(nodeViewCtx, nodeView); | ||
@@ -30,0 +29,0 @@ ctx.done(NodeViewReady); |
import { __awaiter } from "tslib"; | ||
import { fromPairs } from 'lodash-es'; | ||
import { createCtx } from '../context'; | ||
@@ -23,3 +22,3 @@ import { createParser } from '../parser'; | ||
]; | ||
const spec = fromPairs(children.map(({ id, parser, is }) => [id, Object.assign(Object.assign({}, parser), { is, key: id })])); | ||
const spec = Object.fromEntries(children.map(({ id, parser, is }) => [id, Object.assign(Object.assign({}, parser), { is, key: id })])); | ||
ctx.set(parserCtx, createParser(schema, spec, remark)); | ||
@@ -26,0 +25,0 @@ ctx.done(ParserReady); |
import { __awaiter } from "tslib"; | ||
import { fromPairs } from 'lodash-es'; | ||
import { Schema } from 'prosemirror-model'; | ||
@@ -16,3 +15,3 @@ import { createCtx } from '../context'; | ||
yield ctx.waitTimers(schemaTimerCtx); | ||
const getAtom = (x) => fromPairs(x.map(({ id, schema }) => [id, schema])); | ||
const getAtom = (x) => Object.fromEntries(x.map(({ id, schema }) => [id, schema])); | ||
const nodes = getAtom(ctx.get(nodesCtx)); | ||
@@ -19,0 +18,0 @@ const marks = getAtom(ctx.get(marksCtx)); |
import { __awaiter } from "tslib"; | ||
import { fromPairs } from 'lodash-es'; | ||
import { marksCtx, nodesCtx, remarkCtx, schemaCtx } from '.'; | ||
@@ -20,3 +19,3 @@ import { createCtx } from '../context'; | ||
const children = [...nodes, ...marks]; | ||
const spec = fromPairs(children.map((child) => [child.id, child.serializer])); | ||
const spec = Object.fromEntries(children.map((child) => [child.id, child.serializer])); | ||
ctx.set(serializerCtx, createSerializer(schema, spec, remark)); | ||
@@ -23,0 +22,0 @@ ctx.done(SerializerReady); |
{ | ||
"name": "@milkdown/core", | ||
"version": "4.9.6", | ||
"version": "4.10.0", | ||
"main": "lib/index.js", | ||
@@ -22,3 +22,3 @@ "module": "lib/index.js", | ||
"@milkdown/exception": " *", | ||
"@types/lodash-es": "^4.17.4", | ||
"@milkdown/design-system": " *", | ||
"@types/prosemirror-commands": "^1.0.4", | ||
@@ -30,3 +30,2 @@ "@types/prosemirror-inputrules": "^1.0.4", | ||
"@types/prosemirror-view": "^1.17.1", | ||
"lodash-es": "^4.17.21", | ||
"prosemirror-commands": "^1.1.7", | ||
@@ -33,0 +32,0 @@ "prosemirror-inputrules": "^1.1.3", |
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
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
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
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
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
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
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
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
126647
17
163
1332
2
+ Added@milkdown/design-system@ *
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/generator@7.26.3(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/parser@7.26.3(transitive)
+ Added@babel/runtime@7.26.0(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.26.4(transitive)
+ Added@babel/types@7.26.3(transitive)
+ Added@emotion/babel-plugin@11.13.5(transitive)
+ Added@emotion/cache@11.14.0(transitive)
+ Added@emotion/css@11.13.5(transitive)
+ Added@emotion/hash@0.9.2(transitive)
+ Added@emotion/memoize@0.9.0(transitive)
+ Added@emotion/serialize@1.3.3(transitive)
+ Added@emotion/sheet@1.4.0(transitive)
+ Added@emotion/unitless@0.10.0(transitive)
+ Added@emotion/utils@1.4.2(transitive)
+ Added@emotion/weak-memoize@0.4.0(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Added@milkdown/ctx@6.5.4(transitive)
+ Added@milkdown/design-system@6.5.4(transitive)
+ Added@milkdown/exception@6.5.4(transitive)
+ Added@milkdown/prose@6.5.4(transitive)
+ Added@types/parse-json@4.0.2(transitive)
+ Addedbabel-plugin-macros@3.1.0(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedconvert-source-map@1.9.0(transitive)
+ Addedcosmiconfig@7.1.0(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedfind-root@1.1.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-core-module@2.16.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjsesc@3.1.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedprosemirror-dropcursor@1.8.1(transitive)
+ Addedprosemirror-gapcursor@1.3.2(transitive)
+ Addedprosemirror-history@1.4.1(transitive)
+ Addedprosemirror-schema-list@1.5.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedresolve@1.22.9(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedrope-sequence@1.3.4(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedstylis@4.2.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedyaml@1.10.2(transitive)
- Removed@types/lodash-es@^4.17.4
- Removedlodash-es@^4.17.21
- Removed@types/lodash@4.17.13(transitive)
- Removed@types/lodash-es@4.17.12(transitive)
- Removedlodash-es@4.17.21(transitive)