lakelib 0.0.1
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/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/codemirror.min.js +1 -0
- package/dist/lake-all.css +1328 -0
- package/dist/lake-all.min.js +84 -0
- package/dist/lake.css +907 -0
- package/dist/lake.min.js +75 -0
- package/lib/lake.css +907 -0
- package/lib/lake.js +8315 -0
- package/lib/types/boxes/code-block.d.ts +2 -0
- package/lib/types/boxes/hr.d.ts +2 -0
- package/lib/types/boxes/image.d.ts +3 -0
- package/lib/types/codemirror.d.ts +8 -0
- package/lib/types/config/element-rules.d.ts +1 -0
- package/lib/types/config/menu-items.d.ts +9 -0
- package/lib/types/config/tag-names.d.ts +6 -0
- package/lib/types/config/toolbar-items.d.ts +2 -0
- package/lib/types/css/index.d.ts +15 -0
- package/lib/types/editor.d.ts +73 -0
- package/lib/types/elements/bookmark.d.ts +2 -0
- package/lib/types/elements/box.d.ts +2 -0
- package/lib/types/icons/index.d.ts +1 -0
- package/lib/types/index.d.ts +29 -0
- package/lib/types/managers/box-manager.d.ts +13 -0
- package/lib/types/managers/command.d.ts +11 -0
- package/lib/types/managers/history.d.ts +26 -0
- package/lib/types/managers/keystroke.d.ts +12 -0
- package/lib/types/managers/plugin.d.ts +9 -0
- package/lib/types/managers/selection.d.ts +41 -0
- package/lib/types/models/box.d.ts +28 -0
- package/lib/types/models/fragment.d.ts +7 -0
- package/lib/types/models/nodes.d.ts +96 -0
- package/lib/types/models/range.d.ts +53 -0
- package/lib/types/operations/add-mark.d.ts +3 -0
- package/lib/types/operations/delete-contents.d.ts +2 -0
- package/lib/types/operations/fix-list.d.ts +2 -0
- package/lib/types/operations/insert-bookmark.d.ts +6 -0
- package/lib/types/operations/insert-box.d.ts +4 -0
- package/lib/types/operations/insert-contents.d.ts +2 -0
- package/lib/types/operations/insert-fragment.d.ts +2 -0
- package/lib/types/operations/insert-link.d.ts +3 -0
- package/lib/types/operations/insert-node.d.ts +4 -0
- package/lib/types/operations/remove-box.d.ts +3 -0
- package/lib/types/operations/remove-mark.d.ts +2 -0
- package/lib/types/operations/set-blocks.d.ts +3 -0
- package/lib/types/operations/split-block.d.ts +3 -0
- package/lib/types/operations/split-marks.d.ts +3 -0
- package/lib/types/operations/to-bookmark.d.ts +6 -0
- package/lib/types/parsers/html-parser.d.ts +14 -0
- package/lib/types/parsers/text-parser.d.ts +6 -0
- package/lib/types/plugins/align.d.ts +3 -0
- package/lib/types/plugins/arrow-keys.d.ts +3 -0
- package/lib/types/plugins/backspace-key.d.ts +3 -0
- package/lib/types/plugins/block-quote.d.ts +3 -0
- package/lib/types/plugins/bold.d.ts +3 -0
- package/lib/types/plugins/code-block.d.ts +3 -0
- package/lib/types/plugins/code.d.ts +3 -0
- package/lib/types/plugins/copy.d.ts +3 -0
- package/lib/types/plugins/cut.d.ts +3 -0
- package/lib/types/plugins/delete-key.d.ts +3 -0
- package/lib/types/plugins/enter-key.d.ts +3 -0
- package/lib/types/plugins/font-color.d.ts +3 -0
- package/lib/types/plugins/font-family.d.ts +3 -0
- package/lib/types/plugins/font-size.d.ts +3 -0
- package/lib/types/plugins/format-painter.d.ts +3 -0
- package/lib/types/plugins/heading.d.ts +3 -0
- package/lib/types/plugins/highlight.d.ts +3 -0
- package/lib/types/plugins/hr.d.ts +3 -0
- package/lib/types/plugins/image.d.ts +3 -0
- package/lib/types/plugins/indent.d.ts +3 -0
- package/lib/types/plugins/italic.d.ts +3 -0
- package/lib/types/plugins/link.d.ts +3 -0
- package/lib/types/plugins/list.d.ts +3 -0
- package/lib/types/plugins/markdown.d.ts +3 -0
- package/lib/types/plugins/paste.d.ts +3 -0
- package/lib/types/plugins/redo.d.ts +3 -0
- package/lib/types/plugins/remove-format.d.ts +3 -0
- package/lib/types/plugins/select-all.d.ts +3 -0
- package/lib/types/plugins/shift-enter-key.d.ts +3 -0
- package/lib/types/plugins/strikethrough.d.ts +3 -0
- package/lib/types/plugins/subscript.d.ts +3 -0
- package/lib/types/plugins/superscript.d.ts +3 -0
- package/lib/types/plugins/tab-key.d.ts +3 -0
- package/lib/types/plugins/underline.d.ts +3 -0
- package/lib/types/plugins/undo.d.ts +3 -0
- package/lib/types/plugins/unlink.d.ts +3 -0
- package/lib/types/storage/box-instances.d.ts +2 -0
- package/lib/types/storage/boxes.d.ts +2 -0
- package/lib/types/storage/editors.d.ts +2 -0
- package/lib/types/types/box.d.ts +15 -0
- package/lib/types/types/native.d.ts +33 -0
- package/lib/types/types/node.d.ts +1 -0
- package/lib/types/types/object.d.ts +21 -0
- package/lib/types/types/request.d.ts +20 -0
- package/lib/types/types/toolbar.d.ts +40 -0
- package/lib/types/ui/link-popup.d.ts +16 -0
- package/lib/types/ui/toolbar.d.ts +30 -0
- package/lib/types/ui/upload.d.ts +10 -0
- package/lib/types/utils/append-deepest.d.ts +2 -0
- package/lib/types/utils/camel-case.d.ts +1 -0
- package/lib/types/utils/change-tag-name.d.ts +2 -0
- package/lib/types/utils/debug.d.ts +1 -0
- package/lib/types/utils/denormalize-value.d.ts +1 -0
- package/lib/types/utils/encode.d.ts +1 -0
- package/lib/types/utils/fix-numbered-list.d.ts +2 -0
- package/lib/types/utils/for-each.d.ts +5 -0
- package/lib/types/utils/get-css.d.ts +1 -0
- package/lib/types/utils/get-deepest.d.ts +2 -0
- package/lib/types/utils/in-string.d.ts +1 -0
- package/lib/types/utils/index.d.ts +26 -0
- package/lib/types/utils/merge-nodes.d.ts +5 -0
- package/lib/types/utils/morph.d.ts +56 -0
- package/lib/types/utils/normalize-value.d.ts +1 -0
- package/lib/types/utils/parse-style.d.ts +2 -0
- package/lib/types/utils/query.d.ts +3 -0
- package/lib/types/utils/remove-br.d.ts +2 -0
- package/lib/types/utils/remove-zws.d.ts +2 -0
- package/lib/types/utils/request.d.ts +27 -0
- package/lib/types/utils/safe-template.d.ts +1 -0
- package/lib/types/utils/set-block-indent.d.ts +2 -0
- package/lib/types/utils/split-nodes.d.ts +5 -0
- package/lib/types/utils/template.d.ts +1 -0
- package/lib/types/utils/to-hex.d.ts +1 -0
- package/lib/types/utils/to-node-list.d.ts +2 -0
- package/lib/types/utils/wrap-node-list.d.ts +2 -0
- package/package.json +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Luo Longhao
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
> This project is not complete yet, please DO NOT integrate it into your production.
|
|
2
|
+
|
|
3
|
+
# Lake
|
|
4
|
+
|
|
5
|
+
Lake is a browser-based editor that enables writing rich text directly inside of web pages or online applications. It focuses on editing web-friendly content and it is designed to provide better efficiency, stability and extensibility.
|
|
6
|
+
|
|
7
|
+
### Getting Started
|
|
8
|
+
|
|
9
|
+
First, you need to clone the repository and install all necessary dependencies. Then, start a composite server that contains an HTTP service and real-time bundling. You can do this by running the following command in your terminal.
|
|
10
|
+
|
|
11
|
+
``` bash
|
|
12
|
+
# clone the repository
|
|
13
|
+
git clone https://github.com/lakejs/lake.git
|
|
14
|
+
# change your directory
|
|
15
|
+
cd lake
|
|
16
|
+
# install all dependencies
|
|
17
|
+
pnpm install
|
|
18
|
+
# build dependencies
|
|
19
|
+
pnpm build
|
|
20
|
+
# start a local server
|
|
21
|
+
pnpm start
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
You can now view all demos by opening `http://localhost:8080/examples/` URL.
|
|
25
|
+
|
|
26
|
+
### Running tests
|
|
27
|
+
|
|
28
|
+
Lake uses a lot of browser APIs and therefore it requires a real browser environment to run the tests. You can open `http://localhost:8080/tests/` to run all test cases visibly, or execute `pnpm test` command in your console to run the tests in headless mode. Both modes require starting the local server before running tests.
|
|
29
|
+
|
|
30
|
+
### License
|
|
31
|
+
|
|
32
|
+
[MIT](https://github.com/lakejs/lake/blob/master/LICENSE)
|