@toantranmei/editor 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 +363 -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 +119 -3
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
// src/theme/define.ts
|
|
2
|
+
var e = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), t = (t) => `--me-${t.split(".").map(e).join("-")}`, n = (e) => `var(${t(e)})`;
|
|
3
|
+
function r(e, n = "") {
|
|
4
|
+
return Object.entries(e).flatMap(([e, i]) => {
|
|
5
|
+
let a = n ? `${n}.${e}` : e;
|
|
6
|
+
return typeof i == "string" ? [[t(a), i]] : r(i, a);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
var i = (e) => e.map(([e, t]) => `${e}:${t};`).join(""), a = [
|
|
10
|
+
"gray",
|
|
11
|
+
"brown",
|
|
12
|
+
"orange",
|
|
13
|
+
"yellow",
|
|
14
|
+
"green",
|
|
15
|
+
"blue",
|
|
16
|
+
"purple",
|
|
17
|
+
"pink",
|
|
18
|
+
"red"
|
|
19
|
+
], o = {
|
|
20
|
+
white: "#ffffff",
|
|
21
|
+
black: "#000000",
|
|
22
|
+
gray: {
|
|
23
|
+
50: "#f7f6f3",
|
|
24
|
+
100: "#f1f1ef",
|
|
25
|
+
200: "#e9e9e7",
|
|
26
|
+
300: "#d4d4d4",
|
|
27
|
+
400: "#9b9a97",
|
|
28
|
+
500: "#787774",
|
|
29
|
+
800: "#37352f",
|
|
30
|
+
850: "#2f2f2f",
|
|
31
|
+
900: "#252525",
|
|
32
|
+
925: "#202020",
|
|
33
|
+
950: "#191919"
|
|
34
|
+
},
|
|
35
|
+
azure: {
|
|
36
|
+
400: "#4a9ff5",
|
|
37
|
+
500: "#2383e2",
|
|
38
|
+
600: "#0077d4"
|
|
39
|
+
},
|
|
40
|
+
tint: {
|
|
41
|
+
gray: {
|
|
42
|
+
lightText: "#787774",
|
|
43
|
+
lightBg: "#f1f1ef",
|
|
44
|
+
darkText: "#9b9b9b",
|
|
45
|
+
darkBg: "#2f2f2f"
|
|
46
|
+
},
|
|
47
|
+
brown: {
|
|
48
|
+
lightText: "#9f6b53",
|
|
49
|
+
lightBg: "#f4eeee",
|
|
50
|
+
darkText: "#ba856f",
|
|
51
|
+
darkBg: "#4a3228"
|
|
52
|
+
},
|
|
53
|
+
orange: {
|
|
54
|
+
lightText: "#d9730d",
|
|
55
|
+
lightBg: "#fbecdd",
|
|
56
|
+
darkText: "#c77d48",
|
|
57
|
+
darkBg: "#5c3b23"
|
|
58
|
+
},
|
|
59
|
+
yellow: {
|
|
60
|
+
lightText: "#cb912f",
|
|
61
|
+
lightBg: "#fbf3db",
|
|
62
|
+
darkText: "#ca984d",
|
|
63
|
+
darkBg: "#564328"
|
|
64
|
+
},
|
|
65
|
+
green: {
|
|
66
|
+
lightText: "#448361",
|
|
67
|
+
lightBg: "#edf3ec",
|
|
68
|
+
darkText: "#529e72",
|
|
69
|
+
darkBg: "#243d30"
|
|
70
|
+
},
|
|
71
|
+
blue: {
|
|
72
|
+
lightText: "#337ea9",
|
|
73
|
+
lightBg: "#e7f3f8",
|
|
74
|
+
darkText: "#5e87c9",
|
|
75
|
+
darkBg: "#143a4e"
|
|
76
|
+
},
|
|
77
|
+
purple: {
|
|
78
|
+
lightText: "#9065b0",
|
|
79
|
+
lightBg: "#f6f3f9",
|
|
80
|
+
darkText: "#9d68d3",
|
|
81
|
+
darkBg: "#3c2d49"
|
|
82
|
+
},
|
|
83
|
+
pink: {
|
|
84
|
+
lightText: "#c14c8a",
|
|
85
|
+
lightBg: "#faf1f5",
|
|
86
|
+
darkText: "#d15796",
|
|
87
|
+
darkBg: "#4e2c3c"
|
|
88
|
+
},
|
|
89
|
+
red: {
|
|
90
|
+
lightText: "#d44c47",
|
|
91
|
+
lightBg: "#fdebec",
|
|
92
|
+
darkText: "#df5452",
|
|
93
|
+
darkBg: "#522e2a"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
space: {
|
|
97
|
+
0: "0",
|
|
98
|
+
1: "2px",
|
|
99
|
+
2: "4px",
|
|
100
|
+
3: "6px",
|
|
101
|
+
4: "8px",
|
|
102
|
+
5: "12px",
|
|
103
|
+
6: "14px",
|
|
104
|
+
7: "16px",
|
|
105
|
+
8: "24px",
|
|
106
|
+
9: "32px"
|
|
107
|
+
},
|
|
108
|
+
rounded: {
|
|
109
|
+
xs: "3px",
|
|
110
|
+
sm: "4px",
|
|
111
|
+
md: "6px",
|
|
112
|
+
lg: "8px",
|
|
113
|
+
full: "9999px"
|
|
114
|
+
},
|
|
115
|
+
fontSize: {
|
|
116
|
+
xs: "12px",
|
|
117
|
+
sm: "14px",
|
|
118
|
+
md: "16px",
|
|
119
|
+
lg: "20px"
|
|
120
|
+
},
|
|
121
|
+
fontWeight: {
|
|
122
|
+
regular: "400",
|
|
123
|
+
medium: "500",
|
|
124
|
+
semibold: "600"
|
|
125
|
+
},
|
|
126
|
+
lineHeight: {
|
|
127
|
+
tight: "1.2",
|
|
128
|
+
snug: "1.3",
|
|
129
|
+
normal: "1.5",
|
|
130
|
+
relaxed: "1.6"
|
|
131
|
+
},
|
|
132
|
+
borderWidth: {
|
|
133
|
+
thin: "1px",
|
|
134
|
+
medium: "2px",
|
|
135
|
+
thick: "3px",
|
|
136
|
+
heavy: "4px"
|
|
137
|
+
},
|
|
138
|
+
duration: {
|
|
139
|
+
fast: "120ms",
|
|
140
|
+
normal: "150ms"
|
|
141
|
+
},
|
|
142
|
+
fontFamily: {
|
|
143
|
+
sans: "ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, \"Apple Color Emoji\", Arial, sans-serif, \"Segoe UI Emoji\"",
|
|
144
|
+
mono: "\"SFMono-Regular\", Menlo, Consolas, monospace"
|
|
145
|
+
}
|
|
146
|
+
}, s = (e) => Object.fromEntries(a.map((t) => [t, {
|
|
147
|
+
text: n(`tint.${t}.${e}Text`),
|
|
148
|
+
bg: n(`tint.${t}.${e}Bg`)
|
|
149
|
+
}])), c = {
|
|
150
|
+
font: {
|
|
151
|
+
sans: n("fontFamily.sans"),
|
|
152
|
+
mono: n("fontFamily.mono"),
|
|
153
|
+
size: n("fontSize.md"),
|
|
154
|
+
lineHeight: n("lineHeight.normal")
|
|
155
|
+
},
|
|
156
|
+
radius: {
|
|
157
|
+
sm: n("rounded.sm"),
|
|
158
|
+
md: n("rounded.md"),
|
|
159
|
+
lg: n("rounded.lg")
|
|
160
|
+
}
|
|
161
|
+
}, l = {
|
|
162
|
+
color: {
|
|
163
|
+
text: n("gray.800"),
|
|
164
|
+
textMuted: n("gray.500"),
|
|
165
|
+
textFaint: n("gray.400"),
|
|
166
|
+
bg: n("white"),
|
|
167
|
+
elevated: n("white"),
|
|
168
|
+
surface: n("gray.50"),
|
|
169
|
+
hover: "rgba(55, 53, 47, 0.08)",
|
|
170
|
+
border: n("gray.200"),
|
|
171
|
+
accent: n("azure.500"),
|
|
172
|
+
accentHover: n("azure.600"),
|
|
173
|
+
onAccent: n("white"),
|
|
174
|
+
selection: "rgba(35, 131, 226, 0.28)",
|
|
175
|
+
blockSelected: "rgba(35, 131, 226, 0.14)",
|
|
176
|
+
danger: n("tint.red.lightText"),
|
|
177
|
+
handle: "#b9b9b7",
|
|
178
|
+
inlineCodeText: "#eb5757",
|
|
179
|
+
inlineCodeBg: "rgba(135, 131, 120, 0.15)",
|
|
180
|
+
overlay: "rgba(0, 0, 0, 0.5)"
|
|
181
|
+
},
|
|
182
|
+
shadow: { popover: "rgba(15, 15, 15, 0.05) 0 0 0 1px, rgba(15, 15, 15, 0.1) 0 3px 6px, rgba(15, 15, 15, 0.2) 0 9px 24px" },
|
|
183
|
+
palette: s("light"),
|
|
184
|
+
syntax: {
|
|
185
|
+
comment: "#8e908c",
|
|
186
|
+
keyword: "#8959a8",
|
|
187
|
+
string: "#718c00",
|
|
188
|
+
number: "#f5871f",
|
|
189
|
+
title: "#4271ae",
|
|
190
|
+
variable: "#c82829",
|
|
191
|
+
meta: "#3e999f"
|
|
192
|
+
}
|
|
193
|
+
}, u = {
|
|
194
|
+
color: {
|
|
195
|
+
text: n("gray.300"),
|
|
196
|
+
textMuted: "#9b9b9b",
|
|
197
|
+
textFaint: "#7f7f7f",
|
|
198
|
+
bg: n("gray.950"),
|
|
199
|
+
elevated: n("gray.900"),
|
|
200
|
+
surface: n("gray.925"),
|
|
201
|
+
hover: "rgba(255, 255, 255, 0.055)",
|
|
202
|
+
border: n("gray.850"),
|
|
203
|
+
accent: n("azure.400"),
|
|
204
|
+
accentHover: n("azure.500"),
|
|
205
|
+
onAccent: n("white"),
|
|
206
|
+
selection: "rgba(35, 131, 226, 0.4)",
|
|
207
|
+
blockSelected: "rgba(35, 131, 226, 0.22)",
|
|
208
|
+
danger: n("tint.red.darkText"),
|
|
209
|
+
handle: "#5a5a5a",
|
|
210
|
+
inlineCodeText: "#ff7369",
|
|
211
|
+
inlineCodeBg: "rgba(135, 131, 120, 0.15)",
|
|
212
|
+
overlay: "rgba(255, 255, 255, 0.5)"
|
|
213
|
+
},
|
|
214
|
+
shadow: { popover: "rgba(255, 255, 255, 0.094) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 3px 6px, rgba(0, 0, 0, 0.4) 0 9px 24px" },
|
|
215
|
+
palette: s("dark"),
|
|
216
|
+
syntax: {
|
|
217
|
+
comment: "#7f848e",
|
|
218
|
+
keyword: "#c678dd",
|
|
219
|
+
string: "#98c379",
|
|
220
|
+
number: "#d19a66",
|
|
221
|
+
title: "#61afef",
|
|
222
|
+
variable: "#e06c75",
|
|
223
|
+
meta: "#56b6c2"
|
|
224
|
+
}
|
|
225
|
+
}, d = {
|
|
226
|
+
editor: {
|
|
227
|
+
bg: "transparent",
|
|
228
|
+
forcedBg: n("color.bg")
|
|
229
|
+
},
|
|
230
|
+
icon: {
|
|
231
|
+
size: n("fontSize.md"),
|
|
232
|
+
stroke: "1.75"
|
|
233
|
+
},
|
|
234
|
+
popover: {
|
|
235
|
+
bg: n("color.elevated"),
|
|
236
|
+
radius: n("radius.lg"),
|
|
237
|
+
shadow: n("shadow.popover"),
|
|
238
|
+
padding: n("space.2"),
|
|
239
|
+
offset: n("space.4")
|
|
240
|
+
},
|
|
241
|
+
menu: {
|
|
242
|
+
itemGap: n("space.4"),
|
|
243
|
+
itemPaddingX: n("space.4"),
|
|
244
|
+
itemPaddingY: n("space.2"),
|
|
245
|
+
itemRadius: n("radius.md"),
|
|
246
|
+
itemHover: n("color.hover"),
|
|
247
|
+
iconBox: "28px",
|
|
248
|
+
iconRadius: n("radius.md"),
|
|
249
|
+
iconBorder: n("color.border"),
|
|
250
|
+
titleSize: n("fontSize.sm"),
|
|
251
|
+
descriptionSize: n("fontSize.xs"),
|
|
252
|
+
descriptionColor: n("color.textMuted"),
|
|
253
|
+
labelSize: n("fontSize.xs"),
|
|
254
|
+
labelWeight: n("fontWeight.medium"),
|
|
255
|
+
labelColor: n("color.textMuted"),
|
|
256
|
+
shortcutColor: n("color.textFaint"),
|
|
257
|
+
width: "288px",
|
|
258
|
+
submenuWidth: "224px",
|
|
259
|
+
maxHeight: "320px"
|
|
260
|
+
},
|
|
261
|
+
toolbar: {
|
|
262
|
+
buttonSize: "28px",
|
|
263
|
+
buttonRadius: n("radius.sm"),
|
|
264
|
+
buttonHover: n("color.hover"),
|
|
265
|
+
activeColor: n("color.accent"),
|
|
266
|
+
dividerColor: n("color.border"),
|
|
267
|
+
linkFormWidth: "320px"
|
|
268
|
+
},
|
|
269
|
+
button: {
|
|
270
|
+
height: "32px",
|
|
271
|
+
paddingX: n("space.5"),
|
|
272
|
+
radius: n("radius.md"),
|
|
273
|
+
fontSize: n("fontSize.sm"),
|
|
274
|
+
border: n("color.border"),
|
|
275
|
+
bg: n("color.bg"),
|
|
276
|
+
hoverBg: n("color.surface"),
|
|
277
|
+
primaryBg: n("color.accent"),
|
|
278
|
+
primaryHoverBg: n("color.accentHover"),
|
|
279
|
+
primaryText: n("color.onAccent"),
|
|
280
|
+
floatingBg: n("color.elevated"),
|
|
281
|
+
floatingHoverBg: n("color.surface"),
|
|
282
|
+
floatingShadow: n("shadow.popover"),
|
|
283
|
+
disabledOpacity: "0.5"
|
|
284
|
+
},
|
|
285
|
+
input: {
|
|
286
|
+
height: "32px",
|
|
287
|
+
paddingX: n("space.4"),
|
|
288
|
+
radius: n("radius.md"),
|
|
289
|
+
fontSize: n("fontSize.sm"),
|
|
290
|
+
border: n("color.border"),
|
|
291
|
+
focusBorder: n("color.accent"),
|
|
292
|
+
focusRing: "color-mix(in srgb, var(--me-color-accent) 20%, transparent)"
|
|
293
|
+
},
|
|
294
|
+
handle: {
|
|
295
|
+
color: n("color.handle"),
|
|
296
|
+
hoverColor: n("color.textMuted"),
|
|
297
|
+
hoverBg: n("color.hover"),
|
|
298
|
+
buttonWidth: "20px",
|
|
299
|
+
buttonHeight: "24px",
|
|
300
|
+
radius: n("radius.sm"),
|
|
301
|
+
gap: n("space.1")
|
|
302
|
+
},
|
|
303
|
+
block: {
|
|
304
|
+
paddingY: "3px",
|
|
305
|
+
paddingX: n("space.1"),
|
|
306
|
+
gap: "1px",
|
|
307
|
+
boxSpacing: n("space.4"),
|
|
308
|
+
radius: n("radius.sm"),
|
|
309
|
+
minHeight: "calc(var(--me-font-line-height) * 1em)",
|
|
310
|
+
selectedBg: n("color.blockSelected")
|
|
311
|
+
},
|
|
312
|
+
box: {
|
|
313
|
+
bg: n("color.surface"),
|
|
314
|
+
border: n("color.border"),
|
|
315
|
+
radius: n("radius.md"),
|
|
316
|
+
padding: "12px 16px",
|
|
317
|
+
paddingCompact: "6px 10px",
|
|
318
|
+
barPadding: "8px 10px 0 14px",
|
|
319
|
+
barColor: n("color.textMuted"),
|
|
320
|
+
barFontSize: n("fontSize.xs"),
|
|
321
|
+
barIconSize: n("fontSize.sm"),
|
|
322
|
+
barButtonSize: "24px"
|
|
323
|
+
},
|
|
324
|
+
tabs: {
|
|
325
|
+
gap: n("space.7"),
|
|
326
|
+
fontSize: n("fontSize.sm"),
|
|
327
|
+
color: n("color.textMuted"),
|
|
328
|
+
activeColor: n("color.text"),
|
|
329
|
+
indicator: n("borderWidth.medium"),
|
|
330
|
+
paddingBottom: n("space.4")
|
|
331
|
+
},
|
|
332
|
+
heading: {
|
|
333
|
+
weight: n("fontWeight.semibold"),
|
|
334
|
+
lineHeight: n("lineHeight.snug"),
|
|
335
|
+
h1Size: "1.875em",
|
|
336
|
+
h2Size: "1.5em",
|
|
337
|
+
h3Size: "1.25em",
|
|
338
|
+
h4Size: "1.1em",
|
|
339
|
+
h1Margin: "1.1em",
|
|
340
|
+
h2Margin: "0.9em",
|
|
341
|
+
h3Margin: "0.6em",
|
|
342
|
+
h4Margin: "0.5em",
|
|
343
|
+
scrollMargin: "80px"
|
|
344
|
+
},
|
|
345
|
+
link: {
|
|
346
|
+
underline: "color-mix(in srgb, var(--me-color-text) 40%, transparent)",
|
|
347
|
+
underlineHover: n("color.text")
|
|
348
|
+
},
|
|
349
|
+
inlineCode: {
|
|
350
|
+
color: n("color.inlineCodeText"),
|
|
351
|
+
bg: n("color.inlineCodeBg"),
|
|
352
|
+
radius: n("radius.sm"),
|
|
353
|
+
fontSize: "85%",
|
|
354
|
+
padding: "0.2em 0.4em"
|
|
355
|
+
},
|
|
356
|
+
list: { indent: "1.6em" },
|
|
357
|
+
todo: {
|
|
358
|
+
checkSize: n("fontSize.md"),
|
|
359
|
+
checkColor: n("color.accent"),
|
|
360
|
+
doneColor: n("color.textFaint")
|
|
361
|
+
},
|
|
362
|
+
quote: {
|
|
363
|
+
borderWidth: n("borderWidth.thick"),
|
|
364
|
+
borderColor: "currentColor",
|
|
365
|
+
paddingLeft: n("space.6")
|
|
366
|
+
},
|
|
367
|
+
divider: {
|
|
368
|
+
color: n("color.border"),
|
|
369
|
+
spacing: n("space.6")
|
|
370
|
+
},
|
|
371
|
+
callout: {
|
|
372
|
+
gap: n("space.4"),
|
|
373
|
+
iconSize: n("fontSize.lg"),
|
|
374
|
+
iconBox: "28px",
|
|
375
|
+
defaultBg: n("palette.gray.bg"),
|
|
376
|
+
pickerWidth: "240px"
|
|
377
|
+
},
|
|
378
|
+
toggle: {
|
|
379
|
+
arrowColor: n("color.text"),
|
|
380
|
+
buttonSize: "24px",
|
|
381
|
+
headingArrowOffset: "calc(var(--me-block-padding-y) + 0.15em)"
|
|
382
|
+
},
|
|
383
|
+
columns: { gap: n("space.9") },
|
|
384
|
+
code: {
|
|
385
|
+
fontSize: "85%",
|
|
386
|
+
lineHeight: n("lineHeight.relaxed")
|
|
387
|
+
},
|
|
388
|
+
table: {
|
|
389
|
+
border: n("color.border"),
|
|
390
|
+
headerBg: n("color.surface"),
|
|
391
|
+
cellPadding: "6px 8px",
|
|
392
|
+
cellMinWidth: "80px",
|
|
393
|
+
selected: n("color.blockSelected"),
|
|
394
|
+
resizeHandle: n("color.accent")
|
|
395
|
+
},
|
|
396
|
+
media: {
|
|
397
|
+
captionColor: n("color.textMuted"),
|
|
398
|
+
captionSize: n("fontSize.sm"),
|
|
399
|
+
resizeHandleBg: n("color.overlay"),
|
|
400
|
+
errorColor: n("color.danger")
|
|
401
|
+
},
|
|
402
|
+
dropIndicator: {
|
|
403
|
+
color: "rgba(35, 131, 226, 0.5)",
|
|
404
|
+
height: n("borderWidth.heavy")
|
|
405
|
+
},
|
|
406
|
+
html: {
|
|
407
|
+
frameBg: "#fff",
|
|
408
|
+
editorBg: n("color.bg"),
|
|
409
|
+
editorFont: n("font.mono"),
|
|
410
|
+
editorFontSize: "13px",
|
|
411
|
+
editorPadding: n("space.5"),
|
|
412
|
+
coverBg: "rgba(15, 15, 15, 0.08)"
|
|
413
|
+
},
|
|
414
|
+
modal: {
|
|
415
|
+
backdrop: "rgba(15, 15, 15, 0.6)",
|
|
416
|
+
backdropStrong: "rgba(15, 15, 15, 0.88)",
|
|
417
|
+
inset: "4vh 4vw",
|
|
418
|
+
toolbarOffset: n("space.7")
|
|
419
|
+
},
|
|
420
|
+
image: {
|
|
421
|
+
toolbarInset: n("space.3"),
|
|
422
|
+
menuWidth: "208px",
|
|
423
|
+
cropDim: "rgba(15, 15, 15, 0.55)",
|
|
424
|
+
cropBorder: n("white"),
|
|
425
|
+
cropHandle: "10px",
|
|
426
|
+
cropHandleBg: n("white"),
|
|
427
|
+
cropHandleBorder: "rgba(15, 15, 15, 0.35)"
|
|
428
|
+
},
|
|
429
|
+
outline: {
|
|
430
|
+
right: n("space.7"),
|
|
431
|
+
top: "30vh",
|
|
432
|
+
barColor: n("color.border"),
|
|
433
|
+
barActive: n("color.textMuted"),
|
|
434
|
+
barHeight: n("borderWidth.medium"),
|
|
435
|
+
barGap: n("space.3"),
|
|
436
|
+
barWidth: "16px",
|
|
437
|
+
panelWidth: "240px",
|
|
438
|
+
panelMaxHeight: "60vh",
|
|
439
|
+
itemColor: n("color.textMuted"),
|
|
440
|
+
itemActive: n("color.accent"),
|
|
441
|
+
indent: n("space.5")
|
|
442
|
+
},
|
|
443
|
+
tableControls: {
|
|
444
|
+
gripSize: "12px",
|
|
445
|
+
gripBg: n("color.elevated"),
|
|
446
|
+
gripColor: n("color.textFaint"),
|
|
447
|
+
gripHoverBg: n("color.hover"),
|
|
448
|
+
addSize: "18px",
|
|
449
|
+
addBg: n("color.surface"),
|
|
450
|
+
addHoverBg: n("color.hover"),
|
|
451
|
+
radius: n("radius.sm")
|
|
452
|
+
},
|
|
453
|
+
toc: {
|
|
454
|
+
itemColor: n("color.textMuted"),
|
|
455
|
+
itemHover: n("color.hover"),
|
|
456
|
+
indent: n("space.7"),
|
|
457
|
+
padding: n("space.2")
|
|
458
|
+
},
|
|
459
|
+
math: {
|
|
460
|
+
editorWidth: "360px",
|
|
461
|
+
emptyColor: n("color.textFaint")
|
|
462
|
+
},
|
|
463
|
+
emojiMenu: {
|
|
464
|
+
cell: "32px",
|
|
465
|
+
columns: "8",
|
|
466
|
+
size: n("fontSize.lg")
|
|
467
|
+
},
|
|
468
|
+
file: { sizeColor: n("color.textFaint") },
|
|
469
|
+
mention: {
|
|
470
|
+
color: n("color.text"),
|
|
471
|
+
bg: n("color.hover"),
|
|
472
|
+
hoverBg: "color-mix(in srgb, var(--me-color-text) 14%, transparent)",
|
|
473
|
+
radius: n("radius.sm"),
|
|
474
|
+
padding: "0 3px",
|
|
475
|
+
pageUnderline: n("color.textFaint"),
|
|
476
|
+
avatarRadius: n("rounded.full"),
|
|
477
|
+
avatarSize: "1.1em",
|
|
478
|
+
popoverWidth: "280px"
|
|
479
|
+
},
|
|
480
|
+
datepicker: {
|
|
481
|
+
width: "264px",
|
|
482
|
+
cell: "34px",
|
|
483
|
+
todayColor: n("color.accent"),
|
|
484
|
+
selectedBg: n("color.accent"),
|
|
485
|
+
selectedText: n("color.onAccent"),
|
|
486
|
+
rangeBg: "color-mix(in srgb, var(--me-color-accent) 18%, transparent)",
|
|
487
|
+
outsideColor: n("color.textFaint"),
|
|
488
|
+
inputBg: n("color.surface")
|
|
489
|
+
},
|
|
490
|
+
switch: {
|
|
491
|
+
width: "28px",
|
|
492
|
+
height: "16px",
|
|
493
|
+
knob: "12px",
|
|
494
|
+
off: n("color.border"),
|
|
495
|
+
on: n("color.accent"),
|
|
496
|
+
knobColor: n("color.bg")
|
|
497
|
+
},
|
|
498
|
+
unknown: {
|
|
499
|
+
color: n("color.textMuted"),
|
|
500
|
+
invalidBorder: n("palette.red.text"),
|
|
501
|
+
invalidColor: n("palette.red.text")
|
|
502
|
+
},
|
|
503
|
+
tooltip: {
|
|
504
|
+
bg: "#0f0f0f",
|
|
505
|
+
text: "rgba(255, 255, 255, 0.9)",
|
|
506
|
+
hint: "rgba(206, 205, 202, 0.6)",
|
|
507
|
+
radius: n("radius.sm"),
|
|
508
|
+
padding: "4px 8px",
|
|
509
|
+
fontSize: n("fontSize.xs"),
|
|
510
|
+
offset: n("space.3"),
|
|
511
|
+
shadow: "rgba(15, 15, 15, 0.1) 0 3px 6px"
|
|
512
|
+
}
|
|
513
|
+
}, f = [
|
|
514
|
+
"default",
|
|
515
|
+
"heading",
|
|
516
|
+
"bulletList",
|
|
517
|
+
"orderedList",
|
|
518
|
+
"taskList",
|
|
519
|
+
"quote",
|
|
520
|
+
"divider",
|
|
521
|
+
"codeBlock",
|
|
522
|
+
"image",
|
|
523
|
+
"embed",
|
|
524
|
+
"callout",
|
|
525
|
+
"toggle",
|
|
526
|
+
"toggleHeading",
|
|
527
|
+
"table",
|
|
528
|
+
"columns",
|
|
529
|
+
"toc",
|
|
530
|
+
"math",
|
|
531
|
+
"mermaid",
|
|
532
|
+
"emoji",
|
|
533
|
+
"file",
|
|
534
|
+
"mention"
|
|
535
|
+
], p = {
|
|
536
|
+
math: "katex",
|
|
537
|
+
mermaid: "mermaid"
|
|
538
|
+
}, m = "mei-editor", h = `@layer theme, base, ${m}, components, utilities;`, g = (e) => [`html.dark ${e}:not(.me-light)`, `${e}.me-dark`];
|
|
539
|
+
function _() {
|
|
540
|
+
let e = [
|
|
541
|
+
...r(o),
|
|
542
|
+
...r(c),
|
|
543
|
+
...r(l),
|
|
544
|
+
...r(d)
|
|
545
|
+
], t = r(u), n = a.map((e) => [
|
|
546
|
+
`:where(.me-scope) [data-text-color="${e}"]{color:var(--me-palette-${e}-text);}`,
|
|
547
|
+
`:where(.me-scope) [data-bg-color="${e}"]{background-color:var(--me-palette-${e}-bg);}`,
|
|
548
|
+
`:where(.me-scope) [data-color="${e}"]{--me-tint-text:var(--me-palette-${e}-text);--me-tint-bg:var(--me-palette-${e}-bg);}`
|
|
549
|
+
].join("\n")).join("\n");
|
|
550
|
+
return [
|
|
551
|
+
h,
|
|
552
|
+
`@layer ${m} {`,
|
|
553
|
+
`:where(.me-scope){${i(e)}}`,
|
|
554
|
+
`${g(".me-scope").map((e) => `:where(${e})`).join(",")}{${i(t)}}`,
|
|
555
|
+
n,
|
|
556
|
+
"}"
|
|
557
|
+
].join("\n");
|
|
558
|
+
}
|
|
559
|
+
function v(e) {
|
|
560
|
+
let { components: t, ...n } = e;
|
|
561
|
+
return [...r(n), ...r(t ?? {})];
|
|
562
|
+
}
|
|
563
|
+
function y(e, t = ".me-scope") {
|
|
564
|
+
if (!e) return "";
|
|
565
|
+
let { dark: n, ...r } = e, a = v(r), o = n ? v(n) : [];
|
|
566
|
+
return [a.length ? `${t}{${i(a)}}` : "", o.length ? `${g(t).join(",")}{${i(o)}}` : ""].filter(Boolean).join("\n");
|
|
567
|
+
}
|
|
568
|
+
function b(e, t) {
|
|
569
|
+
if (typeof document > "u") return;
|
|
570
|
+
let n = document.getElementById(e);
|
|
571
|
+
if (!t) return n?.remove();
|
|
572
|
+
n || (n = document.createElement("style"), n.id = e, e === x ? document.head.prepend(n) : document.head.appendChild(n)), n.textContent !== t && (n.textContent = t);
|
|
573
|
+
}
|
|
574
|
+
var x = "mei-editor-tokens";
|
|
575
|
+
function S() {
|
|
576
|
+
typeof document > "u" || document.getElementById(x) || b(x, _());
|
|
577
|
+
}
|
|
578
|
+
export { f as a, d as c, l as d, t as f, y as i, o as l, b as n, p as o, S as r, a as s, _ as t, u };
|
|
579
|
+
|
|
580
|
+
//# sourceMappingURL=css-CaicG2fA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-CaicG2fA.js","names":["r","kebab","s","cssVar","path","ref","flatten","tree","key","value","prefix","declarations","pairs","k","v","PALETTE_NAMES","primitive","palette","name","mode","semanticBase","semanticLight","semanticDark","component","BLOCK_NAMES","BLOCK_PEERS","LAYER","LAYER_ORDER","darkSelectors","scope","baseTokensCss","light","dark","tints","overridePairs","semantic","tokens","components","overridesCss","rest","darkPairs","injectStyle","el","id","css","BASE_STYLE_ID","installBaseTokens"],"sources":["../src/theme/define.ts","../src/theme/tokens.ts","../src/block-names.ts","../src/theme/css.ts"],"sourcesContent":["/** Helpers to turn token objects into CSS custom properties. No values live here. */\n\nexport interface TokenTree { [key: string]: string | TokenTree }\n\nexport type DeepPartial<T> = { [K in keyof T]?: T[K] extends string ? string : DeepPartial<T[K]> }\n\n/** Loosens literal string types so token objects can be compared/overridden. */\nexport type Widen<T> = { [K in keyof T]: T[K] extends string ? string : Widen<T[K]> }\n\nconst kebab = (s: string) => s.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase()\n\n/** `'menu.itemHeight'` → `'--me-menu-item-height'` */\nexport const cssVar = (path: string) => `--me-${path.split('.').map(kebab).join('-')}`\n\n/** Reference another token: `ref('color.text')` → `'var(--me-color-text)'` */\nexport const ref = (path: string) => `var(${cssVar(path)})`\n\n/** Flattens a token tree into `[cssVarName, value]` pairs. */\nexport function flatten(tree: TokenTree, prefix = ''): [string, string][] {\n return Object.entries(tree).flatMap(([key, value]) => {\n const path = prefix ? `${prefix}.${key}` : key\n return typeof value === 'string' ? [[cssVar(path), value] as [string, string]] : flatten(value, path)\n })\n}\n\nexport const declarations = (pairs: [string, string][]) => pairs.map(([k, v]) => `${k}:${v};`).join('')\n","/**\n * ─────────────────────────────────────────────────────────────────────────────\n * THE single source of every visual value in @toantranmei/editor.\n * Stylesheets in src/styles only reference these tokens via var(--me-…);\n * `pnpm check:styles` fails the build if a raw value sneaks in elsewhere.\n *\n * Three tiers:\n * 1. primitive – raw values (colors, scales). Only referenced by tiers 2–3.\n * 2. semantic – meaning (text, surface, accent…). Has light + dark variants.\n * 3. component – per-part knobs (menu item height, callout padding…).\n *\n * CSS variable name = `--me-` + path in kebab-case, e.g. component.menu.itemHeight\n * → --me-menu-item-height, semantic color.textMuted → --me-color-text-muted.\n * ─────────────────────────────────────────────────────────────────────────────\n */\nimport { ref as r } from './define'\n\n// ── 1. Primitive ──────────────────────────────────────────────────────────────\n\n/** Notion's content palette. Names are what documents store (`data-text-color=\"red\"`). */\nexport const PALETTE_NAMES = ['gray', 'brown', 'orange', 'yellow', 'green', 'blue', 'purple', 'pink', 'red'] as const\nexport type PaletteName = typeof PALETTE_NAMES[number]\n\nexport const primitive = {\n white: '#ffffff',\n black: '#000000',\n gray: {\n 50: '#f7f6f3',\n 100: '#f1f1ef',\n 200: '#e9e9e7',\n 300: '#d4d4d4',\n 400: '#9b9a97',\n 500: '#787774',\n 800: '#37352f',\n 850: '#2f2f2f',\n 900: '#252525',\n 925: '#202020',\n 950: '#191919',\n },\n azure: { 400: '#4a9ff5', 500: '#2383e2', 600: '#0077d4' },\n /** Content palette: `light`/`dark` × `text`/`bg`. */\n tint: {\n gray: { lightText: '#787774', lightBg: '#f1f1ef', darkText: '#9b9b9b', darkBg: '#2f2f2f' },\n brown: { lightText: '#9f6b53', lightBg: '#f4eeee', darkText: '#ba856f', darkBg: '#4a3228' },\n orange: { lightText: '#d9730d', lightBg: '#fbecdd', darkText: '#c77d48', darkBg: '#5c3b23' },\n yellow: { lightText: '#cb912f', lightBg: '#fbf3db', darkText: '#ca984d', darkBg: '#564328' },\n green: { lightText: '#448361', lightBg: '#edf3ec', darkText: '#529e72', darkBg: '#243d30' },\n blue: { lightText: '#337ea9', lightBg: '#e7f3f8', darkText: '#5e87c9', darkBg: '#143a4e' },\n purple: { lightText: '#9065b0', lightBg: '#f6f3f9', darkText: '#9d68d3', darkBg: '#3c2d49' },\n pink: { lightText: '#c14c8a', lightBg: '#faf1f5', darkText: '#d15796', darkBg: '#4e2c3c' },\n red: { lightText: '#d44c47', lightBg: '#fdebec', darkText: '#df5452', darkBg: '#522e2a' },\n } satisfies Record<PaletteName, Record<string, string>>,\n space: { 0: '0', 1: '2px', 2: '4px', 3: '6px', 4: '8px', 5: '12px', 6: '14px', 7: '16px', 8: '24px', 9: '32px' },\n rounded: { xs: '3px', sm: '4px', md: '6px', lg: '8px', full: '9999px' },\n fontSize: { xs: '12px', sm: '14px', md: '16px', lg: '20px' },\n fontWeight: { regular: '400', medium: '500', semibold: '600' },\n lineHeight: { tight: '1.2', snug: '1.3', normal: '1.5', relaxed: '1.6' },\n borderWidth: { thin: '1px', medium: '2px', thick: '3px', heavy: '4px' },\n duration: { fast: '120ms', normal: '150ms' },\n fontFamily: {\n sans: 'ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, \"Apple Color Emoji\", Arial, sans-serif, \"Segoe UI Emoji\"',\n mono: '\"SFMono-Regular\", Menlo, Consolas, monospace',\n },\n}\n\n// ── 2. Semantic ───────────────────────────────────────────────────────────────\n\nconst palette = (mode: 'light' | 'dark') => Object.fromEntries(PALETTE_NAMES.map(name => [name, {\n text: r(`tint.${name}.${mode}Text`),\n bg: r(`tint.${name}.${mode}Bg`),\n}])) as Record<PaletteName, { text: string, bg: string }>\n\n/** Mode-independent semantic tokens. */\nexport const semanticBase = {\n font: {\n sans: r('fontFamily.sans'),\n mono: r('fontFamily.mono'),\n size: r('fontSize.md'),\n lineHeight: r('lineHeight.normal'),\n },\n radius: { sm: r('rounded.sm'), md: r('rounded.md'), lg: r('rounded.lg') },\n}\n\nexport const semanticLight = {\n color: {\n text: r('gray.800'),\n textMuted: r('gray.500'),\n textFaint: r('gray.400'),\n bg: r('white'),\n elevated: r('white'),\n surface: r('gray.50'),\n hover: 'rgba(55, 53, 47, 0.08)',\n border: r('gray.200'),\n accent: r('azure.500'),\n accentHover: r('azure.600'),\n onAccent: r('white'),\n selection: 'rgba(35, 131, 226, 0.28)',\n blockSelected: 'rgba(35, 131, 226, 0.14)',\n danger: r('tint.red.lightText'),\n handle: '#b9b9b7',\n inlineCodeText: '#eb5757',\n inlineCodeBg: 'rgba(135, 131, 120, 0.15)',\n overlay: 'rgba(0, 0, 0, 0.5)',\n },\n shadow: {\n popover: 'rgba(15, 15, 15, 0.05) 0 0 0 1px, rgba(15, 15, 15, 0.1) 0 3px 6px, rgba(15, 15, 15, 0.2) 0 9px 24px',\n },\n palette: palette('light'),\n syntax: {\n comment: '#8e908c',\n keyword: '#8959a8',\n string: '#718c00',\n number: '#f5871f',\n title: '#4271ae',\n variable: '#c82829',\n meta: '#3e999f',\n },\n}\n\nexport const semanticDark: typeof semanticLight = {\n color: {\n text: r('gray.300'),\n textMuted: '#9b9b9b',\n textFaint: '#7f7f7f',\n bg: r('gray.950'),\n elevated: r('gray.900'),\n surface: r('gray.925'),\n hover: 'rgba(255, 255, 255, 0.055)',\n border: r('gray.850'),\n accent: r('azure.400'),\n accentHover: r('azure.500'),\n onAccent: r('white'),\n selection: 'rgba(35, 131, 226, 0.4)',\n blockSelected: 'rgba(35, 131, 226, 0.22)',\n danger: r('tint.red.darkText'),\n handle: '#5a5a5a',\n inlineCodeText: '#ff7369',\n inlineCodeBg: 'rgba(135, 131, 120, 0.15)',\n overlay: 'rgba(255, 255, 255, 0.5)',\n },\n shadow: {\n popover: 'rgba(255, 255, 255, 0.094) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 3px 6px, rgba(0, 0, 0, 0.4) 0 9px 24px',\n },\n palette: palette('dark'),\n syntax: {\n comment: '#7f848e',\n keyword: '#c678dd',\n string: '#98c379',\n number: '#d19a66',\n title: '#61afef',\n variable: '#e06c75',\n meta: '#56b6c2',\n },\n}\n\n// ── 3. Component ──────────────────────────────────────────────────────────────\n\nexport const component = {\n /** Editor root. `bg` is transparent so it blends into the page; a forced mode paints `forcedBg`. */\n editor: { bg: 'transparent', forcedBg: r('color.bg') },\n icon: { size: r('fontSize.md'), stroke: '1.75' },\n popover: { bg: r('color.elevated'), radius: r('radius.lg'), shadow: r('shadow.popover'), padding: r('space.2'), offset: r('space.4') },\n menu: {\n itemGap: r('space.4'),\n itemPaddingX: r('space.4'),\n itemPaddingY: r('space.2'),\n itemRadius: r('radius.md'),\n itemHover: r('color.hover'),\n iconBox: '28px',\n iconRadius: r('radius.md'),\n iconBorder: r('color.border'),\n titleSize: r('fontSize.sm'),\n descriptionSize: r('fontSize.xs'),\n descriptionColor: r('color.textMuted'),\n labelSize: r('fontSize.xs'),\n labelWeight: r('fontWeight.medium'),\n labelColor: r('color.textMuted'),\n shortcutColor: r('color.textFaint'),\n width: '288px',\n submenuWidth: '224px',\n maxHeight: '320px',\n },\n toolbar: {\n buttonSize: '28px',\n buttonRadius: r('radius.sm'),\n buttonHover: r('color.hover'),\n activeColor: r('color.accent'),\n dividerColor: r('color.border'),\n linkFormWidth: '320px',\n },\n button: {\n height: '32px',\n paddingX: r('space.5'),\n radius: r('radius.md'),\n fontSize: r('fontSize.sm'),\n border: r('color.border'),\n bg: r('color.bg'),\n hoverBg: r('color.surface'),\n primaryBg: r('color.accent'),\n primaryHoverBg: r('color.accentHover'),\n primaryText: r('color.onAccent'),\n floatingBg: r('color.elevated'),\n floatingHoverBg: r('color.surface'),\n floatingShadow: r('shadow.popover'),\n disabledOpacity: '0.5',\n },\n input: {\n height: '32px',\n paddingX: r('space.4'),\n radius: r('radius.md'),\n fontSize: r('fontSize.sm'),\n border: r('color.border'),\n focusBorder: r('color.accent'),\n focusRing: 'color-mix(in srgb, var(--me-color-accent) 20%, transparent)',\n },\n handle: {\n color: r('color.handle'),\n hoverColor: r('color.textMuted'),\n hoverBg: r('color.hover'),\n buttonWidth: '20px',\n buttonHeight: '24px',\n radius: r('radius.sm'),\n gap: r('space.1'),\n },\n /**\n * Block rhythm, two levels like Notion: text blocks (paragraphs, lists, quotes,\n * toggles) sit close (`gap` + `paddingY`); every boxed/media block (code, callout,\n * table, image, embed, HTML, file, math, TOC, columns) uses `boxSpacing`.\n */\n block: {\n paddingY: '3px',\n paddingX: r('space.1'),\n gap: '1px',\n boxSpacing: r('space.4'),\n radius: r('radius.sm'),\n minHeight: 'calc(var(--me-font-line-height) * 1em)',\n /** Tint over any selected block (text, boxes and media alike). */\n selectedBg: r('color.blockSelected'),\n },\n /** Shared look of boxed blocks: code, callout, file rows, upload placeholders, HTML. */\n box: {\n bg: r('color.surface'),\n border: r('color.border'),\n radius: r('radius.md'),\n padding: '12px 16px',\n paddingCompact: '6px 10px',\n /** Header row inside a box (code language + copy, HTML name + tabs). */\n barPadding: '8px 10px 0 14px',\n barColor: r('color.textMuted'),\n barFontSize: r('fontSize.xs'),\n barIconSize: r('fontSize.sm'),\n barButtonSize: '24px',\n },\n /** Underlined tabs (upload placeholders, HTML Code / Preview). */\n tabs: {\n gap: r('space.7'),\n fontSize: r('fontSize.sm'),\n color: r('color.textMuted'),\n activeColor: r('color.text'),\n indicator: r('borderWidth.medium'),\n paddingBottom: r('space.4'),\n },\n heading: {\n weight: r('fontWeight.semibold'),\n lineHeight: r('lineHeight.snug'),\n h1Size: '1.875em',\n h2Size: '1.5em',\n h3Size: '1.25em',\n h4Size: '1.1em',\n h1Margin: '1.1em',\n h2Margin: '0.9em',\n h3Margin: '0.6em',\n h4Margin: '0.5em',\n /** Space kept above a heading scrolled to from the outline/TOC (room for sticky app headers). */\n scrollMargin: '80px',\n },\n link: { underline: 'color-mix(in srgb, var(--me-color-text) 40%, transparent)', underlineHover: r('color.text') },\n inlineCode: { color: r('color.inlineCodeText'), bg: r('color.inlineCodeBg'), radius: r('radius.sm'), fontSize: '85%', padding: '0.2em 0.4em' },\n list: { indent: '1.6em' },\n todo: { checkSize: r('fontSize.md'), checkColor: r('color.accent'), doneColor: r('color.textFaint') },\n quote: { borderWidth: r('borderWidth.thick'), borderColor: 'currentColor', paddingLeft: r('space.6') },\n divider: { color: r('color.border'), spacing: r('space.6') },\n callout: {\n gap: r('space.4'),\n iconSize: r('fontSize.lg'),\n iconBox: '28px',\n defaultBg: r('palette.gray.bg'),\n pickerWidth: '240px',\n },\n toggle: { arrowColor: r('color.text'), buttonSize: '24px', headingArrowOffset: 'calc(var(--me-block-padding-y) + 0.15em)' },\n columns: { gap: r('space.9') },\n code: { fontSize: '85%', lineHeight: r('lineHeight.relaxed') },\n table: { border: r('color.border'), headerBg: r('color.surface'), cellPadding: '6px 8px', cellMinWidth: '80px', selected: r('color.blockSelected'), resizeHandle: r('color.accent') },\n media: {\n captionColor: r('color.textMuted'),\n captionSize: r('fontSize.sm'),\n resizeHandleBg: r('color.overlay'),\n errorColor: r('color.danger'),\n },\n dropIndicator: { color: 'rgba(35, 131, 226, 0.5)', height: r('borderWidth.heavy') },\n html: {\n /** User HTML usually assumes a white page, also in dark mode. */\n frameBg: '#fff',\n editorBg: r('color.bg'),\n editorFont: r('font.mono'),\n editorFontSize: '13px',\n editorPadding: r('space.5'),\n coverBg: 'rgba(15, 15, 15, 0.08)',\n },\n /** Full-screen views (HTML block expand, image zoom). */\n modal: {\n backdrop: 'rgba(15, 15, 15, 0.6)',\n /** Image viewer: darker, so the photo stands out. */\n backdropStrong: 'rgba(15, 15, 15, 0.88)',\n inset: '4vh 4vw',\n toolbarOffset: r('space.7'),\n },\n image: {\n /** Hover toolbar inset from the image's top-right corner. */\n toolbarInset: r('space.3'),\n menuWidth: '208px',\n cropDim: 'rgba(15, 15, 15, 0.55)',\n cropBorder: r('white'),\n cropHandle: '10px',\n cropHandleBg: r('white'),\n cropHandleBorder: 'rgba(15, 15, 15, 0.35)',\n },\n outline: {\n /** Distance from the viewport's right edge and top. */\n right: r('space.7'),\n top: '30vh',\n barColor: r('color.border'),\n barActive: r('color.textMuted'),\n barHeight: r('borderWidth.medium'),\n barGap: r('space.3'),\n barWidth: '16px',\n panelWidth: '240px',\n panelMaxHeight: '60vh',\n itemColor: r('color.textMuted'),\n itemActive: r('color.accent'),\n indent: r('space.5'),\n },\n tableControls: {\n gripSize: '12px',\n gripBg: r('color.elevated'),\n gripColor: r('color.textFaint'),\n gripHoverBg: r('color.hover'),\n addSize: '18px',\n addBg: r('color.surface'),\n addHoverBg: r('color.hover'),\n radius: r('radius.sm'),\n },\n toc: { itemColor: r('color.textMuted'), itemHover: r('color.hover'), indent: r('space.7'), padding: r('space.2') },\n math: { editorWidth: '360px', emptyColor: r('color.textFaint') },\n emojiMenu: { cell: '32px', columns: '8', size: r('fontSize.lg') },\n file: { sizeColor: r('color.textFaint') },\n mention: {\n color: r('color.text'),\n bg: r('color.hover'),\n hoverBg: 'color-mix(in srgb, var(--me-color-text) 14%, transparent)',\n radius: r('radius.sm'),\n padding: '0 3px',\n pageUnderline: r('color.textFaint'),\n avatarRadius: r('rounded.full'),\n avatarSize: '1.1em',\n popoverWidth: '280px',\n },\n datepicker: {\n width: '264px',\n cell: '34px',\n todayColor: r('color.accent'),\n selectedBg: r('color.accent'),\n selectedText: r('color.onAccent'),\n rangeBg: 'color-mix(in srgb, var(--me-color-accent) 18%, transparent)',\n outsideColor: r('color.textFaint'),\n inputBg: r('color.surface'),\n },\n switch: { width: '28px', height: '16px', knob: '12px', off: r('color.border'), on: r('color.accent'), knobColor: r('color.bg') },\n unknown: { color: r('color.textMuted'), invalidBorder: r('palette.red.text'), invalidColor: r('palette.red.text') },\n /** Handle tooltip and toast: dark in both modes, like Notion. */\n tooltip: {\n bg: '#0f0f0f',\n text: 'rgba(255, 255, 255, 0.9)',\n hint: 'rgba(206, 205, 202, 0.6)',\n radius: r('radius.sm'),\n padding: '4px 8px',\n fontSize: r('fontSize.xs'),\n offset: r('space.3'),\n shadow: 'rgba(15, 15, 15, 0.1) 0 3px 6px',\n },\n}\n\n/** Everything a consumer can override, with autocomplete. */\nexport interface ThemeTokens {\n color?: Partial<Record<keyof typeof semanticLight.color, string>>\n shadow?: Partial<Record<keyof typeof semanticLight.shadow, string>>\n palette?: Partial<Record<PaletteName, { text?: string, bg?: string }>>\n syntax?: Partial<Record<keyof typeof semanticLight.syntax, string>>\n font?: Partial<Record<keyof typeof semanticBase.font, string>>\n radius?: Partial<Record<keyof typeof semanticBase.radius, string>>\n /** Per-part knobs, e.g. `{ menu: { itemRadius: '8px' } }`. */\n components?: { [G in keyof typeof component]?: Partial<Record<keyof typeof component[G], string>> }\n /** Overrides applied only in dark mode. */\n dark?: Pick<ThemeTokens, 'color' | 'shadow' | 'palette' | 'syntax'>\n}\n","/** Names accepted by the Nuxt module's `meiEditor.blocks` option (kept free of runtime imports). */\nexport const BLOCK_NAMES = [\n 'default', 'heading', 'bulletList', 'orderedList', 'taskList', 'quote', 'divider', 'codeBlock',\n 'image', 'embed', 'callout', 'toggle', 'toggleHeading', 'table', 'columns',\n 'toc', 'math', 'mermaid', 'emoji', 'file', 'mention',\n] as const\nexport type BlockName = typeof BLOCK_NAMES[number]\n\n/** Optional peer dependency each block needs at runtime. */\nexport const BLOCK_PEERS: Partial<Record<BlockName, string>> = { math: 'katex', mermaid: 'mermaid' }\n","import { declarations, flatten, type TokenTree } from './define'\nimport { component, PALETTE_NAMES, primitive, semanticBase, semanticDark, semanticLight, type ThemeTokens } from './tokens'\n\n/** CSS cascade layer for all library styles; app CSS outside layers always wins. */\nexport const LAYER = 'mei-editor'\n\n/**\n * Layer order declared wherever library CSS loads. Whichever sheet the browser sees\n * first fixes the order, so every entry point repeats it: resets (`base`, e.g.\n * Tailwind preflight) lose to the editor, while app `components`/`utilities` win.\n */\nexport const LAYER_ORDER = `@layer theme, base, ${LAYER}, components, utilities;`\n\nconst darkSelectors = (scope: string) => [\n `html.dark ${scope}:not(.me-light)`,\n `${scope}.me-dark`,\n]\n\n/** Default tokens (light + dark) plus palette mappings, generated from tokens.ts. */\nexport function baseTokensCss(): string {\n const light = [\n ...flatten(primitive as unknown as TokenTree),\n ...flatten(semanticBase),\n ...flatten(semanticLight as unknown as TokenTree),\n ...flatten(component),\n ]\n const dark = flatten(semanticDark as unknown as TokenTree)\n\n // Colors are stored by name in documents; map each name to its palette tokens.\n const tints = PALETTE_NAMES.map(name => [\n `:where(.me-scope) [data-text-color=\"${name}\"]{color:var(--me-palette-${name}-text);}`,\n `:where(.me-scope) [data-bg-color=\"${name}\"]{background-color:var(--me-palette-${name}-bg);}`,\n `:where(.me-scope) [data-color=\"${name}\"]{--me-tint-text:var(--me-palette-${name}-text);--me-tint-bg:var(--me-palette-${name}-bg);}`,\n ].join('\\n')).join('\\n')\n\n return [\n LAYER_ORDER,\n `@layer ${LAYER} {`,\n `:where(.me-scope){${declarations(light)}}`,\n `${darkSelectors('.me-scope').map(s => `:where(${s})`).join(',')}{${declarations(dark)}}`,\n tints,\n '}',\n ].join('\\n')\n}\n\nfunction overridePairs(tokens: Omit<ThemeTokens, 'dark'>): [string, string][] {\n const { components, ...semantic } = tokens\n return [...flatten(semantic as TokenTree), ...flatten((components ?? {}) as TokenTree)]\n}\n\n/**\n * CSS that applies token overrides to every editor matching `scope`\n * (unlayered, so it beats the defaults). Returns '' when there is nothing to override.\n */\nexport function overridesCss(tokens: ThemeTokens | undefined, scope = '.me-scope'): string {\n if (!tokens) return ''\n const { dark, ...rest } = tokens\n const light = overridePairs(rest)\n const darkPairs = dark ? overridePairs(dark) : []\n return [\n light.length ? `${scope}{${declarations(light)}}` : '',\n darkPairs.length ? `${darkSelectors(scope).join(',')}{${declarations(darkPairs)}}` : '',\n ].filter(Boolean).join('\\n')\n}\n\n/** Adds or replaces a <style> tag in <head>. Pass empty css to remove it. */\nexport function injectStyle(id: string, css: string) {\n if (typeof document === 'undefined') return\n let el = document.getElementById(id) as HTMLStyleElement | null\n if (!css) return el?.remove()\n if (!el) {\n el = document.createElement('style')\n el.id = id\n // Base tokens go first so later sheets (and app CSS) can override them.\n if (id === BASE_STYLE_ID) document.head.prepend(el)\n else document.head.appendChild(el)\n }\n if (el.textContent !== css) el.textContent = css\n}\n\nconst BASE_STYLE_ID = 'mei-editor-tokens'\n\n/** Injects the default tokens once per document. */\nexport function installBaseTokens() {\n if (typeof document === 'undefined' || document.getElementById(BASE_STYLE_ID)) return\n injectStyle(BASE_STYLE_ID, baseTokensCss())\n}\n"],"mappings":";AASA,IAAMC,KAAS,MAAcC,EAAE,QAAQ,sBAAsB,OAAO,CAAC,CAAC,YAAY,GAGrEC,KAAU,MAAiB,QAAQC,EAAK,MAAM,GAAG,CAAC,CAAC,IAAIH,CAAK,CAAC,CAAC,KAAK,GAAG,KAGtEI,KAAO,MAAiB,OAAOF,EAAOC,CAAI,EAAE;AAGzD,SAAgBE,EAAQ,GAAiB,IAAS,IAAwB;CACxE,OAAO,OAAO,QAAQC,CAAI,CAAC,CAAC,SAAS,CAACC,GAAKC,OAAW;EACpD,IAAML,IAAOM,IAAS,GA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