@duskmoon-dev/core 1.11.0 → 1.11.1
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/components/index.css +139 -4
- package/dist/components/popover.css +5 -4
- package/dist/esm/components/popover.js +5 -4
- package/dist/index.css +139 -4
- package/dist/index.min.css +1 -1
- package/package.json +6 -1
|
@@ -14408,10 +14408,10 @@
|
|
|
14408
14408
|
}
|
|
14409
14409
|
|
|
14410
14410
|
/* Popover as direct overlay (simpler structure) */
|
|
14411
|
-
.popover[class*="popover-top"],
|
|
14412
|
-
.popover[class*="popover-bottom"],
|
|
14413
|
-
.popover[class*="popover-left"],
|
|
14414
|
-
.popover[class*="popover-right"] {
|
|
14411
|
+
.popover:not([popover])[class*="popover-top"],
|
|
14412
|
+
.popover:not([popover])[class*="popover-bottom"],
|
|
14413
|
+
.popover:not([popover])[class*="popover-left"],
|
|
14414
|
+
.popover:not([popover])[class*="popover-right"] {
|
|
14415
14415
|
position: absolute;
|
|
14416
14416
|
z-index: 1050;
|
|
14417
14417
|
min-width: 12rem;
|
|
@@ -14883,6 +14883,7 @@
|
|
|
14883
14883
|
/* Popover open state */
|
|
14884
14884
|
.popover[popover]:popover-open {
|
|
14885
14885
|
opacity: 1;
|
|
14886
|
+
visibility: visible;
|
|
14886
14887
|
transform: scale(1);
|
|
14887
14888
|
}
|
|
14888
14889
|
|
|
@@ -15453,6 +15454,140 @@
|
|
|
15453
15454
|
* CONTENT COMPONENTS
|
|
15454
15455
|
* ============================================ */
|
|
15455
15456
|
|
|
15457
|
+
/**
|
|
15458
|
+
* Code Block Component
|
|
15459
|
+
* Styled container for displaying code with optional header, language badge, and copy button
|
|
15460
|
+
* Uses DuskMoonUI color tokens for automatic theme switching
|
|
15461
|
+
*/
|
|
15462
|
+
|
|
15463
|
+
@layer components {
|
|
15464
|
+
/* ============================================
|
|
15465
|
+
* BASE CONTAINER
|
|
15466
|
+
* ============================================ */
|
|
15467
|
+
|
|
15468
|
+
.code-block {
|
|
15469
|
+
border: 1px solid var(--color-outline);
|
|
15470
|
+
border-radius: 0.5rem;
|
|
15471
|
+
overflow: hidden;
|
|
15472
|
+
}
|
|
15473
|
+
|
|
15474
|
+
/* ============================================
|
|
15475
|
+
* HEADER
|
|
15476
|
+
* ============================================ */
|
|
15477
|
+
|
|
15478
|
+
.code-header {
|
|
15479
|
+
display: flex;
|
|
15480
|
+
align-items: center;
|
|
15481
|
+
gap: 0.5rem;
|
|
15482
|
+
padding: 0.5rem 1rem;
|
|
15483
|
+
background-color: var(--color-surface-container-highest);
|
|
15484
|
+
border-bottom: 1px solid var(--color-outline);
|
|
15485
|
+
font-size: 0.75rem;
|
|
15486
|
+
}
|
|
15487
|
+
|
|
15488
|
+
.code-title {
|
|
15489
|
+
color: var(--color-on-surface);
|
|
15490
|
+
font-weight: 600;
|
|
15491
|
+
margin-right: auto;
|
|
15492
|
+
}
|
|
15493
|
+
|
|
15494
|
+
.code-language {
|
|
15495
|
+
color: var(--color-on-surface-variant);
|
|
15496
|
+
text-transform: uppercase;
|
|
15497
|
+
letter-spacing: 0.05em;
|
|
15498
|
+
font-weight: 500;
|
|
15499
|
+
}
|
|
15500
|
+
|
|
15501
|
+
/* Push language badge to the left when no title precedes it */
|
|
15502
|
+
.code-language:first-child {
|
|
15503
|
+
margin-right: auto;
|
|
15504
|
+
}
|
|
15505
|
+
|
|
15506
|
+
/* ============================================
|
|
15507
|
+
* COPY BUTTON
|
|
15508
|
+
* ============================================ */
|
|
15509
|
+
|
|
15510
|
+
.code-block .copy-button {
|
|
15511
|
+
display: flex;
|
|
15512
|
+
align-items: center;
|
|
15513
|
+
gap: 0.375rem;
|
|
15514
|
+
padding: 0.25rem 0.5rem;
|
|
15515
|
+
border: none;
|
|
15516
|
+
border-radius: 0.25rem;
|
|
15517
|
+
background: transparent;
|
|
15518
|
+
color: var(--color-on-surface-variant);
|
|
15519
|
+
font-size: 0.75rem;
|
|
15520
|
+
cursor: pointer;
|
|
15521
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
15522
|
+
}
|
|
15523
|
+
|
|
15524
|
+
.code-block .copy-button:hover {
|
|
15525
|
+
background-color: var(--color-outline-variant);
|
|
15526
|
+
color: var(--color-on-surface);
|
|
15527
|
+
}
|
|
15528
|
+
|
|
15529
|
+
.code-block .copy-icon {
|
|
15530
|
+
flex-shrink: 0;
|
|
15531
|
+
}
|
|
15532
|
+
|
|
15533
|
+
/* ============================================
|
|
15534
|
+
* CODE CONTENT
|
|
15535
|
+
* ============================================ */
|
|
15536
|
+
|
|
15537
|
+
.code-content {
|
|
15538
|
+
background-color: var(--color-surface-container);
|
|
15539
|
+
overflow-x: auto;
|
|
15540
|
+
}
|
|
15541
|
+
|
|
15542
|
+
.code-content pre {
|
|
15543
|
+
margin: 0;
|
|
15544
|
+
padding: 1rem;
|
|
15545
|
+
background: transparent;
|
|
15546
|
+
border-radius: 0;
|
|
15547
|
+
overflow-x: auto;
|
|
15548
|
+
}
|
|
15549
|
+
|
|
15550
|
+
.code-content code {
|
|
15551
|
+
background: transparent;
|
|
15552
|
+
padding: 0;
|
|
15553
|
+
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
|
|
15554
|
+
font-size: 0.875rem;
|
|
15555
|
+
line-height: 1.6;
|
|
15556
|
+
}
|
|
15557
|
+
|
|
15558
|
+
/* ============================================
|
|
15559
|
+
* VARIANTS
|
|
15560
|
+
* ============================================ */
|
|
15561
|
+
|
|
15562
|
+
/* Compact variant — reduced padding */
|
|
15563
|
+
.code-block-compact .code-header {
|
|
15564
|
+
padding: 0.375rem 0.75rem;
|
|
15565
|
+
}
|
|
15566
|
+
|
|
15567
|
+
.code-block-compact .code-content pre {
|
|
15568
|
+
padding: 0.75rem;
|
|
15569
|
+
}
|
|
15570
|
+
|
|
15571
|
+
/* Borderless variant */
|
|
15572
|
+
.code-block-borderless {
|
|
15573
|
+
border: none;
|
|
15574
|
+
}
|
|
15575
|
+
|
|
15576
|
+
.code-block-borderless .code-header {
|
|
15577
|
+
border-bottom: none;
|
|
15578
|
+
}
|
|
15579
|
+
|
|
15580
|
+
/* ============================================
|
|
15581
|
+
* REDUCED MOTION
|
|
15582
|
+
* ============================================ */
|
|
15583
|
+
|
|
15584
|
+
@media (prefers-reduced-motion: reduce) {
|
|
15585
|
+
.code-block .copy-button {
|
|
15586
|
+
transition: none;
|
|
15587
|
+
}
|
|
15588
|
+
}
|
|
15589
|
+
}
|
|
15590
|
+
|
|
15456
15591
|
/**
|
|
15457
15592
|
* Markdown Body Component
|
|
15458
15593
|
* GitHub-style typography for rendered markdown content
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/* Popover as direct overlay (simpler structure) */
|
|
46
|
-
.popover[class*="popover-top"],
|
|
47
|
-
.popover[class*="popover-bottom"],
|
|
48
|
-
.popover[class*="popover-left"],
|
|
49
|
-
.popover[class*="popover-right"] {
|
|
46
|
+
.popover:not([popover])[class*="popover-top"],
|
|
47
|
+
.popover:not([popover])[class*="popover-bottom"],
|
|
48
|
+
.popover:not([popover])[class*="popover-left"],
|
|
49
|
+
.popover:not([popover])[class*="popover-right"] {
|
|
50
50
|
position: absolute;
|
|
51
51
|
z-index: 1050;
|
|
52
52
|
min-width: 12rem;
|
|
@@ -518,6 +518,7 @@
|
|
|
518
518
|
/* Popover open state */
|
|
519
519
|
.popover[popover]:popover-open {
|
|
520
520
|
opacity: 1;
|
|
521
|
+
visibility: visible;
|
|
521
522
|
transform: scale(1);
|
|
522
523
|
}
|
|
523
524
|
|
|
@@ -44,10 +44,10 @@ export const css = `/**
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/* Popover as direct overlay (simpler structure) */
|
|
47
|
-
.popover[class*="popover-top"],
|
|
48
|
-
.popover[class*="popover-bottom"],
|
|
49
|
-
.popover[class*="popover-left"],
|
|
50
|
-
.popover[class*="popover-right"] {
|
|
47
|
+
.popover:not([popover])[class*="popover-top"],
|
|
48
|
+
.popover:not([popover])[class*="popover-bottom"],
|
|
49
|
+
.popover:not([popover])[class*="popover-left"],
|
|
50
|
+
.popover:not([popover])[class*="popover-right"] {
|
|
51
51
|
position: absolute;
|
|
52
52
|
z-index: 1050;
|
|
53
53
|
min-width: 12rem;
|
|
@@ -519,6 +519,7 @@ export const css = `/**
|
|
|
519
519
|
/* Popover open state */
|
|
520
520
|
.popover[popover]:popover-open {
|
|
521
521
|
opacity: 1;
|
|
522
|
+
visibility: visible;
|
|
522
523
|
transform: scale(1);
|
|
523
524
|
}
|
|
524
525
|
|
package/dist/index.css
CHANGED
|
@@ -15800,10 +15800,10 @@ html {
|
|
|
15800
15800
|
}
|
|
15801
15801
|
|
|
15802
15802
|
/* Popover as direct overlay (simpler structure) */
|
|
15803
|
-
.popover[class*="popover-top"],
|
|
15804
|
-
.popover[class*="popover-bottom"],
|
|
15805
|
-
.popover[class*="popover-left"],
|
|
15806
|
-
.popover[class*="popover-right"] {
|
|
15803
|
+
.popover:not([popover])[class*="popover-top"],
|
|
15804
|
+
.popover:not([popover])[class*="popover-bottom"],
|
|
15805
|
+
.popover:not([popover])[class*="popover-left"],
|
|
15806
|
+
.popover:not([popover])[class*="popover-right"] {
|
|
15807
15807
|
position: absolute;
|
|
15808
15808
|
z-index: 1050;
|
|
15809
15809
|
min-width: 12rem;
|
|
@@ -16275,6 +16275,7 @@ html {
|
|
|
16275
16275
|
/* Popover open state */
|
|
16276
16276
|
.popover[popover]:popover-open {
|
|
16277
16277
|
opacity: 1;
|
|
16278
|
+
visibility: visible;
|
|
16278
16279
|
transform: scale(1);
|
|
16279
16280
|
}
|
|
16280
16281
|
|
|
@@ -16845,6 +16846,140 @@ html {
|
|
|
16845
16846
|
* CONTENT COMPONENTS
|
|
16846
16847
|
* ============================================ */
|
|
16847
16848
|
|
|
16849
|
+
/**
|
|
16850
|
+
* Code Block Component
|
|
16851
|
+
* Styled container for displaying code with optional header, language badge, and copy button
|
|
16852
|
+
* Uses DuskMoonUI color tokens for automatic theme switching
|
|
16853
|
+
*/
|
|
16854
|
+
|
|
16855
|
+
@layer components {
|
|
16856
|
+
/* ============================================
|
|
16857
|
+
* BASE CONTAINER
|
|
16858
|
+
* ============================================ */
|
|
16859
|
+
|
|
16860
|
+
.code-block {
|
|
16861
|
+
border: 1px solid var(--color-outline);
|
|
16862
|
+
border-radius: 0.5rem;
|
|
16863
|
+
overflow: hidden;
|
|
16864
|
+
}
|
|
16865
|
+
|
|
16866
|
+
/* ============================================
|
|
16867
|
+
* HEADER
|
|
16868
|
+
* ============================================ */
|
|
16869
|
+
|
|
16870
|
+
.code-header {
|
|
16871
|
+
display: flex;
|
|
16872
|
+
align-items: center;
|
|
16873
|
+
gap: 0.5rem;
|
|
16874
|
+
padding: 0.5rem 1rem;
|
|
16875
|
+
background-color: var(--color-surface-container-highest);
|
|
16876
|
+
border-bottom: 1px solid var(--color-outline);
|
|
16877
|
+
font-size: 0.75rem;
|
|
16878
|
+
}
|
|
16879
|
+
|
|
16880
|
+
.code-title {
|
|
16881
|
+
color: var(--color-on-surface);
|
|
16882
|
+
font-weight: 600;
|
|
16883
|
+
margin-right: auto;
|
|
16884
|
+
}
|
|
16885
|
+
|
|
16886
|
+
.code-language {
|
|
16887
|
+
color: var(--color-on-surface-variant);
|
|
16888
|
+
text-transform: uppercase;
|
|
16889
|
+
letter-spacing: 0.05em;
|
|
16890
|
+
font-weight: 500;
|
|
16891
|
+
}
|
|
16892
|
+
|
|
16893
|
+
/* Push language badge to the left when no title precedes it */
|
|
16894
|
+
.code-language:first-child {
|
|
16895
|
+
margin-right: auto;
|
|
16896
|
+
}
|
|
16897
|
+
|
|
16898
|
+
/* ============================================
|
|
16899
|
+
* COPY BUTTON
|
|
16900
|
+
* ============================================ */
|
|
16901
|
+
|
|
16902
|
+
.code-block .copy-button {
|
|
16903
|
+
display: flex;
|
|
16904
|
+
align-items: center;
|
|
16905
|
+
gap: 0.375rem;
|
|
16906
|
+
padding: 0.25rem 0.5rem;
|
|
16907
|
+
border: none;
|
|
16908
|
+
border-radius: 0.25rem;
|
|
16909
|
+
background: transparent;
|
|
16910
|
+
color: var(--color-on-surface-variant);
|
|
16911
|
+
font-size: 0.75rem;
|
|
16912
|
+
cursor: pointer;
|
|
16913
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
16914
|
+
}
|
|
16915
|
+
|
|
16916
|
+
.code-block .copy-button:hover {
|
|
16917
|
+
background-color: var(--color-outline-variant);
|
|
16918
|
+
color: var(--color-on-surface);
|
|
16919
|
+
}
|
|
16920
|
+
|
|
16921
|
+
.code-block .copy-icon {
|
|
16922
|
+
flex-shrink: 0;
|
|
16923
|
+
}
|
|
16924
|
+
|
|
16925
|
+
/* ============================================
|
|
16926
|
+
* CODE CONTENT
|
|
16927
|
+
* ============================================ */
|
|
16928
|
+
|
|
16929
|
+
.code-content {
|
|
16930
|
+
background-color: var(--color-surface-container);
|
|
16931
|
+
overflow-x: auto;
|
|
16932
|
+
}
|
|
16933
|
+
|
|
16934
|
+
.code-content pre {
|
|
16935
|
+
margin: 0;
|
|
16936
|
+
padding: 1rem;
|
|
16937
|
+
background: transparent;
|
|
16938
|
+
border-radius: 0;
|
|
16939
|
+
overflow-x: auto;
|
|
16940
|
+
}
|
|
16941
|
+
|
|
16942
|
+
.code-content code {
|
|
16943
|
+
background: transparent;
|
|
16944
|
+
padding: 0;
|
|
16945
|
+
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
|
|
16946
|
+
font-size: 0.875rem;
|
|
16947
|
+
line-height: 1.6;
|
|
16948
|
+
}
|
|
16949
|
+
|
|
16950
|
+
/* ============================================
|
|
16951
|
+
* VARIANTS
|
|
16952
|
+
* ============================================ */
|
|
16953
|
+
|
|
16954
|
+
/* Compact variant — reduced padding */
|
|
16955
|
+
.code-block-compact .code-header {
|
|
16956
|
+
padding: 0.375rem 0.75rem;
|
|
16957
|
+
}
|
|
16958
|
+
|
|
16959
|
+
.code-block-compact .code-content pre {
|
|
16960
|
+
padding: 0.75rem;
|
|
16961
|
+
}
|
|
16962
|
+
|
|
16963
|
+
/* Borderless variant */
|
|
16964
|
+
.code-block-borderless {
|
|
16965
|
+
border: none;
|
|
16966
|
+
}
|
|
16967
|
+
|
|
16968
|
+
.code-block-borderless .code-header {
|
|
16969
|
+
border-bottom: none;
|
|
16970
|
+
}
|
|
16971
|
+
|
|
16972
|
+
/* ============================================
|
|
16973
|
+
* REDUCED MOTION
|
|
16974
|
+
* ============================================ */
|
|
16975
|
+
|
|
16976
|
+
@media (prefers-reduced-motion: reduce) {
|
|
16977
|
+
.code-block .copy-button {
|
|
16978
|
+
transition: none;
|
|
16979
|
+
}
|
|
16980
|
+
}
|
|
16981
|
+
}
|
|
16982
|
+
|
|
16848
16983
|
/**
|
|
16849
16984
|
* Markdown Body Component
|
|
16850
16985
|
* GitHub-style typography for rendered markdown content
|