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