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

@milkdown/transformer

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@milkdown/transformer - npm Package Compare versions

Comparing version 6.0.2 to 6.1.0

2

lib/index.es.js

@@ -47,3 +47,3 @@ var __defProp = Object.defineProperty;

import { stackOverFlow, createNodeInParserFail, parserMatchError, serializerMatchError } from "@milkdown/exception";
import { Mark } from "@milkdown/prose";
import { Mark } from "@milkdown/prose/model";
export * from "remark";

@@ -50,0 +50,0 @@ const getStackUtil = () => {

@@ -1,6 +0,6 @@

import type { Schema } from '@milkdown/prose';
import type { Node, Schema } from '@milkdown/prose/model';
import type { RemarkParser } from '../utility';
import type { InnerParserSpecMap } from './types';
export declare const createParser: (schema: Schema, specMap: InnerParserSpecMap, remark: RemarkParser) => (text: string) => import("prosemirror-model").Node<any>;
export declare const createParser: (schema: Schema, specMap: InnerParserSpecMap, remark: RemarkParser) => (text: string) => Node;
export * from './types';
//# sourceMappingURL=index.d.ts.map

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

/// <reference types="prosemirror-model" />
import { Node, NodeType } from '@milkdown/prose';
import { Node, NodeType } from '@milkdown/prose/model';
import type { Attrs } from './types';

@@ -4,0 +3,0 @@ export declare type StackElement = {

@@ -1,2 +0,2 @@

import { MarkType, Node, NodeType, Schema } from '@milkdown/prose';
import { MarkType, Node, NodeType, Schema } from '@milkdown/prose/model';
import type { Attrs } from './types';

@@ -3,0 +3,0 @@ export declare const createStack: (schema: Schema) => {

@@ -1,2 +0,2 @@

import type { MarkType, NodeType, Schema } from '@milkdown/prose';
import type { MarkType, Node, NodeType, Schema } from '@milkdown/prose/model';
import { RemarkParser } from '../utility';

@@ -36,3 +36,3 @@ import type { Stack } from './stack';

*/
toDoc: () => import("prosemirror-model").Node<any>;
toDoc: () => Node;
/**

@@ -66,3 +66,3 @@ * Inject root node for prosemirror state.

*/
addNode: (nodeType: NodeType<any>, attrs?: Attrs | undefined, content?: import("prosemirror-model").Node<any>[] | undefined) => this;
addNode: (nodeType: NodeType<any>, attrs?: Attrs | undefined, content?: Node<any>[] | undefined) => this;
/**

@@ -69,0 +69,0 @@ * Open a node, and all nodes created after this method will be set as the children of the node until a `closeNode` been called.

@@ -1,2 +0,2 @@

import type { MarkType, NodeType } from '@milkdown/prose';
import type { MarkType, NodeType } from '@milkdown/prose/model';
import type { Node } from 'unist';

@@ -3,0 +3,0 @@ import type { State } from './state';

@@ -1,2 +0,2 @@

import type { Node, Schema } from '@milkdown/prose';
import type { Node, Schema } from '@milkdown/prose/model';
import { RemarkParser } from '../utility';

@@ -3,0 +3,0 @@ import type { InnerSerializerSpecMap } from './types';

@@ -1,2 +0,2 @@

import { Mark } from '@milkdown/prose';
import { Mark } from '@milkdown/prose/model';
import { Root } from 'mdast';

@@ -3,0 +3,0 @@ import type { MarkdownNode } from '..';

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

/// <reference types="prosemirror-model" />
import type { Fragment, Node as ProseNode, Schema } from '@milkdown/prose';
import type { Fragment, Node as ProseNode, Schema } from '@milkdown/prose/model';
import { RemarkParser } from '../utility';

@@ -4,0 +3,0 @@ import type { Stack } from './stack';

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

/// <reference types="prosemirror-model" />
import type { Mark as ProseMark, Node as ProseNode } from '@milkdown/prose';
import type { Mark as ProseMark, Node as ProseNode } from '@milkdown/prose/model';
import type { State } from './state';

@@ -4,0 +3,0 @@ export declare type NodeSerializerSpec = {

{
"name": "@milkdown/transformer",
"version": "6.0.2",
"version": "6.1.0",
"type": "module",

@@ -20,3 +20,3 @@ "main": "./lib/index.es.js",

"devDependencies": {
"@milkdown/prose": "6.0.2"
"@milkdown/prose": "6.1.0"
},

@@ -27,3 +27,5 @@ "peerDependencies": {

"dependencies": {
"@milkdown/exception": "6.0.2",
"@milkdown/exception": "6.1.0",
"@types/mdast": "^3.0.10",
"@types/unist": "^2.0.6",
"remark": "^14.0.1",

@@ -60,6 +62,5 @@ "tslib": "^2.3.1",

"test": "vitest",
"tsc": "tsc --noEmit",
"build": "vite build && tsc --emitDeclarationOnly"
},
"readme": "# @milkdown/transformer\n\nThe transformer module of [milkdown](https://saul-mirone.github.io/milkdown/).\n\n# Official Documentation\n\nDocumentation can be found on the [Milkdown website](https://saul-mirone.github.io/milkdown/).\n\n# License\n\nMilkdown is open sourced software licensed under [MIT license](https://github.com/Saul-Mirone/milkdown/blob/main/LICENSE).\n"
"tsc": "tsc --noEmit && echo",
"build": "tsc --emitDeclarationOnly && vite build"
}
}
# @milkdown/transformer
The transformer module of [milkdown](https://saul-mirone.github.io/milkdown/).
The transformer module of [milkdown](https://milkdown.dev/).
# Official Documentation
Documentation can be found on the [Milkdown website](https://saul-mirone.github.io/milkdown/).
Documentation can be found on the [Milkdown website](https://milkdown.dev/transformer).

@@ -9,0 +9,0 @@ # License

/* Copyright 2021, Milkdown by Mirone. */
import type { Schema } from '@milkdown/prose';
import type { Node, Schema } from '@milkdown/prose/model';

@@ -9,8 +9,10 @@ import type { RemarkParser } from '../utility';

export const createParser = (schema: Schema, specMap: InnerParserSpecMap, remark: RemarkParser) => (text: string) => {
const state = new State(createStack(schema), schema, specMap);
state.run(remark, text);
return state.toDoc();
};
export const createParser =
(schema: Schema, specMap: InnerParserSpecMap, remark: RemarkParser) =>
(text: string): Node => {
const state = new State(createStack(schema), schema, specMap);
state.run(remark, text);
return state.toDoc();
};
export * from './types';
/* Copyright 2021, Milkdown by Mirone. */
import { Node, NodeType } from '@milkdown/prose';
import { Node, NodeType } from '@milkdown/prose/model';

@@ -4,0 +4,0 @@ import type { Attrs } from './types';

/* Copyright 2021, Milkdown by Mirone. */
import type { Fragment, Mark, MarkType, Node, NodeType, Schema } from '@milkdown/prose';
import type { Fragment, Mark, MarkType, Node, NodeType, Schema } from '@milkdown/prose/model';
import { beforeEach, describe, expect, it } from 'vitest';

@@ -4,0 +4,0 @@

/* Copyright 2021, Milkdown by Mirone. */
import { createNodeInParserFail, stackOverFlow } from '@milkdown/exception';
import { Mark, MarkType, Node, NodeType, Schema } from '@milkdown/prose';
import { Mark, MarkType, Node, NodeType, Schema } from '@milkdown/prose/model';

@@ -5,0 +5,0 @@ import { getStackUtil } from '../utility';

/* Copyright 2021, Milkdown by Mirone. */
import type { NodeType, Schema } from '@milkdown/prose';
import type { NodeType, Schema } from '@milkdown/prose/model';
import { beforeEach, describe, expect, it, vi } from 'vitest';

@@ -4,0 +4,0 @@

/* Copyright 2021, Milkdown by Mirone. */
import { parserMatchError } from '@milkdown/exception';
import type { MarkType, NodeType, Schema } from '@milkdown/prose';
import type { MarkType, Node, NodeType, Schema } from '@milkdown/prose/model';

@@ -71,3 +71,3 @@ import { RemarkParser } from '../utility';

*/
toDoc = () => this.stack.build();
toDoc = (): Node => this.stack.build();

@@ -74,0 +74,0 @@ /**

/* Copyright 2021, Milkdown by Mirone. */
import type { MarkType, NodeType } from '@milkdown/prose';
import type { MarkType, NodeType } from '@milkdown/prose/model';
import type { Node } from 'unist';

@@ -4,0 +4,0 @@

/* Copyright 2021, Milkdown by Mirone. */
import type { Node, Schema } from '@milkdown/prose';
import type { Node, Schema } from '@milkdown/prose/model';

@@ -4,0 +4,0 @@ import { RemarkParser } from '../utility';

/* Copyright 2021, Milkdown by Mirone. */
import { Mark } from '@milkdown/prose';
import { Mark } from '@milkdown/prose/model';
import { Root } from 'mdast';

@@ -4,0 +4,0 @@

/* Copyright 2021, Milkdown by Mirone. */
import type { Mark as ProseMark, Node as ProseNode, Schema } from '@milkdown/prose';
import type { Mark as ProseMark, Node as ProseNode, Schema } from '@milkdown/prose/model';
import { beforeEach, describe, expect, it, vi } from 'vitest';

@@ -4,0 +4,0 @@

/* Copyright 2021, Milkdown by Mirone. */
import { serializerMatchError } from '@milkdown/exception';
import type { Fragment, Mark as ProseMark, Node as ProseNode, Schema } from '@milkdown/prose';
import type { Fragment, Mark as ProseMark, Node as ProseNode, Schema } from '@milkdown/prose/model';

@@ -5,0 +5,0 @@ import { RemarkParser } from '../utility';

/* Copyright 2021, Milkdown by Mirone. */
import type { Mark as ProseMark, Node as ProseNode } from '@milkdown/prose';
import type { Mark as ProseMark, Node as ProseNode } from '@milkdown/prose/model';

@@ -4,0 +4,0 @@ import type { State } from './state';

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

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