@morlay/dsh-client-ui-primitives 0.0.2-alpha.3 → 0.0.2-alpha.5
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/dist/client.cjs +435 -392
- package/dist/client.d.cts +2 -2
- package/dist/client.d.mts +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{reference-Do8Uwujy.d.cts → reference-BX54bj6_.d.cts} +2 -1
- package/dist/{reference-Do8Uwujy.d.mts → reference-BX54bj6_.d.mts} +2 -1
- package/dist/{reference-BLcMVsqa.mjs → reference-Dxy9uQYz.mjs} +44 -2
- package/package.json +1 -1
- package/src/client/index.ts +1 -0
- package/src/client/theme.generated.ts +710 -707
- package/src/reference.ts +50 -0
package/dist/client.cjs
CHANGED
|
@@ -330,517 +330,517 @@ window.__ModuleLoader__.load({
|
|
|
330
330
|
* 消费时只需树形状——`Token.vars()` 生成 `var(--dsw-…)`,不重新定义变量。
|
|
331
331
|
* 漂移、往返与默认值完整性由 src/__tests__/design-tokens.spec.ts 守卫。 */
|
|
332
332
|
const designTokens = {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
333
|
+
alias: {
|
|
334
|
+
bg: {
|
|
335
|
+
base: "var(--dsw-static-neutral-bluish-00)",
|
|
336
|
+
document: { preview: "var(--dsw-static-neutral-bluish-750)" },
|
|
337
|
+
layer: {
|
|
338
338
|
"1": "var(--dsw-static-neutral-bluish-00)",
|
|
339
339
|
"2": "var(--dsw-static-neutral-bluish-00)",
|
|
340
340
|
"3": "var(--dsw-static-neutral-bluish-00)"
|
|
341
341
|
},
|
|
342
|
-
|
|
342
|
+
mask: {
|
|
343
343
|
"1": "rgba(0, 0, 0, 0.24)",
|
|
344
344
|
"2": "rgba(0, 0, 0, 0.12)",
|
|
345
345
|
"3": "rgba(0, 0, 0, 0.48)",
|
|
346
|
-
|
|
347
|
-
|
|
346
|
+
drop: "rgba(255, 255, 255, 0.7)",
|
|
347
|
+
photo: "rgba(0, 0, 0, 0.88)"
|
|
348
348
|
},
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
349
|
+
module: { platform: "var(--dsw-static-neutral-bluish-60)" },
|
|
350
|
+
multi: { select: "var(--dsw-static-neutral-bluish-60)" },
|
|
351
|
+
overlay: "var(--dsw-static-neutral-bluish-150)",
|
|
352
|
+
skeleton: "rgba(0, 0, 0, 0.04)"
|
|
353
353
|
},
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
354
|
+
border: {
|
|
355
|
+
inverted: "rgba(0, 0, 0, 0)",
|
|
356
|
+
inverted2: "rgba(0, 0, 0, 0)",
|
|
357
|
+
l1: "rgba(0, 0, 0, 0.04)",
|
|
358
|
+
l2: {
|
|
359
|
+
$: "rgba(0, 0, 0, 0.1)",
|
|
360
|
+
darkmode: { thin: "rgba(0, 0, 0, 0.1)" }
|
|
361
361
|
},
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
l3: "rgba(0, 0, 0, 0.12)",
|
|
363
|
+
l4: "rgba(0, 0, 0, 0.16)"
|
|
364
364
|
},
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
365
|
+
brand: {
|
|
366
|
+
primary: {
|
|
367
|
+
$: "var(--dsw-static-neutral-bluish-1000)",
|
|
368
|
+
invert: "var(--dsw-static-neutral-bluish-1000)",
|
|
369
|
+
new: { colorprimary: { new: { color: "rgb(65, 118, 230)" } } }
|
|
370
370
|
},
|
|
371
|
-
|
|
371
|
+
text: "var(--dsw-static-neutral-bluish-1000)"
|
|
372
372
|
},
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
button: {
|
|
374
|
+
contrast: { fill: "var(--dsw-static-neutral-bluish-700)" },
|
|
375
|
+
elevated: { fill: "var(--dsw-static-neutral-bluish-00)" },
|
|
376
|
+
floating: {
|
|
377
|
+
fill: "var(--dsw-static-neutral-bluish-00)",
|
|
378
|
+
hover: "var(--dsw-static-neutral-bluish-75)"
|
|
379
379
|
},
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
380
|
+
ghost: { active: {
|
|
381
|
+
border: "var(--dsw-static-neutral-bluish-500)",
|
|
382
|
+
fill: "var(--dsw-static-neutral-bluish-100)",
|
|
383
|
+
hover: "var(--dsw-static-neutral-bluish-150)"
|
|
384
384
|
} },
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
385
|
+
info: {
|
|
386
|
+
fill: "var(--dsw-static-deepseek-500)",
|
|
387
|
+
hover: "var(--dsw-static-deepseek-400)"
|
|
388
388
|
},
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
primary: {
|
|
390
|
+
dimmed: "var(--dsw-static-neutral-bluish-100)",
|
|
391
|
+
fill: "var(--dsw-alias-brand-primary)",
|
|
392
|
+
hover: "var(--dsw-static-neutral-bluish-750)"
|
|
393
393
|
},
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
394
|
+
tool: { bar: {
|
|
395
|
+
fill: {
|
|
396
|
+
$: "rgba(84, 85, 87, 0.5)",
|
|
397
|
+
invisible: "rgba(31, 31, 31, 0.36)"
|
|
398
398
|
},
|
|
399
|
-
|
|
399
|
+
hover: "rgba(84, 85, 87, 0.6)"
|
|
400
400
|
} }
|
|
401
401
|
},
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
402
|
+
interactive: { bg: {
|
|
403
|
+
active: "rgba(38, 49, 72, 0.1)",
|
|
404
|
+
hover: {
|
|
405
|
+
$: "rgba(38, 49, 72, 0.06)",
|
|
406
|
+
accent: "rgba(38, 49, 72, 0.14)",
|
|
407
|
+
danger: "rgba(236, 19, 19, 0.05)",
|
|
408
|
+
solid: "var(--dsw-static-neutral-bluish-75)"
|
|
409
409
|
}
|
|
410
410
|
} },
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
411
|
+
label: {
|
|
412
|
+
caption: "var(--dsw-static-neutral-bluish-400)",
|
|
413
|
+
dimmed: "var(--dsw-static-neutral-bluish-200)",
|
|
414
|
+
document: { preview: "var(--dsw-static-neutral-bluish-200)" },
|
|
415
|
+
primary: {
|
|
416
|
+
$: "var(--dsw-static-neutral-bluish-1000)",
|
|
417
|
+
bluish: "var(--dsw-static-blue-900)",
|
|
418
|
+
dimmed: "var(--dsw-static-neutral-bluish-950)",
|
|
419
|
+
foreground: "var(--dsw-static-neutral-bluish-00)",
|
|
420
|
+
inverted: "var(--dsw-static-neutral-bluish-00)"
|
|
421
421
|
},
|
|
422
|
-
|
|
423
|
-
|
|
422
|
+
secondary: "var(--dsw-static-neutral-bluish-700)",
|
|
423
|
+
tertiary: "var(--dsw-static-neutral-bluish-600)"
|
|
424
424
|
},
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
425
|
+
link: "var(--dsw-static-deepseek-500)",
|
|
426
|
+
markdown: {
|
|
427
|
+
citation: "var(--dsw-static-neutral-bluish-100)",
|
|
428
|
+
code: {
|
|
429
|
+
block: {
|
|
430
|
+
$: "var(--dsw-static-neutral-bluish-50)",
|
|
431
|
+
banner: "var(--dsw-static-neutral-bluish-50)"
|
|
432
432
|
},
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
433
|
+
segment: {
|
|
434
|
+
selected: "var(--dsw-static-neutral-bluish-00)",
|
|
435
|
+
unselected: "var(--dsw-static-neutral-bluish-75)"
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
438
|
+
inline: { code: "var(--dsw-static-neutral-50)" },
|
|
439
|
+
placeholder: "var(--dsw-static-neutral-bluish-60)",
|
|
440
|
+
tag: "var(--dsw-static-neutral-bluish-75)"
|
|
441
441
|
},
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
442
|
+
scrollbar: {
|
|
443
|
+
bg: {
|
|
444
|
+
l1: "var(--dsw-static-neutral-200)",
|
|
445
|
+
l2: "var(--dsw-static-neutral-200)"
|
|
446
446
|
},
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
hover: {
|
|
448
|
+
l1: "var(--dsw-static-neutral-300)",
|
|
449
|
+
l2: "var(--dsw-static-neutral-300)"
|
|
450
450
|
}
|
|
451
451
|
},
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
452
|
+
state: {
|
|
453
|
+
business: {
|
|
454
|
+
primary: "var(--dsw-static-deepseek-500)",
|
|
455
|
+
tertiary: "var(--dsw-static-deepseek-100)"
|
|
456
456
|
},
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
457
|
+
error: {
|
|
458
|
+
primary: "var(--dsw-static-red-600)",
|
|
459
|
+
secondary: "var(--dsw-static-red-400)"
|
|
460
460
|
},
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
461
|
+
success: {
|
|
462
|
+
primary: "var(--dsw-static-green-500)",
|
|
463
|
+
secondary: "var(--dsw-static-green-400)",
|
|
464
|
+
tertiary: "var(--dsw-static-green-100)"
|
|
465
465
|
},
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
466
|
+
warn: {
|
|
467
|
+
label: "var(--dsw-static-amber-600)",
|
|
468
|
+
primary: "var(--dsw-static-amber-500)",
|
|
469
|
+
secondary: "var(--dsw-static-amber-400)",
|
|
470
|
+
tertiary: "var(--dsw-static-amber-100)"
|
|
471
471
|
}
|
|
472
472
|
},
|
|
473
|
-
|
|
474
|
-
|
|
473
|
+
toast: { bg: "var(--dsw-static-neutral-bluish-800)" },
|
|
474
|
+
tooltip: { bg: "var(--dsw-static-neutral-bluish-850)" }
|
|
475
475
|
},
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
476
|
+
corner: { shape: "superellipse(1.5)" },
|
|
477
|
+
elevation: {
|
|
478
|
+
panel: "var(--dsw-elevation-stroke), 0 3px 8px 0 rgba(0, 0, 0, 0.03), 0 0 16px 0 rgba(0, 0, 0, 0.02)",
|
|
479
|
+
prominent: "var(--dsw-elevation-stroke), 0 3px 8px 0 rgba(0, 0, 0, 0.04), 0 0 20px 0 rgba(0, 0, 0, 0.05)",
|
|
480
|
+
soft: "var(--dsw-elevation-stroke), 0 4px 16px 0 rgba(0, 0, 0, 0.03), 0 0 24px 0 rgba(0, 0, 0, 0.03)",
|
|
481
|
+
stroke: {
|
|
482
|
+
$: "0 0 0 0.5px var(--dsw-elevation-stroke-color)",
|
|
483
|
+
color: "var(--dsw-alias-border-l4)"
|
|
484
484
|
}
|
|
485
485
|
},
|
|
486
|
-
|
|
487
|
-
|
|
486
|
+
font: {
|
|
487
|
+
base: {
|
|
488
488
|
"16": {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
489
|
+
$: "16px/24px var(--dsw-font-family)",
|
|
490
|
+
font: {
|
|
491
|
+
family: "var(--dsw-font-family)",
|
|
492
|
+
size: "16px",
|
|
493
|
+
style: "normal",
|
|
494
|
+
weight: "400"
|
|
495
495
|
},
|
|
496
|
-
|
|
496
|
+
line: { height: "24px" }
|
|
497
497
|
},
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
498
|
+
strong: { "16": {
|
|
499
|
+
$: "500 16px/24px var(--dsw-font-family)",
|
|
500
|
+
font: {
|
|
501
|
+
family: "var(--dsw-font-family)",
|
|
502
|
+
size: "16px",
|
|
503
|
+
style: "normal",
|
|
504
|
+
weight: "500"
|
|
505
505
|
},
|
|
506
|
-
|
|
506
|
+
line: { height: "24px" }
|
|
507
507
|
} }
|
|
508
508
|
},
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
509
|
+
family: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',\n 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
510
|
+
l: { "20": {
|
|
511
|
+
$: "500 20px/28px var(--dsw-font-family)",
|
|
512
|
+
font: {
|
|
513
|
+
family: "var(--dsw-font-family)",
|
|
514
|
+
size: "20px",
|
|
515
|
+
style: "normal",
|
|
516
|
+
weight: "500"
|
|
517
517
|
},
|
|
518
|
-
|
|
518
|
+
line: { height: "28px" }
|
|
519
519
|
} },
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
520
|
+
m: { "18": {
|
|
521
|
+
$: "500 16px/28px var(--dsw-font-family)",
|
|
522
|
+
font: {
|
|
523
|
+
family: "var(--dsw-font-family)",
|
|
524
|
+
size: "16px",
|
|
525
|
+
style: "normal",
|
|
526
|
+
weight: "500"
|
|
527
527
|
},
|
|
528
|
-
|
|
528
|
+
line: { height: "28px" }
|
|
529
529
|
} },
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
530
|
+
markdown: {
|
|
531
|
+
base: {
|
|
532
|
+
$: "var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
533
|
+
font: {
|
|
534
|
+
family: "var(--dsw-font-family)",
|
|
535
|
+
size: "var(--dsh-content-font-size, 14px)",
|
|
536
|
+
style: "normal",
|
|
537
|
+
weight: "400"
|
|
538
538
|
},
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
539
|
+
italic: {
|
|
540
|
+
$: "italic var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
541
|
+
font: {
|
|
542
|
+
family: "var(--dsw-font-family)",
|
|
543
|
+
size: "var(--dsh-content-font-size, 14px)",
|
|
544
|
+
style: "italic",
|
|
545
|
+
weight: "400"
|
|
546
546
|
},
|
|
547
|
-
|
|
547
|
+
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
548
548
|
},
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
549
|
+
line: { height: "calc(24px + var(--dsh-content-font-delta))" },
|
|
550
|
+
strong: {
|
|
551
|
+
$: "600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
552
|
+
font: {
|
|
553
|
+
family: "var(--dsw-font-family)",
|
|
554
|
+
size: "var(--dsh-content-font-size, 14px)",
|
|
555
|
+
style: "normal",
|
|
556
|
+
weight: "600"
|
|
557
557
|
},
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
558
|
+
italic: {
|
|
559
|
+
$: "italic 600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
560
|
+
font: {
|
|
561
|
+
family: "var(--dsw-font-family)",
|
|
562
|
+
size: "var(--dsh-content-font-size, 14px)",
|
|
563
|
+
style: "italic",
|
|
564
|
+
weight: "600"
|
|
565
565
|
},
|
|
566
|
-
|
|
566
|
+
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
567
567
|
},
|
|
568
|
-
|
|
568
|
+
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
569
569
|
}
|
|
570
570
|
},
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
571
|
+
code: {
|
|
572
|
+
$: "12px/19px var(--ds-font-family-code)",
|
|
573
|
+
block: {
|
|
574
|
+
$: "11px/19px var(--ds-font-family-code)",
|
|
575
|
+
font: {
|
|
576
|
+
family: "var(--ds-font-family-code)",
|
|
577
|
+
size: "11px",
|
|
578
|
+
style: "normal",
|
|
579
|
+
weight: "400"
|
|
580
580
|
},
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
581
|
+
line: { height: "19px" },
|
|
582
|
+
small: {
|
|
583
|
+
$: "11px/16px var(--ds-font-family-code)",
|
|
584
|
+
font: {
|
|
585
|
+
family: "var(--ds-font-family-code)",
|
|
586
|
+
size: "11px",
|
|
587
|
+
style: "normal",
|
|
588
|
+
weight: "400"
|
|
589
589
|
},
|
|
590
|
-
|
|
590
|
+
line: { height: "16px" }
|
|
591
591
|
}
|
|
592
592
|
},
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
593
|
+
font: {
|
|
594
|
+
family: "var(--ds-font-family-code)",
|
|
595
|
+
size: "12px",
|
|
596
|
+
style: "normal",
|
|
597
|
+
weight: "400"
|
|
598
598
|
},
|
|
599
|
-
|
|
599
|
+
line: { height: "19px" }
|
|
600
600
|
},
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
601
|
+
h1: {
|
|
602
|
+
$: "700 calc(21px + var(--dsh-content-font-delta)) / calc(30px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
603
|
+
font: {
|
|
604
|
+
family: "var(--dsw-font-family)",
|
|
605
|
+
size: "calc(21px + var(--dsh-content-font-delta))",
|
|
606
|
+
style: "normal",
|
|
607
|
+
weight: "700"
|
|
608
608
|
},
|
|
609
|
-
|
|
609
|
+
line: { height: "calc(30px + var(--dsh-content-font-delta))" }
|
|
610
610
|
},
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
611
|
+
h2: {
|
|
612
|
+
$: "700 calc(19px + var(--dsh-content-font-delta)) / calc(28px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
613
|
+
font: {
|
|
614
|
+
family: "var(--dsw-font-family)",
|
|
615
|
+
size: "calc(19px + var(--dsh-content-font-delta))",
|
|
616
|
+
style: "normal",
|
|
617
|
+
weight: "700"
|
|
618
618
|
},
|
|
619
|
-
|
|
619
|
+
line: { height: "calc(28px + var(--dsh-content-font-delta))" }
|
|
620
620
|
},
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
621
|
+
h3: {
|
|
622
|
+
$: "700 calc(18px + var(--dsh-content-font-delta)) / calc(26px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
623
|
+
font: {
|
|
624
|
+
family: "var(--dsw-font-family)",
|
|
625
|
+
size: "calc(18px + var(--dsh-content-font-delta))",
|
|
626
|
+
style: "normal",
|
|
627
|
+
weight: "700"
|
|
628
628
|
},
|
|
629
|
-
|
|
629
|
+
line: { height: "calc(26px + var(--dsh-content-font-delta))" }
|
|
630
630
|
},
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
631
|
+
h4: {
|
|
632
|
+
$: "600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
633
|
+
font: {
|
|
634
|
+
family: "var(--dsw-font-family)",
|
|
635
|
+
size: "var(--dsh-content-font-size, 14px)",
|
|
636
|
+
style: "normal",
|
|
637
|
+
weight: "600"
|
|
638
638
|
},
|
|
639
|
-
|
|
639
|
+
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
640
640
|
},
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
641
|
+
small: {
|
|
642
|
+
$: "12px/20px var(--dsw-font-family)",
|
|
643
|
+
font: {
|
|
644
|
+
family: "var(--dsw-font-family)",
|
|
645
|
+
size: "12px",
|
|
646
|
+
style: "normal",
|
|
647
|
+
weight: "400"
|
|
648
648
|
},
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
649
|
+
italic: {
|
|
650
|
+
$: "italic 12px/20px var(--dsw-font-family)",
|
|
651
|
+
font: {
|
|
652
|
+
family: "var(--dsw-font-family)",
|
|
653
|
+
size: "12px",
|
|
654
|
+
style: "italic",
|
|
655
|
+
weight: "400"
|
|
656
656
|
},
|
|
657
|
-
|
|
657
|
+
line: { height: "20px" }
|
|
658
658
|
},
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
659
|
+
line: { height: "20px" },
|
|
660
|
+
strong: {
|
|
661
|
+
$: "600 12px/20px var(--dsw-font-family)",
|
|
662
|
+
font: {
|
|
663
|
+
family: "var(--dsw-font-family)",
|
|
664
|
+
size: "12px",
|
|
665
|
+
style: "normal",
|
|
666
|
+
weight: "600"
|
|
667
667
|
},
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
668
|
+
italic: {
|
|
669
|
+
$: "italic 600 12px/20px var(--dsw-font-family)",
|
|
670
|
+
font: {
|
|
671
|
+
family: "var(--dsw-font-family)",
|
|
672
|
+
size: "12px",
|
|
673
|
+
style: "italic",
|
|
674
|
+
weight: "600"
|
|
675
675
|
},
|
|
676
|
-
|
|
676
|
+
line: { height: "20px" }
|
|
677
677
|
},
|
|
678
|
-
|
|
678
|
+
line: { height: "20px" }
|
|
679
679
|
}
|
|
680
680
|
},
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
681
|
+
table: {
|
|
682
|
+
$: "var(--dsh-content-font-size-secondary, 13px)/calc(22px + var(--dsh-content-font-delta-secondary, 0px)) var(--dsw-font-family)",
|
|
683
|
+
font: {
|
|
684
|
+
family: "var(--dsw-font-family)",
|
|
685
|
+
size: "var(--dsh-content-font-size-secondary, 13px)",
|
|
686
|
+
style: "normal",
|
|
687
|
+
weight: "400"
|
|
688
688
|
},
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
689
|
+
head: {
|
|
690
|
+
$: "500 var(--dsh-content-font-size-secondary, 13px)/calc(22px + var(--dsh-content-font-delta-secondary, 0px)) var(--dsw-font-family)",
|
|
691
|
+
font: {
|
|
692
|
+
family: "var(--dsw-font-family)",
|
|
693
|
+
size: "var(--dsh-content-font-size-secondary, 13px)",
|
|
694
|
+
style: "normal",
|
|
695
|
+
weight: "500"
|
|
696
696
|
},
|
|
697
|
-
|
|
697
|
+
line: { height: "calc(22px + var(--dsh-content-font-delta-secondary, 0px))" }
|
|
698
698
|
},
|
|
699
|
-
|
|
699
|
+
line: { height: "calc(22px + var(--dsh-content-font-delta-secondary, 0px))" }
|
|
700
700
|
}
|
|
701
701
|
},
|
|
702
|
-
|
|
702
|
+
s: {
|
|
703
703
|
"14": {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
704
|
+
$: "14px/22px var(--dsw-font-family)",
|
|
705
|
+
font: {
|
|
706
|
+
family: "var(--dsw-font-family)",
|
|
707
|
+
size: "14px",
|
|
708
|
+
style: "normal",
|
|
709
|
+
weight: "400"
|
|
710
710
|
},
|
|
711
|
-
|
|
711
|
+
line: { height: "22px" }
|
|
712
712
|
},
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
713
|
+
strong: { "14": {
|
|
714
|
+
$: "500 14px/22px var(--dsw-font-family)",
|
|
715
|
+
font: {
|
|
716
|
+
family: "var(--dsw-font-family)",
|
|
717
|
+
size: "14px",
|
|
718
|
+
style: "normal",
|
|
719
|
+
weight: "500"
|
|
720
720
|
},
|
|
721
|
-
|
|
721
|
+
line: { height: "22px" }
|
|
722
722
|
} }
|
|
723
723
|
},
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
724
|
+
xl: { "24": {
|
|
725
|
+
$: "600 24px/32px var(--dsw-font-family)",
|
|
726
|
+
font: {
|
|
727
|
+
family: "var(--dsw-font-family)",
|
|
728
|
+
size: "24px",
|
|
729
|
+
style: "normal",
|
|
730
|
+
weight: "600"
|
|
731
731
|
},
|
|
732
|
-
|
|
732
|
+
line: { height: "32px" }
|
|
733
733
|
} },
|
|
734
|
-
|
|
734
|
+
xs: {
|
|
735
735
|
"13": {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
736
|
+
$: "13px/20px var(--dsw-font-family)",
|
|
737
|
+
font: {
|
|
738
|
+
family: "var(--dsw-font-family)",
|
|
739
|
+
size: "13px",
|
|
740
|
+
style: "normal",
|
|
741
|
+
weight: "400"
|
|
742
742
|
},
|
|
743
|
-
|
|
743
|
+
line: { height: "20px" }
|
|
744
744
|
},
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
745
|
+
strong: { "13": {
|
|
746
|
+
$: "500 13px/20px var(--dsw-font-family)",
|
|
747
|
+
font: {
|
|
748
|
+
family: "var(--dsw-font-family)",
|
|
749
|
+
size: "13px",
|
|
750
|
+
style: "normal",
|
|
751
|
+
weight: "500"
|
|
752
752
|
},
|
|
753
|
-
|
|
753
|
+
line: { height: "20px" }
|
|
754
754
|
} }
|
|
755
755
|
},
|
|
756
|
-
|
|
756
|
+
xxs: {
|
|
757
757
|
"12": {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
758
|
+
$: "12px/18px var(--dsw-font-family)",
|
|
759
|
+
font: {
|
|
760
|
+
family: "var(--dsw-font-family)",
|
|
761
|
+
size: "12px",
|
|
762
|
+
style: "normal",
|
|
763
|
+
weight: "400"
|
|
764
764
|
},
|
|
765
|
-
|
|
765
|
+
line: { height: "18px" }
|
|
766
766
|
},
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
767
|
+
strong: { "12": {
|
|
768
|
+
$: "500 12px/18px var(--dsw-font-family)",
|
|
769
|
+
font: {
|
|
770
|
+
family: "var(--dsw-font-family)",
|
|
771
|
+
size: "12px",
|
|
772
|
+
style: "normal",
|
|
773
|
+
weight: "500"
|
|
774
774
|
},
|
|
775
|
-
|
|
775
|
+
line: { height: "18px" }
|
|
776
776
|
} }
|
|
777
777
|
},
|
|
778
|
-
|
|
778
|
+
xxxs: {
|
|
779
779
|
"11": {
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
780
|
+
$: "11px/14px var(--dsw-font-family)",
|
|
781
|
+
font: {
|
|
782
|
+
family: "var(--dsw-font-family)",
|
|
783
|
+
size: "11px",
|
|
784
|
+
style: "normal",
|
|
785
|
+
weight: "400"
|
|
786
786
|
},
|
|
787
|
-
|
|
787
|
+
line: { height: "14px" }
|
|
788
788
|
},
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
789
|
+
strong: { "11": {
|
|
790
|
+
$: "500 11px/14px var(--dsw-font-family)",
|
|
791
|
+
font: {
|
|
792
|
+
family: "var(--dsw-font-family)",
|
|
793
|
+
size: "11px",
|
|
794
|
+
style: "normal",
|
|
795
|
+
weight: "500"
|
|
796
796
|
},
|
|
797
|
-
|
|
797
|
+
line: { height: "14px" }
|
|
798
798
|
} }
|
|
799
799
|
}
|
|
800
800
|
},
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
801
|
+
linear: {
|
|
802
|
+
gradient: { think: "linear-gradient(180deg, #fff 20.19%, rgba(255, 255, 255, 0) 100%)" },
|
|
803
|
+
think: { select: "linear-gradient(180deg, #f5f6f7 20.19%, rgba(245, 246, 247, 0) 100%)" }
|
|
804
804
|
},
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
805
|
+
mask: { blur: "blur(2px)" },
|
|
806
|
+
shadow: {
|
|
807
|
+
lv1: {
|
|
808
|
+
$: "0 2px 4px 0 rgba(0, 0, 0, 0.05)",
|
|
809
|
+
blur: "0 4px 12px 0 rgba(0, 0, 0, 0.02)"
|
|
810
810
|
},
|
|
811
|
-
|
|
812
|
-
|
|
811
|
+
lv2: "0 4px 12px 0 rgba(0, 0, 0, 0.02), 0 2px 8px 0 rgba(0, 0, 0, 0.04)",
|
|
812
|
+
lv3: "0 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 4px 0 rgba(0, 0, 0, 0.02), 0 12px 32px 0 rgba(0, 0, 0, 0.08)"
|
|
813
813
|
},
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
814
|
+
specific: {
|
|
815
|
+
bubble: {
|
|
816
|
+
$: "var(--dsw-static-deepseek-50)",
|
|
817
|
+
highlight: "var(--dsw-static-deepseek-200)"
|
|
818
818
|
},
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
819
|
+
input: { major: "var(--dsw-static-neutral-bluish-00)" },
|
|
820
|
+
login: { input: "var(--dsw-static-neutral-bluish-50)" },
|
|
821
|
+
menu: "var(--dsw-alias-bg-layer-3)",
|
|
822
|
+
selector: "var(--dsw-static-neutral-bluish-60)",
|
|
823
|
+
sidebar: {
|
|
824
|
+
fill: "var(--dsw-static-neutral-bluish-50)",
|
|
825
|
+
nav: { item: {
|
|
826
|
+
active: {
|
|
827
|
+
$: "var(--dsw-static-neutral-bluish-100)",
|
|
828
|
+
accent: "var(--dsw-static-deepseek-100)"
|
|
829
829
|
},
|
|
830
|
-
|
|
830
|
+
hover: "var(--dsw-static-neutral-bluish-75)"
|
|
831
831
|
} }
|
|
832
832
|
},
|
|
833
|
-
|
|
833
|
+
tip: "var(--dsw-static-neutral-bluish-60)"
|
|
834
834
|
},
|
|
835
|
-
|
|
836
|
-
|
|
835
|
+
static: {
|
|
836
|
+
amber: {
|
|
837
837
|
"100": "rgb(254, 245, 231)",
|
|
838
838
|
"400": "rgb(247, 173, 49)",
|
|
839
839
|
"500": "rgb(245, 158, 11)",
|
|
840
840
|
"600": "rgb(221, 134, 41)",
|
|
841
841
|
"900": "rgb(39, 36, 31)"
|
|
842
842
|
},
|
|
843
|
-
|
|
843
|
+
blue: {
|
|
844
844
|
"50": "rgb(239, 246, 255)",
|
|
845
845
|
"75": "rgb(229, 240, 255)",
|
|
846
846
|
"100": "rgb(219, 234, 254)",
|
|
@@ -854,7 +854,7 @@ window.__ModuleLoader__.load({
|
|
|
854
854
|
"950": "rgb(23, 37, 84)",
|
|
855
855
|
"50p": "rgb(234, 243, 255)"
|
|
856
856
|
},
|
|
857
|
-
|
|
857
|
+
deepseek: {
|
|
858
858
|
"50": "rgb(237, 243, 254)",
|
|
859
859
|
"100": "rgb(228, 237, 253)",
|
|
860
860
|
"200": "rgb(211, 226, 255)",
|
|
@@ -863,17 +863,17 @@ window.__ModuleLoader__.load({
|
|
|
863
863
|
"450": "rgb(86, 134, 254)",
|
|
864
864
|
"500": "rgb(65, 118, 230)",
|
|
865
865
|
"600": "rgb(72, 104, 178)",
|
|
866
|
-
"700": {
|
|
866
|
+
"700": { delete: "rgb(47, 76, 143)" },
|
|
867
867
|
"800": "rgb(52, 65, 91)",
|
|
868
868
|
"900": "rgb(40, 49, 66)"
|
|
869
869
|
},
|
|
870
|
-
|
|
870
|
+
green: {
|
|
871
871
|
"100": "rgb(230, 250, 237)",
|
|
872
872
|
"400": "rgb(78, 209, 126)",
|
|
873
873
|
"500": "rgb(34, 197, 94)",
|
|
874
874
|
"900": "rgb(35, 60, 44)"
|
|
875
875
|
},
|
|
876
|
-
|
|
876
|
+
neutral: {
|
|
877
877
|
"50": "rgb(250, 250, 250)",
|
|
878
878
|
"100": "rgb(245, 245, 245)",
|
|
879
879
|
"150": "rgb(237, 237, 237)",
|
|
@@ -890,7 +890,7 @@ window.__ModuleLoader__.load({
|
|
|
890
890
|
"900": "rgb(15, 15, 15)",
|
|
891
891
|
"1000": "rgb(0, 0, 0)",
|
|
892
892
|
"00": "rgb(255, 255, 255)",
|
|
893
|
-
|
|
893
|
+
bluish: {
|
|
894
894
|
"50": "rgb(249, 250, 251)",
|
|
895
895
|
"60": "rgb(245, 246, 247)",
|
|
896
896
|
"75": "rgb(241, 243, 245)",
|
|
@@ -912,7 +912,7 @@ window.__ModuleLoader__.load({
|
|
|
912
912
|
"00": "rgb(255, 255, 255)"
|
|
913
913
|
}
|
|
914
914
|
},
|
|
915
|
-
|
|
915
|
+
red: {
|
|
916
916
|
"50": "rgb(254, 242, 242)",
|
|
917
917
|
"100": "rgb(254, 226, 226)",
|
|
918
918
|
"400": "rgb(242, 90, 90)",
|
|
@@ -13240,6 +13240,7 @@ window.__ModuleLoader__.load({
|
|
|
13240
13240
|
const LINE_FRAGMENT = /^L(\d+)(?:C(\d+))?(?:-L(\d+))?$/u;
|
|
13241
13241
|
const SCHEME = /^([A-Za-z][A-Za-z0-9+.-]*):/u;
|
|
13242
13242
|
const BARE_PATH = /^([^:]+):(\d+)(?::(\d+))?$/u;
|
|
13243
|
+
const MENTION_WHITESPACE = /\s/u;
|
|
13243
13244
|
const URI_UNSAFE = /[%#()\s<>"`]/gu;
|
|
13244
13245
|
const PATH_PUNCTUATION = [
|
|
13245
13246
|
codes.slash,
|
|
@@ -13296,6 +13297,10 @@ window.__ModuleLoader__.load({
|
|
|
13296
13297
|
function isLocalReference(reference) {
|
|
13297
13298
|
return !EXTERNAL_PROTOCOLS.includes(reference.protocol);
|
|
13298
13299
|
}
|
|
13300
|
+
function formatReferenceMention(reference) {
|
|
13301
|
+
const path = reference.path ?? "";
|
|
13302
|
+
return MENTION_WHITESPACE.test(path) ? `@"${path}"` : `@${path}`;
|
|
13303
|
+
}
|
|
13299
13304
|
function findReferences(text) {
|
|
13300
13305
|
const spans = [];
|
|
13301
13306
|
if (text === "" || !TRIGGERS.some((trigger) => text.includes(trigger))) return spans;
|
|
@@ -13352,8 +13357,29 @@ window.__ModuleLoader__.load({
|
|
|
13352
13357
|
return headStart(code);
|
|
13353
13358
|
}
|
|
13354
13359
|
function afterAt(code) {
|
|
13360
|
+
if (code === codes.quotationMark) {
|
|
13361
|
+
effects.consume(code);
|
|
13362
|
+
return quotedPath;
|
|
13363
|
+
}
|
|
13355
13364
|
return asciiAlpha(code) ? headStart(code) : pathStart(code);
|
|
13356
13365
|
}
|
|
13366
|
+
function quotedPath(code) {
|
|
13367
|
+
if (code === null || markdownLineEnding(code)) return nok(code);
|
|
13368
|
+
effects.consume(code);
|
|
13369
|
+
return code === codes.quotationMark ? afterQuotedPath : quotedPath;
|
|
13370
|
+
}
|
|
13371
|
+
function afterQuotedPath(code) {
|
|
13372
|
+
if (code !== codes.numberSign) return finish(code);
|
|
13373
|
+
effects.consume(code);
|
|
13374
|
+
return fragmentInside;
|
|
13375
|
+
}
|
|
13376
|
+
function fragmentInside(code) {
|
|
13377
|
+
if (isPathCode(code) || code === codes.numberSign) {
|
|
13378
|
+
effects.consume(code);
|
|
13379
|
+
return fragmentInside;
|
|
13380
|
+
}
|
|
13381
|
+
return finish(code);
|
|
13382
|
+
}
|
|
13357
13383
|
function headStart(code) {
|
|
13358
13384
|
if (!asciiAlpha(code)) return nok(code);
|
|
13359
13385
|
head = "";
|
|
@@ -13552,6 +13578,7 @@ window.__ModuleLoader__.load({
|
|
|
13552
13578
|
function parseBareReference(raw) {
|
|
13553
13579
|
const body = raw.startsWith("@") ? raw.slice(1) : raw;
|
|
13554
13580
|
if (body === "") return void 0;
|
|
13581
|
+
if (body.startsWith(QUOTED_PATH)) return parseQuotedReference(body);
|
|
13555
13582
|
const scheme = SCHEME.exec(body);
|
|
13556
13583
|
if (scheme !== null && isKnownScheme(scheme[1])) return parseReference(body);
|
|
13557
13584
|
const matched = BARE_PATH.exec(body);
|
|
@@ -13568,6 +13595,21 @@ window.__ModuleLoader__.load({
|
|
|
13568
13595
|
...column === void 0 ? {} : { column: Number(column) }
|
|
13569
13596
|
};
|
|
13570
13597
|
}
|
|
13598
|
+
/** 引号 mention 的起手字符:`@"path with spaces"`。 */
|
|
13599
|
+
const QUOTED_PATH = "\"";
|
|
13600
|
+
function parseQuotedReference(body) {
|
|
13601
|
+
const end = body.indexOf(QUOTED_PATH, 1);
|
|
13602
|
+
if (end === -1) return void 0;
|
|
13603
|
+
const path = body.slice(1, end);
|
|
13604
|
+
if (path === "") return void 0;
|
|
13605
|
+
const fragment = splitLineFragment(body.slice(end + 1));
|
|
13606
|
+
if (fragment.head !== "") return void 0;
|
|
13607
|
+
return {
|
|
13608
|
+
protocol: DEFAULT_PROTOCOL,
|
|
13609
|
+
path,
|
|
13610
|
+
...fragment.lines
|
|
13611
|
+
};
|
|
13612
|
+
}
|
|
13571
13613
|
function referenceFromMarkdown() {
|
|
13572
13614
|
return {
|
|
13573
13615
|
enter: { reference: enterReference },
|
|
@@ -13701,6 +13743,7 @@ window.__ModuleLoader__.load({
|
|
|
13701
13743
|
exports.dsw = dsw;
|
|
13702
13744
|
exports.findReferences = findReferences;
|
|
13703
13745
|
exports.formatReference = formatReference;
|
|
13746
|
+
exports.formatReferenceMention = formatReferenceMention;
|
|
13704
13747
|
exports.inject = inject;
|
|
13705
13748
|
exports.isLocalReference = isLocalReference;
|
|
13706
13749
|
exports.markdownLabels = markdownLabels;
|