@yaakdoc/react 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +232 -2
- package/dist/client.d.ts +9 -0
- package/dist/client.js +26 -0
- package/dist/color-mode-B-vJCVkP.js +77 -0
- package/dist/index-CoQ7pnuB.d.ts +471 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +551 -0
- package/dist/island-BWyuL4_6.d.ts +29 -0
- package/dist/islands.d.ts +170 -0
- package/dist/islands.js +152 -0
- package/dist/llm-Ddn5hWnS.js +205 -0
- package/dist/run-in-yaak-CMMcDS7S.js +164 -0
- package/dist/server.d.ts +26 -0
- package/dist/server.js +139 -0
- package/dist/site-DyK7ZcqQ.js +371 -0
- package/dist/theme.d.ts +45 -0
- package/dist/theme.js +7 -0
- package/dist/types-BY2lOvlK.d.ts +101 -0
- package/package.json +85 -3
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
import { t as IslandComponent } from "./island-BWyuL4_6.js";
|
|
2
|
+
import { g as ThemeComponents, l as PageData, p as SiteData } from "./types-BY2lOvlK.js";
|
|
3
|
+
import { Auth, Header, KeyValue, PreparedDocument, PreparedFolder, PreparedRequest, TreeNode, methodLabel as methodLabel$1 } from "@yaakdoc/core";
|
|
4
|
+
import { ComponentPropsWithoutRef, ComponentType, ReactNode } from "react";
|
|
5
|
+
//#region src/context.d.ts
|
|
6
|
+
type YaakdocContextValue = {
|
|
7
|
+
document: PreparedDocument;
|
|
8
|
+
site: SiteData;
|
|
9
|
+
page: PageData;
|
|
10
|
+
};
|
|
11
|
+
declare function YaakdocProvider({ document, site, page, children }: YaakdocContextValue & {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
/** The prepared documentation (requests, folders, tree, environment...). */
|
|
15
|
+
declare const useDocument: () => PreparedDocument;
|
|
16
|
+
/** Site configuration and branding. */
|
|
17
|
+
declare const useSite: () => SiteData;
|
|
18
|
+
/** The page currently being rendered. */
|
|
19
|
+
declare const usePage: () => PageData;
|
|
20
|
+
/** Theme-specific options from `themeOptions` in the config. */
|
|
21
|
+
declare const useThemeOptions: <T extends Record<string, unknown>>() => T;
|
|
22
|
+
declare function useRequest(id: string): PreparedRequest;
|
|
23
|
+
declare function useFolder(id: string): PreparedFolder;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/hooks.d.ts
|
|
26
|
+
/**
|
|
27
|
+
* Data for "Copy page/section" actions, or `null` when they are disabled (or there is no Markdown
|
|
28
|
+
* twin). `absoluteUrl` is `null` when the public site URL isn't configured.
|
|
29
|
+
*/
|
|
30
|
+
declare function usePageActions(markdownUrl: string | null): {
|
|
31
|
+
markdownUrl: string;
|
|
32
|
+
absoluteUrl: string | null;
|
|
33
|
+
openIn: ("chatgpt" | "claude" | "perplexity")[];
|
|
34
|
+
} | null;
|
|
35
|
+
/** Name and export URL for the "Run in Yaak" button, or `null` when it is disabled. */
|
|
36
|
+
declare function useRunInYaak(): {
|
|
37
|
+
name: string;
|
|
38
|
+
dataUrl: string;
|
|
39
|
+
} | null;
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/islands/tabs.d.ts
|
|
42
|
+
declare const TAB_STORAGE_KEY = "yaakdoc-tab";
|
|
43
|
+
/** Tab group names of a request's code examples and example responses. */
|
|
44
|
+
declare const tabGroupIds: {
|
|
45
|
+
examples: (anchor: string) => string;
|
|
46
|
+
responses: (anchor: string) => string;
|
|
47
|
+
};
|
|
48
|
+
/** Ids linking a tab to its panel. `variant` tells apart copies of a panel (one per environment). */
|
|
49
|
+
declare function tabElementIds(group: string, id: string, variant?: number): {
|
|
50
|
+
tab: string;
|
|
51
|
+
panel: string;
|
|
52
|
+
};
|
|
53
|
+
/** Props for a server-rendered panel controlled by {@link TabList}. */
|
|
54
|
+
declare function tabPanelProps(group: string, id: string, options: {
|
|
55
|
+
selected: boolean;
|
|
56
|
+
variant?: number;
|
|
57
|
+
}): {
|
|
58
|
+
readonly role: "tabpanel";
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly "aria-labelledby": string;
|
|
61
|
+
readonly "data-yd-tab-panel": string;
|
|
62
|
+
readonly hidden: boolean;
|
|
63
|
+
};
|
|
64
|
+
/** Selector of an element (default: the code) inside the visible panel of a tab group. */
|
|
65
|
+
declare const visibleTabPanelSelector: (group: string, inner?: string) => string;
|
|
66
|
+
/**
|
|
67
|
+
* Headless tab state for a panel group rendered on the server. Panels are elements with
|
|
68
|
+
* `data-yd-tab-panel="<id>"` inside `[data-yd-tab-group="<group>"]`. The selection is synced across
|
|
69
|
+
* all groups on the page (pick "Python" once, see Python everywhere) and remembered.
|
|
70
|
+
*/
|
|
71
|
+
declare function useTabs(group: string, ids: readonly string[], sync?: boolean): {
|
|
72
|
+
selected: string;
|
|
73
|
+
select: (id: string, broadcast?: boolean) => void;
|
|
74
|
+
};
|
|
75
|
+
type TabListProps = {
|
|
76
|
+
group: string;
|
|
77
|
+
tabs: Array<{
|
|
78
|
+
id: string;
|
|
79
|
+
label: string;
|
|
80
|
+
className?: string;
|
|
81
|
+
}>;
|
|
82
|
+
sync?: boolean;
|
|
83
|
+
className?: string;
|
|
84
|
+
tabClassName?: string;
|
|
85
|
+
label?: string;
|
|
86
|
+
};
|
|
87
|
+
/** Accessible tab list controlling server-rendered panels (see {@link useTabs}). */
|
|
88
|
+
declare const TabList: IslandComponent<TabListProps>;
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/overrides.d.ts
|
|
91
|
+
/**
|
|
92
|
+
* Provides component overrides. Every base component created with {@link overridable} renders the
|
|
93
|
+
* override registered under its name instead, so themes can swap any piece (MDX-style) – including
|
|
94
|
+
* pieces rendered internally by other base components.
|
|
95
|
+
*/
|
|
96
|
+
declare function ComponentsProvider({ components, children }: {
|
|
97
|
+
components: ThemeComponents | undefined;
|
|
98
|
+
children: ReactNode;
|
|
99
|
+
}): import("react").JSX.Element;
|
|
100
|
+
declare const useComponents: () => ThemeComponents;
|
|
101
|
+
/**
|
|
102
|
+
* Wraps a default component so it can be replaced through {@link ComponentsProvider}.
|
|
103
|
+
* The override receives the same props plus `Default`, the original implementation, so it can
|
|
104
|
+
* decorate rather than replace.
|
|
105
|
+
*/
|
|
106
|
+
declare function overridable<P extends object>(name: string, Default: ComponentType<P>): ComponentType<P> & {
|
|
107
|
+
displayName: string;
|
|
108
|
+
Default: ComponentType<P>;
|
|
109
|
+
};
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/primitives/basic.d.ts
|
|
112
|
+
/** Renders trusted, pre-sanitized HTML (descriptions are sanitized at build time). */
|
|
113
|
+
declare const Html: import("react").ComponentType<{
|
|
114
|
+
html: string;
|
|
115
|
+
as?: "div" | "span" | "section";
|
|
116
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children">> & {
|
|
117
|
+
displayName: string;
|
|
118
|
+
Default: import("react").ComponentType<{
|
|
119
|
+
html: string;
|
|
120
|
+
as?: "div" | "span" | "section";
|
|
121
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children">>;
|
|
122
|
+
};
|
|
123
|
+
/** Rendered Markdown (a description). */
|
|
124
|
+
declare const Markdown: import("react").ComponentType<{
|
|
125
|
+
html: string;
|
|
126
|
+
className?: string;
|
|
127
|
+
}> & {
|
|
128
|
+
displayName: string;
|
|
129
|
+
Default: import("react").ComponentType<{
|
|
130
|
+
html: string;
|
|
131
|
+
className?: string;
|
|
132
|
+
}>;
|
|
133
|
+
};
|
|
134
|
+
/** HTTP method (or gRPC / WS) badge. Style via `[data-method="get"]` etc. */
|
|
135
|
+
declare const MethodBadge: import("react").ComponentType<{
|
|
136
|
+
request: PreparedRequest;
|
|
137
|
+
className?: string;
|
|
138
|
+
}> & {
|
|
139
|
+
displayName: string;
|
|
140
|
+
Default: import("react").ComponentType<{
|
|
141
|
+
request: PreparedRequest;
|
|
142
|
+
className?: string;
|
|
143
|
+
}>;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Request URL with `{{variables}}` and `:path` parameters wrapped in spans
|
|
147
|
+
* (`[data-yd="url-variable"]`, `[data-yd="url-param"]`) for styling.
|
|
148
|
+
*/
|
|
149
|
+
declare const RequestUrl: import("react").ComponentType<{
|
|
150
|
+
url: string;
|
|
151
|
+
className?: string;
|
|
152
|
+
}> & {
|
|
153
|
+
displayName: string;
|
|
154
|
+
Default: import("react").ComponentType<{
|
|
155
|
+
url: string;
|
|
156
|
+
className?: string;
|
|
157
|
+
}>;
|
|
158
|
+
};
|
|
159
|
+
type KeyValueTableProps = {
|
|
160
|
+
items: Array<KeyValue | Header>;
|
|
161
|
+
caption?: ReactNode;
|
|
162
|
+
columns?: [string, string];
|
|
163
|
+
className?: string;
|
|
164
|
+
/** Show an "inherited from ..." note for headers inherited from folders/workspace. */
|
|
165
|
+
showInherited?: boolean;
|
|
166
|
+
};
|
|
167
|
+
/** Generic two-column table for headers and parameters. */
|
|
168
|
+
declare const KeyValueTable: import("react").ComponentType<KeyValueTableProps> & {
|
|
169
|
+
displayName: string;
|
|
170
|
+
Default: import("react").ComponentType<KeyValueTableProps>;
|
|
171
|
+
};
|
|
172
|
+
/** Describes the effective authentication of a request/folder. */
|
|
173
|
+
declare const AuthInfo: import("react").ComponentType<{
|
|
174
|
+
auth: Auth | null;
|
|
175
|
+
className?: string;
|
|
176
|
+
}> & {
|
|
177
|
+
displayName: string;
|
|
178
|
+
Default: import("react").ComponentType<{
|
|
179
|
+
auth: Auth | null;
|
|
180
|
+
className?: string;
|
|
181
|
+
}>;
|
|
182
|
+
};
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/primitives/code.d.ts
|
|
185
|
+
type CodeBlockProps = {
|
|
186
|
+
/** Pre-highlighted HTML (a Shiki `<pre>`). */
|
|
187
|
+
html: string;
|
|
188
|
+
/** Unique id; used by the copy button to find the code. */
|
|
189
|
+
id: string;
|
|
190
|
+
language?: string;
|
|
191
|
+
title?: string;
|
|
192
|
+
copy?: boolean;
|
|
193
|
+
className?: string;
|
|
194
|
+
};
|
|
195
|
+
declare const CodeBlock: import("react").ComponentType<CodeBlockProps> & {
|
|
196
|
+
displayName: string;
|
|
197
|
+
Default: import("react").ComponentType<CodeBlockProps>;
|
|
198
|
+
};
|
|
199
|
+
type CodeExamplesProps = {
|
|
200
|
+
request: PreparedRequest;
|
|
201
|
+
className?: string;
|
|
202
|
+
title?: string;
|
|
203
|
+
};
|
|
204
|
+
/** Tabbed code examples. Panels are static HTML; only the tab list hydrates. */
|
|
205
|
+
declare const CodeExamples: import("react").ComponentType<CodeExamplesProps> & {
|
|
206
|
+
displayName: string;
|
|
207
|
+
Default: import("react").ComponentType<CodeExamplesProps>;
|
|
208
|
+
};
|
|
209
|
+
type ResponseExamplesProps = {
|
|
210
|
+
request: PreparedRequest;
|
|
211
|
+
className?: string;
|
|
212
|
+
title?: string;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Example responses (from ```response / ```response:<status> blocks in the description), tabbed by
|
|
216
|
+
* status. Tabs carry `data-status-class` (`2xx`, `4xx`, ...) for styling.
|
|
217
|
+
*/
|
|
218
|
+
declare const ResponseExamples: import("react").ComponentType<ResponseExamplesProps> & {
|
|
219
|
+
displayName: string;
|
|
220
|
+
Default: import("react").ComponentType<ResponseExamplesProps>;
|
|
221
|
+
};
|
|
222
|
+
/** `2xx`, `4xx`, ... or `undefined` for responses without a status. */
|
|
223
|
+
declare const statusClass: (status: number | null) => string | undefined;
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/primitives/content.d.ts
|
|
226
|
+
type FolderDocProps = {
|
|
227
|
+
id: string;
|
|
228
|
+
level?: number;
|
|
229
|
+
/** Also render the folder's contents (requests and sub folders). */
|
|
230
|
+
nested?: boolean;
|
|
231
|
+
className?: string;
|
|
232
|
+
};
|
|
233
|
+
/** A folder section: title, description, inherited auth, then (optionally) its contents. */
|
|
234
|
+
declare const FolderDoc: import("react").ComponentType<FolderDocProps> & {
|
|
235
|
+
displayName: string;
|
|
236
|
+
Default: import("react").ComponentType<FolderDocProps>;
|
|
237
|
+
};
|
|
238
|
+
/** Renders a list of tree nodes as documentation sections, recursively. */
|
|
239
|
+
declare const TreeContent: import("react").ComponentType<{
|
|
240
|
+
nodes: TreeNode[];
|
|
241
|
+
level?: number;
|
|
242
|
+
}> & {
|
|
243
|
+
displayName: string;
|
|
244
|
+
Default: import("react").ComponentType<{
|
|
245
|
+
nodes: TreeNode[];
|
|
246
|
+
level?: number;
|
|
247
|
+
}>;
|
|
248
|
+
};
|
|
249
|
+
/** Overview of the workspace: description, authentication and variables. */
|
|
250
|
+
declare const Overview: import("react").ComponentType<{
|
|
251
|
+
className?: string;
|
|
252
|
+
level?: number;
|
|
253
|
+
}> & {
|
|
254
|
+
displayName: string;
|
|
255
|
+
Default: import("react").ComponentType<{
|
|
256
|
+
className?: string;
|
|
257
|
+
level?: number;
|
|
258
|
+
}>;
|
|
259
|
+
};
|
|
260
|
+
/** Environment variables table (secrets redacted). */
|
|
261
|
+
declare const Variables: import("react").ComponentType<{
|
|
262
|
+
level?: number;
|
|
263
|
+
className?: string;
|
|
264
|
+
}> & {
|
|
265
|
+
displayName: string;
|
|
266
|
+
Default: import("react").ComponentType<{
|
|
267
|
+
level?: number;
|
|
268
|
+
className?: string;
|
|
269
|
+
}>;
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* The main content for the current page: everything (single-page mode), a folder, a request, or a
|
|
273
|
+
* not-found message. Themes can use this or compose the pieces themselves.
|
|
274
|
+
*/
|
|
275
|
+
declare const Content: import("react").ComponentType<{
|
|
276
|
+
className?: string;
|
|
277
|
+
}> & {
|
|
278
|
+
displayName: string;
|
|
279
|
+
Default: import("react").ComponentType<{
|
|
280
|
+
className?: string;
|
|
281
|
+
}>;
|
|
282
|
+
};
|
|
283
|
+
/** Content of the 404 page. */
|
|
284
|
+
declare const NotFound: import("react").ComponentType<{
|
|
285
|
+
className?: string;
|
|
286
|
+
}> & {
|
|
287
|
+
displayName: string;
|
|
288
|
+
Default: import("react").ComponentType<{
|
|
289
|
+
className?: string;
|
|
290
|
+
}>;
|
|
291
|
+
};
|
|
292
|
+
/** List of links to child folders/requests (per-request pages mode). */
|
|
293
|
+
declare const ChildLinks: import("react").ComponentType<{
|
|
294
|
+
nodes: TreeNode[];
|
|
295
|
+
className?: string;
|
|
296
|
+
}> & {
|
|
297
|
+
displayName: string;
|
|
298
|
+
Default: import("react").ComponentType<{
|
|
299
|
+
nodes: TreeNode[];
|
|
300
|
+
className?: string;
|
|
301
|
+
}>;
|
|
302
|
+
};
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/primitives/environment.d.ts
|
|
305
|
+
/**
|
|
306
|
+
* Renders environment-dependent content once per environment variant. With several variants, each
|
|
307
|
+
* is wrapped in `<div data-yd-env="<id>">` (only the default is visible until the reader switches).
|
|
308
|
+
*/
|
|
309
|
+
declare function EnvironmentVariants<T extends {
|
|
310
|
+
environmentId: string | null;
|
|
311
|
+
}>({ variants, children }: {
|
|
312
|
+
variants: readonly T[];
|
|
313
|
+
children: (variant: T, index: number) => ReactNode;
|
|
314
|
+
}): import("react").JSX.Element;
|
|
315
|
+
/** Environment switcher for the current document (renders nothing without alternatives). */
|
|
316
|
+
declare const EnvironmentSelect: import("react").ComponentType<{
|
|
317
|
+
className?: string;
|
|
318
|
+
}> & {
|
|
319
|
+
displayName: string;
|
|
320
|
+
Default: import("react").ComponentType<{
|
|
321
|
+
className?: string;
|
|
322
|
+
}>;
|
|
323
|
+
};
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/primitives/heading.d.ts
|
|
326
|
+
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
327
|
+
/** Clamps any number to a valid heading level (1–6). */
|
|
328
|
+
declare const clampHeadingLevel: (level: number) => HeadingLevel;
|
|
329
|
+
/** `<h1>`–`<h6>` chosen by `level` (clamped), for headings whose depth depends on nesting. */
|
|
330
|
+
declare function Heading({ level, ...props }: {
|
|
331
|
+
level: number;
|
|
332
|
+
} & ComponentPropsWithoutRef<"h2">): import("react").JSX.Element;
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region src/primitives/llm.d.ts
|
|
335
|
+
/**
|
|
336
|
+
* "Copy page" actions: copy as Markdown, view as Markdown, open in ChatGPT/Claude. Uses a native
|
|
337
|
+
* `<details>` menu, so it works without JavaScript (except copying).
|
|
338
|
+
*/
|
|
339
|
+
/** Label of a copy action for an item at heading `level`: the page itself (1) or a section. */
|
|
340
|
+
declare const copyActionLabel: (level: number) => "Copy page" | "Copy section";
|
|
341
|
+
declare const PageActions: import("react").ComponentType<{
|
|
342
|
+
markdownUrl: string | null;
|
|
343
|
+
/** "Copy page" for the page itself, "Copy section" for sections within a page. */
|
|
344
|
+
label?: string;
|
|
345
|
+
className?: string;
|
|
346
|
+
}> & {
|
|
347
|
+
displayName: string;
|
|
348
|
+
Default: import("react").ComponentType<{
|
|
349
|
+
markdownUrl: string | null;
|
|
350
|
+
/** "Copy page" for the page itself, "Copy section" for sections within a page. */
|
|
351
|
+
label?: string;
|
|
352
|
+
className?: string;
|
|
353
|
+
}>;
|
|
354
|
+
};
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region src/primitives/nav.d.ts
|
|
357
|
+
type NavTreeProps = {
|
|
358
|
+
nodes?: TreeNode[];
|
|
359
|
+
className?: string;
|
|
360
|
+
/** Folders deeper than this are collapsed by default (unless they contain the current page). */
|
|
361
|
+
openDepth?: number;
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* Navigation tree. Folders use native `<details>` (collapsible without JavaScript). Items carry
|
|
365
|
+
* `data-yd-nav-item` / `data-yd-nav-folder` for the `NavFilter` island, and the current page link
|
|
366
|
+
* gets `aria-current="page"`.
|
|
367
|
+
*/
|
|
368
|
+
declare const NavTree: import("react").ComponentType<NavTreeProps> & {
|
|
369
|
+
displayName: string;
|
|
370
|
+
Default: import("react").ComponentType<NavTreeProps>;
|
|
371
|
+
};
|
|
372
|
+
/** Breadcrumb trail of the current request/folder. */
|
|
373
|
+
declare const Breadcrumbs: import("react").ComponentType<{
|
|
374
|
+
id: string;
|
|
375
|
+
className?: string;
|
|
376
|
+
}> & {
|
|
377
|
+
displayName: string;
|
|
378
|
+
Default: import("react").ComponentType<{
|
|
379
|
+
id: string;
|
|
380
|
+
className?: string;
|
|
381
|
+
}>;
|
|
382
|
+
};
|
|
383
|
+
//#endregion
|
|
384
|
+
//#region src/primitives/request.d.ts
|
|
385
|
+
declare const RequestBody: import("react").ComponentType<{
|
|
386
|
+
request: PreparedRequest;
|
|
387
|
+
className?: string;
|
|
388
|
+
}> & {
|
|
389
|
+
displayName: string;
|
|
390
|
+
Default: import("react").ComponentType<{
|
|
391
|
+
request: PreparedRequest;
|
|
392
|
+
className?: string;
|
|
393
|
+
}>;
|
|
394
|
+
};
|
|
395
|
+
type RequestDocProps = {
|
|
396
|
+
request: PreparedRequest;
|
|
397
|
+
/** Heading level of the request title. */
|
|
398
|
+
level?: HeadingLevel;
|
|
399
|
+
className?: string;
|
|
400
|
+
/** Render code examples inline (default) or not at all (themes may render them elsewhere). */
|
|
401
|
+
examples?: boolean;
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* Complete documentation section for a request: title, method, URL, description, auth, parameters,
|
|
405
|
+
* headers, body and code examples. Each sub-part is overridable on its own.
|
|
406
|
+
*/
|
|
407
|
+
declare const RequestDoc: import("react").ComponentType<RequestDocProps> & {
|
|
408
|
+
displayName: string;
|
|
409
|
+
Default: import("react").ComponentType<RequestDocProps>;
|
|
410
|
+
};
|
|
411
|
+
//#endregion
|
|
412
|
+
//#region src/primitives/site.d.ts
|
|
413
|
+
/** Site logo (light/dark variants) linking to the docs home, falling back to the title. */
|
|
414
|
+
declare const Logo: import("react").ComponentType<{
|
|
415
|
+
className?: string;
|
|
416
|
+
showTitle?: boolean;
|
|
417
|
+
}> & {
|
|
418
|
+
displayName: string;
|
|
419
|
+
Default: import("react").ComponentType<{
|
|
420
|
+
className?: string;
|
|
421
|
+
showTitle?: boolean;
|
|
422
|
+
}>;
|
|
423
|
+
};
|
|
424
|
+
/** Header links from `branding.links`. */
|
|
425
|
+
declare const SiteLinks: import("react").ComponentType<{
|
|
426
|
+
className?: string;
|
|
427
|
+
}> & {
|
|
428
|
+
displayName: string;
|
|
429
|
+
Default: import("react").ComponentType<{
|
|
430
|
+
className?: string;
|
|
431
|
+
}>;
|
|
432
|
+
};
|
|
433
|
+
/** Footer text from `branding.footer` plus an llms.txt link. */
|
|
434
|
+
declare const Footer: import("react").ComponentType<{
|
|
435
|
+
className?: string;
|
|
436
|
+
}> & {
|
|
437
|
+
displayName: string;
|
|
438
|
+
Default: import("react").ComponentType<{
|
|
439
|
+
className?: string;
|
|
440
|
+
}>;
|
|
441
|
+
};
|
|
442
|
+
/**
|
|
443
|
+
* Branding as CSS custom properties on :root:
|
|
444
|
+
* `--yd-color-primary`, `--yd-color-accent`, `--yd-color-background`, `--yd-color-foreground`,
|
|
445
|
+
* `--yd-font-sans`, `--yd-font-mono` (with per-mode overrides under `[data-theme]`).
|
|
446
|
+
*/
|
|
447
|
+
declare function brandingCss(site: Pick<SiteData, "colors" | "fonts">): string;
|
|
448
|
+
declare function BrandingStyles(): import("react").JSX.Element | null;
|
|
449
|
+
/**
|
|
450
|
+
* "Run in Yaak" link for the site's shareable export (renders nothing unless `runInYaak` is enabled
|
|
451
|
+
* in the config).
|
|
452
|
+
*/
|
|
453
|
+
declare const RunInYaak: import("react").ComponentType<{
|
|
454
|
+
badge?: boolean;
|
|
455
|
+
className?: string;
|
|
456
|
+
}> & {
|
|
457
|
+
displayName: string;
|
|
458
|
+
Default: import("react").ComponentType<{
|
|
459
|
+
badge?: boolean;
|
|
460
|
+
className?: string;
|
|
461
|
+
}>;
|
|
462
|
+
};
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/site-url.d.ts
|
|
465
|
+
/**
|
|
466
|
+
* Absolute URL of a site path (one starting with `/`, including the base) when the public site
|
|
467
|
+
* URL is configured; `null` otherwise (or for URLs that aren't site paths).
|
|
468
|
+
*/
|
|
469
|
+
declare function toAbsoluteUrl(site: Pick<SiteData, "url" | "base">, path: string): string | null;
|
|
470
|
+
//#endregion
|
|
471
|
+
export { useTabs as $, CodeBlock as A, KeyValueTableProps as B, Content as C, Overview as D, NotFound as E, ResponseExamplesProps as F, overridable as G, MethodBadge as H, statusClass as I, TabList as J, useComponents as K, AuthInfo as L, CodeExamples as M, CodeExamplesProps as N, TreeContent as O, ResponseExamples as P, tabPanelProps as Q, Html as R, ChildLinks as S, FolderDocProps as T, RequestUrl as U, Markdown as V, ComponentsProvider as W, tabElementIds as X, TabListProps as Y, tabGroupIds as Z, Heading as _, Logo as a, useFolder as at, EnvironmentSelect as b, brandingCss as c, useSite as ct, RequestDocProps as d, visibleTabPanelSelector as et, Breadcrumbs as f, copyActionLabel as g, PageActions as h, Footer as i, useDocument as it, CodeBlockProps as j, Variables as k, RequestBody as l, useThemeOptions as lt, NavTreeProps as m, toAbsoluteUrl as n, useRunInYaak as nt, RunInYaak as o, usePage as ot, NavTree as p, TAB_STORAGE_KEY as q, BrandingStyles as r, YaakdocProvider as rt, SiteLinks as s, useRequest as st, methodLabel$1 as t, usePageActions as tt, RequestDoc as u, HeadingLevel as v, FolderDoc as w, EnvironmentVariants as x, clampHeadingLevel as y, KeyValueTable as z };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { n as createIsland, t as IslandComponent } from "./island-BWyuL4_6.js";
|
|
2
|
+
import { _ as ThemeRuntime, a as HeadTag, c as ModeColors, d as RenderContext, f as SiteColors, g as ThemeComponents, h as SiteLogo, i as EnvironmentOption, l as PageData, m as SiteFonts, n as ColorMode, o as LayoutProps, p as SiteData, r as ColorModePreference, s as LlmProvider, t as Assets, u as PageKind } from "./types-BY2lOvlK.js";
|
|
3
|
+
import { A as CodeBlock, B as KeyValueTableProps, C as Content, D as Overview, E as NotFound, F as ResponseExamplesProps, G as overridable, H as MethodBadge, I as statusClass, J as TabList, K as useComponents, L as AuthInfo, M as CodeExamples, N as CodeExamplesProps, O as TreeContent, P as ResponseExamples, Q as tabPanelProps, R as Html, S as ChildLinks, T as FolderDocProps, U as RequestUrl, V as Markdown, W as ComponentsProvider, X as tabElementIds, Z as tabGroupIds, _ as Heading, a as Logo, at as useFolder, b as EnvironmentSelect, c as brandingCss, ct as useSite, d as RequestDocProps, et as visibleTabPanelSelector, f as Breadcrumbs, g as copyActionLabel, h as PageActions, i as Footer, it as useDocument, j as CodeBlockProps, k as Variables, l as RequestBody, lt as useThemeOptions, m as NavTreeProps, n as toAbsoluteUrl, nt as useRunInYaak, o as RunInYaak, ot as usePage, p as NavTree, r as BrandingStyles, rt as YaakdocProvider, s as SiteLinks, st as useRequest, t as methodLabel, tt as usePageActions, u as RequestDoc, v as HeadingLevel, w as FolderDoc, x as EnvironmentVariants, y as clampHeadingLevel, z as KeyValueTable } from "./index-CoQ7pnuB.js";
|
|
4
|
+
export { type Assets, AuthInfo, BrandingStyles, Breadcrumbs, ChildLinks, CodeBlock, type CodeBlockProps, CodeExamples, type CodeExamplesProps, type ColorMode, type ColorModePreference, ComponentsProvider, Content, type EnvironmentOption, EnvironmentSelect, EnvironmentVariants, FolderDoc, type FolderDocProps, Footer, type HeadTag, Heading, type HeadingLevel, Html, type IslandComponent, KeyValueTable, type KeyValueTableProps, type LayoutProps, type LlmProvider, Logo, Markdown, MethodBadge, type ModeColors, NavTree, type NavTreeProps, NotFound, Overview, PageActions, type PageData, type PageKind, type RenderContext, RequestBody, RequestDoc, type RequestDocProps, RequestUrl, ResponseExamples, type ResponseExamplesProps, RunInYaak, type SiteColors, type SiteData, type SiteFonts, SiteLinks, type SiteLogo, TabList, type ThemeComponents, type ThemeRuntime, TreeContent, Variables, YaakdocProvider, brandingCss, clampHeadingLevel, copyActionLabel, createIsland, methodLabel, overridable, statusClass, tabElementIds, tabGroupIds, tabPanelProps, toAbsoluteUrl, useComponents, useDocument, useFolder, usePage, usePageActions, useRequest, useRunInYaak, useSite, useThemeOptions, visibleTabPanelSelector };
|