@tiptap/extension-drag-handle-vue-3 3.10.6 → 3.10.8

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
@@ -1,7 +1,7 @@
1
1
  import * as _floating_ui_dom from '@floating-ui/dom';
2
- import { Plugin, PluginKey, Transaction, EditorState } from '@tiptap/pm/state';
3
- import { NodeType as NodeType$1, MarkType as MarkType$1, Node as Node$1, Fragment, ParseOptions, Schema, Slice, Mark as Mark$1, ResolvedPos, MarkSpec, DOMOutputSpec, NodeSpec } from '@tiptap/pm/model';
4
- import { EditorView, EditorProps, NodeViewConstructor, MarkViewConstructor, NodeView, MarkView } from '@tiptap/pm/view';
2
+ import { EditorState, Plugin, Transaction, PluginKey } from '@tiptap/pm/state';
3
+ import { MarkType as MarkType$1, MarkSpec, Mark as Mark$1, DOMOutputSpec, NodeType as NodeType$1, NodeSpec, Node as Node$1, Slice, ParseOptions, Schema, ResolvedPos, Fragment } from '@tiptap/pm/model';
4
+ import { EditorView, EditorProps, NodeView, MarkView, NodeViewConstructor, MarkViewConstructor } from '@tiptap/pm/view';
5
5
  import { Transform } from '@tiptap/pm/transform';
6
6
  import * as vue from 'vue';
7
7
  import { PropType } from 'vue';
@@ -155,7 +155,7 @@ interface MarkConfig<Options = any, Storage = any> extends ExtendableConfig<Opti
155
155
  storage: Storage;
156
156
  parent: ParentConfig<MarkConfig<Options, Storage>>['addAttributes'];
157
157
  editor?: Editor;
158
- }) => Attributes$1 | {};
158
+ }) => Attributes | {};
159
159
  }
160
160
  /**
161
161
  * The Mark class is used to create custom mark extensions.
@@ -452,7 +452,7 @@ interface NodeConfig<Options = any, Storage = any> extends ExtendableConfig<Opti
452
452
  storage: Storage;
453
453
  parent: ParentConfig<NodeConfig<Options, Storage>>['addAttributes'];
454
454
  editor?: Editor;
455
- }) => Attributes$1 | {};
455
+ }) => Attributes | {};
456
456
  }
457
457
  /**
458
458
  * The Node class is used to create custom node extensions.
@@ -871,6 +871,7 @@ declare class Extendable<Options = any, Storage = any, Config = ExtensionConfig<
871
871
  configure(options?: Partial<Options>): Extendable<Options, Storage, ExtensionConfig<Options, Storage> | NodeConfig<Options, Storage> | MarkConfig<Options, Storage>>;
872
872
  extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage> | NodeConfig<ExtendedOptions, ExtendedStorage> | MarkConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: Partial<ExtendedConfig>): Extendable<ExtendedOptions, ExtendedStorage>;
873
873
  }
874
+
874
875
  type AnyExtension = Extendable;
875
876
  type Extensions = AnyExtension[];
876
877
  type ParentConfig<T> = Partial<{
@@ -1260,17 +1261,71 @@ interface EditorOptions {
1260
1261
  */
1261
1262
  type HTMLContent = string;
1262
1263
  /**
1263
- * Loosely describes a JSON representation of a Prosemirror document or node
1264
+ * A Tiptap JSON node or document. Tiptap JSON is the standard format for
1265
+ * storing and manipulating Tiptap content. It is equivalent to the JSON
1266
+ * representation of a Prosemirror node.
1267
+ *
1268
+ * Tiptap JSON documents are trees of nodes. The root node is usually of type
1269
+ * `doc`. Nodes can have other nodes as children. Nodes can also have marks and
1270
+ * attributes. Text nodes (nodes with type `text`) have a `text` property and no
1271
+ * children.
1272
+ *
1273
+ * @example
1274
+ * ```ts
1275
+ * const content: JSONContent = {
1276
+ * type: 'doc',
1277
+ * content: [
1278
+ * {
1279
+ * type: 'paragraph',
1280
+ * content: [
1281
+ * {
1282
+ * type: 'text',
1283
+ * text: 'Hello ',
1284
+ * },
1285
+ * {
1286
+ * type: 'text',
1287
+ * text: 'world',
1288
+ * marks: [{ type: 'bold' }],
1289
+ * },
1290
+ * ],
1291
+ * },
1292
+ * ],
1293
+ * }
1294
+ * ```
1264
1295
  */
