valtech-components 2.0.329 → 2.0.331
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/esm2022/lib/components/molecules/code-display/code-display.component.mjs +111 -0
- package/esm2022/lib/components/molecules/code-display/types.mjs +2 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +107 -2
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/code-display/code-display.component.d.ts +24 -0
- package/lib/components/molecules/code-display/types.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/src/lib/components/styles/overrides.scss +1 -583
- package/src/lib/components/styles/prism.scss +555 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ToastController } from '@ionic/angular';
|
|
3
|
+
import 'prismjs/components/prism-css';
|
|
4
|
+
import 'prismjs/components/prism-javascript';
|
|
5
|
+
import 'prismjs/components/prism-markup';
|
|
6
|
+
import 'prismjs/components/prism-typescript';
|
|
7
|
+
import { CodeDisplayMetadata } from './types';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class CodeDisplayComponent implements AfterViewInit, OnChanges {
|
|
10
|
+
private cdr;
|
|
11
|
+
codeElement: ElementRef<HTMLElement>;
|
|
12
|
+
props: CodeDisplayMetadata;
|
|
13
|
+
toast: ToastController;
|
|
14
|
+
selectedTab: number;
|
|
15
|
+
constructor(cdr: ChangeDetectorRef);
|
|
16
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
17
|
+
ngAfterViewInit(): void;
|
|
18
|
+
selectTab(i: number): void;
|
|
19
|
+
private highlightCode;
|
|
20
|
+
copyToClipboard(): Promise<void>;
|
|
21
|
+
presentToast(message: string): Promise<void>;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CodeDisplayComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CodeDisplayComponent, "val-code-display", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -63,6 +63,8 @@ export * from './lib/components/molecules/select-search/select-search.component'
|
|
|
63
63
|
export * from './lib/components/molecules/text-input/text-input.component';
|
|
64
64
|
export * from './lib/components/molecules/title-block/title-block.component';
|
|
65
65
|
export * from './lib/components/molecules/title-block/types';
|
|
66
|
+
export * from './lib/components/molecules/code-display/code-display.component';
|
|
67
|
+
export * from './lib/components/molecules/code-display/types';
|
|
66
68
|
export * from './lib/components/organisms/article/article.component';
|
|
67
69
|
export * from './lib/components/organisms/article/types';
|
|
68
70
|
export * from './lib/components/organisms/banner/banner.component';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@import './variables.scss';
|
|
2
2
|
@import './functions.scss';
|
|
3
3
|
@import './mixins.scss';
|
|
4
|
+
@import './prism.scss';
|
|
4
5
|
|
|
5
6
|
/** core **/
|
|
6
7
|
|
|
@@ -237,586 +238,3 @@ ion-modal.modal-sheet ion-header ion-toolbar:last-of-type {
|
|
|
237
238
|
color: var(--ion-color-primary-shade, #0bb8cc);
|
|
238
239
|
}
|
|
239
240
|
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* One Light theme for prism.js
|
|
243
|
-
* Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* One Light colours (accurate as of commit eb064bf on 19 Feb 2021)
|
|
248
|
-
* From colors.less
|
|
249
|
-
* --mono-1: hsl(230, 8%, 24%);
|
|
250
|
-
* --mono-2: hsl(230, 6%, 44%);
|
|
251
|
-
* --mono-3: hsl(230, 4%, 64%)
|
|
252
|
-
* --hue-1: hsl(198, 99%, 37%);
|
|
253
|
-
* --hue-2: hsl(221, 87%, 60%);
|
|
254
|
-
* --hue-3: hsl(301, 63%, 40%);
|
|
255
|
-
* --hue-4: hsl(119, 34%, 47%);
|
|
256
|
-
* --hue-5: hsl(5, 74%, 59%);
|
|
257
|
-
* --hue-5-2: hsl(344, 84%, 43%);
|
|
258
|
-
* --hue-6: hsl(35, 99%, 36%);
|
|
259
|
-
* --hue-6-2: hsl(35, 99%, 40%);
|
|
260
|
-
* --syntax-fg: hsl(230, 8%, 24%);
|
|
261
|
-
* --syntax-bg: hsl(230, 1%, 98%);
|
|
262
|
-
* --syntax-gutter: hsl(230, 1%, 62%);
|
|
263
|
-
* --syntax-guide: hsla(230, 8%, 24%, 0.2);
|
|
264
|
-
* --syntax-accent: hsl(230, 100%, 66%);
|
|
265
|
-
* From syntax-variables.less
|
|
266
|
-
* --syntax-selection-color: hsl(230, 1%, 90%);
|
|
267
|
-
* --syntax-gutter-background-color-selected: hsl(230, 1%, 90%);
|
|
268
|
-
* --syntax-cursor-line: hsla(230, 8%, 24%, 0.05);
|
|
269
|
-
*/
|
|
270
|
-
|
|
271
|
-
code[class*='language-'],
|
|
272
|
-
pre[class*='language-'] {
|
|
273
|
-
width: 100%;
|
|
274
|
-
padding: 16px;
|
|
275
|
-
background: hsl(0, 0%, 100%);
|
|
276
|
-
color: hsl(230, 8%, 24%);
|
|
277
|
-
font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
|
|
278
|
-
direction: ltr;
|
|
279
|
-
text-align: left;
|
|
280
|
-
white-space: pre;
|
|
281
|
-
word-spacing: normal;
|
|
282
|
-
word-break: normal;
|
|
283
|
-
line-height: 1.5;
|
|
284
|
-
-moz-tab-size: 2;
|
|
285
|
-
-o-tab-size: 2;
|
|
286
|
-
tab-size: 2;
|
|
287
|
-
-webkit-hyphens: none;
|
|
288
|
-
-moz-hyphens: none;
|
|
289
|
-
-ms-hyphens: none;
|
|
290
|
-
hyphens: none;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/* Selection */
|
|
294
|
-
code[class*='language-']::-moz-selection,
|
|
295
|
-
code[class*='language-'] *::-moz-selection,
|
|
296
|
-
pre[class*='language-'] *::-moz-selection {
|
|
297
|
-
background: hsl(0, 0%, 100%);
|
|
298
|
-
color: inherit;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
code[class*='language-']::selection,
|
|
302
|
-
code[class*='language-'] *::selection,
|
|
303
|
-
pre[class*='language-'] *::selection {
|
|
304
|
-
background: hsl(0, 0%, 100%);
|
|
305
|
-
color: inherit;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/* Code blocks */
|
|
309
|
-
pre[class*='language-'] {
|
|
310
|
-
padding: 1em;
|
|
311
|
-
margin: 0.5em 0;
|
|
312
|
-
overflow: auto;
|
|
313
|
-
border-radius: 0.3em;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/* Inline code */
|
|
317
|
-
:not(pre) > code[class*='language-'] {
|
|
318
|
-
padding: 0.2em 0.3em;
|
|
319
|
-
border-radius: 0.3em;
|
|
320
|
-
white-space: normal;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.token.comment,
|
|
324
|
-
.token.prolog,
|
|
325
|
-
.token.cdata {
|
|
326
|
-
color: hsl(230, 4%, 64%);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.token.doctype,
|
|
330
|
-
.token.punctuation,
|
|
331
|
-
.token.entity {
|
|
332
|
-
color: hsl(230, 8%, 24%);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.token.attr-name,
|
|
336
|
-
.token.class-name,
|
|
337
|
-
.token.boolean,
|
|
338
|
-
.token.constant,
|
|
339
|
-
.token.number,
|
|
340
|
-
.token.atrule {
|
|
341
|
-
color: ff345e;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.token.keyword {
|
|
345
|
-
color: hsl(301, 63%, 40%);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.token.property,
|
|
349
|
-
.token.tag,
|
|
350
|
-
.token.symbol,
|
|
351
|
-
.token.deleted,
|
|
352
|
-
.token.important {
|
|
353
|
-
color: hsl(5, 74%, 59%);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.token.selector,
|
|
357
|
-
.token.string,
|
|
358
|
-
.token.char,
|
|
359
|
-
.token.builtin,
|
|
360
|
-
.token.inserted,
|
|
361
|
-
.token.regex,
|
|
362
|
-
.token.attr-value,
|
|
363
|
-
.token.attr-value > .token.punctuation {
|
|
364
|
-
color: hsl(119, 34%, 47%);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.token.variable,
|
|
368
|
-
.token.operator,
|
|
369
|
-
.token.function {
|
|
370
|
-
color: hsl(221, 87%, 60%);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.token.url {
|
|
374
|
-
color: hsl(198, 99%, 37%);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/* HTML overrides */
|
|
378
|
-
.token.attr-value > .token.punctuation.attr-equals,
|
|
379
|
-
.token.special-attr > .token.attr-value > .token.value.css {
|
|
380
|
-
color: hsl(230, 8%, 24%);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/* CSS overrides */
|
|
384
|
-
.language-css .token.selector {
|
|
385
|
-
color: hsl(5, 74%, 59%);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.language-css .token.property {
|
|
389
|
-
color: hsl(230, 8%, 24%);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.language-css .token.function,
|
|
393
|
-
.language-css .token.url > .token.function {
|
|
394
|
-
color: hsl(198, 99%, 37%);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.language-css .token.url > .token.string.url {
|
|
398
|
-
color: hsl(119, 34%, 47%);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.language-css .token.important,
|
|
402
|
-
.language-css .token.atrule .token.rule {
|
|
403
|
-
color: hsl(301, 63%, 40%);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
/* JS overrides */
|
|
407
|
-
.language-javascript .token.operator {
|
|
408
|
-
color: hsl(301, 63%, 40%);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.language-javascript
|
|
412
|
-
.token.template-string
|
|
413
|
-
> .token.interpolation
|
|
414
|
-
> .token.interpolation-punctuation.punctuation {
|
|
415
|
-
color: hsl(344, 84%, 43%);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
/* JSON overrides */
|
|
419
|
-
.language-json .token.operator {
|
|
420
|
-
color: hsl(230, 8%, 24%);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.language-json .token.null.keyword {
|
|
424
|
-
color: hsl(35, 99%, 36%);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/* MD overrides */
|
|
428
|
-
.language-markdown .token.url,
|
|
429
|
-
.language-markdown .token.url > .token.operator,
|
|
430
|
-
.language-markdown .token.url-reference.url > .token.string {
|
|
431
|
-
color: hsl(230, 8%, 24%);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
.language-markdown .token.url > .token.content {
|
|
435
|
-
color: hsl(221, 87%, 60%);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.language-markdown .token.url > .token.url,
|
|
439
|
-
.language-markdown .token.url-reference.url {
|
|
440
|
-
color: hsl(198, 99%, 37%);
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
.language-markdown .token.blockquote.punctuation,
|
|
444
|
-
.language-markdown .token.hr.punctuation {
|
|
445
|
-
color: hsl(230, 4%, 64%);
|
|
446
|
-
font-style: italic;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.language-markdown .token.code-snippet {
|
|
450
|
-
color: hsl(119, 34%, 47%);
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.language-markdown .token.bold .token.content {
|
|
454
|
-
color: hsl(35, 99%, 36%);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.language-markdown .token.italic .token.content {
|
|
458
|
-
color: hsl(301, 63%, 40%);
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.language-markdown .token.strike .token.content,
|
|
462
|
-
.language-markdown .token.strike .token.punctuation,
|
|
463
|
-
.language-markdown .token.list.punctuation,
|
|
464
|
-
.language-markdown .token.title.important > .token.punctuation {
|
|
465
|
-
color: hsl(5, 74%, 59%);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
/* General */
|
|
469
|
-
.token.bold {
|
|
470
|
-
font-weight: bold;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.token.comment,
|
|
474
|
-
.token.italic {
|
|
475
|
-
font-style: italic;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
.token.entity {
|
|
479
|
-
cursor: help;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.token.namespace {
|
|
483
|
-
opacity: 0.8;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/* Plugin overrides */
|
|
487
|
-
/* Selectors should have higher specificity than those in the plugins' default stylesheets */
|
|
488
|
-
|
|
489
|
-
/* Show Invisibles plugin overrides */
|
|
490
|
-
.token.token.tab:not(:empty):before,
|
|
491
|
-
.token.token.cr:before,
|
|
492
|
-
.token.token.lf:before,
|
|
493
|
-
.token.token.space:before {
|
|
494
|
-
color: hsla(230, 8%, 24%, 0.2);
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
/* Toolbar plugin overrides */
|
|
498
|
-
/* Space out all buttons and move them away from the right edge of the code block */
|
|
499
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item {
|
|
500
|
-
margin-right: 0.4em;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
/* Styling the buttons */
|
|
504
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button,
|
|
505
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a,
|
|
506
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span {
|
|
507
|
-
background: hsl(230, 1%, 90%);
|
|
508
|
-
color: hsl(230, 6%, 44%);
|
|
509
|
-
padding: 0.1em 0.4em;
|
|
510
|
-
border-radius: 0.3em;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover,
|
|
514
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus,
|
|
515
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover,
|
|
516
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus,
|
|
517
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover,
|
|
518
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus {
|
|
519
|
-
background: hsl(230, 1%, 78%); /* custom: darken(--syntax-bg, 20%) */
|
|
520
|
-
color: hsl(230, 8%, 24%);
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
/* Line Highlight plugin overrides */
|
|
524
|
-
/* The highlighted line itself */
|
|
525
|
-
.line-highlight.line-highlight {
|
|
526
|
-
background: hsla(230, 8%, 24%, 0.05);
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
/* Default line numbers in Line Highlight plugin */
|
|
530
|
-
.line-highlight.line-highlight:before,
|
|
531
|
-
.line-highlight.line-highlight[data-end]:after {
|
|
532
|
-
background: hsl(230, 1%, 90%);
|
|
533
|
-
color: hsl(230, 8%, 24%);
|
|
534
|
-
padding: 0.1em 0.6em;
|
|
535
|
-
border-radius: 0.3em;
|
|
536
|
-
box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/* Hovering over a linkable line number (in the gutter area) */
|
|
540
|
-
/* Requires Line Numbers plugin as well */
|
|
541
|
-
pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before {
|
|
542
|
-
background-color: hsla(230, 8%, 24%, 0.05);
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
/* Line Numbers and Command Line plugins overrides */
|
|
546
|
-
/* Line separating gutter from coding area */
|
|
547
|
-
.line-numbers.line-numbers .line-numbers-rows,
|
|
548
|
-
.command-line .command-line-prompt {
|
|
549
|
-
border-right-color: hsla(230, 8%, 24%, 0.2);
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/* Stuff in the gutter */
|
|
553
|
-
.line-numbers .line-numbers-rows > span:before,
|
|
554
|
-
.command-line .command-line-prompt > span:before {
|
|
555
|
-
color: hsl(230, 1%, 62%);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
/* Match Braces plugin overrides */
|
|
559
|
-
/* Note: Outline colour is inherited from the braces */
|
|
560
|
-
.rainbow-braces .token.token.punctuation.brace-level-1,
|
|
561
|
-
.rainbow-braces .token.token.punctuation.brace-level-5,
|
|
562
|
-
.rainbow-braces .token.token.punctuation.brace-level-9 {
|
|
563
|
-
color: hsl(5, 74%, 59%);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
.rainbow-braces .token.token.punctuation.brace-level-2,
|
|
567
|
-
.rainbow-braces .token.token.punctuation.brace-level-6,
|
|
568
|
-
.rainbow-braces .token.token.punctuation.brace-level-10 {
|
|
569
|
-
color: hsl(119, 34%, 47%);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.rainbow-braces .token.token.punctuation.brace-level-3,
|
|
573
|
-
.rainbow-braces .token.token.punctuation.brace-level-7,
|
|
574
|
-
.rainbow-braces .token.token.punctuation.brace-level-11 {
|
|
575
|
-
color: hsl(221, 87%, 60%);
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
.rainbow-braces .token.token.punctuation.brace-level-4,
|
|
579
|
-
.rainbow-braces .token.token.punctuation.brace-level-8,
|
|
580
|
-
.rainbow-braces .token.token.punctuation.brace-level-12 {
|
|
581
|
-
color: hsl(301, 63%, 40%);
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/* Diff Highlight plugin overrides */
|
|
585
|
-
/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */
|
|
586
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix),
|
|
587
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix) {
|
|
588
|
-
background-color: hsla(353, 100%, 66%, 0.15);
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection,
|
|
592
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection,
|
|
593
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection,
|
|
594
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection {
|
|
595
|
-
background-color: hsla(353, 95%, 66%, 0.25);
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection,
|
|
599
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection,
|
|
600
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection,
|
|
601
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection {
|
|
602
|
-
background-color: hsla(353, 95%, 66%, 0.25);
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix),
|
|
606
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix) {
|
|
607
|
-
background-color: hsla(137, 100%, 55%, 0.15);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection,
|
|
611
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection,
|
|
612
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection,
|
|
613
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection {
|
|
614
|
-
background-color: hsla(135, 73%, 55%, 0.25);
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection,
|
|
618
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection,
|
|
619
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection,
|
|
620
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection {
|
|
621
|
-
background-color: hsla(135, 73%, 55%, 0.25);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
/* Previewers plugin overrides */
|
|
625
|
-
/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-light-ui */
|
|
626
|
-
/* Border around popup */
|
|
627
|
-
.prism-previewer.prism-previewer:before,
|
|
628
|
-
.prism-previewer-gradient.prism-previewer-gradient div {
|
|
629
|
-
border-color: hsl(0, 0, 95%);
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/* Angle and time should remain as circles and are hence not included */
|
|
633
|
-
.prism-previewer-color.prism-previewer-color:before,
|
|
634
|
-
.prism-previewer-gradient.prism-previewer-gradient div,
|
|
635
|
-
.prism-previewer-easing.prism-previewer-easing:before {
|
|
636
|
-
border-radius: 0.3em;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
/* Triangles pointing to the code */
|
|
640
|
-
.prism-previewer.prism-previewer:after {
|
|
641
|
-
border-top-color: hsl(0, 0, 95%);
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
.prism-previewer-flipped.prism-previewer-flipped.after {
|
|
645
|
-
border-bottom-color: hsl(0, 0, 95%);
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
/* Background colour within the popup */
|
|
649
|
-
.prism-previewer-angle.prism-previewer-angle:before,
|
|
650
|
-
.prism-previewer-time.prism-previewer-time:before,
|
|
651
|
-
.prism-previewer-easing.prism-previewer-easing {
|
|
652
|
-
background: hsl(0, 0%, 100%);
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */
|
|
656
|
-
/* For time, this is the alternate colour */
|
|
657
|
-
.prism-previewer-angle.prism-previewer-angle circle,
|
|
658
|
-
.prism-previewer-time.prism-previewer-time circle {
|
|
659
|
-
stroke: hsl(230, 8%, 24%);
|
|
660
|
-
stroke-opacity: 1;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
/* Stroke colours of the handle, direction point, and vector itself */
|
|
664
|
-
.prism-previewer-easing.prism-previewer-easing circle,
|
|
665
|
-
.prism-previewer-easing.prism-previewer-easing path,
|
|
666
|
-
.prism-previewer-easing.prism-previewer-easing line {
|
|
667
|
-
stroke: hsl(230, 8%, 24%);
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
/* Fill colour of the handle */
|
|
671
|
-
.prism-previewer-easing.prism-previewer-easing circle {
|
|
672
|
-
fill: transparent;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
// dark media query
|
|
676
|
-
@media (prefers-color-scheme: dark) {
|
|
677
|
-
/**
|
|
678
|
-
* GitHub Dark theme for Prism.js
|
|
679
|
-
* Based on GitHub: https://github.com
|
|
680
|
-
* @author Katorly
|
|
681
|
-
* Modified: Brighter text for better readability
|
|
682
|
-
*/
|
|
683
|
-
/* General */
|
|
684
|
-
pre[class*='language-'],
|
|
685
|
-
code[class*='language-'] {
|
|
686
|
-
background: #161b22;
|
|
687
|
-
color: #f0f6fc !important; /* Cambiado de #c9d1d9 a un color más claro con !important */
|
|
688
|
-
text-shadow: none;
|
|
689
|
-
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
690
|
-
direction: ltr;
|
|
691
|
-
text-align: left;
|
|
692
|
-
white-space: pre;
|
|
693
|
-
word-spacing: normal;
|
|
694
|
-
word-break: normal;
|
|
695
|
-
line-height: 1.5;
|
|
696
|
-
-moz-tab-size: 4;
|
|
697
|
-
-o-tab-size: 4;
|
|
698
|
-
tab-size: 4;
|
|
699
|
-
-webkit-hyphens: none;
|
|
700
|
-
-moz-hyphens: none;
|
|
701
|
-
-ms-hyphens: none;
|
|
702
|
-
hyphens: none;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
/* Asegurar que el texto no tokenizado use el color correcto */
|
|
706
|
-
pre[class*='language-'] > code[class*='language-'],
|
|
707
|
-
pre[class*='language-'] code[class*='language-'] {
|
|
708
|
-
color: #f0f6fc !important;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
/* Para el texto directo dentro del pre */
|
|
712
|
-
pre[class*='language-'] {
|
|
713
|
-
color: #f0f6fc !important;
|
|
714
|
-
}
|
|
715
|
-
pre[class*='language-']::selection,
|
|
716
|
-
code[class*='language-']::selection,
|
|
717
|
-
pre[class*='language-']::mozselection,
|
|
718
|
-
code[class*='language-']::mozselection {
|
|
719
|
-
text-shadow: none;
|
|
720
|
-
background: #234879;
|
|
721
|
-
}
|
|
722
|
-
@media print {
|
|
723
|
-
pre[class*='language-'],
|
|
724
|
-
code[class*='language-'] {
|
|
725
|
-
text-shadow: none;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
pre[class*='language-'] {
|
|
729
|
-
padding: 1em;
|
|
730
|
-
margin: 0.5em 0;
|
|
731
|
-
overflow: auto;
|
|
732
|
-
background: #161b22;
|
|
733
|
-
}
|
|
734
|
-
:not(pre) > code[class*='language-'] {
|
|
735
|
-
padding: 0.1em 0.3em;
|
|
736
|
-
border-radius: 0.3em;
|
|
737
|
-
color: #f0f6fc !important; /* También actualizado aquí con !important */
|
|
738
|
-
background: #343942;
|
|
739
|
-
}
|
|
740
|
-
/* Line highlighting */
|
|
741
|
-
pre[data-line] {
|
|
742
|
-
position: relative;
|
|
743
|
-
}
|
|
744
|
-
pre[class*='language-'] > code[class*='language-'] {
|
|
745
|
-
position: relative;
|
|
746
|
-
z-index: 1;
|
|
747
|
-
}
|
|
748
|
-
.line-highlight {
|
|
749
|
-
position: absolute;
|
|
750
|
-
left: 0;
|
|
751
|
-
right: 0;
|
|
752
|
-
padding: inherit 0;
|
|
753
|
-
margin-top: 1em;
|
|
754
|
-
background: #2f2a1e;
|
|
755
|
-
box-shadow: inset 5px 0 0 #674c16;
|
|
756
|
-
z-index: 0;
|
|
757
|
-
pointer-events: none;
|
|
758
|
-
line-height: inherit;
|
|
759
|
-
white-space: pre;
|
|
760
|
-
}
|
|
761
|
-
/* Tokens */
|
|
762
|
-
.namespace {
|
|
763
|
-
opacity: 0.7;
|
|
764
|
-
}
|
|
765
|
-
.token.comment,
|
|
766
|
-
.token.prolog,
|
|
767
|
-
.token.doctype,
|
|
768
|
-
.token.cdata {
|
|
769
|
-
color: #8b949e;
|
|
770
|
-
}
|
|
771
|
-
.token.punctuation {
|
|
772
|
-
color: #f0f6fc !important; /* También actualizado para consistencia con !important */
|
|
773
|
-
}
|
|
774
|
-
.token.property,
|
|
775
|
-
.token.tag,
|
|
776
|
-
.token.boolean,
|
|
777
|
-
.token.number,
|
|
778
|
-
.token.constant,
|
|
779
|
-
.token.symbol,
|
|
780
|
-
.token.deleted {
|
|
781
|
-
color: #79c0ff;
|
|
782
|
-
}
|
|
783
|
-
.token.selector,
|
|
784
|
-
.token.attr-name,
|
|
785
|
-
.token.string,
|
|
786
|
-
.token.char,
|
|
787
|
-
.token.builtin,
|
|
788
|
-
.token.inserted {
|
|
789
|
-
color: #a5d6ff;
|
|
790
|
-
}
|
|
791
|
-
.token.operator,
|
|
792
|
-
.token.entity,
|
|
793
|
-
.token.url,
|
|
794
|
-
.language-css .token.string,
|
|
795
|
-
.style .token.string {
|
|
796
|
-
color: #a5d6ff;
|
|
797
|
-
background: #161b22;
|
|
798
|
-
}
|
|
799
|
-
.token.atrule,
|
|
800
|
-
.token.attr-value,
|
|
801
|
-
.token.keyword {
|
|
802
|
-
color: #a5d6ff;
|
|
803
|
-
}
|
|
804
|
-
.token.function {
|
|
805
|
-
color: #d2a8ff;
|
|
806
|
-
}
|
|
807
|
-
.token.regex,
|
|
808
|
-
.token.important,
|
|
809
|
-
.token.variable {
|
|
810
|
-
color: #a8daff;
|
|
811
|
-
}
|
|
812
|
-
.token.important,
|
|
813
|
-
.token.bold {
|
|
814
|
-
font-weight: bold;
|
|
815
|
-
}
|
|
816
|
-
.token.italic {
|
|
817
|
-
font-style: italic;
|
|
818
|
-
}
|
|
819
|
-
.token.entity {
|
|
820
|
-
cursor: help;
|
|
821
|
-
}
|
|
822
|
-
}
|