@tumaet/prompt-ui-components 0.0.11 → 0.0.12
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.
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--mt-overlay: rgba(251, 251, 251, 0.75);
|
|
3
|
+
--mt-transparent-foreground: rgba(0, 0, 0, 0.4);
|
|
4
|
+
--mt-bg-secondary: rgba(251, 251, 251, 0.8);
|
|
5
|
+
--mt-code-background: #082b781f;
|
|
6
|
+
--mt-code-color: #d4d4d4;
|
|
7
|
+
--mt-secondary: #9d9d9f;
|
|
8
|
+
--mt-pre-background: #ececec;
|
|
9
|
+
--mt-pre-border: #e0e0e0;
|
|
10
|
+
--mt-pre-color: #2f2f31;
|
|
11
|
+
--mt-hr: #dcdcdc;
|
|
12
|
+
--mt-drag-handle-hover: #5c5c5e;
|
|
13
|
+
|
|
14
|
+
--mt-accent-bold-blue: #05c;
|
|
15
|
+
--mt-accent-bold-teal: #206a83;
|
|
16
|
+
--mt-accent-bold-green: #216e4e;
|
|
17
|
+
--mt-accent-bold-orange: #a54800;
|
|
18
|
+
--mt-accent-bold-red: #ae2e24;
|
|
19
|
+
--mt-accent-bold-purple: #5e4db2;
|
|
20
|
+
|
|
21
|
+
--mt-accent-gray: #758195;
|
|
22
|
+
--mt-accent-blue: #1d7afc;
|
|
23
|
+
--mt-accent-teal: #2898bd;
|
|
24
|
+
--mt-accent-green: #22a06b;
|
|
25
|
+
--mt-accent-orange: #fea362;
|
|
26
|
+
--mt-accent-red: #c9372c;
|
|
27
|
+
--mt-accent-purple: #8270db;
|
|
28
|
+
|
|
29
|
+
--mt-accent-blue-subtler: #cce0ff;
|
|
30
|
+
--mt-accent-teal-subtler: #c6edfb;
|
|
31
|
+
--mt-accent-green-subtler: #baf3db;
|
|
32
|
+
--mt-accent-yellow-subtler: #f8e6a0;
|
|
33
|
+
--mt-accent-red-subtler: #ffd5d2;
|
|
34
|
+
--mt-accent-purple-subtler: #dfd8fd;
|
|
35
|
+
|
|
36
|
+
--hljs-string: #aa430f;
|
|
37
|
+
--hljs-title: #b08836;
|
|
38
|
+
--hljs-comment: #999999;
|
|
39
|
+
--hljs-keyword: #0c5eb1;
|
|
40
|
+
--hljs-attr: #3a92bc;
|
|
41
|
+
--hljs-literal: #c82b0f;
|
|
42
|
+
--hljs-name: #259792;
|
|
43
|
+
--hljs-selector-tag: #c8500f;
|
|
44
|
+
--hljs-number: #3da067;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dark {
|
|
48
|
+
--mt-overlay: rgba(31, 32, 35, 0.75);
|
|
49
|
+
--mt-transparent-foreground: rgba(255, 255, 255, 0.4);
|
|
50
|
+
--mt-bg-secondary: rgba(31, 32, 35, 0.8);
|
|
51
|
+
--mt-code-background: #ffffff13;
|
|
52
|
+
--mt-code-color: #2c2e33;
|
|
53
|
+
--mt-secondary: #595a5c;
|
|
54
|
+
--mt-pre-background: #080808;
|
|
55
|
+
--mt-pre-border: #23252a;
|
|
56
|
+
--mt-pre-color: #e3e4e6;
|
|
57
|
+
--mt-hr: #26282d;
|
|
58
|
+
--mt-drag-handle-hover: #969799;
|
|
59
|
+
|
|
60
|
+
--mt-accent-bold-blue: #85b8ff;
|
|
61
|
+
--mt-accent-bold-teal: #9dd9ee;
|
|
62
|
+
--mt-accent-bold-green: #7ee2b8;
|
|
63
|
+
--mt-accent-bold-orange: #fec195;
|
|
64
|
+
--mt-accent-bold-red: #fd9891;
|
|
65
|
+
--mt-accent-bold-purple: #b8acf6;
|
|
66
|
+
|
|
67
|
+
--mt-accent-gray: #738496;
|
|
68
|
+
--mt-accent-blue: #388bff;
|
|
69
|
+
--mt-accent-teal: #42b2d7;
|
|
70
|
+
--mt-accent-green: #2abb7f;
|
|
71
|
+
--mt-accent-orange: #a54800;
|
|
72
|
+
--mt-accent-red: #e2483d;
|
|
73
|
+
--mt-accent-purple: #8f7ee7;
|
|
74
|
+
|
|
75
|
+
--mt-accent-blue-subtler: #09326c;
|
|
76
|
+
--mt-accent-teal-subtler: #164555;
|
|
77
|
+
--mt-accent-green-subtler: #164b35;
|
|
78
|
+
--mt-accent-yellow-subtler: #533f04;
|
|
79
|
+
--mt-accent-red-subtler: #5d1f1a;
|
|
80
|
+
--mt-accent-purple-subtler: #352c63;
|
|
81
|
+
|
|
82
|
+
--hljs-string: #da936b;
|
|
83
|
+
--hljs-title: #f1d59d;
|
|
84
|
+
--hljs-comment: #aaaaaa;
|
|
85
|
+
--hljs-keyword: #6699cc;
|
|
86
|
+
--hljs-attr: #90cae8;
|
|
87
|
+
--hljs-literal: #f2777a;
|
|
88
|
+
--hljs-name: #5fc0a0;
|
|
89
|
+
--hljs-selector-tag: #e8c785;
|
|
90
|
+
--hljs-number: #b6e7b6;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.minimal-tiptap-editor .ProseMirror {
|
|
94
|
+
@apply flex max-w-full cursor-text flex-col;
|
|
95
|
+
@apply z-0 outline-0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.minimal-tiptap-editor .ProseMirror > div.editor {
|
|
99
|
+
@apply block flex-1 whitespace-pre-wrap;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.minimal-tiptap-editor .ProseMirror .block-node:not(:last-child),
|
|
103
|
+
.minimal-tiptap-editor .ProseMirror .list-node:not(:last-child),
|
|
104
|
+
.minimal-tiptap-editor .ProseMirror .text-node:not(:last-child) {
|
|
105
|
+
@apply mb-2.5;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.minimal-tiptap-editor .ProseMirror ol,
|
|
109
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
110
|
+
@apply pl-6;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.minimal-tiptap-editor .ProseMirror blockquote,
|
|
114
|
+
.minimal-tiptap-editor .ProseMirror dl,
|
|
115
|
+
.minimal-tiptap-editor .ProseMirror ol,
|
|
116
|
+
.minimal-tiptap-editor .ProseMirror p,
|
|
117
|
+
.minimal-tiptap-editor .ProseMirror pre,
|
|
118
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
119
|
+
@apply m-0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.minimal-tiptap-editor .ProseMirror li {
|
|
123
|
+
@apply leading-7;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.minimal-tiptap-editor .ProseMirror p {
|
|
127
|
+
@apply break-words;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.minimal-tiptap-editor .ProseMirror li .text-node:has(+ .list-node),
|
|
131
|
+
.minimal-tiptap-editor .ProseMirror li > .list-node,
|
|
132
|
+
.minimal-tiptap-editor .ProseMirror li > .text-node,
|
|
133
|
+
.minimal-tiptap-editor .ProseMirror li p {
|
|
134
|
+
@apply mb-0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.minimal-tiptap-editor .ProseMirror blockquote {
|
|
138
|
+
@apply relative pl-3.5;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.minimal-tiptap-editor .ProseMirror blockquote::before,
|
|
142
|
+
.minimal-tiptap-editor .ProseMirror blockquote.is-empty::before {
|
|
143
|
+
@apply absolute bottom-0 left-0 top-0 h-full w-1 rounded-sm bg-accent-foreground/15 content-[''];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.minimal-tiptap-editor .ProseMirror hr {
|
|
147
|
+
@apply my-3 h-0.5 w-full border-none bg-[var(--mt-hr)];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.minimal-tiptap-editor .ProseMirror-focused hr.ProseMirror-selectednode {
|
|
151
|
+
@apply rounded-full outline outline-2 outline-offset-1 outline-muted-foreground;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.minimal-tiptap-editor .ProseMirror .ProseMirror-gapcursor {
|
|
155
|
+
@apply pointer-events-none absolute hidden;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.minimal-tiptap-editor .ProseMirror .ProseMirror-hideselection {
|
|
159
|
+
@apply caret-transparent;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.minimal-tiptap-editor .ProseMirror.resize-cursor {
|
|
163
|
+
@apply cursor-col-resize;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.minimal-tiptap-editor .ProseMirror .selection {
|
|
167
|
+
@apply inline-block;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.minimal-tiptap-editor .ProseMirror s span {
|
|
171
|
+
@apply line-through;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.minimal-tiptap-editor .ProseMirror .selection,
|
|
175
|
+
.minimal-tiptap-editor .ProseMirror *::selection,
|
|
176
|
+
::selection {
|
|
177
|
+
@apply bg-primary/25;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Override native selection when custom selection is present */
|
|
181
|
+
.minimal-tiptap-editor .ProseMirror .selection::selection {
|
|
182
|
+
background: transparent;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
/* Typography */
|
|
187
|
+
.minimal-tiptap-editor .ProseMirror .heading-node {
|
|
188
|
+
@apply relative font-semibold;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.minimal-tiptap-editor .ProseMirror .heading-node:first-child {
|
|
192
|
+
@apply mt-0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.minimal-tiptap-editor .ProseMirror h1 {
|
|
196
|
+
@apply mb-4 mt-[46px] text-[1.375rem] leading-7 tracking-[-0.004375rem];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.minimal-tiptap-editor .ProseMirror h2 {
|
|
200
|
+
@apply mb-3.5 mt-8 text-[1.1875rem] leading-7 tracking-[0.003125rem];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.minimal-tiptap-editor .ProseMirror h3 {
|
|
204
|
+
@apply mb-3 mt-6 text-[1.0625rem] leading-6 tracking-[0.00625rem];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.minimal-tiptap-editor .ProseMirror h4 {
|
|
208
|
+
@apply mb-2 mt-4 text-[0.9375rem] leading-6;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.minimal-tiptap-editor .ProseMirror h5 {
|
|
212
|
+
@apply mb-2 mt-4 text-sm;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.minimal-tiptap-editor .ProseMirror h5 {
|
|
216
|
+
@apply mb-2 mt-4 text-sm;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.minimal-tiptap-editor .ProseMirror a.link {
|
|
220
|
+
@apply cursor-pointer text-blue-700;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.minimal-tiptap-editor .ProseMirror a.link:hover {
|
|
224
|
+
@apply underline;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
/** Lists */
|
|
229
|
+
.minimal-tiptap-editor .ProseMirror ol {
|
|
230
|
+
@apply list-decimal;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.minimal-tiptap-editor .ProseMirror ol ol {
|
|
234
|
+
list-style: lower-alpha;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.minimal-tiptap-editor .ProseMirror ol ol ol {
|
|
238
|
+
list-style: lower-roman;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
242
|
+
list-style: disc;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.minimal-tiptap-editor .ProseMirror ul ul {
|
|
246
|
+
list-style: circle;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.minimal-tiptap-editor .ProseMirror ul ul ul {
|
|
250
|
+
list-style: square;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
/** Placeholders */
|
|
255
|
+
.minimal-tiptap-editor .ProseMirror > p.is-editor-empty::before {
|
|
256
|
+
content: attr(data-placeholder);
|
|
257
|
+
@apply pointer-events-none float-left h-0 text-[var(--mt-secondary)];
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/** Code */
|
|
262
|
+
.minimal-tiptap-editor .ProseMirror code.inline {
|
|
263
|
+
@apply rounded border border-[var(--mt-code-color)] bg-[var(--mt-code-background)] px-1 py-0.5 text-sm;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.minimal-tiptap-editor .ProseMirror pre {
|
|
267
|
+
@apply relative overflow-auto rounded border font-mono text-sm;
|
|
268
|
+
@apply border-[var(--mt-pre-border)] bg-[var(--mt-pre-background)] text-[var(--mt-pre-color)];
|
|
269
|
+
@apply hyphens-none whitespace-pre text-left;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.minimal-tiptap-editor .ProseMirror code {
|
|
273
|
+
@apply break-words leading-[1.7em];
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.minimal-tiptap-editor .ProseMirror pre code {
|
|
277
|
+
@apply block overflow-x-auto p-3.5;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.minimal-tiptap-editor .ProseMirror pre {
|
|
281
|
+
.hljs-keyword,
|
|
282
|
+
.hljs-operator,
|
|
283
|
+
.hljs-function,
|
|
284
|
+
.hljs-built_in,
|
|
285
|
+
.hljs-builtin-name {
|
|
286
|
+
color: var(--hljs-keyword);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.hljs-attr,
|
|
290
|
+
.hljs-symbol,
|
|
291
|
+
.hljs-property,
|
|
292
|
+
.hljs-attribute,
|
|
293
|
+
.hljs-variable,
|
|
294
|
+
.hljs-template-variable,
|
|
295
|
+
.hljs-params {
|
|
296
|
+
color: var(--hljs-attr);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.hljs-name,
|
|
300
|
+
.hljs-regexp,
|
|
301
|
+
.hljs-link,
|
|
302
|
+
.hljs-type,
|
|
303
|
+
.hljs-addition {
|
|
304
|
+
color: var(--hljs-name);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.hljs-string,
|
|
308
|
+
.hljs-bullet {
|
|
309
|
+
color: var(--hljs-string);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.hljs-title,
|
|
313
|
+
.hljs-subst,
|
|
314
|
+
.hljs-section {
|
|
315
|
+
color: var(--hljs-title);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.hljs-literal,
|
|
319
|
+
.hljs-type,
|
|
320
|
+
.hljs-deletion {
|
|
321
|
+
color: var(--hljs-literal);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.hljs-selector-tag,
|
|
325
|
+
.hljs-selector-id,
|
|
326
|
+
.hljs-selector-class {
|
|
327
|
+
color: var(--hljs-selector-tag);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.hljs-number {
|
|
331
|
+
color: var(--hljs-number);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.hljs-comment,
|
|
335
|
+
.hljs-meta,
|
|
336
|
+
.hljs-quote {
|
|
337
|
+
color: var(--hljs-comment);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.hljs-emphasis {
|
|
341
|
+
@apply italic;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.hljs-strong {
|
|
345
|
+
@apply font-bold;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
/** Zoom */
|
|
351
|
+
[data-rmiz-ghost] {
|
|
352
|
+
position: absolute;
|
|
353
|
+
pointer-events: none;
|
|
354
|
+
}
|
|
355
|
+
[data-rmiz-btn-zoom],
|
|
356
|
+
[data-rmiz-btn-unzoom] {
|
|
357
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
358
|
+
border-radius: 50%;
|
|
359
|
+
border: none;
|
|
360
|
+
box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
|
|
361
|
+
color: #fff;
|
|
362
|
+
height: 40px;
|
|
363
|
+
margin: 0;
|
|
364
|
+
outline-offset: 2px;
|
|
365
|
+
padding: 9px;
|
|
366
|
+
touch-action: manipulation;
|
|
367
|
+
width: 40px;
|
|
368
|
+
-webkit-appearance: none;
|
|
369
|
+
-moz-appearance: none;
|
|
370
|
+
appearance: none;
|
|
371
|
+
}
|
|
372
|
+
[data-rmiz-btn-zoom]:not(:focus):not(:active) {
|
|
373
|
+
position: absolute;
|
|
374
|
+
clip: rect(0 0 0 0);
|
|
375
|
+
clip-path: inset(50%);
|
|
376
|
+
height: 1px;
|
|
377
|
+
overflow: hidden;
|
|
378
|
+
pointer-events: none;
|
|
379
|
+
white-space: nowrap;
|
|
380
|
+
width: 1px;
|
|
381
|
+
}
|
|
382
|
+
[data-rmiz-btn-zoom] {
|
|
383
|
+
position: absolute;
|
|
384
|
+
inset: 10px 10px auto auto;
|
|
385
|
+
cursor: zoom-in;
|
|
386
|
+
}
|
|
387
|
+
[data-rmiz-btn-unzoom] {
|
|
388
|
+
position: absolute;
|
|
389
|
+
inset: 20px 20px auto auto;
|
|
390
|
+
cursor: zoom-out;
|
|
391
|
+
z-index: 1;
|
|
392
|
+
}
|
|
393
|
+
[data-rmiz-content='found'] img,
|
|
394
|
+
[data-rmiz-content='found'] svg,
|
|
395
|
+
[data-rmiz-content='found'] [role='img'],
|
|
396
|
+
[data-rmiz-content='found'] [data-zoom] {
|
|
397
|
+
cursor: inherit;
|
|
398
|
+
}
|
|
399
|
+
[data-rmiz-modal]::backdrop {
|
|
400
|
+
display: none;
|
|
401
|
+
}
|
|
402
|
+
[data-rmiz-modal][open] {
|
|
403
|
+
position: fixed;
|
|
404
|
+
width: 100vw;
|
|
405
|
+
width: 100dvw;
|
|
406
|
+
height: 100vh;
|
|
407
|
+
height: 100dvh;
|
|
408
|
+
max-width: none;
|
|
409
|
+
max-height: none;
|
|
410
|
+
margin: 0;
|
|
411
|
+
padding: 0;
|
|
412
|
+
border: 0;
|
|
413
|
+
background: transparent;
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
}
|
|
416
|
+
[data-rmiz-modal-overlay] {
|
|
417
|
+
position: absolute;
|
|
418
|
+
inset: 0;
|
|
419
|
+
transition: background-color 0.3s;
|
|
420
|
+
}
|
|
421
|
+
[data-rmiz-modal-overlay='hidden'] {
|
|
422
|
+
background-color: rgba(255, 255, 255, 0);
|
|
423
|
+
}
|
|
424
|
+
[data-rmiz-modal-overlay='visible'] {
|
|
425
|
+
background-color: rgba(255, 255, 255, 1);
|
|
426
|
+
}
|
|
427
|
+
[data-rmiz-modal-content] {
|
|
428
|
+
position: relative;
|
|
429
|
+
width: 100%;
|
|
430
|
+
height: 100%;
|
|
431
|
+
}
|
|
432
|
+
[data-rmiz-modal-img] {
|
|
433
|
+
position: absolute;
|
|
434
|
+
cursor: zoom-out;
|
|
435
|
+
image-rendering: high-quality;
|
|
436
|
+
transform-origin: top left;
|
|
437
|
+
transition: transform 0.3s;
|
|
438
|
+
}
|
|
439
|
+
@media (prefers-reduced-motion: reduce) {
|
|
440
|
+
[data-rmiz-modal-overlay],
|
|
441
|
+
[data-rmiz-modal-img] {
|
|
442
|
+
transition-duration: 0.01ms !important;
|
|
443
|
+
}
|
|
444
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tumaet/prompt-ui-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/ls1intum/prompt-lib.git"
|
|
@@ -13,17 +13,20 @@
|
|
|
13
13
|
".": "./dist/index.js",
|
|
14
14
|
"./index.css": "./dist/index.css",
|
|
15
15
|
"./tailwind-config": "./tailwind/tailwind.config.js",
|
|
16
|
-
"./postcss-config": "./tailwind/postcss.config.js"
|
|
16
|
+
"./postcss-config": "./tailwind/postcss.config.js",
|
|
17
|
+
"./minimal-tiptap/index.css": "./dist/components/minimal-tiptap/styles/index.css"
|
|
17
18
|
},
|
|
18
19
|
"files": [
|
|
19
20
|
"dist",
|
|
20
21
|
"tailwind",
|
|
21
|
-
"src/index.css"
|
|
22
|
+
"src/index.css",
|
|
23
|
+
"src/components/minimal-tiptap/styles/index.css"
|
|
22
24
|
],
|
|
23
25
|
"scripts": {
|
|
24
26
|
"build:esm": "tsc --project tsconfig.json && tsc-alias",
|
|
25
27
|
"build:css": "postcss src/index.css -o dist/index.css",
|
|
26
|
-
"build": "
|
|
28
|
+
"build:copy-css": "mkdir -p dist/components/minimal-tiptap/styles && cp src/components/minimal-tiptap/styles/index.css dist/components/minimal-tiptap/styles/index.css",
|
|
29
|
+
"build": "yarn build:esm && yarn build:css && yarn build:copy-css",
|
|
27
30
|
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\""
|
|
28
31
|
},
|
|
29
32
|
"packageManager": "yarn@4.1.0",
|
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--mt-overlay: rgba(251, 251, 251, 0.75);
|
|
3
|
+
--mt-transparent-foreground: rgba(0, 0, 0, 0.4);
|
|
4
|
+
--mt-bg-secondary: rgba(251, 251, 251, 0.8);
|
|
5
|
+
--mt-code-background: #082b781f;
|
|
6
|
+
--mt-code-color: #d4d4d4;
|
|
7
|
+
--mt-secondary: #9d9d9f;
|
|
8
|
+
--mt-pre-background: #ececec;
|
|
9
|
+
--mt-pre-border: #e0e0e0;
|
|
10
|
+
--mt-pre-color: #2f2f31;
|
|
11
|
+
--mt-hr: #dcdcdc;
|
|
12
|
+
--mt-drag-handle-hover: #5c5c5e;
|
|
13
|
+
|
|
14
|
+
--mt-accent-bold-blue: #05c;
|
|
15
|
+
--mt-accent-bold-teal: #206a83;
|
|
16
|
+
--mt-accent-bold-green: #216e4e;
|
|
17
|
+
--mt-accent-bold-orange: #a54800;
|
|
18
|
+
--mt-accent-bold-red: #ae2e24;
|
|
19
|
+
--mt-accent-bold-purple: #5e4db2;
|
|
20
|
+
|
|
21
|
+
--mt-accent-gray: #758195;
|
|
22
|
+
--mt-accent-blue: #1d7afc;
|
|
23
|
+
--mt-accent-teal: #2898bd;
|
|
24
|
+
--mt-accent-green: #22a06b;
|
|
25
|
+
--mt-accent-orange: #fea362;
|
|
26
|
+
--mt-accent-red: #c9372c;
|
|
27
|
+
--mt-accent-purple: #8270db;
|
|
28
|
+
|
|
29
|
+
--mt-accent-blue-subtler: #cce0ff;
|
|
30
|
+
--mt-accent-teal-subtler: #c6edfb;
|
|
31
|
+
--mt-accent-green-subtler: #baf3db;
|
|
32
|
+
--mt-accent-yellow-subtler: #f8e6a0;
|
|
33
|
+
--mt-accent-red-subtler: #ffd5d2;
|
|
34
|
+
--mt-accent-purple-subtler: #dfd8fd;
|
|
35
|
+
|
|
36
|
+
--hljs-string: #aa430f;
|
|
37
|
+
--hljs-title: #b08836;
|
|
38
|
+
--hljs-comment: #999999;
|
|
39
|
+
--hljs-keyword: #0c5eb1;
|
|
40
|
+
--hljs-attr: #3a92bc;
|
|
41
|
+
--hljs-literal: #c82b0f;
|
|
42
|
+
--hljs-name: #259792;
|
|
43
|
+
--hljs-selector-tag: #c8500f;
|
|
44
|
+
--hljs-number: #3da067;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dark {
|
|
48
|
+
--mt-overlay: rgba(31, 32, 35, 0.75);
|
|
49
|
+
--mt-transparent-foreground: rgba(255, 255, 255, 0.4);
|
|
50
|
+
--mt-bg-secondary: rgba(31, 32, 35, 0.8);
|
|
51
|
+
--mt-code-background: #ffffff13;
|
|
52
|
+
--mt-code-color: #2c2e33;
|
|
53
|
+
--mt-secondary: #595a5c;
|
|
54
|
+
--mt-pre-background: #080808;
|
|
55
|
+
--mt-pre-border: #23252a;
|
|
56
|
+
--mt-pre-color: #e3e4e6;
|
|
57
|
+
--mt-hr: #26282d;
|
|
58
|
+
--mt-drag-handle-hover: #969799;
|
|
59
|
+
|
|
60
|
+
--mt-accent-bold-blue: #85b8ff;
|
|
61
|
+
--mt-accent-bold-teal: #9dd9ee;
|
|
62
|
+
--mt-accent-bold-green: #7ee2b8;
|
|
63
|
+
--mt-accent-bold-orange: #fec195;
|
|
64
|
+
--mt-accent-bold-red: #fd9891;
|
|
65
|
+
--mt-accent-bold-purple: #b8acf6;
|
|
66
|
+
|
|
67
|
+
--mt-accent-gray: #738496;
|
|
68
|
+
--mt-accent-blue: #388bff;
|
|
69
|
+
--mt-accent-teal: #42b2d7;
|
|
70
|
+
--mt-accent-green: #2abb7f;
|
|
71
|
+
--mt-accent-orange: #a54800;
|
|
72
|
+
--mt-accent-red: #e2483d;
|
|
73
|
+
--mt-accent-purple: #8f7ee7;
|
|
74
|
+
|
|
75
|
+
--mt-accent-blue-subtler: #09326c;
|
|
76
|
+
--mt-accent-teal-subtler: #164555;
|
|
77
|
+
--mt-accent-green-subtler: #164b35;
|
|
78
|
+
--mt-accent-yellow-subtler: #533f04;
|
|
79
|
+
--mt-accent-red-subtler: #5d1f1a;
|
|
80
|
+
--mt-accent-purple-subtler: #352c63;
|
|
81
|
+
|
|
82
|
+
--hljs-string: #da936b;
|
|
83
|
+
--hljs-title: #f1d59d;
|
|
84
|
+
--hljs-comment: #aaaaaa;
|
|
85
|
+
--hljs-keyword: #6699cc;
|
|
86
|
+
--hljs-attr: #90cae8;
|
|
87
|
+
--hljs-literal: #f2777a;
|
|
88
|
+
--hljs-name: #5fc0a0;
|
|
89
|
+
--hljs-selector-tag: #e8c785;
|
|
90
|
+
--hljs-number: #b6e7b6;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.minimal-tiptap-editor .ProseMirror {
|
|
94
|
+
@apply flex max-w-full cursor-text flex-col;
|
|
95
|
+
@apply z-0 outline-0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.minimal-tiptap-editor .ProseMirror > div.editor {
|
|
99
|
+
@apply block flex-1 whitespace-pre-wrap;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.minimal-tiptap-editor .ProseMirror .block-node:not(:last-child),
|
|
103
|
+
.minimal-tiptap-editor .ProseMirror .list-node:not(:last-child),
|
|
104
|
+
.minimal-tiptap-editor .ProseMirror .text-node:not(:last-child) {
|
|
105
|
+
@apply mb-2.5;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.minimal-tiptap-editor .ProseMirror ol,
|
|
109
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
110
|
+
@apply pl-6;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.minimal-tiptap-editor .ProseMirror blockquote,
|
|
114
|
+
.minimal-tiptap-editor .ProseMirror dl,
|
|
115
|
+
.minimal-tiptap-editor .ProseMirror ol,
|
|
116
|
+
.minimal-tiptap-editor .ProseMirror p,
|
|
117
|
+
.minimal-tiptap-editor .ProseMirror pre,
|
|
118
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
119
|
+
@apply m-0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.minimal-tiptap-editor .ProseMirror li {
|
|
123
|
+
@apply leading-7;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.minimal-tiptap-editor .ProseMirror p {
|
|
127
|
+
@apply break-words;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.minimal-tiptap-editor .ProseMirror li .text-node:has(+ .list-node),
|
|
131
|
+
.minimal-tiptap-editor .ProseMirror li > .list-node,
|
|
132
|
+
.minimal-tiptap-editor .ProseMirror li > .text-node,
|
|
133
|
+
.minimal-tiptap-editor .ProseMirror li p {
|
|
134
|
+
@apply mb-0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.minimal-tiptap-editor .ProseMirror blockquote {
|
|
138
|
+
@apply relative pl-3.5;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.minimal-tiptap-editor .ProseMirror blockquote::before,
|
|
142
|
+
.minimal-tiptap-editor .ProseMirror blockquote.is-empty::before {
|
|
143
|
+
@apply absolute bottom-0 left-0 top-0 h-full w-1 rounded-sm bg-accent-foreground/15 content-[''];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.minimal-tiptap-editor .ProseMirror hr {
|
|
147
|
+
@apply my-3 h-0.5 w-full border-none bg-[var(--mt-hr)];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.minimal-tiptap-editor .ProseMirror-focused hr.ProseMirror-selectednode {
|
|
151
|
+
@apply rounded-full outline outline-2 outline-offset-1 outline-muted-foreground;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.minimal-tiptap-editor .ProseMirror .ProseMirror-gapcursor {
|
|
155
|
+
@apply pointer-events-none absolute hidden;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.minimal-tiptap-editor .ProseMirror .ProseMirror-hideselection {
|
|
159
|
+
@apply caret-transparent;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.minimal-tiptap-editor .ProseMirror.resize-cursor {
|
|
163
|
+
@apply cursor-col-resize;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.minimal-tiptap-editor .ProseMirror .selection {
|
|
167
|
+
@apply inline-block;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.minimal-tiptap-editor .ProseMirror s span {
|
|
171
|
+
@apply line-through;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.minimal-tiptap-editor .ProseMirror .selection,
|
|
175
|
+
.minimal-tiptap-editor .ProseMirror *::selection,
|
|
176
|
+
::selection {
|
|
177
|
+
@apply bg-primary/25;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Override native selection when custom selection is present */
|
|
181
|
+
.minimal-tiptap-editor .ProseMirror .selection::selection {
|
|
182
|
+
background: transparent;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
/* Typography */
|
|
187
|
+
.minimal-tiptap-editor .ProseMirror .heading-node {
|
|
188
|
+
@apply relative font-semibold;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.minimal-tiptap-editor .ProseMirror .heading-node:first-child {
|
|
192
|
+
@apply mt-0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.minimal-tiptap-editor .ProseMirror h1 {
|
|
196
|
+
@apply mb-4 mt-[46px] text-[1.375rem] leading-7 tracking-[-0.004375rem];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.minimal-tiptap-editor .ProseMirror h2 {
|
|
200
|
+
@apply mb-3.5 mt-8 text-[1.1875rem] leading-7 tracking-[0.003125rem];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.minimal-tiptap-editor .ProseMirror h3 {
|
|
204
|
+
@apply mb-3 mt-6 text-[1.0625rem] leading-6 tracking-[0.00625rem];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.minimal-tiptap-editor .ProseMirror h4 {
|
|
208
|
+
@apply mb-2 mt-4 text-[0.9375rem] leading-6;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.minimal-tiptap-editor .ProseMirror h5 {
|
|
212
|
+
@apply mb-2 mt-4 text-sm;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.minimal-tiptap-editor .ProseMirror h5 {
|
|
216
|
+
@apply mb-2 mt-4 text-sm;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.minimal-tiptap-editor .ProseMirror a.link {
|
|
220
|
+
@apply cursor-pointer text-blue-700;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.minimal-tiptap-editor .ProseMirror a.link:hover {
|
|
224
|
+
@apply underline;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
/** Lists */
|
|
229
|
+
.minimal-tiptap-editor .ProseMirror ol {
|
|
230
|
+
@apply list-decimal;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.minimal-tiptap-editor .ProseMirror ol ol {
|
|
234
|
+
list-style: lower-alpha;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.minimal-tiptap-editor .ProseMirror ol ol ol {
|
|
238
|
+
list-style: lower-roman;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
242
|
+
list-style: disc;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.minimal-tiptap-editor .ProseMirror ul ul {
|
|
246
|
+
list-style: circle;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.minimal-tiptap-editor .ProseMirror ul ul ul {
|
|
250
|
+
list-style: square;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
/** Placeholders */
|
|
255
|
+
.minimal-tiptap-editor .ProseMirror > p.is-editor-empty::before {
|
|
256
|
+
content: attr(data-placeholder);
|
|
257
|
+
@apply pointer-events-none float-left h-0 text-[var(--mt-secondary)];
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/** Code */
|
|
262
|
+
.minimal-tiptap-editor .ProseMirror code.inline {
|
|
263
|
+
@apply rounded border border-[var(--mt-code-color)] bg-[var(--mt-code-background)] px-1 py-0.5 text-sm;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.minimal-tiptap-editor .ProseMirror pre {
|
|
267
|
+
@apply relative overflow-auto rounded border font-mono text-sm;
|
|
268
|
+
@apply border-[var(--mt-pre-border)] bg-[var(--mt-pre-background)] text-[var(--mt-pre-color)];
|
|
269
|
+
@apply hyphens-none whitespace-pre text-left;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.minimal-tiptap-editor .ProseMirror code {
|
|
273
|
+
@apply break-words leading-[1.7em];
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.minimal-tiptap-editor .ProseMirror pre code {
|
|
277
|
+
@apply block overflow-x-auto p-3.5;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.minimal-tiptap-editor .ProseMirror pre {
|
|
281
|
+
.hljs-keyword,
|
|
282
|
+
.hljs-operator,
|
|
283
|
+
.hljs-function,
|
|
284
|
+
.hljs-built_in,
|
|
285
|
+
.hljs-builtin-name {
|
|
286
|
+
color: var(--hljs-keyword);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.hljs-attr,
|
|
290
|
+
.hljs-symbol,
|
|
291
|
+
.hljs-property,
|
|
292
|
+
.hljs-attribute,
|
|
293
|
+
.hljs-variable,
|
|
294
|
+
.hljs-template-variable,
|
|
295
|
+
.hljs-params {
|
|
296
|
+
color: var(--hljs-attr);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.hljs-name,
|
|
300
|
+
.hljs-regexp,
|
|
301
|
+
.hljs-link,
|
|
302
|
+
.hljs-type,
|
|
303
|
+
.hljs-addition {
|
|
304
|
+
color: var(--hljs-name);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.hljs-string,
|
|
308
|
+
.hljs-bullet {
|
|
309
|
+
color: var(--hljs-string);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.hljs-title,
|
|
313
|
+
.hljs-subst,
|
|
314
|
+
.hljs-section {
|
|
315
|
+
color: var(--hljs-title);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.hljs-literal,
|
|
319
|
+
.hljs-type,
|
|
320
|
+
.hljs-deletion {
|
|
321
|
+
color: var(--hljs-literal);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.hljs-selector-tag,
|
|
325
|
+
.hljs-selector-id,
|
|
326
|
+
.hljs-selector-class {
|
|
327
|
+
color: var(--hljs-selector-tag);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.hljs-number {
|
|
331
|
+
color: var(--hljs-number);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.hljs-comment,
|
|
335
|
+
.hljs-meta,
|
|
336
|
+
.hljs-quote {
|
|
337
|
+
color: var(--hljs-comment);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.hljs-emphasis {
|
|
341
|
+
@apply italic;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.hljs-strong {
|
|
345
|
+
@apply font-bold;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
/** Zoom */
|
|
351
|
+
[data-rmiz-ghost] {
|
|
352
|
+
position: absolute;
|
|
353
|
+
pointer-events: none;
|
|
354
|
+
}
|
|
355
|
+
[data-rmiz-btn-zoom],
|
|
356
|
+
[data-rmiz-btn-unzoom] {
|
|
357
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
358
|
+
border-radius: 50%;
|
|
359
|
+
border: none;
|
|
360
|
+
box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
|
|
361
|
+
color: #fff;
|
|
362
|
+
height: 40px;
|
|
363
|
+
margin: 0;
|
|
364
|
+
outline-offset: 2px;
|
|
365
|
+
padding: 9px;
|
|
366
|
+
touch-action: manipulation;
|
|
367
|
+
width: 40px;
|
|
368
|
+
-webkit-appearance: none;
|
|
369
|
+
-moz-appearance: none;
|
|
370
|
+
appearance: none;
|
|
371
|
+
}
|
|
372
|
+
[data-rmiz-btn-zoom]:not(:focus):not(:active) {
|
|
373
|
+
position: absolute;
|
|
374
|
+
clip: rect(0 0 0 0);
|
|
375
|
+
clip-path: inset(50%);
|
|
376
|
+
height: 1px;
|
|
377
|
+
overflow: hidden;
|
|
378
|
+
pointer-events: none;
|
|
379
|
+
white-space: nowrap;
|
|
380
|
+
width: 1px;
|
|
381
|
+
}
|
|
382
|
+
[data-rmiz-btn-zoom] {
|
|
383
|
+
position: absolute;
|
|
384
|
+
inset: 10px 10px auto auto;
|
|
385
|
+
cursor: zoom-in;
|
|
386
|
+
}
|
|
387
|
+
[data-rmiz-btn-unzoom] {
|
|
388
|
+
position: absolute;
|
|
389
|
+
inset: 20px 20px auto auto;
|
|
390
|
+
cursor: zoom-out;
|
|
391
|
+
z-index: 1;
|
|
392
|
+
}
|
|
393
|
+
[data-rmiz-content='found'] img,
|
|
394
|
+
[data-rmiz-content='found'] svg,
|
|
395
|
+
[data-rmiz-content='found'] [role='img'],
|
|
396
|
+
[data-rmiz-content='found'] [data-zoom] {
|
|
397
|
+
cursor: inherit;
|
|
398
|
+
}
|
|
399
|
+
[data-rmiz-modal]::backdrop {
|
|
400
|
+
display: none;
|
|
401
|
+
}
|
|
402
|
+
[data-rmiz-modal][open] {
|
|
403
|
+
position: fixed;
|
|
404
|
+
width: 100vw;
|
|
405
|
+
width: 100dvw;
|
|
406
|
+
height: 100vh;
|
|
407
|
+
height: 100dvh;
|
|
408
|
+
max-width: none;
|
|
409
|
+
max-height: none;
|
|
410
|
+
margin: 0;
|
|
411
|
+
padding: 0;
|
|
412
|
+
border: 0;
|
|
413
|
+
background: transparent;
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
}
|
|
416
|
+
[data-rmiz-modal-overlay] {
|
|
417
|
+
position: absolute;
|
|
418
|
+
inset: 0;
|
|
419
|
+
transition: background-color 0.3s;
|
|
420
|
+
}
|
|
421
|
+
[data-rmiz-modal-overlay='hidden'] {
|
|
422
|
+
background-color: rgba(255, 255, 255, 0);
|
|
423
|
+
}
|
|
424
|
+
[data-rmiz-modal-overlay='visible'] {
|
|
425
|
+
background-color: rgba(255, 255, 255, 1);
|
|
426
|
+
}
|
|
427
|
+
[data-rmiz-modal-content] {
|
|
428
|
+
position: relative;
|
|
429
|
+
width: 100%;
|
|
430
|
+
height: 100%;
|
|
431
|
+
}
|
|
432
|
+
[data-rmiz-modal-img] {
|
|
433
|
+
position: absolute;
|
|
434
|
+
cursor: zoom-out;
|
|
435
|
+
image-rendering: high-quality;
|
|
436
|
+
transform-origin: top left;
|
|
437
|
+
transition: transform 0.3s;
|
|
438
|
+
}
|
|
439
|
+
@media (prefers-reduced-motion: reduce) {
|
|
440
|
+
[data-rmiz-modal-overlay],
|
|
441
|
+
[data-rmiz-modal-img] {
|
|
442
|
+
transition-duration: 0.01ms !important;
|
|
443
|
+
}
|
|
444
|
+
}
|