1265
1296
  type JSONContent = {
1297
+ /**
1298
+ * The type of the node
1299
+ */
1266
1300
  type?: string;
1301
+ /**
1302
+ * The attributes of the node. Attributes can have any JSON-serializable value.
1303
+ */
1267
1304
  attrs?: Record<string, any> | undefined;
1305
+ /**
1306
+ * The children of the node. A node can have other nodes as children.
1307
+ */
1268
1308
  content?: JSONContent[];
1309
+ /**
1310
+ * A list of marks of the node. Inline nodes can have marks.
1311
+ */
1269
1312
  marks?: {
1313
+ /**
1314
+ * The type of the mark
1315
+ */
1270
1316
  type: string;
1317
+ /**
1318
+ * The attributes of the mark. Attributes can have any JSON-serializable value.
1319
+ */
1271
1320
  attrs?: Record<string, any>;
1272
1321
  [key: string]: any;
1273
1322
  }[];
1323
+ /**
1324
+ * The text content of the node. This property is only present on text nodes
1325
+ * (i.e. nodes with `type: 'text'`).
1326
+ *
1327
+ * Text nodes cannot have children, but they can have marks.
1328
+ */
1274
1329
  text?: string;
1275
1330
  [key: string]: any;
1276
1331
  };
@@ -1332,7 +1387,7 @@ type Attribute = {
1332
1387
  keepOnSplit?: boolean;
1333
1388
  isRequired?: boolean;
1334
1389
  };
