@clidey/dory 0.49.0 → 1.0.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 +3 -3
- package/src/components/loading.tsx +1 -1
- package/src/components/navigation.tsx +2 -2
- package/src/components/routes.tsx +1 -1
- package/src/components/search.tsx +2 -2
- package/src/embed/widget-iframe.ts +1 -1
- package/src/entry-server.tsx +2 -2
- package/src/main.tsx +1 -0
- package/src/mdx/api-playground.tsx +8 -8
- package/src/mdx/api.tsx +4 -4
- package/src/mdx/async-api.tsx +1 -1
- package/src/mdx/code.tsx +4 -4
- package/src/mdx/expandable.tsx +4 -4
- package/src/mdx/mdx.tsx +1 -1
- package/src/mdx/mermaid.tsx +1 -1
- package/src/mdx/open-api.tsx +2 -2
- package/src/mdx/source.tsx +2 -2
- package/src/mdx/websocket-playground.tsx +13 -13
- package/src/theme.scss +8 -8
- package/src/ui/table-of-content.tsx +4 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clidey/dory",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A CLI tool for building and previewing documentation sites",
|
|
7
7
|
"keywords": [
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@algolia/autocomplete-core": "1.19.9",
|
|
52
|
-
"@clidey/ux": "
|
|
52
|
+
"@clidey/ux": "1.2.2",
|
|
53
53
|
"@fortawesome/fontawesome-svg-core": "7.3.0",
|
|
54
54
|
"@fortawesome/free-brands-svg-icons": "7.3.0",
|
|
55
55
|
"@fortawesome/free-regular-svg-icons": "7.3.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"sass-embedded": "1.100.0",
|
|
79
79
|
"sirv": "3.0.2",
|
|
80
80
|
"tailwindcss": "4.3.2",
|
|
81
|
-
"tsx": "4.23.
|
|
81
|
+
"tsx": "4.23.1",
|
|
82
82
|
"typescript": "7.0.2",
|
|
83
83
|
"unist-util-visit": "5.1.0",
|
|
84
84
|
"vite": "8.1.4",
|
|
@@ -14,7 +14,7 @@ export const Loading = ({ className, showText = false, loadingText, textClassNam
|
|
|
14
14
|
<Spinner className={className} />
|
|
15
15
|
{
|
|
16
16
|
showText &&
|
|
17
|
-
<div className={classNames("text-sm text-
|
|
17
|
+
<div className={classNames("text-sm text-muted-foreground", textClassName)}>{ loadingText ?? "Loading..."}</div>
|
|
18
18
|
}
|
|
19
19
|
</div>
|
|
20
20
|
)
|
|
@@ -28,7 +28,7 @@ export function Navigation() {
|
|
|
28
28
|
{currentTab.groups.map(group => (
|
|
29
29
|
<div key={group.title}>
|
|
30
30
|
<h3 className="mt-4 text-sm font-semibold">{group.title}</h3>
|
|
31
|
-
<ul role="list" className="mt-2 space-y-2 border-l-2 border-
|
|
31
|
+
<ul role="list" className="mt-2 space-y-2 border-l-2 border-border lg:mt-4 lg:space-y-4 lg:border-border">
|
|
32
32
|
{group.pages.map((page) => {
|
|
33
33
|
const isActive = effectivePath === page.href;
|
|
34
34
|
return (
|
|
@@ -39,7 +39,7 @@ export function Navigation() {
|
|
|
39
39
|
'block w-full pl-3.5 before:pointer-events-none before:absolute before:top-1/2 before:-left-1 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full',
|
|
40
40
|
{
|
|
41
41
|
'font-semibold text-brand-foreground': isActive,
|
|
42
|
-
'text-
|
|
42
|
+
'text-muted-foreground before:hidden before:bg-slate-300 hover:text-muted-foreground hover:before:block dark:text-muted-foreground dark:before:bg-slate-700 dark:hover:text-slate-300': !isActive
|
|
43
43
|
},
|
|
44
44
|
)}>
|
|
45
45
|
{page.title}
|
|
@@ -39,7 +39,7 @@ export default function Routes() {
|
|
|
39
39
|
<div className="flex flex-col items-center justify-center min-h-[50vh] p-8">
|
|
40
40
|
<h1 className="text-6xl font-bold text-gray-300 dark:text-gray-700 mb-4">404</h1>
|
|
41
41
|
<h2 className="text-2xl font-semibold mb-4">Page Not Found</h2>
|
|
42
|
-
<p className="text-gray-600 dark:text-
|
|
42
|
+
<p className="text-gray-600 dark:text-muted-foreground mb-6 text-center max-w-md">
|
|
43
43
|
The page <code className="px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded text-sm">{pathname}</code> doesn't exist.
|
|
44
44
|
</p>
|
|
45
45
|
<button
|
|
@@ -154,7 +154,7 @@ function SearchResult({
|
|
|
154
154
|
<div
|
|
155
155
|
id={`${id}-hierarchy`}
|
|
156
156
|
aria-hidden="true"
|
|
157
|
-
className="mt-1 truncate text-2xs whitespace-nowrap text-
|
|
157
|
+
className="mt-1 truncate text-2xs whitespace-nowrap text-muted-foreground"
|
|
158
158
|
>
|
|
159
159
|
{hierarchy.map((item, itemIndex, items) => (
|
|
160
160
|
<Fragment key={itemIndex}>
|
|
@@ -348,7 +348,7 @@ function SearchDialog({
|
|
|
348
348
|
/>
|
|
349
349
|
<div
|
|
350
350
|
ref={panelRef}
|
|
351
|
-
className="border-t border-
|
|
351
|
+
className="border-t border-border bg-white empty:hidden dark:border-zinc-100/5 dark:bg-white/2.5"
|
|
352
352
|
{...autocomplete.getPanelProps({})}
|
|
353
353
|
>
|
|
354
354
|
{autocompleteState.isOpen && (
|
package/src/entry-server.tsx
CHANGED
|
@@ -153,14 +153,14 @@ export async function render(routePath: string, frontmatter?: Record<string, any
|
|
|
153
153
|
{currentTab.groups.map(group => (
|
|
154
154
|
<div key={group.title}>
|
|
155
155
|
<h3 class="mt-4 text-sm font-semibold">{group.title}</h3>
|
|
156
|
-
<ul role="list" class="mt-2 space-y-2 border-l-2 border-
|
|
156
|
+
<ul role="list" class="mt-2 space-y-2 border-l-2 border-border lg:mt-4 lg:space-y-4 lg:border-border">
|
|
157
157
|
{group.pages.map(page => (
|
|
158
158
|
<li key={page.href} class="relative">
|
|
159
159
|
<a
|
|
160
160
|
href={page.href}
|
|
161
161
|
class={routePath === page.href
|
|
162
162
|
? 'block w-full pl-3.5 font-semibold text-brand-foreground before:pointer-events-none before:absolute before:top-1/2 before:-left-1 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full'
|
|
163
|
-
: 'block w-full pl-3.5 text-
|
|
163
|
+
: 'block w-full pl-3.5 text-muted-foreground before:hidden before:bg-slate-300 hover:text-muted-foreground hover:before:block dark:text-muted-foreground dark:before:bg-slate-700 dark:hover:text-slate-300 before:pointer-events-none before:absolute before:top-1/2 before:-left-1 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full'}
|
|
164
164
|
>
|
|
165
165
|
{page.title}
|
|
166
166
|
</a>
|
package/src/main.tsx
CHANGED
|
@@ -154,8 +154,8 @@ export const HeadersTab = ({ requestConfig, setRequestConfig }: HeadersTabProps)
|
|
|
154
154
|
return (
|
|
155
155
|
<div className="flex flex-col gap-2 px-2 py-4">
|
|
156
156
|
<div className="flex items-center gap-2 px-2">
|
|
157
|
-
<span className="text-sm font-medium text-
|
|
158
|
-
<span className="text-sm font-medium text-
|
|
157
|
+
<span className="text-sm font-medium text-muted-foreground w-32">Key</span>
|
|
158
|
+
<span className="text-sm font-medium text-muted-foreground flex-1">Value</span>
|
|
159
159
|
</div>
|
|
160
160
|
{headersList.map((hdr, idx) => (
|
|
161
161
|
<div key={idx} className="flex items-center gap-2">
|
|
@@ -274,8 +274,8 @@ export const ParamsTab = ({ queryParams, setQueryParams }: ParamsTabProps) => {
|
|
|
274
274
|
return (
|
|
275
275
|
<div className="flex flex-col gap-2 px-2 py-4">
|
|
276
276
|
<div className="flex items-center gap-2">
|
|
277
|
-
<span className="text-sm font-medium text-
|
|
278
|
-
<span className="text-sm font-medium text-
|
|
277
|
+
<span className="text-sm font-medium text-muted-foreground w-32">Name</span>
|
|
278
|
+
<span className="text-sm font-medium text-muted-foreground flex-1">Value</span>
|
|
279
279
|
</div>
|
|
280
280
|
{paramsList.map((p, i) => (
|
|
281
281
|
<div key={i} className="flex items-center gap-2">
|
|
@@ -472,7 +472,7 @@ export function APIPlayground({
|
|
|
472
472
|
'px-4 py-3 text-sm font-medium transition border-b-2',
|
|
473
473
|
selected
|
|
474
474
|
? 'border-brand-foreground text-brand-foreground'
|
|
475
|
-
: 'border-transparent text-
|
|
475
|
+
: 'border-transparent text-muted-foreground hover:text-zinc-300'
|
|
476
476
|
)
|
|
477
477
|
}
|
|
478
478
|
>
|
|
@@ -518,7 +518,7 @@ export function APIPlayground({
|
|
|
518
518
|
</Highlight>
|
|
519
519
|
</div>
|
|
520
520
|
) : (
|
|
521
|
-
<p className="text-sm text-
|
|
521
|
+
<p className="text-sm text-muted-foreground">Request body not applicable for {method.toUpperCase()} requests.</p>
|
|
522
522
|
)}
|
|
523
523
|
</TabPanel>
|
|
524
524
|
|
|
@@ -624,7 +624,7 @@ export function APIPlayground({
|
|
|
624
624
|
)}>
|
|
625
625
|
{response.status} {response.statusText}
|
|
626
626
|
</span>
|
|
627
|
-
<span className="text-xs text-
|
|
627
|
+
<span className="text-xs text-muted-foreground">{response.duration}ms</span>
|
|
628
628
|
</div>
|
|
629
629
|
|
|
630
630
|
<div className="space-y-2">
|
|
@@ -642,7 +642,7 @@ export function APIPlayground({
|
|
|
642
642
|
<div className="space-y-1">
|
|
643
643
|
{Object.entries(response.headers).map(([key, value]) => (
|
|
644
644
|
<div key={key} className="flex text-xs">
|
|
645
|
-
<span className="text-
|
|
645
|
+
<span className="text-muted-foreground w-32">{key}:</span>
|
|
646
646
|
<span className="text-zinc-300">{value}</span>
|
|
647
647
|
</div>
|
|
648
648
|
))}
|
package/src/mdx/api.tsx
CHANGED
|
@@ -86,11 +86,11 @@ function CopyButton({ code }: { code: string }) {
|
|
|
86
86
|
<span
|
|
87
87
|
aria-hidden={copied}
|
|
88
88
|
className={classNames(
|
|
89
|
-
'pointer-events-none flex items-center gap-0.5 text-
|
|
89
|
+
'pointer-events-none flex items-center gap-0.5 text-muted-foreground transition duration-300',
|
|
90
90
|
copied && '-translate-y-1.5 opacity-0',
|
|
91
91
|
)}
|
|
92
92
|
>
|
|
93
|
-
<ClipboardIcon className="h-4 w-4 fill-zinc-500/20 stroke-
|
|
93
|
+
<ClipboardIcon className="h-4 w-4 fill-zinc-500/20 stroke-muted-foreground transition-colors group-hover/button:stroke-muted-foreground" />
|
|
94
94
|
</span>
|
|
95
95
|
<span
|
|
96
96
|
aria-hidden={!copied}
|
|
@@ -121,7 +121,7 @@ function APIPanelHeader({ tag, label }: { tag?: string; label?: string }) {
|
|
|
121
121
|
<span className="h-0.5 w-0.5 rounded-full bg-zinc-500" />
|
|
122
122
|
)}
|
|
123
123
|
{label && (
|
|
124
|
-
<span className="font-mono text-xs text-
|
|
124
|
+
<span className="font-mono text-xs text-muted-foreground">{label}</span>
|
|
125
125
|
)}
|
|
126
126
|
</div>
|
|
127
127
|
)
|
|
@@ -191,7 +191,7 @@ function APIGroupHeader({
|
|
|
191
191
|
'pt-2 transition data-selected:not-data-focus:outline-hidden',
|
|
192
192
|
childIndex === selectedIndex
|
|
193
193
|
? 'border-sky-500 text-sky-400'
|
|
194
|
-
: 'border-transparent text-
|
|
194
|
+
: 'border-transparent text-muted-foreground hover:text-zinc-300',
|
|
195
195
|
)}
|
|
196
196
|
>
|
|
197
197
|
{/* @ts-expect-error child.props is not typed */}
|
package/src/mdx/async-api.tsx
CHANGED
|
@@ -254,7 +254,7 @@ export function AsyncAPI({
|
|
|
254
254
|
>
|
|
255
255
|
{prop.description}
|
|
256
256
|
{prop.default !== undefined && (
|
|
257
|
-
<span className="text-
|
|
257
|
+
<span className="text-muted-foreground ml-1">(default: {JSON.stringify(prop.default)})</span>
|
|
258
258
|
)}
|
|
259
259
|
</Property>
|
|
260
260
|
))}
|
package/src/mdx/code.tsx
CHANGED
|
@@ -92,11 +92,11 @@ function CopyButton({ code }: { code: string }) {
|
|
|
92
92
|
<span
|
|
93
93
|
aria-hidden={copied}
|
|
94
94
|
className={classNames(
|
|
95
|
-
'pointer-events-none flex items-center gap-0.5 text-
|
|
95
|
+
'pointer-events-none flex items-center gap-0.5 text-muted-foreground transition duration-300 text-sm',
|
|
96
96
|
copied && '-translate-y-1.5 opacity-0',
|
|
97
97
|
)}
|
|
98
98
|
>
|
|
99
|
-
<ClipboardIcon className="h-4 w-4 fill-zinc-500/20 stroke-
|
|
99
|
+
<ClipboardIcon className="h-4 w-4 fill-zinc-500/20 stroke-muted-foreground transition-colors group-hover/button:stroke-muted-foreground" />
|
|
100
100
|
</span>
|
|
101
101
|
<span
|
|
102
102
|
aria-hidden={!copied}
|
|
@@ -122,7 +122,7 @@ function CodePanelHeader({ tag, label }: { tag?: string; label?: string }) {
|
|
|
122
122
|
</div>
|
|
123
123
|
)}
|
|
124
124
|
{tag && label && <span className="h-0.5 w-0.5 rounded-full bg-zinc-500" />}
|
|
125
|
-
{label && <span className="font-mono text-xs text-
|
|
125
|
+
{label && <span className="font-mono text-xs text-muted-foreground">{label}</span>}
|
|
126
126
|
</div>
|
|
127
127
|
)
|
|
128
128
|
}
|
|
@@ -200,7 +200,7 @@ function CodeGroupHeader({
|
|
|
200
200
|
'pt-2 transition data-selected:not-data-focus:outline-hidden',
|
|
201
201
|
index === selectedIndex
|
|
202
202
|
? 'border-emerald-500 text-emerald-400'
|
|
203
|
-
: 'border-transparent text-
|
|
203
|
+
: 'border-transparent text-muted-foreground hover:text-zinc-300',
|
|
204
204
|
)}
|
|
205
205
|
>
|
|
206
206
|
{panelTitle}
|
package/src/mdx/expandable.tsx
CHANGED
|
@@ -14,18 +14,18 @@ export function Expandable({
|
|
|
14
14
|
<Accordion
|
|
15
15
|
type="single"
|
|
16
16
|
collapsible
|
|
17
|
-
className="my-6 rounded-xl border border-
|
|
17
|
+
className="my-6 rounded-xl border border-border"
|
|
18
18
|
>
|
|
19
19
|
<AccordionItem value="expandable">
|
|
20
|
-
<AccordionTrigger className="group flex w-full items-start justify-between text-left text-
|
|
20
|
+
<AccordionTrigger className="group flex w-full items-start justify-between text-left text-foreground dark:text-white p-6">
|
|
21
21
|
<div className="flex items-center gap-2">
|
|
22
22
|
{icon && <Icon icon={icon} className="h-8 w-8" />}
|
|
23
|
-
<span className="text-base font-display text-
|
|
23
|
+
<span className="text-base font-display text-foreground dark:text-white">{title}</span>
|
|
24
24
|
</div>
|
|
25
25
|
</AccordionTrigger>
|
|
26
26
|
<AccordionContent asChild>
|
|
27
27
|
<dd className="px-6 pb-6">
|
|
28
|
-
<div className="text-sm text-
|
|
28
|
+
<div className="text-sm text-foreground/80 leading-tight [&>p]:mb-0">
|
|
29
29
|
{children}
|
|
30
30
|
</div>
|
|
31
31
|
</dd>
|
package/src/mdx/mdx.tsx
CHANGED
|
@@ -65,6 +65,6 @@ export const wrapper = ({ children }: { children: preact.ComponentChildren }) =>
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
export const hr = () => <hr className="my-4 text-
|
|
68
|
+
export const hr = () => <hr className="my-4 text-muted-foreground/25 dark:text-gray-200/25" />;
|
|
69
69
|
|
|
70
70
|
export const br = () => <br />;
|
package/src/mdx/mermaid.tsx
CHANGED
|
@@ -137,7 +137,7 @@ export function MermaidRenderer({ content }: { content: string }) {
|
|
|
137
137
|
return (
|
|
138
138
|
<div className="mermaid-wrapper my-8">
|
|
139
139
|
{!isLoaded && (
|
|
140
|
-
<div className="flex items-center justify-center py-8 text-
|
|
140
|
+
<div className="flex items-center justify-center py-8 text-muted-foreground">
|
|
141
141
|
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"></div>
|
|
142
142
|
<span className="ml-2">Loading diagram...</span>
|
|
143
143
|
</div>
|
package/src/mdx/open-api.tsx
CHANGED
|
@@ -35,7 +35,7 @@ export function Property({
|
|
|
35
35
|
<div className="my-4 flex flex-wrap items-center gap-x-3 gap-2">
|
|
36
36
|
<div className="flex gap-2 items-center grow">
|
|
37
37
|
<Tag className="px-4 py-1">{name}</Tag>
|
|
38
|
-
<p className="font-mono text-xs text-
|
|
38
|
+
<p className="font-mono text-xs text-muted-foreground/80">
|
|
39
39
|
{type}
|
|
40
40
|
</p>
|
|
41
41
|
<div className="flex grow justify-end ">
|
|
@@ -63,7 +63,7 @@ export function ParamField({ body, type, default: defaultValue, required, childr
|
|
|
63
63
|
<Property name={body} type={type} required={required}>
|
|
64
64
|
{children}
|
|
65
65
|
{defaultValue != null && (
|
|
66
|
-
<span className="text-
|
|
66
|
+
<span className="text-muted-foreground ml-1">(default: {defaultValue})</span>
|
|
67
67
|
)}
|
|
68
68
|
</Property>
|
|
69
69
|
);
|
package/src/mdx/source.tsx
CHANGED
|
@@ -37,7 +37,7 @@ export const Source = ({ url, branch = "main", paths }: SourceProps) => {
|
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
39
|
<div>
|
|
40
|
-
<p className="text-sm text-
|
|
40
|
+
<p className="text-sm text-foreground dark:text-white">Sources:</p>
|
|
41
41
|
<ul className="list-none pl-0 flex flex-wrap gap-2 mt-2">
|
|
42
42
|
{paths.map(({ path, range }) => (
|
|
43
43
|
<li key={path + (range || '')}>
|
|
@@ -45,7 +45,7 @@ export const Source = ({ url, branch = "main", paths }: SourceProps) => {
|
|
|
45
45
|
href={createSourceUrl(path, range)}
|
|
46
46
|
target="_blank"
|
|
47
47
|
rel="noopener noreferrer"
|
|
48
|
-
className="rounded px-3 py-1 font-mono text-sm text-
|
|
48
|
+
className="rounded px-3 py-1 font-mono text-sm text-foreground/80 hover:opacity-80 transition-colors border border-border"
|
|
49
49
|
>
|
|
50
50
|
{path}
|
|
51
51
|
{range && <span className="ml-2 opacity-70">{range}</span>}
|
|
@@ -145,8 +145,8 @@ export const HeadersTab = ({ wsConfig, setWsConfig }: HeadersTabProps) => {
|
|
|
145
145
|
return (
|
|
146
146
|
<div className="flex flex-col gap-2 px-2 py-4">
|
|
147
147
|
<div className="flex items-center gap-2 px-2">
|
|
148
|
-
<span className="text-sm font-medium text-
|
|
149
|
-
<span className="text-sm font-medium text-
|
|
148
|
+
<span className="text-sm font-medium text-muted-foreground w-32">Key</span>
|
|
149
|
+
<span className="text-sm font-medium text-muted-foreground flex-1">Value</span>
|
|
150
150
|
</div>
|
|
151
151
|
{headersList.map((hdr, idx) => (
|
|
152
152
|
<div key={idx} className="flex items-center gap-2">
|
|
@@ -264,7 +264,7 @@ export const SubprotocolsTab = ({ subprotocols, setWsConfig }: SubprotocolsTabPr
|
|
|
264
264
|
return (
|
|
265
265
|
<div className="flex flex-col gap-2 px-2 py-4">
|
|
266
266
|
<div className="flex items-center gap-2">
|
|
267
|
-
<span className="text-sm font-medium text-
|
|
267
|
+
<span className="text-sm font-medium text-muted-foreground flex-1">Subprotocol</span>
|
|
268
268
|
</div>
|
|
269
269
|
{subprotocolsList.map((s, i) => (
|
|
270
270
|
<div key={i} className="flex items-center gap-2">
|
|
@@ -460,7 +460,7 @@ function WebSocketPlaygroundInternal({
|
|
|
460
460
|
case 'error':
|
|
461
461
|
return 'text-red-400'
|
|
462
462
|
default:
|
|
463
|
-
return 'text-
|
|
463
|
+
return 'text-muted-foreground'
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
|
|
@@ -498,7 +498,7 @@ function WebSocketPlaygroundInternal({
|
|
|
498
498
|
className={classNames(
|
|
499
499
|
'flex items-center gap-2',
|
|
500
500
|
connectionState === 'connecting' || connectionState === 'connected'
|
|
501
|
-
? 'bg-zinc-600 text-
|
|
501
|
+
? 'bg-zinc-600 text-muted-foreground cursor-not-allowed'
|
|
502
502
|
: 'bg-green-600 text-white hover:bg-green-700'
|
|
503
503
|
)}
|
|
504
504
|
>
|
|
@@ -515,7 +515,7 @@ function WebSocketPlaygroundInternal({
|
|
|
515
515
|
variant="destructive"
|
|
516
516
|
className={classNames(
|
|
517
517
|
'flex items-center gap-2',
|
|
518
|
-
connectionState === 'disconnected' && 'bg-zinc-600 text-
|
|
518
|
+
connectionState === 'disconnected' && 'bg-zinc-600 text-muted-foreground cursor-not-allowed'
|
|
519
519
|
)}
|
|
520
520
|
>
|
|
521
521
|
<DisconnectButton className="h-4 w-4" />
|
|
@@ -554,7 +554,7 @@ function WebSocketPlaygroundInternal({
|
|
|
554
554
|
'px-4 py-3 text-sm font-medium transition border-b-2',
|
|
555
555
|
selected
|
|
556
556
|
? 'border-brand-foreground text-brand-foreground'
|
|
557
|
-
: 'border-transparent text-
|
|
557
|
+
: 'border-transparent text-muted-foreground hover:text-zinc-300'
|
|
558
558
|
)
|
|
559
559
|
}
|
|
560
560
|
>
|
|
@@ -659,7 +659,7 @@ function WebSocketPlaygroundInternal({
|
|
|
659
659
|
onClick={clearMessages}
|
|
660
660
|
variant="ghost"
|
|
661
661
|
size="sm"
|
|
662
|
-
className="text-xs text-
|
|
662
|
+
className="text-xs text-muted-foreground hover:text-zinc-300"
|
|
663
663
|
>
|
|
664
664
|
Clear
|
|
665
665
|
</Button>
|
|
@@ -686,14 +686,14 @@ function WebSocketPlaygroundInternal({
|
|
|
686
686
|
msg.type === 'sent' && 'text-sky-400',
|
|
687
687
|
msg.type === 'received' && 'text-green-400',
|
|
688
688
|
msg.type === 'error' && 'text-red-400',
|
|
689
|
-
msg.type === 'system' && 'text-
|
|
689
|
+
msg.type === 'system' && 'text-muted-foreground'
|
|
690
690
|
)}>
|
|
691
691
|
{msg.type === 'sent' ? 'Sent' :
|
|
692
692
|
msg.type === 'received' ? 'Received' :
|
|
693
693
|
msg.type === 'error' ? 'Error' : 'System'}
|
|
694
694
|
{msg.binary && ' (Binary)'}
|
|
695
695
|
</span>
|
|
696
|
-
<span className="text-xs text-
|
|
696
|
+
<span className="text-xs text-muted-foreground">
|
|
697
697
|
{new Date(msg.timestamp).toLocaleTimeString()}
|
|
698
698
|
</span>
|
|
699
699
|
</div>
|
|
@@ -791,7 +791,7 @@ export function WebSocketPlayground(props: WebSocketPlaygroundProps) {
|
|
|
791
791
|
<div className="px-4 py-3">
|
|
792
792
|
<div className="flex flex-col gap-2">
|
|
793
793
|
<div className="flex items-center gap-2">
|
|
794
|
-
<span className="text-xs font-medium text-
|
|
794
|
+
<span className="text-xs font-medium text-muted-foreground">Endpoint:</span>
|
|
795
795
|
<Badge>
|
|
796
796
|
{props.servers?.[0]?.url || 'ws://localhost'}{props.url}
|
|
797
797
|
</Badge>
|
|
@@ -799,7 +799,7 @@ export function WebSocketPlayground(props: WebSocketPlaygroundProps) {
|
|
|
799
799
|
|
|
800
800
|
{props.subprotocols && props.subprotocols.length > 0 && (
|
|
801
801
|
<div className="flex items-center gap-2">
|
|
802
|
-
<span className="text-xs font-medium text-
|
|
802
|
+
<span className="text-xs font-medium text-muted-foreground">Subprotocols:</span>
|
|
803
803
|
<div className="flex gap-1">
|
|
804
804
|
{props.subprotocols.map((protocol, idx) => (
|
|
805
805
|
<Badge key={idx}>
|
|
@@ -812,7 +812,7 @@ export function WebSocketPlayground(props: WebSocketPlaygroundProps) {
|
|
|
812
812
|
|
|
813
813
|
{props.authType && props.authType !== 'none' && (
|
|
814
814
|
<div className="flex items-center gap-2">
|
|
815
|
-
<span className="text-xs font-medium text-
|
|
815
|
+
<span className="text-xs font-medium text-muted-foreground">Authentication:</span>
|
|
816
816
|
<Badge>
|
|
817
817
|
{props.authType}
|
|
818
818
|
</Badge>
|
package/src/theme.scss
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
-moz-osx-font-smoothing: grayscale;
|
|
5
5
|
|
|
6
6
|
// Brand colors (dynamically set from dory.json via loadColors())
|
|
7
|
-
--brand-foreground: #
|
|
8
|
-
--brand-primary: #
|
|
9
|
-
--brand-light: #
|
|
10
|
-
--brand-dark: #
|
|
7
|
+
--brand-foreground: #2C6BD4;
|
|
8
|
+
--brand-primary: #2C6BD4;
|
|
9
|
+
--brand-light: #2C6BD4;
|
|
10
|
+
--brand-dark: #4787F3;
|
|
11
11
|
|
|
12
12
|
// Font families
|
|
13
13
|
--font-body: inherit;
|
|
@@ -103,8 +103,8 @@ html, body, #app {
|
|
|
103
103
|
// Page title — large display serif
|
|
104
104
|
.dory-page-title {
|
|
105
105
|
font-family: var(--font-heading, var(--font-body, inherit));
|
|
106
|
-
font-weight:
|
|
107
|
-
font-variation-settings: "opsz"
|
|
106
|
+
font-weight: 700;
|
|
107
|
+
font-variation-settings: "opsz" 96;
|
|
108
108
|
letter-spacing: -0.02em;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -120,8 +120,8 @@ html, body, #app {
|
|
|
120
120
|
// Article headings — serif with proper optical sizing
|
|
121
121
|
article h2 {
|
|
122
122
|
font-family: var(--font-heading, var(--font-body, inherit));
|
|
123
|
-
font-weight:
|
|
124
|
-
font-variation-settings: "opsz" 48
|
|
123
|
+
font-weight: 600;
|
|
124
|
+
font-variation-settings: "opsz" 48;
|
|
125
125
|
letter-spacing: -0.015em;
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -138,7 +138,7 @@ export function TableOfContents() {
|
|
|
138
138
|
<>
|
|
139
139
|
<h2
|
|
140
140
|
id="on-this-page-title"
|
|
141
|
-
className="font-display text-sm font-medium text-
|
|
141
|
+
className="font-display text-sm font-medium text-foreground dark:text-white"
|
|
142
142
|
>
|
|
143
143
|
On this page
|
|
144
144
|
</h2>
|
|
@@ -150,13 +150,13 @@ export function TableOfContents() {
|
|
|
150
150
|
href={`#${section.id}`}
|
|
151
151
|
className={classNames({
|
|
152
152
|
"text-brand-foreground": isActive(section),
|
|
153
|
-
"font-normal text-
|
|
153
|
+
"font-normal text-muted-foreground hover:text-foreground/80 dark:hover:text-slate-300": !isActive(section),
|
|
154
154
|
})}>
|
|
155
155
|
{section.title}
|
|
156
156
|
</a>
|
|
157
157
|
</h3>
|
|
158
158
|
{section.children.length > 0 && (
|
|
159
|
-
<ol role="list" className="mt-2 space-y-3 pl-5 text-
|
|
159
|
+
<ol role="list" className="mt-2 space-y-3 pl-5 text-muted-foreground dark:text-muted-foreground">
|
|
160
160
|
{section.children.map((subSection) => (
|
|
161
161
|
<li key={subSection.id}>
|
|
162
162
|
<a
|
|
@@ -164,7 +164,7 @@ export function TableOfContents() {
|
|
|
164
164
|
className={
|
|
165
165
|
isActive(subSection)
|
|
166
166
|
? 'text-brand-foreground'
|
|
167
|
-
: 'hover:text-
|
|
167
|
+
: 'hover:text-muted-foreground dark:hover:text-slate-300'
|
|
168
168
|
}
|
|
169
169
|
>
|
|
170
170
|
{subSection.title}
|