New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bangle.dev/core

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bangle.dev/core - npm Package Compare versions

Comparing version 0.21.1 to 0.22.0

components/types.ts

16

components/list-item/list-item-component.ts

@@ -77,2 +77,8 @@ import { chainCommands, Command } from 'prosemirror-commands';

attrs: {
// We overload the todoChecked value to
// decide if its a regular bullet list or a list with todo
// todoChecked can take following values:
// null => regular bullet list
// true => todo list with checked
// false => todo list with no check
todoChecked: {

@@ -96,4 +102,12 @@ default: null,

getAttrs: (tok: Token) => {
let todoChecked = null;
const todoIsDone = tok.attrGet('isDone');
if (todoIsDone === 'yes') {
todoChecked = true;
} else if (todoIsDone === 'no') {
todoChecked = false;
}
return {
todoChecked: tok.attrGet('isDone'),
todoChecked,
};

@@ -100,0 +114,0 @@ },

2

dist/core/components/bold.d.ts

@@ -53,3 +53,3 @@ import { Command } from 'prosemirror-commands';

schema: Schema;
}) => (import("prosemirror-state").Plugin<any, any> | import("prosemirror-inputrules").InputRule<any>)[];
}) => (import("prosemirror-inputrules").InputRule<any> | import("prosemirror-state").Plugin<any, any>)[];
export declare function toggleBold(): Command;

@@ -56,0 +56,0 @@ export declare function queryIsBoldActive(): (state: EditorState) => boolean;

@@ -53,3 +53,3 @@ import { Command } from 'prosemirror-commands';

schema: Schema;
}) => (import("prosemirror-state").Plugin<any, any> | import("prosemirror-inputrules").InputRule<any>)[];
}) => (import("prosemirror-inputrules").InputRule<any> | import("prosemirror-state").Plugin<any, any>)[];
export declare function toggleBulletList(): Command;

@@ -56,0 +56,0 @@ export declare function toggleTodoList(): Command;

@@ -45,3 +45,3 @@ import { Command } from 'prosemirror-commands';

schema: Schema;
}) => (import("prosemirror-state").Plugin<any, any> | import("prosemirror-inputrules").InputRule<any>)[];
}) => (import("prosemirror-inputrules").InputRule<any> | import("prosemirror-state").Plugin<any, any>)[];
export declare function toggleCode(): Command;

@@ -48,0 +48,0 @@ export declare function queryIsCodeActive(): (state: EditorState) => boolean;

@@ -46,3 +46,3 @@ import { Command } from 'prosemirror-commands';

schema: Schema;
}) => (import("prosemirror-state").Plugin<any, any> | import("prosemirror-inputrules").InputRule<any>)[];
}) => (import("prosemirror-inputrules").InputRule<any> | import("prosemirror-state").Plugin<any, any>)[];
export declare function toggleItalic(): Command;

@@ -49,0 +49,0 @@ export declare function queryIsItalicActive(): (state: EditorState) => boolean;

@@ -49,3 +49,3 @@ import { Command } from 'prosemirror-commands';

getAttrs: (tok: Token) => {
todoChecked: string | null;
todoChecked: boolean | null;
};

@@ -52,0 +52,0 @@ };

@@ -71,4 +71,12 @@ import { chainCommands } from 'prosemirror-commands';

getAttrs: (tok) => {
let todoChecked = null;
const todoIsDone = tok.attrGet('isDone');
if (todoIsDone === 'yes') {
todoChecked = true;
}
else if (todoIsDone === 'no') {
todoChecked = false;
}
return {
todoChecked: tok.attrGet('isDone'),
todoChecked,
};

@@ -75,0 +83,0 @@ },

@@ -48,3 +48,3 @@ import { Command } from 'prosemirror-commands';

schema: Schema;
}) => (import("prosemirror-state").Plugin<any, any> | import("prosemirror-inputrules").InputRule<any>)[];
}) => (import("prosemirror-inputrules").InputRule<any> | import("prosemirror-state").Plugin<any, any>)[];
export declare function toggleStrike(): Command;

@@ -51,0 +51,0 @@ export declare function queryIsStrikeActive(): (state: EditorState) => boolean;

@@ -43,3 +43,3 @@ import { Command } from 'prosemirror-commands';

schema: Schema;
}) => (import("prosemirror-state").Plugin<any, any> | import("prosemirror-inputrules").InputRule<any>)[];
}) => (import("prosemirror-inputrules").InputRule<any> | import("prosemirror-state").Plugin<any, any>)[];
export declare function toggleUnderline(): Command;

@@ -46,0 +46,0 @@ export declare function queryIsUnderlineActive(): (state: EditorState) => boolean;

