@clidey/dory 0.21.4 → 0.23.0
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/bin/dory.ts +18 -4
- package/dist/api-playground-demo.mdx +119 -0
- package/dist/api-reference/asyncapi.json +324 -0
- package/dist/api-reference/openapi.json +366 -0
- package/dist/api-reference/operations/create.mdx +5 -0
- package/dist/api-reference/operations/delete.mdx +5 -0
- package/dist/api-reference/operations/get.mdx +5 -0
- package/dist/api-reference/operations/update.mdx +5 -0
- package/dist/api-reference/websocket-operations/receive-chat-message.mdx +5 -0
- package/dist/api-reference/websocket-operations/receive-notifications.mdx +5 -0
- package/dist/api-reference/websocket-operations/receive-presence-update.mdx +5 -0
- package/dist/api-reference/websocket-operations/send-chat-message.mdx +5 -0
- package/dist/api-reference/websocket-operations/send-presence-update.mdx +5 -0
- package/dist/dory.json +64 -0
- package/dist/favicon.svg +75 -0
- package/dist/features.mdx +440 -0
- package/dist/frontmatter.json +77 -0
- package/dist/index.html +55 -0
- package/dist/introduction.mdx +44 -0
- package/dist/llms.txt +561 -0
- package/dist/websocket-playground-demo.mdx +135 -0
- package/docs/dory.json +5 -0
- package/docs/favicon.svg +1 -1
- package/docs/introduction.mdx +2 -2
- package/package.json +13 -10
- package/src/app.css +2 -0
- package/src/components/dropdown.tsx +30 -26
- package/src/components/loading.tsx +6 -8
- package/src/components/navigation.tsx +8 -6
- package/src/components/notification.tsx +9 -93
- package/src/components/routes.tsx +1 -1
- package/src/components/search.tsx +31 -104
- package/src/components/store.ts +4 -1
- package/src/main.tsx +9 -5
- package/src/mdx/accordion.tsx +21 -28
- package/src/mdx/api-playground.tsx +68 -83
- package/src/mdx/api.tsx +21 -21
- package/src/mdx/async-api.tsx +15 -31
- package/src/mdx/callout.tsx +27 -43
- package/src/mdx/card.tsx +20 -14
- package/src/mdx/code.tsx +26 -26
- package/src/mdx/expandable.tsx +21 -25
- package/src/mdx/fence.tsx +2 -2
- package/src/mdx/list.tsx +2 -2
- package/src/mdx/open-api.tsx +31 -45
- package/src/mdx/table.tsx +8 -3
- package/src/mdx/tag.tsx +27 -40
- package/src/mdx/text.tsx +3 -2
- package/src/mdx/websocket-playground.tsx +150 -81
- package/src/theme.scss +50 -106
- package/src/types/config.ts +47 -0
- package/src/ui/header.tsx +12 -9
- package/src/ui/layout.tsx +5 -4
- package/src/ui/mobile-navigation.tsx +36 -63
- package/src/ui/table-of-content.tsx +3 -3
- package/src/utils/colors.ts +54 -0
- package/src/utils/fonts.ts +4 -1
- package/vite.config.ts +2 -0
- package/.claude/settings.json +0 -29
- package/.claude/settings.local.json +0 -12
- package/.github/ISSUE_TEMPLATE/anything-else.md +0 -10
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -39
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/claude.yml +0 -37
- package/docs/assets/dory.jpeg +0 -0
- package/k8s/Dockerfile +0 -14
- package/k8s/config/nginx-default.conf +0 -22
- package/k8s/dev.Dockerfile +0 -16
- package/k8s/docs.Dockerfile +0 -15
- package/public/demo.mov +0 -0
- package/src/components/dark-mode-toggle.tsx +0 -25
- package/src/index.css +0 -24
- package/src/utils/hooks.ts +0 -46
- /package/{assets → dist/logo}/logo.svg +0 -0
package/src/utils/hooks.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'preact/hooks';
|
|
2
|
-
|
|
3
|
-
export function useDarkMode() {
|
|
4
|
-
// Check localStorage and system preference on initial load
|
|
5
|
-
const [isDark, setIsDark] = useState(() => {
|
|
6
|
-
if (typeof window === 'undefined') return false;
|
|
7
|
-
|
|
8
|
-
const stored = localStorage.getItem('darkMode');
|
|
9
|
-
if (stored !== null) {
|
|
10
|
-
return JSON.parse(stored);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// Update the HTML class and localStorage when isDark changes
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
const body = document.querySelector('body');
|
|
19
|
-
if (!body) return;
|
|
20
|
-
if (isDark) {
|
|
21
|
-
body.classList.add('dark');
|
|
22
|
-
} else {
|
|
23
|
-
body.classList.remove('dark');
|
|
24
|
-
}
|
|
25
|
-
localStorage.setItem('darkMode', JSON.stringify(isDark));
|
|
26
|
-
}, [isDark]);
|
|
27
|
-
|
|
28
|
-
// Listen for system theme changes
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
31
|
-
const handleChange = (e: MediaQueryListEvent) => {
|
|
32
|
-
// Only update if user hasn't manually set a preference
|
|
33
|
-
const stored = localStorage.getItem('darkMode');
|
|
34
|
-
if (stored === null) {
|
|
35
|
-
setIsDark(e.matches);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
mediaQuery.addEventListener('change', handleChange);
|
|
40
|
-
return () => mediaQuery.removeEventListener('change', handleChange);
|
|
41
|
-
}, []);
|
|
42
|
-
|
|
43
|
-
const toggleDarkMode = () => setIsDark(!isDark);
|
|
44
|
-
|
|
45
|
-
return { isDark, toggleDarkMode };
|
|
46
|
-
}
|
|
File without changes
|