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

@paperbits/prosemirror

Package Overview
Dependencies
Maintainers
2
Versions
613
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paperbits/prosemirror - npm Package Compare versions

Comparing version 0.1.38 to 0.1.39

4

package.json
{
"name": "@paperbits/prosemirror",
"version": "0.1.38",
"version": "0.1.39",
"description": "Paperbits HTML editor based on ProseMirror.",

@@ -19,3 +19,3 @@ "author": "Paperbits",

"dependencies": {
"@paperbits/common": "0.1.38",
"@paperbits/common": "0.1.39",
"prosemirror-commands": "^1.0.7",

@@ -22,0 +22,0 @@ "prosemirror-history": "^1.0.3",

import { IEventManager } from "@paperbits/common/events";
import { IStyleService } from "@paperbits/common/styles";
import { IStyleCompiler } from "@paperbits/common/styles";
import { IHtmlEditor, SelectionState, HtmlEditorEvents, HyperlinkContract } from "@paperbits/common/editing";

@@ -15,3 +15,2 @@ import { Schema, DOMParser } from "prosemirror-model";

import { HyperlinkModel } from "@paperbits/common/permalinks";
import { IViewManager } from "@paperbits/common/ui";

@@ -33,3 +32,3 @@ const alignmentStyleKeys = {

readonly eventManager: IEventManager,
readonly styleService: IStyleService,
readonly styleCompiler: IStyleCompiler,
// readonly viewManager: IViewManager

@@ -59,3 +58,3 @@ ) {

const builder = new SchemaBuilder(this.styleService);
const builder = new SchemaBuilder(this.styleCompiler);
this.schema = builder.build();

@@ -150,3 +149,3 @@ }

while (endIndex < $cursor.parent.childCount && hasMark(endIndex)) {
endIndex++
endIndex++;
}

@@ -213,9 +212,4 @@

const state = this.editorView.state;
const colorMark = state.selection.$from.marks().find(x => x.type.name === "color");
if (!colorMark) {
return;
}
this.editorView.dispatch(state.tr.removeMark(state.selection.from, state.selection.to, this.schema.marks.color));
this.editorView.focus();
}

@@ -222,0 +216,0 @@

import { Schema } from "prosemirror-model";
import { IStyleService } from "@paperbits/common/styles";
import { IStyleCompiler } from "@paperbits/common/styles";
export class SchemaBuilder {
constructor(private readonly styleService: IStyleService) {
constructor(private readonly styleCompiler: IStyleCompiler) {
}

@@ -18,3 +18,3 @@

if (node.attrs.styles) {
const className = this.styleService.getClassNamesByStyleConfig(node.attrs.styles);
const className = this.styleCompiler.getClassNamesByStyleConfig(node.attrs.styles);
return [tag, { class: className }, 0];

@@ -136,3 +136,3 @@ }

toDOM: (node) => {
const className = this.styleService.getClassNameByColorKey(node.attrs.colorKey);
const className = this.styleCompiler.getClassNameByColorKey(node.attrs.colorKey);
return ["span", { class: className }];

@@ -139,0 +139,0 @@ }

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