elseware-docs-engine 1.2.0 → 1.2.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/README.md +138 -138
- package/dist/index.css.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +60 -60
package/README.md
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
# elseware Docs Engine
|
|
2
|
-
|
|
3
|
-
A modern React documentation engine built for structured Markdown-based documentation websites with nested routing, sidebar generation, dark mode support, and responsive layouts.
|
|
4
|
-
|
|
5
|
-
Built with:
|
|
6
|
-
- React
|
|
7
|
-
- TypeScript
|
|
8
|
-
- Vite
|
|
9
|
-
- React Router
|
|
10
|
-
- elseware-ui
|
|
11
|
-
- MDXEditor
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Features
|
|
16
|
-
|
|
17
|
-
- Nested documentation structure
|
|
18
|
-
- Automatic sidebar generation
|
|
19
|
-
- Responsive mobile sidebar
|
|
20
|
-
- Markdown rendering
|
|
21
|
-
- Code block support
|
|
22
|
-
- Dark mode support
|
|
23
|
-
- Customizable base path
|
|
24
|
-
- TypeScript support
|
|
25
|
-
- Vite powered
|
|
26
|
-
- Clean documentation layouts
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Installation
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npm install elseware-docs-engine
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Import Styles
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
import "elseware-docs-engine/dist/index.css";
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Basic Usage
|
|
47
|
-
|
|
48
|
-
```tsx
|
|
49
|
-
import React from "react";
|
|
50
|
-
|
|
51
|
-
import ReactDOM from "react-dom/client";
|
|
52
|
-
|
|
53
|
-
import { DocsEngine } from "elseware-docs-engine";
|
|
54
|
-
|
|
55
|
-
import docs from "./docs";
|
|
56
|
-
|
|
57
|
-
import "elseware-docs-engine/dist/index.css";
|
|
58
|
-
|
|
59
|
-
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
60
|
-
<React.StrictMode>
|
|
61
|
-
<DocsEngine
|
|
62
|
-
docs={docs}
|
|
63
|
-
basePath="/docs"
|
|
64
|
-
/>
|
|
65
|
-
</React.StrictMode>,
|
|
66
|
-
);
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Docs Structure Example
|
|
72
|
-
|
|
73
|
-
```ts
|
|
74
|
-
import intro from "./getting-started/intro.md?raw";
|
|
75
|
-
|
|
76
|
-
import { DocsCategory } from "elseware-docs-engine";
|
|
77
|
-
|
|
78
|
-
const docs: DocsCategory[] = [
|
|
79
|
-
{
|
|
80
|
-
title: "Getting Started",
|
|
81
|
-
|
|
82
|
-
path: "/getting-started",
|
|
83
|
-
|
|
84
|
-
children: [
|
|
85
|
-
{
|
|
86
|
-
title: "Introduction",
|
|
87
|
-
|
|
88
|
-
path: "/intro",
|
|
89
|
-
|
|
90
|
-
content: intro,
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
},
|
|
94
|
-
];
|
|
95
|
-
|
|
96
|
-
export default docs;
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Markdown Features
|
|
102
|
-
|
|
103
|
-
- Headings
|
|
104
|
-
- Tables
|
|
105
|
-
- Lists
|
|
106
|
-
- Images
|
|
107
|
-
- Links
|
|
108
|
-
- Quotes
|
|
109
|
-
- Code blocks
|
|
110
|
-
- Syntax highlighting
|
|
111
|
-
- Nested navigation
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Development
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
npm run dev
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Build
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
npm run build
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## License
|
|
132
|
-
|
|
133
|
-
MIT License
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Author
|
|
138
|
-
|
|
1
|
+
# elseware Docs Engine
|
|
2
|
+
|
|
3
|
+
A modern React documentation engine built for structured Markdown-based documentation websites with nested routing, sidebar generation, dark mode support, and responsive layouts.
|
|
4
|
+
|
|
5
|
+
Built with:
|
|
6
|
+
- React
|
|
7
|
+
- TypeScript
|
|
8
|
+
- Vite
|
|
9
|
+
- React Router
|
|
10
|
+
- elseware-ui
|
|
11
|
+
- MDXEditor
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Nested documentation structure
|
|
18
|
+
- Automatic sidebar generation
|
|
19
|
+
- Responsive mobile sidebar
|
|
20
|
+
- Markdown rendering
|
|
21
|
+
- Code block support
|
|
22
|
+
- Dark mode support
|
|
23
|
+
- Customizable base path
|
|
24
|
+
- TypeScript support
|
|
25
|
+
- Vite powered
|
|
26
|
+
- Clean documentation layouts
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install elseware-docs-engine
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Import Styles
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import "elseware-docs-engine/dist/index.css";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Basic Usage
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import React from "react";
|
|
50
|
+
|
|
51
|
+
import ReactDOM from "react-dom/client";
|
|
52
|
+
|
|
53
|
+
import { DocsEngine } from "elseware-docs-engine";
|
|
54
|
+
|
|
55
|
+
import docs from "./docs";
|
|
56
|
+
|
|
57
|
+
import "elseware-docs-engine/dist/index.css";
|
|
58
|
+
|
|
59
|
+
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
60
|
+
<React.StrictMode>
|
|
61
|
+
<DocsEngine
|
|
62
|
+
docs={docs}
|
|
63
|
+
basePath="/docs"
|
|
64
|
+
/>
|
|
65
|
+
</React.StrictMode>,
|
|
66
|
+
);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Docs Structure Example
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import intro from "./getting-started/intro.md?raw";
|
|
75
|
+
|
|
76
|
+
import { DocsCategory } from "elseware-docs-engine";
|
|
77
|
+
|
|
78
|
+
const docs: DocsCategory[] = [
|
|
79
|
+
{
|
|
80
|
+
title: "Getting Started",
|
|
81
|
+
|
|
82
|
+
path: "/getting-started",
|
|
83
|
+
|
|
84
|
+
children: [
|
|
85
|
+
{
|
|
86
|
+
title: "Introduction",
|
|
87
|
+
|
|
88
|
+
path: "/intro",
|
|
89
|
+
|
|
90
|
+
content: intro,
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
export default docs;
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Markdown Features
|
|
102
|
+
|
|
103
|
+
- Headings
|
|
104
|
+
- Tables
|
|
105
|
+
- Lists
|
|
106
|
+
- Images
|
|
107
|
+
- Links
|
|
108
|
+
- Quotes
|
|
109
|
+
- Code blocks
|
|
110
|
+
- Syntax highlighting
|
|
111
|
+
- Nested navigation
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Development
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm run dev
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Build
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npm run build
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
MIT License
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Author
|
|
138
|
+
|
|
139
139
|
elseware Technology
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styles/index.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.fixed {\n position: fixed;\n}\n.mb-3 {\n margin-bottom: 0.75rem;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.mb-8 {\n margin-bottom: 2rem;\n}\n.flex {\n display: flex;\n}\n.inline-flex {\n display: inline-flex;\n}\n.h-10 {\n height: 2.5rem;\n}\n.min-h-screen {\n min-height: 100vh;\n}\n.w-full {\n width: 100%;\n}\n.max-w-lg {\n max-width: 32rem;\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-center {\n align-items: center;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.gap-4 {\n gap: 1rem;\n}\n.rounded-2xl {\n border-radius: 1rem;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.border {\n border-width: 1px;\n}\n.border-gray-800 {\n --tw-border-opacity: 1;\n border-color: rgb(31 41 55 / var(--tw-border-opacity, 1));\n}\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));\n}\n.bg-neutral-950 {\n --tw-bg-opacity: 1;\n background-color: rgb(10 10 10 / var(--tw-bg-opacity, 1));\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.p-10 {\n padding: 2.5rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n.pt-\\[54px\\] {\n padding-top: 54px;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-6xl {\n font-size: 3.75rem;\n line-height: 1;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-semibold {\n font-weight: 600;\n}\n.leading-relaxed {\n line-height: 1.625;\n}\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity, 1));\n}\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity, 1));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.hover\\:cursor-pointer:hover {\n cursor: pointer;\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}"],"mappings":"AAAA,EAAG,QAAU,OACX,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,aACA,aACA,kBACA,6BAA6B,UAC7B,8BACA,6BACA,4BACA,eACA,oBACA,sBACA,uBACA,wBACA,kBACA,wBAAwB,IACxB,wBAAwB,KACxB,iBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE,IAClC,yBAAyB,EAAE,EAAE,MAC7B,kBAAkB,EAAE,EAAE,MACtB,aAAa,EAAE,EAAE,MACjB,qBAAqB,EAAE,EAAE,MACzB,YACA,kBACA,gBACA,iBACA,kBACA,cACA,gBACA,aACA,mBACA,qBACA,2BACA,yBACA,0BACA,2BACA,uBACA,wBACA,yBACA,sBACA,oBACA,sBACA,qBACA,oBACF,CAEA,WACE,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,aACA,aACA,kBACA,6BAA6B,UAC7B,8BACA,6BACA,4BACA,eACA,oBACA,sBACA,uBACA,wBACA,kBACA,wBAAwB,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CACA,CAAC,YACC,YAAa,GACf,CACA,CAAC,cACC,YAAa,GACf,CACA,CAAC,gBACC,YAAa,KACf,CACA,CAAC,WACC,mBAAmB,EACnB,MAAO,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,iBAAiB,EAAE,GAC5C,CACA,CAAC,cACC,mBAAmB,EACnB,MAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,iBAAiB,EAAE,GAClD,CACA,CAAC,WACC,mBAAmB,EACnB,MAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,iBAAiB,EAAE,GAClD,CACA,CAAC,WACC,aAAa,EAAE,KAAK,KAAK,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE,KAC3C,qBAAqB,EAAE,KAAK,KAAK,MAAM,IAAI,mBAC3C,WAAY,IAAI,uBAAuB,EAAE,EAAE,EAAE,MAAM,CAAE,IAAI,gBAAgB,EAAE,EAAE,EAAE,MAAM,CAAE,IAAI,YAC7F,CACA,CAAC,eACC,oBAAqB,IACrB,2BAA4B,aAAa,EAAG,CAAE,CAAC,CAAE,EAAG,CAAE,GACtD,oBAAqB,IACvB,CACA,CAAC,qBAAqB,OACpB,OAAQ,OACV,CACA,CAAC,iBAAiB,OAChB,QAAS,EACX","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/styles/index.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\r\n.fixed {\n position: fixed;\n}\r\n.mb-3 {\n margin-bottom: 0.75rem;\n}\r\n.mb-4 {\n margin-bottom: 1rem;\n}\r\n.mb-8 {\n margin-bottom: 2rem;\n}\r\n.flex {\n display: flex;\n}\r\n.inline-flex {\n display: inline-flex;\n}\r\n.h-10 {\n height: 2.5rem;\n}\r\n.min-h-screen {\n min-height: 100vh;\n}\r\n.w-full {\n width: 100%;\n}\r\n.max-w-lg {\n max-width: 32rem;\n}\r\n.flex-row {\n flex-direction: row;\n}\r\n.flex-col {\n flex-direction: column;\n}\r\n.items-center {\n align-items: center;\n}\r\n.justify-center {\n justify-content: center;\n}\r\n.justify-between {\n justify-content: space-between;\n}\r\n.gap-3 {\n gap: 0.75rem;\n}\r\n.gap-4 {\n gap: 1rem;\n}\r\n.rounded-2xl {\n border-radius: 1rem;\n}\r\n.rounded-lg {\n border-radius: 0.5rem;\n}\r\n.border {\n border-width: 1px;\n}\r\n.border-gray-800 {\n --tw-border-opacity: 1;\n border-color: rgb(31 41 55 / var(--tw-border-opacity, 1));\n}\r\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));\n}\r\n.bg-neutral-950 {\n --tw-bg-opacity: 1;\n background-color: rgb(10 10 10 / var(--tw-bg-opacity, 1));\n}\r\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\r\n.p-10 {\n padding: 2.5rem;\n}\r\n.p-4 {\n padding: 1rem;\n}\r\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\r\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\r\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\r\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\r\n.py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\r\n.pt-\\[54px\\] {\n padding-top: 54px;\n}\r\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\r\n.text-6xl {\n font-size: 3.75rem;\n line-height: 1;\n}\r\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\r\n.font-bold {\n font-weight: 700;\n}\r\n.font-medium {\n font-weight: 500;\n}\r\n.font-semibold {\n font-weight: 600;\n}\r\n.leading-relaxed {\n line-height: 1.625;\n}\r\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity, 1));\n}\r\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity, 1));\n}\r\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\r\n.shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\r\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\r\n.hover\\:cursor-pointer:hover {\n cursor: pointer;\n}\r\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}"],"mappings":"AAAA,EAAG,QAAU,OACX,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,aACA,aACA,kBACA,6BAA6B,UAC7B,8BACA,6BACA,4BACA,eACA,oBACA,sBACA,uBACA,wBACA,kBACA,wBAAwB,IACxB,wBAAwB,KACxB,iBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE,IAClC,yBAAyB,EAAE,EAAE,MAC7B,kBAAkB,EAAE,EAAE,MACtB,aAAa,EAAE,EAAE,MACjB,qBAAqB,EAAE,EAAE,MACzB,YACA,kBACA,gBACA,iBACA,kBACA,cACA,gBACA,aACA,mBACA,qBACA,2BACA,yBACA,0BACA,2BACA,uBACA,wBACA,yBACA,sBACA,oBACA,sBACA,qBACA,oBACF,CAEA,WACE,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,aACA,aACA,kBACA,6BAA6B,UAC7B,8BACA,6BACA,4BACA,eACA,oBACA,sBACA,uBACA,wBACA,kBACA,wBAAwB,IACxB,wBAAwB,KACxB,iBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE,IAClC,yBAAyB,EAAE,EAAE,MAC7B,kBAAkB,EAAE,EAAE,MACtB,aAAa,EAAE,EAAE,MACjB,qBAAqB,EAAE,EAAE,MACzB,YACA,kBACA,gBACA,iBACA,kBACA,cACA,gBACA,aACA,mBACA,qBACA,2BACA,yBACA,0BACA,2BACA,uBACA,wBACA,yBACA,sBACA,oBACA,sBACA,qBACA,oBACF,CAOA,EACA,QACA,OACE,WAAY,WACZ,aAAc,EACd,aAAc,MACd,aAAc,OAChB,CAEA,QACA,OACE,cAAc,EAChB,CAYA,KACA,MACE,YAAa,IACb,yBAA0B,KAC1B,cAAe,EACf,YAAa,EACV,SAAU,EACb,YAAa,aAAa,CAAE,SAAS,CAAE,UAAU,CAAE,mBAAmB,CAAE,gBAAgB,CAAE,eAAiB,CAAE,mBAC7G,sBAAuB,OACvB,wBAAyB,OACzB,4BAA6B,WAC/B,CAOA,KA3JA,OA4JU,EACR,YAAa,OACf,CAQA,GACE,OAAQ,EACR,MAAO,QACP,iBAAkB,GACpB,CAMA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IACvB,CACA,CAAC,qBAAqB,OACpB,OAAQ,OACV,CACA,CAAC,iBAAiB,OAChB,QAAS,EACX","names":[]}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/docs-page-renderer/DocsPageRenderer.tsx","../src/context/DocsContext.ts","../src/context/DocsProvider.tsx","../src/engine/DocsEngine.tsx","../src/hooks/useDocs.ts","../src/hooks/useCurrentDocsSection.ts","../src/utils/path.ts","../src/utils/docs.ts","../src/utils/sidebar.ts","../src/hooks/useCurrentPage.ts","../src/hooks/useScopedSidebar.ts","../src/hooks/useSidebar.ts","../src/router/generateDocsRoutes.tsx"],"names":["DocsPageRenderer","content","jsx","DocumentationPanel","DocsPageRenderer_default","DocsContext","createContext","DocsProvider","docs","basePath","children","DocsProvider_default","DocsEngine","normalizedBasePath","DocsEngine_default","useDocs","context","useContext","useCurrentDocsSection","location","useLocation","doc","normalizePath","path","normalizeRoutePath","isPage","node","findPageByPath","nodes","targetPath","parentPath","normalizedTarget","currentPath","result","resolveDocs","pages","findFirstPage","child","mapNodes","fullPath","generateSidebar","useCurrentPage","debug","pagePath","useScopedSidebar","section","useSidebar","generateDocsRoutes","element"],"mappings":"+LAQA,SAASA,CAAAA,CAAiB,CACxB,OAAA,CAAAC,CACF,CAAA,CAA0B,CACxB,OAAOC,cAAAA,CAACC,6BAAAA,CAAA,CAAmB,KAAA,CAAOF,CAAAA,CAAS,CAC7C,CAEA,IAAOG,CAAAA,CAAQJ,ECLR,IAAMK,CAAAA,CAAcC,mBAAAA,CACzB,MACF,ECCA,SAASC,CAAAA,CAAa,CAAE,IAAA,CAAAC,CAAAA,CAAM,QAAA,CAAAC,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAsB,CACrE,OACER,cAAAA,CAACG,CAAAA,CAAY,QAAA,CAAZ,CAAqB,KAAA,CAAO,CAAE,IAAA,CAAAG,CAAAA,CAAM,QAAA,CAAAC,CAAS,CAAA,CAC3C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,GAAM,CAAE,KAAAlC,CAAAA,CAAM,QAAA,CAAAC,CAAS,CAAA,CAAIM,CAAAA,EAAQ,CAE7BI,CAAAA,CAAWC,0BAAAA,EAAY,CAGvBuB,CAAAA,CAAWrB,CAAAA,CACfH,CAAAA,CAAS,QAAA,CAAS,OAAA,CAAQ,IAAI,MAAA,CAAO,IAAIV,CAAQ,CAAA,CAAE,CAAA,CAAG,EAAE,CAC1D,CAAA,CAEA,OAAIiC,CAAAA,GACF,QAAQ,GAAA,CAAI,mBAAA,CAAqBvB,CAAAA,CAAS,QAAQ,CAAA,CAClD,OAAA,CAAQ,GAAA,CAAI,UAAA,CAAYV,CAAQ,CAAA,CAChC,OAAA,CAAQ,GAAA,CAAI,UAAA,CAAYkC,CAAQ,CAAA,CAAA,CAG3BhB,CAAAA,CAAenB,CAAAA,CAAMmC,CAAQ,CACtC,CCvBO,SAASC,EAAAA,EAAmB,CACjC,IAAMC,CAAAA,CAAU3B,GAAsB,CAEtC,OAAK2B,CAAAA,CAIEL,CAAAA,CAAgB,CAACK,CAAO,CAAA,CAAG,GAAG,CAAA,CAH5B,EAIX,CCRO,SAASC,EAAAA,EAAa,CAC3B,GAAM,CAAE,IAAA,CAAAtC,CAAAA,CAAM,QAAA,CAAAC,CAAS,CAAA,CAAIM,CAAAA,EAAQ,CAEnC,OAAOyB,CAAAA,CAAgBhC,CAAAA,CAAMC,CAAQ,CACvC,CCGO,SAASsC,EAAAA,CAAmB,CACjC,SAAAtC,CAAAA,CAAW,OAAA,CACX,OAAA,CAAAuC,CACF,CAAA,CAA2C,CAGzC,OAAO,CACL,CACE,IAAA,CAAM,CAAA,EAJaxB,CAAAA,CAAmBf,CAAQ,CAIvB,CAAA,EAAA,CAAA,CACvB,OAAA,CAAAuC,CACF,CACF,CACF","file":"index.js","sourcesContent":["import React from \"react\";\n\nimport { DocumentationPanel } from \"elseware-ui\";\n\ninterface DocsPageRendererProps {\n content: string;\n}\n\nfunction DocsPageRenderer({\n content,\n}: DocsPageRendererProps) {\n return <DocumentationPanel value={content} />;\n}\n\nexport default DocsPageRenderer;","import { createContext } from \"react\";\n\nimport { DocsCategory } from \"../types\";\n\nexport interface DocsContextType {\n docs: DocsCategory[];\n basePath: string;\n}\n\nexport const DocsContext = createContext<DocsContextType | undefined>(\n undefined,\n);\n","import React from \"react\";\n\nimport { DocsContext } from \"./DocsContext\";\n\nimport { DocsCategory } from \"../types\";\n\ninterface DocsProviderProps {\n docs: DocsCategory[];\n basePath: string;\n children: React.ReactNode;\n}\n\nfunction DocsProvider({ docs, basePath, children }: DocsProviderProps) {\n return (\n <DocsContext.Provider value={{ docs, basePath }}>\n {children}\n </DocsContext.Provider>\n );\n}\n\nexport default DocsProvider;\n","import React from \"react\";\n\nimport DocsProvider from \"../context/DocsProvider\";\n\nimport { DocsCategory } from \"../types\";\n\ninterface DocsEngineProps {\n docs: DocsCategory[];\n basePath?: string;\n children: React.ReactNode;\n}\n\nfunction DocsEngine({ docs, basePath = \"/\", children }: DocsEngineProps) {\n const normalizedBasePath = basePath.startsWith(\"/\")\n ? basePath\n : `/${basePath}`;\n\n return (\n <DocsProvider docs={docs} basePath={normalizedBasePath}>\n {children}\n </DocsProvider>\n );\n}\n\nexport default DocsEngine;\n","import { useContext } from \"react\";\n\nimport { DocsContext } from \"../context\";\n\nexport function useDocs() {\n const context = useContext(DocsContext);\n\n if (!context) {\n throw new Error(\"useDocs must be used within DocsProvider\");\n }\n\n return context;\n}\n","import { useLocation } from \"react-router-dom\";\n\nimport { useDocs } from \"./useDocs\";\n\nexport function useCurrentDocsSection() {\n const { docs } = useDocs();\n\n const location = useLocation();\n\n return docs.find((doc) => location.pathname.startsWith(doc.path));\n}\n","export function normalizePath(path: string): string {\n return \"/\" + path.replace(/\\/+/g, \"/\").replace(/^\\/|\\/$/g, \"\");\n}\n\nexport function normalizeRoutePath(path: string): string {\n return path.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\");\n}\n","import { DocsNode, DocsPage } from \"../types\";\n\nimport { normalizePath } from \"./path\";\n\nexport interface ResolvedDocsPage extends DocsPage {\n id: string;\n fullPath: string;\n}\n\nexport function isPage(node: DocsNode): node is DocsPage {\n return \"content\" in node;\n}\n\nexport function findPageByPath(\n nodes: DocsNode[],\n targetPath: string,\n parentPath = \"\",\n): DocsPage | null {\n const normalizedTarget = normalizePath(targetPath);\n\n for (const node of nodes) {\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\n\n if (isPage(node)) {\n if (currentPath === normalizedTarget) {\n return node;\n }\n } else {\n const result = findPageByPath(node.children, targetPath, currentPath);\n\n if (result) {\n return result;\n }\n }\n }\n\n return null;\n}\n\nexport function resolveDocs(\n nodes: DocsNode[],\n parentPath = \"\",\n): ResolvedDocsPage[] {\n const pages: ResolvedDocsPage[] = [];\n\n nodes.forEach((node) => {\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\n\n if (isPage(node)) {\n pages.push({\n ...node,\n id: currentPath.replace(/\\//g, \"-\").replace(/^-/, \"\"),\n fullPath: currentPath,\n });\n\n return;\n }\n\n pages.push(...resolveDocs(node.children, currentPath));\n });\n\n return pages;\n}\n\nexport function findFirstPage(\n nodes: DocsNode[],\n parentPath = \"\",\n): string | null {\n for (const node of nodes) {\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\n\n if (isPage(node)) {\n return currentPath;\n }\n\n const child = findFirstPage(node.children, currentPath);\n\n if (child) {\n return child;\n }\n }\n\n return null;\n}\n","import { MenuNode } from \"elseware-ui\";\n\nimport { DocsCategory, DocsNode } from \"../types\";\n\nimport { normalizePath } from \"./path\";\n\nimport { isPage } from \"./docs\";\n\nfunction mapNodes(\n nodes: DocsNode[],\n basePath: string,\n parentPath = \"\",\n): MenuNode[] {\n return nodes.map((node) => {\n const fullPath = normalizePath(`${parentPath}/${node.path}`);\n\n if (isPage(node)) {\n return {\n type: \"item\",\n name: node.title,\n to: normalizePath(`${basePath}/${fullPath}`),\n };\n }\n\n return {\n type: \"group\",\n name: node.title,\n items: mapNodes(node.children, basePath, fullPath),\n };\n });\n}\n\nexport function generateSidebar(\n docs: DocsCategory[],\n basePath: string,\n): MenuNode[] {\n return mapNodes(docs, basePath);\n}\n","import { useLocation } from \"react-router-dom\";\n\nimport { useDocs } from \"./useDocs\";\n\nimport { findPageByPath, normalizePath } from \"../utils\";\n\ninterface UseCurrentPageProps {\n debug?: boolean;\n}\n\nexport function useCurrentPage({ debug = false }: UseCurrentPageProps = {}) {\n const { docs, basePath } = useDocs();\n\n const location = useLocation();\n\n // Remove docs base path\n const pagePath = normalizePath(\n location.pathname.replace(new RegExp(`^${basePath}`), \"\"),\n );\n\n if (debug) {\n console.log(\"location.pathname\", location.pathname);\n console.log(\"basePath\", basePath);\n console.log(\"pagePath\", pagePath);\n }\n\n return findPageByPath(docs, pagePath);\n}\n","import { generateSidebar } from \"../utils\";\n\nimport { useCurrentDocsSection } from \"./useCurrentDocsSection\";\n\nexport function useScopedSidebar() {\n const section = useCurrentDocsSection();\n\n if (!section) {\n return [];\n }\n\n return generateSidebar([section], \"/\");\n}\n","import { generateSidebar } from \"../utils\";\n\nimport { useDocs } from \"./useDocs\";\n\nexport function useSidebar() {\n const { docs, basePath } = useDocs();\n\n return generateSidebar(docs, basePath);\n}","import React from \"react\";\n\nimport { RouteObject } from \"react-router-dom\";\n\nimport { normalizeRoutePath } from \"../utils\";\n\ninterface GenerateDocsRoutesProps {\n basePath?: string;\n element: React.ReactNode;\n}\n\nexport function generateDocsRoutes({\n basePath = \"/docs\",\n element,\n}: GenerateDocsRoutesProps): RouteObject[] {\n const normalizedBase = normalizeRoutePath(basePath);\n\n return [\n {\n path: `${normalizedBase}/*`,\n element,\n },\n ];\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/docs-page-renderer/DocsPageRenderer.tsx","../src/context/DocsContext.ts","../src/context/DocsProvider.tsx","../src/engine/DocsEngine.tsx","../src/hooks/useDocs.ts","../src/hooks/useCurrentDocsSection.ts","../src/utils/path.ts","../src/utils/docs.ts","../src/utils/sidebar.ts","../src/hooks/useCurrentPage.ts","../src/hooks/useScopedSidebar.ts","../src/hooks/useSidebar.ts","../src/router/generateDocsRoutes.tsx"],"names":["DocsPageRenderer","content","jsx","DocumentationPanel","DocsPageRenderer_default","DocsContext","createContext","DocsProvider","docs","basePath","children","DocsProvider_default","DocsEngine","normalizedBasePath","DocsEngine_default","useDocs","context","useContext","useCurrentDocsSection","location","useLocation","doc","normalizePath","path","normalizeRoutePath","isPage","node","findPageByPath","nodes","targetPath","parentPath","normalizedTarget","currentPath","result","resolveDocs","pages","findFirstPage","child","mapNodes","fullPath","generateSidebar","useCurrentPage","debug","pagePath","useScopedSidebar","section","useSidebar","generateDocsRoutes","element"],"mappings":"+LAQA,SAASA,CAAAA,CAAiB,CACxB,OAAA,CAAAC,CACF,CAAA,CAA0B,CACxB,OAAOC,cAAAA,CAACC,6BAAAA,CAAA,CAAmB,KAAA,CAAOF,CAAAA,CAAS,CAC7C,CAEA,IAAOG,CAAAA,CAAQJ,ECLR,IAAMK,CAAAA,CAAcC,mBAAAA,CACzB,MACF,ECCA,SAASC,CAAAA,CAAa,CAAE,IAAA,CAAAC,CAAAA,CAAM,QAAA,CAAAC,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAsB,CACrE,OACER,cAAAA,CAACG,CAAAA,CAAY,QAAA,CAAZ,CAAqB,KAAA,CAAO,CAAE,IAAA,CAAAG,CAAAA,CAAM,QAAA,CAAAC,CAAS,CAAA,CAC3C,QAAA,CAAAC,CAAAA,CACH,CAEJ,CAEA,IAAOC,CAAAA,CAAQJ,CAAAA,CCRf,SAASK,CAAAA,CAAW,CAAE,IAAA,CAAAJ,CAAAA,CAAM,QAAA,CAAAC,CAAAA,CAAW,GAAA,CAAK,QAAA,CAAAC,CAAS,CAAA,CAAoB,CACvE,IAAMG,CAAAA,CAAqBJ,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CAC9CA,CAAAA,CACA,CAAA,CAAA,EAAIA,CAAQ,CAAA,CAAA,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AAqBvB,CAAAA,CAAS,QAAQ,CAAA,CAClD,OAAA,CAAQ,GAAA,CAAI,UAAA,CAAYV,CAAQ,CAAA,CAChC,OAAA,CAAQ,GAAA,CAAI,UAAA,CAAYkC,CAAQ,CAAA,CAAA,CAG3BhB,CAAAA,CAAenB,CAAAA,CAAMmC,CAAQ,CACtC,CCvBO,SAASC,EAAAA,EAAmB,CACjC,IAAMC,CAAAA,CAAU3B,GAAsB,CAEtC,OAAK2B,CAAAA,CAIEL,CAAAA,CAAgB,CAACK,CAAO,CAAA,CAAG,GAAG,CAAA,CAH5B,EAIX,CCRO,SAASC,EAAAA,EAAa,CAC3B,GAAM,CAAE,IAAA,CAAAtC,CAAAA,CAAM,QAAA,CAAAC,CAAS,CAAA,CAAIM,CAAAA,EAAQ,CAEnC,OAAOyB,CAAAA,CAAgBhC,CAAAA,CAAMC,CAAQ,CACvC,CCGO,SAASsC,EAAAA,CAAmB,CACjC,SAAAtC,CAAAA,CAAW,OAAA,CACX,OAAA,CAAAuC,CACF,CAAA,CAA2C,CAGzC,OAAO,CACL,CACE,IAAA,CAAM,CAAA,EAJaxB,CAAAA,CAAmBf,CAAQ,CAIvB,CAAA,EAAA,CAAA,CACvB,OAAA,CAAAuC,CACF,CACF,CACF","file":"index.js","sourcesContent":["import React from \"react\";\r\n\r\nimport { DocumentationPanel } from \"elseware-ui\";\r\n\r\ninterface DocsPageRendererProps {\r\n content: string;\r\n}\r\n\r\nfunction DocsPageRenderer({\r\n content,\r\n}: DocsPageRendererProps) {\r\n return <DocumentationPanel value={content} />;\r\n}\r\n\r\nexport default DocsPageRenderer;","import { createContext } from \"react\";\r\n\r\nimport { DocsCategory } from \"../types\";\r\n\r\nexport interface DocsContextType {\r\n docs: DocsCategory[];\r\n basePath: string;\r\n}\r\n\r\nexport const DocsContext = createContext<DocsContextType | undefined>(\r\n undefined,\r\n);\r\n","import React from \"react\";\r\n\r\nimport { DocsContext } from \"./DocsContext\";\r\n\r\nimport { DocsCategory } from \"../types\";\r\n\r\ninterface DocsProviderProps {\r\n docs: DocsCategory[];\r\n basePath: string;\r\n children: React.ReactNode;\r\n}\r\n\r\nfunction DocsProvider({ docs, basePath, children }: DocsProviderProps) {\r\n return (\r\n <DocsContext.Provider value={{ docs, basePath }}>\r\n {children}\r\n </DocsContext.Provider>\r\n );\r\n}\r\n\r\nexport default DocsProvider;\r\n","import React from \"react\";\r\n\r\nimport DocsProvider from \"../context/DocsProvider\";\r\n\r\nimport { DocsCategory } from \"../types\";\r\n\r\ninterface DocsEngineProps {\r\n docs: DocsCategory[];\r\n basePath?: string;\r\n children: React.ReactNode;\r\n}\r\n\r\nfunction DocsEngine({ docs, basePath = \"/\", children }: DocsEngineProps) {\r\n const normalizedBasePath = basePath.startsWith(\"/\")\r\n ? basePath\r\n : `/${basePath}`;\r\n\r\n return (\r\n <DocsProvider docs={docs} basePath={normalizedBasePath}>\r\n {children}\r\n </DocsProvider>\r\n );\r\n}\r\n\r\nexport default DocsEngine;\r\n","import { useContext } from \"react\";\r\n\r\nimport { DocsContext } from \"../context\";\r\n\r\nexport function useDocs() {\r\n const context = useContext(DocsContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useDocs must be used within DocsProvider\");\r\n }\r\n\r\n return context;\r\n}\r\n","import { useLocation } from \"react-router-dom\";\r\n\r\nimport { useDocs } from \"./useDocs\";\r\n\r\nexport function useCurrentDocsSection() {\r\n const { docs } = useDocs();\r\n\r\n const location = useLocation();\r\n\r\n return docs.find((doc) => location.pathname.startsWith(doc.path));\r\n}\r\n","export function normalizePath(path: string): string {\r\n return \"/\" + path.replace(/\\/+/g, \"/\").replace(/^\\/|\\/$/g, \"\");\r\n}\r\n\r\nexport function normalizeRoutePath(path: string): string {\r\n return path.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\");\r\n}\r\n","import { DocsNode, DocsPage } from \"../types\";\r\n\r\nimport { normalizePath } from \"./path\";\r\n\r\nexport interface ResolvedDocsPage extends DocsPage {\r\n id: string;\r\n fullPath: string;\r\n}\r\n\r\nexport function isPage(node: DocsNode): node is DocsPage {\r\n return \"content\" in node;\r\n}\r\n\r\nexport function findPageByPath(\r\n nodes: DocsNode[],\r\n targetPath: string,\r\n parentPath = \"\",\r\n): DocsPage | null {\r\n const normalizedTarget = normalizePath(targetPath);\r\n\r\n for (const node of nodes) {\r\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\r\n\r\n if (isPage(node)) {\r\n if (currentPath === normalizedTarget) {\r\n return node;\r\n }\r\n } else {\r\n const result = findPageByPath(node.children, targetPath, currentPath);\r\n\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function resolveDocs(\r\n nodes: DocsNode[],\r\n parentPath = \"\",\r\n): ResolvedDocsPage[] {\r\n const pages: ResolvedDocsPage[] = [];\r\n\r\n nodes.forEach((node) => {\r\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\r\n\r\n if (isPage(node)) {\r\n pages.push({\r\n ...node,\r\n id: currentPath.replace(/\\//g, \"-\").replace(/^-/, \"\"),\r\n fullPath: currentPath,\r\n });\r\n\r\n return;\r\n }\r\n\r\n pages.push(...resolveDocs(node.children, currentPath));\r\n });\r\n\r\n return pages;\r\n}\r\n\r\nexport function findFirstPage(\r\n nodes: DocsNode[],\r\n parentPath = \"\",\r\n): string | null {\r\n for (const node of nodes) {\r\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\r\n\r\n if (isPage(node)) {\r\n return currentPath;\r\n }\r\n\r\n const child = findFirstPage(node.children, currentPath);\r\n\r\n if (child) {\r\n return child;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n","import { MenuNode } from \"elseware-ui\";\r\n\r\nimport { DocsCategory, DocsNode } from \"../types\";\r\n\r\nimport { normalizePath } from \"./path\";\r\n\r\nimport { isPage } from \"./docs\";\r\n\r\nfunction mapNodes(\r\n nodes: DocsNode[],\r\n basePath: string,\r\n parentPath = \"\",\r\n): MenuNode[] {\r\n return nodes.map((node) => {\r\n const fullPath = normalizePath(`${parentPath}/${node.path}`);\r\n\r\n if (isPage(node)) {\r\n return {\r\n type: \"item\",\r\n name: node.title,\r\n to: normalizePath(`${basePath}/${fullPath}`),\r\n };\r\n }\r\n\r\n return {\r\n type: \"group\",\r\n name: node.title,\r\n items: mapNodes(node.children, basePath, fullPath),\r\n };\r\n });\r\n}\r\n\r\nexport function generateSidebar(\r\n docs: DocsCategory[],\r\n basePath: string,\r\n): MenuNode[] {\r\n return mapNodes(docs, basePath);\r\n}\r\n","import { useLocation } from \"react-router-dom\";\r\n\r\nimport { useDocs } from \"./useDocs\";\r\n\r\nimport { findPageByPath, normalizePath } from \"../utils\";\r\n\r\ninterface UseCurrentPageProps {\r\n debug?: boolean;\r\n}\r\n\r\nexport function useCurrentPage({ debug = false }: UseCurrentPageProps = {}) {\r\n const { docs, basePath } = useDocs();\r\n\r\n const location = useLocation();\r\n\r\n // Remove docs base path\r\n const pagePath = normalizePath(\r\n location.pathname.replace(new RegExp(`^${basePath}`), \"\"),\r\n );\r\n\r\n if (debug) {\r\n console.log(\"location.pathname\", location.pathname);\r\n console.log(\"basePath\", basePath);\r\n console.log(\"pagePath\", pagePath);\r\n }\r\n\r\n return findPageByPath(docs, pagePath);\r\n}\r\n","import { generateSidebar } from \"../utils\";\r\n\r\nimport { useCurrentDocsSection } from \"./useCurrentDocsSection\";\r\n\r\nexport function useScopedSidebar() {\r\n const section = useCurrentDocsSection();\r\n\r\n if (!section) {\r\n return [];\r\n }\r\n\r\n return generateSidebar([section], \"/\");\r\n}\r\n","import { generateSidebar } from \"../utils\";\r\n\r\nimport { useDocs } from \"./useDocs\";\r\n\r\nexport function useSidebar() {\r\n const { docs, basePath } = useDocs();\r\n\r\n return generateSidebar(docs, basePath);\r\n}","import React from \"react\";\r\n\r\nimport { RouteObject } from \"react-router-dom\";\r\n\r\nimport { normalizeRoutePath } from \"../utils\";\r\n\r\ninterface GenerateDocsRoutesProps {\r\n basePath?: string;\r\n element: React.ReactNode;\r\n}\r\n\r\nexport function generateDocsRoutes({\r\n basePath = \"/docs\",\r\n element,\r\n}: GenerateDocsRoutesProps): RouteObject[] {\r\n const normalizedBase = normalizeRoutePath(basePath);\r\n\r\n return [\r\n {\r\n path: `${normalizedBase}/*`,\r\n element,\r\n },\r\n ];\r\n}\r\n"]}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/docs-page-renderer/DocsPageRenderer.tsx","../src/context/DocsContext.ts","../src/context/DocsProvider.tsx","../src/engine/DocsEngine.tsx","../src/hooks/useDocs.ts","../src/hooks/useCurrentDocsSection.ts","../src/utils/path.ts","../src/utils/docs.ts","../src/utils/sidebar.ts","../src/hooks/useCurrentPage.ts","../src/hooks/useScopedSidebar.ts","../src/hooks/useSidebar.ts","../src/router/generateDocsRoutes.tsx"],"names":["DocsPageRenderer","content","jsx","DocumentationPanel","DocsPageRenderer_default","DocsContext","createContext","DocsProvider","docs","basePath","children","DocsProvider_default","DocsEngine","normalizedBasePath","DocsEngine_default","useDocs","context","useContext","useCurrentDocsSection","location","useLocation","doc","normalizePath","path","normalizeRoutePath","isPage","node","findPageByPath","nodes","targetPath","parentPath","normalizedTarget","currentPath","result","resolveDocs","pages","findFirstPage","child","mapNodes","fullPath","generateSidebar","useCurrentPage","debug","pagePath","useScopedSidebar","section","useSidebar","generateDocsRoutes","element"],"mappings":"wMAQA,SAASA,CAAAA,CAAiB,CACxB,OAAA,CAAAC,CACF,CAAA,CAA0B,CACxB,OAAOC,GAAAA,CAACC,kBAAAA,CAAA,CAAmB,KAAA,CAAOF,CAAAA,CAAS,CAC7C,CAEA,IAAOG,CAAAA,CAAQJ,ECLR,IAAMK,CAAAA,CAAcC,aAAAA,CACzB,MACF,ECCA,SAASC,CAAAA,CAAa,CAAE,IAAA,CAAAC,CAAAA,CAAM,QAAA,CAAAC,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAsB,CACrE,OACER,GAAAA,CAACG,C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from \"react\";\n\nimport { DocumentationPanel } from \"elseware-ui\";\n\ninterface DocsPageRendererProps {\n content: string;\n}\n\nfunction DocsPageRenderer({\n content,\n}: DocsPageRendererProps) {\n return <DocumentationPanel value={content} />;\n}\n\nexport default DocsPageRenderer;","import { createContext } from \"react\";\n\nimport { DocsCategory } from \"../types\";\n\nexport interface DocsContextType {\n docs: DocsCategory[];\n basePath: string;\n}\n\nexport const DocsContext = createContext<DocsContextType | undefined>(\n undefined,\n);\n","import React from \"react\";\n\nimport { DocsContext } from \"./DocsContext\";\n\nimport { DocsCategory } from \"../types\";\n\ninterface DocsProviderProps {\n docs: DocsCategory[];\n basePath: string;\n children: React.ReactNode;\n}\n\nfunction DocsProvider({ docs, basePath, children }: DocsProviderProps) {\n return (\n <DocsContext.Provider value={{ docs, basePath }}>\n {children}\n </DocsContext.Provider>\n );\n}\n\nexport default DocsProvider;\n","import React from \"react\";\n\nimport DocsProvider from \"../context/DocsProvider\";\n\nimport { DocsCategory } from \"../types\";\n\ninterface DocsEngineProps {\n docs: DocsCategory[];\n basePath?: string;\n children: React.ReactNode;\n}\n\nfunction DocsEngine({ docs, basePath = \"/\", children }: DocsEngineProps) {\n const normalizedBasePath = basePath.startsWith(\"/\")\n ? basePath\n : `/${basePath}`;\n\n return (\n <DocsProvider docs={docs} basePath={normalizedBasePath}>\n {children}\n </DocsProvider>\n );\n}\n\nexport default DocsEngine;\n","import { useContext } from \"react\";\n\nimport { DocsContext } from \"../context\";\n\nexport function useDocs() {\n const context = useContext(DocsContext);\n\n if (!context) {\n throw new Error(\"useDocs must be used within DocsProvider\");\n }\n\n return context;\n}\n","import { useLocation } from \"react-router-dom\";\n\nimport { useDocs } from \"./useDocs\";\n\nexport function useCurrentDocsSection() {\n const { docs } = useDocs();\n\n const location = useLocation();\n\n return docs.find((doc) => location.pathname.startsWith(doc.path));\n}\n","export function normalizePath(path: string): string {\n return \"/\" + path.replace(/\\/+/g, \"/\").replace(/^\\/|\\/$/g, \"\");\n}\n\nexport function normalizeRoutePath(path: string): string {\n return path.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\");\n}\n","import { DocsNode, DocsPage } from \"../types\";\n\nimport { normalizePath } from \"./path\";\n\nexport interface ResolvedDocsPage extends DocsPage {\n id: string;\n fullPath: string;\n}\n\nexport function isPage(node: DocsNode): node is DocsPage {\n return \"content\" in node;\n}\n\nexport function findPageByPath(\n nodes: DocsNode[],\n targetPath: string,\n parentPath = \"\",\n): DocsPage | null {\n const normalizedTarget = normalizePath(targetPath);\n\n for (const node of nodes) {\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\n\n if (isPage(node)) {\n if (currentPath === normalizedTarget) {\n return node;\n }\n } else {\n const result = findPageByPath(node.children, targetPath, currentPath);\n\n if (result) {\n return result;\n }\n }\n }\n\n return null;\n}\n\nexport function resolveDocs(\n nodes: DocsNode[],\n parentPath = \"\",\n): ResolvedDocsPage[] {\n const pages: ResolvedDocsPage[] = [];\n\n nodes.forEach((node) => {\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\n\n if (isPage(node)) {\n pages.push({\n ...node,\n id: currentPath.replace(/\\//g, \"-\").replace(/^-/, \"\"),\n fullPath: currentPath,\n });\n\n return;\n }\n\n pages.push(...resolveDocs(node.children, currentPath));\n });\n\n return pages;\n}\n\nexport function findFirstPage(\n nodes: DocsNode[],\n parentPath = \"\",\n): string | null {\n for (const node of nodes) {\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\n\n if (isPage(node)) {\n return currentPath;\n }\n\n const child = findFirstPage(node.children, currentPath);\n\n if (child) {\n return child;\n }\n }\n\n return null;\n}\n","import { MenuNode } from \"elseware-ui\";\n\nimport { DocsCategory, DocsNode } from \"../types\";\n\nimport { normalizePath } from \"./path\";\n\nimport { isPage } from \"./docs\";\n\nfunction mapNodes(\n nodes: DocsNode[],\n basePath: string,\n parentPath = \"\",\n): MenuNode[] {\n return nodes.map((node) => {\n const fullPath = normalizePath(`${parentPath}/${node.path}`);\n\n if (isPage(node)) {\n return {\n type: \"item\",\n name: node.title,\n to: normalizePath(`${basePath}/${fullPath}`),\n };\n }\n\n return {\n type: \"group\",\n name: node.title,\n items: mapNodes(node.children, basePath, fullPath),\n };\n });\n}\n\nexport function generateSidebar(\n docs: DocsCategory[],\n basePath: string,\n): MenuNode[] {\n return mapNodes(docs, basePath);\n}\n","import { useLocation } from \"react-router-dom\";\n\nimport { useDocs } from \"./useDocs\";\n\nimport { findPageByPath, normalizePath } from \"../utils\";\n\ninterface UseCurrentPageProps {\n debug?: boolean;\n}\n\nexport function useCurrentPage({ debug = false }: UseCurrentPageProps = {}) {\n const { docs, basePath } = useDocs();\n\n const location = useLocation();\n\n // Remove docs base path\n const pagePath = normalizePath(\n location.pathname.replace(new RegExp(`^${basePath}`), \"\"),\n );\n\n if (debug) {\n console.log(\"location.pathname\", location.pathname);\n console.log(\"basePath\", basePath);\n console.log(\"pagePath\", pagePath);\n }\n\n return findPageByPath(docs, pagePath);\n}\n","import { generateSidebar } from \"../utils\";\n\nimport { useCurrentDocsSection } from \"./useCurrentDocsSection\";\n\nexport function useScopedSidebar() {\n const section = useCurrentDocsSection();\n\n if (!section) {\n return [];\n }\n\n return generateSidebar([section], \"/\");\n}\n","import { generateSidebar } from \"../utils\";\n\nimport { useDocs } from \"./useDocs\";\n\nexport function useSidebar() {\n const { docs, basePath } = useDocs();\n\n return generateSidebar(docs, basePath);\n}","import React from \"react\";\n\nimport { RouteObject } from \"react-router-dom\";\n\nimport { normalizeRoutePath } from \"../utils\";\n\ninterface GenerateDocsRoutesProps {\n basePath?: string;\n element: React.ReactNode;\n}\n\nexport function generateDocsRoutes({\n basePath = \"/docs\",\n element,\n}: GenerateDocsRoutesProps): RouteObject[] {\n const normalizedBase = normalizeRoutePath(basePath);\n\n return [\n {\n path: `${normalizedBase}/*`,\n element,\n },\n ];\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/docs-page-renderer/DocsPageRenderer.tsx","../src/context/DocsContext.ts","../src/context/DocsProvider.tsx","../src/engine/DocsEngine.tsx","../src/hooks/useDocs.ts","../src/hooks/useCurrentDocsSection.ts","../src/utils/path.ts","../src/utils/docs.ts","../src/utils/sidebar.ts","../src/hooks/useCurrentPage.ts","../src/hooks/useScopedSidebar.ts","../src/hooks/useSidebar.ts","../src/router/generateDocsRoutes.tsx"],"names":["DocsPageRenderer","content","jsx","DocumentationPanel","DocsPageRenderer_default","DocsContext","createContext","DocsProvider","docs","basePath","children","DocsProvider_default","DocsEngine","normalizedBasePath","DocsEngine_default","useDocs","context","useContext","useCurrentDocsSection","location","useLocation","doc","normalizePath","path","normalizeRoutePath","isPage","node","findPageByPath","nodes","targetPath","parentPath","normalizedTarget","currentPath","result","resolveDocs","pages","findFirstPage","child","mapNodes","fullPath","generateSidebar","useCurrentPage","debug","pagePath","useScopedSidebar","section","useSidebar","generateDocsRoutes","element"],"mappings":"wMAQA,SAASA,CAAAA,CAAiB,CACxB,OAAA,CAAAC,CACF,CAAA,CAA0B,CACxB,OAAOC,GAAAA,CAACC,kBAAAA,CAAA,CAAmB,KAAA,CAAOF,CAAAA,CAAS,CAC7C,CAEA,IAAOG,CAAAA,CAAQJ,ECLR,IAAMK,CAAAA,CAAcC,aAAAA,CACzB,MACF,ECCA,SAASC,CAAAA,CAAa,CAAE,IAAA,CAAAC,CAAAA,CAAM,QAAA,CAAAC,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAsB,CACrE,OACER,GAAAA,CAACG,CAAAA,CAAY,QAAA,CAAZ,CAAqB,KAAA,CAAO,CAAE,IAAA,CAAAG,CAAAA,CAAM,QAAA,CAAAC,CAAS,CAAA,CAC3C,QAAA,CAAAC,CAAAA,CACH,CAEJ,CAEA,IAAOC,CAAAA,CAAQJ,CAAAA,CCRf,SAASK,CAAAA,CAAW,CAAE,IAAA,CAAAJ,CAAAA,CAAM,QAAA,CAAAC,CAAAA,CAAW,GAAA,CAAK,QAAA,CAAAC,CAAS,CAAA,CAAoB,CACvE,IAAMG,CAAAA,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AQ,CAAA,CAAE,CAAA,CAAG,EAAE,CAC1D,CAAA,CAEA,OAAIiC,CAAAA,GACF,QAAQ,GAAA,CAAI,mBAAA,CAAqBvB,CAAAA,CAAS,QAAQ,CAAA,CAClD,OAAA,CAAQ,GAAA,CAAI,UAAA,CAAYV,CAAQ,CAAA,CAChC,OAAA,CAAQ,GAAA,CAAI,UAAA,CAAYkC,CAAQ,CAAA,CAAA,CAG3BhB,CAAAA,CAAenB,CAAAA,CAAMmC,CAAQ,CACtC,CCvBO,SAASC,EAAAA,EAAmB,CACjC,IAAMC,CAAAA,CAAU3B,GAAsB,CAEtC,OAAK2B,CAAAA,CAIEL,CAAAA,CAAgB,CAACK,CAAO,CAAA,CAAG,GAAG,CAAA,CAH5B,EAIX,CCRO,SAASC,EAAAA,EAAa,CAC3B,GAAM,CAAE,IAAA,CAAAtC,CAAAA,CAAM,QAAA,CAAAC,CAAS,CAAA,CAAIM,CAAAA,EAAQ,CAEnC,OAAOyB,CAAAA,CAAgBhC,CAAAA,CAAMC,CAAQ,CACvC,CCGO,SAASsC,EAAAA,CAAmB,CACjC,SAAAtC,CAAAA,CAAW,OAAA,CACX,OAAA,CAAAuC,CACF,CAAA,CAA2C,CAGzC,OAAO,CACL,CACE,IAAA,CAAM,CAAA,EAJaxB,CAAAA,CAAmBf,CAAQ,CAIvB,CAAA,EAAA,CAAA,CACvB,OAAA,CAAAuC,CACF,CACF,CACF","file":"index.mjs","sourcesContent":["import React from \"react\";\r\n\r\nimport { DocumentationPanel } from \"elseware-ui\";\r\n\r\ninterface DocsPageRendererProps {\r\n content: string;\r\n}\r\n\r\nfunction DocsPageRenderer({\r\n content,\r\n}: DocsPageRendererProps) {\r\n return <DocumentationPanel value={content} />;\r\n}\r\n\r\nexport default DocsPageRenderer;","import { createContext } from \"react\";\r\n\r\nimport { DocsCategory } from \"../types\";\r\n\r\nexport interface DocsContextType {\r\n docs: DocsCategory[];\r\n basePath: string;\r\n}\r\n\r\nexport const DocsContext = createContext<DocsContextType | undefined>(\r\n undefined,\r\n);\r\n","import React from \"react\";\r\n\r\nimport { DocsContext } from \"./DocsContext\";\r\n\r\nimport { DocsCategory } from \"../types\";\r\n\r\ninterface DocsProviderProps {\r\n docs: DocsCategory[];\r\n basePath: string;\r\n children: React.ReactNode;\r\n}\r\n\r\nfunction DocsProvider({ docs, basePath, children }: DocsProviderProps) {\r\n return (\r\n <DocsContext.Provider value={{ docs, basePath }}>\r\n {children}\r\n </DocsContext.Provider>\r\n );\r\n}\r\n\r\nexport default DocsProvider;\r\n","import React from \"react\";\r\n\r\nimport DocsProvider from \"../context/DocsProvider\";\r\n\r\nimport { DocsCategory } from \"../types\";\r\n\r\ninterface DocsEngineProps {\r\n docs: DocsCategory[];\r\n basePath?: string;\r\n children: React.ReactNode;\r\n}\r\n\r\nfunction DocsEngine({ docs, basePath = \"/\", children }: DocsEngineProps) {\r\n const normalizedBasePath = basePath.startsWith(\"/\")\r\n ? basePath\r\n : `/${basePath}`;\r\n\r\n return (\r\n <DocsProvider docs={docs} basePath={normalizedBasePath}>\r\n {children}\r\n </DocsProvider>\r\n );\r\n}\r\n\r\nexport default DocsEngine;\r\n","import { useContext } from \"react\";\r\n\r\nimport { DocsContext } from \"../context\";\r\n\r\nexport function useDocs() {\r\n const context = useContext(DocsContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useDocs must be used within DocsProvider\");\r\n }\r\n\r\n return context;\r\n}\r\n","import { useLocation } from \"react-router-dom\";\r\n\r\nimport { useDocs } from \"./useDocs\";\r\n\r\nexport function useCurrentDocsSection() {\r\n const { docs } = useDocs();\r\n\r\n const location = useLocation();\r\n\r\n return docs.find((doc) => location.pathname.startsWith(doc.path));\r\n}\r\n","export function normalizePath(path: string): string {\r\n return \"/\" + path.replace(/\\/+/g, \"/\").replace(/^\\/|\\/$/g, \"\");\r\n}\r\n\r\nexport function normalizeRoutePath(path: string): string {\r\n return path.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\");\r\n}\r\n","import { DocsNode, DocsPage } from \"../types\";\r\n\r\nimport { normalizePath } from \"./path\";\r\n\r\nexport interface ResolvedDocsPage extends DocsPage {\r\n id: string;\r\n fullPath: string;\r\n}\r\n\r\nexport function isPage(node: DocsNode): node is DocsPage {\r\n return \"content\" in node;\r\n}\r\n\r\nexport function findPageByPath(\r\n nodes: DocsNode[],\r\n targetPath: string,\r\n parentPath = \"\",\r\n): DocsPage | null {\r\n const normalizedTarget = normalizePath(targetPath);\r\n\r\n for (const node of nodes) {\r\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\r\n\r\n if (isPage(node)) {\r\n if (currentPath === normalizedTarget) {\r\n return node;\r\n }\r\n } else {\r\n const result = findPageByPath(node.children, targetPath, currentPath);\r\n\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function resolveDocs(\r\n nodes: DocsNode[],\r\n parentPath = \"\",\r\n): ResolvedDocsPage[] {\r\n const pages: ResolvedDocsPage[] = [];\r\n\r\n nodes.forEach((node) => {\r\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\r\n\r\n if (isPage(node)) {\r\n pages.push({\r\n ...node,\r\n id: currentPath.replace(/\\//g, \"-\").replace(/^-/, \"\"),\r\n fullPath: currentPath,\r\n });\r\n\r\n return;\r\n }\r\n\r\n pages.push(...resolveDocs(node.children, currentPath));\r\n });\r\n\r\n return pages;\r\n}\r\n\r\nexport function findFirstPage(\r\n nodes: DocsNode[],\r\n parentPath = \"\",\r\n): string | null {\r\n for (const node of nodes) {\r\n const currentPath = normalizePath(`${parentPath}/${node.path}`);\r\n\r\n if (isPage(node)) {\r\n return currentPath;\r\n }\r\n\r\n const child = findFirstPage(node.children, currentPath);\r\n\r\n if (child) {\r\n return child;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n","import { MenuNode } from \"elseware-ui\";\r\n\r\nimport { DocsCategory, DocsNode } from \"../types\";\r\n\r\nimport { normalizePath } from \"./path\";\r\n\r\nimport { isPage } from \"./docs\";\r\n\r\nfunction mapNodes(\r\n nodes: DocsNode[],\r\n basePath: string,\r\n parentPath = \"\",\r\n): MenuNode[] {\r\n return nodes.map((node) => {\r\n const fullPath = normalizePath(`${parentPath}/${node.path}`);\r\n\r\n if (isPage(node)) {\r\n return {\r\n type: \"item\",\r\n name: node.title,\r\n to: normalizePath(`${basePath}/${fullPath}`),\r\n };\r\n }\r\n\r\n return {\r\n type: \"group\",\r\n name: node.title,\r\n items: mapNodes(node.children, basePath, fullPath),\r\n };\r\n });\r\n}\r\n\r\nexport function generateSidebar(\r\n docs: DocsCategory[],\r\n basePath: string,\r\n): MenuNode[] {\r\n return mapNodes(docs, basePath);\r\n}\r\n","import { useLocation } from \"react-router-dom\";\r\n\r\nimport { useDocs } from \"./useDocs\";\r\n\r\nimport { findPageByPath, normalizePath } from \"../utils\";\r\n\r\ninterface UseCurrentPageProps {\r\n debug?: boolean;\r\n}\r\n\r\nexport function useCurrentPage({ debug = false }: UseCurrentPageProps = {}) {\r\n const { docs, basePath } = useDocs();\r\n\r\n const location = useLocation();\r\n\r\n // Remove docs base path\r\n const pagePath = normalizePath(\r\n location.pathname.replace(new RegExp(`^${basePath}`), \"\"),\r\n );\r\n\r\n if (debug) {\r\n console.log(\"location.pathname\", location.pathname);\r\n console.log(\"basePath\", basePath);\r\n console.log(\"pagePath\", pagePath);\r\n }\r\n\r\n return findPageByPath(docs, pagePath);\r\n}\r\n","import { generateSidebar } from \"../utils\";\r\n\r\nimport { useCurrentDocsSection } from \"./useCurrentDocsSection\";\r\n\r\nexport function useScopedSidebar() {\r\n const section = useCurrentDocsSection();\r\n\r\n if (!section) {\r\n return [];\r\n }\r\n\r\n return generateSidebar([section], \"/\");\r\n}\r\n","import { generateSidebar } from \"../utils\";\r\n\r\nimport { useDocs } from \"./useDocs\";\r\n\r\nexport function useSidebar() {\r\n const { docs, basePath } = useDocs();\r\n\r\n return generateSidebar(docs, basePath);\r\n}","import React from \"react\";\r\n\r\nimport { RouteObject } from \"react-router-dom\";\r\n\r\nimport { normalizeRoutePath } from \"../utils\";\r\n\r\ninterface GenerateDocsRoutesProps {\r\n basePath?: string;\r\n element: React.ReactNode;\r\n}\r\n\r\nexport function generateDocsRoutes({\r\n basePath = \"/docs\",\r\n element,\r\n}: GenerateDocsRoutesProps): RouteObject[] {\r\n const normalizedBase = normalizeRoutePath(basePath);\r\n\r\n return [\r\n {\r\n path: `${normalizedBase}/*`,\r\n element,\r\n },\r\n ];\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "elseware-docs-engine",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"private": false,
|
|
5
|
-
"description": "React documentation engine by elseware Technology",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"main": "./dist/index.js",
|
|
8
|
-
"module": "./dist/index.mjs",
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"import": "./dist/index.mjs",
|
|
16
|
-
"require": "./dist/index.js",
|
|
17
|
-
"types": "./dist/index.d.ts"
|
|
18
|
-
},
|
|
19
|
-
"./dist/index.css": "./dist/index.css"
|
|
20
|
-
},
|
|
21
|
-
"sideEffects": [
|
|
22
|
-
"*.css"
|
|
23
|
-
],
|
|
24
|
-
"keywords": [
|
|
25
|
-
"docs",
|
|
26
|
-
"documentation",
|
|
27
|
-
"react",
|
|
28
|
-
"markdown",
|
|
29
|
-
"mdx",
|
|
30
|
-
"vite"
|
|
31
|
-
],
|
|
32
|
-
"peerDependencies": {
|
|
33
|
-
"react": "^18",
|
|
34
|
-
"react-dom": "^18",
|
|
35
|
-
"react-router-dom": "^6"
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"elseware-ui": "^2.
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@tailwindcss/postcss": "^4.1.16",
|
|
42
|
-
"@types/react": "^18.2.66",
|
|
43
|
-
"@types/react-dom": "^18.2.22",
|
|
44
|
-
"@vitejs/plugin-react": "^4.2.1",
|
|
45
|
-
"autoprefixer": "^10.4.21",
|
|
46
|
-
"rimraf": "^6.1.3",
|
|
47
|
-
"tailwindcss": "^3.4.0",
|
|
48
|
-
"tsup": "^8.0.2",
|
|
49
|
-
"typescript": "^5.4.5",
|
|
50
|
-
"vite": "^5.2.0"
|
|
51
|
-
},
|
|
52
|
-
"scripts": {
|
|
53
|
-
"dev": "vite",
|
|
54
|
-
"build": "rimraf dist && tsup",
|
|
55
|
-
"typecheck": "tsc --noEmit",
|
|
56
|
-
"clean": "rimraf dist node_modules/.cache",
|
|
57
|
-
"prepublishOnly": "npm run build",
|
|
58
|
-
"release": "npm publish --access public"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "elseware-docs-engine",
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "React documentation engine by elseware Technology",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.mjs",
|
|
16
|
+
"require": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./dist/index.css": "./dist/index.css"
|
|
20
|
+
},
|
|
21
|
+
"sideEffects": [
|
|
22
|
+
"*.css"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"docs",
|
|
26
|
+
"documentation",
|
|
27
|
+
"react",
|
|
28
|
+
"markdown",
|
|
29
|
+
"mdx",
|
|
30
|
+
"vite"
|
|
31
|
+
],
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"react": "^18",
|
|
34
|
+
"react-dom": "^18",
|
|
35
|
+
"react-router-dom": "^6"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"elseware-ui": "^2.38.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@tailwindcss/postcss": "^4.1.16",
|
|
42
|
+
"@types/react": "^18.2.66",
|
|
43
|
+
"@types/react-dom": "^18.2.22",
|
|
44
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
45
|
+
"autoprefixer": "^10.4.21",
|
|
46
|
+
"rimraf": "^6.1.3",
|
|
47
|
+
"tailwindcss": "^3.4.0",
|
|
48
|
+
"tsup": "^8.0.2",
|
|
49
|
+
"typescript": "^5.4.5",
|
|
50
|
+
"vite": "^5.2.0"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"dev": "vite",
|
|
54
|
+
"build": "rimraf dist && tsup",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"clean": "rimraf dist node_modules/.cache",
|
|
57
|
+
"prepublishOnly": "npm run build",
|
|
58
|
+
"release": "npm publish --access public"
|
|
59
|
+
}
|
|
60
|
+
}
|