1335
- type Attributes$1 = {
1390
+ type Attributes = {
1336
1391
  [key: string]: Attribute;
1337
1392
  };
1338
1393
  type ExtensionAttribute = {
@@ -1483,7 +1538,6 @@ type MarkdownParseHelpers = {
1483
1538
  attrs?: any;
1484
1539
  };
1485
1540
  };
1486
-
1487
1541
  /**
1488
1542
  * Return shape for parser-level `parse` handlers.
1489
1543
  * - a single JSON-like node
@@ -1663,59 +1717,6 @@ declare class NodePos {
1663
1717
  }): void;
1664
1718
  }
1665
1719
 
1666
- interface InsertContentOptions {
1667
- /**
1668
- * Options for parsing the content.
1669
- */
1670
- parseOptions?: ParseOptions;
1671
- /**
1672
- * Whether to update the selection after inserting the content.
1673
- */
1674
- updateSelection?: boolean;
1675
- applyInputRules?: boolean;
1676
- applyPasteRules?: boolean;
1677
- }
1678
-
1679
- interface InsertContentAtOptions {
1680
- /**
1681
- * Options for parsing the content.
1682
- */
1683
- parseOptions?: ParseOptions;
1684
- /**
1685
- * Whether to update the selection after inserting the content.
1686
- */
1687
- updateSelection?: boolean;
1688
- /**
1689
- * Whether to apply input rules after inserting the content.
1690
- */
1691
- applyInputRules?: boolean;
1692
- /**
1693
- * Whether to apply paste rules after inserting the content.
1694
- */
1695
- applyPasteRules?: boolean;
1696
- /**
1697
- * Whether to throw an error if the content is invalid.
1698
- */
1699
- errorOnInvalidContent?: boolean;
1700
- }
1701
-
1702
- interface SetContentOptions {
1703
- /**
1704
- * Options for parsing the content.
1705
- * @default {}
1706
- */
1707
- parseOptions?: ParseOptions;
1708
- /**
1709
- * Whether to throw an error if the content is invalid.
1710
- */
1711
- errorOnInvalidContent?: boolean;
1712
- /**
1713
- * Whether to emit an update event.
1714
- * @default true
1715
- */
1716
- emitUpdate?: boolean;
1717
- }
1718
-
1719
1720
  declare module '@tiptap/core' {
1720
1721
  interface Commands<ReturnType> {
1721
1722
  blur: {
@@ -1953,6 +1954,19 @@ declare module '@tiptap/core' {
1953
1954
  };
1954
1955
  }
1955
1956
  }
1957
+
1958
+ interface InsertContentOptions {
1959
+ /**
1960
+ * Options for parsing the content.
1961
+ */
1962
+ parseOptions?: ParseOptions;
1963
+ /**
1964
+ * Whether to update the selection after inserting the content.
1965
+ */
1966
+ updateSelection?: boolean;
1967
+ applyInputRules?: boolean;
1968
+ applyPasteRules?: boolean;
1969
+ }
1956
1970
  declare module '@tiptap/core' {
1957
1971
  interface Commands<ReturnType> {
1958
1972
  insertContent: {
@@ -1973,6 +1987,29 @@ declare module '@tiptap/core' {
1973
1987
  };
1974
1988
  }
1975
1989
  }
1990
+
1991
+ interface InsertContentAtOptions {
1992
+ /**
1993
+ * Options for parsing the content.
1994
+ */
1995
+ parseOptions?: ParseOptions;
1996
+ /**
1997
+ * Whether to update the selection after inserting the content.
1998
+ */
1999
+ updateSelection?: boolean;
2000
+ /**
2001
+ * Whether to apply input rules after inserting the content.
2002
+ */
2003
+ applyInputRules?: boolean;
2004
+ /**
2005
+ * Whether to apply paste rules after inserting the content.
2006
+ */
2007
+ applyPasteRules?: boolean;
2008
+ /**
2009
+ * Whether to throw an error if the content is invalid.
2010
+ */
2011
+ errorOnInvalidContent?: boolean;
2012
+ }
1976
2013
  declare module '@tiptap/core' {
1977
2014
  interface Commands<ReturnType> {
1978
2015
  insertContentAt: {
@@ -2242,6 +2279,23 @@ declare module '@tiptap/core' {
2242
2279
  };
2243
2280
  }
2244
2281
  }
2282
+
2283
+ interface SetContentOptions {
2284
+ /**
2285
+ * Options for parsing the content.
2286
+ * @default {}
2287
+ */
2288
+ parseOptions?: ParseOptions;
2289
+ /**
2290
+ * Whether to throw an error if the content is invalid.
2291
+ */
2292
+ errorOnInvalidContent?: boolean;
2293
+ /**
2294
+ * Whether to emit an update event.
2295
+ * @default true
2296
+ */
2297
+ emitUpdate?: boolean;
2298
+ }
2245
2299
  declare module '@tiptap/core' {
2246
2300
  interface Commands<ReturnType> {
2247
2301
  setContent: {
@@ -2544,6 +2598,7 @@ declare module '@tiptap/core' {
2544
2598
  };
2545
2599
  }
2546
2600
  }
2601
+
2547
2602
  declare class Editor extends EventEmitter<EditorEvents> {
2548
2603
  private commandManager;
2549
2604
  extensionManager: ExtensionManager;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _floating_ui_dom from '@floating-ui/dom';
2
- import { Plugin, PluginKey, Transaction, EditorState } from '@tiptap/pm/state';
3
- import { NodeType as NodeType$1, MarkType as MarkType$1, Node as Node$1, Fragment, ParseOptions, Schema, Slice, Mark as Mark$1, ResolvedPos, MarkSpec, DOMOutputSpec, NodeSpec } from '@tiptap/pm/model';
4
- import { EditorView, EditorProps, NodeViewConstructor, MarkViewConstructor, NodeView, MarkView } from '@tiptap/pm/view';
2
+ import { EditorState, Plugin, Transaction, PluginKey } from '@tiptap/pm/state';
3
+ import { MarkType as MarkType$1, MarkSpec, Mark as Mark$1, DOMOutputSpec, NodeType as NodeType$1, NodeSpec, Node as Node$1, Slice, ParseOptions, Schema, ResolvedPos, Fragment } from '@tiptap/pm/model';
4
+ import { EditorView, EditorProps, NodeView, MarkView, NodeViewConstructor, MarkViewConstructor } from '@tiptap/pm/view';
5
5
  import { Transform } from '@tiptap/pm/transform';
6
6
  import * as vue from 'vue';
7
7
  import { PropType } from 'vue';
@@ -155,7 +155,7 @@ interface MarkConfig<Options = any, Storage = any> extends ExtendableConfig<Opti
155
155
  storage: Storage;
156
156
  parent: ParentConfig<MarkConfig<Options, Storage>>['addAttributes'];
157
157
  editor?: Editor;
158
- }) => Attributes$1 | {};
158
+ }) => Attributes | {};
159
159
  }
