@r74tech/docusaurus-plugin-panzoom 2.0.0 → 2.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/CHANGELOG.md +8 -0
- package/README.md +5 -0
- package/dist/PanZoom.js +2 -2
- package/dist/PanZoomPlugin.js +1 -0
- package/dist/PanzoomPluginOptions.d.ts +7 -0
- package/docs/README.md +56 -0
- package/docs/docs/example/index.md +35 -0
- package/docs/docs/index.md +57 -0
- package/docs/docs/usage/basic.md +120 -0
- package/docs/docusaurus.config.ts +123 -0
- package/docs/package.json +48 -0
- package/docs/sidebars.ts +22 -0
- package/docs/static/img/favicon.ico +0 -0
- package/docs/static/img/logo.svg +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [2.1.0](https://github.com/r74tech/docusaurus-plugin-panzoom/compare/v2.0.0...v2.1.0) (2025-04-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add Docusaurus documentation and CI workflows ([5d0ed86](https://github.com/r74tech/docusaurus-plugin-panzoom/commit/5d0ed86e2b5447c533fb4b15c220d32f176c9528))
|
|
7
|
+
* add support for excludeClass option ([246d378](https://github.com/r74tech/docusaurus-plugin-panzoom/commit/246d378f33c4f24c5a2cde22ba55a14daa65b217))
|
|
8
|
+
|
|
1
9
|
# [2.0.0](https://github.com/r74tech/docusaurus-plugin-panzoom/compare/v1.0.1...v2.0.0) (2025-04-09)
|
|
2
10
|
|
|
3
11
|
|
package/README.md
CHANGED
|
@@ -44,6 +44,11 @@ themeConfig: {
|
|
|
44
44
|
// Default: 1000
|
|
45
45
|
timeout: 1000,
|
|
46
46
|
|
|
47
|
+
// Add this class to any element within the Panzoom element that you want to exclude from Panzoom handling.
|
|
48
|
+
// That element's children will also be excluded. e.g. links and buttons that should not propagate the click event.
|
|
49
|
+
// Default: 'panzoom-exclude'
|
|
50
|
+
excludeClass: 'panzoom-exclude',
|
|
51
|
+
|
|
47
52
|
// You can also pass any options supported by @panzoom/panzoom
|
|
48
53
|
// See: https://github.com/timmywil/panzoom for available options
|
|
49
54
|
}
|
package/dist/PanZoom.js
CHANGED
|
@@ -7,7 +7,7 @@ const panzoom_1 = __importDefault(require("@panzoom/panzoom"));
|
|
|
7
7
|
const config = require('@generated/docusaurus.config').default;
|
|
8
8
|
const { themeConfig } = config;
|
|
9
9
|
const { zoom } = themeConfig;
|
|
10
|
-
const { selectors = ['div.mermaid[data-processed="true"]', 'div.docusaurus-mermaid-container', '.drawio'], wrap = true, timeout = 1000, ...panZoomConfig } = zoom;
|
|
10
|
+
const { selectors = ['div.mermaid[data-processed="true"]', 'div.docusaurus-mermaid-container', '.drawio'], wrap = true, timeout = 1000, excludeClass = 'panzoom-exclude', ...panZoomConfig } = zoom;
|
|
11
11
|
/**
|
|
12
12
|
* Main work method to zoom the set of elements. You can pass in global options to the pan zoom component
|
|
13
13
|
* as well as control whether the items will be wrapped.
|
|
@@ -19,7 +19,7 @@ const zoomElements = (selectors) => {
|
|
|
19
19
|
foundElements.push(...document.querySelectorAll(selector));
|
|
20
20
|
});
|
|
21
21
|
foundElements.forEach((element) => {
|
|
22
|
-
const instance = (0, panzoom_1.default)(element, panZoomConfig);
|
|
22
|
+
const instance = (0, panzoom_1.default)(element, { excludeClass, ...panZoomConfig });
|
|
23
23
|
if (wrap) {
|
|
24
24
|
const wrapper = document.createElement('div');
|
|
25
25
|
wrapper.setAttribute('style', "overflow: hidden");
|
package/dist/PanZoomPlugin.js
CHANGED
|
@@ -21,4 +21,11 @@ export type PanZoomPluginOptions = PanzoomOptions & {
|
|
|
21
21
|
* The default is 1000
|
|
22
22
|
*/
|
|
23
23
|
timeout?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Add this class to any element within the Panzoom element that you want to exclude from Panzoom handling.
|
|
26
|
+
* That element's children will also be excluded. e.g. links and buttons that should not propagate the click event.
|
|
27
|
+
*
|
|
28
|
+
* default: 'panzoom-exclude'
|
|
29
|
+
*/
|
|
30
|
+
excludeClass?: string;
|
|
24
31
|
};
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Docusaurus Plugin PanZoom Documentation
|
|
2
|
+
|
|
3
|
+
This is the documentation website for the [@r74tech/docusaurus-plugin-panzoom](https://github.com/r74tech/docusaurus-plugin-panzoom) package. The site is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Node.js 20.0 or higher
|
|
10
|
+
- pnpm (recommended) or npm
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Install dependencies
|
|
16
|
+
pnpm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Local Development
|
|
20
|
+
|
|
21
|
+
To start the local development server:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Start the development server
|
|
25
|
+
pnpm start
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This command starts a local development server and opens a browser window. Most changes are reflected live without having to restart the server.
|
|
29
|
+
|
|
30
|
+
### Building the Documentation
|
|
31
|
+
|
|
32
|
+
To build the static website:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Build the static site
|
|
36
|
+
pnpm build
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This command generates static content in the `build` directory, which can be served using any static content hosting service.
|
|
40
|
+
|
|
41
|
+
## Project Structure
|
|
42
|
+
|
|
43
|
+
- `/docs` - Documentation content in Markdown format
|
|
44
|
+
- `/static` - Static assets like images and favicon
|
|
45
|
+
|
|
46
|
+
## Deployment
|
|
47
|
+
|
|
48
|
+
The documentation is automatically deployed to GitHub Pages using GitHub Actions whenever changes are pushed to the main branch.
|
|
49
|
+
|
|
50
|
+
## Contributing
|
|
51
|
+
|
|
52
|
+
Contributions to improve the documentation are welcome! Please feel free to submit a pull request.
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
This documentation is licensed under the same [MIT License](https://github.com/r74tech/docusaurus-plugin-panzoom/blob/main/LICENSE) as the main project.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
title: Examples
|
|
4
|
+
description: Examples of docusaurus-plugin-panzoom in action
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Pan and Zoom Examples
|
|
8
|
+
|
|
9
|
+
This page demonstrates the pan and zoom functionality provided by the docusaurus-plugin-panzoom plugin.
|
|
10
|
+
Try dragging to pan, using the mouse wheel to zoom, and double-clicking to reset.
|
|
11
|
+
|
|
12
|
+
## Basic Example
|
|
13
|
+
|
|
14
|
+
A simple div with the panzoom-example class:
|
|
15
|
+
|
|
16
|
+
<div className="panzoom-example">
|
|
17
|
+
Drag here, use wheel to zoom, double-click to reset
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
## Image Example
|
|
21
|
+
|
|
22
|
+
An image with pan and zoom functionality:
|
|
23
|
+
|
|
24
|
+
<div className="panzoom-example">
|
|
25
|
+
<img src="https://picsum.photos/400/300" alt="Scenic landscape" style={{ width: '100%', height: 'auto' }} />
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
## Placeholder Example
|
|
29
|
+
|
|
30
|
+
A placeholder image with pan and zoom functionality:
|
|
31
|
+
|
|
32
|
+
<div className="panzoom-example">
|
|
33
|
+
<img src="https://placeholder.pics/svg/400x300" alt="Placeholder graphic" style={{ width: '100%', height: 'auto' }} />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Introduction
|
|
6
|
+
|
|
7
|
+
**docusaurus-plugin-panzoom** is a plugin that adds pan and zoom functionality to images and SVG images in Docusaurus websites.
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Complex diagrams and charts, especially those generated with mermaid.js, can be difficult to examine in detail in a browser. This plugin allows users to drag to move (pan) and zoom in or out of diagrams for better visibility.
|
|
12
|
+
|
|
13
|
+
This plugin implements the excellent [@panzoom/panzoom](https://www.npmjs.com/package/@panzoom/panzoom) library.
|
|
14
|
+
|
|
15
|
+
## Key Features
|
|
16
|
+
|
|
17
|
+
- Adds pan and zoom functionality to images and SVG elements
|
|
18
|
+
- Works with mermaid.js generated diagrams
|
|
19
|
+
- Customizable selectors to target specific elements
|
|
20
|
+
- Option to wrap elements to contain them within their original container
|
|
21
|
+
- Wheel zoom and double-click reset functionality
|
|
22
|
+
|
|
23
|
+
## Demo
|
|
24
|
+
|
|
25
|
+
Here's an example of an element with pan and zoom functionality enabled. Try dragging to pan, using the mouse wheel to zoom, and double-clicking to reset.
|
|
26
|
+
|
|
27
|
+
<div class="panzoom-example">
|
|
28
|
+
Drag here, use wheel to zoom, double-click to reset
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install @r74tech/docusaurus-plugin-panzoom
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
// Add to docusaurus.config.js
|
|
39
|
+
// ...
|
|
40
|
+
plugins: ['@r74tech/docusaurus-plugin-panzoom'],
|
|
41
|
+
// or
|
|
42
|
+
plugins: [['@r74tech/docusaurus-plugin-panzoom', {} /* options */]],
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Next Steps
|
|
46
|
+
|
|
47
|
+
- Check out the [Basic Usage](usage/basic)
|
|
48
|
+
- See [Examples](example)
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
MIT, see [LICENSE](https://github.com/r74tech/docusaurus-plugin-panzoom/blob/main/LICENSE) for more details.
|
|
53
|
+
|
|
54
|
+
> [!NOTE]
|
|
55
|
+
> This package is a fork of [act-org/docusaurus-plugin-panzoom](https://github.com/act-org/docusaurus-plugin-panzoom) under the MIT license. It was forked because the original package was not being actively maintained.
|
|
56
|
+
>
|
|
57
|
+
> If the original package is updated and maintained again, we recommend migrating back to the original package. This fork will continue to be maintained until then.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Basic Usage
|
|
6
|
+
|
|
7
|
+
This page explains the basic usage of docusaurus-plugin-panzoom.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
First, install the plugin using npm:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @r74tech/docusaurus-plugin-panzoom
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Configuration
|
|
18
|
+
|
|
19
|
+
### Adding the Plugin
|
|
20
|
+
|
|
21
|
+
Add the plugin to your Docusaurus configuration file (`docusaurus.config.js` or `docusaurus.config.ts`):
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
// Add to docusaurus.config.js
|
|
25
|
+
module.exports = {
|
|
26
|
+
// ...
|
|
27
|
+
plugins: ['@r74tech/docusaurus-plugin-panzoom'],
|
|
28
|
+
// ...
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or, if you want to specify options:
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
// Add to docusaurus.config.js
|
|
36
|
+
module.exports = {
|
|
37
|
+
// ...
|
|
38
|
+
plugins: [
|
|
39
|
+
[
|
|
40
|
+
'@r74tech/docusaurus-plugin-panzoom',
|
|
41
|
+
{
|
|
42
|
+
// Options can be specified here (currently not used)
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
],
|
|
46
|
+
// ...
|
|
47
|
+
};
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Theme Configuration
|
|
51
|
+
|
|
52
|
+
To customize the plugin's behavior, add a `zoom` object to the `themeConfig` section:
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
// Add to docusaurus.config.js
|
|
56
|
+
module.exports = {
|
|
57
|
+
// ...
|
|
58
|
+
themeConfig: {
|
|
59
|
+
// ...
|
|
60
|
+
zoom: {
|
|
61
|
+
// A list of selectors to look for elements to enable pan and zoom
|
|
62
|
+
// Default: ['div.mermaid[data-processed="true"]', 'div.docusaurus-mermaid-container', '.drawio']
|
|
63
|
+
selectors: ['div.mermaid[data-processed="true"]', '.drawio'],
|
|
64
|
+
|
|
65
|
+
// Whether to wrap the panzoom items in a div with overflow:hidden
|
|
66
|
+
// This constrains the pan zoom detail into the original container
|
|
67
|
+
// Default: true
|
|
68
|
+
wrap: true,
|
|
69
|
+
|
|
70
|
+
// The amount of time to wait in MS before the plugin client module tries to look for
|
|
71
|
+
// and alter pan zoom elements. Some renders take a little bit before they appear in the
|
|
72
|
+
// dom to find.
|
|
73
|
+
// Default: 1000
|
|
74
|
+
timeout: 1000,
|
|
75
|
+
|
|
76
|
+
// You can also pass any options supported by @panzoom/panzoom
|
|
77
|
+
// See: https://github.com/timmywil/panzoom for available options
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
// ...
|
|
81
|
+
};
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Basic Usage
|
|
85
|
+
|
|
86
|
+
Once you've installed and configured the plugin, pan and zoom functionality will be automatically added to elements matching the specified selectors.
|
|
87
|
+
|
|
88
|
+
### Default Behavior
|
|
89
|
+
|
|
90
|
+
By default, pan and zoom functionality is added to the following elements:
|
|
91
|
+
|
|
92
|
+
1. `div.mermaid[data-processed="true"]` - Processed mermaid.js diagrams
|
|
93
|
+
2. `div.docusaurus-mermaid-container` - Docusaurus mermaid containers
|
|
94
|
+
3. `.drawio` - Diagrams created with draw.io
|
|
95
|
+
|
|
96
|
+
### User Interactions
|
|
97
|
+
|
|
98
|
+
For elements with pan and zoom functionality enabled, users can:
|
|
99
|
+
|
|
100
|
+
- **Pan**: Click and drag the element to move the view area
|
|
101
|
+
- **Zoom**: Use the mouse wheel to zoom in and out of the element
|
|
102
|
+
- **Reset**: Double-click the element to reset to the original view state
|
|
103
|
+
|
|
104
|
+
## Adding Custom Selectors
|
|
105
|
+
|
|
106
|
+
If you want to add pan and zoom functionality to specific elements, add custom selectors to the `selectors` array:
|
|
107
|
+
|
|
108
|
+
```javascript
|
|
109
|
+
zoom: {
|
|
110
|
+
selectors: [
|
|
111
|
+
'div.mermaid[data-processed="true"]',
|
|
112
|
+
'.drawio',
|
|
113
|
+
'.my-custom-diagram', // Add a custom selector
|
|
114
|
+
'#specific-image' // Add a specific ID element
|
|
115
|
+
],
|
|
116
|
+
// Other options...
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Check out the [Examples](../example) page for demonstrations.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import {themes as prismThemes} from 'prism-react-renderer';
|
|
2
|
+
import type {Config} from '@docusaurus/types';
|
|
3
|
+
import type * as Preset from '@docusaurus/preset-classic';
|
|
4
|
+
|
|
5
|
+
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
|
6
|
+
|
|
7
|
+
const config: Config = {
|
|
8
|
+
title: 'Docusaurus Plugin PanZoom',
|
|
9
|
+
tagline: 'Add pan and zoom functionality to images and SVGs in your Docusaurus site',
|
|
10
|
+
favicon: 'img/favicon.ico',
|
|
11
|
+
|
|
12
|
+
// Set the production url of your site here
|
|
13
|
+
url: 'https://r74tech.github.io',
|
|
14
|
+
// Set the /<baseUrl>/ pathname under which your site is served
|
|
15
|
+
// For GitHub pages deployment, it is often '/<projectName>/'
|
|
16
|
+
baseUrl: '/docusaurus-plugin-panzoom/',
|
|
17
|
+
|
|
18
|
+
// GitHub pages deployment config.
|
|
19
|
+
// If you aren't using GitHub pages, you don't need these.
|
|
20
|
+
organizationName: 'r74tech', // Usually your GitHub org/user name.
|
|
21
|
+
projectName: 'docusaurus-plugin-panzoom', // Usually your repo name.
|
|
22
|
+
|
|
23
|
+
onBrokenLinks: 'throw',
|
|
24
|
+
onBrokenMarkdownLinks: 'warn',
|
|
25
|
+
|
|
26
|
+
// Even if you don't use internationalization, you can use this field to set
|
|
27
|
+
// useful metadata like html lang. For example, if your site is Chinese, you
|
|
28
|
+
// may want to replace "en" with "zh-Hans".
|
|
29
|
+
i18n: {
|
|
30
|
+
defaultLocale: 'en',
|
|
31
|
+
locales: ['en'],
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
presets: [
|
|
35
|
+
[
|
|
36
|
+
'classic',
|
|
37
|
+
{
|
|
38
|
+
docs: {
|
|
39
|
+
sidebarPath: './sidebars.ts',
|
|
40
|
+
// Please change this to your repo.
|
|
41
|
+
// Remove this to remove the "edit this page" links.
|
|
42
|
+
editUrl:
|
|
43
|
+
'https://github.com/r74tech/docusaurus-plugin-panzoom/tree/main/docs/',
|
|
44
|
+
routeBasePath: '/', // Changed from 'docs' to '/' to make docs the main route
|
|
45
|
+
},
|
|
46
|
+
blog: false, // Disable the blog feature
|
|
47
|
+
} satisfies Preset.Options,
|
|
48
|
+
],
|
|
49
|
+
],
|
|
50
|
+
|
|
51
|
+
plugins: [
|
|
52
|
+
'@r74tech/docusaurus-plugin-panzoom'
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
themeConfig: {
|
|
56
|
+
// Replace with your project's social card
|
|
57
|
+
image: 'img/docusaurus-social-card.jpg',
|
|
58
|
+
navbar: {
|
|
59
|
+
title: 'Docusaurus Plugin PanZoom',
|
|
60
|
+
logo: {
|
|
61
|
+
alt: 'Docusaurus Plugin PanZoom Logo',
|
|
62
|
+
src: 'img/logo.svg',
|
|
63
|
+
},
|
|
64
|
+
items: [
|
|
65
|
+
{
|
|
66
|
+
type: 'docSidebar',
|
|
67
|
+
sidebarId: 'tutorialSidebar',
|
|
68
|
+
position: 'left',
|
|
69
|
+
label: 'Docs',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'doc',
|
|
73
|
+
docId: 'example/index',
|
|
74
|
+
position: 'left',
|
|
75
|
+
label: 'Example',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
href: 'https://github.com/r74tech/docusaurus-plugin-panzoom',
|
|
79
|
+
label: 'GitHub',
|
|
80
|
+
position: 'right',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
footer: {
|
|
85
|
+
style: 'dark',
|
|
86
|
+
links: [
|
|
87
|
+
{
|
|
88
|
+
title: 'Links',
|
|
89
|
+
items: [
|
|
90
|
+
{
|
|
91
|
+
label: 'Docs',
|
|
92
|
+
to: '/',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: 'Example',
|
|
96
|
+
to: '/example/',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: 'GitHub',
|
|
100
|
+
href: 'https://github.com/r74tech/docusaurus-plugin-panzoom',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: 'npm',
|
|
104
|
+
href: 'https://www.npmjs.com/package/@r74tech/docusaurus-plugin-panzoom',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
copyright: `Copyright © ${new Date().getFullYear()} r74tech. Built with Docusaurus.`,
|
|
110
|
+
},
|
|
111
|
+
prism: {
|
|
112
|
+
theme: prismThemes.github,
|
|
113
|
+
darkTheme: prismThemes.dracula,
|
|
114
|
+
},
|
|
115
|
+
zoom: {
|
|
116
|
+
selectors: ['div.mermaid[data-processed="true"]', 'div.docusaurus-mermaid-container', '.drawio', '.panzoom-example'],
|
|
117
|
+
wrap: true,
|
|
118
|
+
timeout: 1000,
|
|
119
|
+
},
|
|
120
|
+
} satisfies Preset.ThemeConfig,
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export default config;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "docs",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"docusaurus": "docusaurus",
|
|
7
|
+
"start": "docusaurus start",
|
|
8
|
+
"build": "docusaurus build",
|
|
9
|
+
"swizzle": "docusaurus swizzle",
|
|
10
|
+
"deploy": "docusaurus deploy",
|
|
11
|
+
"clear": "docusaurus clear",
|
|
12
|
+
"serve": "docusaurus serve",
|
|
13
|
+
"write-translations": "docusaurus write-translations",
|
|
14
|
+
"write-heading-ids": "docusaurus write-heading-ids",
|
|
15
|
+
"typecheck": "tsc"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@docusaurus/core": "3.7.0",
|
|
19
|
+
"@docusaurus/preset-classic": "3.7.0",
|
|
20
|
+
"@mdx-js/react": "^3.0.0",
|
|
21
|
+
"@r74tech/docusaurus-plugin-panzoom": "file:..",
|
|
22
|
+
"clsx": "^2.0.0",
|
|
23
|
+
"prism-react-renderer": "^2.3.0",
|
|
24
|
+
"react": "^19.0.0",
|
|
25
|
+
"react-dom": "^19.0.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@docusaurus/module-type-aliases": "3.7.0",
|
|
29
|
+
"@docusaurus/tsconfig": "3.7.0",
|
|
30
|
+
"@docusaurus/types": "3.7.0",
|
|
31
|
+
"typescript": "~5.6.2"
|
|
32
|
+
},
|
|
33
|
+
"browserslist": {
|
|
34
|
+
"production": [
|
|
35
|
+
">0.5%",
|
|
36
|
+
"not dead",
|
|
37
|
+
"not op_mini all"
|
|
38
|
+
],
|
|
39
|
+
"development": [
|
|
40
|
+
"last 3 chrome version",
|
|
41
|
+
"last 3 firefox version",
|
|
42
|
+
"last 5 safari version"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=20.0"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/docs/sidebars.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Creating a sidebar enables you to:
|
|
5
|
+
- create an ordered group of docs
|
|
6
|
+
- render a sidebar for each doc of that group
|
|
7
|
+
- provide next/previous navigation
|
|
8
|
+
|
|
9
|
+
The sidebars can be generated from the filesystem, or explicitly defined here.
|
|
10
|
+
|
|
11
|
+
Create as many sidebars as you want.
|
|
12
|
+
*/
|
|
13
|
+
const sidebars: SidebarsConfig = {
|
|
14
|
+
// Manually defined sidebar with specific items
|
|
15
|
+
tutorialSidebar: [
|
|
16
|
+
'index', // Main documentation page (docs/index.md)
|
|
17
|
+
'usage/basic', // Basic usage guide
|
|
18
|
+
'example/index', // Examples page
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default sidebars;
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#FFF" d="M99 52h84v34H99z"/><path d="M23 163c-7.398 0-13.843-4.027-17.303-10A19.886 19.886 0 0 0 3 163c0 11.046 8.954 20 20 20h20v-20H23z" fill="#3ECC5F"/><path d="M112.98 57.376L183 53V43c0-11.046-8.954-20-20-20H73l-2.5-4.33c-1.112-1.925-3.889-1.925-5 0L63 23l-2.5-4.33c-1.111-1.925-3.889-1.925-5 0L53 23l-2.5-4.33c-1.111-1.925-3.889-1.925-5 0L43 23c-.022 0-.042.003-.065.003l-4.142-4.141c-1.57-1.571-4.252-.853-4.828 1.294l-1.369 5.104-5.192-1.392c-2.148-.575-4.111 1.389-3.535 3.536l1.39 5.193-5.102 1.367c-2.148.576-2.867 3.259-1.296 4.83l4.142 4.142c0 .021-.003.042-.003.064l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 53l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 63l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 73l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 83l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 93l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 103l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 113l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 123l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 133l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 143l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 153l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 163c0 11.046 8.954 20 20 20h120c11.046 0 20-8.954 20-20V83l-70.02-4.376A10.645 10.645 0 0 1 103 68c0-5.621 4.37-10.273 9.98-10.624" fill="#3ECC5F"/><path fill="#3ECC5F" d="M143 183h30v-40h-30z"/><path d="M193 158c-.219 0-.428.037-.639.064-.038-.15-.074-.301-.116-.451A5 5 0 0 0 190.32 148a4.96 4.96 0 0 0-3.016 1.036 26.531 26.531 0 0 0-.335-.336 4.955 4.955 0 0 0 1.011-2.987 5 5 0 0 0-9.599-1.959c-.148-.042-.297-.077-.445-.115.027-.211.064-.42.064-.639a5 5 0 0 0-5-5 5 5 0 0 0-5 5c0 .219.037.428.064.639-.148.038-.297.073-.445.115a4.998 4.998 0 0 0-9.599 1.959c0 1.125.384 2.151 1.011 2.987-3.717 3.632-6.031 8.693-6.031 14.3 0 11.046 8.954 20 20 20 9.339 0 17.16-6.41 19.361-15.064.211.027.42.064.639.064a5 5 0 0 0 5-5 5 5 0 0 0-5-5" fill="#44D860"/><path fill="#3ECC5F" d="M153 123h30v-20h-30z"/><path d="M193 115.5a2.5 2.5 0 1 0 0-5c-.109 0-.214.019-.319.032-.02-.075-.037-.15-.058-.225a2.501 2.501 0 0 0-.963-4.807c-.569 0-1.088.197-1.508.518a6.653 6.653 0 0 0-.168-.168c.314-.417.506-.931.506-1.494a2.5 2.5 0 0 0-4.8-.979A9.987 9.987 0 0 0 183 103c-5.522 0-10 4.478-10 10s4.478 10 10 10c.934 0 1.833-.138 2.69-.377a2.5 2.5 0 0 0 4.8-.979c0-.563-.192-1.077-.506-1.494.057-.055.113-.111.168-.168.42.321.939.518 1.508.518a2.5 2.5 0 0 0 .963-4.807c.021-.074.038-.15.058-.225.105.013.21.032.319.032" fill="#44D860"/><path d="M63 55.5a2.5 2.5 0 0 1-2.5-2.5c0-4.136-3.364-7.5-7.5-7.5s-7.5 3.364-7.5 7.5a2.5 2.5 0 1 1-5 0c0-6.893 5.607-12.5 12.5-12.5S65.5 46.107 65.5 53a2.5 2.5 0 0 1-2.5 2.5" fill="#000"/><path d="M103 183h60c11.046 0 20-8.954 20-20V93h-60c-11.046 0-20 8.954-20 20v70z" fill="#FFFF50"/><path d="M168.02 124h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0-49.814h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 19.814h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2M183 61.611c-.012 0-.022-.006-.034-.005-3.09.105-4.552 3.196-5.842 5.923-1.346 2.85-2.387 4.703-4.093 4.647-1.889-.068-2.969-2.202-4.113-4.46-1.314-2.594-2.814-5.536-5.963-5.426-3.046.104-4.513 2.794-5.807 5.167-1.377 2.528-2.314 4.065-4.121 3.994-1.927-.07-2.951-1.805-4.136-3.813-1.321-2.236-2.848-4.75-5.936-4.664-2.994.103-4.465 2.385-5.763 4.4-1.373 2.13-2.335 3.428-4.165 3.351-1.973-.07-2.992-1.51-4.171-3.177-1.324-1.873-2.816-3.993-5.895-3.89-2.928.1-4.399 1.97-5.696 3.618-1.232 1.564-2.194 2.802-4.229 2.724a1 1 0 0 0-.072 2c3.017.101 4.545-1.8 5.872-3.487 1.177-1.496 2.193-2.787 4.193-2.855 1.926-.082 2.829 1.115 4.195 3.045 1.297 1.834 2.769 3.914 5.731 4.021 3.103.104 4.596-2.215 5.918-4.267 1.182-1.834 2.202-3.417 4.15-3.484 1.793-.067 2.769 1.35 4.145 3.681 1.297 2.197 2.766 4.686 5.787 4.796 3.125.108 4.634-2.62 5.949-5.035 1.139-2.088 2.214-4.06 4.119-4.126 1.793-.042 2.728 1.595 4.111 4.33 1.292 2.553 2.757 5.445 5.825 5.556l.169.003c3.064 0 4.518-3.075 5.805-5.794 1.139-2.41 2.217-4.68 4.067-4.773v-2z" fill="#000"/><path fill="#3ECC5F" d="M83 183h40v-40H83z"/><path d="M143 158c-.219 0-.428.037-.639.064-.038-.15-.074-.301-.116-.451A5 5 0 0 0 140.32 148a4.96 4.96 0 0 0-3.016 1.036 26.531 26.531 0 0 0-.335-.336 4.955 4.955 0 0 0 1.011-2.987 5 5 0 0 0-9.599-1.959c-.148-.042-.297-.077-.445-.115.027-.211.064-.42.064-.639a5 5 0 0 0-5-5 5 5 0 0 0-5 5c0 .219.037.428.064.639-.148.038-.297.073-.445.115a4.998 4.998 0 0 0-9.599 1.959c0 1.125.384 2.151 1.011 2.987-3.717 3.632-6.031 8.693-6.031 14.3 0 11.046 8.954 20 20 20 9.339 0 17.16-6.41 19.361-15.064.211.027.42.064.639.064a5 5 0 0 0 5-5 5 5 0 0 0-5-5" fill="#44D860"/><path fill="#3ECC5F" d="M83 123h40v-20H83z"/><path d="M133 115.5a2.5 2.5 0 1 0 0-5c-.109 0-.214.019-.319.032-.02-.075-.037-.15-.058-.225a2.501 2.501 0 0 0-.963-4.807c-.569 0-1.088.197-1.508.518a6.653 6.653 0 0 0-.168-.168c.314-.417.506-.931.506-1.494a2.5 2.5 0 0 0-4.8-.979A9.987 9.987 0 0 0 123 103c-5.522 0-10 4.478-10 10s4.478 10 10 10c.934 0 1.833-.138 2.69-.377a2.5 2.5 0 0 0 4.8-.979c0-.563-.192-1.077-.506-1.494.057-.055.113-.111.168-.168.42.321.939.518 1.508.518a2.5 2.5 0 0 0 .963-4.807c.021-.074.038-.15.058-.225.105.013.21.032.319.032" fill="#44D860"/><path d="M143 41.75c-.16 0-.33-.02-.49-.05a2.52 2.52 0 0 1-.47-.14c-.15-.06-.29-.14-.431-.23-.13-.09-.259-.2-.38-.31-.109-.12-.219-.24-.309-.38s-.17-.28-.231-.43a2.619 2.619 0 0 1-.189-.96c0-.16.02-.33.05-.49.03-.16.08-.31.139-.47.061-.15.141-.29.231-.43.09-.13.2-.26.309-.38.121-.11.25-.22.38-.31.141-.09.281-.17.431-.23.149-.06.31-.11.47-.14.32-.07.65-.07.98 0 .159.03.32.08.47.14.149.06.29.14.43.23.13.09.259.2.38.31.11.12.22.25.31.38.09.14.17.28.23.43.06.16.11.31.14.47.029.16.05.33.05.49 0 .66-.271 1.31-.73 1.77-.121.11-.25.22-.38.31-.14.09-.281.17-.43.23a2.565 2.565 0 0 1-.96.19m20-1.25c-.66 0-1.3-.27-1.771-.73a3.802 3.802 0 0 1-.309-.38c-.09-.14-.17-.28-.231-.43a2.619 2.619 0 0 1-.189-.96c0-.66.27-1.3.729-1.77.121-.11.25-.22.38-.31.141-.09.281-.17.431-.23.149-.06.31-.11.47-.14.32-.07.66-.07.98 0 .159.03.32.08.47.14.149.06.29.14.43.23.13.09.259.2.38.31.459.47.73 1.11.73 1.77 0 .16-.021.33-.05.49-.03.16-.08.32-.14.47-.07.15-.14.29-.23.43-.09.13-.2.26-.31.38-.121.11-.25.22-.38.31-.14.09-.281.17-.43.23a2.565 2.565 0 0 1-.96.19" fill="#000"/></g></svg>
|