plitejs 0.0.1 → 54.0.0-beta.3
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 +4 -1
- package/README.md +83 -0
- package/dist/annotation-store-metrics-Ccjkef45.js +12 -0
- package/dist/annotations/index.d.ts +2 -0
- package/dist/annotations/index.js +2 -0
- package/dist/authored/index.d.ts +596 -0
- package/dist/authored/index.js +18558 -0
- package/dist/authored-veto-DSnQcHGR.js +6 -0
- package/dist/browser-protocol-pvt4HFF7.js +5 -0
- package/dist/comparison-plan-CEQL0ooW.js +1338 -0
- package/dist/comparison-types-Dt-unJZY.d.ts +179 -0
- package/dist/create-editor-CkHtPWXV.js +1107 -0
- package/dist/diff/index.d.ts +32 -0
- package/dist/diff/index.js +1748 -0
- package/dist/dom/index.d.ts +2 -0
- package/dist/dom/index.js +2 -0
- package/dist/dom-Cgfscvnm.js +9220 -0
- package/dist/editor-owner-IUmkTeXz.js +171 -0
- package/dist/editor-view-lifetime-GJKa_QGh.js +23 -0
- package/dist/history/index.d.ts +170 -0
- package/dist/history/index.js +6718 -0
- package/dist/hyperscript/index.d.ts +2 -0
- package/dist/hyperscript/index.js +2 -0
- package/dist/hyperscript-FPuoArEi.js +299 -0
- package/dist/index-BpQx2UG4.d.ts +1093 -0
- package/dist/index-Cw-oC2ps.d.ts +190 -0
- package/dist/index-DPWyk3lG.d.ts +65 -0
- package/dist/index-DpltOCot.d.ts +9753 -0
- package/dist/index-HPYawTae.d.ts +119 -0
- package/dist/index-K0Za9YXc.d.ts +1246 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/internal/index.d.ts +2 -0
- package/dist/internal/index.js +156 -0
- package/dist/mapped-view-store-ld-6uxEU.js +120 -0
- package/dist/native-grouping-input-DMNcsIaW.js +8 -0
- package/dist/pagination/index.d.ts +169 -0
- package/dist/pagination/index.js +2 -0
- package/dist/pagination/react.d.ts +33 -0
- package/dist/pagination/react.js +1509 -0
- package/dist/pagination-D_A8iPJP.js +1021 -0
- package/dist/plugin-DWzkJbnJ.js +50999 -0
- package/dist/range-geometry-BLAHRE11.d.ts +38 -0
- package/dist/range-geometry-BjeLHOnl.js +486 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.js +7 -0
- package/dist/react/virtualized.d.ts +13 -0
- package/dist/react/virtualized.js +209 -0
- package/dist/react-DZ15gmz2.js +1018 -0
- package/dist/retraction-BMem8Rfk.js +109 -0
- package/dist/src-cT1OTKP_.js +1386 -0
- package/dist/store-Cz2mXyDe.js +704 -0
- package/dist/testing/index.d.ts +183 -0
- package/dist/testing/index.js +96 -0
- package/dist/use-editor-dom-scope-BbMDSCpW.js +28354 -0
- package/dist/yjs/index.d.ts +2 -0
- package/dist/yjs/index.js +2 -0
- package/dist/yjs/react/index.d.ts +26 -0
- package/dist/yjs/react/index.js +85 -0
- package/dist/yjs-DOK-m7kl.js +13413 -0
- package/package.json +191 -43
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Dc as Editor, Mg as Path, Qs as Element, mc as Text, nh as Selection, oh as TextSelection, vh as Descendant } from "./index-DpltOCot.js";
|
|
2
|
+
//#region src/hyperscript/tokens.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* All tokens inherit from a single constructor for `instanceof` checking.
|
|
5
|
+
*/
|
|
6
|
+
declare class Token {}
|
|
7
|
+
/**
|
|
8
|
+
* Anchor tokens represent the selection's anchor point.
|
|
9
|
+
*/
|
|
10
|
+
declare class AnchorToken extends Token {
|
|
11
|
+
offset?: number;
|
|
12
|
+
path?: Path;
|
|
13
|
+
constructor(props?: {
|
|
14
|
+
offset?: number;
|
|
15
|
+
path?: Path;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Focus tokens represent the selection's focus point.
|
|
20
|
+
*/
|
|
21
|
+
declare class FocusToken extends Token {
|
|
22
|
+
offset?: number;
|
|
23
|
+
path?: Path;
|
|
24
|
+
constructor(props?: {
|
|
25
|
+
offset?: number;
|
|
26
|
+
path?: Path;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/hyperscript/creators.d.ts
|
|
31
|
+
type HyperscriptEditorFixture = {
|
|
32
|
+
children: Descendant[];
|
|
33
|
+
selection: Selection;
|
|
34
|
+
};
|
|
35
|
+
type HyperscriptAttributes = Record<string, unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* Create an anchor token.
|
|
38
|
+
*/
|
|
39
|
+
declare function createAnchor(_tagName: string, attributes: HyperscriptAttributes, _children: any[]): AnchorToken;
|
|
40
|
+
/**
|
|
41
|
+
* Create an anchor and a focus token.
|
|
42
|
+
*/
|
|
43
|
+
declare function createCursor(_tagName: string, attributes: HyperscriptAttributes, _children: any[]): Token[];
|
|
44
|
+
/**
|
|
45
|
+
* Create an `Element` object.
|
|
46
|
+
*/
|
|
47
|
+
declare function createElement(_tagName: string, attributes: HyperscriptAttributes, children: any[]): Element;
|
|
48
|
+
/**
|
|
49
|
+
* Create a focus token.
|
|
50
|
+
*/
|
|
51
|
+
declare function createFocus(_tagName: string, attributes: HyperscriptAttributes, _children: any[]): FocusToken;
|
|
52
|
+
/**
|
|
53
|
+
* Create a fragment.
|
|
54
|
+
*/
|
|
55
|
+
declare function createFragment(_tagName: string, _attributes: HyperscriptAttributes, children: any[]): Descendant[];
|
|
56
|
+
/**
|
|
57
|
+
* Create a `Selection` object.
|
|
58
|
+
*/
|
|
59
|
+
declare function createSelection(_tagName: string, attributes: HyperscriptAttributes, children: any[]): TextSelection;
|
|
60
|
+
/**
|
|
61
|
+
* Create a `Text` object.
|
|
62
|
+
*/
|
|
63
|
+
declare function createText(_tagName: string, attributes: HyperscriptAttributes, children: any[]): Text;
|
|
64
|
+
/**
|
|
65
|
+
* Create a plain editor fixture for a custom hyperscript factory.
|
|
66
|
+
*/
|
|
67
|
+
declare function createEditorFixture(_tagName: string, attributes: HyperscriptAttributes, children: any[]): HyperscriptEditorFixture;
|
|
68
|
+
/**
|
|
69
|
+
* Create a top-level `Editor` object.
|
|
70
|
+
*/
|
|
71
|
+
declare const createEditor: (makeEditor: () => Editor) => (_tagName: string, attributes: HyperscriptAttributes, children: any[]) => Editor;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/hyperscript/hyperscript.d.ts
|
|
74
|
+
/**
|
|
75
|
+
* `HyperscriptCreators` are dictionaries of `HyperscriptCreator` functions
|
|
76
|
+
* keyed by tag name.
|
|
77
|
+
*/
|
|
78
|
+
type HyperscriptCreators<T = any> = Record<string, (tagName: string, attributes: HyperscriptAttributes, children: any[]) => T>;
|
|
79
|
+
/**
|
|
80
|
+
* `HyperscriptShorthands` are dictionaries of properties applied to specific
|
|
81
|
+
* object kinds, keyed by tag name. Use them to define domain-specific fixture
|
|
82
|
+
* tags.
|
|
83
|
+
*/
|
|
84
|
+
type HyperscriptShorthands = Record<string, HyperscriptAttributes>;
|
|
85
|
+
type HyperscriptElementCreators<TElements extends HyperscriptShorthands> = { [TKey in keyof TElements]: HyperscriptCreators<Element>[string]; };
|
|
86
|
+
/**
|
|
87
|
+
* Create an editor hyperscript factory with optional custom creators and element
|
|
88
|
+
* shorthands.
|
|
89
|
+
*/
|
|
90
|
+
declare const createHyperscript: <const TCreators extends HyperscriptCreators = {}, const TElements extends HyperscriptShorthands = {}>(options?: {
|
|
91
|
+
creators?: TCreators;
|
|
92
|
+
elements?: TElements;
|
|
93
|
+
}) => <S extends ("anchor" | "cursor" | "editor" | "element" | "focus" | "fragment" | "selection" | "text" | keyof TCreators | keyof TElements) & string>(tagName: S, attributes?: unknown, ...children: any[]) => ReturnType<({
|
|
94
|
+
anchor: typeof createAnchor;
|
|
95
|
+
cursor: typeof createCursor;
|
|
96
|
+
editor: (_tagName: string, attributes: HyperscriptAttributes, children: any[]) => Editor;
|
|
97
|
+
element: typeof createElement;
|
|
98
|
+
focus: typeof createFocus;
|
|
99
|
+
fragment: typeof createFragment;
|
|
100
|
+
selection: typeof createSelection;
|
|
101
|
+
text: typeof createText;
|
|
102
|
+
} & HyperscriptElementCreators<TElements> & TCreators)[S]>;
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/hyperscript/index.d.ts
|
|
105
|
+
/**
|
|
106
|
+
* The default editor hyperscript factory, without custom tags.
|
|
107
|
+
*/
|
|
108
|
+
declare const jsx: <S extends ("anchor" | "cursor" | "editor" | "element" | "focus" | "fragment" | "selection" | "text") & string>(tagName: S, attributes?: unknown, ...children: any[]) => ReturnType<({
|
|
109
|
+
anchor: typeof createAnchor;
|
|
110
|
+
cursor: typeof createCursor;
|
|
111
|
+
editor: (_tagName: string, attributes: HyperscriptAttributes, children: any[]) => Editor;
|
|
112
|
+
element: typeof createElement;
|
|
113
|
+
focus: typeof createFocus;
|
|
114
|
+
fragment: typeof createFragment;
|
|
115
|
+
selection: typeof createSelection;
|
|
116
|
+
text: typeof createText;
|
|
117
|
+
} & {})[S]>;
|
|
118
|
+
//#endregion
|
|
119
|
+
export { HyperscriptEditorFixture as a, createText as c, createHyperscript as i, HyperscriptCreators as n, createEditor as o, HyperscriptShorthands as r, createEditorFixture as s, jsx as t };
|