@prosekit/basic 0.0.15 → 0.0.17

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.
@@ -6,8 +6,14 @@ import { NodeType } from 'prosemirror-model';
6
6
  import { Options } from 'tsup';
7
7
  import { UserProjectConfigExport } from 'vitest/dist/config.js';
8
8
 
9
+ export declare type BasicExtension = ReturnType<typeof defineBasicExtension>;
10
+
11
+ export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
12
+
13
+ export declare const default_alias_1: UserProjectConfigExport;
14
+
9
15
  /** @public */
10
- export declare function addBasicExtension(): Extension< {
16
+ export declare function defineBasicExtension(): Extension< {
11
17
  NODES: "text" | "doc" | "paragraph" | "heading" | "list";
12
18
  MARKS: "bold" | "italic";
13
19
  COMMAND_ARGS: {
@@ -39,10 +45,4 @@ selectAll: [];
39
45
  };
40
46
  }>;
41
47
 
42
- export declare type BasicExtension = ReturnType<typeof addBasicExtension>;
43
-
44
- export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
45
-
46
- export declare const default_alias_1: UserProjectConfigExport;
47
-
48
48
  export { }
@@ -1,2 +1,2 @@
1
- export { addBasicExtension } from './_tsup-dts-rollup';
1
+ export { defineBasicExtension } from './_tsup-dts-rollup';
2
2
  export { BasicExtension } from './_tsup-dts-rollup';
@@ -1,33 +1,33 @@
1
1
  // src/index.ts
2
2
  import {
3
3
  Priority,
4
- addBaseCommands,
5
- addBaseKeymap,
6
- addDoc,
7
- addHistory,
8
- addParagraph,
9
- addText,
10
- defineExtension,
4
+ defineBaseCommands,
5
+ defineBaseKeymap,
6
+ defineDoc,
7
+ defineHistory,
8
+ defineParagraph,
9
+ defineText,
10
+ union,
11
11
  withPriority
12
12
  } from "@prosekit/core";
13
- import { addBold } from "@prosekit/extensions/bold";
14
- import { addHeading } from "@prosekit/extensions/heading";
15
- import { addItalic } from "@prosekit/extensions/italic";
16
- import { addList } from "@prosekit/extensions/list";
17
- function addBasicExtension() {
18
- return defineExtension([
19
- addDoc(),
20
- addText(),
21
- addHeading(),
22
- addHistory(),
23
- addList(),
24
- addBaseKeymap(),
25
- addBaseCommands(),
26
- addItalic(),
27
- addBold(),
28
- withPriority(addParagraph(), Priority.high)
13
+ import { defineBold } from "@prosekit/extensions/bold";
14
+ import { defineHeading } from "@prosekit/extensions/heading";
15
+ import { defineItalic } from "@prosekit/extensions/italic";
16
+ import { defineList } from "@prosekit/extensions/list";
17
+ function defineBasicExtension() {
18
+ return union([
19
+ defineDoc(),
20
+ defineText(),
21
+ defineHeading(),
22
+ defineHistory(),
23
+ defineList(),
24
+ defineBaseKeymap(),
25
+ defineBaseCommands(),
26
+ defineItalic(),
27
+ defineBold(),
28
+ withPriority(defineParagraph(), Priority.high)
29
29
  ]);
30
30
  }
31
31
  export {
32
- addBasicExtension
32
+ defineBasicExtension
33
33
  };
package/dist/style.css CHANGED
@@ -1,4 +1,4 @@
1
- /* ../../node_modules/.pnpm/prosemirror-view@1.32.0/node_modules/prosemirror-view/style/prosemirror.css */
1
+ /* ../../node_modules/.pnpm/prosemirror-view@1.32.1/node_modules/prosemirror-view/style/prosemirror.css */
2
2
  .ProseMirror {
3
3
  position: relative;
4
4
  word-wrap: break-word;
@@ -23,6 +23,9 @@
23
23
  .ProseMirror-hideselection {
24
24
  caret-color: transparent;
25
25
  }
26
+ .ProseMirror [draggable][contenteditable=false] {
27
+ user-select: text;
28
+ }
26
29
  .ProseMirror-selectednode {
27
30
  outline: 2px solid #8cf;
28
31
  }
@@ -49,7 +52,7 @@ img.ProseMirror-separator {
49
52
 
50
53
  /* ../core/src/style.css */
51
54
 
52
- /* ../../node_modules/.pnpm/prosemirror-flat-list@0.4.2/node_modules/prosemirror-flat-list/dist/style.css */
55
+ /* ../../node_modules/.pnpm/prosemirror-flat-list@0.4.3/node_modules/prosemirror-flat-list/dist/style.css */
53
56
  .prosemirror-flat-list {
54
57
  padding: 0;
55
58
  margin-top: 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/basic",
3
3
  "type": "module",
4
- "version": "0.0.15",
4
+ "version": "0.0.17",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -41,8 +41,8 @@
41
41
  "dist"
42
42
  ],
43
43
  "dependencies": {
44
- "@prosekit/core": "^0.0.11",
45
- "@prosekit/extensions": "^0.0.13"
44
+ "@prosekit/core": "^0.0.13",
45
+ "@prosekit/extensions": "^0.0.15"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@prosekit/dev": "*",
package/src/index.ts CHANGED
@@ -1,33 +1,33 @@
1
1
  import {
2
2
  Priority,
3
- addBaseCommands,
4
- addBaseKeymap,
5
- addDoc,
6
- addHistory,
7
- addParagraph,
8
- addText,
9
- defineExtension,
3
+ defineBaseCommands,
4
+ defineBaseKeymap,
5
+ defineDoc,
6
+ defineHistory,
7
+ defineParagraph,
8
+ defineText,
9
+ union,
10
10
  withPriority,
11
11
  } from '@prosekit/core'
12
- import { addBold } from '@prosekit/extensions/bold'
13
- import { addHeading } from '@prosekit/extensions/heading'
14
- import { addItalic } from '@prosekit/extensions/italic'
15
- import { addList } from '@prosekit/extensions/list'
12
+ import { defineBold } from '@prosekit/extensions/bold'
13
+ import { defineHeading } from '@prosekit/extensions/heading'
14
+ import { defineItalic } from '@prosekit/extensions/italic'
15
+ import { defineList } from '@prosekit/extensions/list'
16
16
 
17
17
  /** @public */
18
- export function addBasicExtension() {
19
- return defineExtension([
20
- addDoc(),
21
- addText(),
22
- addHeading(),
23
- addHistory(),
24
- addList(),
25
- addBaseKeymap(),
26
- addBaseCommands(),
27
- addItalic(),
28
- addBold(),
29
- withPriority(addParagraph(), Priority.high),
18
+ export function defineBasicExtension() {
19
+ return union([
20
+ defineDoc(),
21
+ defineText(),
22
+ defineHeading(),
23
+ defineHistory(),
24
+ defineList(),
25
+ defineBaseKeymap(),
26
+ defineBaseCommands(),
27
+ defineItalic(),
28
+ defineBold(),
29
+ withPriority(defineParagraph(), Priority.high),
30
30
  ])
31
31
  }
32
32
 
33
- export type BasicExtension = ReturnType<typeof addBasicExtension>
33
+ export type BasicExtension = ReturnType<typeof defineBasicExtension>