radiant-docs 0.1.37 → 0.1.38

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 (38) hide show
  1. package/package.json +1 -1
  2. package/template/astro.config.mjs +2 -0
  3. package/template/src/components/Footer.astro +1 -1
  4. package/template/src/components/Header.astro +8 -8
  5. package/template/src/components/OpenApiPage.astro +18 -18
  6. package/template/src/components/Search.astro +18 -18
  7. package/template/src/components/Sidebar.astro +4 -2
  8. package/template/src/components/SidebarDropdown.astro +82 -79
  9. package/template/src/components/SidebarSegmented.astro +5 -5
  10. package/template/src/components/TableOfContents.astro +24 -15
  11. package/template/src/components/ThemeSwitcher.astro +15 -8
  12. package/template/src/components/chat/AskAiWidget.tsx +4 -3
  13. package/template/src/components/endpoint/PlaygroundBar.astro +3 -3
  14. package/template/src/components/endpoint/PlaygroundButton.astro +2 -2
  15. package/template/src/components/endpoint/PlaygroundField.astro +53 -53
  16. package/template/src/components/endpoint/PlaygroundForm.astro +38 -22
  17. package/template/src/components/endpoint/RequestSnippets.astro +54 -21
  18. package/template/src/components/endpoint/ResponseDisplay.astro +24 -24
  19. package/template/src/components/endpoint/ResponseFieldTree.astro +12 -12
  20. package/template/src/components/endpoint/ResponseFields.astro +19 -19
  21. package/template/src/components/endpoint/ResponseSnippets.astro +66 -29
  22. package/template/src/components/ui/CodeTabEdge.astro +6 -4
  23. package/template/src/components/ui/Field.astro +7 -7
  24. package/template/src/components/ui/demo/Demo.astro +1 -1
  25. package/template/src/components/user/Accordion.astro +3 -3
  26. package/template/src/components/user/Callout.astro +8 -8
  27. package/template/src/components/user/CodeBlock.astro +57 -22
  28. package/template/src/components/user/CodeGroup.astro +14 -10
  29. package/template/src/components/user/ComponentPreviewBlock.astro +38 -12
  30. package/template/src/components/user/Image.astro +2 -2
  31. package/template/src/components/user/Step.astro +4 -4
  32. package/template/src/components/user/Tab.astro +1 -1
  33. package/template/src/components/user/Tabs.astro +15 -20
  34. package/template/src/layouts/Layout.astro +1 -1
  35. package/template/src/lib/code/code-block.ts +150 -15
  36. package/template/src/lib/mdx/remark-resolve-internal-links.ts +639 -0
  37. package/template/src/pages/404.astro +44 -0
  38. package/template/src/styles/global.css +28 -19
@@ -55,6 +55,9 @@
55
55
  --border-light: var(--color-neutral-100);
56
56
  --input: oklch(0.922 0 0);
57
57
  --ring: oklch(0.708 0 0);
58
+ --rd-code-surface: #ffffff;
59
+ --rd-code-tab-edge-bg: var(--rd-code-surface);
60
+ --rd-code-tab-edge-border: var(--color-neutral-200);
58
61
  }
59
62
 
60
63
  /* 3. Dark Mode */
@@ -77,6 +80,13 @@
77
80
  --border-light: color-mix(in srgb, var(--color-neutral-800) 50%, transparent);
78
81
  --input: oklch(1 0 0 / 15%);
79
82
  --ring: oklch(0.556 0 0);
83
+ --rd-code-surface: color-mix(
84
+ in srgb,
85
+ var(--color-neutral-800) 55%,
86
+ var(--color-neutral-900) 45%
87
+ );
88
+ --rd-code-tab-edge-bg: var(--rd-code-surface);
89
+ --rd-code-tab-edge-border: var(--color-neutral-800);
80
90
  }
81
91
 
82
92
  @variant dark (&:where(.dark, .dark *));
@@ -143,7 +153,17 @@
143
153
 
144
154
  /* Code single-line styling */
145
155
  :is(.prose, .prose-rules) :not(pre) > code {
146
- @apply px-1 py-px bg-neutral-100/90 text-neutral-600 rounded-md font-mono font-medium border border-neutral-200/80 after:hidden before:hidden;
156
+ @apply px-1 py-px bg-neutral-100/90 text-neutral-600 rounded-md font-mono font-medium border border-neutral-200/80 after:hidden before:hidden dark:bg-neutral-800/80 dark:text-neutral-200 dark:border-neutral-700/80;
157
+ }
158
+
159
+ [data-rd-code-theme] [data-rd-token] {
160
+ color: var(--rd-token-color, currentColor);
161
+ background-color: var(--rd-token-bg, transparent);
162
+ }
163
+
164
+ .dark [data-rd-code-theme] [data-rd-token] {
165
+ color: var(--rd-token-color-dark, var(--rd-token-color, currentColor));
166
+ background-color: var(--rd-token-bg-dark, var(--rd-token-bg, transparent));
147
167
  }
148
168
 
149
169
  /* Keep nested blockquote content flush with the quote container edges */
@@ -203,22 +223,11 @@
203
223
  );
204
224
  }
205
225
 
206
- :root {
207
- --theme-transition: 0ms; /* Default is instant */
208
- }
209
-
210
- /* When the switching class is active, force ALL transitions
211
- to use our synchronized duration */
212
- .is-switching-theme * {
213
- --theme-transition: 200ms; /* Set your desired sync speed */
214
-
215
- transition-duration: var(--theme-transition) !important;
216
- transition-property:
217
- background-color, border-color, color, fill, stroke !important;
218
- }
219
- /* Ensure the pill slider is NOT affected by the forced color duration
220
- so its movement remains independent */
221
- .is-switching-theme .anchor-pill {
222
- transition-duration: 200ms !important;
223
- transition-property: left, width, background-color !important;
226
+ /* While toggling the root theme class, disable transitions for one frame
227
+ so all dark/light styles flip atomically. */
228
+ .is-switching-theme *,
229
+ .is-switching-theme *::before,
230
+ .is-switching-theme *::after {
231
+ transition-duration: 0ms !important;
232
+ transition-delay: 0ms !important;
224
233
  }