160
160
  /**
161
161
  * The Mark class is used to create custom mark extensions.
@@ -452,7 +452,7 @@ interface NodeConfig<Options = any, Storage = any> extends ExtendableConfig<Opti
452
452
  storage: Storage;
453
453
  parent: ParentConfig<NodeConfig<Options, Storage>>['addAttributes'];
454
454
  editor?: Editor;
455
- }) => Attributes$1 | {};
455
+ }) => Attributes | {};
456
456
  }
457
457
  /**
458
458
  * The Node class is used to create custom node extensions.
@@ -871,6 +871,7 @@ declare class Extendable<Options = any, Storage = any, Config = ExtensionConfig<
871
871
  configure(options?: Partial<Options>): Extendable<Options, Storage, ExtensionConfig<Options, Storage> | NodeConfig<Options, Storage> | MarkConfig<Options, Storage>>;
872
872
  extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage> | NodeConfig<ExtendedOptions, ExtendedStorage> | MarkConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: Partial<ExtendedConfig>): Extendable<ExtendedOptions, ExtendedStorage>;
873
873
  }
874
+
874
875
  type AnyExtension = Extendable;
875
876
  type Extensions = AnyExtension[];
876
877
  type ParentConfig<T> = Partial<{
@@ -1260,17 +1261,71 @@ interface EditorOptions {
1260
1261
  */
1261
1262
  type HTMLContent = string;
1262
1263
  /**
1263
- * Loosely describes a JSON representation of a Prosemirror document or node
1264
+ * A Tiptap JSON node or document. Tiptap JSON is the standard format for
1265
+ * storing and manipulating Tiptap content. It is equivalent to the JSON
1266
+ * representation of a Prosemirror node.
1267
+ *
1268
+ * Tiptap JSON documents are trees of nodes. The root node is usually of type
1269
+ * `doc`. Nodes can have other nodes as children. Nodes can also have marks and
1270
+ * attributes. Text nodes (nodes with type `text`) have a `text` property and no
1271
+ * children.
1272
+ *
1273
+ * @example
1274
+ * ```ts
1275
+ * const content: JSONContent = {
1276
+ * type: 'doc',
1277
+ * content: [
1278
+ * {
1279
+ * type: 'paragraph',
1280
+ * content: [
1281
+ * {
1282
+ * type: 'text',
1283
+ * text: 'Hello ',
1284
+ * },
1285
+ * {
1286
+ * type: 'text',
1287
+ * text: 'world',
1288
+ * marks: [{ type: 'bold' }],
1289
+ * },
1290
+ * ],
1291
+ * },
1292
+ * ],
1293
+ * }
1294
+ * ```
1264
1295
  */
