@tiptap/extension-drag-handle-vue-2 3.27.4 → 3.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -2248,6 +2248,43 @@ declare module '@tiptap/core' {
2248
2248
  }
2249
2249
  }
2250
2250
 
2251
+ interface InsertDefaultBlockOptions {
2252
+ /**
2253
+ * The position to insert the block at.
2254
+ * Accepts a number or a resolved ProseMirror position.
2255
+ * Defaults to the current caret position.
2256
+ */
2257
+ pos?: number | ResolvedPos;
2258
+ /**
2259
+ * Attributes to apply to the inserted node.
2260
+ * Only attributes that match the node's schema will be applied.
2261
+ */
2262
+ attrs?: Record<string, any>;
2263
+ /**
2264
+ * Content to insert into the block.
2265
+ * Accepts string (plain text or HTML), ProseMirror node, or Fragment.
2266
+ */
2267
+ content?: Content | Node$2 | Fragment;
2268
+ /**
2269
+ * Whether to update the selection after inserting the content.
2270
+ * @default true
2271
+ */
2272
+ updateSelection?: boolean;
2273
+ }
2274
+ declare module '@tiptap/core' {
2275
+ interface Commands<ReturnType> {
2276
+ insertDefaultBlock: {
2277
+ /**
2278
+ * Insert a default content block at the given position.
2279
+ * Returns false when the default block can't be inserted at that position.
2280
+ * @example editor.commands.insertDefaultBlock()
2281
+ * @example editor.commands.insertDefaultBlock({ pos: 5, content: 'Hello' })
2282
+ */
2283
+ insertDefaultBlock: (options?: InsertDefaultBlockOptions) => ReturnType;
2284
+ };
2285
+ }
2286
+ }
2287
+
2251
2288
  declare module '@tiptap/core' {
2252
2289
  interface Commands<ReturnType> {
2253
2290
  joinUp: {
package/dist/index.d.ts CHANGED
@@ -2248,6 +2248,43 @@ declare module '@tiptap/core' {
2248
2248
  }
2249
2249
  }
2250
2250
 
2251
+ interface InsertDefaultBlockOptions {
2252
+ /**
2253
+ * The position to insert the block at.
2254
+ * Accepts a number or a resolved ProseMirror position.
2255
+ * Defaults to the current caret position.
2256
+ */
2257
+ pos?: number | ResolvedPos;
2258
+ /**
2259
+ * Attributes to apply to the inserted node.
2260
+ * Only attributes that match the node's schema will be applied.
2261
+ */
2262
+ attrs?: Record<string, any>;
2263
+ /**
2264
+ * Content to insert into the block.
2265
+ * Accepts string (plain text or HTML), ProseMirror node, or Fragment.
2266
+ */
2267
+ content?: Content | Node$2 | Fragment;
2268
+ /**
2269
+ * Whether to update the selection after inserting the content.
2270
+ * @default true
2271
+ */
2272
+ updateSelection?: boolean;
2273
+ }
2274
+ declare module '@tiptap/core' {
2275
+ interface Commands<ReturnType> {
2276
+ insertDefaultBlock: {
2277
+ /**
2278
+ * Insert a default content block at the given position.
2279
+ * Returns false when the default block can't be inserted at that position.
2280
+ * @example editor.commands.insertDefaultBlock()
2281
+ * @example editor.commands.insertDefaultBlock({ pos: 5, content: 'Hello' })
2282
+ */
2283
+ insertDefaultBlock: (options?: InsertDefaultBlockOptions) => ReturnType;
2284
+ };
2285
+ }
2286
+ }
2287
+
2251
2288
  declare module '@tiptap/core' {
2252
2289
  interface Commands<ReturnType> {
2253
2290
  joinUp: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiptap/extension-drag-handle-vue-2",
3
- "version": "3.27.4",
3
+ "version": "3.29.0",
4
4
  "description": "drag handle extension for tiptap with vue 2",
5
5
  "keywords": [
6
6
  "tiptap",
@@ -41,15 +41,15 @@
41
41
  "devDependencies": {
42
42
  "vue": "^2.0.0",
43
43
  "vue-ts-types": "1.6.2",
44
- "@tiptap/extension-drag-handle": "^3.27.4",
45
- "@tiptap/vue-2": "^3.27.4",
46
- "@tiptap/pm": "^3.27.4"
44
+ "@tiptap/extension-drag-handle": "^3.29.0",
45
+ "@tiptap/vue-2": "^3.29.0",
46
+ "@tiptap/pm": "^3.29.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "vue": "^2.0.0",
50
- "@tiptap/pm": "3.27.4",
51
- "@tiptap/vue-2": "3.27.4",
52
- "@tiptap/extension-drag-handle": "3.27.4"
50
+ "@tiptap/extension-drag-handle": "3.29.0",
51
+ "@tiptap/pm": "3.29.0",
52
+ "@tiptap/vue-2": "3.29.0"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsup"