@longd/layout-ui 0.1.0 → 0.1.2
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/README.md +257 -1
- package/dist/CATEditor-C-b6vybW.d.cts +381 -0
- package/dist/CATEditor-CLp6jZAf.d.ts +381 -0
- package/dist/chunk-BLJWR4ZV.js +11 -0
- package/dist/chunk-BLJWR4ZV.js.map +1 -0
- package/dist/{chunk-CZ3IMHZ6.js → chunk-H7SY4VJU.js} +7 -11
- package/dist/chunk-H7SY4VJU.js.map +1 -0
- package/dist/chunk-YXQGAND3.js +137 -0
- package/dist/chunk-YXQGAND3.js.map +1 -0
- package/dist/chunk-ZME2TTK5.js +2527 -0
- package/dist/chunk-ZME2TTK5.js.map +1 -0
- package/dist/index.cjs +2612 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +504 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13 -2
- package/dist/layout/cat-editor.cjs +2669 -0
- package/dist/layout/cat-editor.cjs.map +1 -0
- package/dist/layout/cat-editor.css +504 -0
- package/dist/layout/cat-editor.css.map +1 -0
- package/dist/layout/cat-editor.d.cts +28 -0
- package/dist/layout/cat-editor.d.ts +28 -0
- package/dist/layout/cat-editor.js +29 -0
- package/dist/layout/cat-editor.js.map +1 -0
- package/dist/layout/select.cjs +2 -1
- package/dist/layout/select.cjs.map +1 -1
- package/dist/layout/select.js +2 -1
- package/dist/utils/detect-quotes.cjs +162 -0
- package/dist/utils/detect-quotes.cjs.map +1 -0
- package/dist/utils/detect-quotes.d.cts +88 -0
- package/dist/utils/detect-quotes.d.ts +88 -0
- package/dist/utils/detect-quotes.js +9 -0
- package/dist/utils/detect-quotes.js.map +1 -0
- package/package.json +39 -3
- package/dist/chunk-CZ3IMHZ6.js.map +0 -1
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
/* src/layout/cat-editor/style.css */
|
|
2
|
+
.cat-editor-container {
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
.cat-editor-inner {
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
.cat-editor-root {
|
|
9
|
+
outline: none;
|
|
10
|
+
}
|
|
11
|
+
.cat-editor-editable {
|
|
12
|
+
min-height: 200px;
|
|
13
|
+
padding: 1rem 1.25rem;
|
|
14
|
+
font-size: 0.9375rem;
|
|
15
|
+
line-height: 1.75;
|
|
16
|
+
color: var(--foreground);
|
|
17
|
+
outline: none;
|
|
18
|
+
caret-color: var(--foreground);
|
|
19
|
+
}
|
|
20
|
+
.cat-editor-editable:focus {
|
|
21
|
+
outline: none;
|
|
22
|
+
}
|
|
23
|
+
.cat-editor-readonly {
|
|
24
|
+
cursor: default;
|
|
25
|
+
user-select: none;
|
|
26
|
+
caret-color: transparent;
|
|
27
|
+
opacity: 0.75;
|
|
28
|
+
}
|
|
29
|
+
.cat-editor-readonly-selectable {
|
|
30
|
+
cursor: text;
|
|
31
|
+
}
|
|
32
|
+
.cat-editor-jp-font .cat-editor-editable {
|
|
33
|
+
font-family:
|
|
34
|
+
"Noto Sans JP",
|
|
35
|
+
"Hiragino Kaku Gothic ProN",
|
|
36
|
+
"Hiragino Sans",
|
|
37
|
+
"Yu Gothic",
|
|
38
|
+
"Meiryo",
|
|
39
|
+
sans-serif;
|
|
40
|
+
}
|
|
41
|
+
.cat-editor-paragraph {
|
|
42
|
+
margin: 0;
|
|
43
|
+
}
|
|
44
|
+
.cat-editor-placeholder {
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 1rem;
|
|
47
|
+
left: 1.25rem;
|
|
48
|
+
color: var(--muted-foreground);
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
user-select: none;
|
|
51
|
+
font-size: 0.9375rem;
|
|
52
|
+
opacity: 0.6;
|
|
53
|
+
}
|
|
54
|
+
.cat-editor-container[dir=rtl] .cat-editor-placeholder {
|
|
55
|
+
left: auto;
|
|
56
|
+
right: 1.25rem;
|
|
57
|
+
text-align: right;
|
|
58
|
+
}
|
|
59
|
+
.cat-editor-container[dir=rtl] .cat-editor-editable {
|
|
60
|
+
text-align: right;
|
|
61
|
+
}
|
|
62
|
+
.cat-highlight {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
border-radius: 2px;
|
|
65
|
+
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
.cat-highlight-spellcheck {
|
|
69
|
+
background-color: var(--cat-spellcheck-bg, oklch(0.7 0.2 25 / 0.12));
|
|
70
|
+
border-bottom: 2px wavy var(--cat-spellcheck-underline, oklch(0.6 0.25 25));
|
|
71
|
+
}
|
|
72
|
+
.cat-highlight-spellcheck:hover {
|
|
73
|
+
background-color: var(--cat-spellcheck-bg-hover, oklch(0.7 0.2 25 / 0.25));
|
|
74
|
+
}
|
|
75
|
+
.cat-highlight-glossary {
|
|
76
|
+
background-color: var(--cat-glossary-bg, oklch(0.7 0.15 280 / 0.12));
|
|
77
|
+
border-bottom: 2px solid var(--cat-glossary-underline, oklch(0.6 0.2 280));
|
|
78
|
+
}
|
|
79
|
+
.cat-highlight-glossary:hover {
|
|
80
|
+
background-color: var(--cat-glossary-bg-hover, oklch(0.7 0.15 280 / 0.25));
|
|
81
|
+
}
|
|
82
|
+
.cat-highlight-glossary-tb-target {
|
|
83
|
+
--cat-glossary-bg: oklch(0.7 0.12 175 / 0.12);
|
|
84
|
+
--cat-glossary-underline: oklch(0.55 0.15 175);
|
|
85
|
+
--cat-glossary-bg-hover: oklch(0.7 0.12 175 / 0.25);
|
|
86
|
+
border-bottom-style: dashed;
|
|
87
|
+
}
|
|
88
|
+
.cat-highlight-glossary-search {
|
|
89
|
+
--cat-glossary-bg: oklch(0.9 0.16 95 / 0.45);
|
|
90
|
+
--cat-glossary-underline: oklch(0.65 0.18 85);
|
|
91
|
+
--cat-glossary-bg-hover: oklch(0.9 0.16 95 / 0.65);
|
|
92
|
+
}
|
|
93
|
+
.cat-highlight-special-char {
|
|
94
|
+
background-color: var(--cat-special-char-bg, oklch(0.75 0.14 70 / 0.14));
|
|
95
|
+
border-bottom: 2px dotted var(--cat-special-char-underline, oklch(0.6 0.18 70));
|
|
96
|
+
}
|
|
97
|
+
.cat-highlight-special-char:hover {
|
|
98
|
+
background-color: var( --cat-special-char-bg-hover, oklch(0.75 0.14 70 / 0.28) );
|
|
99
|
+
}
|
|
100
|
+
.cat-highlight-tag {
|
|
101
|
+
background-color: var(--cat-tag-bg, oklch(0.78 0.1 210 / 0.12));
|
|
102
|
+
border-bottom: 2px solid var(--cat-tag-underline, oklch(0.55 0.13 210));
|
|
103
|
+
color: var(--cat-tag-text, inherit);
|
|
104
|
+
}
|
|
105
|
+
.cat-highlight-tag:hover {
|
|
106
|
+
background-color: var(--cat-tag-bg-hover, oklch(0.78 0.1 210 / 0.25));
|
|
107
|
+
}
|
|
108
|
+
.cat-highlight-link {
|
|
109
|
+
background-color: var(--cat-link-bg, oklch(0.78 0.1 240 / 0.1));
|
|
110
|
+
border-bottom: 1px solid var(--cat-link-underline, oklch(0.55 0.18 240));
|
|
111
|
+
color: var(--cat-link-text, oklch(0.45 0.18 240));
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
text-decoration: none;
|
|
114
|
+
}
|
|
115
|
+
.cat-highlight-link:hover {
|
|
116
|
+
background-color: var(--cat-link-bg-hover, oklch(0.78 0.1 240 / 0.22));
|
|
117
|
+
border-bottom-width: 2px;
|
|
118
|
+
}
|
|
119
|
+
.cat-highlight-mention {
|
|
120
|
+
background-color: var(--cat-mention-bg, oklch(0.78 0.12 300 / 0.12));
|
|
121
|
+
border-bottom: 2px solid var(--cat-mention-underline, oklch(0.55 0.18 300));
|
|
122
|
+
color: var(--cat-mention-text, oklch(0.4 0.18 300));
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
}
|
|
125
|
+
.cat-highlight-mention:hover {
|
|
126
|
+
background-color: var(--cat-mention-bg-hover, oklch(0.78 0.12 300 / 0.25));
|
|
127
|
+
}
|
|
128
|
+
.cat-mention-node {
|
|
129
|
+
display: inline;
|
|
130
|
+
padding: 0.0625rem 0.3rem;
|
|
131
|
+
border-radius: 0.25rem;
|
|
132
|
+
background-color: var(--cat-mention-bg, oklch(0.78 0.12 300 / 0.15));
|
|
133
|
+
border-bottom: 2px solid var(--cat-mention-underline, oklch(0.55 0.18 300));
|
|
134
|
+
color: var(--cat-mention-text, oklch(0.4 0.18 300));
|
|
135
|
+
font-weight: 500;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
}
|
|
139
|
+
.cat-mention-node:hover {
|
|
140
|
+
background-color: var(--cat-mention-bg-hover, oklch(0.78 0.12 300 / 0.3));
|
|
141
|
+
}
|
|
142
|
+
.cat-mention-label {
|
|
143
|
+
}
|
|
144
|
+
.cat-mention-avatar {
|
|
145
|
+
display: inline-block;
|
|
146
|
+
border-radius: 9999px;
|
|
147
|
+
vertical-align: text-bottom;
|
|
148
|
+
object-fit: cover;
|
|
149
|
+
margin-right: 0.125rem;
|
|
150
|
+
}
|
|
151
|
+
.cat-mention-initials {
|
|
152
|
+
display: inline-flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
border-radius: 9999px;
|
|
156
|
+
background: oklch(0.7 0.1 300 / 0.3);
|
|
157
|
+
color: oklch(0.4 0.18 300);
|
|
158
|
+
font-weight: 600;
|
|
159
|
+
vertical-align: text-bottom;
|
|
160
|
+
margin-right: 0.125rem;
|
|
161
|
+
}
|
|
162
|
+
.cat-mention-popover {
|
|
163
|
+
background: var(--popover);
|
|
164
|
+
color: var(--popover-foreground);
|
|
165
|
+
border: 1px solid var(--border);
|
|
166
|
+
border-radius: var(--radius);
|
|
167
|
+
box-shadow: 0 4px 16px oklch(0 0 0 / 0.1), 0 1px 4px oklch(0 0 0 / 0.06);
|
|
168
|
+
min-width: 200px;
|
|
169
|
+
max-width: 320px;
|
|
170
|
+
padding: 0.25rem;
|
|
171
|
+
animation: cat-popover-in 0.15s ease-out;
|
|
172
|
+
z-index: 1000;
|
|
173
|
+
}
|
|
174
|
+
.cat-highlight-tag.cat-highlight-glossary-search {
|
|
175
|
+
background-color: var(--cat-glossary-bg, oklch(0.9 0.16 95 / 0.45));
|
|
176
|
+
border-bottom-color: var(--cat-glossary-underline, oklch(0.65 0.18 85));
|
|
177
|
+
}
|
|
178
|
+
.cat-highlight-tag.cat-highlight-glossary-search:hover {
|
|
179
|
+
background-color: var(--cat-glossary-bg-hover, oklch(0.9 0.16 95 / 0.65));
|
|
180
|
+
}
|
|
181
|
+
.cat-tags-collapsed .cat-highlight-tag.cat-highlight-tag-collapsed {
|
|
182
|
+
border-bottom: none !important;
|
|
183
|
+
background: none !important;
|
|
184
|
+
background-image: none !important;
|
|
185
|
+
vertical-align: baseline;
|
|
186
|
+
padding: 0 !important;
|
|
187
|
+
}
|
|
188
|
+
.cat-highlight-tag-collapsed {
|
|
189
|
+
color: transparent !important;
|
|
190
|
+
caret-color: var(--foreground, #000);
|
|
191
|
+
}
|
|
192
|
+
.cat-highlight-tag-collapsed::before {
|
|
193
|
+
content: attr(data-display);
|
|
194
|
+
color: var(--cat-tag-collapsed-text, oklch(0.4 0.15 210));
|
|
195
|
+
background-color: var(--cat-tag-collapsed-bg, oklch(0.78 0.1 210 / 0.18));
|
|
196
|
+
border-radius: 3px;
|
|
197
|
+
padding: 0.0625rem 0.25rem;
|
|
198
|
+
font-weight: 600;
|
|
199
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
200
|
+
font-size: 0.8125rem;
|
|
201
|
+
line-height: 1.75;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
vertical-align: baseline;
|
|
204
|
+
pointer-events: none;
|
|
205
|
+
white-space: nowrap;
|
|
206
|
+
}
|
|
207
|
+
.cat-highlight-tag-collapsed:hover::before {
|
|
208
|
+
background-color: var( --cat-tag-collapsed-bg-hover, oklch(0.78 0.1 210 / 0.35) );
|
|
209
|
+
}
|
|
210
|
+
.cat-tags-collapsed .cat-highlight-tag-collapsed:hover {
|
|
211
|
+
background: none !important;
|
|
212
|
+
}
|
|
213
|
+
.cat-highlight-space-char {
|
|
214
|
+
color: transparent !important;
|
|
215
|
+
caret-color: var(--foreground, #000);
|
|
216
|
+
}
|
|
217
|
+
.cat-highlight-space-char::before {
|
|
218
|
+
content: "\b7";
|
|
219
|
+
color: oklch(0.55 0.1 70);
|
|
220
|
+
position: absolute;
|
|
221
|
+
width: 100%;
|
|
222
|
+
text-align: center;
|
|
223
|
+
pointer-events: none;
|
|
224
|
+
left: 0;
|
|
225
|
+
}
|
|
226
|
+
.cat-highlight-quote-char {
|
|
227
|
+
color: transparent !important;
|
|
228
|
+
caret-color: var(--foreground, #000);
|
|
229
|
+
}
|
|
230
|
+
.cat-highlight-quote-char::before {
|
|
231
|
+
content: attr(data-display);
|
|
232
|
+
color: oklch(0.6 0.15 50);
|
|
233
|
+
font-size: 0.9375rem;
|
|
234
|
+
pointer-events: none;
|
|
235
|
+
white-space: nowrap;
|
|
236
|
+
}
|
|
237
|
+
.cat-highlight-nl-marker {
|
|
238
|
+
cursor: default;
|
|
239
|
+
background-color: transparent !important;
|
|
240
|
+
border-bottom: none !important;
|
|
241
|
+
background-image: none !important;
|
|
242
|
+
color: oklch(0.55 0.1 70) !important;
|
|
243
|
+
opacity: 0.7;
|
|
244
|
+
font-size: 0.875rem !important;
|
|
245
|
+
font-family:
|
|
246
|
+
"Segoe UI Symbol",
|
|
247
|
+
"Apple Symbols",
|
|
248
|
+
"Noto Sans Symbols 2",
|
|
249
|
+
system-ui,
|
|
250
|
+
sans-serif !important;
|
|
251
|
+
font-style: normal !important;
|
|
252
|
+
font-weight: 400 !important;
|
|
253
|
+
user-select: none;
|
|
254
|
+
}
|
|
255
|
+
.cat-highlight-nl-marker:hover {
|
|
256
|
+
opacity: 1;
|
|
257
|
+
background-color: oklch(0.75 0.14 70 / 0.14) !important;
|
|
258
|
+
}
|
|
259
|
+
.cat-highlight-nested {
|
|
260
|
+
background-image:
|
|
261
|
+
repeating-linear-gradient(
|
|
262
|
+
-45deg,
|
|
263
|
+
transparent,
|
|
264
|
+
transparent 3px,
|
|
265
|
+
oklch(0.5 0 0 / 0.06) 3px,
|
|
266
|
+
oklch(0.5 0 0 / 0.06) 4px);
|
|
267
|
+
border-bottom-style: double;
|
|
268
|
+
border-bottom-width: 3px;
|
|
269
|
+
}
|
|
270
|
+
.cat-highlight-flash {
|
|
271
|
+
background-color: oklch(0.78 0.16 350 / 0.35) !important;
|
|
272
|
+
border-bottom-color: oklch(0.6 0.22 350) !important;
|
|
273
|
+
transition: background-color 0.2s ease;
|
|
274
|
+
}
|
|
275
|
+
.cat-highlight-flash.cat-highlight-tag-collapsed::before {
|
|
276
|
+
background-color: oklch(0.78 0.16 350 / 0.35) !important;
|
|
277
|
+
}
|
|
278
|
+
.cat-highlight-flash.cat-highlight-quote-char::before {
|
|
279
|
+
color: oklch(0.5 0.22 350) !important;
|
|
280
|
+
}
|
|
281
|
+
.dark .cat-highlight-spellcheck {
|
|
282
|
+
background-color: var(--cat-spellcheck-bg, oklch(0.5 0.2 25 / 0.25));
|
|
283
|
+
border-bottom-color: var(--cat-spellcheck-underline, oklch(0.65 0.24 25));
|
|
284
|
+
}
|
|
285
|
+
.dark .cat-highlight-spellcheck:hover {
|
|
286
|
+
background-color: var(--cat-spellcheck-bg-hover, oklch(0.5 0.2 25 / 0.4));
|
|
287
|
+
}
|
|
288
|
+
.dark .cat-highlight-glossary {
|
|
289
|
+
background-color: var(--cat-glossary-bg, oklch(0.5 0.17 280 / 0.25));
|
|
290
|
+
border-bottom-color: var(--cat-glossary-underline, oklch(0.65 0.2 280));
|
|
291
|
+
}
|
|
292
|
+
.dark .cat-highlight-glossary:hover {
|
|
293
|
+
background-color: var(--cat-glossary-bg-hover, oklch(0.5 0.17 280 / 0.4));
|
|
294
|
+
}
|
|
295
|
+
.dark .cat-highlight-glossary-tb-target {
|
|
296
|
+
--cat-glossary-bg: oklch(0.45 0.12 175 / 0.25);
|
|
297
|
+
--cat-glossary-underline: oklch(0.6 0.14 175);
|
|
298
|
+
--cat-glossary-bg-hover: oklch(0.45 0.12 175 / 0.4);
|
|
299
|
+
}
|
|
300
|
+
.dark .cat-highlight-glossary-search {
|
|
301
|
+
--cat-glossary-bg: oklch(0.6 0.16 85 / 0.45);
|
|
302
|
+
--cat-glossary-underline: oklch(0.75 0.18 85);
|
|
303
|
+
--cat-glossary-bg-hover: oklch(0.6 0.16 85 / 0.65);
|
|
304
|
+
}
|
|
305
|
+
.dark .cat-highlight-special-char {
|
|
306
|
+
background-color: var(--cat-special-char-bg, oklch(0.5 0.16 70 / 0.25));
|
|
307
|
+
border-bottom-color: var(--cat-special-char-underline, oklch(0.65 0.18 70));
|
|
308
|
+
}
|
|
309
|
+
.dark .cat-highlight-special-char:hover {
|
|
310
|
+
background-color: var(--cat-special-char-bg-hover, oklch(0.5 0.16 70 / 0.4));
|
|
311
|
+
}
|
|
312
|
+
.dark .cat-highlight-tag {
|
|
313
|
+
background-color: var(--cat-tag-bg, oklch(0.45 0.12 210 / 0.25));
|
|
314
|
+
border-bottom-color: var(--cat-tag-underline, oklch(0.6 0.14 210));
|
|
315
|
+
}
|
|
316
|
+
.dark .cat-highlight-tag:hover {
|
|
317
|
+
background-color: var(--cat-tag-bg-hover, oklch(0.45 0.12 210 / 0.4));
|
|
318
|
+
}
|
|
319
|
+
.dark .cat-highlight-link {
|
|
320
|
+
background-color: var(--cat-link-bg, oklch(0.45 0.12 240 / 0.25));
|
|
321
|
+
border-bottom-color: var(--cat-link-underline, oklch(0.65 0.18 240));
|
|
322
|
+
color: var(--cat-link-text, oklch(0.75 0.16 240));
|
|
323
|
+
}
|
|
324
|
+
.dark .cat-highlight-link:hover {
|
|
325
|
+
background-color: var(--cat-link-bg-hover, oklch(0.45 0.12 240 / 0.4));
|
|
326
|
+
}
|
|
327
|
+
.dark .cat-highlight-mention {
|
|
328
|
+
background-color: var(--cat-mention-bg, oklch(0.45 0.14 300 / 0.25));
|
|
329
|
+
border-bottom-color: var(--cat-mention-underline, oklch(0.65 0.18 300));
|
|
330
|
+
color: var(--cat-mention-text, oklch(0.8 0.16 300));
|
|
331
|
+
}
|
|
332
|
+
.dark .cat-highlight-mention:hover {
|
|
333
|
+
background-color: var(--cat-mention-bg-hover, oklch(0.45 0.14 300 / 0.4));
|
|
334
|
+
}
|
|
335
|
+
.dark .cat-mention-node {
|
|
336
|
+
background-color: var(--cat-mention-bg, oklch(0.45 0.14 300 / 0.3));
|
|
337
|
+
border-bottom-color: var(--cat-mention-underline, oklch(0.65 0.18 300));
|
|
338
|
+
color: var(--cat-mention-text, oklch(0.8 0.16 300));
|
|
339
|
+
}
|
|
340
|
+
.dark .cat-mention-node:hover {
|
|
341
|
+
background-color: var(--cat-mention-bg-hover, oklch(0.45 0.14 300 / 0.45));
|
|
342
|
+
}
|
|
343
|
+
.dark .cat-mention-initials {
|
|
344
|
+
background: oklch(0.5 0.12 300 / 0.4);
|
|
345
|
+
color: oklch(0.8 0.16 300);
|
|
346
|
+
}
|
|
347
|
+
.dark .cat-mention-popover {
|
|
348
|
+
box-shadow: 0 4px 24px oklch(0 0 0 / 0.4), 0 1px 4px oklch(0 0 0 / 0.2);
|
|
349
|
+
}
|
|
350
|
+
.dark .cat-highlight-tag.cat-highlight-glossary-search {
|
|
351
|
+
background-color: var(--cat-glossary-bg, oklch(0.6 0.16 85 / 0.45));
|
|
352
|
+
border-bottom-color: var(--cat-glossary-underline, oklch(0.75 0.18 85));
|
|
353
|
+
}
|
|
354
|
+
.dark .cat-highlight-tag.cat-highlight-glossary-search:hover {
|
|
355
|
+
background-color: var(--cat-glossary-bg-hover, oklch(0.6 0.16 85 / 0.65));
|
|
356
|
+
}
|
|
357
|
+
.dark .cat-highlight-tag-collapsed::before {
|
|
358
|
+
color: var(--cat-tag-collapsed-text, oklch(0.8 0.12 210));
|
|
359
|
+
background-color: var(--cat-tag-collapsed-bg, oklch(0.4 0.1 210 / 0.4));
|
|
360
|
+
}
|
|
361
|
+
.dark .cat-highlight-tag-collapsed:hover::before {
|
|
362
|
+
background-color: var( --cat-tag-collapsed-bg-hover, oklch(0.4 0.1 210 / 0.55) );
|
|
363
|
+
}
|
|
364
|
+
.dark .cat-highlight-space-char::before {
|
|
365
|
+
color: oklch(0.65 0.14 70);
|
|
366
|
+
}
|
|
367
|
+
.dark .cat-highlight-quote-char::before {
|
|
368
|
+
color: oklch(0.75 0.17 50);
|
|
369
|
+
}
|
|
370
|
+
.dark .cat-highlight-nested {
|
|
371
|
+
background-image:
|
|
372
|
+
repeating-linear-gradient(
|
|
373
|
+
-45deg,
|
|
374
|
+
transparent,
|
|
375
|
+
transparent 3px,
|
|
376
|
+
oklch(0.7 0 0 / 0.08) 3px,
|
|
377
|
+
oklch(0.7 0 0 / 0.08) 4px);
|
|
378
|
+
}
|
|
379
|
+
.cat-popover {
|
|
380
|
+
background: var(--popover);
|
|
381
|
+
color: var(--popover-foreground);
|
|
382
|
+
border: 1px solid var(--border);
|
|
383
|
+
border-radius: var(--radius);
|
|
384
|
+
box-shadow: 0 4px 16px oklch(0 0 0 / 0.1), 0 1px 4px oklch(0 0 0 / 0.06);
|
|
385
|
+
animation: cat-popover-in 0.15s ease-out;
|
|
386
|
+
max-width: 380px;
|
|
387
|
+
}
|
|
388
|
+
.dark .cat-popover {
|
|
389
|
+
box-shadow: 0 4px 24px oklch(0 0 0 / 0.4), 0 1px 4px oklch(0 0 0 / 0.2);
|
|
390
|
+
}
|
|
391
|
+
@keyframes cat-popover-in {
|
|
392
|
+
from {
|
|
393
|
+
opacity: 0;
|
|
394
|
+
translate: 0 -4px;
|
|
395
|
+
}
|
|
396
|
+
to {
|
|
397
|
+
opacity: 1;
|
|
398
|
+
translate: 0 0;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
.cat-badge {
|
|
402
|
+
display: inline-flex;
|
|
403
|
+
align-items: center;
|
|
404
|
+
padding: 0.125rem 0.5rem;
|
|
405
|
+
border-radius: 9999px;
|
|
406
|
+
font-size: 0.6875rem;
|
|
407
|
+
font-weight: 600;
|
|
408
|
+
text-transform: uppercase;
|
|
409
|
+
letter-spacing: 0.05em;
|
|
410
|
+
line-height: 1.5;
|
|
411
|
+
}
|
|
412
|
+
.cat-badge-spell {
|
|
413
|
+
background: oklch(0.7 0.2 25 / 0.15);
|
|
414
|
+
color: oklch(0.5 0.2 25);
|
|
415
|
+
}
|
|
416
|
+
.dark .cat-badge-spell {
|
|
417
|
+
background: oklch(0.5 0.2 25 / 0.3);
|
|
418
|
+
color: oklch(0.75 0.2 25);
|
|
419
|
+
}
|
|
420
|
+
.cat-badge-glossary {
|
|
421
|
+
background: oklch(0.7 0.15 280 / 0.15);
|
|
422
|
+
color: oklch(0.5 0.2 280);
|
|
423
|
+
}
|
|
424
|
+
.dark .cat-badge-glossary {
|
|
425
|
+
background: oklch(0.5 0.17 280 / 0.3);
|
|
426
|
+
color: oklch(0.75 0.18 280);
|
|
427
|
+
}
|
|
428
|
+
.cat-badge-glossary-tb-target {
|
|
429
|
+
background: oklch(0.7 0.12 175 / 0.15);
|
|
430
|
+
color: oklch(0.45 0.15 175);
|
|
431
|
+
}
|
|
432
|
+
.dark .cat-badge-glossary-tb-target {
|
|
433
|
+
background: oklch(0.45 0.12 175 / 0.3);
|
|
434
|
+
color: oklch(0.7 0.14 175);
|
|
435
|
+
}
|
|
436
|
+
.cat-badge-glossary-search {
|
|
437
|
+
background: oklch(0.9 0.16 95 / 0.35);
|
|
438
|
+
color: oklch(0.4 0.15 85);
|
|
439
|
+
}
|
|
440
|
+
.dark .cat-badge-glossary-search {
|
|
441
|
+
background: oklch(0.6 0.16 85 / 0.4);
|
|
442
|
+
color: oklch(0.85 0.16 85);
|
|
443
|
+
}
|
|
444
|
+
.cat-badge-special-char {
|
|
445
|
+
background: oklch(0.75 0.14 70 / 0.15);
|
|
446
|
+
color: oklch(0.45 0.18 70);
|
|
447
|
+
}
|
|
448
|
+
.dark .cat-badge-special-char {
|
|
449
|
+
background: oklch(0.45 0.14 70 / 0.3);
|
|
450
|
+
color: oklch(0.75 0.16 70);
|
|
451
|
+
}
|
|
452
|
+
.cat-badge-tag {
|
|
453
|
+
background: oklch(0.78 0.1 210 / 0.15);
|
|
454
|
+
color: oklch(0.4 0.13 210);
|
|
455
|
+
}
|
|
456
|
+
.dark .cat-badge-tag {
|
|
457
|
+
background: oklch(0.4 0.1 210 / 0.35);
|
|
458
|
+
color: oklch(0.75 0.12 210);
|
|
459
|
+
}
|
|
460
|
+
.cat-badge-link {
|
|
461
|
+
background: oklch(0.78 0.1 240 / 0.15);
|
|
462
|
+
color: oklch(0.4 0.15 240);
|
|
463
|
+
}
|
|
464
|
+
.dark .cat-badge-link {
|
|
465
|
+
background: oklch(0.4 0.1 240 / 0.35);
|
|
466
|
+
color: oklch(0.75 0.14 240);
|
|
467
|
+
}
|
|
468
|
+
.cat-badge-mention {
|
|
469
|
+
background: oklch(0.78 0.12 300 / 0.15);
|
|
470
|
+
color: oklch(0.4 0.15 300);
|
|
471
|
+
}
|
|
472
|
+
.dark .cat-badge-mention {
|
|
473
|
+
background: oklch(0.4 0.12 300 / 0.35);
|
|
474
|
+
color: oklch(0.75 0.14 300);
|
|
475
|
+
}
|
|
476
|
+
.dark .cat-highlight-flash {
|
|
477
|
+
background-color: oklch(0.45 0.18 350 / 0.4) !important;
|
|
478
|
+
border-bottom-color: oklch(0.65 0.22 350) !important;
|
|
479
|
+
}
|
|
480
|
+
.dark .cat-highlight-flash.cat-highlight-tag-collapsed::before {
|
|
481
|
+
background-color: oklch(0.45 0.18 350 / 0.4) !important;
|
|
482
|
+
}
|
|
483
|
+
.dark .cat-highlight-flash.cat-highlight-quote-char::before {
|
|
484
|
+
color: oklch(0.7 0.22 350) !important;
|
|
485
|
+
}
|
|
486
|
+
.cat-suggestion-btn {
|
|
487
|
+
display: inline-flex;
|
|
488
|
+
align-items: center;
|
|
489
|
+
padding: 0.25rem 0.625rem;
|
|
490
|
+
font-size: 0.8125rem;
|
|
491
|
+
border-radius: var(--radius);
|
|
492
|
+
background: var(--secondary);
|
|
493
|
+
color: var(--secondary-foreground);
|
|
494
|
+
border: 1px solid var(--border);
|
|
495
|
+
cursor: pointer;
|
|
496
|
+
transition: all 0.15s ease;
|
|
497
|
+
font-weight: 500;
|
|
498
|
+
}
|
|
499
|
+
.cat-suggestion-btn:hover {
|
|
500
|
+
background: var(--primary);
|
|
501
|
+
color: var(--primary-foreground);
|
|
502
|
+
border-color: var(--primary);
|
|
503
|
+
}
|
|
504
|
+
/*# sourceMappingURL=cat-editor.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/layout/cat-editor/style.css"],"sourcesContent":["/* ─── CAT Editor ───────────────────────────────────────────────────────────── */\n\n.cat-editor-container {\n position: relative;\n}\n\n.cat-editor-inner {\n position: relative;\n}\n\n.cat-editor-root {\n outline: none;\n}\n\n.cat-editor-editable {\n min-height: 200px;\n padding: 1rem 1.25rem;\n font-size: 0.9375rem;\n line-height: 1.75;\n color: var(--foreground);\n outline: none;\n caret-color: var(--foreground);\n}\n\n.cat-editor-editable:focus {\n outline: none;\n}\n\n/* Read-only: fully non-interactive (no caret, no selection) */\n.cat-editor-readonly {\n cursor: default;\n user-select: none;\n caret-color: transparent;\n opacity: 0.75;\n}\n\n/* Read-only but selectable: caret visible, text can be selected & copied */\n.cat-editor-readonly-selectable {\n cursor: text;\n}\n\n/* ─── Japanese font stack ──────────────────────────────────────────────────── */\n\n.cat-editor-jp-font .cat-editor-editable {\n font-family:\n 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic',\n 'Meiryo', sans-serif;\n}\n\n.cat-editor-paragraph {\n margin: 0;\n}\n\n.cat-editor-placeholder {\n position: absolute;\n top: 1rem;\n left: 1.25rem;\n color: var(--muted-foreground);\n pointer-events: none;\n user-select: none;\n font-size: 0.9375rem;\n opacity: 0.6;\n}\n\n/* ─── RTL support ──────────────────────────────────────────────────────────── */\n\n.cat-editor-container[dir='rtl'] .cat-editor-placeholder {\n left: auto;\n right: 1.25rem;\n text-align: right;\n}\n\n.cat-editor-container[dir='rtl'] .cat-editor-editable {\n text-align: right;\n}\n\n/* ─── Highlight base ───────────────────────────────────────────────────────── */\n\n.cat-highlight {\n cursor: pointer;\n border-radius: 2px;\n transition:\n background-color 0.15s ease,\n border-color 0.15s ease;\n position: relative;\n}\n\n/* ── Variant CSS custom properties (override from outside) ─────────────────\n Usage:\n .my-editor { --cat-spellcheck-bg: oklch(0.8 0.1 25 / 0.2); }\n or per-rule:\n .cat-highlight-spellcheck { --cat-spellcheck-underline: red; }\n────────────────────────────────────────────────────────────────────────── */\n\n/* ─── Spellcheck: red wavy underline + subtle red background ───────────── */\n\n.cat-highlight-spellcheck {\n background-color: var(--cat-spellcheck-bg, oklch(0.7 0.2 25 / 0.12));\n border-bottom: 2px wavy var(--cat-spellcheck-underline, oklch(0.6 0.25 25));\n}\n.cat-highlight-spellcheck:hover {\n background-color: var(--cat-spellcheck-bg-hover, oklch(0.7 0.2 25 / 0.25));\n}\n\n/* ─── Glossary (generic term-match) ────────────────────────────────────── */\n\n.cat-highlight-glossary {\n background-color: var(--cat-glossary-bg, oklch(0.7 0.15 280 / 0.12));\n border-bottom: 2px solid var(--cat-glossary-underline, oklch(0.6 0.2 280));\n}\n.cat-highlight-glossary:hover {\n background-color: var(--cat-glossary-bg-hover, oklch(0.7 0.15 280 / 0.25));\n}\n\n/* Glossary – tb-target: teal dashed underline */\n.cat-highlight-glossary-tb-target {\n --cat-glossary-bg: oklch(0.7 0.12 175 / 0.12);\n --cat-glossary-underline: oklch(0.55 0.15 175);\n --cat-glossary-bg-hover: oklch(0.7 0.12 175 / 0.25);\n border-bottom-style: dashed;\n}\n\n/* Glossary – search: bold yellow highlight */\n.cat-highlight-glossary-search {\n --cat-glossary-bg: oklch(0.9 0.16 95 / 0.45);\n --cat-glossary-underline: oklch(0.65 0.18 85);\n --cat-glossary-bg-hover: oklch(0.9 0.16 95 / 0.65);\n}\n\n/* ─── Special char: amber/orange dotted underline ──────────────────────── */\n\n.cat-highlight-special-char {\n background-color: var(--cat-special-char-bg, oklch(0.75 0.14 70 / 0.14));\n border-bottom: 2px dotted\n var(--cat-special-char-underline, oklch(0.6 0.18 70));\n}\n.cat-highlight-special-char:hover {\n background-color: var(\n --cat-special-char-bg-hover,\n oklch(0.75 0.14 70 / 0.28)\n );\n}\n\n/* ─── Tag: cyan/sky highlight ──────────────────────────────────────────── */\n\n.cat-highlight-tag {\n background-color: var(--cat-tag-bg, oklch(0.78 0.1 210 / 0.12));\n border-bottom: 2px solid var(--cat-tag-underline, oklch(0.55 0.13 210));\n color: var(--cat-tag-text, inherit);\n}\n.cat-highlight-tag:hover {\n background-color: var(--cat-tag-bg-hover, oklch(0.78 0.1 210 / 0.25));\n}\n\n/* ─── Link: blue underline, clickable ──────────────────────────────────── */\n\n.cat-highlight-link {\n background-color: var(--cat-link-bg, oklch(0.78 0.1 240 / 0.1));\n border-bottom: 1px solid var(--cat-link-underline, oklch(0.55 0.18 240));\n color: var(--cat-link-text, oklch(0.45 0.18 240));\n cursor: pointer;\n text-decoration: none;\n}\n.cat-highlight-link:hover {\n background-color: var(--cat-link-bg-hover, oklch(0.78 0.1 240 / 0.22));\n border-bottom-width: 2px;\n}\n\n/* ─── Mention: purple/violet highlight ─────────────────────────────────── */\n\n.cat-highlight-mention {\n background-color: var(--cat-mention-bg, oklch(0.78 0.12 300 / 0.12));\n border-bottom: 2px solid var(--cat-mention-underline, oklch(0.55 0.18 300));\n color: var(--cat-mention-text, oklch(0.4 0.18 300));\n cursor: pointer;\n}\n.cat-highlight-mention:hover {\n background-color: var(--cat-mention-bg-hover, oklch(0.78 0.12 300 / 0.25));\n}\n/* ─── MentionNode (Lexical node, not highlight-based) ──────────────── */\n\n.cat-mention-node {\n display: inline;\n padding: 0.0625rem 0.3rem;\n border-radius: 0.25rem;\n background-color: var(--cat-mention-bg, oklch(0.78 0.12 300 / 0.15));\n border-bottom: 2px solid var(--cat-mention-underline, oklch(0.55 0.18 300));\n color: var(--cat-mention-text, oklch(0.4 0.18 300));\n font-weight: 500;\n cursor: pointer;\n white-space: nowrap;\n}\n.cat-mention-node:hover {\n background-color: var(--cat-mention-bg-hover, oklch(0.78 0.12 300 / 0.3));\n}\n\n.cat-mention-label {\n /* inherits color from parent .cat-mention-node */\n}\n\n.cat-mention-avatar {\n display: inline-block;\n border-radius: 9999px;\n vertical-align: text-bottom;\n object-fit: cover;\n margin-right: 0.125rem;\n}\n\n.cat-mention-initials {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 9999px;\n background: oklch(0.7 0.1 300 / 0.3);\n color: oklch(0.4 0.18 300);\n font-weight: 600;\n vertical-align: text-bottom;\n margin-right: 0.125rem;\n}\n\n/* ─── Mention typeahead popover ────────────────────────────────────── */\n\n.cat-mention-popover {\n background: var(--popover);\n color: var(--popover-foreground);\n border: 1px solid var(--border);\n border-radius: var(--radius);\n box-shadow:\n 0 4px 16px oklch(0 0 0 / 0.1),\n 0 1px 4px oklch(0 0 0 / 0.06);\n min-width: 200px;\n max-width: 320px;\n padding: 0.25rem;\n animation: cat-popover-in 0.15s ease-out;\n z-index: 1000;\n}\n/* When search overlaps a tag, search bg takes priority */\n.cat-highlight-tag.cat-highlight-glossary-search {\n background-color: var(--cat-glossary-bg, oklch(0.9 0.16 95 / 0.45));\n border-bottom-color: var(--cat-glossary-underline, oklch(0.65 0.18 85));\n}\n.cat-highlight-tag.cat-highlight-glossary-search:hover {\n background-color: var(--cat-glossary-bg-hover, oklch(0.9 0.16 95 / 0.65));\n}\n\n/* ─── Collapsed tag mode ───────────────────────────────────────────────── */\n\n.cat-tags-collapsed .cat-highlight-tag.cat-highlight-tag-collapsed {\n border-bottom: none !important;\n background: none !important;\n background-image: none !important;\n vertical-align: baseline;\n padding: 0 !important;\n}\n\n/* Zero-width space in DOM; visual pill rendered by ::before. */\n.cat-highlight-tag-collapsed {\n color: transparent !important;\n caret-color: var(--foreground, #000);\n}\n.cat-highlight-tag-collapsed::before {\n content: attr(data-display);\n color: var(--cat-tag-collapsed-text, oklch(0.4 0.15 210));\n background-color: var(--cat-tag-collapsed-bg, oklch(0.78 0.1 210 / 0.18));\n border-radius: 3px;\n padding: 0.0625rem 0.25rem;\n font-weight: 600;\n font-family: var(--font-mono, ui-monospace, monospace);\n font-size: 0.8125rem;\n line-height: 1.75;\n cursor: pointer;\n vertical-align: baseline;\n pointer-events: none;\n white-space: nowrap;\n}\n.cat-highlight-tag-collapsed:hover::before {\n background-color: var(\n --cat-tag-collapsed-bg-hover,\n oklch(0.78 0.1 210 / 0.35)\n );\n}\n.cat-tags-collapsed .cat-highlight-tag-collapsed:hover {\n background: none !important;\n}\n\n/* ─── Space char visual replacement ────────────────────────────────────── */\n\n.cat-highlight-space-char {\n color: transparent !important;\n caret-color: var(--foreground, #000);\n}\n.cat-highlight-space-char::before {\n content: '·';\n color: oklch(0.55 0.1 70);\n position: absolute;\n width: 100%;\n text-align: center;\n pointer-events: none;\n left: 0;\n}\n\n/* ─── Quote-char nodes ─────────────────────────────────────────────────── */\n\n.cat-highlight-quote-char {\n color: transparent !important;\n caret-color: var(--foreground, #000);\n}\n.cat-highlight-quote-char::before {\n content: attr(data-display);\n color: oklch(0.6 0.15 50);\n font-size: 0.9375rem;\n pointer-events: none;\n white-space: nowrap;\n}\n\n/* ─── NL-marker nodes (↩) ─────────────────────────────────────────────── */\n\n.cat-highlight-nl-marker {\n cursor: default;\n background-color: transparent !important;\n border-bottom: none !important;\n background-image: none !important;\n color: oklch(0.55 0.1 70) !important;\n opacity: 0.7;\n font-size: 0.875rem !important;\n font-family:\n 'Segoe UI Symbol', 'Apple Symbols', 'Noto Sans Symbols 2', system-ui,\n sans-serif !important;\n font-style: normal !important;\n font-weight: 400 !important;\n user-select: none;\n}\n.cat-highlight-nl-marker:hover {\n opacity: 1;\n background-color: oklch(0.75 0.14 70 / 0.14) !important;\n}\n\n/* ─── Nested highlights (overlapping rules) ────────────────────────────── */\n\n.cat-highlight-nested {\n background-image: repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 3px,\n oklch(0.5 0 0 / 0.06) 3px,\n oklch(0.5 0 0 / 0.06) 4px\n );\n border-bottom-style: double;\n border-bottom-width: 3px;\n}\n\n/* ─── Flash highlight (temporary pink overlay) ─────────────────────────── */\n\n.cat-highlight-flash {\n background-color: oklch(0.78 0.16 350 / 0.35) !important;\n border-bottom-color: oklch(0.6 0.22 350) !important;\n transition: background-color 0.2s ease;\n}\n.cat-highlight-flash.cat-highlight-tag-collapsed::before {\n background-color: oklch(0.78 0.16 350 / 0.35) !important;\n}\n.cat-highlight-flash.cat-highlight-quote-char::before {\n color: oklch(0.5 0.22 350) !important;\n}\n\n/* ═══════════════════════════════════════════════════════════════════════════\n Dark mode\n ═══════════════════════════════════════════════════════════════════════ */\n\n.dark .cat-highlight-spellcheck {\n background-color: var(--cat-spellcheck-bg, oklch(0.5 0.2 25 / 0.25));\n border-bottom-color: var(--cat-spellcheck-underline, oklch(0.65 0.24 25));\n}\n.dark .cat-highlight-spellcheck:hover {\n background-color: var(--cat-spellcheck-bg-hover, oklch(0.5 0.2 25 / 0.4));\n}\n\n.dark .cat-highlight-glossary {\n background-color: var(--cat-glossary-bg, oklch(0.5 0.17 280 / 0.25));\n border-bottom-color: var(--cat-glossary-underline, oklch(0.65 0.2 280));\n}\n.dark .cat-highlight-glossary:hover {\n background-color: var(--cat-glossary-bg-hover, oklch(0.5 0.17 280 / 0.4));\n}\n\n.dark .cat-highlight-glossary-tb-target {\n --cat-glossary-bg: oklch(0.45 0.12 175 / 0.25);\n --cat-glossary-underline: oklch(0.6 0.14 175);\n --cat-glossary-bg-hover: oklch(0.45 0.12 175 / 0.4);\n}\n\n.dark .cat-highlight-glossary-search {\n --cat-glossary-bg: oklch(0.6 0.16 85 / 0.45);\n --cat-glossary-underline: oklch(0.75 0.18 85);\n --cat-glossary-bg-hover: oklch(0.6 0.16 85 / 0.65);\n}\n\n.dark .cat-highlight-special-char {\n background-color: var(--cat-special-char-bg, oklch(0.5 0.16 70 / 0.25));\n border-bottom-color: var(--cat-special-char-underline, oklch(0.65 0.18 70));\n}\n.dark .cat-highlight-special-char:hover {\n background-color: var(--cat-special-char-bg-hover, oklch(0.5 0.16 70 / 0.4));\n}\n\n.dark .cat-highlight-tag {\n background-color: var(--cat-tag-bg, oklch(0.45 0.12 210 / 0.25));\n border-bottom-color: var(--cat-tag-underline, oklch(0.6 0.14 210));\n}\n.dark .cat-highlight-tag:hover {\n background-color: var(--cat-tag-bg-hover, oklch(0.45 0.12 210 / 0.4));\n}\n\n.dark .cat-highlight-link {\n background-color: var(--cat-link-bg, oklch(0.45 0.12 240 / 0.25));\n border-bottom-color: var(--cat-link-underline, oklch(0.65 0.18 240));\n color: var(--cat-link-text, oklch(0.75 0.16 240));\n}\n.dark .cat-highlight-link:hover {\n background-color: var(--cat-link-bg-hover, oklch(0.45 0.12 240 / 0.4));\n}\n\n.dark .cat-highlight-mention {\n background-color: var(--cat-mention-bg, oklch(0.45 0.14 300 / 0.25));\n border-bottom-color: var(--cat-mention-underline, oklch(0.65 0.18 300));\n color: var(--cat-mention-text, oklch(0.8 0.16 300));\n}\n.dark .cat-highlight-mention:hover {\n background-color: var(--cat-mention-bg-hover, oklch(0.45 0.14 300 / 0.4));\n}\n\n.dark .cat-mention-node {\n background-color: var(--cat-mention-bg, oklch(0.45 0.14 300 / 0.3));\n border-bottom-color: var(--cat-mention-underline, oklch(0.65 0.18 300));\n color: var(--cat-mention-text, oklch(0.8 0.16 300));\n}\n.dark .cat-mention-node:hover {\n background-color: var(--cat-mention-bg-hover, oklch(0.45 0.14 300 / 0.45));\n}\n\n.dark .cat-mention-initials {\n background: oklch(0.5 0.12 300 / 0.4);\n color: oklch(0.8 0.16 300);\n}\n\n.dark .cat-mention-popover {\n box-shadow:\n 0 4px 24px oklch(0 0 0 / 0.4),\n 0 1px 4px oklch(0 0 0 / 0.2);\n}\n\n.dark .cat-highlight-tag.cat-highlight-glossary-search {\n background-color: var(--cat-glossary-bg, oklch(0.6 0.16 85 / 0.45));\n border-bottom-color: var(--cat-glossary-underline, oklch(0.75 0.18 85));\n}\n.dark .cat-highlight-tag.cat-highlight-glossary-search:hover {\n background-color: var(--cat-glossary-bg-hover, oklch(0.6 0.16 85 / 0.65));\n}\n\n.dark .cat-highlight-tag-collapsed::before {\n color: var(--cat-tag-collapsed-text, oklch(0.8 0.12 210));\n background-color: var(--cat-tag-collapsed-bg, oklch(0.4 0.1 210 / 0.4));\n}\n.dark .cat-highlight-tag-collapsed:hover::before {\n background-color: var(\n --cat-tag-collapsed-bg-hover,\n oklch(0.4 0.1 210 / 0.55)\n );\n}\n\n.dark .cat-highlight-space-char::before {\n color: oklch(0.65 0.14 70);\n}\n\n.dark .cat-highlight-quote-char::before {\n color: oklch(0.75 0.17 50);\n}\n\n.dark .cat-highlight-nested {\n background-image: repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 3px,\n oklch(0.7 0 0 / 0.08) 3px,\n oklch(0.7 0 0 / 0.08) 4px\n );\n}\n\n/* ─── Popover ──────────────────────────────────────────────────────────── */\n\n.cat-popover {\n background: var(--popover);\n color: var(--popover-foreground);\n border: 1px solid var(--border);\n border-radius: var(--radius);\n box-shadow:\n 0 4px 16px oklch(0 0 0 / 0.1),\n 0 1px 4px oklch(0 0 0 / 0.06);\n animation: cat-popover-in 0.15s ease-out;\n max-width: 380px;\n}\n\n.dark .cat-popover {\n box-shadow:\n 0 4px 24px oklch(0 0 0 / 0.4),\n 0 1px 4px oklch(0 0 0 / 0.2);\n}\n\n@keyframes cat-popover-in {\n from {\n opacity: 0;\n /* Use `translate` (independent CSS property) instead of `transform`\n so it does NOT override Popper.js's transform-based positioning. */\n translate: 0 -4px;\n }\n to {\n opacity: 1;\n translate: 0 0;\n }\n}\n\n/* ─── Badges ───────────────────────────────────────────────────────────── */\n\n.cat-badge {\n display: inline-flex;\n align-items: center;\n padding: 0.125rem 0.5rem;\n border-radius: 9999px;\n font-size: 0.6875rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n line-height: 1.5;\n}\n\n.cat-badge-spell {\n background: oklch(0.7 0.2 25 / 0.15);\n color: oklch(0.5 0.2 25);\n}\n.dark .cat-badge-spell {\n background: oklch(0.5 0.2 25 / 0.3);\n color: oklch(0.75 0.2 25);\n}\n\n.cat-badge-glossary {\n background: oklch(0.7 0.15 280 / 0.15);\n color: oklch(0.5 0.2 280);\n}\n.dark .cat-badge-glossary {\n background: oklch(0.5 0.17 280 / 0.3);\n color: oklch(0.75 0.18 280);\n}\n\n.cat-badge-glossary-tb-target {\n background: oklch(0.7 0.12 175 / 0.15);\n color: oklch(0.45 0.15 175);\n}\n.dark .cat-badge-glossary-tb-target {\n background: oklch(0.45 0.12 175 / 0.3);\n color: oklch(0.7 0.14 175);\n}\n\n.cat-badge-glossary-search {\n background: oklch(0.9 0.16 95 / 0.35);\n color: oklch(0.4 0.15 85);\n}\n.dark .cat-badge-glossary-search {\n background: oklch(0.6 0.16 85 / 0.4);\n color: oklch(0.85 0.16 85);\n}\n\n.cat-badge-special-char {\n background: oklch(0.75 0.14 70 / 0.15);\n color: oklch(0.45 0.18 70);\n}\n.dark .cat-badge-special-char {\n background: oklch(0.45 0.14 70 / 0.3);\n color: oklch(0.75 0.16 70);\n}\n\n.cat-badge-tag {\n background: oklch(0.78 0.1 210 / 0.15);\n color: oklch(0.4 0.13 210);\n}\n.dark .cat-badge-tag {\n background: oklch(0.4 0.1 210 / 0.35);\n color: oklch(0.75 0.12 210);\n}\n\n.cat-badge-link {\n background: oklch(0.78 0.1 240 / 0.15);\n color: oklch(0.4 0.15 240);\n}\n.dark .cat-badge-link {\n background: oklch(0.4 0.1 240 / 0.35);\n color: oklch(0.75 0.14 240);\n}\n\n.cat-badge-mention {\n background: oklch(0.78 0.12 300 / 0.15);\n color: oklch(0.4 0.15 300);\n}\n.dark .cat-badge-mention {\n background: oklch(0.4 0.12 300 / 0.35);\n color: oklch(0.75 0.14 300);\n}\n\n/* Flash highlight dark mode */\n.dark .cat-highlight-flash {\n background-color: oklch(0.45 0.18 350 / 0.4) !important;\n border-bottom-color: oklch(0.65 0.22 350) !important;\n}\n.dark .cat-highlight-flash.cat-highlight-tag-collapsed::before {\n background-color: oklch(0.45 0.18 350 / 0.4) !important;\n}\n.dark .cat-highlight-flash.cat-highlight-quote-char::before {\n color: oklch(0.7 0.22 350) !important;\n}\n\n/* ─── Suggestion buttons ───────────────────────────────────────────────── */\n\n.cat-suggestion-btn {\n display: inline-flex;\n align-items: center;\n padding: 0.25rem 0.625rem;\n font-size: 0.8125rem;\n border-radius: var(--radius);\n background: var(--secondary);\n color: var(--secondary-foreground);\n border: 1px solid var(--border);\n cursor: pointer;\n transition: all 0.15s ease;\n font-weight: 500;\n}\n\n.cat-suggestion-btn:hover {\n background: var(--primary);\n color: var(--primary-foreground);\n border-color: var(--primary);\n}\n"],"mappings":";AAEA,CAAC;AACC,YAAU;AACZ;AAEA,CAAC;AACC,YAAU;AACZ;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,cAAY;AACZ,WAAS,KAAK;AACd,aAAW;AACX,eAAa;AACb,SAAO,IAAI;AACX,WAAS;AACT,eAAa,IAAI;AACnB;AAEA,CAVC,mBAUmB;AAClB,WAAS;AACX;AAGA,CAAC;AACC,UAAQ;AACR,eAAa;AACb,eAAa;AACb,WAAS;AACX;AAGA,CAAC;AACC,UAAQ;AACV;AAIA,CAAC,mBAAmB,CA7BnB;AA8BC;AAAA,IACE,cAAc;AAAA,IAAE,2BAA2B;AAAA,IAAE,eAAe;AAAA,IAAE,WAAW;AAAA,IACzE,QAAQ;AAAA,IAAE;AACd;AAEA,CAAC;AACC,UAAQ;AACV;AAEA,CAAC;AACC,YAAU;AACV,OAAK;AACL,QAAM;AACN,SAAO,IAAI;AACX,kBAAgB;AAChB,eAAa;AACb,aAAW;AACX,WAAS;AACX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D;AACjD,SAAO,MAAM,IAAI,KAAK;AACxB;AAIA,CAAC;AACC,WAAS;AACT,eAAa;AACb,WAAS,QAAQ;AACjB,aAAW;AACX,iBAAe,IAAI;AACnB,cAAY,IAAI;AAChB,SAAO,IAAI;AACX,UAAQ,IAAI,MAAM,IAAI;AACtB,UAAQ;AACR,cAAY,IAAI,MAAM;AACtB,eAAa;AACf;AAEA,CAdC,kBAckB;AACjB,cAAY,IAAI;AAChB,SAAO,IAAI;AACX,gBAAc,IAAI;AACpB;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { e as IMentionUser } from '../CATEditor-C-b6vybW.cjs';
|
|
2
|
+
export { $ as $createMentionNode, k as $isMentionNode, C as CATEditor, a as CATEditorProps, b as CATEditorRef, G as GlossaryAnnotation, H as HighlightSegment, l as IGlossaryEntry, m as IGlossaryRule, n as IKeywordsEntry, I as IKeywordsRule, c as ILinkRule, d as IMentionRule, f as IQuoteRule, o as IQuoteRuleMapping, p as ISpecialCharEntry, g as ISpecialCharRule, h as ISpellCheckRule, q as ISpellCheckValidation, r as ISuggestion, i as ITagRule, K as KeywordsAnnotation, L as LinkAnnotation, s as MentionDOMRenderer, t as MentionNode, u as MentionNodeConfig, M as MooRule, P as PopoverContentRenderer, j as PopoverContentRendererProps, v as PopoverState, Q as QuoteAnnotation, w as RawRange, R as RuleAnnotation, S as SerializedMentionNode, x as SpecialCharAnnotation, y as SpellCheckAnnotation, T as TagAnnotation, C as default, z as getMentionModelText, A as getMentionPattern, B as setMentionNodeConfig } from '../CATEditor-C-b6vybW.cjs';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '../utils/detect-quotes.cjs';
|
|
6
|
+
import 'lexical';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Code-point → visible display symbol.
|
|
10
|
+
* Users can customise this map by importing and mutating it before rendering.
|
|
11
|
+
* Used by HighlightNode to replace invisible characters with
|
|
12
|
+
* visible placeholders in the editor DOM.
|
|
13
|
+
*/
|
|
14
|
+
declare const CODEPOINT_DISPLAY_MAP: Record<number, string>;
|
|
15
|
+
/** Resolve the effective display map (built-in + overrides). */
|
|
16
|
+
declare function getEffectiveCodepointMap(): Record<number, string>;
|
|
17
|
+
|
|
18
|
+
interface MentionPluginProps {
|
|
19
|
+
/** List of users that can be mentioned. */
|
|
20
|
+
users: Array<IMentionUser>;
|
|
21
|
+
/** Trigger character (default `@`). */
|
|
22
|
+
trigger?: string;
|
|
23
|
+
/** Called when a mention is inserted. */
|
|
24
|
+
onMentionInsert?: (user: IMentionUser) => void;
|
|
25
|
+
}
|
|
26
|
+
declare function MentionPlugin({ users, trigger, onMentionInsert, }: MentionPluginProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { CODEPOINT_DISPLAY_MAP, IMentionUser, MentionPlugin, type MentionPluginProps, getEffectiveCodepointMap };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { e as IMentionUser } from '../CATEditor-CLp6jZAf.js';
|
|
2
|
+
export { $ as $createMentionNode, k as $isMentionNode, C as CATEditor, a as CATEditorProps, b as CATEditorRef, G as GlossaryAnnotation, H as HighlightSegment, l as IGlossaryEntry, m as IGlossaryRule, n as IKeywordsEntry, I as IKeywordsRule, c as ILinkRule, d as IMentionRule, f as IQuoteRule, o as IQuoteRuleMapping, p as ISpecialCharEntry, g as ISpecialCharRule, h as ISpellCheckRule, q as ISpellCheckValidation, r as ISuggestion, i as ITagRule, K as KeywordsAnnotation, L as LinkAnnotation, s as MentionDOMRenderer, t as MentionNode, u as MentionNodeConfig, M as MooRule, P as PopoverContentRenderer, j as PopoverContentRendererProps, v as PopoverState, Q as QuoteAnnotation, w as RawRange, R as RuleAnnotation, S as SerializedMentionNode, x as SpecialCharAnnotation, y as SpellCheckAnnotation, T as TagAnnotation, C as default, z as getMentionModelText, A as getMentionPattern, B as setMentionNodeConfig } from '../CATEditor-CLp6jZAf.js';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '../utils/detect-quotes.js';
|
|
6
|
+
import 'lexical';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Code-point → visible display symbol.
|
|
10
|
+
* Users can customise this map by importing and mutating it before rendering.
|
|
11
|
+
* Used by HighlightNode to replace invisible characters with
|
|
12
|
+
* visible placeholders in the editor DOM.
|
|
13
|
+
*/
|
|
14
|
+
declare const CODEPOINT_DISPLAY_MAP: Record<number, string>;
|
|
15
|
+
/** Resolve the effective display map (built-in + overrides). */
|
|
16
|
+
declare function getEffectiveCodepointMap(): Record<number, string>;
|
|
17
|
+
|
|
18
|
+
interface MentionPluginProps {
|
|
19
|
+
/** List of users that can be mentioned. */
|
|
20
|
+
users: Array<IMentionUser>;
|
|
21
|
+
/** Trigger character (default `@`). */
|
|
22
|
+
trigger?: string;
|
|
23
|
+
/** Called when a mention is inserted. */
|
|
24
|
+
onMentionInsert?: (user: IMentionUser) => void;
|
|
25
|
+
}
|
|
26
|
+
declare function MentionPlugin({ users, trigger, onMentionInsert, }: MentionPluginProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { CODEPOINT_DISPLAY_MAP, IMentionUser, MentionPlugin, type MentionPluginProps, getEffectiveCodepointMap };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
$createMentionNode,
|
|
3
|
+
$isMentionNode,
|
|
4
|
+
CATEditor,
|
|
5
|
+
CATEditor_default,
|
|
6
|
+
CODEPOINT_DISPLAY_MAP,
|
|
7
|
+
MentionNode,
|
|
8
|
+
MentionPlugin,
|
|
9
|
+
getEffectiveCodepointMap,
|
|
10
|
+
getMentionModelText,
|
|
11
|
+
getMentionPattern,
|
|
12
|
+
setMentionNodeConfig
|
|
13
|
+
} from "../chunk-ZME2TTK5.js";
|
|
14
|
+
import "../chunk-BLJWR4ZV.js";
|
|
15
|
+
import "../chunk-YXQGAND3.js";
|
|
16
|
+
export {
|
|
17
|
+
$createMentionNode,
|
|
18
|
+
$isMentionNode,
|
|
19
|
+
CATEditor,
|
|
20
|
+
CODEPOINT_DISPLAY_MAP,
|
|
21
|
+
MentionNode,
|
|
22
|
+
MentionPlugin,
|
|
23
|
+
CATEditor_default as default,
|
|
24
|
+
getEffectiveCodepointMap,
|
|
25
|
+
getMentionModelText,
|
|
26
|
+
getMentionPattern,
|
|
27
|
+
setMentionNodeConfig
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=cat-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/layout/select.cjs
CHANGED
|
@@ -350,8 +350,9 @@ function MultipleTriggerContent({
|
|
|
350
350
|
let maxVisible = collapsed ? value.length : visibleCount;
|
|
351
351
|
const hasExplicitLimit = !collapsed && showItemsLength !== void 0;
|
|
352
352
|
if (hasExplicitLimit) {
|
|
353
|
-
maxVisible = showItemsLength;
|
|
353
|
+
maxVisible = Math.min(visibleCount, showItemsLength);
|
|
354
354
|
}
|
|
355
|
+
maxVisible = Math.max(1, maxVisible);
|
|
355
356
|
const hasOverflow = maxVisible < value.length;
|
|
356
357
|
const displayed = value.slice(0, maxVisible);
|
|
357
358
|
const overflowItems = value.slice(maxVisible);
|