@ac-base/ac-demo-content 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +88 -2
- package/index.js +8 -0
- package/package.json +45 -3
- package/src/clipboard.js +31 -0
- package/src/demo-case.js +84 -0
- package/src/demo-content.js +664 -0
- package/src/demo-content.styles.js +663 -0
- package/src/demo-content.styles.scss +679 -0
- package/src/highlight-html.js +80 -0
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
export const DemoContentStyles = css`
|
|
4
|
+
@charset "UTF-8";
|
|
5
|
+
:host {
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host([hidden]) {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Header: nombre, tecnología base, instalación, documentación */
|
|
14
|
+
.ac-demo-content__header {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
align-items: flex-start;
|
|
19
|
+
gap: 1rem;
|
|
20
|
+
margin-bottom: 1rem;
|
|
21
|
+
padding-bottom: 1rem;
|
|
22
|
+
border-bottom: 1px solid var(--color-muted, #313335);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ac-demo-content__header-title {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 0.6rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ac-demo-content__name {
|
|
32
|
+
font-size: 1.1rem;
|
|
33
|
+
font-weight: 700;
|
|
34
|
+
margin: 0;
|
|
35
|
+
color: var(--color-text, #bcbec4);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ac-demo-content__tech-badge {
|
|
39
|
+
font-size: 0.7rem;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
padding: 0.2rem 0.5rem;
|
|
42
|
+
border-radius: 999px;
|
|
43
|
+
background: var(--color-primary-700, #047857);
|
|
44
|
+
color: var(--color-primary-50, #ecfdf5);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ac-demo-content__header-meta {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-wrap: wrap;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: 0.75rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ac-demo-content__install {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-wrap: wrap;
|
|
57
|
+
gap: 0.4rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ac-demo-content__install-cmd {
|
|
61
|
+
position: relative;
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 0.5rem;
|
|
65
|
+
font-family: monospace;
|
|
66
|
+
font-size: 0.75rem;
|
|
67
|
+
color: var(--color-text, #bcbec4);
|
|
68
|
+
background: var(--color-surface, #2b2b2b);
|
|
69
|
+
border: 1px solid var(--color-muted, #313335);
|
|
70
|
+
border-radius: 0.375rem;
|
|
71
|
+
padding: 0.25rem 0.5rem;
|
|
72
|
+
cursor: copy;
|
|
73
|
+
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ac-demo-content__install-cmd:hover {
|
|
77
|
+
border-color: var(--color-primary-500, #10b981);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ac-demo-content__install-cmd:focus-visible {
|
|
81
|
+
outline: none;
|
|
82
|
+
border-color: var(--color-primary-500, #10b981);
|
|
83
|
+
box-shadow: 0 0 0 2px var(--color-primary-700, #047857);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Estado "copiado": fondo sólido con texto fijo (tokens que no cambian entre temas). */
|
|
87
|
+
.ac-demo-content__install-cmd--copied {
|
|
88
|
+
background: var(--color-primary-700, #047857);
|
|
89
|
+
border-color: var(--color-primary-700, #047857);
|
|
90
|
+
color: var(--color-primary-50, #ecfdf5);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ac-demo-content__visually-hidden {
|
|
94
|
+
position: absolute;
|
|
95
|
+
width: 1px;
|
|
96
|
+
height: 1px;
|
|
97
|
+
margin: -1px;
|
|
98
|
+
padding: 0;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
clip: rect(0 0 0 0);
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
border: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ac-demo-content__docs-link {
|
|
106
|
+
font-size: 0.8rem;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
/* primary-500 está pensado para fondo oscuro — en modo claro el texto va
|
|
109
|
+
directo sobre la página (sin caja propia), así que se oscurece abajo.
|
|
110
|
+
Ver "Dark-mode y colores de fondo sólido" en docs/CONVENTIONS.md. */
|
|
111
|
+
color: var(--color-primary-500, #10b981);
|
|
112
|
+
text-decoration: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:host-context([data-theme=light]) .ac-demo-content__docs-link {
|
|
116
|
+
color: var(--color-primary-700, #047857);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ac-demo-content__docs-link:hover {
|
|
120
|
+
text-decoration: underline;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Toolbar: el selector de caso va solo en la primera fila (los headers pueden
|
|
124
|
+
ser largos); el resto de controles en una segunda fila. */
|
|
125
|
+
.ac-demo-content__toolbar {
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
gap: 0.75rem;
|
|
129
|
+
margin-bottom: 1rem;
|
|
130
|
+
padding-bottom: 1rem;
|
|
131
|
+
border-bottom: 1px solid var(--color-muted, #313335);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ac-demo-content__toolbar-cases {
|
|
135
|
+
display: flex;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ac-demo-content__toolbar-controls {
|
|
139
|
+
display: flex;
|
|
140
|
+
flex-wrap: wrap;
|
|
141
|
+
gap: 1rem;
|
|
142
|
+
align-items: center;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ac-demo-content__field {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
gap: 0.4rem;
|
|
149
|
+
font-size: 0.85rem;
|
|
150
|
+
/* --color-subtext no cumple contraste WCAG AA (3.89:1) sobre --color-bg */
|
|
151
|
+
color: var(--color-text, #bcbec4);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ac-demo-content__field--case {
|
|
155
|
+
flex: 1;
|
|
156
|
+
min-width: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.ac-demo-content__field--case select {
|
|
160
|
+
flex: 1;
|
|
161
|
+
min-width: 0;
|
|
162
|
+
width: 100%;
|
|
163
|
+
text-overflow: ellipsis;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@supports (appearance: base-select) {
|
|
167
|
+
.ac-demo-content__field--case select::picker(select) {
|
|
168
|
+
width: anchor-size(width);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
.ac-demo-content__field-label {
|
|
172
|
+
font-size: 0.7rem;
|
|
173
|
+
font-weight: 600;
|
|
174
|
+
letter-spacing: 0.02em;
|
|
175
|
+
text-transform: uppercase;
|
|
176
|
+
/* Nunca opacity sobre texto: diluye el contraste contra el fondo y rompe
|
|
177
|
+
WCAG AA de forma impredecible entre temas — ver docs/CONVENTIONS.md. */
|
|
178
|
+
color: inherit;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ac-demo-content__field select {
|
|
182
|
+
appearance: none;
|
|
183
|
+
font: inherit;
|
|
184
|
+
font-size: 0.85rem;
|
|
185
|
+
color: inherit;
|
|
186
|
+
background: var(--color-surface, #2b2b2b) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
|
|
187
|
+
background-size: 0.65rem;
|
|
188
|
+
border: 1px solid var(--color-muted, #313335);
|
|
189
|
+
border-radius: 0.5rem;
|
|
190
|
+
padding: 0.35rem 1.75rem 0.35rem 0.65rem;
|
|
191
|
+
cursor: pointer;
|
|
192
|
+
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.ac-demo-content__field select:hover {
|
|
196
|
+
border-color: var(--color-primary-500, #10b981);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.ac-demo-content__field select:focus-visible {
|
|
200
|
+
outline: none;
|
|
201
|
+
border-color: var(--color-primary-500, #10b981);
|
|
202
|
+
box-shadow: 0 0 0 2px var(--color-primary-700, #047857);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* En navegadores con \`appearance: base-select\` (Chromium) se estiliza también
|
|
206
|
+
la lista desplegable; en el resto queda el <select> nativo de arriba. */
|
|
207
|
+
@supports (appearance: base-select) {
|
|
208
|
+
.ac-demo-content__field select,
|
|
209
|
+
.ac-demo-content__field select::picker(select) {
|
|
210
|
+
appearance: base-select;
|
|
211
|
+
}
|
|
212
|
+
.ac-demo-content__field select {
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: space-between;
|
|
216
|
+
gap: 0.75rem;
|
|
217
|
+
min-height: 2.25rem;
|
|
218
|
+
padding: 0.4rem 0.85rem;
|
|
219
|
+
border-radius: 0.65rem;
|
|
220
|
+
background: var(--color-surface, #2b2b2b);
|
|
221
|
+
}
|
|
222
|
+
.ac-demo-content__field select::picker-icon {
|
|
223
|
+
content: "";
|
|
224
|
+
flex-shrink: 0;
|
|
225
|
+
width: 0.45rem;
|
|
226
|
+
height: 0.45rem;
|
|
227
|
+
margin-top: -0.2rem;
|
|
228
|
+
border-right: 2px solid currentColor;
|
|
229
|
+
border-bottom: 2px solid currentColor;
|
|
230
|
+
rotate: 45deg;
|
|
231
|
+
transition: rotate 150ms ease, margin-top 150ms ease;
|
|
232
|
+
}
|
|
233
|
+
.ac-demo-content__field select:open::picker-icon {
|
|
234
|
+
margin-top: 0.2rem;
|
|
235
|
+
rotate: 225deg;
|
|
236
|
+
}
|
|
237
|
+
.ac-demo-content__field select::picker(select) {
|
|
238
|
+
min-width: anchor-size(width);
|
|
239
|
+
max-height: 20rem;
|
|
240
|
+
margin-block: 0.4rem;
|
|
241
|
+
padding: 0.4rem;
|
|
242
|
+
color: var(--color-text, #bcbec4);
|
|
243
|
+
background: var(--color-surface, #2b2b2b);
|
|
244
|
+
border: 1px solid var(--color-muted, #313335);
|
|
245
|
+
border-radius: 0.85rem;
|
|
246
|
+
box-shadow: var(--elev-2, 0 8px 24px rgba(0, 0, 0, 0.45));
|
|
247
|
+
}
|
|
248
|
+
.ac-demo-content__field select option {
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
gap: 0.6rem;
|
|
252
|
+
padding: 0.55rem 0.75rem;
|
|
253
|
+
border-radius: 0.55rem;
|
|
254
|
+
font-size: 0.85rem;
|
|
255
|
+
white-space: normal;
|
|
256
|
+
overflow-wrap: anywhere;
|
|
257
|
+
cursor: pointer;
|
|
258
|
+
}
|
|
259
|
+
.ac-demo-content__field select option:hover,
|
|
260
|
+
.ac-demo-content__field select option:focus-visible {
|
|
261
|
+
background: color-mix(in srgb, var(--color-primary-500, #10b981) 20%, transparent);
|
|
262
|
+
}
|
|
263
|
+
.ac-demo-content__field select option:checked {
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
background: var(--color-primary-700, #047857);
|
|
266
|
+
color: var(--color-primary-50, #ecfdf5);
|
|
267
|
+
}
|
|
268
|
+
.ac-demo-content__field select option::checkmark {
|
|
269
|
+
order: 1;
|
|
270
|
+
margin-left: auto;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/* Control segmentado genérico: idioma / tema / dispositivo / vista */
|
|
274
|
+
.ac-demo-content__segmented {
|
|
275
|
+
display: inline-flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
border: 1px solid var(--color-muted, #313335);
|
|
278
|
+
border-radius: 999px;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.ac-demo-content__segmented-divider {
|
|
283
|
+
width: 1px;
|
|
284
|
+
align-self: stretch;
|
|
285
|
+
background: var(--color-muted, #313335);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.ac-demo-content__segmented-button {
|
|
289
|
+
display: inline-flex;
|
|
290
|
+
align-items: center;
|
|
291
|
+
justify-content: center;
|
|
292
|
+
font: inherit;
|
|
293
|
+
font-size: 0.8rem;
|
|
294
|
+
font-weight: 600;
|
|
295
|
+
color: var(--color-text, #bcbec4);
|
|
296
|
+
background: transparent;
|
|
297
|
+
border: none;
|
|
298
|
+
padding: 0.4rem 0.75rem;
|
|
299
|
+
cursor: pointer;
|
|
300
|
+
/* Sin transition: un axe-core check justo después del click puede
|
|
301
|
+
muestrear el color a mitad de la transición, y falla color-contrast
|
|
302
|
+
de forma intermitente (visto en CI — pasaba solo, fallaba en la
|
|
303
|
+
corrida completa del monorepo). El cambio de estado es instantáneo. */
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ac-demo-content__segmented-button--active {
|
|
307
|
+
background: var(--color-primary-700, #047857);
|
|
308
|
+
color: var(--color-primary-50, #ecfdf5);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.ac-demo-content__theme-switcher .ac-demo-content__segmented-button {
|
|
312
|
+
padding: 0.4rem 0.6rem;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* Botón de eventos */
|
|
316
|
+
.ac-demo-content__events-button {
|
|
317
|
+
position: relative;
|
|
318
|
+
display: inline-flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
justify-content: center;
|
|
321
|
+
width: 2rem;
|
|
322
|
+
height: 2rem;
|
|
323
|
+
margin-left: auto;
|
|
324
|
+
border: 1px solid var(--color-muted, #313335);
|
|
325
|
+
border-radius: 0.5rem;
|
|
326
|
+
background: transparent;
|
|
327
|
+
color: inherit;
|
|
328
|
+
cursor: pointer;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.ac-demo-content__events-count {
|
|
332
|
+
position: absolute;
|
|
333
|
+
top: -0.35rem;
|
|
334
|
+
right: -0.35rem;
|
|
335
|
+
min-width: 1.1rem;
|
|
336
|
+
height: 1.1rem;
|
|
337
|
+
padding: 0 0.25rem;
|
|
338
|
+
border-radius: 999px;
|
|
339
|
+
background: var(--color-accent-500, #f59e0b);
|
|
340
|
+
color: var(--color-accent-900, #451a03);
|
|
341
|
+
font-size: 0.65rem;
|
|
342
|
+
font-weight: 700;
|
|
343
|
+
line-height: 1.1rem;
|
|
344
|
+
text-align: center;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* Escenario + marco de dispositivo (alto FIJO por preset — el contenido
|
|
348
|
+
scrollea adentro en vez de empujar el marco, para simular un viewport
|
|
349
|
+
real del dispositivo). */
|
|
350
|
+
.ac-demo-content__stage {
|
|
351
|
+
display: flex;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
padding: 1.5rem;
|
|
354
|
+
background: var(--color-surface, #2b2b2b);
|
|
355
|
+
border-radius: 0.75rem;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.ac-demo-content__device-frame {
|
|
359
|
+
display: flex;
|
|
360
|
+
flex-direction: column;
|
|
361
|
+
width: 100%;
|
|
362
|
+
max-width: var(--ac-demo-content-device-width, 375px);
|
|
363
|
+
background: var(--color-muted, #313335);
|
|
364
|
+
border-radius: 1.75rem;
|
|
365
|
+
padding: 0.6rem 0.4rem 1rem;
|
|
366
|
+
box-shadow: var(--elev-1, 0 2px 8px rgba(0, 0, 0, 0.35));
|
|
367
|
+
overflow: hidden;
|
|
368
|
+
transition: max-width 200ms ease, height 200ms ease;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.ac-demo-content__device-frame--tablet {
|
|
372
|
+
border-radius: 1.25rem;
|
|
373
|
+
padding: 0.5rem 0.4rem 0.75rem;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.ac-demo-content__device-frame--desktop {
|
|
377
|
+
border-radius: 0.5rem;
|
|
378
|
+
padding: 0.5rem;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.ac-demo-content__device-chrome {
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
justify-content: center;
|
|
385
|
+
flex-shrink: 0;
|
|
386
|
+
height: 1.5rem;
|
|
387
|
+
gap: 0.3rem;
|
|
388
|
+
border-radius: 0.5rem 0.5rem 0 0;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.ac-demo-content__device-frame--desktop .ac-demo-content__device-chrome {
|
|
392
|
+
justify-content: flex-start;
|
|
393
|
+
padding: 0 0.6rem;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.ac-demo-content__device-notch {
|
|
397
|
+
width: 3rem;
|
|
398
|
+
height: 0.3rem;
|
|
399
|
+
border-radius: 999px;
|
|
400
|
+
background: var(--color-bg, #1e1e1e);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.ac-demo-content__device-dot {
|
|
404
|
+
width: 0.5rem;
|
|
405
|
+
height: 0.5rem;
|
|
406
|
+
border-radius: 50%;
|
|
407
|
+
background: var(--color-bg, #1e1e1e);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.ac-demo-content__viewport {
|
|
411
|
+
height: var(--ac-demo-content-device-height, 667px);
|
|
412
|
+
padding: 1rem;
|
|
413
|
+
overflow-y: auto;
|
|
414
|
+
background: var(--color-bg, #1e1e1e);
|
|
415
|
+
border-radius: 0 0 0.5rem 0.5rem;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* Vista de código: editor con barra de título, líneas numeradas y resaltado de
|
|
419
|
+
sintaxis. Paleta FIJA (oscura en ambos temas, como un editor real) — los
|
|
420
|
+
colores no dependen de --color-bg/--color-text, que cambian con el tema. */
|
|
421
|
+
.ac-demo-content__code-view {
|
|
422
|
+
width: 100%;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.ac-demo-content__code-editor {
|
|
426
|
+
--code-bg: #1f2430;
|
|
427
|
+
--code-titlebar-bg: #171b26;
|
|
428
|
+
--code-border: #2d3446;
|
|
429
|
+
--code-text: #d4d9e6;
|
|
430
|
+
--code-gutter: #8b93a8;
|
|
431
|
+
--code-active-line: #262d3d;
|
|
432
|
+
--code-tag: #7cc7ff;
|
|
433
|
+
--code-attr: #9ce5c4;
|
|
434
|
+
--code-string: #f2b880;
|
|
435
|
+
--code-punct: #a6aec4;
|
|
436
|
+
--code-comment: #8fa37a;
|
|
437
|
+
overflow: hidden;
|
|
438
|
+
background: var(--code-bg);
|
|
439
|
+
border: 1px solid var(--code-border);
|
|
440
|
+
border-radius: 0.75rem;
|
|
441
|
+
box-shadow: var(--elev-1, 0 2px 8px rgba(0, 0, 0, 0.35));
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.ac-demo-content__code-titlebar {
|
|
445
|
+
display: flex;
|
|
446
|
+
align-items: center;
|
|
447
|
+
gap: 0.75rem;
|
|
448
|
+
padding: 0.55rem 0.85rem;
|
|
449
|
+
background: var(--code-titlebar-bg);
|
|
450
|
+
border-bottom: 1px solid var(--code-border);
|
|
451
|
+
color: var(--code-text);
|
|
452
|
+
font-family: monospace;
|
|
453
|
+
font-size: 0.75rem;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.ac-demo-content__code-dots {
|
|
457
|
+
display: inline-flex;
|
|
458
|
+
gap: 0.35rem;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.ac-demo-content__code-dots i {
|
|
462
|
+
width: 0.65rem;
|
|
463
|
+
height: 0.65rem;
|
|
464
|
+
border-radius: 50%;
|
|
465
|
+
background: var(--code-gutter);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.ac-demo-content__code-dots i:nth-child(1) {
|
|
469
|
+
background: #ff6b6b;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.ac-demo-content__code-dots i:nth-child(2) {
|
|
473
|
+
background: #ffd166;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.ac-demo-content__code-dots i:nth-child(3) {
|
|
477
|
+
background: #5fd39a;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.ac-demo-content__code-filename {
|
|
481
|
+
flex: 1;
|
|
482
|
+
min-width: 0;
|
|
483
|
+
overflow: hidden;
|
|
484
|
+
text-overflow: ellipsis;
|
|
485
|
+
white-space: nowrap;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.ac-demo-content__code-lang {
|
|
489
|
+
padding: 0.1rem 0.5rem;
|
|
490
|
+
border: 1px solid var(--code-border);
|
|
491
|
+
border-radius: 999px;
|
|
492
|
+
color: var(--code-gutter);
|
|
493
|
+
font-size: 0.65rem;
|
|
494
|
+
font-weight: 600;
|
|
495
|
+
letter-spacing: 0.04em;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.ac-demo-content__code-block {
|
|
499
|
+
max-height: 32rem;
|
|
500
|
+
padding: 0.75rem 0;
|
|
501
|
+
overflow: auto;
|
|
502
|
+
font-family: ui-monospace, "Cascadia Code", "Fira Code", Consolas, monospace;
|
|
503
|
+
font-variant-ligatures: none;
|
|
504
|
+
font-size: 0.8rem;
|
|
505
|
+
line-height: 1.65;
|
|
506
|
+
color: var(--code-text);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.ac-demo-content__code-block:focus-visible {
|
|
510
|
+
outline: 2px solid var(--color-primary-500, #10b981);
|
|
511
|
+
outline-offset: -2px;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.ac-demo-content__code-line {
|
|
515
|
+
display: grid;
|
|
516
|
+
grid-template-columns: 3.25rem 1fr;
|
|
517
|
+
min-width: max-content;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.ac-demo-content__code-line:hover {
|
|
521
|
+
background: var(--code-active-line);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/* El gutter queda fijo al hacer scroll horizontal y no se copia al seleccionar. */
|
|
525
|
+
.ac-demo-content__code-gutter {
|
|
526
|
+
position: sticky;
|
|
527
|
+
left: 0;
|
|
528
|
+
padding-right: 1rem;
|
|
529
|
+
background: var(--code-bg);
|
|
530
|
+
color: var(--code-gutter);
|
|
531
|
+
text-align: right;
|
|
532
|
+
user-select: none;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.ac-demo-content__code-line:hover .ac-demo-content__code-gutter {
|
|
536
|
+
background: var(--code-active-line);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.ac-demo-content__code-text {
|
|
540
|
+
padding-right: 1.25rem;
|
|
541
|
+
white-space: pre;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.ac-demo-content__tok--tag {
|
|
545
|
+
color: var(--code-tag);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.ac-demo-content__tok--attr {
|
|
549
|
+
color: var(--code-attr);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.ac-demo-content__tok--string {
|
|
553
|
+
color: var(--code-string);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.ac-demo-content__tok--punct {
|
|
557
|
+
color: var(--code-punct);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.ac-demo-content__tok--comment {
|
|
561
|
+
color: var(--code-comment);
|
|
562
|
+
font-style: italic;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/* Panel de eventos — lateral, pegado al borde derecho */
|
|
566
|
+
.ac-demo-content__panel-backdrop {
|
|
567
|
+
position: fixed;
|
|
568
|
+
inset: 0;
|
|
569
|
+
display: flex;
|
|
570
|
+
justify-content: flex-end;
|
|
571
|
+
background: rgba(0, 0, 0, 0.35);
|
|
572
|
+
z-index: 50;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.ac-demo-content__modal {
|
|
576
|
+
width: min(22rem, 90vw);
|
|
577
|
+
height: 100%;
|
|
578
|
+
display: flex;
|
|
579
|
+
flex-direction: column;
|
|
580
|
+
background: var(--color-surface, #2b2b2b);
|
|
581
|
+
border-left: 1px solid var(--color-muted, #313335);
|
|
582
|
+
box-shadow: var(--elev-2, 0 8px 24px rgba(0, 0, 0, 0.45));
|
|
583
|
+
padding: 1rem 1.25rem;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.ac-demo-content__modal-header {
|
|
587
|
+
display: flex;
|
|
588
|
+
align-items: center;
|
|
589
|
+
justify-content: space-between;
|
|
590
|
+
flex-shrink: 0;
|
|
591
|
+
margin-bottom: 0.5rem;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.ac-demo-content__modal-title {
|
|
595
|
+
font-size: 1rem;
|
|
596
|
+
margin: 0;
|
|
597
|
+
color: var(--color-text, #bcbec4);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.ac-demo-content__modal-close {
|
|
601
|
+
font-size: 1rem;
|
|
602
|
+
line-height: 1;
|
|
603
|
+
padding: 0.25rem;
|
|
604
|
+
color: inherit;
|
|
605
|
+
background: transparent;
|
|
606
|
+
border: none;
|
|
607
|
+
cursor: pointer;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.ac-demo-content__modal-config {
|
|
611
|
+
flex-shrink: 0;
|
|
612
|
+
font-size: 0.8rem;
|
|
613
|
+
color: var(--color-text, #bcbec4);
|
|
614
|
+
margin: 0 0 0.75rem;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.ac-demo-content__modal-list {
|
|
618
|
+
flex: 1;
|
|
619
|
+
overflow-y: auto;
|
|
620
|
+
display: flex;
|
|
621
|
+
flex-direction: column;
|
|
622
|
+
gap: 0.5rem;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.ac-demo-content__modal-entry {
|
|
626
|
+
border: 1px solid var(--color-muted, #313335);
|
|
627
|
+
border-radius: 0.5rem;
|
|
628
|
+
padding: 0.5rem 0.75rem;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.ac-demo-content__modal-entry-row {
|
|
632
|
+
display: flex;
|
|
633
|
+
gap: 0.4rem;
|
|
634
|
+
font-size: 0.8rem;
|
|
635
|
+
color: var(--color-text, #bcbec4);
|
|
636
|
+
padding: 0.15rem 0;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.ac-demo-content__modal-entry-row--block {
|
|
640
|
+
flex-direction: column;
|
|
641
|
+
gap: 0.2rem;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.ac-demo-content__modal-entry-label {
|
|
645
|
+
font-weight: 700;
|
|
646
|
+
flex-shrink: 0;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.ac-demo-content__modal-entry-detail {
|
|
650
|
+
margin: 0;
|
|
651
|
+
font-family: monospace;
|
|
652
|
+
font-size: 0.75rem;
|
|
653
|
+
white-space: pre-wrap;
|
|
654
|
+
word-break: break-word;
|
|
655
|
+
color: var(--color-text, #bcbec4);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.ac-demo-content__modal-empty {
|
|
659
|
+
font-size: 0.85rem;
|
|
660
|
+
color: var(--color-text, #bcbec4);
|
|
661
|
+
margin: 0;
|
|
662
|
+
}
|
|
663
|
+
`;
|