@prosekit/extensions
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -151,4 +151,13 @@ import { CommandArgs } from '@prosekit/core'; | ||
NODES: "image"; | ||
COMMAND_ARGS: { | ||
insertImage: [attrs?: ImageAttrs | undefined]; | ||
}; | ||
}>; | ||
export declare function defineImageCommands(): Extension< { | ||
COMMAND_ARGS: { | ||
insertImage: [attrs?: ImageAttrs | undefined]; | ||
}; | ||
}>; | ||
export declare function defineImageSpec(): Extension< { | ||
@@ -155,0 +164,0 @@ NODES: "image"; |
export { defineImageSpec } from './_tsup-dts-rollup'; | ||
export { defineImageCommands } from './_tsup-dts-rollup'; | ||
export { defineImage } from './_tsup-dts-rollup'; | ||
export { ImageAttrs } from './_tsup-dts-rollup'; |
// src/image/index.ts | ||
import { defineNodeSpec, union } from "@prosekit/core"; | ||
import { | ||
defineCommands, | ||
defineNodeSpec, | ||
insertNode, | ||
union | ||
} from "@prosekit/core"; | ||
function defineImageSpec() { | ||
@@ -29,8 +34,16 @@ return defineNodeSpec({ | ||
} | ||
function defineImageCommands() { | ||
return defineCommands({ | ||
insertImage: (attrs) => { | ||
return insertNode({ type: "image", attrs }); | ||
} | ||
}); | ||
} | ||
function defineImage() { | ||
return union([defineImageSpec()]); | ||
return union([defineImageSpec(), defineImageCommands()]); | ||
} | ||
export { | ||
defineImage, | ||
defineImageCommands, | ||
defineImageSpec | ||
}; |
{ | ||
"name": "@prosekit/extensions", | ||
"type": "module", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"private": false, | ||
@@ -109,3 +109,3 @@ "author": { | ||
"dependencies": { | ||
"@prosekit/core": "^0.0.13", | ||
"@prosekit/core": "^0.0.14", | ||
"@prosekit/pm": "^0.0.6", | ||
@@ -112,0 +112,0 @@ "highlight.js": "^11.9.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44635
1326
+ Added@prosekit/core@0.0.14(transitive)
- Removed@prosekit/core@0.0.13(transitive)
Updated@prosekit/core@^0.0.14