docucraft 1.0.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/CODE_OF_CONDUCT.md +25 -0
- package/CONTRIBUTING.md +50 -0
- package/LICENSE +21 -0
- package/NOTICE +4 -0
- package/README.md +121 -0
- package/dist/components/MermaidDiagram/index.d.ts +16 -0
- package/dist/components/MermaidDiagram/index.d.ts.map +1 -0
- package/dist/components/MermaidDiagram/index.js +405 -0
- package/dist/components/MermaidDiagram/index.js.map +1 -0
- package/dist/components/MermaidDiagram/styles.module.css +163 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as contributors and maintainers pledge to make participation in this project a harassment-free experience for everyone.
|
|
6
|
+
|
|
7
|
+
## Our Standards
|
|
8
|
+
|
|
9
|
+
Examples of behavior that contributes to a positive environment include:
|
|
10
|
+
- Using welcoming and inclusive language
|
|
11
|
+
- Being respectful of differing viewpoints
|
|
12
|
+
- Accepting constructive feedback gracefully
|
|
13
|
+
|
|
14
|
+
Examples of unacceptable behavior include:
|
|
15
|
+
- Harassment, insults, or personal attacks
|
|
16
|
+
- Public or private intimidation
|
|
17
|
+
- Other conduct that could reasonably be considered inappropriate
|
|
18
|
+
|
|
19
|
+
## Enforcement
|
|
20
|
+
|
|
21
|
+
Project maintainers are responsible for clarifying and enforcing standards of acceptable behavior.
|
|
22
|
+
|
|
23
|
+
## Reporting
|
|
24
|
+
|
|
25
|
+
Please report unacceptable behavior to the project maintainer: Jiří Šašek.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Contributing to Docucraft
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing.
|
|
4
|
+
|
|
5
|
+
## Development workflow
|
|
6
|
+
|
|
7
|
+
1. Fork the repository.
|
|
8
|
+
2. Create a feature branch.
|
|
9
|
+
3. Run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install
|
|
13
|
+
npm run typecheck
|
|
14
|
+
npm run build
|
|
15
|
+
npm run pack:check
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
4. Open a pull request with a clear summary.
|
|
19
|
+
|
|
20
|
+
## Scope
|
|
21
|
+
|
|
22
|
+
Docucraft accepts reusable React components focused on Docusaurus ecosystems.
|
|
23
|
+
|
|
24
|
+
## Coding guidelines
|
|
25
|
+
|
|
26
|
+
- TypeScript strict mode.
|
|
27
|
+
- Keep public props documented.
|
|
28
|
+
- Include accessibility labels for interactive controls.
|
|
29
|
+
- Avoid project-specific business logic.
|
|
30
|
+
|
|
31
|
+
## Component library conventions
|
|
32
|
+
|
|
33
|
+
- Create each component in `src/components/<ComponentName>/`.
|
|
34
|
+
- Use `index.tsx` as the component entry file.
|
|
35
|
+
- Keep styles local in `styles.module.css` when possible.
|
|
36
|
+
- Export every public component and type from `src/index.ts`.
|
|
37
|
+
- Do not rely on internal deep imports from `dist/...`.
|
|
38
|
+
|
|
39
|
+
## Pull request checklist
|
|
40
|
+
|
|
41
|
+
1. New component follows folder convention.
|
|
42
|
+
2. Public exports were updated in `src/index.ts`.
|
|
43
|
+
3. README includes usage/API updates.
|
|
44
|
+
4. `npm run typecheck` passes.
|
|
45
|
+
5. `npm run build` passes.
|
|
46
|
+
6. `npm run pack:check` confirms expected publish files.
|
|
47
|
+
|
|
48
|
+
## Attribution
|
|
49
|
+
|
|
50
|
+
Please do not remove author and license attribution from existing files.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jiří Šašek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Docucraft
|
|
2
|
+
|
|
3
|
+
Docucraft is an open source React component library focused on reusable UI building blocks for Docusaurus projects.
|
|
4
|
+
|
|
5
|
+
Created and maintained by Jiří Šašek.
|
|
6
|
+
|
|
7
|
+
## Current components
|
|
8
|
+
|
|
9
|
+
- `MermaidDiagram`: interactive Mermaid wrapper with zoom, pan, fullscreen, SVG export, and PNG export.
|
|
10
|
+
|
|
11
|
+
## Project structure
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
src/
|
|
15
|
+
index.ts
|
|
16
|
+
components/
|
|
17
|
+
MermaidDiagram/
|
|
18
|
+
index.tsx
|
|
19
|
+
styles.module.css
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Conventions:
|
|
23
|
+
|
|
24
|
+
- Every component lives in its own folder under `src/components/<ComponentName>/`.
|
|
25
|
+
- Component folder contains `index.tsx` and optional `styles.module.css`.
|
|
26
|
+
- Public exports are centralized in `src/index.ts`.
|
|
27
|
+
- Consumers should only import from package entrypoints, not from `dist/...` deep paths.
|
|
28
|
+
|
|
29
|
+
## Why Docucraft
|
|
30
|
+
|
|
31
|
+
- Built specifically for Docusaurus workflows.
|
|
32
|
+
- Designed for long-term reuse across multiple documentation projects.
|
|
33
|
+
- Includes type-safe APIs and publish-ready npm packaging.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install docucraft
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Docusaurus setup
|
|
42
|
+
|
|
43
|
+
In `docusaurus.config.ts` ensure Mermaid support is enabled:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
export default {
|
|
47
|
+
markdown: { mermaid: true },
|
|
48
|
+
themes: ['@docusaurus/theme-mermaid'],
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
```mdx
|
|
55
|
+
import {MermaidDiagram} from 'docucraft';
|
|
56
|
+
|
|
57
|
+
<MermaidDiagram
|
|
58
|
+
definition={String.raw`flowchart TB
|
|
59
|
+
A[Start] --> B[Done]`}
|
|
60
|
+
exportFileName="my-diagram"
|
|
61
|
+
hintText="Zoom: wheel. Pan: drag. Reset: double click."
|
|
62
|
+
/>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Adding a new component
|
|
66
|
+
|
|
67
|
+
1. Create folder: `src/components/YourComponent/`.
|
|
68
|
+
2. Add implementation: `src/components/YourComponent/index.tsx`.
|
|
69
|
+
3. Add local styles (optional): `src/components/YourComponent/styles.module.css`.
|
|
70
|
+
4. Export component from `src/index.ts`.
|
|
71
|
+
5. Update README with API and usage snippet.
|
|
72
|
+
6. Run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm run typecheck
|
|
76
|
+
npm run build
|
|
77
|
+
npm run pack:check
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## API
|
|
81
|
+
|
|
82
|
+
### MermaidDiagram props
|
|
83
|
+
|
|
84
|
+
- `definition: string` Mermaid source code.
|
|
85
|
+
- `className?: string` Additional class on the root wrapper.
|
|
86
|
+
- `ariaLabel?: string` Accessibility label for viewport.
|
|
87
|
+
- `minScale?: number` Minimum zoom (default `0.6`).
|
|
88
|
+
- `maxScale?: number` Maximum zoom (default `4`).
|
|
89
|
+
- `zoomStep?: number` Zoom increment (default `0.12`).
|
|
90
|
+
- `showHint?: boolean` Show or hide hint row (default `true`).
|
|
91
|
+
- `hintText?: string` Custom hint text.
|
|
92
|
+
- `exportFileName?: string` File name prefix for exports (default `diagram`).
|
|
93
|
+
- `enableFullscreen?: boolean` Show fullscreen action (default `true`).
|
|
94
|
+
- `enableExport?: boolean` Show export action (default `true`).
|
|
95
|
+
|
|
96
|
+
## Development
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm install
|
|
100
|
+
npm run typecheck
|
|
101
|
+
npm run build
|
|
102
|
+
npm run pack:check
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Publish checklist
|
|
106
|
+
|
|
107
|
+
1. Update `version` in `package.json`.
|
|
108
|
+
2. Run `npm run typecheck`.
|
|
109
|
+
3. Run `npm run build`.
|
|
110
|
+
4. Run `npm run pack:check`.
|
|
111
|
+
5. Push to GitHub repository.
|
|
112
|
+
6. Log in to npm: `npm login`.
|
|
113
|
+
7. Publish: `npm publish --access public`.
|
|
114
|
+
|
|
115
|
+
## Licensing and attribution
|
|
116
|
+
|
|
117
|
+
This project is licensed under the MIT License.
|
|
118
|
+
|
|
119
|
+
Copyright (c) Jiří Šašek.
|
|
120
|
+
|
|
121
|
+
When redistributing this software, keep the copyright notice and license text.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
export type MermaidDiagramProps = {
|
|
3
|
+
definition: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
minScale?: number;
|
|
7
|
+
maxScale?: number;
|
|
8
|
+
zoomStep?: number;
|
|
9
|
+
showHint?: boolean;
|
|
10
|
+
hintText?: string;
|
|
11
|
+
exportFileName?: string;
|
|
12
|
+
enableFullscreen?: boolean;
|
|
13
|
+
enableExport?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export default function MermaidDiagram({ definition, className, ariaLabel, minScale, maxScale, zoomStep, showHint, hintText, exportFileName, enableFullscreen, enableExport, }: MermaidDiagramProps): ReactElement;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MermaidDiagram/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAC,KAAK,YAAY,EAAoD,MAAM,OAAO,CAAC;AAyBlG,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAsKF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,UAAU,EACV,SAAS,EACT,SAAyC,EACzC,QAAc,EACd,QAAY,EACZ,QAAe,EACf,QAAe,EACf,QAAqE,EACrE,cAA0B,EAC1B,gBAAuB,EACvB,YAAmB,GACpB,EAAE,mBAAmB,GAAG,YAAY,CAmbpC"}
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import Mermaid from '@theme/Mermaid';
|
|
4
|
+
import styles from './styles.module.css';
|
|
5
|
+
function downloadBlob(blob, fileName) {
|
|
6
|
+
const objectUrl = URL.createObjectURL(blob);
|
|
7
|
+
const anchor = document.createElement('a');
|
|
8
|
+
anchor.href = objectUrl;
|
|
9
|
+
anchor.download = fileName;
|
|
10
|
+
anchor.click();
|
|
11
|
+
URL.revokeObjectURL(objectUrl);
|
|
12
|
+
}
|
|
13
|
+
function copyComputedStyles(source, target) {
|
|
14
|
+
const computed = window.getComputedStyle(source);
|
|
15
|
+
const targetStyle = target.style;
|
|
16
|
+
const safeProperties = [
|
|
17
|
+
'color',
|
|
18
|
+
'fill',
|
|
19
|
+
'fill-opacity',
|
|
20
|
+
'stroke',
|
|
21
|
+
'stroke-opacity',
|
|
22
|
+
'stroke-width',
|
|
23
|
+
'stroke-linecap',
|
|
24
|
+
'stroke-linejoin',
|
|
25
|
+
'stroke-dasharray',
|
|
26
|
+
'opacity',
|
|
27
|
+
'font-family',
|
|
28
|
+
'font-size',
|
|
29
|
+
'font-weight',
|
|
30
|
+
'font-style',
|
|
31
|
+
'letter-spacing',
|
|
32
|
+
'word-spacing',
|
|
33
|
+
'text-anchor',
|
|
34
|
+
'dominant-baseline',
|
|
35
|
+
'visibility',
|
|
36
|
+
'display',
|
|
37
|
+
];
|
|
38
|
+
for (const propertyName of safeProperties) {
|
|
39
|
+
targetStyle.setProperty(propertyName, computed.getPropertyValue(propertyName), computed.getPropertyPriority(propertyName));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function inlineComputedStylesIntoClone(sourceSvg, targetSvg) {
|
|
43
|
+
const sourceElements = [sourceSvg, ...Array.from(sourceSvg.querySelectorAll('*'))];
|
|
44
|
+
const targetElements = [targetSvg, ...Array.from(targetSvg.querySelectorAll('*'))];
|
|
45
|
+
const limit = Math.min(sourceElements.length, targetElements.length);
|
|
46
|
+
for (let index = 0; index < limit; index += 1) {
|
|
47
|
+
copyComputedStyles(sourceElements[index], targetElements[index]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function convertForeignObjectLabelsToSvgText(svg) {
|
|
51
|
+
const namespace = 'http://www.w3.org/2000/svg';
|
|
52
|
+
const foreignObjects = Array.from(svg.querySelectorAll('foreignObject'));
|
|
53
|
+
foreignObjects.forEach((foreignObject) => {
|
|
54
|
+
const rawText = (foreignObject.textContent ?? '').trim();
|
|
55
|
+
if (!rawText) {
|
|
56
|
+
foreignObject.remove();
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const x = Number.parseFloat(foreignObject.getAttribute('x') ?? '0') || 0;
|
|
60
|
+
const y = Number.parseFloat(foreignObject.getAttribute('y') ?? '0') || 0;
|
|
61
|
+
const width = Number.parseFloat(foreignObject.getAttribute('width') ?? '0') || 0;
|
|
62
|
+
const height = Number.parseFloat(foreignObject.getAttribute('height') ?? '0') || 0;
|
|
63
|
+
const textNode = svg.ownerDocument.createElementNS(namespace, 'text');
|
|
64
|
+
const labelX = x + width / 2;
|
|
65
|
+
const labelY = y + height / 2;
|
|
66
|
+
textNode.setAttribute('x', String(labelX));
|
|
67
|
+
textNode.setAttribute('y', String(labelY));
|
|
68
|
+
textNode.setAttribute('text-anchor', 'middle');
|
|
69
|
+
textNode.setAttribute('dominant-baseline', 'middle');
|
|
70
|
+
textNode.setAttribute('font-family', 'Arial, sans-serif');
|
|
71
|
+
textNode.setAttribute('font-size', '14');
|
|
72
|
+
textNode.setAttribute('fill', 'currentColor');
|
|
73
|
+
const lines = rawText.split(/\r?\n/).filter((line) => line.trim().length > 0);
|
|
74
|
+
if (lines.length <= 1) {
|
|
75
|
+
textNode.textContent = rawText;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
const lineHeight = 16;
|
|
79
|
+
const firstLineOffset = -((lines.length - 1) * lineHeight) / 2;
|
|
80
|
+
lines.forEach((line, index) => {
|
|
81
|
+
const tspan = svg.ownerDocument.createElementNS(namespace, 'tspan');
|
|
82
|
+
tspan.setAttribute('x', String(labelX));
|
|
83
|
+
tspan.setAttribute('dy', index === 0 ? String(firstLineOffset) : String(lineHeight));
|
|
84
|
+
tspan.textContent = line;
|
|
85
|
+
textNode.appendChild(tspan);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
foreignObject.replaceWith(textNode);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function getSvgExportSize(sourceSvg) {
|
|
92
|
+
const widthAttr = Number.parseFloat(sourceSvg.getAttribute('width') ?? '');
|
|
93
|
+
const heightAttr = Number.parseFloat(sourceSvg.getAttribute('height') ?? '');
|
|
94
|
+
if (Number.isFinite(widthAttr) && widthAttr > 0 && Number.isFinite(heightAttr) && heightAttr > 0) {
|
|
95
|
+
return { width: Math.ceil(widthAttr), height: Math.ceil(heightAttr) };
|
|
96
|
+
}
|
|
97
|
+
const viewBox = sourceSvg.viewBox?.baseVal;
|
|
98
|
+
if (viewBox && viewBox.width > 0 && viewBox.height > 0) {
|
|
99
|
+
return { width: Math.ceil(viewBox.width), height: Math.ceil(viewBox.height) };
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
width: Math.max(1, Math.ceil(sourceSvg.clientWidth || 1200)),
|
|
103
|
+
height: Math.max(1, Math.ceil(sourceSvg.clientHeight || 800)),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function finalizeSvgClone(clone, width, height) {
|
|
107
|
+
clone.setAttribute('width', String(width));
|
|
108
|
+
clone.setAttribute('height', String(height));
|
|
109
|
+
if (!clone.getAttribute('viewBox')) {
|
|
110
|
+
clone.setAttribute('viewBox', `0 0 ${width} ${height}`);
|
|
111
|
+
}
|
|
112
|
+
if (!clone.getAttribute('xmlns')) {
|
|
113
|
+
clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
114
|
+
}
|
|
115
|
+
if (!clone.getAttribute('xmlns:xlink')) {
|
|
116
|
+
clone.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function buildExportSvgMarkup(sourceSvg) {
|
|
120
|
+
const clone = sourceSvg.cloneNode(true);
|
|
121
|
+
clone.style.transform = '';
|
|
122
|
+
clone.style.transformOrigin = '';
|
|
123
|
+
inlineComputedStylesIntoClone(sourceSvg, clone);
|
|
124
|
+
const { width, height } = getSvgExportSize(sourceSvg);
|
|
125
|
+
finalizeSvgClone(clone, width, height);
|
|
126
|
+
return new XMLSerializer().serializeToString(clone);
|
|
127
|
+
}
|
|
128
|
+
function buildRasterExportSvgMarkup(sourceSvg) {
|
|
129
|
+
const clone = sourceSvg.cloneNode(true);
|
|
130
|
+
clone.style.transform = '';
|
|
131
|
+
clone.style.transformOrigin = '';
|
|
132
|
+
inlineComputedStylesIntoClone(sourceSvg, clone);
|
|
133
|
+
convertForeignObjectLabelsToSvgText(clone);
|
|
134
|
+
const { width, height } = getSvgExportSize(sourceSvg);
|
|
135
|
+
finalizeSvgClone(clone, width, height);
|
|
136
|
+
return new XMLSerializer().serializeToString(clone);
|
|
137
|
+
}
|
|
138
|
+
function clamp(value, min, max) {
|
|
139
|
+
return Math.min(max, Math.max(min, value));
|
|
140
|
+
}
|
|
141
|
+
export default function MermaidDiagram({ definition, className, ariaLabel = 'Interactive Mermaid diagram', minScale = 0.6, maxScale = 4, zoomStep = 0.12, showHint = true, hintText = 'Zoom: mouse wheel. Pan: mouse drag. Reset: double click.', exportFileName = 'diagram', enableFullscreen = true, enableExport = true, }) {
|
|
142
|
+
const wrapperRef = useRef(null);
|
|
143
|
+
const viewportRef = useRef(null);
|
|
144
|
+
const svgRef = useRef(null);
|
|
145
|
+
const cleanupRef = useRef(null);
|
|
146
|
+
const transformRef = useRef({
|
|
147
|
+
scale: 1,
|
|
148
|
+
x: 0,
|
|
149
|
+
y: 0,
|
|
150
|
+
dragging: false,
|
|
151
|
+
lastX: 0,
|
|
152
|
+
lastY: 0,
|
|
153
|
+
});
|
|
154
|
+
const [scale, setScale] = useState(1);
|
|
155
|
+
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
156
|
+
const [isExportMenuOpen, setIsExportMenuOpen] = useState(false);
|
|
157
|
+
const exportMenuRef = useRef(null);
|
|
158
|
+
const mermaidElement = useMemo(() => _jsx(Mermaid, { value: definition }), [definition]);
|
|
159
|
+
const applyTransform = useCallback((svg, state) => {
|
|
160
|
+
svg.style.transformOrigin = '0 0';
|
|
161
|
+
svg.style.transform = `matrix(${state.scale}, 0, 0, ${state.scale}, ${state.x}, ${state.y})`;
|
|
162
|
+
setScale(state.scale);
|
|
163
|
+
}, []);
|
|
164
|
+
const resetTransform = useCallback(() => {
|
|
165
|
+
const svg = svgRef.current;
|
|
166
|
+
if (!svg) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const state = transformRef.current;
|
|
170
|
+
state.scale = 1;
|
|
171
|
+
state.x = 0;
|
|
172
|
+
state.y = 0;
|
|
173
|
+
applyTransform(svg, state);
|
|
174
|
+
}, [applyTransform]);
|
|
175
|
+
const zoomBy = useCallback((direction) => {
|
|
176
|
+
const viewport = viewportRef.current;
|
|
177
|
+
const svg = svgRef.current;
|
|
178
|
+
if (!viewport || !svg) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const state = transformRef.current;
|
|
182
|
+
const previousScale = state.scale;
|
|
183
|
+
const nextScale = clamp(previousScale * (1 + direction * zoomStep), minScale, maxScale);
|
|
184
|
+
if (nextScale === previousScale) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const rect = viewport.getBoundingClientRect();
|
|
188
|
+
const anchorX = rect.width / 2;
|
|
189
|
+
const anchorY = rect.height / 2;
|
|
190
|
+
const ratio = nextScale / previousScale;
|
|
191
|
+
state.x = anchorX - (anchorX - state.x) * ratio;
|
|
192
|
+
state.y = anchorY - (anchorY - state.y) * ratio;
|
|
193
|
+
state.scale = nextScale;
|
|
194
|
+
applyTransform(svg, state);
|
|
195
|
+
}, [applyTransform, maxScale, minScale, zoomStep]);
|
|
196
|
+
const bindInteractions = useCallback(() => {
|
|
197
|
+
const viewport = viewportRef.current;
|
|
198
|
+
if (!viewport) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
const renderedSvg = viewport.querySelector('.docusaurus-mermaid-container svg') ??
|
|
202
|
+
viewport.querySelector('svg');
|
|
203
|
+
if (!renderedSvg) {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
if (svgRef.current === renderedSvg) {
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
cleanupRef.current?.();
|
|
210
|
+
svgRef.current = renderedSvg;
|
|
211
|
+
const state = transformRef.current;
|
|
212
|
+
state.dragging = false;
|
|
213
|
+
applyTransform(renderedSvg, state);
|
|
214
|
+
const onWheel = (event) => {
|
|
215
|
+
event.preventDefault();
|
|
216
|
+
const previousScale = state.scale;
|
|
217
|
+
const delta = event.deltaY > 0 ? -zoomStep : zoomStep;
|
|
218
|
+
const nextScale = clamp(previousScale * (1 + delta), minScale, maxScale);
|
|
219
|
+
if (nextScale === previousScale) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const rect = viewport.getBoundingClientRect();
|
|
223
|
+
const pointerX = event.clientX - rect.left;
|
|
224
|
+
const pointerY = event.clientY - rect.top;
|
|
225
|
+
const ratio = nextScale / previousScale;
|
|
226
|
+
state.x = pointerX - (pointerX - state.x) * ratio;
|
|
227
|
+
state.y = pointerY - (pointerY - state.y) * ratio;
|
|
228
|
+
state.scale = nextScale;
|
|
229
|
+
applyTransform(renderedSvg, state);
|
|
230
|
+
};
|
|
231
|
+
const onPointerDown = (event) => {
|
|
232
|
+
if (event.button !== 0) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
event.preventDefault();
|
|
236
|
+
state.dragging = true;
|
|
237
|
+
state.lastX = event.clientX;
|
|
238
|
+
state.lastY = event.clientY;
|
|
239
|
+
viewport.classList.add(styles.isDragging);
|
|
240
|
+
viewport.setPointerCapture(event.pointerId);
|
|
241
|
+
};
|
|
242
|
+
const onPointerMove = (event) => {
|
|
243
|
+
if (!state.dragging) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const dx = event.clientX - state.lastX;
|
|
247
|
+
const dy = event.clientY - state.lastY;
|
|
248
|
+
state.lastX = event.clientX;
|
|
249
|
+
state.lastY = event.clientY;
|
|
250
|
+
state.x += dx;
|
|
251
|
+
state.y += dy;
|
|
252
|
+
applyTransform(renderedSvg, state);
|
|
253
|
+
};
|
|
254
|
+
const stopDragging = (event) => {
|
|
255
|
+
if (!state.dragging) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
state.dragging = false;
|
|
259
|
+
viewport.classList.remove(styles.isDragging);
|
|
260
|
+
viewport.releasePointerCapture(event.pointerId);
|
|
261
|
+
};
|
|
262
|
+
const onDoubleClick = () => {
|
|
263
|
+
resetTransform();
|
|
264
|
+
};
|
|
265
|
+
viewport.addEventListener('wheel', onWheel, { passive: false });
|
|
266
|
+
viewport.addEventListener('pointerdown', onPointerDown);
|
|
267
|
+
viewport.addEventListener('pointermove', onPointerMove);
|
|
268
|
+
viewport.addEventListener('pointerup', stopDragging);
|
|
269
|
+
viewport.addEventListener('pointercancel', stopDragging);
|
|
270
|
+
viewport.addEventListener('dblclick', onDoubleClick);
|
|
271
|
+
cleanupRef.current = () => {
|
|
272
|
+
viewport.removeEventListener('wheel', onWheel);
|
|
273
|
+
viewport.removeEventListener('pointerdown', onPointerDown);
|
|
274
|
+
viewport.removeEventListener('pointermove', onPointerMove);
|
|
275
|
+
viewport.removeEventListener('pointerup', stopDragging);
|
|
276
|
+
viewport.removeEventListener('pointercancel', stopDragging);
|
|
277
|
+
viewport.removeEventListener('dblclick', onDoubleClick);
|
|
278
|
+
};
|
|
279
|
+
return true;
|
|
280
|
+
}, [applyTransform, maxScale, minScale, resetTransform, zoomStep]);
|
|
281
|
+
const toggleFullscreen = useCallback(async () => {
|
|
282
|
+
const wrapper = wrapperRef.current;
|
|
283
|
+
if (!wrapper) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (document.fullscreenElement === wrapper) {
|
|
287
|
+
await document.exitFullscreen();
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
await wrapper.requestFullscreen();
|
|
291
|
+
}, []);
|
|
292
|
+
const exportSvg = useCallback(() => {
|
|
293
|
+
const svg = svgRef.current;
|
|
294
|
+
if (!svg) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
const svgMarkup = buildExportSvgMarkup(svg);
|
|
298
|
+
const blob = new Blob([svgMarkup], { type: 'image/svg+xml;charset=utf-8' });
|
|
299
|
+
downloadBlob(blob, `${exportFileName}.svg`);
|
|
300
|
+
}, [exportFileName]);
|
|
301
|
+
const exportPng = useCallback(async () => {
|
|
302
|
+
const svg = svgRef.current;
|
|
303
|
+
if (!svg) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
try {
|
|
307
|
+
const rasterSvgMarkup = buildRasterExportSvgMarkup(svg);
|
|
308
|
+
const { width, height } = getSvgExportSize(svg);
|
|
309
|
+
const canvas = document.createElement('canvas');
|
|
310
|
+
canvas.width = width;
|
|
311
|
+
canvas.height = height;
|
|
312
|
+
const context = canvas.getContext('2d');
|
|
313
|
+
if (!context) {
|
|
314
|
+
throw new Error('Canvas context is unavailable.');
|
|
315
|
+
}
|
|
316
|
+
context.fillStyle = '#ffffff';
|
|
317
|
+
context.fillRect(0, 0, width, height);
|
|
318
|
+
const canvgModule = (await import('canvg'));
|
|
319
|
+
const canvg = canvgModule.Canvg.fromString(context, rasterSvgMarkup, {
|
|
320
|
+
ignoreAnimation: true,
|
|
321
|
+
ignoreMouse: true,
|
|
322
|
+
});
|
|
323
|
+
await canvg.render();
|
|
324
|
+
const pngBlob = await new Promise((resolve) => {
|
|
325
|
+
try {
|
|
326
|
+
canvas.toBlob(resolve, 'image/png');
|
|
327
|
+
}
|
|
328
|
+
catch {
|
|
329
|
+
resolve(null);
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
if (!pngBlob) {
|
|
333
|
+
throw new Error('Failed to convert canvas to PNG blob.');
|
|
334
|
+
}
|
|
335
|
+
downloadBlob(pngBlob, `${exportFileName}.png`);
|
|
336
|
+
}
|
|
337
|
+
catch (error) {
|
|
338
|
+
console.error('PNG export failed', error);
|
|
339
|
+
}
|
|
340
|
+
}, [exportFileName]);
|
|
341
|
+
useEffect(() => {
|
|
342
|
+
bindInteractions();
|
|
343
|
+
const viewport = viewportRef.current;
|
|
344
|
+
if (!viewport) {
|
|
345
|
+
return undefined;
|
|
346
|
+
}
|
|
347
|
+
const observer = new MutationObserver(() => {
|
|
348
|
+
bindInteractions();
|
|
349
|
+
});
|
|
350
|
+
observer.observe(viewport, { childList: true, subtree: true });
|
|
351
|
+
return () => {
|
|
352
|
+
observer.disconnect();
|
|
353
|
+
cleanupRef.current?.();
|
|
354
|
+
cleanupRef.current = null;
|
|
355
|
+
svgRef.current = null;
|
|
356
|
+
};
|
|
357
|
+
}, [bindInteractions, definition]);
|
|
358
|
+
useEffect(() => {
|
|
359
|
+
if (!isExportMenuOpen) {
|
|
360
|
+
return undefined;
|
|
361
|
+
}
|
|
362
|
+
const onDocumentPointerDown = (event) => {
|
|
363
|
+
if (!exportMenuRef.current?.contains(event.target)) {
|
|
364
|
+
setIsExportMenuOpen(false);
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
const onDocumentKeyDown = (event) => {
|
|
368
|
+
if (event.key === 'Escape') {
|
|
369
|
+
setIsExportMenuOpen(false);
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
document.addEventListener('pointerdown', onDocumentPointerDown);
|
|
373
|
+
document.addEventListener('keydown', onDocumentKeyDown);
|
|
374
|
+
return () => {
|
|
375
|
+
document.removeEventListener('pointerdown', onDocumentPointerDown);
|
|
376
|
+
document.removeEventListener('keydown', onDocumentKeyDown);
|
|
377
|
+
};
|
|
378
|
+
}, [isExportMenuOpen]);
|
|
379
|
+
useEffect(() => {
|
|
380
|
+
const wrapper = wrapperRef.current;
|
|
381
|
+
if (!wrapper) {
|
|
382
|
+
return undefined;
|
|
383
|
+
}
|
|
384
|
+
const onFullscreenChange = () => {
|
|
385
|
+
setIsFullscreen(document.fullscreenElement === wrapper);
|
|
386
|
+
};
|
|
387
|
+
document.addEventListener('fullscreenchange', onFullscreenChange);
|
|
388
|
+
onFullscreenChange();
|
|
389
|
+
return () => {
|
|
390
|
+
document.removeEventListener('fullscreenchange', onFullscreenChange);
|
|
391
|
+
};
|
|
392
|
+
}, []);
|
|
393
|
+
return (_jsxs("div", { ref: wrapperRef, className: [styles.wrapper, isFullscreen ? styles.fullscreen : '', className ?? ''].join(' ').trim(), children: [_jsxs("div", { className: styles.toolbar, children: [_jsx("button", { type: "button", className: "button button--secondary button--sm", onClick: () => zoomBy(1), disabled: scale >= maxScale, "aria-label": "Zoom in", title: "Zoom in", children: "+" }), _jsx("button", { type: "button", className: "button button--secondary button--sm", onClick: () => zoomBy(-1), disabled: scale <= minScale, "aria-label": "Zoom out", title: "Zoom out", children: "-" }), _jsx("button", { type: "button", className: "button button--secondary button--sm", onClick: resetTransform, "aria-label": "Reset view", title: "Reset view", children: "Reset" }), _jsxs("span", { className: styles.zoomValue, children: [Math.round(scale * 100), "%"] }), _jsx("span", { className: styles.toolbarSpacer }), _jsxs("div", { className: styles.actions, children: [enableExport ? (_jsxs("div", { ref: exportMenuRef, className: styles.menuWrapper, children: [_jsx("button", { type: "button", className: `button button--secondary button--sm ${styles.iconButton}`, onClick: () => {
|
|
394
|
+
setIsExportMenuOpen((open) => !open);
|
|
395
|
+
}, "aria-label": "Export diagram", title: "Export diagram", "aria-expanded": isExportMenuOpen, "aria-haspopup": "menu", children: _jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", className: styles.icon, children: _jsx("path", { d: "M12 3v10m0 0l-4-4m4 4l4-4M5 14v5h14v-5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), isExportMenuOpen ? (_jsxs("div", { className: styles.menu, role: "menu", "aria-label": "Export format", children: [_jsx("button", { type: "button", className: styles.menuItem, role: "menuitem", onClick: () => {
|
|
396
|
+
exportSvg();
|
|
397
|
+
setIsExportMenuOpen(false);
|
|
398
|
+
}, children: "SVG" }), _jsx("button", { type: "button", className: styles.menuItem, role: "menuitem", onClick: () => {
|
|
399
|
+
void exportPng();
|
|
400
|
+
setIsExportMenuOpen(false);
|
|
401
|
+
}, children: "PNG" })] })) : null] })) : null, enableFullscreen ? (_jsx("button", { type: "button", className: `button button--secondary button--sm ${styles.iconButton}`, onClick: () => {
|
|
402
|
+
void toggleFullscreen();
|
|
403
|
+
}, "aria-label": isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen', title: isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen', children: _jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", className: styles.icon, children: isFullscreen ? (_jsx("path", { d: "M9 9H5V5m10 0h4v4m0 6v4h-4M9 19H5v-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })) : (_jsx("path", { d: "M9 5H5v4m10-4h4v4M5 15v4h4m10-4v4h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })) }) })) : null] })] }), _jsx("div", { ref: viewportRef, className: styles.viewport, role: "img", "aria-label": ariaLabel, children: mermaidElement }), showHint ? _jsx("p", { className: styles.hint, children: hintText }) : null] }));
|
|
404
|
+
}
|
|
405
|
+
//# sourceMappingURL=index.js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,CACV,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,EAEN,cAAK,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAC,KAAK,gBAAa,SAAS,YAChF,cAAc,GACX,EAEL,QAAQ,CAAC,CAAC,CAAC,YAAG,SAAS,EAAE,MAAM,CAAC,IAAI,YAAG,QAAQ,GAAK,CAAC,CAAC,CAAC,IAAI,IACxD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
position: relative;
|
|
3
|
+
margin: 1rem 0;
|
|
4
|
+
padding: 0.75rem;
|
|
5
|
+
border: 1px solid var(--ifm-color-emphasis-300);
|
|
6
|
+
border-radius: 12px;
|
|
7
|
+
background: linear-gradient(180deg, rgba(46, 133, 85, 0.06), rgba(46, 133, 85, 0));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.toolbar {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
gap: 0.5rem;
|
|
15
|
+
margin-bottom: 0.5rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.toolbarSpacer {
|
|
19
|
+
flex: 1 1 auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.actions {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 0.4rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.iconButton {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
width: 2rem;
|
|
33
|
+
height: 2rem;
|
|
34
|
+
padding: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.icon {
|
|
38
|
+
width: 1rem;
|
|
39
|
+
height: 1rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.menuWrapper {
|
|
43
|
+
position: relative;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.menu {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: calc(100% + 0.35rem);
|
|
49
|
+
right: 0;
|
|
50
|
+
z-index: 10;
|
|
51
|
+
display: grid;
|
|
52
|
+
min-width: 5rem;
|
|
53
|
+
padding: 0.25rem;
|
|
54
|
+
border: 1px solid var(--ifm-color-emphasis-300);
|
|
55
|
+
border-radius: 8px;
|
|
56
|
+
background: var(--ifm-background-surface-color);
|
|
57
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.menuItem {
|
|
61
|
+
border: 0;
|
|
62
|
+
border-radius: 6px;
|
|
63
|
+
background: transparent;
|
|
64
|
+
color: inherit;
|
|
65
|
+
text-align: left;
|
|
66
|
+
padding: 0.4rem 0.5rem;
|
|
67
|
+
font: inherit;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.menuItem:hover,
|
|
72
|
+
.menuItem:focus-visible {
|
|
73
|
+
background: var(--ifm-hover-overlay);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.zoomValue {
|
|
77
|
+
font-size: 0.85rem;
|
|
78
|
+
color: var(--ifm-color-emphasis-700);
|
|
79
|
+
min-width: 3rem;
|
|
80
|
+
text-align: left;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.viewport {
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
touch-action: none;
|
|
86
|
+
cursor: grab;
|
|
87
|
+
min-height: 220px;
|
|
88
|
+
user-select: none;
|
|
89
|
+
-webkit-user-select: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.isDragging {
|
|
93
|
+
cursor: grabbing;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.viewport :global(.mermaid) {
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.viewport :global(.mermaid svg) {
|
|
101
|
+
max-width: none;
|
|
102
|
+
height: auto;
|
|
103
|
+
will-change: transform;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.viewport :global(.docusaurus-mermaid-container),
|
|
107
|
+
.viewport :global(.docusaurus-mermaid-container *) {
|
|
108
|
+
user-select: none;
|
|
109
|
+
-webkit-user-select: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.hint {
|
|
113
|
+
margin: 0.5rem 0 0;
|
|
114
|
+
font-size: 0.78rem;
|
|
115
|
+
color: var(--ifm-color-emphasis-700);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.fullscreen {
|
|
119
|
+
margin: 0;
|
|
120
|
+
padding: 1rem;
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 100%;
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
border: none;
|
|
126
|
+
border-radius: 0;
|
|
127
|
+
background: var(--ifm-background-color, #ffffff);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.fullscreen:fullscreen {
|
|
131
|
+
position: fixed;
|
|
132
|
+
inset: 0;
|
|
133
|
+
width: 100vw;
|
|
134
|
+
height: 100vh;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
background: var(--ifm-background-color, #ffffff);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.fullscreen:fullscreen::backdrop {
|
|
141
|
+
background: var(--ifm-background-color, #ffffff);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.fullscreen .viewport {
|
|
145
|
+
flex: 1 1 auto;
|
|
146
|
+
min-height: 0;
|
|
147
|
+
min-height: calc(100vh - 9rem);
|
|
148
|
+
background: var(--ifm-background-color, #ffffff);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:global(html[data-theme='dark']) .fullscreen,
|
|
152
|
+
:global(html[data-theme='dark']) .fullscreen:fullscreen,
|
|
153
|
+
:global(html[data-theme='dark']) .fullscreen:fullscreen::backdrop,
|
|
154
|
+
:global(html[data-theme='dark']) .fullscreen .viewport {
|
|
155
|
+
background: #1b1b1d;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:global(html[data-theme='light']) .fullscreen,
|
|
159
|
+
:global(html[data-theme='light']) .fullscreen:fullscreen,
|
|
160
|
+
:global(html[data-theme='light']) .fullscreen:fullscreen::backdrop,
|
|
161
|
+
:global(html[data-theme='light']) .fullscreen .viewport {
|
|
162
|
+
background: #ffffff;
|
|
163
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAC/E,YAAY,EAAC,mBAAmB,EAAC,MAAM,sCAAsC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,sCAAsC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "docucraft",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Docucraft is an open source component library of reusable React components for Docusaurus.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"docusaurus",
|
|
7
|
+
"docucraft",
|
|
8
|
+
"components",
|
|
9
|
+
"library",
|
|
10
|
+
"opensource",
|
|
11
|
+
"mermaid",
|
|
12
|
+
"react",
|
|
13
|
+
"diagram",
|
|
14
|
+
"pan",
|
|
15
|
+
"zoom",
|
|
16
|
+
"fullscreen",
|
|
17
|
+
"export"
|
|
18
|
+
],
|
|
19
|
+
"homepage": "https://github.com/MrShasha/docucraft",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/MrShasha/docucraft.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/MrShasha/docucraft/issues"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"author": "Jiří Šašek",
|
|
29
|
+
"type": "module",
|
|
30
|
+
"main": "./dist/index.js",
|
|
31
|
+
"module": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"import": "./dist/index.js",
|
|
37
|
+
"default": "./dist/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./mermaid": {
|
|
40
|
+
"types": "./dist/components/MermaidDiagram/index.d.ts",
|
|
41
|
+
"import": "./dist/components/MermaidDiagram/index.js",
|
|
42
|
+
"default": "./dist/components/MermaidDiagram/index.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist",
|
|
47
|
+
"README.md",
|
|
48
|
+
"LICENSE",
|
|
49
|
+
"NOTICE",
|
|
50
|
+
"CONTRIBUTING.md",
|
|
51
|
+
"CODE_OF_CONDUCT.md"
|
|
52
|
+
],
|
|
53
|
+
"sideEffects": [
|
|
54
|
+
"**/*.css"
|
|
55
|
+
],
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public",
|
|
58
|
+
"provenance": true,
|
|
59
|
+
"tag": "latest"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=18.0"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"clean": "rimraf dist",
|
|
66
|
+
"typecheck": "tsc --noEmit -p tsconfig.build.json",
|
|
67
|
+
"build:ts": "tsc -p tsconfig.build.json",
|
|
68
|
+
"build:css": "copyfiles -u 1 \"src/**/*.module.css\" dist",
|
|
69
|
+
"build": "npm-run-all clean build:ts build:css",
|
|
70
|
+
"prepublishOnly": "npm-run-all typecheck build",
|
|
71
|
+
"pack:check": "npm pack --dry-run"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"@docusaurus/theme-mermaid": ">=3.0.0",
|
|
75
|
+
"react": ">=18.0.0",
|
|
76
|
+
"react-dom": ">=18.0.0"
|
|
77
|
+
},
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"canvg": "^4.0.3"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@types/react": "^19.0.0",
|
|
83
|
+
"copyfiles": "^2.4.1",
|
|
84
|
+
"npm-run-all": "^4.1.5",
|
|
85
|
+
"rimraf": "^6.0.1",
|
|
86
|
+
"typescript": "~6.0.2"
|
|
87
|
+
}
|
|
88
|
+
}
|