@krainovsd/markdown-editor 0.0.4 → 0.1.0
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/lib/cjs/index-Byjf17iv.js +501 -0
- package/lib/cjs/index-Byjf17iv.js.map +1 -0
- package/lib/cjs/index-lPo-3QDL.js +1374 -0
- package/lib/cjs/index-lPo-3QDL.js.map +1 -0
- package/lib/cjs/index.js +14 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/extensions/compartments/index.js +8 -0
- package/lib/esm/extensions/compartments/index.js.map +1 -0
- package/lib/esm/extensions/init-extensions.js +45 -0
- package/lib/esm/extensions/init-extensions.js.map +1 -0
- package/lib/esm/extensions/keymaps/init-key-map.js +91 -0
- package/lib/esm/extensions/keymaps/init-key-map.js.map +1 -0
- package/lib/esm/extensions/listeners/get-change-event.js +14 -0
- package/lib/esm/extensions/listeners/get-change-event.js.map +1 -0
- package/lib/esm/extensions/listeners/get-focus-event.js +16 -0
- package/lib/esm/extensions/listeners/get-focus-event.js.map +1 -0
- package/lib/esm/extensions/listeners/init-listeners.js +9 -0
- package/lib/esm/extensions/listeners/init-listeners.js.map +1 -0
- package/lib/esm/extensions/markdown/blockquote/blockquote-constants.js +6 -0
- package/lib/esm/extensions/markdown/blockquote/blockquote-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/blockquote/blockquote-decoration.js +99 -0
- package/lib/esm/extensions/markdown/blockquote/blockquote-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/blockquote/blockquote-widget.js +25 -0
- package/lib/esm/extensions/markdown/blockquote/blockquote-widget.js.map +1 -0
- package/lib/esm/extensions/markdown/bold/bold-constants.js +5 -0
- package/lib/esm/extensions/markdown/bold/bold-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/bold/bold-decoration.js +41 -0
- package/lib/esm/extensions/markdown/bold/bold-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/code/code-constants.js +6 -0
- package/lib/esm/extensions/markdown/code/code-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/code/code-decoration.js +109 -0
- package/lib/esm/extensions/markdown/code/code-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/code/code-widget.js +83 -0
- package/lib/esm/extensions/markdown/code/code-widget.js.map +1 -0
- package/lib/esm/extensions/markdown/header/header-constants.js +6 -0
- package/lib/esm/extensions/markdown/header/header-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/header/header-decoration.js +64 -0
- package/lib/esm/extensions/markdown/header/header-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/horizontal/horizontal-constants.js +4 -0
- package/lib/esm/extensions/markdown/horizontal/horizontal-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/horizontal/horizontal-decoration.js +31 -0
- package/lib/esm/extensions/markdown/horizontal/horizontal-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/image/image-constants.js +8 -0
- package/lib/esm/extensions/markdown/image/image-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/image/image-decoration.js +75 -0
- package/lib/esm/extensions/markdown/image/image-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/image/image-widget.js +184 -0
- package/lib/esm/extensions/markdown/image/image-widget.js.map +1 -0
- package/lib/esm/extensions/markdown/index.js +2 -0
- package/lib/esm/extensions/markdown/index.js.map +1 -0
- package/lib/esm/extensions/markdown/init-markdown.js +18 -0
- package/lib/esm/extensions/markdown/init-markdown.js.map +1 -0
- package/lib/esm/extensions/markdown/italic/italic-constants.js +5 -0
- package/lib/esm/extensions/markdown/italic/italic-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/italic/italic-decoration.js +77 -0
- package/lib/esm/extensions/markdown/italic/italic-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/link/auto-link-decoration.js +24 -0
- package/lib/esm/extensions/markdown/link/auto-link-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/link/link-constants.js +10 -0
- package/lib/esm/extensions/markdown/link/link-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/link/link-decoration.js +51 -0
- package/lib/esm/extensions/markdown/link/link-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/link/link-label-decoration.js +22 -0
- package/lib/esm/extensions/markdown/link/link-label-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/link/link-widget.js +144 -0
- package/lib/esm/extensions/markdown/link/link-widget.js.map +1 -0
- package/lib/esm/extensions/markdown/list/list-constants.js +7 -0
- package/lib/esm/extensions/markdown/list/list-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/list/list-decoration.js +38 -0
- package/lib/esm/extensions/markdown/list/list-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/list/list-widget.js +33 -0
- package/lib/esm/extensions/markdown/list/list-widget.js.map +1 -0
- package/lib/esm/extensions/markdown/markdown-decoration.js +105 -0
- package/lib/esm/extensions/markdown/markdown-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/markdown-parser.js +6 -0
- package/lib/esm/extensions/markdown/markdown-parser.js.map +1 -0
- package/lib/esm/extensions/markdown/mention/mention-constants.js +6 -0
- package/lib/esm/extensions/markdown/mention/mention-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/mention/mention-decoration.js +37 -0
- package/lib/esm/extensions/markdown/mention/mention-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/mention/mention-parser.js +25 -0
- package/lib/esm/extensions/markdown/mention/mention-parser.js.map +1 -0
- package/lib/esm/extensions/markdown/strike-through/strike-through-constants.js +4 -0
- package/lib/esm/extensions/markdown/strike-through/strike-through-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/strike-through/strike-through-decoration.js +32 -0
- package/lib/esm/extensions/markdown/strike-through/strike-through-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/styles.module.scss.js +8 -0
- package/lib/esm/extensions/markdown/styles.module.scss.js.map +1 -0
- package/lib/esm/extensions/markdown/todo/todo-constants.js +6 -0
- package/lib/esm/extensions/markdown/todo/todo-constants.js.map +1 -0
- package/lib/esm/extensions/markdown/todo/todo-decoration.js +35 -0
- package/lib/esm/extensions/markdown/todo/todo-decoration.js.map +1 -0
- package/lib/esm/extensions/markdown/todo/todo-widget.js +51 -0
- package/lib/esm/extensions/markdown/todo/todo-widget.js.map +1 -0
- package/lib/esm/extensions/settings/init-settings.js +19 -0
- package/lib/esm/extensions/settings/init-settings.js.map +1 -0
- package/lib/esm/extensions/theme/init-theme.js +15 -0
- package/lib/esm/extensions/theme/init-theme.js.map +1 -0
- package/lib/esm/extensions/theme/theme-constants.js +17 -0
- package/lib/esm/extensions/theme/theme-constants.js.map +1 -0
- package/lib/esm/extensions/theme/themes/get-dark-theme.js +40 -0
- package/lib/esm/extensions/theme/themes/get-dark-theme.js.map +1 -0
- package/lib/esm/extensions/theme/themes/get-highlight-template.js +35 -0
- package/lib/esm/extensions/theme/themes/get-highlight-template.js.map +1 -0
- package/lib/esm/extensions/theme/themes/get-light-theme.js +40 -0
- package/lib/esm/extensions/theme/themes/get-light-theme.js.map +1 -0
- package/lib/esm/extensions/theme/themes/get-theme-template.js +69 -0
- package/lib/esm/extensions/theme/themes/get-theme-template.js.map +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/lib/utils/copy-to-clipboard.js +35 -0
- package/lib/esm/lib/utils/copy-to-clipboard.js.map +1 -0
- package/lib/esm/lib/utils/get-decoration.js +24 -0
- package/lib/esm/lib/utils/get-decoration.js.map +1 -0
- package/lib/esm/lib/utils/is-in-range.js +8 -0
- package/lib/esm/lib/utils/is-in-range.js.map +1 -0
- package/lib/esm/lib/utils/is-range-overlap.js +6 -0
- package/lib/esm/lib/utils/is-range-overlap.js.map +1 -0
- package/lib/esm/lib/utils/tick.js +22 -0
- package/lib/esm/lib/utils/tick.js.map +1 -0
- package/lib/esm/module/Editor/Editor.js +91 -0
- package/lib/esm/module/Editor/Editor.js.map +1 -0
- package/lib/esm/module/Editor/lib/init-editor-provider.js +32 -0
- package/lib/esm/module/Editor/lib/init-editor-provider.js.map +1 -0
- package/lib/esm/module/Editor/lib/init-editor-state.js +18 -0
- package/lib/esm/module/Editor/lib/init-editor-state.js.map +1 -0
- package/lib/esm/module/Editor/lib/init-editor.js +27 -0
- package/lib/esm/module/Editor/lib/init-editor.js.map +1 -0
- package/lib/esm/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +29 -0
- package/lib/esm/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
- package/lib/index.d.ts +137 -0
- package/package.json +30 -23
- package/lib/cjs/editor-qKPDa91b.js +0 -2
- package/lib/cjs/editor-qKPDa91b.js.map +0 -1
- package/lib/cjs/markdown_plugin-IXFRDWyN.js +0 -2
- package/lib/cjs/markdown_plugin-IXFRDWyN.js.map +0 -1
- package/lib/cjs/vendor_vim-BHa51_r7.js +0 -2
- package/lib/cjs/vendor_vim-BHa51_r7.js.map +0 -1
- package/lib/cjs/vendor_y.next-CVyX1ZQB.js +0 -2
- package/lib/cjs/vendor_y.next-CVyX1ZQB.js.map +0 -1
- package/lib/cjs/vendor_y.websocket-Dr9ojjFR.js +0 -2
- package/lib/cjs/vendor_y.websocket-Dr9ojjFR.js.map +0 -1
- package/lib/cjs/vendor_yjs-DXWp84x5.js +0 -2
- package/lib/cjs/vendor_yjs-DXWp84x5.js.map +0 -1
- package/lib/esm/editor-CLyV23xt.js +0 -2
- package/lib/esm/editor-CLyV23xt.js.map +0 -1
- package/lib/esm/markdown_plugin-DdBeaig8.js +0 -2
- package/lib/esm/markdown_plugin-DdBeaig8.js.map +0 -1
- package/lib/esm/vendor_vim-PF2jWG0J.js +0 -2
- package/lib/esm/vendor_vim-PF2jWG0J.js.map +0 -1
- package/lib/esm/vendor_y.next-B9hhKe5T.js +0 -2
- package/lib/esm/vendor_y.next-B9hhKe5T.js.map +0 -1
- package/lib/esm/vendor_y.websocket-gIpX3Cmo.js +0 -2
- package/lib/esm/vendor_y.websocket-gIpX3Cmo.js.map +0 -1
- package/lib/esm/vendor_yjs-otxZW90b.js +0 -2
- package/lib/esm/vendor_yjs-otxZW90b.js.map +0 -1
- package/tmp/app/helpers/common-test.d.ts +0 -1
- package/tmp/app/helpers/full-example.d.ts +0 -1
- package/tmp/app/helpers/index.d.ts +0 -5
- package/tmp/app/helpers/random-color.d.ts +0 -1
- package/tmp/app/helpers/random-string.d.ts +0 -1
- package/tmp/app/helpers/stress-test.d.ts +0 -1
- package/tmp/app/index.d.ts +0 -1
- package/tmp/extensions/compartments/index.d.ts +0 -4
- package/tmp/extensions/index.d.ts +0 -8
- package/tmp/extensions/init-extensions.d.ts +0 -14
- package/tmp/extensions/keymaps/bold-keymap.d.ts +0 -2
- package/tmp/extensions/keymaps/index.d.ts +0 -1
- package/tmp/extensions/keymaps/init-key-map.d.ts +0 -23
- package/tmp/extensions/keymaps/italic-key-map.d.ts +0 -2
- package/tmp/extensions/keymaps/line-through-key-map.d.ts +0 -2
- package/tmp/extensions/keymaps/underline-key-map.d.ts +0 -2
- package/tmp/extensions/listeners/get-change-event.d.ts +0 -6
- package/tmp/extensions/listeners/get-focus-event.d.ts +0 -8
- package/tmp/extensions/listeners/index.d.ts +0 -3
- package/tmp/extensions/listeners/init-listeners.d.ts +0 -4
- package/tmp/extensions/markdown/blockquote/blockquote-constants.d.ts +0 -3
- package/tmp/extensions/markdown/blockquote/blockquote-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/blockquote/blockquote-widget.d.ts +0 -6
- package/tmp/extensions/markdown/blockquote/index.d.ts +0 -1
- package/tmp/extensions/markdown/bold/bold-constants.d.ts +0 -2
- package/tmp/extensions/markdown/bold/bold-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/bold/index.d.ts +0 -1
- package/tmp/extensions/markdown/code/code-constants.d.ts +0 -3
- package/tmp/extensions/markdown/code/code-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/code/code-widget.d.ts +0 -13
- package/tmp/extensions/markdown/code/index.d.ts +0 -1
- package/tmp/extensions/markdown/header/header-constants.d.ts +0 -3
- package/tmp/extensions/markdown/header/header-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/header/index.d.ts +0 -1
- package/tmp/extensions/markdown/horizontal/horizontal-constants.d.ts +0 -1
- package/tmp/extensions/markdown/horizontal/horizontal-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/horizontal/index.d.ts +0 -1
- package/tmp/extensions/markdown/image/image-constants.d.ts +0 -5
- package/tmp/extensions/markdown/image/image-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/image/image-widget.d.ts +0 -14
- package/tmp/extensions/markdown/image/index.d.ts +0 -1
- package/tmp/extensions/markdown/index.d.ts +0 -2
- package/tmp/extensions/markdown/init-markdown.d.ts +0 -3
- package/tmp/extensions/markdown/italic/index.d.ts +0 -1
- package/tmp/extensions/markdown/italic/italic-constants.d.ts +0 -2
- package/tmp/extensions/markdown/italic/italic-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/link/auto-link-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/link/index.d.ts +0 -2
- package/tmp/extensions/markdown/link/link-constants.d.ts +0 -7
- package/tmp/extensions/markdown/link/link-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/link/link-label-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/link/link-widget.d.ts +0 -17
- package/tmp/extensions/markdown/list/index.d.ts +0 -1
- package/tmp/extensions/markdown/list/list-constants.d.ts +0 -4
- package/tmp/extensions/markdown/list/list-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/list/list-widget.d.ts +0 -7
- package/tmp/extensions/markdown/markdown-decoration.d.ts +0 -5
- package/tmp/extensions/markdown/markdown-parser.d.ts +0 -2
- package/tmp/extensions/markdown/markdown-types.d.ts +0 -24
- package/tmp/extensions/markdown/mention/index.d.ts +0 -1
- package/tmp/extensions/markdown/mention/mention-constants.d.ts +0 -3
- package/tmp/extensions/markdown/mention/mention-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/mention/mention-parser.d.ts +0 -2
- package/tmp/extensions/markdown/strike-through/index.d.ts +0 -1
- package/tmp/extensions/markdown/strike-through/strike-through-constants.d.ts +0 -1
- package/tmp/extensions/markdown/strike-through/strike-through-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/todo/index.d.ts +0 -1
- package/tmp/extensions/markdown/todo/todo-constants.d.ts +0 -3
- package/tmp/extensions/markdown/todo/todo-decoration.d.ts +0 -2
- package/tmp/extensions/markdown/todo/todo-widget.d.ts +0 -11
- package/tmp/extensions/settings/index.d.ts +0 -1
- package/tmp/extensions/settings/init-settings.d.ts +0 -6
- package/tmp/extensions/theme/index.d.ts +0 -4
- package/tmp/extensions/theme/init-theme.d.ts +0 -3
- package/tmp/extensions/theme/theme-constants.d.ts +0 -14
- package/tmp/extensions/theme/theme-types.d.ts +0 -39
- package/tmp/extensions/theme/themes/get-dark-theme.d.ts +0 -2
- package/tmp/extensions/theme/themes/get-highlight-template.d.ts +0 -6
- package/tmp/extensions/theme/themes/get-light-theme.d.ts +0 -2
- package/tmp/extensions/theme/themes/get-theme-template.d.ts +0 -2
- package/tmp/extensions/theme/themes/index.d.ts +0 -2
- package/tmp/index.d.ts +0 -3
- package/tmp/lib/index.d.ts +0 -1
- package/tmp/lib/utils/copy-to-clipboard.d.ts +0 -1
- package/tmp/lib/utils/get-decoration.d.ts +0 -26
- package/tmp/lib/utils/index.d.ts +0 -6
- package/tmp/lib/utils/is-in-range.d.ts +0 -2
- package/tmp/lib/utils/is-range-overlap.d.ts +0 -1
- package/tmp/lib/utils/random-string.d.ts +0 -1
- package/tmp/lib/utils/tick.d.ts +0 -10
- package/tmp/module/Editor/Editor.d.ts +0 -18
- package/tmp/module/Editor/Editor.types.d.ts +0 -13
- package/tmp/module/Editor/index.d.ts +0 -3
- package/tmp/module/Editor/lib/index.d.ts +0 -1
- package/tmp/module/Editor/lib/init-editor-provider.d.ts +0 -9
- package/tmp/module/Editor/lib/init-editor-state.d.ts +0 -7
- package/tmp/module/Editor/lib/init-editor.d.ts +0 -7
- package/tmp/module/index.d.ts +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const COMMON_TEST = "\n## Heading level 2\n### Heading level 3\n#### Heading level 4\n##### Heading level 5\n###### Heading level 6\nHeading level 1\n===============\nHeading level 2\n---------------\nI just love **bold text**.\nI just love __bold text__.\nLove**is**bold\n\nItalicized text is the *cat's meow*.\nItalicized text is the _cat's meow_.\nA*cat*meow\n\nThis text is ***really important***.\nThis text is ___really important___.\nThis text is __*really important*__.\nThis text is **_really important_**.\nThis is really***very***important text.\n\n> Dorothy followed her through many of the beautiful rooms in her castle.\n>\n> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.\n\n> Dorothy followed her through many of the beautiful rooms in her castle.\n>\n>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.\n\n> #### The quarterly results look great!\n>\n> - Revenue was off the chart.\n> - Profits were higher than ever.\n>\n> *Everything* is going according to **plan**.\n\n\n\n\n\n\n\n\n\n\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const FULL_EXAMPLE = "# Heading level 1\n## Heading level 2\n### Heading level 3\n#### Heading level 4\n##### Heading level 5\n###### Heading level 6\nHeading level 1\n===============\nHeading level 2\n---------------\nI just love **bold text**.\nI just love __bold text__.\nLove**is**bold\n\nItalicized text is the *cat's meow*.\nItalicized text is the _cat's meow_.\nA*cat*meow\n\nThis text is ***really important***.\nThis text is ___really important___.\nThis text is __*really important*__.\nThis text is **_really important_**.\nThis is really***very***important text.\n\n> Dorothy followed her through many of the beautiful rooms in her castle.\n>\n> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.\n\n> Dorothy followed her through many of the beautiful rooms in her castle.\n>\n>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.\n\n> #### The quarterly results look great!\n>\n> - Revenue was off the chart.\n> - Profits were higher than ever.\n>\n> *Everything* is going according to **plan**.\n\n1. First item\n2. Second item\n3. Third item\n4. Fourth item\n\n- First item\n- Second item\n- Third item\n - Indented item\n - Indented item\n- Fourth item\n\n+ First item\n+ Second item\n+ Third item\n+ Fourth item\n\n``Use `code` in your Markdown file.``\n``\nuse code\n``\n\n```js\nconst string = \"string\"\nconst bool = true\n```\n---\n***\n____\n\n[Duck Duck Go](https://duckduckgo.com)\n\n<https://www.markdownguide.org>\n**[EFF](https://eff.org)**\n\n\n\n- [x] task\n- - [x] task\n\n``` JS\nimport { param } from \"module\";\n\nconst btn = document.getElementById('btn');\nlet count: number = 0;\n\nfunction render(){\n btn.innerText = `Count: ${count}`;\n}\n\nbtn.addEventListener(\"click\", (e) => {\n // Count from 1 to 10.\n if (count < 10){\n count += 1;\n render();\n }\n})\n\nconst boolean = true\nconst object = {\n value: boolean\n}\nconst array = [1, \"test\"] \n\n```\n \n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function randomColor(): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function randomString(length?: number, allowCharacters?: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const STRESS_TEST: string;
|
package/tmp/app/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./global.css";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./compartments";
|
|
2
|
-
export * from "./init-extensions";
|
|
3
|
-
export { getDarkTheme, getLightTheme } from "./theme";
|
|
4
|
-
export type { InitKeyMapsOptions, HandleEnterKeyMapEditorFunction, HandleEscapeKeyMapEditorFunction, DefaultKeyMapsOptions, CustomKeyMap, } from "./keymaps";
|
|
5
|
-
export type { InitListenersOptions, GetChangeEventOptions, GetFocusEventOptions, HandleBlurEditorFunction, HandleChangeEditorFunction, HandleFocusEditorFunction, } from "./listeners";
|
|
6
|
-
export type { DecorationPlugin, GetDecorationFunction, GetDecorationOptions, GetSelectionDecorationFunction, GetSelectionDecorationOptions, InitMarkdownOptions, } from "./markdown";
|
|
7
|
-
export type { InitSettingsOptions } from "./settings";
|
|
8
|
-
export type { HighlightConfig, InitThemeOptions, ThemeConfig, ThemeOptions, EditorTheme, } from "./theme";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Extension } from "@codemirror/state";
|
|
2
|
-
import type { WebsocketProvider } from "y-websocket";
|
|
3
|
-
import type { Text } from "yjs";
|
|
4
|
-
import { type InitKeyMapsOptions } from "./keymaps";
|
|
5
|
-
import { type InitListenersOptions } from "./listeners";
|
|
6
|
-
import { type InitMarkdownOptions } from "./markdown";
|
|
7
|
-
import { type InitSettingsOptions } from "./settings";
|
|
8
|
-
import { type InitThemeOptions } from "./theme";
|
|
9
|
-
export type ExtensionsOptions = InitListenersOptions & InitThemeOptions & InitSettingsOptions & InitMarkdownOptions & InitKeyMapsOptions;
|
|
10
|
-
export type InitExtensionsOptions = {
|
|
11
|
-
multiCursorText: Text | undefined;
|
|
12
|
-
provider: WebsocketProvider | undefined;
|
|
13
|
-
} & ExtensionsOptions;
|
|
14
|
-
export declare const initExtensions: ({ onBlur, onChange, onFocus, onEnter, onEscape, readonly, vimMode, multiCursorText, provider, theme, dark, light, languages, keyMaps, defaultKeyMaps, }: InitExtensionsOptions) => Promise<Extension[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./init-key-map";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Extension } from "@codemirror/state";
|
|
2
|
-
import { type EditorView, type KeyBinding } from "@codemirror/view";
|
|
3
|
-
import { type EditorTheme, type ThemeOptions } from "../theme";
|
|
4
|
-
export type InitKeyMapsOptions = {
|
|
5
|
-
onEnter?: HandleEnterKeyMapEditorFunction;
|
|
6
|
-
onEscape?: HandleEscapeKeyMapEditorFunction;
|
|
7
|
-
keyMaps?: CustomKeyMap[];
|
|
8
|
-
defaultKeyMaps?: DefaultKeyMapsOptions;
|
|
9
|
-
};
|
|
10
|
-
export type CustomKeyMap = KeyBinding;
|
|
11
|
-
export type HandleEnterKeyMapEditorFunction = (view: EditorView) => boolean;
|
|
12
|
-
export type HandleEscapeKeyMapEditorFunction = (view: EditorView) => boolean;
|
|
13
|
-
export type DefaultKeyMapsOptions = {
|
|
14
|
-
vim?: boolean;
|
|
15
|
-
theme?: boolean;
|
|
16
|
-
};
|
|
17
|
-
export declare const initKeyMaps: ({ onEnter, onEscape, multiCursorMode, keyMaps, defaultKeyMaps, theme: initialTheme, vimMode: initialVimMode, dark, light, }: InitKeyMapsOptions & {
|
|
18
|
-
multiCursorMode: boolean;
|
|
19
|
-
vimMode: boolean;
|
|
20
|
-
theme: EditorTheme;
|
|
21
|
-
dark?: ThemeOptions;
|
|
22
|
-
light?: ThemeOptions;
|
|
23
|
-
}) => Promise<Extension>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type ViewUpdate } from "@codemirror/view";
|
|
2
|
-
export type GetChangeEventOptions = {
|
|
3
|
-
onChange?: HandleChangeEditorFunction;
|
|
4
|
-
};
|
|
5
|
-
export type HandleChangeEditorFunction = (view: ViewUpdate) => void;
|
|
6
|
-
export declare function getChangeEvent({ onChange }: GetChangeEventOptions): import("@codemirror/state").Extension;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type EditorState } from "@codemirror/state";
|
|
2
|
-
export type GetFocusEventOptions = {
|
|
3
|
-
onFocus?: HandleFocusEditorFunction;
|
|
4
|
-
onBlur?: HandleBlurEditorFunction;
|
|
5
|
-
};
|
|
6
|
-
export type HandleFocusEditorFunction = (state: EditorState) => void;
|
|
7
|
-
export type HandleBlurEditorFunction = (state: EditorState) => void;
|
|
8
|
-
export declare function getFocusEvent({ onBlur, onFocus }: GetFocusEventOptions): import("@codemirror/state").Extension;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type GetChangeEventOptions } from "./get-change-event";
|
|
2
|
-
import { type GetFocusEventOptions } from "./get-focus-event";
|
|
3
|
-
export type InitListenersOptions = GetFocusEventOptions & GetChangeEventOptions;
|
|
4
|
-
export declare function initListeners({ onBlur, onChange, onFocus }: InitListenersOptions): import("@codemirror/state").Extension[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./blockquote-decoration";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./bold-decoration";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type EditorView, WidgetType } from "@codemirror/view";
|
|
2
|
-
export declare class CodeWidget extends WidgetType {
|
|
3
|
-
private readonly language;
|
|
4
|
-
private content;
|
|
5
|
-
view: EditorView | undefined;
|
|
6
|
-
timer: NodeJS.Timeout | undefined;
|
|
7
|
-
button: HTMLElement | undefined;
|
|
8
|
-
span: HTMLElement | undefined;
|
|
9
|
-
constructor(language: string, content: string | undefined);
|
|
10
|
-
onClick(): void;
|
|
11
|
-
toDOM(view: EditorView): HTMLElement;
|
|
12
|
-
destroy(dom: HTMLElement): void;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./code-decoration";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./header-decoration";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const NAME_OF_HORIZONTAL = "HorizontalRule";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./horizontal-decoration";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type EditorView, WidgetType } from "@codemirror/view";
|
|
2
|
-
export declare class ImageWidget extends WidgetType {
|
|
3
|
-
private text;
|
|
4
|
-
private link;
|
|
5
|
-
private from;
|
|
6
|
-
private to;
|
|
7
|
-
view: EditorView | undefined;
|
|
8
|
-
constructor(text: string, link: string, from: number, to: number);
|
|
9
|
-
get key(): string;
|
|
10
|
-
eq(widget: ImageWidget): boolean;
|
|
11
|
-
updateDOM(): boolean;
|
|
12
|
-
toDOM(view: EditorView): HTMLElement;
|
|
13
|
-
destroy(): void;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./image-decoration";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./italic-decoration";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const NAME_OF_LINK = "Link";
|
|
2
|
-
export declare const CODE_OF_START_LINK_TEXT = 91;
|
|
3
|
-
export declare const CODE_OF_END_LINK_TEXT = 93;
|
|
4
|
-
export declare const CODE_OF_START_LINK_URL = 40;
|
|
5
|
-
export declare const CODE_OF_END_LINK_URL = 41;
|
|
6
|
-
export declare const NAME_OF_AUTO_LINK = "Autolink";
|
|
7
|
-
export declare const CODE_OF_LINK_LABEL_END = 58;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type EditorView, WidgetType } from "@codemirror/view";
|
|
2
|
-
export declare class LinkWidget extends WidgetType {
|
|
3
|
-
private readonly text;
|
|
4
|
-
private readonly link;
|
|
5
|
-
private readonly type;
|
|
6
|
-
view: EditorView | undefined;
|
|
7
|
-
constructor(text: string, link: string, type: "link" | "auto");
|
|
8
|
-
/** recursively find the link text node in line */
|
|
9
|
-
getTextNode(line: ChildNode | Node | null | undefined): ChildNode | null;
|
|
10
|
-
getMinLength(): number;
|
|
11
|
-
/** check that the text node is correct node */
|
|
12
|
-
isCorrectNode(node: ChildNode | Node | null | undefined): node is ChildNode | Node;
|
|
13
|
-
selectLink(node: ChildNode | Node, selection: Selection): void;
|
|
14
|
-
handleClick(event: MouseEvent): false | undefined;
|
|
15
|
-
toDOM(view: EditorView): HTMLElement;
|
|
16
|
-
destroy(dom: HTMLElement): void;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./list-decoration";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { LanguageDescription } from "@codemirror/language";
|
|
2
|
-
import type { Range } from "@codemirror/state";
|
|
3
|
-
import type { Decoration, EditorView } from "@codemirror/view";
|
|
4
|
-
import type { SyntaxNodeRef } from "@lezer/common";
|
|
5
|
-
export type InitMarkdownOptions = {
|
|
6
|
-
languages?: LanguageDescription[];
|
|
7
|
-
};
|
|
8
|
-
export type GetDecorationOptions = {
|
|
9
|
-
node: SyntaxNodeRef;
|
|
10
|
-
decorations: Range<Decoration>[];
|
|
11
|
-
view: EditorView;
|
|
12
|
-
};
|
|
13
|
-
export type GetSelectionDecorationOptions = {
|
|
14
|
-
node: SyntaxNodeRef;
|
|
15
|
-
decorations: Range<Decoration>[];
|
|
16
|
-
view: EditorView;
|
|
17
|
-
isReadonly: boolean;
|
|
18
|
-
};
|
|
19
|
-
export type GetDecorationFunction = (options: GetDecorationOptions) => void;
|
|
20
|
-
export type GetSelectionDecorationFunction = (options: GetSelectionDecorationOptions) => void;
|
|
21
|
-
export type DecorationPlugin = {
|
|
22
|
-
decorations?: GetDecorationFunction[];
|
|
23
|
-
selectionDecorations?: GetSelectionDecorationFunction[];
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./mention-parser";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./strike-through-decoration";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const NAME_OF_STRIKE_THROUGH = "Strikethrough";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./todo-decoration";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type EditorView, WidgetType } from "@codemirror/view";
|
|
2
|
-
export declare class TodoWidget extends WidgetType {
|
|
3
|
-
checked: boolean;
|
|
4
|
-
private readonly position;
|
|
5
|
-
view: EditorView | undefined;
|
|
6
|
-
constructor(checked: boolean, position: number);
|
|
7
|
-
onClick(event: MouseEvent): void;
|
|
8
|
-
onBlock(event: MouseEvent): void;
|
|
9
|
-
toDOM(view: EditorView): HTMLElement;
|
|
10
|
-
destroy(dom: HTMLElement): void;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./init-settings";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const CLASSES: {
|
|
2
|
-
listCommon: string;
|
|
3
|
-
code: string;
|
|
4
|
-
codeButton: string;
|
|
5
|
-
codeButtonSuccess: string;
|
|
6
|
-
codeButtonFail: string;
|
|
7
|
-
codeButtonPending: string;
|
|
8
|
-
codeButtonSpan: string;
|
|
9
|
-
horizontal: string;
|
|
10
|
-
blockquote: string;
|
|
11
|
-
blockquoteInner: string;
|
|
12
|
-
link: string;
|
|
13
|
-
mention: string;
|
|
14
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export type EditorTheme = "dark" | "light";
|
|
2
|
-
export type InitThemeOptions = {
|
|
3
|
-
dark?: ThemeOptions;
|
|
4
|
-
light?: ThemeOptions;
|
|
5
|
-
theme?: EditorTheme;
|
|
6
|
-
};
|
|
7
|
-
export type ThemeOptions = {
|
|
8
|
-
themeConfig?: ThemeConfig;
|
|
9
|
-
highlightConfig?: HighlightConfig;
|
|
10
|
-
};
|
|
11
|
-
export type ThemeConfig = {
|
|
12
|
-
fontFamily?: string;
|
|
13
|
-
color?: string;
|
|
14
|
-
background?: string;
|
|
15
|
-
codeBackground?: string;
|
|
16
|
-
codeColor?: string;
|
|
17
|
-
codeButtonColor?: string;
|
|
18
|
-
codeButtonBackground?: string;
|
|
19
|
-
horizontalColor?: string;
|
|
20
|
-
linkColor?: string;
|
|
21
|
-
blockquoteColor?: string;
|
|
22
|
-
mentionColor?: string;
|
|
23
|
-
vimSelectionFocused?: string;
|
|
24
|
-
vimSelection?: string;
|
|
25
|
-
};
|
|
26
|
-
export type HighlightConfig = {
|
|
27
|
-
keyword?: string;
|
|
28
|
-
variable?: string;
|
|
29
|
-
function?: string;
|
|
30
|
-
string?: string;
|
|
31
|
-
constant?: string;
|
|
32
|
-
type?: string;
|
|
33
|
-
class?: string;
|
|
34
|
-
number?: string;
|
|
35
|
-
comment?: string;
|
|
36
|
-
heading?: string;
|
|
37
|
-
invalid?: string;
|
|
38
|
-
regexp?: string;
|
|
39
|
-
};
|
package/tmp/index.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export type { EditorInterface, EditorArguments, MultiCursorOptions } from "./module";
|
|
2
|
-
export { Editor } from "./module";
|
|
3
|
-
export type { ExtensionsOptions, InitExtensionsOptions, DecorationPlugin, GetDecorationFunction, GetDecorationOptions, GetSelectionDecorationFunction, GetSelectionDecorationOptions, HighlightConfig, InitKeyMapsOptions, InitListenersOptions, InitMarkdownOptions, InitSettingsOptions, InitThemeOptions, ThemeConfig, ThemeOptions, GetChangeEventOptions, GetFocusEventOptions, HandleBlurEditorFunction, HandleChangeEditorFunction, HandleEnterKeyMapEditorFunction, HandleFocusEditorFunction, HandleEscapeKeyMapEditorFunction, DefaultKeyMapsOptions, EditorTheme, CustomKeyMap, } from "./extensions";
|
package/tmp/lib/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * as utils from "./utils";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function copyToClipboard(content: string): Promise<void>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Decoration, type WidgetType } from "@codemirror/view";
|
|
2
|
-
type GetLineDecorationOptions = {
|
|
3
|
-
style: string;
|
|
4
|
-
range: [number, number?];
|
|
5
|
-
};
|
|
6
|
-
export declare function getLineDecoration({ style, range }: GetLineDecorationOptions): import("@codemirror/state").Range<Decoration>;
|
|
7
|
-
type GetMarkDecorationOptions = {
|
|
8
|
-
style: string;
|
|
9
|
-
range: [number, number];
|
|
10
|
-
};
|
|
11
|
-
export declare function getMarkDecoration({ range, style }: GetMarkDecorationOptions): import("@codemirror/state").Range<Decoration>;
|
|
12
|
-
type GetHideDecorationOptions = {
|
|
13
|
-
range: [number, number];
|
|
14
|
-
};
|
|
15
|
-
export declare function getHideDecoration({ range }: GetHideDecorationOptions): import("@codemirror/state").Range<Decoration>;
|
|
16
|
-
type GetReplaceDecorationOptions = {
|
|
17
|
-
range: [number, number?];
|
|
18
|
-
widget: WidgetType;
|
|
19
|
-
};
|
|
20
|
-
export declare function getReplaceDecoration({ range, widget }: GetReplaceDecorationOptions): import("@codemirror/state").Range<Decoration>;
|
|
21
|
-
type GetWidgetDecorationOptions = {
|
|
22
|
-
widget: WidgetType;
|
|
23
|
-
range: [number, number?];
|
|
24
|
-
};
|
|
25
|
-
export declare function getWidgetDecorationOptions({ widget, range }: GetWidgetDecorationOptions): import("@codemirror/state").Range<Decoration>;
|
|
26
|
-
export {};
|
package/tmp/lib/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isRangeOverlap(range: [number, number], text: [number, number]): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function randomString(length?: number): string;
|