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

prosemirror-highlight

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-highlight - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

dist/shikiji.d.ts

4

dist/index.d.ts

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

import { Node } from 'prosemirror-model';
import { Transaction, Plugin } from 'prosemirror-state';
import { Decoration, DecorationSet } from 'prosemirror-view';
import { Node } from 'prosemirror-model';
import { P as Parser, L as LanguageExtractor } from './types-wUmJTPF3.js';

@@ -85,2 +85,2 @@

export { DecorationCache, type HighlightPluginState, createHighlightPlugin };
export { DecorationCache, type HighlightPluginState, LanguageExtractor, Parser, createHighlightPlugin };

@@ -1,8 +0,1 @@

import "./chunk-YSQDPG26.js";
// src/plugin.ts
import "prosemirror-model";
import { Plugin, PluginKey } from "prosemirror-state";
import { DecorationSet } from "prosemirror-view";
// src/cache.ts

@@ -85,2 +78,5 @@ import "prosemirror-model";

// src/plugin.ts
import "prosemirror-model";
import { Plugin, PluginKey } from "prosemirror-state";
import { DecorationSet } from "prosemirror-view";
function createHighlightPlugin({

@@ -87,0 +83,0 @@ parser,

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

import "./chunk-YSQDPG26.js";
// src/lowlight.ts

@@ -4,0 +2,0 @@ import { Decoration } from "prosemirror-view";

{
"name": "prosemirror-highlight",
"type": "module",
"version": "0.1.0",
"version": "0.2.0",
"packageManager": "pnpm@8.10.0",

@@ -30,2 +30,5 @@ "description": "A ProseMirror plugin to highlight code blocks",

"default": "./src/shiki.ts"
},
"./shikiji": {
"default": "./src/shikiji.ts"
}

@@ -49,8 +52,20 @@ },

"highlight.js": "^11.9.0",
"lowlight": "^3.1.0",
"prosemirror-model": "^1.19.3",
"prosemirror-state": "^1.4.3",
"prosemirror-transform": "^1.8.0",
"prosemirror-view": "^1.32.4"
"prosemirror-view": "^1.32.4",
"shiki": "^0.14.6",
"shikiji": "^0.8.0"
},
"peerDependenciesMeta": {
"@types/hast": {
"optional": true
},
"highlight.js": {
"optional": true
},
"lowlight": {
"optional": true
},
"prosemirror-model": {

@@ -68,6 +83,6 @@ "optional": true

},
"highlight.js": {
"shiki": {
"optional": true
},
"@types/hast": {
"shikiji": {
"optional": true

@@ -93,2 +108,3 @@ }

"shiki": "^0.14.6",
"shikiji": "^0.8.0",
"tsup": "^8.0.1",

@@ -115,2 +131,6 @@ "typescript": "^5.2.2",

"default": "./dist/shiki.js"
},
"./shikiji": {
"types": "./dist/shikiji.d.ts",
"default": "./dist/shikiji.js"
}

@@ -128,2 +148,3 @@ },

"renovate": {
"dependencyDashboard": true,
"extends": [

@@ -130,0 +151,0 @@ "github>ocavue/config-renovate"

@@ -27,2 +27,18 @@ # prosemirror-highlight

### With [Shikiji]
```ts
import { getHighlighter } from 'shikiji'
import { createHighlightPlugin } from 'prosemirror-highlight'
import { createParser } from 'prosemirror-highlight/shikiji'
const highlighter = await getHighlighter({
themes: ['vitesse-light'],
langs: ['javascript', 'typescript', 'python'],
})
const parser = createParser(highlighter)
export const shikijiPlugin = createHighlightPlugin({ parser })
```
### With [lowlight] (based on [Highlight.js])

@@ -60,1 +76,2 @@

[Shiki]: https://github.com/shikijs/shiki
[Shikiji]: https://github.com/antfu/shikiji

Sorry, the diff of this file is too big to display

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