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.
Files changed (126) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/dist/codemirror.min.js +1 -0
  4. package/dist/lake-all.css +1328 -0
  5. package/dist/lake-all.min.js +84 -0
  6. package/dist/lake.css +907 -0
  7. package/dist/lake.min.js +75 -0
  8. package/lib/lake.css +907 -0
  9. package/lib/lake.js +8315 -0
  10. package/lib/types/boxes/code-block.d.ts +2 -0
  11. package/lib/types/boxes/hr.d.ts +2 -0
  12. package/lib/types/boxes/image.d.ts +3 -0
  13. package/lib/types/codemirror.d.ts +8 -0
  14. package/lib/types/config/element-rules.d.ts +1 -0
  15. package/lib/types/config/menu-items.d.ts +9 -0
  16. package/lib/types/config/tag-names.d.ts +6 -0
  17. package/lib/types/config/toolbar-items.d.ts +2 -0
  18. package/lib/types/css/index.d.ts +15 -0
  19. package/lib/types/editor.d.ts +73 -0
  20. package/lib/types/elements/bookmark.d.ts +2 -0
  21. package/lib/types/elements/box.d.ts +2 -0
  22. package/lib/types/icons/index.d.ts +1 -0
  23. package/lib/types/index.d.ts +29 -0
  24. package/lib/types/managers/box-manager.d.ts +13 -0
  25. package/lib/types/managers/command.d.ts +11 -0
  26. package/lib/types/managers/history.d.ts +26 -0
  27. package/lib/types/managers/keystroke.d.ts +12 -0
  28. package/lib/types/managers/plugin.d.ts +9 -0
  29. package/lib/types/managers/selection.d.ts +41 -0
  30. package/lib/types/models/box.d.ts +28 -0
  31. package/lib/types/models/fragment.d.ts +7 -0
  32. package/lib/types/models/nodes.d.ts +96 -0
  33. package/lib/types/models/range.d.ts +53 -0
  34. package/lib/types/operations/add-mark.d.ts +3 -0
  35. package/lib/types/operations/delete-contents.d.ts +2 -0
  36. package/lib/types/operations/fix-list.d.ts +2 -0
  37. package/lib/types/operations/insert-bookmark.d.ts +6 -0
  38. package/lib/types/operations/insert-box.d.ts +4 -0
  39. package/lib/types/operations/insert-contents.d.ts +2 -0
  40. package/lib/types/operations/insert-fragment.d.ts +2 -0
  41. package/lib/types/operations/insert-link.d.ts +3 -0
  42. package/lib/types/operations/insert-node.d.ts +4 -0
  43. package/lib/types/operations/remove-box.d.ts +3 -0
  44. package/lib/types/operations/remove-mark.d.ts +2 -0
  45. package/lib/types/operations/set-blocks.d.ts +3 -0
  46. package/lib/types/operations/split-block.d.ts +3 -0
  47. package/lib/types/operations/split-marks.d.ts +3 -0
  48. package/lib/types/operations/to-bookmark.d.ts +6 -0
  49. package/lib/types/parsers/html-parser.d.ts +14 -0
  50. package/lib/types/parsers/text-parser.d.ts +6 -0
  51. package/lib/types/plugins/align.d.ts +3 -0
  52. package/lib/types/plugins/arrow-keys.d.ts +3 -0
  53. package/lib/types/plugins/backspace-key.d.ts +3 -0
  54. package/lib/types/plugins/block-quote.d.ts +3 -0
  55. package/lib/types/plugins/bold.d.ts +3 -0
  56. package/lib/types/plugins/code-block.d.ts +3 -0
  57. package/lib/types/plugins/code.d.ts +3 -0
  58. package/lib/types/plugins/copy.d.ts +3 -0
  59. package/lib/types/plugins/cut.d.ts +3 -0
  60. package/lib/types/plugins/delete-key.d.ts +3 -0
  61. package/lib/types/plugins/enter-key.d.ts +3 -0
  62. package/lib/types/plugins/font-color.d.ts +3 -0
  63. package/lib/types/plugins/font-family.d.ts +3 -0
  64. package/lib/types/plugins/font-size.d.ts +3 -0
  65. package/lib/types/plugins/format-painter.d.ts +3 -0
  66. package/lib/types/plugins/heading.d.ts +3 -0
  67. package/lib/types/plugins/highlight.d.ts +3 -0
  68. package/lib/types/plugins/hr.d.ts +3 -0
  69. package/lib/types/plugins/image.d.ts +3 -0
  70. package/lib/types/plugins/indent.d.ts +3 -0
  71. package/lib/types/plugins/italic.d.ts +3 -0
  72. package/lib/types/plugins/link.d.ts +3 -0
  73. package/lib/types/plugins/list.d.ts +3 -0
  74. package/lib/types/plugins/markdown.d.ts +3 -0
  75. package/lib/types/plugins/paste.d.ts +3 -0
  76. package/lib/types/plugins/redo.d.ts +3 -0
  77. package/lib/types/plugins/remove-format.d.ts +3 -0
  78. package/lib/types/plugins/select-all.d.ts +3 -0
  79. package/lib/types/plugins/shift-enter-key.d.ts +3 -0
  80. package/lib/types/plugins/strikethrough.d.ts +3 -0
  81. package/lib/types/plugins/subscript.d.ts +3 -0
  82. package/lib/types/plugins/superscript.d.ts +3 -0
  83. package/lib/types/plugins/tab-key.d.ts +3 -0
  84. package/lib/types/plugins/underline.d.ts +3 -0
  85. package/lib/types/plugins/undo.d.ts +3 -0
  86. package/lib/types/plugins/unlink.d.ts +3 -0
  87. package/lib/types/storage/box-instances.d.ts +2 -0
  88. package/lib/types/storage/boxes.d.ts +2 -0
  89. package/lib/types/storage/editors.d.ts +2 -0
  90. package/lib/types/types/box.d.ts +15 -0
  91. package/lib/types/types/native.d.ts +33 -0
  92. package/lib/types/types/node.d.ts +1 -0
  93. package/lib/types/types/object.d.ts +21 -0
  94. package/lib/types/types/request.d.ts +20 -0
  95. package/lib/types/types/toolbar.d.ts +40 -0
  96. package/lib/types/ui/link-popup.d.ts +16 -0
  97. package/lib/types/ui/toolbar.d.ts +30 -0
  98. package/lib/types/ui/upload.d.ts +10 -0
  99. package/lib/types/utils/append-deepest.d.ts +2 -0
  100. package/lib/types/utils/camel-case.d.ts +1 -0
  101. package/lib/types/utils/change-tag-name.d.ts +2 -0
  102. package/lib/types/utils/debug.d.ts +1 -0
  103. package/lib/types/utils/denormalize-value.d.ts +1 -0
  104. package/lib/types/utils/encode.d.ts +1 -0
  105. package/lib/types/utils/fix-numbered-list.d.ts +2 -0
  106. package/lib/types/utils/for-each.d.ts +5 -0
  107. package/lib/types/utils/get-css.d.ts +1 -0
  108. package/lib/types/utils/get-deepest.d.ts +2 -0
  109. package/lib/types/utils/in-string.d.ts +1 -0
  110. package/lib/types/utils/index.d.ts +26 -0
  111. package/lib/types/utils/merge-nodes.d.ts +5 -0
  112. package/lib/types/utils/morph.d.ts +56 -0
  113. package/lib/types/utils/normalize-value.d.ts +1 -0
  114. package/lib/types/utils/parse-style.d.ts +2 -0
  115. package/lib/types/utils/query.d.ts +3 -0
  116. package/lib/types/utils/remove-br.d.ts +2 -0
  117. package/lib/types/utils/remove-zws.d.ts +2 -0
  118. package/lib/types/utils/request.d.ts +27 -0
  119. package/lib/types/utils/safe-template.d.ts +1 -0
  120. package/lib/types/utils/set-block-indent.d.ts +2 -0
  121. package/lib/types/utils/split-nodes.d.ts +5 -0
  122. package/lib/types/utils/template.d.ts +1 -0
  123. package/lib/types/utils/to-hex.d.ts +1 -0
  124. package/lib/types/utils/to-node-list.d.ts +2 -0
  125. package/lib/types/utils/wrap-node-list.d.ts +2 -0
  126. package/package.json +81 -0
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { type Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Editor } from '..';
2
+ declare const _default: (editor: Editor) => void;
3
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { Box } from '../models/box';
2
+ export declare const boxInstances: Map<number, Map<number, Box>>;
@@ -0,0 +1,2 @@
1
+ import type { BoxComponent } from '../types/box';
2
+ export declare const boxes: Map<string, BoxComponent>;
@@ -0,0 +1,2 @@
1
+ import type { Editor } from '..';
2
+ export declare const editors: Map<number, Editor>;
@@ -0,0 +1,15 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ import type { Box } from '../models/box';
3
+ export type BoxType = 'inline' | 'block';
4
+ export type BoxValue = {
5
+ [key: string]: any;
6
+ };
7
+ export type BoxRender = (box: Box) => Nodes | string | void;
8
+ export type BoxHTML = (box: Box) => string;
9
+ export type BoxComponent = {
10
+ type: BoxType;
11
+ name: string;
12
+ value?: BoxValue;
13
+ render: BoxRender;
14
+ html?: BoxHTML;
15
+ };
@@ -0,0 +1,33 @@
1
+ export type NativeNode = Node;
2
+ export declare const NativeNode: {
3
+ new (): Node;
4
+ prototype: Node;
5
+ readonly ELEMENT_NODE: 1;
6
+ readonly ATTRIBUTE_NODE: 2;
7
+ readonly TEXT_NODE: 3;
8
+ readonly CDATA_SECTION_NODE: 4;
9
+ readonly ENTITY_REFERENCE_NODE: 5;
10
+ readonly ENTITY_NODE: 6;
11
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
12
+ readonly COMMENT_NODE: 8;
13
+ readonly DOCUMENT_NODE: 9;
14
+ readonly DOCUMENT_TYPE_NODE: 10;
15
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
16
+ readonly NOTATION_NODE: 12;
17
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
18
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
19
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
20
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
21
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
22
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
23
+ };
24
+ export type NativeRange = Range;
25
+ export declare const NativeRange: {
26
+ new (): Range;
27
+ prototype: Range;
28
+ readonly START_TO_START: 0;
29
+ readonly START_TO_END: 1;
30
+ readonly END_TO_END: 2;
31
+ readonly END_TO_START: 3;
32
+ };
33
+ export type NativeSelection = Selection;
@@ -0,0 +1 @@
1
+ export type NodePath = number[];
@@ -0,0 +1,21 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export type KeyValue = {
3
+ [key: string]: string;
4
+ };
5
+ export type TwoParts = {
6
+ left: Nodes | null;
7
+ right: Nodes | null;
8
+ };
9
+ export type ThreeParts = TwoParts & {
10
+ center: Nodes | null;
11
+ };
12
+ export type Point = {
13
+ node: Nodes;
14
+ offset: number;
15
+ };
16
+ export type AppliedItem = {
17
+ node: Nodes;
18
+ name: string;
19
+ attributes: KeyValue;
20
+ styles: KeyValue;
21
+ };
@@ -0,0 +1,20 @@
1
+ export type BeforeUploadFileType = File | Blob | boolean | string;
2
+ export type UploadRequestMethod = 'POST' | 'PUT' | 'PATCH' | 'post' | 'put' | 'patch';
3
+ export type UploadRequestHeader = Record<string, string>;
4
+ export interface UploadRequestError extends Error {
5
+ status?: number;
6
+ method?: UploadRequestMethod;
7
+ url?: string;
8
+ }
9
+ export interface UploadRequestOption<T = any> {
10
+ method: UploadRequestMethod;
11
+ action: string;
12
+ file: Exclude<BeforeUploadFileType, File | boolean> | File;
13
+ onSuccess?: (body: T, xhr?: XMLHttpRequest) => void;
14
+ onProgress?: (event: ProgressEvent) => void;
15
+ onError?: (event: UploadRequestError | ProgressEvent, body?: T) => void;
16
+ data?: Record<string, unknown>;
17
+ filename?: string;
18
+ withCredentials?: boolean;
19
+ headers?: UploadRequestHeader;
20
+ }
@@ -0,0 +1,40 @@
1
+ import type { Editor } from '../editor';
2
+ import { AppliedItem } from './object';
3
+ export type ToolbarMenuItem = {
4
+ value: string;
5
+ icon?: string;
6
+ text: string;
7
+ };
8
+ export type ButtonItem = {
9
+ name: string;
10
+ type: 'button';
11
+ icon?: string;
12
+ tooltip: string;
13
+ isSelected?: (appliedItems: AppliedItem[], editor: Editor) => boolean;
14
+ isDisabled?: (AppliedItems: AppliedItem[], editor: Editor) => boolean;
15
+ onClick: (editor: Editor, value: string) => void;
16
+ };
17
+ export type DropdownItem = {
18
+ name: string;
19
+ type: 'dropdown';
20
+ icon?: string;
21
+ accentIcon?: string;
22
+ downIcon?: string;
23
+ defaultValue: string;
24
+ tooltip: string;
25
+ width: string;
26
+ menuType: 'list' | 'color';
27
+ menuItems: ToolbarMenuItem[];
28
+ selectedValues?: (appliedItems: AppliedItem[], editor: Editor) => string[];
29
+ isDisabled?: (AppliedItems: AppliedItem[], editor: Editor) => boolean;
30
+ onSelect: (editor: Editor, value: string) => void;
31
+ };
32
+ export type UploadItem = {
33
+ name: string;
34
+ type: 'upload';
35
+ icon?: string;
36
+ tooltip: string;
37
+ accept?: string;
38
+ multiple?: boolean;
39
+ };
40
+ export type ToolbarItem = ButtonItem | DropdownItem | UploadItem;
@@ -0,0 +1,16 @@
1
+ import EventEmitter from 'eventemitter3';
2
+ import { Nodes } from '../models/nodes';
3
+ export declare class LinkPopup {
4
+ private linkNode;
5
+ root: Nodes;
6
+ event: EventEmitter;
7
+ constructor(target: Nodes);
8
+ private writeClipboardText;
9
+ private bindEvents;
10
+ private getInputValue;
11
+ private setInputValue;
12
+ save(): void;
13
+ updatePosition(): void;
14
+ show(linkNode: Nodes): void;
15
+ hide(): void;
16
+ }
@@ -0,0 +1,30 @@
1
+ import EventEmitter from 'eventemitter3';
2
+ import type { Editor } from '../editor';
3
+ import { NativeNode } from '../types/native';
4
+ import { ToolbarItem } from '../types/toolbar';
5
+ import { Nodes } from '../models/nodes';
6
+ type ToolbarConfig = {
7
+ editor: Editor;
8
+ root: string | Nodes | NativeNode;
9
+ items?: (string | ToolbarItem)[];
10
+ };
11
+ export declare class Toolbar {
12
+ private items;
13
+ editor: Editor;
14
+ root: Nodes;
15
+ event: EventEmitter;
16
+ constructor(config: ToolbarConfig);
17
+ getValue(node: Nodes): string[];
18
+ setValue(node: Nodes, value: string[]): void;
19
+ private appendDivider;
20
+ private appendButton;
21
+ private getMenuMap;
22
+ private updateColorAccent;
23
+ private addDropdownMenu;
24
+ private bindDropdownEvents;
25
+ private appendDropdown;
26
+ private appendUpload;
27
+ private getUpdateStateHandler;
28
+ render(): void;
29
+ }
30
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { Editor } from '../editor';
2
+ import { Box } from '../models/box';
3
+ type Config = {
4
+ editor: Editor;
5
+ file: File;
6
+ onError?: () => void;
7
+ onSuccess?: () => void;
8
+ };
9
+ export declare function uploadImage(config: Config): Box;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function appendDeepest(element: Nodes, node: Nodes): void;
@@ -0,0 +1 @@
1
+ export declare function camelCase(value: string): string;
@@ -0,0 +1,2 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function changeTagName(element: Nodes, newTagName: string): Nodes;
@@ -0,0 +1 @@
1
+ export declare function debug(...data: any[]): void;
@@ -0,0 +1 @@
1
+ export declare function denormalizeValue(value: string): string;
@@ -0,0 +1 @@
1
+ export declare function encode(value: string): string;
@@ -0,0 +1,2 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function fixNumberedList(blocks: Nodes[]): void;
@@ -0,0 +1,5 @@
1
+ type CallbackFunction = (key: string, value: any) => boolean | void;
2
+ export declare function forEach(map: {
3
+ [key: string]: any;
4
+ }, callback: CallbackFunction): void;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare function getCSS(element: Element, propertyName: string): string;
@@ -0,0 +1,2 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function getDeepest(element: Nodes): Nodes;
@@ -0,0 +1 @@
1
+ export declare function inString(string: string, value: string, delimiter?: string): boolean;
@@ -0,0 +1,26 @@
1
+ export * from './template';
2
+ export * from './safe-template';
3
+ export * from './camel-case';
4
+ export * from './in-string';
5
+ export * from './encode';
6
+ export * from './to-hex';
7
+ export * from './parse-style';
8
+ export * from './normalize-value';
9
+ export * from './denormalize-value';
10
+ export * from './for-each';
11
+ export * from './get-css';
12
+ export * from './to-node-list';
13
+ export * from './query';
14
+ export * from './split-nodes';
15
+ export * from './merge-nodes';
16
+ export * from './wrap-node-list';
17
+ export * from './get-deepest';
18
+ export * from './append-deepest';
19
+ export * from './remove-zws';
20
+ export * from './change-tag-name';
21
+ export * from './fix-numbered-list';
22
+ export * from './remove-br';
23
+ export * from './set-block-indent';
24
+ export * from './morph';
25
+ export * from './request';
26
+ export * from './debug';
@@ -0,0 +1,5 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function mergeNodes(node: Nodes, otherNode: Nodes): {
3
+ node: Nodes;
4
+ offset: number;
5
+ };
@@ -0,0 +1,56 @@
1
+ /**
2
+ BSD 2-Clause License
3
+
4
+ Copyright (c) 2022, Big Sky Software
5
+ All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are met:
9
+
10
+ 1. Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ 2. Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ Repository: https://github.com/bigskysoftware/idiomorph
29
+ */
30
+ import type { Nodes } from '../models/nodes';
31
+ declare global {
32
+ interface Node {
33
+ generatedByIdiomorph: boolean;
34
+ }
35
+ }
36
+ declare type configType = {
37
+ morphStyle?: 'innerHTML' | 'outerHTML';
38
+ ignoreActive?: boolean;
39
+ ignoreActiveValue?: boolean;
40
+ head?: {
41
+ style?: 'merge' | 'append' | 'morph' | 'none';
42
+ };
43
+ callbacks?: {
44
+ beforeNodeAdded?: (node: Node) => void | boolean;
45
+ afterNodeAdded?: (node: Node) => void;
46
+ beforeNodeMorphed?: (oldNode: Node, newNode: Node) => void | boolean;
47
+ afterNodeMorphed?: (oldNode: Node, newNode: Node) => void;
48
+ beforeNodeRemoved?: (node: Node) => void | boolean;
49
+ afterNodeRemoved?: (node: Node) => void;
50
+ beforeAttributeUpdated?: (attributeName: string, node: Node, mutationType: string) => void | boolean;
51
+ afterAttributeUpdated?: (attributeName: string, node: Node, mutationType: string) => void;
52
+ beforeChildrenUpdated?: (oldNode: Node, newNode: Node) => void | boolean;
53
+ };
54
+ };
55
+ export declare function morph(node: Nodes, otherNode: Nodes, config?: configType): void;
56
+ export {};
@@ -0,0 +1 @@
1
+ export declare function normalizeValue(value: string): string;
@@ -0,0 +1,2 @@
1
+ import { KeyValue } from '../types/object';
2
+ export declare function parseStyle(styleValue: string): KeyValue;
@@ -0,0 +1,3 @@
1
+ import { NativeNode } from '../types/native';
2
+ import { Nodes } from '../models/nodes';
3
+ export declare function query(content: string | NativeNode | Nodes): Nodes;
@@ -0,0 +1,2 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function removeBr(block: Nodes): void;
@@ -0,0 +1,2 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function removeZWS(node: Nodes): void;
@@ -0,0 +1,27 @@
1
+ /**
2
+ The MIT License (MIT)
3
+
4
+ Copyright (c) 2016-present react-component
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ Repository: https://github.com/react-component/upload
25
+ */
26
+ import { UploadRequestOption } from '../types/request';
27
+ export declare function request(option: UploadRequestOption): XMLHttpRequest;
@@ -0,0 +1 @@
1
+ export declare function safeTemplate(strings: TemplateStringsArray, ...keys: any[]): string;
@@ -0,0 +1,2 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function setBlockIndent(block: Nodes, type: 'increase' | 'decrease'): void;
@@ -0,0 +1,5 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function splitNodes(node: Nodes, offset: number, limitNode: Nodes): {
3
+ left: Nodes;
4
+ right: Nodes;
5
+ } | null;
@@ -0,0 +1 @@
1
+ export declare function template(strings: TemplateStringsArray, ...keys: any[]): string;
@@ -0,0 +1 @@
1
+ export declare function toHex(value: string): string;
@@ -0,0 +1,2 @@
1
+ import { NativeNode } from '../types/native';
2
+ export declare function toNodeList(content: string | NativeNode, valueType?: 'text' | 'html'): NativeNode[];
@@ -0,0 +1,2 @@
1
+ import type { Nodes } from '../models/nodes';
2
+ export declare function wrapNodeList(nodeList: Nodes[], wrapper?: Nodes): Nodes;