editate 0.6.19 → 0.6.21
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/README.md +1 -0
- package/lib/commands.d.ts +4 -4
- package/lib/doc/node.d.ts +5 -4
- package/lib/doc/types-infer.d.ts +5 -5
- package/lib/index.cjs +493 -425
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +509 -437
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.d.ts +1 -0
- package/lib/plugins/scrollToSelection.d.ts +12 -0
- package/package.json +7 -3
package/lib/plugins/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export * from './transfer/index.js';
|
|
|
2
2
|
export { debugPlugin } from './debug.js';
|
|
3
3
|
export { keymapPlugin } from './keymap.js';
|
|
4
4
|
export { Undo, Redo, Undoable, Redoable } from './history.js';
|
|
5
|
+
export { scrollToSelectionPlugin } from './scrollToSelection.js';
|
|
5
6
|
export { selectionRectPlugin } from './selectionRect.js';
|
|
6
7
|
export { singlelinePlugin } from './singleline.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Editor } from '../editor.js';
|
|
2
|
+
export interface ScrollToSelectionOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Scroll smoothly instead of jumping.
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
smooth?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A plugin to scroll to the selection on document change.
|
|
11
|
+
*/
|
|
12
|
+
export declare const scrollToSelectionPlugin: (editor: Editor, { smooth }?: ScrollToSelectionOptions) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "editate",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.21",
|
|
4
4
|
"description": "An experimental, type-safe, framework agnostic and small (5kB+) contenteditable state manager.",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -36,12 +36,14 @@
|
|
|
36
36
|
"@standard-schema/spec": "^1.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
+
"@chenglou/pretext": "^0.0.8",
|
|
39
40
|
"@playwright/test": "^1.60.0",
|
|
40
41
|
"@size-limit/preset-small-lib": "^12.0.0",
|
|
41
42
|
"@storybook/addon-docs": "^10.4.0",
|
|
42
43
|
"@storybook/react-vite": "^10.4.0",
|
|
43
44
|
"@textlint/kernel": "^15.0.0",
|
|
44
45
|
"@textlint/textlint-plugin-text": "^15.0.0",
|
|
46
|
+
"@types/prismjs": "^1.26.6",
|
|
45
47
|
"@types/react": "^19.2.0",
|
|
46
48
|
"@types/react-dom": "^19.2.0",
|
|
47
49
|
"diff": "^9.0.0",
|
|
@@ -53,13 +55,14 @@
|
|
|
53
55
|
"patch-package": "^8.0.0",
|
|
54
56
|
"path-browserify": "^1.0.1",
|
|
55
57
|
"prettier": "^3.8.1",
|
|
56
|
-
"
|
|
58
|
+
"prismjs": "^1.30.0",
|
|
57
59
|
"react": "^19.2.6",
|
|
58
60
|
"react-dom": "^19.2.6",
|
|
59
61
|
"react-is": "^19.2.6",
|
|
60
62
|
"remark-gfm": "^4.0.1",
|
|
61
63
|
"remark-parse": "^11.0.0",
|
|
62
64
|
"rimraf": "6.1.3",
|
|
65
|
+
"shiki": "^4.3.1",
|
|
63
66
|
"size-limit": "^12.0.0",
|
|
64
67
|
"storybook": "^10.4.0",
|
|
65
68
|
"terser": "^5.48.0",
|
|
@@ -97,7 +100,8 @@
|
|
|
97
100
|
"solid",
|
|
98
101
|
"angular",
|
|
99
102
|
"preact",
|
|
100
|
-
"alpine"
|
|
103
|
+
"alpine",
|
|
104
|
+
"marko"
|
|
101
105
|
],
|
|
102
106
|
"author": "inokawa <stratoooo-taster@yahoo.co.jp> (https://github.com/inokawa/)",
|
|
103
107
|
"license": "MIT",
|