@clidey/dory 0.27.0 → 0.30.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.
Files changed (95) hide show
  1. package/bin/dist/dory.js +115 -29
  2. package/bin/dist/dory.js.map +1 -1
  3. package/package.json +12 -4
  4. package/.dockerignore +0 -4
  5. package/CLAUDE.md +0 -178
  6. package/CODE_OF_CONDUCT.md +0 -128
  7. package/CONTRIBUTING.md +0 -91
  8. package/SECURITY.md +0 -11
  9. package/bin/dory.ts +0 -433
  10. package/dist/favicon.svg +0 -75
  11. package/dist/frontmatter.json +0 -77
  12. package/dist/index.html +0 -55
  13. package/dist/llms.txt +0 -561
  14. package/dist/logo/logo.svg +0 -18
  15. package/docs/api-playground-demo.mdx +0 -119
  16. package/docs/api-reference/asyncapi.json +0 -324
  17. package/docs/api-reference/openapi.json +0 -366
  18. package/docs/api-reference/operations/create.mdx +0 -5
  19. package/docs/api-reference/operations/delete.mdx +0 -5
  20. package/docs/api-reference/operations/get.mdx +0 -5
  21. package/docs/api-reference/operations/update.mdx +0 -5
  22. package/docs/api-reference/websocket-operations/receive-chat-message.mdx +0 -5
  23. package/docs/api-reference/websocket-operations/receive-notifications.mdx +0 -5
  24. package/docs/api-reference/websocket-operations/receive-presence-update.mdx +0 -5
  25. package/docs/api-reference/websocket-operations/send-chat-message.mdx +0 -5
  26. package/docs/api-reference/websocket-operations/send-presence-update.mdx +0 -5
  27. package/docs/dory.json +0 -64
  28. package/docs/favicon.svg +0 -75
  29. package/docs/features.mdx +0 -440
  30. package/docs/introduction.mdx +0 -44
  31. package/docs/logo/logo.svg +0 -18
  32. package/docs/websocket-playground-demo.mdx +0 -135
  33. package/index.html +0 -54
  34. package/scripts/generate-frontmatter-json.js +0 -154
  35. package/scripts/generate-llm-txt.js +0 -115
  36. package/src/app.css +0 -5
  37. package/src/app.tsx +0 -13
  38. package/src/components/dropdown.tsx +0 -53
  39. package/src/components/hooks.tsx +0 -28
  40. package/src/components/loading.tsx +0 -21
  41. package/src/components/mdx-provider.tsx +0 -13
  42. package/src/components/navigation.tsx +0 -58
  43. package/src/components/notification.tsx +0 -13
  44. package/src/components/routes.tsx +0 -92
  45. package/src/components/search-index.ts +0 -43
  46. package/src/components/search.tsx +0 -435
  47. package/src/components/store.ts +0 -216
  48. package/src/config/mdx.js +0 -12
  49. package/src/config/mdx.ts +0 -12
  50. package/src/main.tsx +0 -22
  51. package/src/mdx/accordion.tsx +0 -41
  52. package/src/mdx/api-playground.tsx +0 -659
  53. package/src/mdx/api.tsx +0 -354
  54. package/src/mdx/async-api.tsx +0 -353
  55. package/src/mdx/callout.tsx +0 -64
  56. package/src/mdx/card.tsx +0 -54
  57. package/src/mdx/code.tsx +0 -289
  58. package/src/mdx/expandable.tsx +0 -36
  59. package/src/mdx/fence.tsx +0 -74
  60. package/src/mdx/icon.tsx +0 -73
  61. package/src/mdx/latex.tsx +0 -26
  62. package/src/mdx/list.tsx +0 -7
  63. package/src/mdx/mdx.tsx +0 -47
  64. package/src/mdx/mermaid.tsx +0 -147
  65. package/src/mdx/open-api.tsx +0 -311
  66. package/src/mdx/processor.ts +0 -174
  67. package/src/mdx/source.tsx +0 -58
  68. package/src/mdx/step.tsx +0 -51
  69. package/src/mdx/table.tsx +0 -20
  70. package/src/mdx/tag.tsx +0 -53
  71. package/src/mdx/text.tsx +0 -99
  72. package/src/mdx/websocket-playground.tsx +0 -824
  73. package/src/plugins/docs-assets.ts +0 -79
  74. package/src/plugins/frontmatter-dev-server.ts +0 -158
  75. package/src/plugins/frontmatter-generator.ts +0 -157
  76. package/src/plugins/llm-txt-dev-server.ts +0 -183
  77. package/src/plugins/llm-txt-generator.ts +0 -186
  78. package/src/plugins/sanitize.ts +0 -163
  79. package/src/plugins/unified-mdx-plugin.ts +0 -35
  80. package/src/theme.scss +0 -72
  81. package/src/types/config.ts +0 -47
  82. package/src/ui/header.tsx +0 -91
  83. package/src/ui/layout.tsx +0 -193
  84. package/src/ui/mobile-navigation.tsx +0 -64
  85. package/src/ui/prev-next-link.tsx +0 -74
  86. package/src/ui/table-of-content.tsx +0 -166
  87. package/src/utils/colors.ts +0 -54
  88. package/src/utils/fonts.ts +0 -23
  89. package/src/utils/functions.ts +0 -12
  90. package/src/vite-env.d.ts +0 -1
  91. package/tsconfig.app.json +0 -33
  92. package/tsconfig.bin.json +0 -24
  93. package/tsconfig.json +0 -7
  94. package/tsconfig.node.json +0 -26
  95. package/vite.config.ts +0 -41
