documint 0.0.18 → 0.0.20
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/dist/index.d.ts +20 -20
- package/dist/index.js +42 -209
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export type RawBlock = BlockNode<"raw", {
|
|
|
96
96
|
originalType: string;
|
|
97
97
|
source: string;
|
|
98
98
|
}>;
|
|
99
|
-
export type Mark = "bold" | "italic" | "strikethrough" | "underline";
|
|
99
|
+
export type Mark = "bold" | "italic" | "strikethrough" | "underline" | "superscript";
|
|
100
100
|
type Text$1 = DocumentNode<"text", {
|
|
101
101
|
marks: Mark[];
|
|
102
102
|
text: string;
|
|
@@ -129,61 +129,61 @@ export type DocumintStorage = {
|
|
|
129
129
|
writeFile(file: File): Promise<string>;
|
|
130
130
|
openFile?(path: string): void;
|
|
131
131
|
};
|
|
132
|
-
type
|
|
132
|
+
export type EditorInputCommand = "dedent" | "deleteBackward" | "indent" | "insertLineBreak" | "insertSoftLineBreak" | "moveListItemDown" | "moveListItemUp" | "moveToDocumentEnd" | "moveToDocumentStart" | "moveToLineEnd" | "moveToLineStart" | "redo" | "selectAll" | "toggleBold" | "toggleCode" | "toggleItalic" | "toggleStrikethrough" | "toggleSuperscript" | "toggleUnderline" | "undo";
|
|
133
133
|
export type EditorTheme = {
|
|
134
134
|
activeBlockBackground: string;
|
|
135
135
|
activeBlockFlash: string;
|
|
136
136
|
background: string;
|
|
137
137
|
blockquoteRule: string;
|
|
138
138
|
blockquoteRuleActive: string;
|
|
139
|
-
blockquoteText
|
|
140
|
-
caret
|
|
139
|
+
blockquoteText?: string;
|
|
140
|
+
caret?: string;
|
|
141
141
|
checkboxCheckmark: string;
|
|
142
142
|
checkboxCheckedFill: string;
|
|
143
143
|
checkboxCheckedStroke: string;
|
|
144
144
|
checkboxUncheckedFill: string;
|
|
145
145
|
checkboxUncheckedStroke: string;
|
|
146
146
|
codeBackground: string;
|
|
147
|
-
codeText
|
|
147
|
+
codeText?: string;
|
|
148
148
|
commentHighlight: string;
|
|
149
149
|
commentHighlightActive: string;
|
|
150
150
|
commentHighlightResolved: string;
|
|
151
151
|
commentHighlightResolvedActive: string;
|
|
152
152
|
dividerRule?: string;
|
|
153
153
|
headingRule: string;
|
|
154
|
-
headingText
|
|
154
|
+
headingText?: string;
|
|
155
155
|
imageLoadingOverlay: string;
|
|
156
156
|
imagePlaceholderIcon: string;
|
|
157
|
-
imagePlaceholderText
|
|
157
|
+
imagePlaceholderText?: string;
|
|
158
158
|
imageSurfaceBackground: string;
|
|
159
159
|
imageSurfaceBorder: string;
|
|
160
160
|
inlineCodeBackground: string;
|
|
161
|
-
inlineCodeText
|
|
162
|
-
insertHighlightText
|
|
161
|
+
inlineCodeText?: string;
|
|
162
|
+
insertHighlightText?: string;
|
|
163
163
|
leafAccent: string;
|
|
164
164
|
leafBackground: string;
|
|
165
165
|
leafBorder: string;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
leafButtonText: string;
|
|
166
|
+
leafInputBackground: string;
|
|
167
|
+
leafButtonText?: string;
|
|
169
168
|
leafResolvedBackground: string;
|
|
170
169
|
leafResolvedBorder: string;
|
|
171
|
-
leafSecondaryText
|
|
170
|
+
leafSecondaryText?: string;
|
|
172
171
|
leafShadow?: string;
|
|
173
|
-
leafText
|
|
174
|
-
linkText
|
|
172
|
+
leafText?: string;
|
|
173
|
+
linkText?: string;
|
|
175
174
|
listMarkerText?: string;
|
|
176
175
|
mentionBackground?: string;
|
|
177
176
|
mentionText?: string;
|
|
178
177
|
paddingX?: number;
|
|
179
178
|
paddingY?: number;
|
|
180
|
-
paragraphText
|
|
179
|
+
paragraphText?: string;
|
|
181
180
|
selectionBackground: string;
|
|
182
181
|
selectionHandleBackground: string;
|
|
183
182
|
selectionHandleBorder: string;
|
|
184
183
|
tableBodyBackground: string;
|
|
185
184
|
tableBorder: string;
|
|
186
185
|
tableHeaderBackground: string;
|
|
186
|
+
text: string;
|
|
187
187
|
};
|
|
188
188
|
/**
|
|
189
189
|
* A user known to the host. The full set is the mention roster; the subset
|
|
@@ -208,14 +208,14 @@ export type DocumentPresence = {
|
|
|
208
208
|
cursor?: Anchor;
|
|
209
209
|
color?: string;
|
|
210
210
|
};
|
|
211
|
-
export type
|
|
211
|
+
export type EditorInputKeybinding = {
|
|
212
212
|
altKey?: boolean;
|
|
213
|
-
command:
|
|
213
|
+
command: EditorInputCommand;
|
|
214
214
|
key: string;
|
|
215
215
|
modKey?: boolean;
|
|
216
216
|
shiftKey?: boolean | "any";
|
|
217
217
|
};
|
|
218
|
-
export declare const defaultKeybindings:
|
|
218
|
+
export declare const defaultKeybindings: EditorInputKeybinding[];
|
|
219
219
|
export type DocumintDecoration = {
|
|
220
220
|
backgroundColor?: string;
|
|
221
221
|
pulse?: boolean;
|
|
@@ -227,7 +227,7 @@ export type DocumintProps = {
|
|
|
227
227
|
className?: string;
|
|
228
228
|
actions?: DocumintActions;
|
|
229
229
|
theme?: DocumintTheme;
|
|
230
|
-
keybindings?:
|
|
230
|
+
keybindings?: EditorInputKeybinding[];
|
|
231
231
|
decorations?: readonly DocumintDecoration[];
|
|
232
232
|
presence?: DocumentPresence[];
|
|
233
233
|
storage?: DocumintStorage;
|