@dou-ui/editor 0.1.0-alpha.29 → 0.1.0-alpha.30
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/components/block-handle.js.map +1 -1
- package/dist/components/block-handle.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/components/block-handle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/dom.js +5 -3
- package/dist/dom.js.map +1 -1
- package/dist/extensions/table/schema.js +5 -1
- package/dist/extensions/table/schema.js.map +1 -1
- package/dist/extensions/table/table-controls.js.map +1 -1
- package/dist/extensions/table/table-controls.vue_vue_type_script_setup_true_lang.js +79 -8
- package/dist/extensions/table/table-controls.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/extensions/table/view.js +169 -16
- package/dist/extensions/table/view.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/extensions/table/view.d.ts +32 -5
- package/package.json +7 -7
|
@@ -4,17 +4,44 @@ import type { NodeView, ViewMutationRecord } from 'prosemirror-view';
|
|
|
4
4
|
/** The narrowest a column gets, without a width of its own and when resized. */
|
|
5
5
|
export declare const CELL_MIN_WIDTH = 96;
|
|
6
6
|
/**
|
|
7
|
-
* A table in the editor:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* A table in the editor: an outer frame (`this.dom`, the block's content
|
|
8
|
+
* element), an inner scrolling viewport around the table, and a lightweight
|
|
9
|
+
* custom horizontal scrollbar aligned to the text column's start edge.
|
|
10
|
+
*
|
|
11
|
+
* Keeping the viewport inside the frame lets top-level wide tables scroll into
|
|
12
|
+
* the left reading-width margin while the scrollbar starts flush with the
|
|
13
|
+
* text column, and prevents the edge-fade mask (`is-cut-start` / `is-cut-end`)
|
|
14
|
+
* from fading the ends of the scrollbar itself.
|
|
11
15
|
*/
|
|
12
16
|
export declare class TableBlockView extends TableView implements NodeView {
|
|
17
|
+
readonly viewport: HTMLDivElement;
|
|
18
|
+
readonly bar: HTMLDivElement;
|
|
19
|
+
readonly thumb: HTMLDivElement;
|
|
13
20
|
private readonly observer;
|
|
21
|
+
private thumbSize;
|
|
22
|
+
private dragging;
|
|
23
|
+
private dragStartX;
|
|
24
|
+
private dragStartScroll;
|
|
25
|
+
private idleTimer;
|
|
26
|
+
private rafId;
|
|
14
27
|
private readonly onScroll;
|
|
28
|
+
private readonly onResize;
|
|
29
|
+
private readonly onBarMouseDown;
|
|
30
|
+
private readonly onTrackDown;
|
|
31
|
+
private readonly onThumbDown;
|
|
32
|
+
private readonly onThumbMove;
|
|
33
|
+
private readonly onThumbUp;
|
|
15
34
|
constructor(node: PMNode);
|
|
16
|
-
|
|
35
|
+
private isRtl;
|
|
36
|
+
private scheduleSync;
|
|
37
|
+
/** Sync edge-fade classes and the custom scrollbar thumb geometry. */
|
|
38
|
+
private sync;
|
|
39
|
+
/** Which sides cut columns off: the table's edges against the viewport's, padding left out. */
|
|
17
40
|
private edges;
|
|
41
|
+
/** Size and position the custom scrollbar thumb along its track. */
|
|
42
|
+
private updateScrollbar;
|
|
43
|
+
update(node: PMNode): boolean;
|
|
44
|
+
stopEvent(event: Event): boolean;
|
|
18
45
|
ignoreMutation(record: ViewMutationRecord): boolean;
|
|
19
46
|
destroy(): void;
|
|
20
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dou-ui/editor",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.30",
|
|
4
4
|
"description": "DouUI 的块编辑器:基于 ProseMirror,文档由可拖动、可转换的块组成",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"build": "vite build && vue-tsc -p tsconfig.build.json && bun scripts/build-style.ts"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@dou-ui/code": "0.1.0-alpha.
|
|
66
|
-
"@dou-ui/flow": "0.1.0-alpha.
|
|
67
|
-
"dou-ui": "0.1.0-alpha.
|
|
65
|
+
"@dou-ui/code": "0.1.0-alpha.30",
|
|
66
|
+
"@dou-ui/flow": "0.1.0-alpha.30",
|
|
67
|
+
"dou-ui": "0.1.0-alpha.30",
|
|
68
68
|
"vue": "^3.5.0",
|
|
69
69
|
"yjs": "^13.6.0",
|
|
70
70
|
"markdown-it": "^14.0.0"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@dou-ui/icons": "0.1.0-alpha.
|
|
87
|
+
"@dou-ui/icons": "0.1.0-alpha.30",
|
|
88
88
|
"prosemirror-commands": "^1.7.2",
|
|
89
89
|
"prosemirror-history": "^1.5.1",
|
|
90
90
|
"prosemirror-inputrules": "^1.5.1",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"access": "public"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@dou-ui/code": "0.1.0-alpha.
|
|
103
|
-
"@dou-ui/flow": "0.1.0-alpha.
|
|
102
|
+
"@dou-ui/code": "0.1.0-alpha.30",
|
|
103
|
+
"@dou-ui/flow": "0.1.0-alpha.30",
|
|
104
104
|
"@types/markdown-it": "^14.1.2",
|
|
105
105
|
"markdown-it": "^14.1.0",
|
|
106
106
|
"y-protocols": "^1.0.7",
|