@toantranmei/editor 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +330 -2
- package/dist/css-CaicG2fA.js +580 -0
- package/dist/css-CaicG2fA.js.map +1 -0
- package/dist/index.js +6481 -0
- package/dist/index.js.map +1 -0
- package/dist/nuxt.js +78 -0
- package/dist/nuxt.js.map +1 -0
- package/dist/style.css +2 -0
- package/dist/types/block-items.d.ts +38 -0
- package/dist/types/block-names.d.ts +5 -0
- package/dist/types/block-ops.d.ts +66 -0
- package/dist/types/blocks/advanced.d.ts +7 -0
- package/dist/types/blocks/basic.d.ts +10 -0
- package/dist/types/blocks/extras.d.ts +23 -0
- package/dist/types/blocks/index.d.ts +13 -0
- package/dist/types/blocks/media.d.ts +3 -0
- package/dist/types/colors.d.ts +3 -0
- package/dist/types/components/BlockMenu.vue.d.ts +16 -0
- package/dist/types/components/ColorList.vue.d.ts +37 -0
- package/dist/types/components/DatePicker.vue.d.ts +22 -0
- package/dist/types/components/EmojiMenu.vue.d.ts +13 -0
- package/dist/types/components/FormatMenu.vue.d.ts +7 -0
- package/dist/types/components/ImageCropper.vue.d.ts +25 -0
- package/dist/types/components/ImageLightbox.vue.d.ts +16 -0
- package/dist/types/components/MeiEditor.vue.d.ts +72 -0
- package/dist/types/components/MeiOutline.vue.d.ts +14 -0
- package/dist/types/components/MentionMenu.vue.d.ts +13 -0
- package/dist/types/components/MermaidDiagram.vue.d.ts +9 -0
- package/dist/types/components/SlashMenu.vue.d.ts +14 -0
- package/dist/types/components/TableControls.vue.d.ts +13 -0
- package/dist/types/composables/useClickOutside.d.ts +5 -0
- package/dist/types/composables/useEditable.d.ts +7 -0
- package/dist/types/composables/useScope.d.ts +9 -0
- package/dist/types/config.d.ts +30 -0
- package/dist/types/content.d.ts +27 -0
- package/dist/types/date-utils.d.ts +38 -0
- package/dist/types/define-block.d.ts +43 -0
- package/dist/types/emoji-data.d.ts +9 -0
- package/dist/types/extensions/block-drop.d.ts +28 -0
- package/dist/types/extensions/block-id.d.ts +21 -0
- package/dist/types/extensions/block-selection.d.ts +24 -0
- package/dist/types/extensions/callout.d.ts +12 -0
- package/dist/types/extensions/code-block.d.ts +20 -0
- package/dist/types/extensions/color-marks.d.ts +24 -0
- package/dist/types/extensions/columns.d.ts +10 -0
- package/dist/types/extensions/embed.d.ts +13 -0
- package/dist/types/extensions/emoji.d.ts +5 -0
- package/dist/types/extensions/file-block.d.ts +17 -0
- package/dist/types/extensions/html-block.d.ts +39 -0
- package/dist/types/extensions/image-block.d.ts +1 -0
- package/dist/types/extensions/index.d.ts +13 -0
- package/dist/types/extensions/math.d.ts +13 -0
- package/dist/types/extensions/mention.d.ts +43 -0
- package/dist/types/extensions/mermaid.d.ts +4 -0
- package/dist/types/extensions/slash-command.d.ts +4 -0
- package/dist/types/extensions/suggestion-renderer.d.ts +11 -0
- package/dist/types/extensions/table.d.ts +1 -0
- package/dist/types/extensions/toc.d.ts +10 -0
- package/dist/types/extensions/toggle.d.ts +6 -0
- package/dist/types/extensions/unknown.d.ts +3 -0
- package/dist/types/index.d.ts +34 -0
- package/dist/types/keys.d.ts +3 -0
- package/dist/types/lazy.d.ts +12 -0
- package/dist/types/locale.d.ts +226 -0
- package/dist/types/nodeviews/CalloutView.vue.d.ts +93 -0
- package/dist/types/nodeviews/CodeBlockView.vue.d.ts +93 -0
- package/dist/types/nodeviews/EmbedView.vue.d.ts +93 -0
- package/dist/types/nodeviews/FileView.vue.d.ts +93 -0
- package/dist/types/nodeviews/HtmlView.vue.d.ts +93 -0
- package/dist/types/nodeviews/ImageView.vue.d.ts +93 -0
- package/dist/types/nodeviews/MathView.vue.d.ts +93 -0
- package/dist/types/nodeviews/MentionView.vue.d.ts +93 -0
- package/dist/types/nodeviews/TocView.vue.d.ts +93 -0
- package/dist/types/nodeviews/renderer.d.ts +12 -0
- package/dist/types/nuxt.d.ts +36 -0
- package/dist/types/plugin-key.d.ts +7 -0
- package/dist/types/plugin.d.ts +20 -0
- package/dist/types/recent.d.ts +24 -0
- package/dist/types/slash-items.d.ts +24 -0
- package/dist/types/table-ops.d.ts +32 -0
- package/dist/types/theme/css.d.ts +20 -0
- package/dist/types/theme/define.d.ts +18 -0
- package/dist/types/theme/index.d.ts +7 -0
- package/dist/types/theme/read.d.ts +5 -0
- package/dist/types/theme/tokens.d.ts +515 -0
- package/package.json +121 -4
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
/** Notion's content palette. Names are what documents store (`data-text-color="red"`). */
|
|
2
|
+
export declare const PALETTE_NAMES: readonly ["gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red"];
|
|
3
|
+
export type PaletteName = typeof PALETTE_NAMES[number];
|
|
4
|
+
export declare const primitive: {
|
|
5
|
+
white: string;
|
|
6
|
+
black: string;
|
|
7
|
+
gray: {
|
|
8
|
+
50: string;
|
|
9
|
+
100: string;
|
|
10
|
+
200: string;
|
|
11
|
+
300: string;
|
|
12
|
+
400: string;
|
|
13
|
+
500: string;
|
|
14
|
+
800: string;
|
|
15
|
+
850: string;
|
|
16
|
+
900: string;
|
|
17
|
+
925: string;
|
|
18
|
+
950: string;
|
|
19
|
+
};
|
|
20
|
+
azure: {
|
|
21
|
+
400: string;
|
|
22
|
+
500: string;
|
|
23
|
+
600: string;
|
|
24
|
+
};
|
|
25
|
+
/** Content palette: `light`/`dark` × `text`/`bg`. */
|
|
26
|
+
tint: {
|
|
27
|
+
gray: {
|
|
28
|
+
lightText: string;
|
|
29
|
+
lightBg: string;
|
|
30
|
+
darkText: string;
|
|
31
|
+
darkBg: string;
|
|
32
|
+
};
|
|
33
|
+
brown: {
|
|
34
|
+
lightText: string;
|
|
35
|
+
lightBg: string;
|
|
36
|
+
darkText: string;
|
|
37
|
+
darkBg: string;
|
|
38
|
+
};
|
|
39
|
+
orange: {
|
|
40
|
+
lightText: string;
|
|
41
|
+
lightBg: string;
|
|
42
|
+
darkText: string;
|
|
43
|
+
darkBg: string;
|
|
44
|
+
};
|
|
45
|
+
yellow: {
|
|
46
|
+
lightText: string;
|
|
47
|
+
lightBg: string;
|
|
48
|
+
darkText: string;
|
|
49
|
+
darkBg: string;
|
|
50
|
+
};
|
|
51
|
+
green: {
|
|
52
|
+
lightText: string;
|
|
53
|
+
lightBg: string;
|
|
54
|
+
darkText: string;
|
|
55
|
+
darkBg: string;
|
|
56
|
+
};
|
|
57
|
+
blue: {
|
|
58
|
+
lightText: string;
|
|
59
|
+
lightBg: string;
|
|
60
|
+
darkText: string;
|
|
61
|
+
darkBg: string;
|
|
62
|
+
};
|
|
63
|
+
purple: {
|
|
64
|
+
lightText: string;
|
|
65
|
+
lightBg: string;
|
|
66
|
+
darkText: string;
|
|
67
|
+
darkBg: string;
|
|
68
|
+
};
|
|
69
|
+
pink: {
|
|
70
|
+
lightText: string;
|
|
71
|
+
lightBg: string;
|
|
72
|
+
darkText: string;
|
|
73
|
+
darkBg: string;
|
|
74
|
+
};
|
|
75
|
+
red: {
|
|
76
|
+
lightText: string;
|
|
77
|
+
lightBg: string;
|
|
78
|
+
darkText: string;
|
|
79
|
+
darkBg: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
space: {
|
|
83
|
+
0: string;
|
|
84
|
+
1: string;
|
|
85
|
+
2: string;
|
|
86
|
+
3: string;
|
|
87
|
+
4: string;
|
|
88
|
+
5: string;
|
|
89
|
+
6: string;
|
|
90
|
+
7: string;
|
|
91
|
+
8: string;
|
|
92
|
+
9: string;
|
|
93
|
+
};
|
|
94
|
+
rounded: {
|
|
95
|
+
xs: string;
|
|
96
|
+
sm: string;
|
|
97
|
+
md: string;
|
|
98
|
+
lg: string;
|
|
99
|
+
full: string;
|
|
100
|
+
};
|
|
101
|
+
fontSize: {
|
|
102
|
+
xs: string;
|
|
103
|
+
sm: string;
|
|
104
|
+
md: string;
|
|
105
|
+
lg: string;
|
|
106
|
+
};
|
|
107
|
+
fontWeight: {
|
|
108
|
+
regular: string;
|
|
109
|
+
medium: string;
|
|
110
|
+
semibold: string;
|
|
111
|
+
};
|
|
112
|
+
lineHeight: {
|
|
113
|
+
tight: string;
|
|
114
|
+
snug: string;
|
|
115
|
+
normal: string;
|
|
116
|
+
relaxed: string;
|
|
117
|
+
};
|
|
118
|
+
borderWidth: {
|
|
119
|
+
thin: string;
|
|
120
|
+
medium: string;
|
|
121
|
+
thick: string;
|
|
122
|
+
heavy: string;
|
|
123
|
+
};
|
|
124
|
+
duration: {
|
|
125
|
+
fast: string;
|
|
126
|
+
normal: string;
|
|
127
|
+
};
|
|
128
|
+
fontFamily: {
|
|
129
|
+
sans: string;
|
|
130
|
+
mono: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
/** Mode-independent semantic tokens. */
|
|
134
|
+
export declare const semanticBase: {
|
|
135
|
+
font: {
|
|
136
|
+
sans: string;
|
|
137
|
+
mono: string;
|
|
138
|
+
size: string;
|
|
139
|
+
lineHeight: string;
|
|
140
|
+
};
|
|
141
|
+
radius: {
|
|
142
|
+
sm: string;
|
|
143
|
+
md: string;
|
|
144
|
+
lg: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
export declare const semanticLight: {
|
|
148
|
+
color: {
|
|
149
|
+
text: string;
|
|
150
|
+
textMuted: string;
|
|
151
|
+
textFaint: string;
|
|
152
|
+
bg: string;
|
|
153
|
+
elevated: string;
|
|
154
|
+
surface: string;
|
|
155
|
+
hover: string;
|
|
156
|
+
border: string;
|
|
157
|
+
accent: string;
|
|
158
|
+
accentHover: string;
|
|
159
|
+
onAccent: string;
|
|
160
|
+
selection: string;
|
|
161
|
+
blockSelected: string;
|
|
162
|
+
danger: string;
|
|
163
|
+
handle: string;
|
|
164
|
+
inlineCodeText: string;
|
|
165
|
+
inlineCodeBg: string;
|
|
166
|
+
overlay: string;
|
|
167
|
+
};
|
|
168
|
+
shadow: {
|
|
169
|
+
popover: string;
|
|
170
|
+
};
|
|
171
|
+
palette: Record<"gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red", {
|
|
172
|
+
text: string;
|
|
173
|
+
bg: string;
|
|
174
|
+
}>;
|
|
175
|
+
syntax: {
|
|
176
|
+
comment: string;
|
|
177
|
+
keyword: string;
|
|
178
|
+
string: string;
|
|
179
|
+
number: string;
|
|
180
|
+
title: string;
|
|
181
|
+
variable: string;
|
|
182
|
+
meta: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
export declare const semanticDark: typeof semanticLight;
|
|
186
|
+
export declare const component: {
|
|
187
|
+
/** Editor root. `bg` is transparent so it blends into the page; a forced mode paints `forcedBg`. */
|
|
188
|
+
editor: {
|
|
189
|
+
bg: string;
|
|
190
|
+
forcedBg: string;
|
|
191
|
+
};
|
|
192
|
+
icon: {
|
|
193
|
+
size: string;
|
|
194
|
+
stroke: string;
|
|
195
|
+
};
|
|
196
|
+
popover: {
|
|
197
|
+
bg: string;
|
|
198
|
+
radius: string;
|
|
199
|
+
shadow: string;
|
|
200
|
+
padding: string;
|
|
201
|
+
offset: string;
|
|
202
|
+
};
|
|
203
|
+
menu: {
|
|
204
|
+
itemGap: string;
|
|
205
|
+
itemPaddingX: string;
|
|
206
|
+
itemPaddingY: string;
|
|
207
|
+
itemRadius: string;
|
|
208
|
+
itemHover: string;
|
|
209
|
+
iconBox: string;
|
|
210
|
+
iconRadius: string;
|
|
211
|
+
iconBorder: string;
|
|
212
|
+
titleSize: string;
|
|
213
|
+
descriptionSize: string;
|
|
214
|
+
descriptionColor: string;
|
|
215
|
+
labelSize: string;
|
|
216
|
+
labelWeight: string;
|
|
217
|
+
labelColor: string;
|
|
218
|
+
shortcutColor: string;
|
|
219
|
+
width: string;
|
|
220
|
+
submenuWidth: string;
|
|
221
|
+
maxHeight: string;
|
|
222
|
+
};
|
|
223
|
+
toolbar: {
|
|
224
|
+
buttonSize: string;
|
|
225
|
+
buttonRadius: string;
|
|
226
|
+
buttonHover: string;
|
|
227
|
+
activeColor: string;
|
|
228
|
+
dividerColor: string;
|
|
229
|
+
linkFormWidth: string;
|
|
230
|
+
};
|
|
231
|
+
button: {
|
|
232
|
+
height: string;
|
|
233
|
+
paddingX: string;
|
|
234
|
+
radius: string;
|
|
235
|
+
fontSize: string;
|
|
236
|
+
border: string;
|
|
237
|
+
bg: string;
|
|
238
|
+
hoverBg: string;
|
|
239
|
+
primaryBg: string;
|
|
240
|
+
primaryHoverBg: string;
|
|
241
|
+
primaryText: string;
|
|
242
|
+
floatingBg: string;
|
|
243
|
+
floatingHoverBg: string;
|
|
244
|
+
floatingShadow: string;
|
|
245
|
+
disabledOpacity: string;
|
|
246
|
+
};
|
|
247
|
+
input: {
|
|
248
|
+
height: string;
|
|
249
|
+
paddingX: string;
|
|
250
|
+
radius: string;
|
|
251
|
+
fontSize: string;
|
|
252
|
+
border: string;
|
|
253
|
+
focusBorder: string;
|
|
254
|
+
focusRing: string;
|
|
255
|
+
};
|
|
256
|
+
handle: {
|
|
257
|
+
color: string;
|
|
258
|
+
hoverColor: string;
|
|
259
|
+
hoverBg: string;
|
|
260
|
+
buttonWidth: string;
|
|
261
|
+
buttonHeight: string;
|
|
262
|
+
radius: string;
|
|
263
|
+
gap: string;
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* Block rhythm, two levels like Notion: text blocks (paragraphs, lists, quotes,
|
|
267
|
+
* toggles) sit close (`gap` + `paddingY`); every boxed/media block (code, callout,
|
|
268
|
+
* table, image, embed, HTML, file, math, TOC, columns) uses `boxSpacing`.
|
|
269
|
+
*/
|
|
270
|
+
block: {
|
|
271
|
+
paddingY: string;
|
|
272
|
+
paddingX: string;
|
|
273
|
+
gap: string;
|
|
274
|
+
boxSpacing: string;
|
|
275
|
+
radius: string;
|
|
276
|
+
minHeight: string;
|
|
277
|
+
/** Tint over any selected block (text, boxes and media alike). */
|
|
278
|
+
selectedBg: string;
|
|
279
|
+
};
|
|
280
|
+
/** Shared look of boxed blocks: code, callout, file rows, upload placeholders, HTML. */
|
|
281
|
+
box: {
|
|
282
|
+
bg: string;
|
|
283
|
+
border: string;
|
|
284
|
+
radius: string;
|
|
285
|
+
padding: string;
|
|
286
|
+
paddingCompact: string;
|
|
287
|
+
/** Header row inside a box (code language + copy, HTML name + tabs). */
|
|
288
|
+
barPadding: string;
|
|
289
|
+
barColor: string;
|
|
290
|
+
barFontSize: string;
|
|
291
|
+
barIconSize: string;
|
|
292
|
+
barButtonSize: string;
|
|
293
|
+
};
|
|
294
|
+
/** Underlined tabs (upload placeholders, HTML Code / Preview). */
|
|
295
|
+
tabs: {
|
|
296
|
+
gap: string;
|
|
297
|
+
fontSize: string;
|
|
298
|
+
color: string;
|
|
299
|
+
activeColor: string;
|
|
300
|
+
indicator: string;
|
|
301
|
+
paddingBottom: string;
|
|
302
|
+
};
|
|
303
|
+
heading: {
|
|
304
|
+
weight: string;
|
|
305
|
+
lineHeight: string;
|
|
306
|
+
h1Size: string;
|
|
307
|
+
h2Size: string;
|
|
308
|
+
h3Size: string;
|
|
309
|
+
h4Size: string;
|
|
310
|
+
h1Margin: string;
|
|
311
|
+
h2Margin: string;
|
|
312
|
+
h3Margin: string;
|
|
313
|
+
h4Margin: string;
|
|
314
|
+
/** Space kept above a heading scrolled to from the outline/TOC (room for sticky app headers). */
|
|
315
|
+
scrollMargin: string;
|
|
316
|
+
};
|
|
317
|
+
link: {
|
|
318
|
+
underline: string;
|
|
319
|
+
underlineHover: string;
|
|
320
|
+
};
|
|
321
|
+
inlineCode: {
|
|
322
|
+
color: string;
|
|
323
|
+
bg: string;
|
|
324
|
+
radius: string;
|
|
325
|
+
fontSize: string;
|
|
326
|
+
padding: string;
|
|
327
|
+
};
|
|
328
|
+
list: {
|
|
329
|
+
indent: string;
|
|
330
|
+
};
|
|
331
|
+
todo: {
|
|
332
|
+
checkSize: string;
|
|
333
|
+
checkColor: string;
|
|
334
|
+
doneColor: string;
|
|
335
|
+
};
|
|
336
|
+
quote: {
|
|
337
|
+
borderWidth: string;
|
|
338
|
+
borderColor: string;
|
|
339
|
+
paddingLeft: string;
|
|
340
|
+
};
|
|
341
|
+
divider: {
|
|
342
|
+
color: string;
|
|
343
|
+
spacing: string;
|
|
344
|
+
};
|
|
345
|
+
callout: {
|
|
346
|
+
gap: string;
|
|
347
|
+
iconSize: string;
|
|
348
|
+
iconBox: string;
|
|
349
|
+
defaultBg: string;
|
|
350
|
+
pickerWidth: string;
|
|
351
|
+
};
|
|
352
|
+
toggle: {
|
|
353
|
+
arrowColor: string;
|
|
354
|
+
buttonSize: string;
|
|
355
|
+
headingArrowOffset: string;
|
|
356
|
+
};
|
|
357
|
+
columns: {
|
|
358
|
+
gap: string;
|
|
359
|
+
};
|
|
360
|
+
code: {
|
|
361
|
+
fontSize: string;
|
|
362
|
+
lineHeight: string;
|
|
363
|
+
};
|
|
364
|
+
table: {
|
|
365
|
+
border: string;
|
|
366
|
+
headerBg: string;
|
|
367
|
+
cellPadding: string;
|
|
368
|
+
cellMinWidth: string;
|
|
369
|
+
selected: string;
|
|
370
|
+
resizeHandle: string;
|
|
371
|
+
};
|
|
372
|
+
media: {
|
|
373
|
+
captionColor: string;
|
|
374
|
+
captionSize: string;
|
|
375
|
+
resizeHandleBg: string;
|
|
376
|
+
errorColor: string;
|
|
377
|
+
};
|
|
378
|
+
dropIndicator: {
|
|
379
|
+
color: string;
|
|
380
|
+
height: string;
|
|
381
|
+
};
|
|
382
|
+
html: {
|
|
383
|
+
/** User HTML usually assumes a white page, also in dark mode. */
|
|
384
|
+
frameBg: string;
|
|
385
|
+
editorBg: string;
|
|
386
|
+
editorFont: string;
|
|
387
|
+
editorFontSize: string;
|
|
388
|
+
editorPadding: string;
|
|
389
|
+
coverBg: string;
|
|
390
|
+
};
|
|
391
|
+
/** Full-screen views (HTML block expand, image zoom). */
|
|
392
|
+
modal: {
|
|
393
|
+
backdrop: string;
|
|
394
|
+
/** Image viewer: darker, so the photo stands out. */
|
|
395
|
+
backdropStrong: string;
|
|
396
|
+
inset: string;
|
|
397
|
+
toolbarOffset: string;
|
|
398
|
+
};
|
|
399
|
+
image: {
|
|
400
|
+
/** Hover toolbar inset from the image's top-right corner. */
|
|
401
|
+
toolbarInset: string;
|
|
402
|
+
menuWidth: string;
|
|
403
|
+
cropDim: string;
|
|
404
|
+
cropBorder: string;
|
|
405
|
+
cropHandle: string;
|
|
406
|
+
cropHandleBg: string;
|
|
407
|
+
cropHandleBorder: string;
|
|
408
|
+
};
|
|
409
|
+
outline: {
|
|
410
|
+
/** Distance from the viewport's right edge and top. */
|
|
411
|
+
right: string;
|
|
412
|
+
top: string;
|
|
413
|
+
barColor: string;
|
|
414
|
+
barActive: string;
|
|
415
|
+
barHeight: string;
|
|
416
|
+
barGap: string;
|
|
417
|
+
barWidth: string;
|
|
418
|
+
panelWidth: string;
|
|
419
|
+
panelMaxHeight: string;
|
|
420
|
+
itemColor: string;
|
|
421
|
+
itemActive: string;
|
|
422
|
+
indent: string;
|
|
423
|
+
};
|
|
424
|
+
tableControls: {
|
|
425
|
+
gripSize: string;
|
|
426
|
+
gripBg: string;
|
|
427
|
+
gripColor: string;
|
|
428
|
+
gripHoverBg: string;
|
|
429
|
+
addSize: string;
|
|
430
|
+
addBg: string;
|
|
431
|
+
addHoverBg: string;
|
|
432
|
+
radius: string;
|
|
433
|
+
};
|
|
434
|
+
toc: {
|
|
435
|
+
itemColor: string;
|
|
436
|
+
itemHover: string;
|
|
437
|
+
indent: string;
|
|
438
|
+
padding: string;
|
|
439
|
+
};
|
|
440
|
+
math: {
|
|
441
|
+
editorWidth: string;
|
|
442
|
+
emptyColor: string;
|
|
443
|
+
};
|
|
444
|
+
emojiMenu: {
|
|
445
|
+
cell: string;
|
|
446
|
+
columns: string;
|
|
447
|
+
size: string;
|
|
448
|
+
};
|
|
449
|
+
file: {
|
|
450
|
+
sizeColor: string;
|
|
451
|
+
};
|
|
452
|
+
mention: {
|
|
453
|
+
color: string;
|
|
454
|
+
bg: string;
|
|
455
|
+
hoverBg: string;
|
|
456
|
+
radius: string;
|
|
457
|
+
padding: string;
|
|
458
|
+
pageUnderline: string;
|
|
459
|
+
avatarRadius: string;
|
|
460
|
+
avatarSize: string;
|
|
461
|
+
popoverWidth: string;
|
|
462
|
+
};
|
|
463
|
+
datepicker: {
|
|
464
|
+
width: string;
|
|
465
|
+
cell: string;
|
|
466
|
+
todayColor: string;
|
|
467
|
+
selectedBg: string;
|
|
468
|
+
selectedText: string;
|
|
469
|
+
rangeBg: string;
|
|
470
|
+
outsideColor: string;
|
|
471
|
+
inputBg: string;
|
|
472
|
+
};
|
|
473
|
+
switch: {
|
|
474
|
+
width: string;
|
|
475
|
+
height: string;
|
|
476
|
+
knob: string;
|
|
477
|
+
off: string;
|
|
478
|
+
on: string;
|
|
479
|
+
knobColor: string;
|
|
480
|
+
};
|
|
481
|
+
unknown: {
|
|
482
|
+
color: string;
|
|
483
|
+
invalidBorder: string;
|
|
484
|
+
invalidColor: string;
|
|
485
|
+
};
|
|
486
|
+
/** Handle tooltip and toast: dark in both modes, like Notion. */
|
|
487
|
+
tooltip: {
|
|
488
|
+
bg: string;
|
|
489
|
+
text: string;
|
|
490
|
+
hint: string;
|
|
491
|
+
radius: string;
|
|
492
|
+
padding: string;
|
|
493
|
+
fontSize: string;
|
|
494
|
+
offset: string;
|
|
495
|
+
shadow: string;
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
/** Everything a consumer can override, with autocomplete. */
|
|
499
|
+
export interface ThemeTokens {
|
|
500
|
+
color?: Partial<Record<keyof typeof semanticLight.color, string>>;
|
|
501
|
+
shadow?: Partial<Record<keyof typeof semanticLight.shadow, string>>;
|
|
502
|
+
palette?: Partial<Record<PaletteName, {
|
|
503
|
+
text?: string;
|
|
504
|
+
bg?: string;
|
|
505
|
+
}>>;
|
|
506
|
+
syntax?: Partial<Record<keyof typeof semanticLight.syntax, string>>;
|
|
507
|
+
font?: Partial<Record<keyof typeof semanticBase.font, string>>;
|
|
508
|
+
radius?: Partial<Record<keyof typeof semanticBase.radius, string>>;
|
|
509
|
+
/** Per-part knobs, e.g. `{ menu: { itemRadius: '8px' } }`. */
|
|
510
|
+
components?: {
|
|
511
|
+
[G in keyof typeof component]?: Partial<Record<keyof typeof component[G], string>>;
|
|
512
|
+
};
|
|
513
|
+
/** Overrides applied only in dark mode. */
|
|
514
|
+
dark?: Pick<ThemeTokens, 'color' | 'shadow' | 'palette' | 'syntax'>;
|
|
515
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toantranmei/editor",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Notion-style block editor for Vue 3 and Nuxt, built on Tiptap.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vue",
|
|
7
|
+
"nuxt",
|
|
8
|
+
"tiptap",
|
|
9
|
+
"editor",
|
|
10
|
+
"notion",
|
|
11
|
+
"block-editor",
|
|
12
|
+
"rich-text",
|
|
13
|
+
"prosemirror"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "toantranmei",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/toantranmei/editor.git",
|
|
20
|
+
"directory": "packages/editor"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/toantranmei/editor#readme",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/toantranmei/editor/issues"
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"module": "./dist/index.js",
|
|
34
|
+
"types": "./dist/types/index.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/types/index.d.ts",
|
|
38
|
+
"import": "./dist/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./nuxt": {
|
|
41
|
+
"types": "./dist/types/nuxt.d.ts",
|
|
42
|
+
"import": "./dist/nuxt.js"
|
|
43
|
+
},
|
|
44
|
+
"./style.css": "./dist/style.css"
|
|
45
|
+
},
|
|
46
|
+
"sideEffects": [
|
|
47
|
+
"**/*.css"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "node scripts/check-styles.mjs && vite build && vue-tsc -p tsconfig.build.json && node scripts/check-deps.mjs",
|
|
51
|
+
"dev": "vite build --watch",
|
|
52
|
+
"typecheck": "vue-tsc --noEmit -p tsconfig.json",
|
|
53
|
+
"check:deps": "node scripts/check-deps.mjs",
|
|
54
|
+
"check:styles": "node scripts/check-styles.mjs",
|
|
55
|
+
"prepublishOnly": "pnpm run build"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@nuxt/kit": "^4.0.0",
|
|
59
|
+
"katex": "^0.19.1",
|
|
60
|
+
"mermaid": "^12.2.0",
|
|
61
|
+
"vue": "^3.5.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependenciesMeta": {
|
|
64
|
+
"@nuxt/kit": {
|
|
65
|
+
"optional": true
|
|
66
|
+
},
|
|
67
|
+
"katex": {
|
|
68
|
+
"optional": true
|
|
69
|
+
},
|
|
70
|
+
"mermaid": {
|
|
71
|
+
"optional": true
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@floating-ui/dom": "^1.7.0",
|
|
76
|
+
"@lucide/vue": "^1.61.0",
|
|
77
|
+
"@tiptap/core": "3.32.0",
|
|
78
|
+
"@tiptap/extension-blockquote": "3.32.0",
|
|
79
|
+
"@tiptap/extension-code-block": "3.32.0",
|
|
80
|
+
"@tiptap/extension-code-block-lowlight": "3.32.0",
|
|
81
|
+
"@tiptap/extension-collaboration": "3.32.0",
|
|
82
|
+
"@tiptap/extension-details": "3.32.0",
|
|
83
|
+
"@tiptap/extension-drag-handle": "3.32.0",
|
|
84
|
+
"@tiptap/extension-drag-handle-vue-3": "3.32.0",
|
|
85
|
+
"@tiptap/extension-heading": "3.32.0",
|
|
86
|
+
"@tiptap/extension-horizontal-rule": "3.32.0",
|
|
87
|
+
"@tiptap/extension-image": "3.32.0",
|
|
88
|
+
"@tiptap/extension-list": "3.32.0",
|
|
89
|
+
"@tiptap/extension-mention": "3.32.0",
|
|
90
|
+
"@tiptap/extension-node-range": "3.32.0",
|
|
91
|
+
"@tiptap/extension-table": "3.32.0",
|
|
92
|
+
"@tiptap/extension-text-style": "3.32.0",
|
|
93
|
+
"@tiptap/extensions": "3.32.0",
|
|
94
|
+
"@tiptap/pm": "3.32.0",
|
|
95
|
+
"@tiptap/starter-kit": "3.32.0",
|
|
96
|
+
"@tiptap/suggestion": "3.32.0",
|
|
97
|
+
"@tiptap/vue-3": "3.32.0",
|
|
98
|
+
"@tiptap/y-tiptap": "^3.0.7",
|
|
99
|
+
"emojibase-data": "^18.0.0",
|
|
100
|
+
"highlight.js": "^11.11.0",
|
|
101
|
+
"lowlight": "^3.3.0",
|
|
102
|
+
"y-protocols": "^1.0.6",
|
|
103
|
+
"yjs": "^13.6.0"
|
|
104
|
+
},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@nuxt/kit": "^4.6.2",
|
|
107
|
+
"@nuxt/schema": "^4.6.2",
|
|
108
|
+
"@types/node": "^26.6.5",
|
|
109
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
110
|
+
"katex": "^0.19.1",
|
|
111
|
+
"mermaid": "^12.2.0",
|
|
112
|
+
"typescript": "~5.9.3",
|
|
113
|
+
"vite": "^8.3.5",
|
|
114
|
+
"vue": "^3.5.0",
|
|
115
|
+
"vue-tsc": "^3.0.0"
|
|
116
|
+
},
|
|
117
|
+
"publishConfig": {
|
|
118
|
+
"access": "public"
|
|
119
|
+
},
|
|
120
|
+
"engines": {
|
|
121
|
+
"node": ">=20"
|
|
122
|
+
}
|
|
123
|
+
}
|