@prosekit/basic 0.3.9 → 0.3.11

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.
@@ -1,5 +1,19 @@
1
+ import { Attrs } from 'prosemirror-model';
2
+ import { DedentListOptions } from 'prosemirror-flat-list';
3
+ import { config as default_alias_2 } from '@prosekit/dev/config-vitest';
1
4
  import { Extension } from '@prosekit/core';
5
+ import { HeadingAttrs } from '@prosekit/extensions/heading';
6
+ import { ImageAttrs } from '@prosekit/extensions/image';
7
+ import { IndentListOptions } from 'prosemirror-flat-list';
8
+ import { LinkAttrs } from '@prosekit/extensions/link';
9
+ import { ListAttributes } from 'prosemirror-flat-list';
10
+ import { MarkType } from 'prosemirror-model';
11
+ import { Node as Node_2 } from 'prosemirror-model';
12
+ import { NodeRange } from 'prosemirror-model';
13
+ import { NodeType } from 'prosemirror-model';
2
14
  import { Options } from 'tsup';
15
+ import { ToggleCollapsedOptions } from 'prosemirror-flat-list';
16
+ import { UnwrapListOptions } from 'prosemirror-flat-list';
3
17
 
4
18
  /**
5
19
  * @public
@@ -14,22 +28,95 @@ export declare namespace default_alias {
14
28
 
15
29
  export declare const default_alias_1: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
16
30
 
17
- export declare const default_alias_2: {
18
- test: {
19
- environment: "jsdom";
20
- };
21
- };
31
+ export { default_alias_2 }
22
32
 
23
33
  /**
24
- * A basic extension that includes some common functionality. You can copy this
25
- * function and customize it to your needs.
34
+ * Define a basic extension that includes some common functionality. You can
35
+ * copy this function and customize it to your needs.
26
36
  * @public
27
37
  */
28
38
  export declare function defineBasicExtension(): Extension< {
29
- Nodes: any;
30
- Marks: any;
39
+ Nodes: "blockquote" | "table" | "text" | "doc" | "paragraph" | "heading" | "image" | "list" | "tableRow" | "tableCell" | "tableHeaderCell";
40
+ Marks: "code" | "link" | "bold" | "strike" | "italic" | "underline";
31
41
  Commands: {
32
- [x: string]: any;
42
+ insertText: [{
43
+ text: string;
44
+ from?: number;
45
+ to?: number;
46
+ }];
47
+ insertNode: [options: {
48
+ node: Node_2;
49
+ pos?: number;
50
+ type?: undefined;
51
+ attrs?: undefined;
52
+ } | {
53
+ node?: undefined;
54
+ pos?: number;
55
+ type: string;
56
+ attrs?: Attrs;
57
+ }];
58
+ removeNode: [options: {
59
+ type: string | NodeType;
60
+ pos?: number;
61
+ }];
62
+ wrap: [{
63
+ nodeType: NodeType;
64
+ attrs?: Attrs | null;
65
+ }];
66
+ setBlockType: [options: {
67
+ type: NodeType | string;
68
+ attrs?: Attrs | null;
69
+ from?: number;
70
+ to?: number;
71
+ }];
72
+ setNodeAttrs: [options: {
73
+ type: string | NodeType | string[] | NodeType[];
74
+ attrs: Attrs;
75
+ pos?: number;
76
+ }];
77
+ selectAll: [];
78
+ addMark: [options: {
79
+ type: string | MarkType;
80
+ attrs?: Attrs | null;
81
+ from?: number;
82
+ to?: number;
83
+ }];
84
+ removeMark: [options: {
85
+ type: string | MarkType;
86
+ attrs?: Attrs | null;
87
+ from?: number;
88
+ to?: number;
89
+ }];
90
+ undo: [];
91
+ redo: [];
92
+ toggleBold: [];
93
+ toggleCode: [];
94
+ setHeading: [attrs?: HeadingAttrs | undefined];
95
+ insertHeading: [attrs?: HeadingAttrs | undefined];
96
+ toggleHeading: [attrs?: HeadingAttrs | undefined];
97
+ insertImage: [attrs?: ImageAttrs | undefined];
98
+ toggleItalic: [];
99
+ addLink: [attrs: LinkAttrs];
100
+ removeLink: [];
101
+ toggleLink: [attrs: LinkAttrs];
102
+ expandLink: [];
103
+ dedentList: [options?: DedentListOptions | undefined];
104
+ indentList: [options?: IndentListOptions | undefined];
105
+ moveList: [direction: "up" | "down"];
106
+ splitList: [];
107
+ toggleCollapsed: [(ToggleCollapsedOptions | undefined)?];
108
+ toggleList: [attrs: ListAttributes];
109
+ unwrapList: [options?: UnwrapListOptions | undefined];
110
+ wrapInList: [getAttrs: ListAttributes | ((range: NodeRange) => ListAttributes | null)];
111
+ insertList: [attrs?: ListAttributes | undefined];
112
+ toggleStrike: [];
113
+ insertTable: [{
114
+ row: number;
115
+ col: number;
116
+ header: boolean;
117
+ }];
118
+ exitTable: [];
119
+ toggleUnderline: [];
33
120
  };
34
121
  }>;
35
122
 
package/dist/style.css CHANGED
@@ -49,7 +49,7 @@ img.ProseMirror-separator {
49
49
 
50
50
  /* ../pm/src/view/style/prosemirror.css */
51
51
 
52
- /* ../../node_modules/.pnpm/prosemirror-flat-list@0.5.0/node_modules/prosemirror-flat-list/dist/style.css */
52
+ /* ../../node_modules/.pnpm/prosemirror-flat-list@0.5.1/node_modules/prosemirror-flat-list/dist/style.css */
53
53
  .prosemirror-flat-list {
54
54
  padding: 0;
55
55
  margin-top: 0;
@@ -186,4 +186,13 @@ img.ProseMirror-separator {
186
186
  border-radius: 2px;
187
187
  }
188
188
 
189
+ /* ../extensions/src/commit/style.css */
190
+ .prosekit-commit-deletion {
191
+ background-color: #e5534b80;
192
+ text-decoration: line-through;
193
+ }
194
+ .prosekit-commit-addition {
195
+ background-color: #53e54b80;
196
+ }
197
+
189
198
  /* src/style.css */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/basic",
3
3
  "type": "module",
4
- "version": "0.3.9",
4
+ "version": "0.3.11",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -41,16 +41,16 @@
41
41
  "dist"
42
42
  ],
43
43
  "dependencies": {
44
- "@prosekit/core": "^0.6.0",
45
- "@prosekit/extensions": "^0.6.0",
44
+ "@prosekit/extensions": "^0.7.0",
45
+ "@prosekit/core": "^0.7.0",
46
46
  "@prosekit/pm": "^0.1.5"
47
47
  },
48
48
  "devDependencies": {
49
- "postcss": "^8.4.38",
49
+ "postcss": "^8.4.39",
50
50
  "postcss-nesting": "^12.1.5",
51
51
  "tsup": "^8.1.0",
52
- "typescript": "^5.5.2",
53
- "vitest": "^1.6.0",
52
+ "typescript": "^5.5.3",
53
+ "vitest": "^2.0.0-beta.13",
54
54
  "@prosekit/dev": "0.0.0"
55
55
  },
56
56
  "scripts": {