package/src/mdx/step.tsx DELETED
@@ -1,51 +0,0 @@
1
- import classNames from "classnames"
2
- import { Children } from "preact/compat"
3
-
4
- export function Steps({ children }: { children: preact.ComponentChildren }) {
5
- const steps = Children.toArray(children) as preact.ComponentChildren[];
6
- return (
7
- <nav aria-label="Progress" className="py-16">
8
- <div className="overflow-hidden">
9
- {steps.map((step, stepIdx) => {
10
- const stepElement = Children.toArray(step)[0] as preact.JSX.Element;
11
- return (
12
- <div key={stepIdx} className={classNames(
13
- {
14
- "pb-10": stepIdx !== steps.length - 1,
15
- "pb-2": stepIdx === steps.length - 1,
16
- },
17
- 'relative'
18
- )}>
19
- <div aria-hidden="true" className="absolute top-10 left-4 h-full w-[0.5px] bg-gray-300/50 dark:bg-gray-600/50" style={{ top: '40px', height: 'calc(100% - 44px)' }} />
20
- <div className="group relative flex items-start">
21
- <span className="flex h-9 items-center">
22
- <span className="relative z-10 flex size-8 items-center justify-center rounded-full bg-white dark:bg-gray-800 group-hover:border-gray-400">
23
- <span className="text-sm font-medium text-gray-500 dark:text-white">
24
- {stepIdx + 1}
25
- </span>
26
- </span>
27
- </span>
28
- <span className="ml-4 flex min-w-0 flex-col">
29
- <p className="text-lg font-medium text-inherit">{stepElement.props.title}</p>
30
- </span>
31
- </div>
32
- <div className="ml-12 not-prose">
33
- {stepElement.props.children}
34
- </div>
35
- </div>
36
- )
37
- })}
38
- </div>
39
- </nav>
40
- )
41
- }
42
-
43
- export function Step({
44
- title: _title,
45
- children
46
- }: {
47
- title?: string;
48
- children: preact.ComponentChildren
49
- }) {
50
- return <p className='text-sm'>{children}</p>
51
- }
package/src/mdx/table.tsx DELETED
@@ -1,20 +0,0 @@
1
- import type { JSX } from 'preact/jsx-runtime';
2
- import {
3
- Table as UXTable,
4
- TableHead,
5
- TableCell
6
- } from '@clidey/ux'
7
-
8
- export const Table = (props: JSX.IntrinsicElements['table']) => (
9
- <div className="overflow-x-auto rounded-lg my-8">
10
- <UXTable {...props} />
11
- </div>
12
- );
13
-
14
- export const Th = (props: JSX.IntrinsicElements['th']) => (
15
- <TableHead {...props} />
16
- );
17
-
18
- export const Td = (props: JSX.IntrinsicElements['td']) => (
19
- <TableCell {...props} />
20
- );
package/src/mdx/tag.tsx DELETED
@@ -1,53 +0,0 @@
1
- import { Badge } from '@clidey/ux'
2
- import classNames from 'classnames'
3
-
4
- const valueColorMap = {
5
- GET: 'default',
6
- POST: 'secondary',
7
- PUT: 'outline',
8
- DELETE: 'destructive',
9
- } as const
10
-
11
- const customColorClasses = {
12
- emerald: 'bg-emerald-400/10 text-emerald-500 dark:text-emerald-400 border-emerald-300 dark:border-emerald-400/30',
13
- sky: 'bg-sky-400/10 text-sky-500 dark:text-sky-400 border-sky-300 dark:border-sky-400/30',
14
- amber: 'bg-amber-400/10 text-amber-500 dark:text-amber-400 border-amber-300 dark:border-amber-400/30',
15
- rose: 'bg-rose-50 text-red-500 dark:bg-rose-400/10 dark:text-rose-400 border-rose-200 dark:border-rose-500/20',
16
- zinc: 'bg-zinc-50 text-zinc-500 dark:bg-zinc-400/10 dark:text-zinc-400 border-zinc-200 dark:border-zinc-500/20',
17
- }
18
-
19
- const methodColors: Record<string, keyof typeof customColorClasses> = {
20
- GET: 'emerald',
21
- POST: 'sky',
22
- PUT: 'amber',
23
- DELETE: 'rose',
24
- }
25
-
26
- export function Tag({
27
- children,
28
- variant = 'medium',
29
- color,
30
- className,
31
- }: {
32
- children: string
33
- variant?: 'small' | 'medium'
34
- color?: keyof typeof customColorClasses
35
- className?: string
36
- }) {
37
- const colorKey = color || methodColors[children] || 'zinc'
38
- const badgeVariant = valueColorMap[children as keyof typeof valueColorMap] || 'outline'
39
-
40
- return (
41
- <Badge
42
- variant={badgeVariant}
43
- className={classNames(
44
- 'font-mono text-[0.625rem]/6 font-semibold',
45
- customColorClasses[colorKey],
46
- variant === 'small' && 'px-1 py-0',
47
- className,
48
- )}
49
- >
50
- {children}
51
- </Badge>
52
- )
53
- }
package/src/mdx/text.tsx DELETED
@@ -1,99 +0,0 @@
1
- import { cn } from "@clidey/ux"
2
- import classNames from "classnames"
3
- import { useState } from "preact/hooks"
4
-
5
-
6
- export const h1 = function H1(props: preact.JSX.HTMLAttributes<HTMLHeadingElement>) {
7
- return <h1 className="text-4xl font-bold mb-4 mt-12" {...props} />
8
- }
9
-
10
- export const h2 = function H2(props: preact.JSX.HTMLAttributes<HTMLHeadingElement>) {
11
- return <h2 className="text-3xl font-bold mb-3 mt-10" {...props} />
12
- }
13
-
14
- export const h3 = function H3(props: preact.JSX.HTMLAttributes<HTMLHeadingElement>) {
15
- return <h3 className="text-2xl font-bold mb-2 mt-8" {...props} />
16
- }
17
-
18
- export const h4 = function H4(props: preact.JSX.HTMLAttributes<HTMLHeadingElement>) {
19
- return <h4 className="text-xl font-bold mb-2 mt-6" {...props} />
20
- }
21
-
22
- export const h5 = function H5(props: preact.JSX.HTMLAttributes<HTMLHeadingElement>) {
23
- return <h5 className="text-lg font-bold mb-2" {...props} />
24
- }
25
-
26
- export const h6 = function H6(props: preact.JSX.HTMLAttributes<HTMLHeadingElement>) {
27
- return <h6 className="text-base font-bold mb-2" {...props} />
28
- }
29
-
30
- export const p = function P(props: preact.JSX.HTMLAttributes<HTMLParagraphElement>) {
31
- return <p className="mb-2 inline-block" {...props} />
32
- }
33
-
34
- export function Row({ children, cols = 1, className }: { children: preact.ComponentChildren, cols?: number, className?: string }) {
35
- return (
36
- <div className={cn(`py-6 grid grid-cols-1 items-start gap-x-16 gap-y-10 xl:max-w-none`, className)} style={{ gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` }}>
37
- {children}
38
- </div>
39
- )
40
- }
41
-
42
- export function Col({
43
- children,
44
- sticky = false,
45
- rows = 1,
46
- gap = 4
47
- }: {
48
- children: preact.ComponentChildren
49
- sticky?: boolean
50
- rows?: number
51
- gap?: number
52
- }) {
53
- return (
54
- <div
55
- className={classNames("[&>:first-child]:mt-0 [&>:last-child]:mb-0", {
56
- 'xl:sticky xl:top-24': sticky,
57
- })}
58
- style={{
59
- display: 'grid',
60
- gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`,
61
- gap: `${gap * 0.25}rem`
62
- }}
63
- >
64
- {children}
65
- </div>
66
- )
67
- }
68
-
69
-
70
- export function Anchor({ children, href }: { children: preact.ComponentChildren, href: string }) {
71
- return <a href={href} className="text-blue-500 hover:text-blue-600">{children}</a>
72
- }
73
-
74
- export function Image({ src, alt }: { src: string, alt: string }) {
75
- const [isExpanded, setIsExpanded] = useState(false);
76
-
77
- return (
78
- <>
79
- <img
80
- src={src}
81
- alt={alt}
82
- className="w-full h-auto cursor-pointer"
83
- onClick={() => setIsExpanded(true)}
84
- />
85
- {isExpanded && (
86
- <div
87
- className="fixed inset-0 bg-black bg-opacity-90 z-50 flex items-center justify-center"
88
- onClick={() => setIsExpanded(false)}
89
- >
90
- <img
91
- src={src}
92
- alt={alt}
93
- className="max-h-[90vh] max-w-[90vw] object-contain"
94
- />
95
- </div>
96
- )}
97
- </>
98
- );
99
- }