@tiptap/extension-drag-handle-vue-3 3.10.8 → 3.11.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
@@ -1128,6 +1128,14 @@ interface EditorOptions {
1128
1128
  * Whether the editor is editable
1129
1129
  */
1130
1130
  editable: boolean;
1131
+ /**
1132
+ * The default text direction for all content in the editor.
1133
+ * When set to 'ltr' or 'rtl', all nodes will have the corresponding dir attribute.
1134
+ * When set to 'auto', the dir attribute will be set based on content detection.
1135
+ * When undefined, no dir attribute will be added.
1136
+ * @default undefined
1137
+ */
1138
+ textDirection?: 'ltr' | 'rtl' | 'auto';
1131
1139
  /**
1132
1140
  * The editor's props
1133
1141
  */
@@ -1181,7 +1189,7 @@ interface EditorOptions {
1181
1189
  *
1182
1190
  * @default true
1183
1191
  */
1184
- enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete', false>>;
1192
+ enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete' | 'textDirection', false>>;
1185
1193
  /**
1186
1194
  * If `true`, the editor will check the content for errors on initialization.
1187
1195
  * Emitting the `contentError` event if the content is invalid.
@@ -2373,6 +2381,22 @@ declare module '@tiptap/core' {
2373
2381
  }
2374
2382
  }
2375
2383
 
2384
+ declare module '@tiptap/core' {
2385
+ interface Commands<ReturnType> {
2386
+ setTextDirection: {
2387
+ /**
2388
+ * Set the text direction for nodes.
2389
+ * If no position is provided, it will use the current selection.
2390
+ * @param direction The text direction to set ('ltr', 'rtl', or 'auto')
2391
+ * @param position Optional position or range to apply the direction to
2392
+ * @example editor.commands.setTextDirection('rtl')
2393
+ * @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 })
2394
+ */
2395
+ setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType;
2396
+ };
2397
+ }
2398
+ }
2399
+
2376
2400
  declare module '@tiptap/core' {
2377
2401
  interface Commands<ReturnType> {
2378
2402
  setTextSelection: {
@@ -2549,6 +2573,21 @@ declare module '@tiptap/core' {
2549
2573
  }
2550
2574
  }
2551
2575
 
2576
+ declare module '@tiptap/core' {
2577
+ interface Commands<ReturnType> {
2578
+ unsetTextDirection: {
2579
+ /**
2580
+ * Remove the text direction attribute from nodes.
2581
+ * If no position is provided, it will use the current selection.
2582
+ * @param position Optional position or range to remove the direction from
2583
+ * @example editor.commands.unsetTextDirection()
2584
+ * @example editor.commands.unsetTextDirection({ from: 0, to: 10 })
2585
+ */
2586
+ unsetTextDirection: (position?: number | Range) => ReturnType;
2587
+ };
2588
+ }
2589
+ }
2590
+
2552
2591
  declare module '@tiptap/core' {
2553
2592
  interface Commands<ReturnType> {
2554
2593
  updateAttributes: {
package/dist/index.d.ts CHANGED
@@ -1128,6 +1128,14 @@ interface EditorOptions {
1128
1128
  * Whether the editor is editable
1129
1129
  */
1130
1130
  editable: boolean;
1131
+ /**
1132
+ * The default text direction for all content in the editor.
1133
+ * When set to 'ltr' or 'rtl', all nodes will have the corresponding dir attribute.
1134
+ * When set to 'auto', the dir attribute will be set based on content detection.
1135
+ * When undefined, no dir attribute will be added.
1136
+ * @default undefined
1137
+ */
1138
+ textDirection?: 'ltr' | 'rtl' | 'auto';
1131
1139
  /**
1132
1140
  * The editor's props
1133
1141
  */
@@ -1181,7 +1189,7 @@ interface EditorOptions {
1181
1189
  *
1182
1190
  * @default true
1183
1191
  */
1184
- enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete', false>>;
1192
+ enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete' | 'textDirection', false>>;
1185
1193
  /**
1186
1194
  * If `true`, the editor will check the content for errors on initialization.
1187
1195
  * Emitting the `contentError` event if the content is invalid.
@@ -2373,6 +2381,22 @@ declare module '@tiptap/core' {
2373
2381
  }
2374
2382
  }
2375
2383
 
2384
+ declare module '@tiptap/core' {
2385
+ interface Commands<ReturnType> {
2386
+ setTextDirection: {
2387
+ /**
2388
+ * Set the text direction for nodes.
2389
+ * If no position is provided, it will use the current selection.
2390
+ * @param direction The text direction to set ('ltr', 'rtl', or 'auto')
2391
+ * @param position Optional position or range to apply the direction to
2392
+ * @example editor.commands.setTextDirection('rtl')
2393
+ * @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 })
2394
+ */
2395
+ setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType;
2396
+ };
2397
+ }
2398
+ }
2399
+
2376
2400
  declare module '@tiptap/core' {
2377
2401
  interface Commands<ReturnType> {
2378
2402
  setTextSelection: {
@@ -2549,6 +2573,21 @@ declare module '@tiptap/core' {
2549
2573
  }
2550
2574
  }
2551
2575
 
2576
+ declare module '@tiptap/core' {
2577
+ interface Commands<ReturnType> {
2578
+ unsetTextDirection: {
2579
+ /**
2580
+ * Remove the text direction attribute from nodes.
2581
+ * If no position is provided, it will use the current selection.
2582
+ * @param position Optional position or range to remove the direction from
2583
+ * @example editor.commands.unsetTextDirection()
2584
+ * @example editor.commands.unsetTextDirection({ from: 0, to: 10 })
2585
+ */
2586
+ unsetTextDirection: (position?: number | Range) => ReturnType;
2587
+ };
2588
+ }
2589
+ }
2590
+
2552
2591
  declare module '@tiptap/core' {
2553
2592
  interface Commands<ReturnType> {
2554
2593
  updateAttributes: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-drag-handle-vue-3",
3
3
  "description": "drag handle extension for tiptap with vue 3",
4
- "version": "3.10.8",
4
+ "version": "3.11.0",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -37,15 +37,15 @@
37
37
  ],
38
38
  "peerDependencies": {
39
39
  "vue": "^3.0.0",
40
- "@tiptap/extension-drag-handle": "^3.10.8",
41
- "@tiptap/pm": "^3.10.8",
42
- "@tiptap/vue-3": "^3.10.8"
40
+ "@tiptap/extension-drag-handle": "^3.11.0",
41
+ "@tiptap/pm": "^3.11.0",
42
+ "@tiptap/vue-3": "^3.11.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "vue": "^3.0.0",
46
- "@tiptap/extension-drag-handle": "^3.10.8",
47
- "@tiptap/pm": "^3.10.8",
48
- "@tiptap/vue-3": "^3.10.8"
46
+ "@tiptap/extension-drag-handle": "^3.11.0",
47
+ "@tiptap/vue-3": "^3.11.0",
48
+ "@tiptap/pm": "^3.11.0"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsup",