lakelib 0.0.5 → 0.0.7
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 +45 -24
- package/dist/lake.css +50 -25
- package/dist/lake.min.js +20 -20
- package/dist/lake.min.js.map +1 -1
- package/lib/lake.css +50 -25
- package/lib/lake.js +67 -25
- package/lib/lake.js.map +1 -1
- package/lib/types/editor.d.ts +1 -0
- package/lib/types/managers/history.d.ts +1 -1
- package/lib/types/types/object.d.ts +6 -0
- package/lib/types/ui/toolbar.d.ts +2 -8
- package/package.json +32 -42
- package/dist/codemirror.min.js +0 -1
package/lib/types/editor.d.ts
CHANGED
|
@@ -19,3 +19,9 @@ export type AppliedItem = {
|
|
|
19
19
|
attributes: KeyValue;
|
|
20
20
|
styles: KeyValue;
|
|
21
21
|
};
|
|
22
|
+
export type StateData = {
|
|
23
|
+
appliedItems: AppliedItem[];
|
|
24
|
+
disabledNameMap: Map<string, boolean>;
|
|
25
|
+
selectedNameMap: Map<string, boolean>;
|
|
26
|
+
selectedValuesMap: Map<string, string[]>;
|
|
27
|
+
};
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import type { Editor } from '../editor';
|
|
2
2
|
import { NativeNode } from '../types/native';
|
|
3
|
-
import {
|
|
3
|
+
import { StateData } from '../types/object';
|
|
4
4
|
import { ToolbarItem } from '../types/toolbar';
|
|
5
5
|
import { Nodes } from '../models/nodes';
|
|
6
6
|
type ToolbarConfig = {
|
|
7
7
|
root: string | Nodes | NativeNode;
|
|
8
8
|
items?: (string | ToolbarItem)[];
|
|
9
9
|
};
|
|
10
|
-
type StateData = {
|
|
11
|
-
appliedItems: AppliedItem[];
|
|
12
|
-
disabledNameMap: Map<string, boolean>;
|
|
13
|
-
selectedNameMap: Map<string, boolean>;
|
|
14
|
-
selectedValuesMap: Map<string, string[]>;
|
|
15
|
-
};
|
|
16
10
|
export declare class Toolbar {
|
|
17
11
|
private items;
|
|
18
12
|
private root;
|
|
@@ -25,7 +19,7 @@ export declare class Toolbar {
|
|
|
25
19
|
private appendButton;
|
|
26
20
|
private appendDropdown;
|
|
27
21
|
private appendUpload;
|
|
28
|
-
updateState(
|
|
22
|
+
updateState(stateData: StateData): void;
|
|
29
23
|
render(editor: Editor): void;
|
|
30
24
|
}
|
|
31
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lakelib",
|
|
3
|
+
"version": "0.0.7",
|
|
3
4
|
"description": "Rich text editor based on the browser",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
"keywords": [
|
|
6
|
+
"rich text",
|
|
7
|
+
"wysiwyg",
|
|
8
|
+
"editor"
|
|
9
|
+
],
|
|
7
10
|
"homepage": "http://lakejs.com",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/lakejs/lake/issues"
|
|
13
|
+
},
|
|
8
14
|
"repository": {
|
|
9
15
|
"type": "git",
|
|
10
16
|
"url": "git+https://github.com/lakejs/lake.git"
|
|
11
17
|
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Luo Longhao <luolonghao@gmail.com>",
|
|
12
20
|
"main": "./lib/lake.js",
|
|
13
21
|
"types": "./lib/types/index.d.ts",
|
|
14
22
|
"files": [
|
|
15
23
|
"dist",
|
|
16
24
|
"lib"
|
|
17
25
|
],
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"wysiwyg",
|
|
21
|
-
"editor"
|
|
22
|
-
],
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/lakejs/lake/issues"
|
|
26
|
+
"simple-git-hooks": {
|
|
27
|
+
"pre-commit": "pnpm sort:package && pnpm lint"
|
|
25
28
|
},
|
|
26
29
|
"dependencies": {
|
|
27
30
|
"@types/blueimp-md5": "^2.18.2",
|
|
@@ -35,25 +38,6 @@
|
|
|
35
38
|
"typesafe-i18n": "^5.26.2"
|
|
36
39
|
},
|
|
37
40
|
"devDependencies": {
|
|
38
|
-
"@codemirror/commands": "^6.3.3",
|
|
39
|
-
"@codemirror/lang-cpp": "^6.0.2",
|
|
40
|
-
"@codemirror/lang-css": "^6.2.1",
|
|
41
|
-
"@codemirror/lang-go": "^6.0.0",
|
|
42
|
-
"@codemirror/lang-html": "^6.4.8",
|
|
43
|
-
"@codemirror/lang-java": "^6.0.1",
|
|
44
|
-
"@codemirror/lang-javascript": "^6.2.2",
|
|
45
|
-
"@codemirror/lang-json": "^6.0.1",
|
|
46
|
-
"@codemirror/lang-markdown": "^6.2.4",
|
|
47
|
-
"@codemirror/lang-php": "^6.0.1",
|
|
48
|
-
"@codemirror/lang-python": "^6.1.5",
|
|
49
|
-
"@codemirror/lang-rust": "^6.0.1",
|
|
50
|
-
"@codemirror/lang-sql": "^6.6.3",
|
|
51
|
-
"@codemirror/lang-xml": "^6.1.0",
|
|
52
|
-
"@codemirror/lang-yaml": "^6.1.0",
|
|
53
|
-
"@codemirror/language": "^6.10.1",
|
|
54
|
-
"@codemirror/state": "^6.4.1",
|
|
55
|
-
"@codemirror/view": "^6.26.1",
|
|
56
|
-
"@lezer/highlight": "^1.2.0",
|
|
57
41
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
58
42
|
"@rollup/plugin-json": "^6.1.0",
|
|
59
43
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
@@ -68,33 +52,39 @@
|
|
|
68
52
|
"eslint": "^8.57.0",
|
|
69
53
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
70
54
|
"eslint-config-prettier": "^9.1.0",
|
|
55
|
+
"execa": "^8.0.1",
|
|
71
56
|
"express": "^4.19.2",
|
|
57
|
+
"lake-codemirror": "^1.0.0",
|
|
72
58
|
"mocha": "^10.4.0",
|
|
73
59
|
"multer": "1.4.5-lts.1",
|
|
74
60
|
"npm-run-all": "^4.1.5",
|
|
61
|
+
"picocolors": "^1.0.0",
|
|
62
|
+
"prompts": "^2.4.2",
|
|
75
63
|
"puppeteer": "^22.6.2",
|
|
76
64
|
"rimraf": "^5.0.5",
|
|
77
65
|
"rollup": "^4.14.0",
|
|
78
66
|
"rollup-plugin-import-css": "^3.5.0",
|
|
79
67
|
"rollup-plugin-svg-import": "^3.0.0",
|
|
68
|
+
"semver": "^7.6.0",
|
|
80
69
|
"simple-git-hooks": "^2.11.1",
|
|
81
70
|
"sinon": "^17.0.1",
|
|
71
|
+
"sort-package-json": "^2.10.0",
|
|
82
72
|
"tslib": "^2.6.2",
|
|
83
|
-
"typescript": "^5.4.4"
|
|
73
|
+
"typescript": "^5.4.4",
|
|
74
|
+
"wait-on": "^7.2.0"
|
|
84
75
|
},
|
|
76
|
+
"packageManager": "pnpm@8.15.6",
|
|
85
77
|
"scripts": {
|
|
86
|
-
"
|
|
87
|
-
"express": "node ./scripts/start-server.mjs",
|
|
88
|
-
"
|
|
89
|
-
"build": "rimraf ./lib
|
|
90
|
-
"codemirror": "rollup --config rollup.config.mjs --codemirror",
|
|
78
|
+
"dev": "npm-run-all --parallel --print-label dev:express dev:rollup",
|
|
79
|
+
"dev:express": "node ./scripts/start-server.mjs",
|
|
80
|
+
"dev:rollup": "rollup --watch --config rollup.config.mjs",
|
|
81
|
+
"build": "rimraf ./dist ./lib && rollup --config rollup.config.mjs",
|
|
91
82
|
"i18n": "typesafe-i18n --no-watch",
|
|
83
|
+
"sort:package": "sort-package-json",
|
|
92
84
|
"lint": "eslint . --config .eslintrc.cjs --ext \".ts,.js,.cjs,.mjs\"",
|
|
93
85
|
"test": "node ./scripts/run-tests.mjs",
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"packageManager": "pnpm@8.15.6"
|
|
100
|
-
}
|
|
86
|
+
"test:express": "node ./scripts/start-server.mjs 8081",
|
|
87
|
+
"test:rollup": "rollup --config rollup.config.mjs --test",
|
|
88
|
+
"release": "node ./scripts/release.mjs"
|
|
89
|
+
}
|
|
90
|
+
}
|