@@ -5,2 +5,48 @@ export function defaultSpecs(opts?: {}): (false | {

schema: {
content: string;
defining: boolean;
draggable: boolean;
attrs: {
todoChecked: {
default: null;
};
};
toDOM: (node: import("prosemirror-model").Node<any>) => any[];
parseDOM: {
priority: number;
tag: string;
getAttrs: (dom: Element) => any;
}[];
};
markdown: {
toMarkdown(state: import("prosemirror-markdown").MarkdownSerializerState<any>, node: import("prosemirror-model").Node<any>): void;
parseMarkdown: {
list_item: {
block: string;
getAttrs: (tok: import("markdown-it/lib/token")) => {
todoChecked: boolean | null;
};
};
};
};
} | {
type: string;
name: string;
schema: {
group: string;
};
markdown: {
toMarkdown(state: any, node: import("prosemirror-model").Node<any>): void;
};
} | {
type: string;
topNode: boolean;
name: string;
schema: {
content: string;
};
} | {
type: string;
name: string;
schema: {
parseDOM: ({

@@ -146,20 +192,4 @@ tag: string;

type: string;
topNode: boolean;
name: string;
schema: {
content: string;
};
} | {
type: string;
name: string;
schema: {
group: string;
};
markdown: {
toMarkdown(state: any, node: import("prosemirror-model").Node<any>): void;
};
} | {
type: string;
name: string;
schema: {
inline: boolean;

@@ -181,32 +211,2 @@ group: string;

};
} | {
type: string;
name: string;
schema: {
content: string;
defining: boolean;
draggable: boolean;
attrs: {
todoChecked: {
default: null;
};
};
toDOM: (node: import("prosemirror-model").Node<any>) => any[];
parseDOM: {
priority: number;
tag: string;
getAttrs: (dom: Element) => any;
}[];
};
markdown: {
toMarkdown(state: import("prosemirror-markdown").MarkdownSerializerState<any>, node: import("prosemirror-model").Node<any>): void;
parseMarkdown: {
list_item: {
block: string;
getAttrs: (tok: import("markdown-it/lib/token")) => {
todoChecked: string | null;
};
};
};
};
})[];

@@ -213,0 +213,0 @@ export function defaultPlugins(opts?: {}): (false | (({ schema, specRegistry }: {

@@ -6,2 +6,48 @@ /// <reference types="prosemirror-model" />

schema: {
content: string;
defining: boolean;
draggable: boolean;
attrs: {
todoChecked: {
default: null;
};
};
toDOM: (node: import("prosemirror-model").Node<any>) => any[];
parseDOM: {
priority: number;
tag: string;
getAttrs: (dom: Element) => any;
}[];
};
markdown: {
toMarkdown(state: import("prosemirror-markdown").MarkdownSerializerState<any>, node: import("prosemirror-model").Node<any>): void;
parseMarkdown: {
list_item: {
block: string;
getAttrs: (tok: import("markdown-it/lib/token")) => {
todoChecked: boolean | null;
};
};
};
};
} | {
type: string;
name: string;
schema: {
group: string;
};
markdown: {
toMarkdown(state: any, node: import("prosemirror-model").Node<any>): void;
};
} | {
type: string;
topNode: boolean;
name: string;
schema: {
content: string;
};
} | {
type: string;
name: string;
schema: {
parseDOM: ({

@@ -147,20 +193,4 @@ tag: string;

type: string;
topNode: boolean;
name: string;
schema: {
content: string;
};
} | {
type: string;
name: string;
schema: {
group: string;
};
markdown: {
toMarkdown(state: any, node: import("prosemirror-model").Node<any>): void;
};
} | {
type: string;
name: string;
schema: {
inline: boolean;

@@ -182,32 +212,2 @@ group: string;

};
} | {
type: string;
name: string;
schema: {
content: string;
defining: boolean;
draggable: boolean;
attrs: {
todoChecked: {
default: null;
};
};
toDOM: (node: import("prosemirror-model").Node<any>) => any[];
parseDOM: {
priority: number;
tag: string;
getAttrs: (dom: Element) => any;
}[];
};
markdown: {
toMarkdown(state: import("prosemirror-markdown").MarkdownSerializerState<any>, node: import("prosemirror-model").Node<any>): void;
parseMarkdown: {
list_item: {
block: string;
getAttrs: (tok: import("markdown-it/lib/token")) => {
todoChecked: string | null;
};
};
};
};
})[];

@@ -214,0 +214,0 @@ export declare function corePlugins(): ((({ schema, specRegistry }: {

@@ -5,9 +5,10 @@ import type { EditorProps } from 'prosemirror-view';

import { PluginGroup } from '../plugin';
import type { SpecRegistry } from '../spec-registry';
interface PluginPayload {
schema: Schema;
specRegistry: any;
specRegistry: SpecRegistry;
metadata: any;
}
export declare type RawPlugins = Plugin | ((payLoad: PluginPayload) => Plugin) | PluginGroup | ((payLoad: PluginPayload) => PluginGroup) | (() => RawPlugins) | RawPlugins[];
export declare function pluginLoader(specRegistry: any, plugins: RawPlugins, { metadata, editorProps, defaultPlugins, dropCursorOpts, transformPlugins, }?: {
export declare function pluginLoader(specRegistry: SpecRegistry, plugins: RawPlugins, { metadata, editorProps, defaultPlugins, dropCursorOpts, transformPlugins, }?: {
metadata?: any;

@@ -14,0 +15,0 @@ editorProps?: EditorProps;

{
"name": "@bangle.dev/core",
"version": "0.21.1",
"version": "0.22.0",
"homepage": "https://bangle.dev",

@@ -31,4 +31,4 @@ "authors": [

"dependencies": {
"@bangle.dev/js-utils": "0.21.1",
"@bangle.dev/pm-utils": "0.21.1",
"@bangle.dev/js-utils": "0.22.0",
"@bangle.dev/pm-utils": "0.22.0",
"prosemirror-commands": "^1.1.10",

@@ -35,0 +35,0 @@ "prosemirror-dropcursor": "^1.3.5",

@@ -18,6 +18,7 @@ import {

import * as editorStateCounter from '../components/editor-state-counter';
import type { SpecRegistry } from '../spec-registry';
interface PluginPayload {
schema: Schema;
specRegistry: any;
specRegistry: SpecRegistry;
metadata: any;

@@ -35,3 +36,3 @@ }

export function pluginLoader(
specRegistry: any,
specRegistry: SpecRegistry,
plugins: RawPlugins,

@@ -38,0 +39,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

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