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

@prosekit/extensions

Package Overview
Dependencies
Maintainers
0
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prosekit/extensions - npm Package Compare versions

Comparing version 0.7.17 to 0.7.18

5

dist/_tsup-dts-rollup.d.ts

@@ -1709,5 +1709,6 @@ import { Attrs } from '@prosekit/pm/model';

/**
* The placeholder text to use.
* The placeholder to use. It can be a static string or a function that
* receives the current editor state and returns a string.
*/
placeholder: string;
placeholder: string | ((state: EditorState) => string);
/**

@@ -1714,0 +1715,0 @@ * By default, the placeholder text will be shown whenever the current text

9

dist/prosekit-extensions-placeholder.js

@@ -8,3 +8,6 @@ // src/placeholder/index.ts

}
function createPlaceholderPlugin(options) {
function createPlaceholderPlugin({
placeholder,
strategy = "block"
}) {
return new Plugin({

@@ -14,3 +17,3 @@ key: new PluginKey("prosekit-placeholder"),

decorations: (state) => {
if (options.strategy === "doc" && !isDocEmpty(state.doc)) {
if (strategy === "doc" && !isDocEmpty(state.doc)) {
return null;

@@ -21,3 +24,3 @@ }

}
const placeholderText = options.placeholder;
const placeholderText = typeof placeholder === "function" ? placeholder(state) : placeholder;
const deco = createPlaceholderDecoration(state, placeholderText);

@@ -24,0 +27,0 @@ if (!deco) {

{
"name": "@prosekit/extensions",
"type": "module",
"version": "0.7.17",
"version": "0.7.18",
"private": false,

@@ -217,3 +217,3 @@ "author": {

"prosemirror-tables": "^1.5.0",
"shiki": "^1.16.2",
"shiki": "^1.17.7",
"@prosekit/core": "^0.7.11",

@@ -243,13 +243,13 @@ "@prosekit/pm": "^0.1.8"

"devDependencies": {
"@vitest/browser": "^2.0.5",
"@vitest/browser": "^2.1.2",
"just-pick": "^4.2.0",
"loro-crdt": "^0.16.12",
"loro-prosemirror": "^0.0.7",
"tsup": "^8.2.4",
"tsup": "^8.3.0",
"type-fest": "^4.26.1",
"typescript": "^5.5.4",
"vitest": "^2.0.5",
"typescript": "^5.6.2",
"vitest": "^2.1.2",
"y-prosemirror": "^1.2.12",
"y-protocols": "^1.0.6",
"yjs": "^13.6.18",
"yjs": "^13.6.19",
"@prosekit/dev": "0.0.0"

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