@r74tech/docusaurus-plugin-panzoom 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -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/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [2.2.0](https://github.com/r74tech/docusaurus-plugin-panzoom/compare/v2.1.0...v2.2.0) (2025-07-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add Prettier and ESLint to documentation website ([33dd381](https://github.com/r74tech/docusaurus-plugin-panzoom/commit/33dd381ae478260cade8f15e8c69670c75628905))
|
|
7
|
+
|
|
8
|
+
# [2.1.0](https://github.com/r74tech/docusaurus-plugin-panzoom/compare/v2.0.0...v2.1.0) (2025-04-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add Docusaurus documentation and CI workflows ([5d0ed86](https://github.com/r74tech/docusaurus-plugin-panzoom/commit/5d0ed86e2b5447c533fb4b15c220d32f176c9528))
|
|
14
|
+
* add support for excludeClass option ([246d378](https://github.com/r74tech/docusaurus-plugin-panzoom/commit/246d378f33c4f24c5a2cde22ba55a14daa65b217))
|
|
15
|
+
|
|
1
16
|
# [2.0.0](https://github.com/r74tech/docusaurus-plugin-panzoom/compare/v1.0.1...v2.0.0) (2025-04-09)
|
|
2
17
|
|
|
3
18
|
|
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
|
};
|