1265
1296
  type JSONContent = {
1297
+ /**
1298
+ * The type of the node
1299
+ */
1266
1300
  type?: string;
1301
+ /**
1302
+ * The attributes of the node. Attributes can have any JSON-serializable value.
1303
+ */
1267
1304
  attrs?: Record<string, any> | undefined;
1305
+ /**
1306
+ * The children of the node. A node can have other nodes as children.
1307
+ */
1268
1308
  content?: JSONContent[];
1309
+ /**
1310
+ * A list of marks of the node. Inline nodes can have marks.
1311
+ */
1269
1312
  marks?: {
1313
+ /**
1314
+ * The type of the mark
1315
+ */
1270
1316
  type: string;
1317
+ /**
1318
+ * The attributes of the mark. Attributes can have any JSON-serializable value.
1319
+ */
1271
1320
  attrs?: Record<string, any>;
1272
1321
  [key: string]: any;
1273
1322
  }[];
1323
+ /**
1324
+ * The text content of the node. This property is only present on text nodes
1325
+ * (i.e. nodes with `type: 'text'`).
1326
+ *
1327
+ * Text nodes cannot have children, but they can have marks.
1328
+ */
1274
1329
  text?: string;
1275
1330
  [key: string]: any;
1276
1331
  };
@@ -1332,7 +1387,7 @@ type Attribute = {
1332
1387
  keepOnSplit?: boolean;
1333
1388
  isRequired?: boolean;
1334
1389
  };
