docusaurus-plugin-gitbook 0.1.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/README.md +210 -0
- package/lib/index.d.ts +51 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +39 -0
- package/lib/index.js.map +1 -0
- package/lib/parser/index.d.ts +6 -0
- package/lib/parser/index.d.ts.map +1 -0
- package/lib/parser/index.js +6 -0
- package/lib/parser/index.js.map +1 -0
- package/lib/parser/parser.d.ts +43 -0
- package/lib/parser/parser.d.ts.map +1 -0
- package/lib/parser/parser.js +192 -0
- package/lib/parser/parser.js.map +1 -0
- package/lib/parser/tokenizer.d.ts +37 -0
- package/lib/parser/tokenizer.d.ts.map +1 -0
- package/lib/parser/tokenizer.js +172 -0
- package/lib/parser/tokenizer.js.map +1 -0
- package/lib/rehype/index.d.ts +7 -0
- package/lib/rehype/index.d.ts.map +1 -0
- package/lib/rehype/index.js +6 -0
- package/lib/rehype/index.js.map +1 -0
- package/lib/rehype/plugin.d.ts +18 -0
- package/lib/rehype/plugin.d.ts.map +1 -0
- package/lib/rehype/plugin.js +31 -0
- package/lib/rehype/plugin.js.map +1 -0
- package/lib/rehype/transformers/all.d.ts +8 -0
- package/lib/rehype/transformers/all.d.ts.map +1 -0
- package/lib/rehype/transformers/all.js +10 -0
- package/lib/rehype/transformers/all.js.map +1 -0
- package/lib/rehype/transformers/button.d.ts +17 -0
- package/lib/rehype/transformers/button.d.ts.map +1 -0
- package/lib/rehype/transformers/button.js +46 -0
- package/lib/rehype/transformers/button.js.map +1 -0
- package/lib/rehype/transformers/cards.d.ts +17 -0
- package/lib/rehype/transformers/cards.d.ts.map +1 -0
- package/lib/rehype/transformers/cards.js +111 -0
- package/lib/rehype/transformers/cards.js.map +1 -0
- package/lib/rehype/transformers/expression.d.ts +17 -0
- package/lib/rehype/transformers/expression.d.ts.map +1 -0
- package/lib/rehype/transformers/expression.js +50 -0
- package/lib/rehype/transformers/expression.js.map +1 -0
- package/lib/rehype/transformers/icon.d.ts +18 -0
- package/lib/rehype/transformers/icon.d.ts.map +1 -0
- package/lib/rehype/transformers/icon.js +48 -0
- package/lib/rehype/transformers/icon.js.map +1 -0
- package/lib/rehype/transformers/index.d.ts +26 -0
- package/lib/rehype/transformers/index.d.ts.map +1 -0
- package/lib/rehype/transformers/index.js +31 -0
- package/lib/rehype/transformers/index.js.map +1 -0
- package/lib/remark/index.d.ts +8 -0
- package/lib/remark/index.d.ts.map +1 -0
- package/lib/remark/index.js +7 -0
- package/lib/remark/index.js.map +1 -0
- package/lib/remark/plugin.d.ts +22 -0
- package/lib/remark/plugin.d.ts.map +1 -0
- package/lib/remark/plugin.js +231 -0
- package/lib/remark/plugin.js.map +1 -0
- package/lib/remark/transformers/all.d.ts +14 -0
- package/lib/remark/transformers/all.d.ts.map +1 -0
- package/lib/remark/transformers/all.js +16 -0
- package/lib/remark/transformers/all.js.map +1 -0
- package/lib/remark/transformers/code.d.ts +13 -0
- package/lib/remark/transformers/code.d.ts.map +1 -0
- package/lib/remark/transformers/code.js +35 -0
- package/lib/remark/transformers/code.js.map +1 -0
- package/lib/remark/transformers/columns.d.ts +17 -0
- package/lib/remark/transformers/columns.d.ts.map +1 -0
- package/lib/remark/transformers/columns.js +41 -0
- package/lib/remark/transformers/columns.js.map +1 -0
- package/lib/remark/transformers/embed.d.ts +12 -0
- package/lib/remark/transformers/embed.d.ts.map +1 -0
- package/lib/remark/transformers/embed.js +23 -0
- package/lib/remark/transformers/embed.js.map +1 -0
- package/lib/remark/transformers/file.d.ts +13 -0
- package/lib/remark/transformers/file.d.ts.map +1 -0
- package/lib/remark/transformers/file.js +26 -0
- package/lib/remark/transformers/file.js.map +1 -0
- package/lib/remark/transformers/hint.d.ts +19 -0
- package/lib/remark/transformers/hint.d.ts.map +1 -0
- package/lib/remark/transformers/hint.js +37 -0
- package/lib/remark/transformers/hint.js.map +1 -0
- package/lib/remark/transformers/include.d.ts +16 -0
- package/lib/remark/transformers/include.d.ts.map +1 -0
- package/lib/remark/transformers/include.js +28 -0
- package/lib/remark/transformers/include.js.map +1 -0
- package/lib/remark/transformers/index.d.ts +27 -0
- package/lib/remark/transformers/index.d.ts.map +1 -0
- package/lib/remark/transformers/index.js +32 -0
- package/lib/remark/transformers/index.js.map +1 -0
- package/lib/remark/transformers/openapi.d.ts +17 -0
- package/lib/remark/transformers/openapi.d.ts.map +1 -0
- package/lib/remark/transformers/openapi.js +30 -0
- package/lib/remark/transformers/openapi.js.map +1 -0
- package/lib/remark/transformers/stepper.d.ts +17 -0
- package/lib/remark/transformers/stepper.d.ts.map +1 -0
- package/lib/remark/transformers/stepper.js +44 -0
- package/lib/remark/transformers/stepper.js.map +1 -0
- package/lib/remark/transformers/tabs.d.ts +18 -0
- package/lib/remark/transformers/tabs.d.ts.map +1 -0
- package/lib/remark/transformers/tabs.js +45 -0
- package/lib/remark/transformers/tabs.js.map +1 -0
- package/lib/remark/transformers/updates.d.ts +17 -0
- package/lib/remark/transformers/updates.d.ts.map +1 -0
- package/lib/remark/transformers/updates.js +44 -0
- package/lib/remark/transformers/updates.js.map +1 -0
- package/lib/remark/utils.d.ts +39 -0
- package/lib/remark/utils.d.ts.map +1 -0
- package/lib/remark/utils.js +139 -0
- package/lib/remark/utils.js.map +1 -0
- package/lib/theme/FAIcon/index.d.ts +10 -0
- package/lib/theme/FAIcon/index.d.ts.map +1 -0
- package/lib/theme/FAIcon/index.js +5 -0
- package/lib/theme/FAIcon/index.js.map +1 -0
- package/lib/theme/GitBookButton/index.d.ts +9 -0
- package/lib/theme/GitBookButton/index.d.ts.map +1 -0
- package/lib/theme/GitBookButton/index.js +6 -0
- package/lib/theme/GitBookButton/index.js.map +1 -0
- package/lib/theme/GitBookButton/styles.module.css +66 -0
- package/lib/theme/GitBookCard/index.d.ts +9 -0
- package/lib/theme/GitBookCard/index.d.ts.map +1 -0
- package/lib/theme/GitBookCard/index.js +6 -0
- package/lib/theme/GitBookCard/index.js.map +1 -0
- package/lib/theme/GitBookCard/styles.module.css +51 -0
- package/lib/theme/GitBookCards/index.d.ts +9 -0
- package/lib/theme/GitBookCards/index.d.ts.map +1 -0
- package/lib/theme/GitBookCards/index.js +6 -0
- package/lib/theme/GitBookCards/index.js.map +1 -0
- package/lib/theme/GitBookCards/styles.module.css +16 -0
- package/lib/theme/GitBookCodeBlock/index.d.ts +9 -0
- package/lib/theme/GitBookCodeBlock/index.d.ts.map +1 -0
- package/lib/theme/GitBookCodeBlock/index.js +6 -0
- package/lib/theme/GitBookCodeBlock/index.js.map +1 -0
- package/lib/theme/GitBookCodeBlock/styles.module.css +59 -0
- package/lib/theme/GitBookColumn/index.d.ts +9 -0
- package/lib/theme/GitBookColumn/index.d.ts.map +1 -0
- package/lib/theme/GitBookColumn/index.js +6 -0
- package/lib/theme/GitBookColumn/index.js.map +1 -0
- package/lib/theme/GitBookColumn/styles.module.css +16 -0
- package/lib/theme/GitBookColumns/index.d.ts +9 -0
- package/lib/theme/GitBookColumns/index.d.ts.map +1 -0
- package/lib/theme/GitBookColumns/index.js +6 -0
- package/lib/theme/GitBookColumns/index.js.map +1 -0
- package/lib/theme/GitBookColumns/styles.module.css +17 -0
- package/lib/theme/GitBookEmbed/index.d.ts +9 -0
- package/lib/theme/GitBookEmbed/index.d.ts.map +1 -0
- package/lib/theme/GitBookEmbed/index.js +71 -0
- package/lib/theme/GitBookEmbed/index.js.map +1 -0
- package/lib/theme/GitBookEmbed/styles.module.css +37 -0
- package/lib/theme/GitBookExpression/index.d.ts +13 -0
- package/lib/theme/GitBookExpression/index.d.ts.map +1 -0
- package/lib/theme/GitBookExpression/index.js +12 -0
- package/lib/theme/GitBookExpression/index.js.map +1 -0
- package/lib/theme/GitBookExpression/styles.module.css +16 -0
- package/lib/theme/GitBookFile/index.d.ts +9 -0
- package/lib/theme/GitBookFile/index.d.ts.map +1 -0
- package/lib/theme/GitBookFile/index.js +42 -0
- package/lib/theme/GitBookFile/index.js.map +1 -0
- package/lib/theme/GitBookFile/styles.module.css +61 -0
- package/lib/theme/GitBookInclude/index.d.ts +19 -0
- package/lib/theme/GitBookInclude/index.d.ts.map +1 -0
- package/lib/theme/GitBookInclude/index.js +8 -0
- package/lib/theme/GitBookInclude/index.js.map +1 -0
- package/lib/theme/GitBookInclude/styles.module.css +77 -0
- package/lib/theme/GitBookOpenAPI/index.d.ts +14 -0
- package/lib/theme/GitBookOpenAPI/index.d.ts.map +1 -0
- package/lib/theme/GitBookOpenAPI/index.js +73 -0
- package/lib/theme/GitBookOpenAPI/index.js.map +1 -0
- package/lib/theme/GitBookOpenAPI/styles.module.css +214 -0
- package/lib/theme/GitBookStep/index.d.ts +13 -0
- package/lib/theme/GitBookStep/index.d.ts.map +1 -0
- package/lib/theme/GitBookStep/index.js +6 -0
- package/lib/theme/GitBookStep/index.js.map +1 -0
- package/lib/theme/GitBookStep/styles.module.css +62 -0
- package/lib/theme/GitBookStepper/index.d.ts +9 -0
- package/lib/theme/GitBookStepper/index.d.ts.map +1 -0
- package/lib/theme/GitBookStepper/index.js +6 -0
- package/lib/theme/GitBookStepper/index.js.map +1 -0
- package/lib/theme/GitBookStepper/styles.module.css +7 -0
- package/lib/theme/GitBookTab/index.d.ts +12 -0
- package/lib/theme/GitBookTab/index.d.ts.map +1 -0
- package/lib/theme/GitBookTab/index.js +9 -0
- package/lib/theme/GitBookTab/index.js.map +1 -0
- package/lib/theme/GitBookTab/styles.module.css +15 -0
- package/lib/theme/GitBookTabs/index.d.ts +9 -0
- package/lib/theme/GitBookTabs/index.d.ts.map +1 -0
- package/lib/theme/GitBookTabs/index.js +32 -0
- package/lib/theme/GitBookTabs/index.js.map +1 -0
- package/lib/theme/GitBookTabs/styles.module.css +57 -0
- package/lib/theme/GitBookUpdate/index.d.ts +9 -0
- package/lib/theme/GitBookUpdate/index.d.ts.map +1 -0
- package/lib/theme/GitBookUpdate/index.js +21 -0
- package/lib/theme/GitBookUpdate/index.js.map +1 -0
- package/lib/theme/GitBookUpdate/styles.module.css +68 -0
- package/lib/theme/GitBookUpdates/index.d.ts +9 -0
- package/lib/theme/GitBookUpdates/index.d.ts.map +1 -0
- package/lib/theme/GitBookUpdates/index.js +6 -0
- package/lib/theme/GitBookUpdates/index.js.map +1 -0
- package/lib/theme/GitBookUpdates/styles.module.css +15 -0
- package/lib/theme/gitbook.css +205 -0
- package/lib/theme-types.d.ts +129 -0
- package/lib/theme-types.d.ts.map +1 -0
- package/lib/theme-types.js +5 -0
- package/lib/theme-types.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/GitBookEmbed/index.tsx"],"names":[],"mappings":";AASA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAOzC,SAAS,aAAa,CAAC,GAAW;IAChC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAErD,UAAU;QACV,IAAI,QAAQ,KAAK,aAAa,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;YAC1D,IAAI,OAAO,GAAG,EAAE,CAAC;YACjB,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;gBAC5B,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACrC,CAAC;iBAAM,CAAC;gBACN,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YAC/C,CAAC;YACD,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO;oBACL,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,iCAAiC,OAAO,EAAE;iBACrD,CAAC;YACJ,CAAC;QACH,CAAC;QAED,QAAQ;QACR,IAAI,QAAQ,KAAK,WAAW,EAAE,CAAC;YAC7B,MAAM,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,OAAO;YACL,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,GAAG;SACd,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAc;IACtD,MAAM,SAAS,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAErC,OAAO,CACL,eAAK,SAAS,EAAE,MAAM,CAAC,KAAK,aAC1B,iBACE,GAAG,EAAE,SAAS,CAAC,QAAQ,EACvB,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAC,0FAA0F,EAChG,eAAe,SACf,EACF,YAAG,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,gCAE3E,IACA,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook Embed styles
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
.embed {
|
|
6
|
+
margin: 1rem 0;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.iframe {
|
|
11
|
+
width: 100%;
|
|
12
|
+
aspect-ratio: 16 / 9;
|
|
13
|
+
border: none;
|
|
14
|
+
border-radius: 0.5rem;
|
|
15
|
+
background-color: var(--gitbook-embed-bg, #f5f5f5);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.link {
|
|
19
|
+
display: block;
|
|
20
|
+
margin-top: 0.5rem;
|
|
21
|
+
font-size: 0.85rem;
|
|
22
|
+
color: var(--gitbook-embed-link-color, #0969da);
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.link:hover {
|
|
27
|
+
text-decoration: underline;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Dark mode */
|
|
31
|
+
:global([data-theme='dark']) .iframe {
|
|
32
|
+
background-color: var(--gitbook-embed-bg-dark, #2a2a2a);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:global([data-theme='dark']) .link {
|
|
36
|
+
color: var(--gitbook-embed-link-color-dark, #58a6ff);
|
|
37
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook Expression component
|
|
3
|
+
*
|
|
4
|
+
* Displays dynamic variable values
|
|
5
|
+
*
|
|
6
|
+
* Note: In a full implementation, this would receive variables from
|
|
7
|
+
* a context provider that reads from .gitbook/vars.yaml and frontmatter.
|
|
8
|
+
* For now, it displays the expression as a placeholder.
|
|
9
|
+
*/
|
|
10
|
+
import type { ReactElement } from 'react';
|
|
11
|
+
import type { ExpressionProps } from '../../theme-types.js';
|
|
12
|
+
export default function GitBookExpression({ expression, value, }: ExpressionProps): ReactElement;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/GitBookExpression/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,UAAU,EACV,KAAK,GACN,EAAE,eAAe,GAAG,YAAY,CAahC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from './styles.module.css';
|
|
3
|
+
export default function GitBookExpression({ expression, value, }) {
|
|
4
|
+
// If a pre-evaluated value is provided, use it
|
|
5
|
+
if (value !== undefined) {
|
|
6
|
+
return _jsx("span", { className: styles.expression, children: value });
|
|
7
|
+
}
|
|
8
|
+
// Otherwise, display the expression as a placeholder
|
|
9
|
+
// In production, this would be evaluated against actual variables
|
|
10
|
+
return (_jsx("span", { className: styles.expression, title: `Expression: ${expression}`, children: `{${expression}}` }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/GitBookExpression/index.tsx"],"names":[],"mappings":";AAaA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,UAAU,EACV,KAAK,GACW;IAChB,+CAA+C;IAC/C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,eAAM,SAAS,EAAE,MAAM,CAAC,UAAU,YAAG,KAAK,GAAQ,CAAC;IAC5D,CAAC;IAED,qDAAqD;IACrD,kEAAkE;IAClE,OAAO,CACL,eAAM,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,UAAU,EAAE,YACnE,IAAI,UAAU,GAAG,GACb,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook Expression styles
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
.expression {
|
|
6
|
+
font-family: var(--ifm-font-family-monospace, monospace);
|
|
7
|
+
background-color: var(--gitbook-expression-bg, #f0f0f0);
|
|
8
|
+
padding: 0.1em 0.3em;
|
|
9
|
+
border-radius: 0.25em;
|
|
10
|
+
font-size: 0.9em;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Dark mode */
|
|
14
|
+
:global([data-theme='dark']) .expression {
|
|
15
|
+
background-color: var(--gitbook-expression-bg-dark, #3a3a3a);
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook File component
|
|
3
|
+
*
|
|
4
|
+
* Displays a downloadable file with description
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactElement } from 'react';
|
|
7
|
+
import type { FileProps } from '../../theme-types.js';
|
|
8
|
+
export default function GitBookFile({ src, children }: FileProps): ReactElement;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/GitBookFile/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAwCtD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,SAAS,GAAG,YAAY,CAc9E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from './styles.module.css';
|
|
3
|
+
const FILE_ICONS = {
|
|
4
|
+
pdf: '📄',
|
|
5
|
+
doc: '📝',
|
|
6
|
+
docx: '📝',
|
|
7
|
+
xls: '📊',
|
|
8
|
+
xlsx: '📊',
|
|
9
|
+
ppt: '📽️',
|
|
10
|
+
pptx: '📽️',
|
|
11
|
+
zip: '📦',
|
|
12
|
+
rar: '📦',
|
|
13
|
+
tar: '📦',
|
|
14
|
+
gz: '📦',
|
|
15
|
+
png: '🖼️',
|
|
16
|
+
jpg: '🖼️',
|
|
17
|
+
jpeg: '🖼️',
|
|
18
|
+
gif: '🖼️',
|
|
19
|
+
svg: '🖼️',
|
|
20
|
+
mp3: '🎵',
|
|
21
|
+
mp4: '🎬',
|
|
22
|
+
wav: '🎵',
|
|
23
|
+
default: '📁',
|
|
24
|
+
};
|
|
25
|
+
function getFileExtension(src) {
|
|
26
|
+
const parts = src.split('.');
|
|
27
|
+
return parts.length > 1 ? parts[parts.length - 1].toLowerCase() : '';
|
|
28
|
+
}
|
|
29
|
+
function getFileName(src) {
|
|
30
|
+
const parts = src.split('/');
|
|
31
|
+
return parts[parts.length - 1];
|
|
32
|
+
}
|
|
33
|
+
function getFileIcon(extension) {
|
|
34
|
+
return FILE_ICONS[extension] || FILE_ICONS.default;
|
|
35
|
+
}
|
|
36
|
+
export default function GitBookFile({ src, children }) {
|
|
37
|
+
const extension = getFileExtension(src);
|
|
38
|
+
const fileName = getFileName(src);
|
|
39
|
+
const icon = getFileIcon(extension);
|
|
40
|
+
return (_jsxs("div", { className: styles.file, children: [_jsxs("a", { href: src, className: styles.link, download: true, children: [_jsx("span", { className: styles.icon, children: icon }), _jsx("span", { className: styles.name, children: fileName })] }), children && _jsx("div", { className: styles.description, children: children })] }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/GitBookFile/index.tsx"],"names":[],"mappings":";AASA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,MAAM,UAAU,GAA2B;IACzC,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,SAAS,gBAAgB,CAAC,GAAW;IACnC,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,KAAK,CAAC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-border, #e0e0e0);
|
|
9
|
+
border-radius: 0.5rem;
|
|
10
|
+
background-color: var(--gitbook-file-bg, #f9f9f9);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.link {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
text-decoration: none;
|
|
17
|
+
color: var(--gitbook-file-link-color, #0969da);
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.link:hover {
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.icon {
|
|
26
|
+
font-size: 1.5rem;
|
|
27
|
+
margin-right: 0.75rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.name {
|
|
31
|
+
font-family: var(--ifm-font-family-monospace, monospace);
|
|
32
|
+
font-size: 0.9rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.description {
|
|
36
|
+
margin-top: 0.5rem;
|
|
37
|
+
font-size: 0.9rem;
|
|
38
|
+
color: var(--gitbook-file-desc-color, #666);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.description > *:first-child {
|
|
42
|
+
margin-top: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.description > *:last-child {
|
|
46
|
+
margin-bottom: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Dark mode */
|
|
50
|
+
:global([data-theme='dark']) .file {
|
|
51
|
+
border-color: var(--gitbook-file-border-dark, #444);
|
|
52
|
+
background-color: var(--gitbook-file-bg-dark, #2a2a2a);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:global([data-theme='dark']) .link {
|
|
56
|
+
color: var(--gitbook-file-link-color-dark, #58a6ff);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:global([data-theme='dark']) .description {
|
|
60
|
+
color: var(--gitbook-file-desc-color-dark, #aaa);
|
|
61
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook Include component
|
|
3
|
+
*
|
|
4
|
+
* Displays a reference to an included file.
|
|
5
|
+
*
|
|
6
|
+
* Note: This component renders a placeholder/notice for the include.
|
|
7
|
+
* For full build-time file inclusion in Docusaurus, use native MDX imports:
|
|
8
|
+
*
|
|
9
|
+
* import Content from '.gitbook/includes/disclaimer.md';
|
|
10
|
+
* <Content />
|
|
11
|
+
*
|
|
12
|
+
* This component is useful for:
|
|
13
|
+
* - Showing what files should be included when migrating from GitBook
|
|
14
|
+
* - Providing a fallback when the included file isn't available
|
|
15
|
+
*/
|
|
16
|
+
import type { ReactElement } from 'react';
|
|
17
|
+
import type { IncludeProps } from '../../theme-types.js';
|
|
18
|
+
export default function GitBookInclude({ src }: IncludeProps): ReactElement;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/GitBookInclude/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,GAAG,EAAE,EAAE,YAAY,GAAG,YAAY,CAmB1E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from './styles.module.css';
|
|
3
|
+
export default function GitBookInclude({ src }) {
|
|
4
|
+
// Extract filename from path
|
|
5
|
+
const filename = src.split('/').pop() || src;
|
|
6
|
+
return (_jsxs("div", { className: styles.include, children: [_jsx("span", { className: styles.icon, children: "\uD83D\uDCC4" }), _jsxs("div", { className: styles.content, children: [_jsx("span", { className: styles.label, children: "Included content:" }), _jsx("code", { className: styles.path, children: src }), _jsxs("span", { className: styles.hint, children: ["For build-time inclusion, use MDX imports:", _jsx("code", { className: styles.code, children: `import ${filename.replace(/[.-]/g, '_').replace(/\.md$/, '')} from '${src}';` })] })] })] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/GitBookInclude/index.tsx"],"names":[],"mappings":";AAmBA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,GAAG,EAAgB;IAC1D,6BAA6B;IAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC;IAE7C,OAAO,CACL,eAAK,SAAS,EAAE,MAAM,CAAC,OAAO,aAC5B,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,6BAAW,EACvC,eAAK,SAAS,EAAE,MAAM,CAAC,OAAO,aAC5B,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,kCAA0B,EACvD,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,YAAG,GAAG,GAAQ,EAC1C,gBAAM,SAAS,EAAE,MAAM,CAAC,IAAI,2DAE1B,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,YACzB,UAAU,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,GAAG,IAAI,GAC1E,IACF,IACH,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook Include styles
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
.include {
|
|
6
|
+
display: flex;
|
|
7
|
+
padding: 1rem;
|
|
8
|
+
margin: 1rem 0;
|
|
9
|
+
border-radius: 0.5rem;
|
|
10
|
+
border: 1px dashed var(--gitbook-include-border, #e0e0e0);
|
|
11
|
+
background-color: var(--gitbook-include-bg, #f9f9f9);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.icon {
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
margin-right: 0.75rem;
|
|
17
|
+
font-size: 1.25rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.content {
|
|
21
|
+
flex: 1;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: 0.25rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.label {
|
|
28
|
+
font-size: 0.85rem;
|
|
29
|
+
color: var(--gitbook-include-label-color, #666);
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.path {
|
|
34
|
+
font-family: var(--ifm-font-family-monospace, monospace);
|
|
35
|
+
font-size: 0.9rem;
|
|
36
|
+
color: var(--gitbook-include-path-color, #0969da);
|
|
37
|
+
background: none;
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.hint {
|
|
42
|
+
margin-top: 0.5rem;
|
|
43
|
+
font-size: 0.8rem;
|
|
44
|
+
color: var(--gitbook-include-hint-color, #888);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.code {
|
|
48
|
+
display: block;
|
|
49
|
+
margin-top: 0.25rem;
|
|
50
|
+
font-family: var(--ifm-font-family-monospace, monospace);
|
|
51
|
+
font-size: 0.75rem;
|
|
52
|
+
background-color: var(--gitbook-include-code-bg, #f0f0f0);
|
|
53
|
+
padding: 0.25rem 0.5rem;
|
|
54
|
+
border-radius: 0.25rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Dark mode */
|
|
58
|
+
:global([data-theme='dark']) .include {
|
|
59
|
+
border-color: var(--gitbook-include-border-dark, #444);
|
|
60
|
+
background-color: var(--gitbook-include-bg-dark, #2a2a2a);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:global([data-theme='dark']) .label {
|
|
64
|
+
color: var(--gitbook-include-label-color-dark, #aaa);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:global([data-theme='dark']) .path {
|
|
68
|
+
color: var(--gitbook-include-path-color-dark, #58a6ff);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:global([data-theme='dark']) .hint {
|
|
72
|
+
color: var(--gitbook-include-hint-color-dark, #777);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:global([data-theme='dark']) .code {
|
|
76
|
+
background-color: var(--gitbook-include-code-bg-dark, #3a3a3a);
|
|
77
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook OpenAPI component
|
|
3
|
+
*
|
|
4
|
+
* Fetches an OpenAPI spec and displays endpoint details inline.
|
|
5
|
+
* Shows method badge, path, description, parameters, and response codes.
|
|
6
|
+
*
|
|
7
|
+
* When docusaurus-theme-openapi-docs is installed, users get full API
|
|
8
|
+
* documentation via that plugin. This component serves as a lightweight
|
|
9
|
+
* inline endpoint viewer for {% openapi %} blocks.
|
|
10
|
+
*/
|
|
11
|
+
import type { ReactElement } from 'react';
|
|
12
|
+
import type { OpenAPIProps } from '../../theme-types.js';
|
|
13
|
+
export default function GitBookOpenAPI({ src, path, method, }: OpenAPIProps): ReactElement;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/GitBookOpenAPI/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAyBzD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,GAAG,EACH,IAAI,EACJ,MAAM,GACP,EAAE,YAAY,GAAG,YAAY,CAuK7B"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* GitBook OpenAPI component
|
|
4
|
+
*
|
|
5
|
+
* Fetches an OpenAPI spec and displays endpoint details inline.
|
|
6
|
+
* Shows method badge, path, description, parameters, and response codes.
|
|
7
|
+
*
|
|
8
|
+
* When docusaurus-theme-openapi-docs is installed, users get full API
|
|
9
|
+
* documentation via that plugin. This component serves as a lightweight
|
|
10
|
+
* inline endpoint viewer for {% openapi %} blocks.
|
|
11
|
+
*/
|
|
12
|
+
import { useEffect, useState } from 'react';
|
|
13
|
+
import styles from './styles.module.css';
|
|
14
|
+
// Simple in-memory cache for fetched specs
|
|
15
|
+
const specCache = new Map();
|
|
16
|
+
export default function GitBookOpenAPI({ src, path, method, }) {
|
|
17
|
+
const [endpoint, setEndpoint] = useState(null);
|
|
18
|
+
const [loading, setLoading] = useState(true);
|
|
19
|
+
const [error, setError] = useState(null);
|
|
20
|
+
const normalizedMethod = method.toLowerCase();
|
|
21
|
+
const displayMethod = method.toUpperCase();
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
let cancelled = false;
|
|
24
|
+
async function fetchSpec() {
|
|
25
|
+
try {
|
|
26
|
+
let spec;
|
|
27
|
+
if (specCache.has(src)) {
|
|
28
|
+
spec = specCache.get(src);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const res = await fetch(src);
|
|
32
|
+
if (!res.ok) {
|
|
33
|
+
throw new Error(`HTTP ${res.status}`);
|
|
34
|
+
}
|
|
35
|
+
spec = await res.json();
|
|
36
|
+
specCache.set(src, spec);
|
|
37
|
+
}
|
|
38
|
+
if (cancelled)
|
|
39
|
+
return;
|
|
40
|
+
const paths = spec.paths;
|
|
41
|
+
const pathObj = paths?.[path];
|
|
42
|
+
const methodObj = pathObj?.[normalizedMethod];
|
|
43
|
+
if (methodObj) {
|
|
44
|
+
setEndpoint(methodObj);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
setError(`Endpoint ${displayMethod} ${path} not found in spec`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
if (!cancelled) {
|
|
52
|
+
setError(`Failed to load spec: ${err instanceof Error ? err.message : String(err)}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
if (!cancelled) {
|
|
57
|
+
setLoading(false);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
fetchSpec();
|
|
62
|
+
return () => {
|
|
63
|
+
cancelled = true;
|
|
64
|
+
};
|
|
65
|
+
}, [src, path, normalizedMethod, displayMethod]);
|
|
66
|
+
return (_jsxs("div", { className: styles.openapi, children: [_jsxs("div", { className: styles.header, children: [_jsx("span", { className: `${styles.method} ${styles[normalizedMethod] || ''}`, children: displayMethod }), _jsx("code", { className: styles.path, children: path })] }), loading && (_jsx("div", { className: styles.loading, children: "Loading API details\u2026" })), error && (_jsxs("div", { className: styles.details, children: [_jsx("div", { className: styles.error, children: error }), _jsx("div", { className: styles.source, children: _jsx("a", { href: src, className: styles.link, target: "_blank", rel: "noopener noreferrer", children: "View OpenAPI Spec" }) })] })), endpoint && (_jsxs("div", { className: styles.details, children: [endpoint.summary && (_jsx("div", { className: styles.summary, children: endpoint.summary })), endpoint.description && (_jsx("div", { className: styles.description, children: endpoint.description })), endpoint.parameters && endpoint.parameters.length > 0 && (_jsxs("div", { className: styles.section, children: [_jsx("h4", { className: styles.sectionTitle, children: "Parameters" }), _jsxs("table", { className: styles.paramTable, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Name" }), _jsx("th", { children: "In" }), _jsx("th", { children: "Type" }), _jsx("th", { children: "Required" }), _jsx("th", { children: "Description" })] }) }), _jsx("tbody", { children: endpoint.parameters.map((param) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: param.name }) }), _jsx("td", { children: param.in }), _jsx("td", { children: param.schema?.type || '—' }), _jsx("td", { children: param.required ? 'Yes' : 'No' }), _jsx("td", { children: param.description || '—' })] }, `${param.in}-${param.name}`))) })] })] })), endpoint.responses &&
|
|
67
|
+
Object.keys(endpoint.responses).length > 0 && (_jsxs("div", { className: styles.section, children: [_jsx("h4", { className: styles.sectionTitle, children: "Responses" }), _jsx("div", { className: styles.responseList, children: Object.entries(endpoint.responses).map(([code, info]) => (_jsxs("div", { className: styles.responseRow, children: [_jsx("span", { className: `${styles.statusCode} ${code.startsWith('2')
|
|
68
|
+
? styles.statusSuccess
|
|
69
|
+
: code.startsWith('4') || code.startsWith('5')
|
|
70
|
+
? styles.statusError
|
|
71
|
+
: styles.statusInfo}`, children: code }), _jsx("span", { className: styles.responseDesc, children: info.description || '—' })] }, code))) })] })), _jsx("div", { className: styles.source, children: _jsx("a", { href: src, className: styles.link, target: "_blank", rel: "noopener noreferrer", children: "View Full OpenAPI Spec" }) })] }))] }));
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/GitBookOpenAPI/index.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAqBzC,2CAA2C;AAC3C,MAAM,SAAS,GAAG,IAAI,GAAG,EAAmC,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,GAAG,EACH,IAAI,EACJ,MAAM,GACO;IACb,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAsB,IAAI,CAAC,CAAC;IACpE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,K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,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CACxD,eAAgB,SAAS,EAAE,MAAM,CAAC,WAAW,aAC3C,eACE,SAAS,EAAE,GAAG,MAAM,CAAC,UAAU,IAC7B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;gDAClB,CAAC,CAAC,MAAM,CAAC,aAAa;gDACtB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;oDAC5C,CAAC,CAAC,MAAM,CAAC,WAAW;oDACpB,CAAC,CAAC,MAAM,CAAC,UACf,EAAE,YAED,IAAI,GACA,EACP,eAAM,SAAS,EAAE,MAAM,CAAC,YAAY,YACjC,IAAI,CAAC,WAAW,IAAI,GAAG,GACnB,KAdC,IAAI,CAeR,CACP,CAAC,GACE,IACF,CACP,EAEH,cAAK,SAAS,EAAE,MAAM,CAAC,MAAM,YAC3B,YACE,IAAI,EAAE,GAAG,EACT,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,uCAGvB,GACA,IACF,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook OpenAPI styles
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
.openapi {
|
|
6
|
+
margin: 1rem 0;
|
|
7
|
+
border: 1px solid var(--ifm-color-emphasis-300);
|
|
8
|
+
border-radius: var(--ifm-global-radius);
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.header {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
padding: 0.75rem 1rem;
|
|
16
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
17
|
+
border-bottom: 1px solid var(--ifm-color-emphasis-300);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.method {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
padding: 0.25rem 0.5rem;
|
|
25
|
+
border-radius: 0.25rem;
|
|
26
|
+
font-size: 0.75rem;
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
text-transform: uppercase;
|
|
29
|
+
color: #fff;
|
|
30
|
+
margin-right: 0.75rem;
|
|
31
|
+
min-width: 4rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* HTTP method colors */
|
|
35
|
+
.get {
|
|
36
|
+
background-color: #61affe;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.post {
|
|
40
|
+
background-color: #49cc90;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.put {
|
|
44
|
+
background-color: #fca130;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.patch {
|
|
48
|
+
background-color: #50e3c2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.delete {
|
|
52
|
+
background-color: #f93e3e;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.head {
|
|
56
|
+
background-color: #9012fe;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.options {
|
|
60
|
+
background-color: #0d5aa7;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.path {
|
|
64
|
+
font-family: var(--ifm-font-family-monospace);
|
|
65
|
+
font-size: 0.9rem;
|
|
66
|
+
background: none;
|
|
67
|
+
padding: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Details area */
|
|
71
|
+
.details {
|
|
72
|
+
padding: 0.75rem 1rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.summary {
|
|
76
|
+
font-size: 1rem;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
margin-bottom: 0.25rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.description {
|
|
82
|
+
font-size: 0.9rem;
|
|
83
|
+
color: var(--ifm-color-emphasis-700);
|
|
84
|
+
margin-bottom: 0.75rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Sections (parameters, responses) */
|
|
88
|
+
.section {
|
|
89
|
+
margin-top: 0.75rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.sectionTitle {
|
|
93
|
+
font-size: 0.85rem;
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
text-transform: uppercase;
|
|
96
|
+
letter-spacing: 0.05em;
|
|
97
|
+
color: var(--ifm-color-emphasis-600);
|
|
98
|
+
margin: 0 0 0.5rem 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Parameters table */
|
|
102
|
+
.paramTable {
|
|
103
|
+
width: 100%;
|
|
104
|
+
border-collapse: collapse;
|
|
105
|
+
font-size: 0.85rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.paramTable th {
|
|
109
|
+
text-align: left;
|
|
110
|
+
padding: 0.4rem 0.5rem;
|
|
111
|
+
border-bottom: 2px solid var(--ifm-color-emphasis-300);
|
|
112
|
+
font-weight: 600;
|
|
113
|
+
font-size: 0.8rem;
|
|
114
|
+
color: var(--ifm-color-emphasis-600);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.paramTable td {
|
|
118
|
+
padding: 0.4rem 0.5rem;
|
|
119
|
+
border-bottom: 1px solid var(--ifm-color-emphasis-200);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.paramTable code {
|
|
123
|
+
font-size: 0.8rem;
|
|
124
|
+
padding: 0.1rem 0.3rem;
|
|
125
|
+
border-radius: 3px;
|
|
126
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Responses */
|
|
130
|
+
.responseList {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
gap: 0.3rem;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.responseRow {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 0.75rem;
|
|
140
|
+
font-size: 0.85rem;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.statusCode {
|
|
144
|
+
display: inline-block;
|
|
145
|
+
min-width: 3rem;
|
|
146
|
+
padding: 0.15rem 0.4rem;
|
|
147
|
+
border-radius: 3px;
|
|
148
|
+
font-weight: 600;
|
|
149
|
+
font-size: 0.8rem;
|
|
150
|
+
text-align: center;
|
|
151
|
+
font-family: var(--ifm-font-family-monospace);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.statusSuccess {
|
|
155
|
+
background-color: rgba(73, 204, 144, 0.15);
|
|
156
|
+
color: #1a7f37;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.statusError {
|
|
160
|
+
background-color: rgba(249, 62, 62, 0.15);
|
|
161
|
+
color: #cf222e;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.statusInfo {
|
|
165
|
+
background-color: rgba(97, 175, 254, 0.15);
|
|
166
|
+
color: #0550ae;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.responseDesc {
|
|
170
|
+
color: var(--ifm-color-emphasis-700);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Source link */
|
|
174
|
+
.source {
|
|
175
|
+
margin-top: 0.75rem;
|
|
176
|
+
padding-top: 0.5rem;
|
|
177
|
+
border-top: 1px solid var(--ifm-color-emphasis-200);
|
|
178
|
+
font-size: 0.85rem;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.link {
|
|
182
|
+
color: var(--ifm-color-primary);
|
|
183
|
+
text-decoration: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.link:hover {
|
|
187
|
+
text-decoration: underline;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Loading and error states */
|
|
191
|
+
.loading {
|
|
192
|
+
padding: 0.75rem 1rem;
|
|
193
|
+
font-size: 0.85rem;
|
|
194
|
+
color: var(--ifm-color-emphasis-600);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.error {
|
|
198
|
+
font-size: 0.85rem;
|
|
199
|
+
color: var(--ifm-color-danger);
|
|
200
|
+
margin-bottom: 0.5rem;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Dark mode adjustments */
|
|
204
|
+
:global([data-theme='dark']) .statusSuccess {
|
|
205
|
+
color: #49cc90;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:global([data-theme='dark']) .statusError {
|
|
209
|
+
color: #f93e3e;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:global([data-theme='dark']) .statusInfo {
|
|
213
|
+
color: #61affe;
|
|
214
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitBook Step component
|
|
3
|
+
*
|
|
4
|
+
* Individual step in a stepper sequence
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { ReactElement } from 'react';
|
|
8
|
+
export interface GitBookStepProps {
|
|
9
|
+
stepNumber: number | string;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export default function GitBookStep({ stepNumber, children, }: GitBookStepProps): ReactElement;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/GitBookStep/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,UAAU,EACV,QAAQ,GACT,EAAE,gBAAgB,GAAG,YAAY,CAUjC"}
|