quietmark 0.0.0-stage → 0.1.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 +276 -2
- package/dist/index.d.ts +76 -0
- package/dist/index.js +170 -0
- package/dist/index.js.map +1 -0
- package/dist/inline.d.ts +2 -0
- package/dist/inline.js +16 -0
- package/dist/inline.js.map +1 -0
- package/dist/types.d.ts +221 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/wasm/inline.d.ts +1 -0
- package/dist/wasm/inline.js +2 -0
- package/dist/wasm/quietmark.d.ts +139 -0
- package/dist/wasm/quietmark.js +807 -0
- package/dist/wasm/quietmark_bg.wasm +0 -0
- package/dist/wasm/quietmark_bg.wasm.d.ts +30 -0
- package/package.json +51 -3
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A text being edited and the look of each of its blocks. A view keeps one
|
|
6
|
+
* per editor, gives it every change, and draws again only the blocks a
|
|
7
|
+
* change names.
|
|
8
|
+
*/
|
|
9
|
+
export class Document {
|
|
10
|
+
free(): void;
|
|
11
|
+
[Symbol.dispose](): void;
|
|
12
|
+
/**
|
|
13
|
+
* Applies an edit, such as one `key` or `toggleTask` returned.
|
|
14
|
+
*/
|
|
15
|
+
apply(edit: any): any;
|
|
16
|
+
blockCount(): number;
|
|
17
|
+
/**
|
|
18
|
+
* The blocks from `start` up to `end`, both clamped to the blocks
|
|
19
|
+
* there are, or all of them. A view fetches only the ones a change
|
|
20
|
+
* names, since each crosses as a fresh object.
|
|
21
|
+
*/
|
|
22
|
+
blocks(start?: number | null, end?: number | null): any;
|
|
23
|
+
/**
|
|
24
|
+
* What `key` does with the selection at `from..to`, or `undefined`
|
|
25
|
+
* where the Markdown gives it no meaning and the view does what it
|
|
26
|
+
* always does.
|
|
27
|
+
*/
|
|
28
|
+
key(from: number, to: number, key: string): any;
|
|
29
|
+
/**
|
|
30
|
+
* The whole text's look, with offsets and lines from the text's start.
|
|
31
|
+
*/
|
|
32
|
+
look(): any;
|
|
33
|
+
/**
|
|
34
|
+
* A document for `text`. `options` defaults to the note preset, and a
|
|
35
|
+
* field it leaves out keeps the note preset's value.
|
|
36
|
+
*/
|
|
37
|
+
constructor(text: string, options: any);
|
|
38
|
+
options(): any;
|
|
39
|
+
/**
|
|
40
|
+
* Replaces `from..to` with `insert`. A range past the text's end
|
|
41
|
+
* changes nothing and returns an empty change.
|
|
42
|
+
*/
|
|
43
|
+
replace(from: number, to: number, insert: string): any;
|
|
44
|
+
setOptions(options: any): any;
|
|
45
|
+
setText(text: string): any;
|
|
46
|
+
text(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Ticks or clears the task box on the line holding `at`, or
|
|
49
|
+
* `undefined` when that line holds none.
|
|
50
|
+
*/
|
|
51
|
+
toggleTask(at: number): any;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* What `key` does in `text` with the selection at `from..to`.
|
|
56
|
+
*/
|
|
57
|
+
export function key(text: string, from: number, to: number, key: string): any;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The whole look of `text`, for a view that keeps no document.
|
|
61
|
+
*/
|
|
62
|
+
export function look(text: string, options: any): any;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A message box: every line stays put and markers only hide.
|
|
66
|
+
*/
|
|
67
|
+
export function messageOptions(): any;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Everything on, as a note editor wants it.
|
|
71
|
+
*/
|
|
72
|
+
export function noteOptions(): any;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Ticks or clears the task box on the line of `text` holding `at`.
|
|
76
|
+
*/
|
|
77
|
+
export function toggleTask(text: string, at: number): any;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The text as it reads with the selection at `from..to`: hidden markers
|
|
81
|
+
* gone, glyphs in their place, the caret drawn as `‸`. Tests compare it,
|
|
82
|
+
* as the core's corpus does.
|
|
83
|
+
*/
|
|
84
|
+
export function view(text: string, options: any, from: number, to: number): string;
|
|
85
|
+
|
|
86
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
87
|
+
|
|
88
|
+
export interface InitOutput {
|
|
89
|
+
readonly memory: WebAssembly.Memory;
|
|
90
|
+
readonly __wbg_document_free: (a: number, b: number) => void;
|
|
91
|
+
readonly document_apply: (a: number, b: any) => [number, number, number];
|
|
92
|
+
readonly document_blockCount: (a: number) => number;
|
|
93
|
+
readonly document_blocks: (a: number, b: number, c: number) => [number, number, number];
|
|
94
|
+
readonly document_key: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
95
|
+
readonly document_look: (a: number) => [number, number, number];
|
|
96
|
+
readonly document_new: (a: number, b: number, c: any) => [number, number, number];
|
|
97
|
+
readonly document_options: (a: number) => [number, number, number];
|
|
98
|
+
readonly document_replace: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
99
|
+
readonly document_setOptions: (a: number, b: any) => [number, number, number];
|
|
100
|
+
readonly document_setText: (a: number, b: number, c: number) => [number, number, number];
|
|
101
|
+
readonly document_text: (a: number) => [number, number];
|
|
102
|
+
readonly document_toggleTask: (a: number, b: number) => [number, number, number];
|
|
103
|
+
readonly key: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
104
|
+
readonly look: (a: number, b: number, c: any) => [number, number, number];
|
|
105
|
+
readonly messageOptions: () => [number, number, number];
|
|
106
|
+
readonly noteOptions: () => [number, number, number];
|
|
107
|
+
readonly toggleTask: (a: number, b: number, c: number) => [number, number, number];
|
|
108
|
+
readonly view: (a: number, b: number, c: any, d: number, e: number) => [number, number, number, number];
|
|
109
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
110
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
111
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
112
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
113
|
+
readonly __externref_table_alloc: () => number;
|
|
114
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
115
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
116
|
+
readonly __wbindgen_start: () => void;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
123
|
+
* a precompiled `WebAssembly.Module`.
|
|
124
|
+
*
|
|
125
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
126
|
+
*
|
|
127
|
+
* @returns {InitOutput}
|
|
128
|
+
*/
|
|
129
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
133
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
134
|
+
*
|
|
135
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
136
|
+
*
|
|
137
|
+
* @returns {Promise<InitOutput>}
|
|
138
|
+
*/
|
|
139
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|