1335
- type Attributes$1 = {
1390
+ type Attributes = {
1336
1391
  [key: string]: Attribute;
1337
1392
  };
1338
1393
  type ExtensionAttribute = {
@@ -1483,7 +1538,6 @@ type MarkdownParseHelpers = {
1483
1538
  attrs?: any;
1484
1539
  };
1485
1540
  };
1486
-
1487
1541
  /**
1488
1542
  * Return shape for parser-level `parse` handlers.
1489
1543
  * - a single JSON-like node
@@ -1663,59 +1717,6 @@ declare class NodePos {
1663
1717
  }): void;
1664
1718
  }
1665
1719
 
1666
- interface InsertContentOptions {
1667
- /**
1668
- * Options for parsing the content.
1669
- */
1670
- parseOptions?: ParseOptions;
1671
- /**
1672
- * Whether to update the selection after inserting the content.
1673
- */
1674
- updateSelection?: boolean;
1675
- applyInputRules?: boolean;
1676
- applyPasteRules?: boolean;
1677
- }
1678
-
1679
- interface InsertContentAtOptions {
1680
- /**
1681
- * Options for parsing the content.
1682
- */
1683
- parseOptions?: ParseOptions;
1684
- /**
1685
- * Whether to update the selection after inserting the content.
1686
- */
1687
- updateSelection?: boolean;
1688
- /**
1689
- * Whether to apply input rules after inserting the content.
1690
- */
1691
- applyInputRules?: boolean;
1692
- /**
1693
- * Whether to apply paste rules after inserting the content.
1694
- */
1695
- applyPasteRules?: boolean;
1696
- /**
1697
- * Whether to throw an error if the content is invalid.
1698
- */
1699
- errorOnInvalidContent?: boolean;
1700
- }
1701
-
1702
- interface SetContentOptions {
1703
- /**
1704
- * Options for parsing the content.
1705
- * @default {}
1706
- */
1707
- parseOptions?: ParseOptions;
1708
- /**
1709
- * Whether to throw an error if the content is invalid.
1710
- */
1711
- errorOnInvalidContent?: boolean;
1712
- /**
1713
- * Whether to emit an update event.
1714
- * @default true
1715
- */
1716
- emitUpdate?: boolean;
1717
- }
1718
-
1719
1720
  declare module '@tiptap/core' {
1720
1721
  interface Commands<ReturnType> {
1721
1722
  blur: {
@@ -1953,6 +1954,19 @@ declare module '@tiptap/core' {
1953
1954
  };
1954
1955
  }
1955
1956
  }
1957
+
1958
+ interface InsertContentOptions {
1959
+ /**
1960
+ * Options for parsing the content.
1961
+ */
1962
+ parseOptions?: ParseOptions;
1963
+ /**
1964
+ * Whether to update the selection after inserting the content.
1965
+ */
1966
+ updateSelection?: boolean;
1967
+ applyInputRules?: boolean;
1968
+ applyPasteRules?: boolean;
1969
+ }
1956
1970
  declare module '@tiptap/core' {
1957
1971
  interface Commands<ReturnType> {
1958
1972
  insertContent: {
@@ -1973,6 +1987,29 @@ declare module '@tiptap/core' {
1973
1987
  };
1974
1988
  }
1975
1989
  }
1990
+
1991
+ interface InsertContentAtOptions {
1992
+ /**
1993
+ * Options for parsing the content.
1994
+ */
1995
+ parseOptions?: ParseOptions;
1996
+ /**
1997
+ * Whether to update the selection after inserting the content.
1998
+ */
1999
+ updateSelection?: boolean;
2000
+ /**
2001
+ * Whether to apply input rules after inserting the content.
2002
+ */
2003
+ applyInputRules?: boolean;
2004
+ /**
2005
+ * Whether to apply paste rules after inserting the content.
2006
+ */
2007
+ applyPasteRules?: boolean;
2008
+ /**
2009
+ * Whether to throw an error if the content is invalid.
2010
+ */
2011
+ errorOnInvalidContent?: boolean;
2012
+ }
1976
2013
  declare module '@tiptap/core' {
1977
2014
  interface Commands<ReturnType> {
1978
2015
  insertContentAt: {
@@ -2242,6 +2279,23 @@ declare module '@tiptap/core' {
2242
2279
  };
2243
2280
  }
2244
2281
  }
2282
+
2283
+ interface SetContentOptions {
2284
+ /**
2285
+ * Options for parsing the content.
2286
+ * @default {}
2287
+ */
2288
+ parseOptions?: ParseOptions;
2289
+ /**
2290
+ * Whether to throw an error if the content is invalid.
2291
+ */
2292
+ errorOnInvalidContent?: boolean;
2293
+ /**
2294
+ * Whether to emit an update event.
2295
+ * @default true
2296
+ */
2297
+ emitUpdate?: boolean;
2298
+ }
2245
2299
  declare module '@tiptap/core' {
2246
2300
  interface Commands<ReturnType> {
2247
2301
  setContent: {
@@ -2544,6 +2598,7 @@ declare module '@tiptap/core' {
2544
2598
  };
2545
2599
  }
2546
2600
  }
2601
+
2547
2602
  declare class Editor extends EventEmitter<EditorEvents> {
2548
2603
  private commandManager;
2549
2604
  extensionManager: ExtensionManager;
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.6",
4
+ "version": "3.10.8",
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.6",
41
- "@tiptap/pm": "^3.10.6",
42
- "@tiptap/vue-3": "^3.10.6"
40
+ "@tiptap/extension-drag-handle": "^3.10.8",
41
+ "@tiptap/pm": "^3.10.8",
42
+ "@tiptap/vue-3": "^3.10.8"
43
43
  },
44
44
  "devDependencies": {
45
45
  "vue": "^3.0.0",
46
- "@tiptap/extension-drag-handle": "^3.10.6",
47
- "@tiptap/pm": "^3.10.6",
48
- "@tiptap/vue-3": "^3.10.6"
46
+ "@tiptap/extension-drag-handle": "^3.10.8",
47
+ "@tiptap/pm": "^3.10.8",
48
+ "@tiptap/vue-3": "^3.10.8"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsup",