@milkdown/transformer
Advanced tools
Comparing version 6.1.5 to 6.2.0
@@ -133,3 +133,3 @@ var __defProp = Object.defineProperty; | ||
const build$1 = (ctx) => () => { | ||
let doc = null; | ||
let doc = void 0; | ||
do { | ||
@@ -406,3 +406,6 @@ doc = closeNode$1(ctx)(); | ||
}; | ||
if (globalThis.process && !globalThis.process.env) { | ||
globalThis.process.env = {}; | ||
} | ||
export { createParser, createSerializer, getStackUtil }; | ||
//# sourceMappingURL=index.es.js.map |
import { MarkType, Node, NodeType, Schema } from '@milkdown/prose/model'; | ||
import type { Attrs } from './types'; | ||
export declare const createStack: (schema: Schema) => { | ||
build: () => Node<any>; | ||
build: () => Node; | ||
openMark: (markType: MarkType, attrs?: Attrs | undefined) => void; | ||
@@ -9,3 +9,3 @@ closeMark: (markType: MarkType) => void; | ||
openNode: (nodeType: NodeType, attrs?: Attrs | undefined) => void; | ||
addNode: (nodeType: NodeType, attrs?: Attrs | undefined, content?: Node<any>[] | undefined) => Node; | ||
addNode: (nodeType: NodeType, attrs?: Attrs | undefined, content?: Node[] | undefined) => Node; | ||
closeNode: () => Node; | ||
@@ -12,0 +12,0 @@ }; |
@@ -65,3 +65,3 @@ import type { MarkType, Node, NodeType, Schema } from '@milkdown/prose/model'; | ||
*/ | ||
addNode: (nodeType: NodeType<any>, attrs?: Attrs | undefined, content?: Node<any>[] | undefined) => this; | ||
addNode: (nodeType: NodeType, attrs?: Attrs | undefined, content?: Node[] | undefined) => this; | ||
/** | ||
@@ -78,3 +78,3 @@ * Open a node, and all nodes created after this method will be set as the children of the node until a `closeNode` been called. | ||
*/ | ||
openNode: (nodeType: NodeType<any>, attrs?: Attrs | undefined) => this; | ||
openNode: (nodeType: NodeType, attrs?: Attrs | undefined) => this; | ||
/** | ||
@@ -97,3 +97,3 @@ * Close current node. | ||
*/ | ||
openMark: (markType: MarkType<any>, attrs?: Attrs | undefined) => this; | ||
openMark: (markType: MarkType, attrs?: Attrs | undefined) => this; | ||
/** | ||
@@ -106,4 +106,4 @@ * Close target mark. | ||
*/ | ||
closeMark: (markType: MarkType<any>) => this; | ||
closeMark: (markType: MarkType) => this; | ||
} | ||
//# sourceMappingURL=state.d.ts.map |
{ | ||
"name": "@milkdown/transformer", | ||
"version": "6.1.5", | ||
"version": "6.2.0", | ||
"type": "module", | ||
@@ -20,3 +20,3 @@ "main": "./lib/index.es.js", | ||
"devDependencies": { | ||
"@milkdown/prose": "6.1.5" | ||
"@milkdown/prose": "6.2.0" | ||
}, | ||
@@ -27,3 +27,3 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@milkdown/exception": "6.1.5", | ||
"@milkdown/exception": "6.2.0", | ||
"@types/mdast": "^3.0.10", | ||
@@ -30,0 +30,0 @@ "@types/unist": "^2.0.6", |
/* Copyright 2021, Milkdown by Mirone. */ | ||
/** | ||
* This hack is meant to fix https://github.com/lukeed/kleur/pull/54 | ||
* kleur is a dependency of remark. | ||
*/ | ||
if (globalThis.process && !globalThis.process.env) { | ||
globalThis.process.env = {}; | ||
} | ||
export * from './parser'; | ||
@@ -3,0 +12,0 @@ export * from './serializer'; |
@@ -10,3 +10,3 @@ /* Copyright 2021, Milkdown by Mirone. */ | ||
type Ctx = { | ||
marks: Mark[]; | ||
marks: readonly Mark[]; | ||
readonly schema: Schema; | ||
@@ -85,3 +85,3 @@ readonly elements: StackElement[]; | ||
const build = (ctx: Ctx) => () => { | ||
let doc: Node | null = null; | ||
let doc: Node | undefined = undefined; | ||
do { | ||
@@ -88,0 +88,0 @@ doc = closeNode(ctx)(); |
@@ -10,3 +10,3 @@ /* Copyright 2021, Milkdown by Mirone. */ | ||
type Ctx = { | ||
marks: Mark[]; | ||
marks: readonly Mark[]; | ||
readonly elements: StackElement[]; | ||
@@ -13,0 +13,0 @@ }; |
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
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
108438
1885
+ Added@milkdown/exception@6.2.0(transitive)
- Removed@milkdown/exception@6.1.5(transitive)
Updated@milkdown/exception@6.2.0