@terrafirmagreg-team/ui 0.1.0 → 1.2.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/package.json +14 -14
- package/src/components/blocks/button/icon-button.tsx +1 -0
- package/src/components/blocks/canvas/chevron-edge.tsx +126 -18
- package/src/components/blocks/canvas/flow-canvas.tsx +4 -0
- package/src/components/blocks/canvas/flow-toolbar.tsx +1 -0
- package/src/components/blocks/canvas/flow-viewport.tsx +1 -0
- package/src/components/blocks/fit-box.tsx +26 -0
- package/src/components/blocks/git/github-info.tsx +1 -0
- package/src/components/blocks/lang/content.tsx +40 -10
- package/src/components/blocks/lang/flag.tsx +1 -0
- package/src/components/blocks/lang/link.tsx +1 -0
- package/src/components/blocks/lang/redirect.tsx +2 -1
- package/src/components/blocks/lang/switcher.tsx +1 -0
- package/src/components/blocks/lang/untranslated-callout.tsx +4 -3
- package/src/components/blocks/lang/untranslated-chip.tsx +53 -0
- package/src/components/blocks/link/link-preview.tsx +2 -1
- package/src/components/blocks/list/row.tsx +1 -0
- package/src/components/blocks/media/glb/model.tsx +1 -0
- package/src/components/blocks/media/glb/scene.tsx +13 -12
- package/src/components/blocks/media/glb/viewer.tsx +1 -0
- package/src/components/blocks/media/image.tsx +3 -2
- package/src/components/blocks/media/slideshow.tsx +4 -3
- package/src/components/blocks/nav/breadcrumb.tsx +1 -0
- package/src/components/blocks/nav/copy-menu.tsx +37 -0
- package/src/components/blocks/nav/link.tsx +1 -0
- package/src/components/blocks/nav/site-menu.tsx +1 -0
- package/src/components/blocks/nav/site-title.tsx +1 -0
- package/src/components/blocks/nav/switcher.tsx +1 -0
- package/src/components/blocks/page/empty-state.tsx +1 -0
- package/src/components/blocks/page/heading.tsx +3 -2
- package/src/components/blocks/page/pager.tsx +110 -2
- package/src/components/blocks/readability/fields.tsx +250 -0
- package/src/components/blocks/readability/menu.tsx +74 -258
- package/src/components/blocks/readability/track.tsx +2 -1
- package/src/components/blocks/search/command.tsx +1 -0
- package/src/components/blocks/search/dialog.tsx +21 -9
- package/src/components/blocks/search/provider.tsx +2 -1
- package/src/components/blocks/sidebar.tsx +5 -5
- package/src/components/blocks/sprite.tsx +231 -0
- package/src/components/blocks/text/format-text.tsx +110 -0
- package/src/components/blocks/theme/toggle.tsx +4 -0
- package/src/components/blocks/tooltip/hint.tsx +1 -0
- package/src/components/blocks/tooltip/lazy.tsx +41 -0
- package/src/components/blocks/viewer/controls.tsx +11 -6
- package/src/components/blocks/viewer/float-bar.tsx +1 -0
- package/src/components/layouts/layout.tsx +2 -1
- package/src/components/layouts/left-sidebar/content.tsx +1 -0
- package/src/components/layouts/left-sidebar/context.tsx +1 -0
- package/src/components/layouts/left-sidebar/expand.tsx +2 -1
- package/src/components/layouts/left-sidebar/footer.tsx +10 -4
- package/src/components/layouts/left-sidebar/index.ts +1 -0
- package/src/components/layouts/left-sidebar/items.tsx +2 -1
- package/src/components/layouts/left-sidebar/search.tsx +4 -3
- package/src/components/layouts/left-sidebar/sidebar.tsx +3 -2
- package/src/components/layouts/left-sidebar/tree.tsx +1 -0
- package/src/components/layouts/right-sidebar.tsx +1 -0
- package/src/components/layouts/tree-context.tsx +1 -0
- package/src/components/mdx/accordion.tsx +3 -2
- package/src/components/mdx/banner.tsx +15 -12
- package/src/components/mdx/callout.tsx +1 -0
- package/src/components/mdx/card.tsx +12 -5
- package/src/components/mdx/codeblock.tsx +5 -4
- package/src/components/mdx/collapsible.tsx +1 -0
- package/src/components/mdx/files.tsx +1 -0
- package/src/components/mdx/glow-header.tsx +17 -3
- package/src/components/mdx/gradient-text.tsx +1 -0
- package/src/components/mdx/icon.tsx +35 -0
- package/src/components/mdx/image-zoom.tsx +5 -4
- package/src/components/mdx/math.tsx +30 -0
- package/src/components/mdx/mermaid.tsx +8 -1
- package/src/components/mdx/multiblock.tsx +1 -0
- package/src/components/mdx/preview.tsx +2 -1
- package/src/components/mdx/steps.tsx +1 -0
- package/src/components/mdx/table.tsx +1 -0
- package/src/components/mdx/tabs.tsx +2 -1
- package/src/components/mdx/type-table.tsx +7 -6
- package/src/{provider.tsx → components/provider.tsx} +1 -3
- package/src/hooks/canvas/use-flow-hover.ts +1 -0
- package/src/hooks/canvas/use-flow-viewport-persist.ts +1 -0
- package/src/hooks/page/use-fit-pages.ts +1 -0
- package/src/hooks/page/use-location-search.ts +8 -2
- package/src/hooks/page/use-page-preview.ts +2 -1
- package/src/hooks/page/use-paged-list.ts +1 -0
- package/src/hooks/readability/{provider.ts → use-readability.ts} +1 -0
- package/src/hooks/search/{dialog.ts → use-dialog.ts} +1 -0
- package/src/hooks/search/use-highlight-query.ts +8 -1
- package/src/hooks/search/{provider.ts → use-provider.ts} +1 -0
- package/src/hooks/use-async-value.ts +6 -3
- package/src/hooks/use-close-on-scroll.ts +1 -0
- package/src/hooks/use-copy-button.ts +1 -0
- package/src/hooks/use-cycle-index.ts +1 -0
- package/src/hooks/use-document-title.ts +1 -0
- package/src/hooks/use-element-size.ts +1 -0
- package/src/hooks/use-external-meta.ts +2 -1
- package/src/hooks/use-hot-key.ts +1 -0
- package/src/hooks/use-hover-follow.ts +1 -0
- package/src/hooks/use-in-view.ts +1 -0
- package/src/hooks/{lang.ts → use-lang.ts} +1 -0
- package/src/hooks/use-last-value.ts +1 -0
- package/src/hooks/{layout.ts → use-layout.ts} +1 -0
- package/src/hooks/use-marquee.ts +1 -0
- package/src/hooks/use-media-query.ts +1 -0
- package/src/hooks/use-mobile.ts +1 -0
- package/src/hooks/use-modifier-keys.ts +1 -0
- package/src/hooks/use-on-change.ts +1 -0
- package/src/hooks/use-pane-keys.ts +1 -0
- package/src/hooks/{sidebar.ts → use-sidebar.ts} +1 -0
- package/src/hooks/use-swipe.ts +1 -0
- package/src/hooks/use-tree.ts +1 -3
- package/src/hooks/viewer/use-in-float-bar.ts +1 -0
- package/src/hooks/viewer/use-viewer-prefs.ts +1 -0
- package/src/lib/canvas/edge.ts +78 -49
- package/src/lib/canvas/geometry.ts +1 -0
- package/src/lib/canvas/state.ts +1 -0
- package/src/lib/canvas/viewport.ts +1 -0
- package/src/lib/canvas/xyflow.ts +1 -0
- package/src/lib/config.ts +25 -0
- package/src/lib/mdx/callout.ts +1 -0
- package/src/lib/mdx/gradient.ts +1 -0
- package/src/lib/mdx/mermaid.ts +1 -0
- package/src/lib/media/crop-opaque.ts +1 -0
- package/src/lib/media/nearby-indexes.ts +1 -0
- package/src/lib/media/trim-transparent.ts +1 -0
- package/src/lib/readability/config.ts +1 -0
- package/src/lib/readability/spotlight.ts +1 -0
- package/src/lib/readability/store.ts +1 -0
- package/src/lib/tree.ts +1 -3
- package/src/lib/utils/cn.ts +1 -0
- package/src/lib/utils/format.ts +3 -3
- package/src/lib/utils/highlight-style.ts +10 -0
- package/src/lib/utils/history.ts +1 -0
- package/src/lib/utils/merge-refs.ts +1 -0
- package/src/lib/utils/nav-active.ts +1 -0
- package/src/lib/utils/stored-value.ts +1 -0
- package/src/lib/utils/urls.ts +2 -1
- package/src/locales/en_us.json +108 -117
- package/src/locales/pl_pl.json +33 -35
- package/src/locales/ru_ru.json +108 -117
- package/src/locales/uk_ua.json +33 -35
- package/src/locales/zh_cn.json +15 -17
- package/src/locales/zh_tw.json +15 -17
- package/src/locales.ts +1 -0
- package/src/types/canvas.ts +6 -1
- package/src/types/glb.ts +1 -0
- package/src/types/mdx-directives.ts +106 -0
- package/src/types/nav.ts +1 -0
- package/src/types/preview.ts +7 -1
- package/src/types/readability.ts +1 -0
- package/src/types/search.ts +1 -0
- package/src/types/tree.ts +1 -0
- package/src/types/viewer.ts +1 -0
- package/styles/content/base.css +198 -194
- package/styles/content/shiki.css +107 -108
- package/styles/content/typography.mjs +3637 -3941
- package/styles/content.css +5 -7
- package/styles.css +430 -413
- package/src/lib/utils/async-cache.ts +0 -32
package/styles/content/base.css
CHANGED
|
@@ -1,194 +1,198 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--sidebar-drawer-offset: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
[dir='rtl'] {
|
|
6
|
-
--sidebar-drawer-offset: -100%;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@theme {
|
|
10
|
-
--animate-fade-in: fade-in 300ms ease;
|
|
11
|
-
--animate-fade-out: fade-out 300ms ease;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
--animate-dialog-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
--animate-popover-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
--animate-sidebar-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
::
|
|
101
|
-
::
|
|
102
|
-
::
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
color: var(--color-secondary
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
#
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
@
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--sidebar-drawer-offset: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
[dir='rtl'] {
|
|
6
|
+
--sidebar-drawer-offset: -100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@theme {
|
|
10
|
+
--animate-fade-in: fade-in 300ms ease;
|
|
11
|
+
--animate-fade-out: fade-out 300ms ease;
|
|
12
|
+
|
|
13
|
+
--animate-roll-in: roll-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
14
|
+
|
|
15
|
+
--animate-dialog-in: dialog-in 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
16
|
+
--animate-dialog-out: dialog-out 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
17
|
+
|
|
18
|
+
--animate-popover-in: popover-in 100ms ease;
|
|
19
|
+
--animate-popover-out: popover-out 100ms ease;
|
|
20
|
+
|
|
21
|
+
--animate-sidebar-in: sidebar-in 250ms ease;
|
|
22
|
+
--animate-sidebar-out: sidebar-out 250ms ease;
|
|
23
|
+
|
|
24
|
+
@keyframes sidebar-in {
|
|
25
|
+
from {
|
|
26
|
+
transform: translateX(var(--sidebar-drawer-offset));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes sidebar-out {
|
|
31
|
+
to {
|
|
32
|
+
transform: translateX(var(--sidebar-drawer-offset));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes dialog-in {
|
|
37
|
+
from {
|
|
38
|
+
transform: scale(1.06);
|
|
39
|
+
opacity: 0;
|
|
40
|
+
}
|
|
41
|
+
to {
|
|
42
|
+
transform: scale(1);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes dialog-out {
|
|
47
|
+
from {
|
|
48
|
+
transform: scale(1);
|
|
49
|
+
}
|
|
50
|
+
to {
|
|
51
|
+
transform: scale(1.04);
|
|
52
|
+
opacity: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes popover-in {
|
|
57
|
+
from {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transform: scale(0.9);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes popover-out {
|
|
64
|
+
to {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
transform: scale(0.9);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@keyframes fade-in {
|
|
71
|
+
from {
|
|
72
|
+
opacity: 0;
|
|
73
|
+
}
|
|
74
|
+
to {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes roll-in {
|
|
80
|
+
from {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
translate: 0 calc(var(--roll, 1) * 0.6em);
|
|
83
|
+
filter: blur(2px);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@keyframes fade-out {
|
|
88
|
+
from {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
}
|
|
91
|
+
to {
|
|
92
|
+
opacity: 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@layer base {
|
|
98
|
+
*,
|
|
99
|
+
::after,
|
|
100
|
+
::before,
|
|
101
|
+
::backdrop,
|
|
102
|
+
::file-selector-button {
|
|
103
|
+
border-color: var(--color-border, currentColor);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
body {
|
|
107
|
+
background-color: var(--color-background);
|
|
108
|
+
color: var(--color-foreground);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@utility scroll-container {
|
|
113
|
+
&::-webkit-scrollbar {
|
|
114
|
+
width: 5px;
|
|
115
|
+
height: 5px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&::-webkit-scrollbar-thumb {
|
|
119
|
+
border-radius: 5px;
|
|
120
|
+
background: var(--color-border);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&::-webkit-scrollbar-track {
|
|
124
|
+
background: transparent;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&::-webkit-scrollbar-corner {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@utility fd-steps {
|
|
133
|
+
counter-reset: step;
|
|
134
|
+
position: relative;
|
|
135
|
+
@apply ps-6 ms-2 border-s sm:ms-4 sm:ps-7;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@utility fd-step {
|
|
139
|
+
position: relative;
|
|
140
|
+
@apply pb-6;
|
|
141
|
+
&:before {
|
|
142
|
+
background-color: var(--color-secondary);
|
|
143
|
+
color: var(--color-secondary-foreground);
|
|
144
|
+
content: counter(step);
|
|
145
|
+
counter-increment: step;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
align-items: center;
|
|
148
|
+
font-size: 0.875rem;
|
|
149
|
+
line-height: 1.25rem;
|
|
150
|
+
display: flex;
|
|
151
|
+
position: absolute;
|
|
152
|
+
top: 0;
|
|
153
|
+
inset-inline-end: calc(100% + 0.5rem);
|
|
154
|
+
@media (min-width: 40rem) {
|
|
155
|
+
inset-inline-end: calc(100% + 0.75rem);
|
|
156
|
+
}
|
|
157
|
+
@apply size-8 rounded-full;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@utility prose-no-margin {
|
|
162
|
+
& > :first-child {
|
|
163
|
+
margin-top: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
& > :last-child {
|
|
167
|
+
margin-bottom: 0;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@variant dark (&:where(.dark, .dark *));
|
|
172
|
+
|
|
173
|
+
@variant layout {
|
|
174
|
+
#docs-layout:has(&),
|
|
175
|
+
#notebook-layout:has(&),
|
|
176
|
+
#home-layout:has(&),
|
|
177
|
+
#flux-layout:has(&),
|
|
178
|
+
#glass-layout:has(&),
|
|
179
|
+
#spacious-layout:has(&) {
|
|
180
|
+
@slot;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@property --sidebar-col {
|
|
185
|
+
syntax: '<length>';
|
|
186
|
+
inherits: true;
|
|
187
|
+
initial-value: 0px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@property --ai-chat-col {
|
|
191
|
+
syntax: '<length>';
|
|
192
|
+
inherits: true;
|
|
193
|
+
initial-value: 0px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.fd-page-tree-item-name {
|
|
197
|
+
@apply inline-flex items-center gap-1 w-full;
|
|
198
|
+
}
|
package/styles/content/shiki.css
CHANGED
|
@@ -1,108 +1,107 @@
|
|
|
1
|
-
.shiki:not(.not-fumadocs-codeblock *) {
|
|
2
|
-
--padding-left: calc(var(--spacing) * 4);
|
|
3
|
-
--padding-right: calc(var(--spacing) * 4);
|
|
4
|
-
|
|
5
|
-
code span {
|
|
6
|
-
color: var(--shiki-light);
|
|
7
|
-
font-style: var(--shiki-light-font-style);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.line {
|
|
11
|
-
position: relative;
|
|
12
|
-
padding-left: var(--padding-left);
|
|
13
|
-
padding-right: var(--padding-right);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.line:empty {
|
|
17
|
-
height: 1lh;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&.has-focused .line:not(.focused) {
|
|
21
|
-
filter: blur(2px);
|
|
22
|
-
transition: filter 200ms;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.has-focused:hover .line:not(.focused) {
|
|
26
|
-
filter: blur(0);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.diff::before {
|
|
30
|
-
position: absolute;
|
|
31
|
-
left: calc(var(--spacing) * 1.5);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.diff.remove {
|
|
35
|
-
opacity: 0.7;
|
|
36
|
-
--counter-color: var(--color-diff-remove-symbol);
|
|
37
|
-
@apply bg-diff-remove;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.diff.remove::before {
|
|
41
|
-
content: '-';
|
|
42
|
-
@apply text-diff-remove-symbol;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.diff.add {
|
|
46
|
-
--counter-color: var(--color-diff-add-symbol);
|
|
47
|
-
@apply bg-diff-add;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.diff.add::before {
|
|
51
|
-
content: '+';
|
|
52
|
-
@apply text-diff-add-symbol;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.highlighted {
|
|
56
|
-
--counter-color: var(--color-primary);
|
|
57
|
-
@apply bg-primary/10;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.highlighted::after {
|
|
61
|
-
position: absolute;
|
|
62
|
-
content: '';
|
|
63
|
-
@apply inset-y-0 left-0 border-l-2 border-primary/50;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.highlighted-word {
|
|
67
|
-
padding: 1px;
|
|
68
|
-
@apply border -my-px border-primary/30 bg-primary/10 rounded-md font-medium;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&[data-line-numbers] .twoslash-meta-line {
|
|
72
|
-
padding-left: calc(var(--padding-left) + 7 * var(--spacing));
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&[data-line-numbers] .line {
|
|
76
|
-
counter-increment: line;
|
|
77
|
-
padding-left: calc(var(--padding-left) + 7 * var(--spacing));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&[data-line-numbers] .line::after {
|
|
81
|
-
position: absolute;
|
|
82
|
-
content: counter(line);
|
|
83
|
-
color: color-mix(
|
|
84
|
-
in oklab,
|
|
85
|
-
var(--counter-color, var(--color-muted-foreground)) 60%,
|
|
86
|
-
transparent
|
|
87
|
-
);
|
|
88
|
-
@apply inset-y-0 left-0 w-7 text-right;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.dark .shiki:not(.not-fumadocs-codeblock *) {
|
|
93
|
-
code span {
|
|
94
|
-
color: var(--shiki-dark);
|
|
95
|
-
font-style: var(--shiki-dark-font-style);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
1
|
+
.shiki:not(.not-fumadocs-codeblock *) {
|
|
2
|
+
--padding-left: calc(var(--spacing) * 4);
|
|
3
|
+
--padding-right: calc(var(--spacing) * 4);
|
|
4
|
+
|
|
5
|
+
code span {
|
|
6
|
+
color: var(--shiki-light);
|
|
7
|
+
font-style: var(--shiki-light-font-style);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.line {
|
|
11
|
+
position: relative;
|
|
12
|
+
padding-left: var(--padding-left);
|
|
13
|
+
padding-right: var(--padding-right);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.line:empty {
|
|
17
|
+
height: 1lh;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.has-focused .line:not(.focused) {
|
|
21
|
+
filter: blur(2px);
|
|
22
|
+
transition: filter 200ms;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.has-focused:hover .line:not(.focused) {
|
|
26
|
+
filter: blur(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.diff::before {
|
|
30
|
+
position: absolute;
|
|
31
|
+
left: calc(var(--spacing) * 1.5);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.diff.remove {
|
|
35
|
+
opacity: 0.7;
|
|
36
|
+
--counter-color: var(--color-diff-remove-symbol);
|
|
37
|
+
@apply bg-diff-remove;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.diff.remove::before {
|
|
41
|
+
content: '-';
|
|
42
|
+
@apply text-diff-remove-symbol;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.diff.add {
|
|
46
|
+
--counter-color: var(--color-diff-add-symbol);
|
|
47
|
+
@apply bg-diff-add;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.diff.add::before {
|
|
51
|
+
content: '+';
|
|
52
|
+
@apply text-diff-add-symbol;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.highlighted {
|
|
56
|
+
--counter-color: var(--color-primary);
|
|
57
|
+
@apply bg-primary/10;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.highlighted::after {
|
|
61
|
+
position: absolute;
|
|
62
|
+
content: '';
|
|
63
|
+
@apply inset-y-0 left-0 border-l-2 border-primary/50;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.highlighted-word {
|
|
67
|
+
padding: 1px;
|
|
68
|
+
@apply border -my-px border-primary/30 bg-primary/10 rounded-md font-medium;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&[data-line-numbers] .twoslash-meta-line {
|
|
72
|
+
padding-left: calc(var(--padding-left) + 7 * var(--spacing));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[data-line-numbers] .line {
|
|
76
|
+
counter-increment: line;
|
|
77
|
+
padding-left: calc(var(--padding-left) + 7 * var(--spacing));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&[data-line-numbers] .line::after {
|
|
81
|
+
position: absolute;
|
|
82
|
+
content: counter(line);
|
|
83
|
+
color: color-mix(
|
|
84
|
+
in oklab,
|
|
85
|
+
var(--counter-color, var(--color-muted-foreground)) 60%,
|
|
86
|
+
transparent
|
|
87
|
+
);
|
|
88
|
+
@apply inset-y-0 left-0 w-7 text-right;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dark .shiki:not(.not-fumadocs-codeblock *) {
|
|
93
|
+
code span {
|
|
94
|
+
color: var(--shiki-dark);
|
|
95
|
+
font-style: var(--shiki-dark-font-style);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
code.shiki:not(.not-fumadocs-code *) span {
|
|
100
|
+
color: var(--shiki-light);
|
|
101
|
+
font-style: var(--shiki-light-font-style);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.dark code.shiki:not(.not-fumadocs-code *) span {
|
|
105
|
+
color: var(--shiki-dark);
|
|
106
|
+
font-style: var(--shiki-dark-font-style);
|
|
107
|
+
}
|