diff --git a/docusaurus.config.js b/docusaurus.config.js index 72891cc8a..9fd0fa012 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -104,6 +104,9 @@ const config = { containerId: process.env.GOOGLE_TAG_MANAGER || 'GTM-ABCD123' }, ], + [ + 'docusaurus-plugin-image-zoom', {}, + ], ], organizationName: 'cloudposse', projectName: 'docs', @@ -316,6 +319,16 @@ const config = { darkTheme: darkCodeTheme, additionalLanguages: ['hcl', 'bash', 'rego'], }, + zoom: { + selector: '.markdown :not(em) > img', + config: { + // options you can specify via https://github.com/francoischalifour/medium-zoom#usage + background: { + light: 'rgb(255, 255, 255)', + dark: 'rgb(50, 50, 50)' + } + } + } }), }; diff --git a/package-lock.json b/package-lock.json index 3b0fd2272..27a4e3ecf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@mdx-js/react": "^1.6.22", "asciinema-player": "^3.0.1", "clsx": "^1.2.1", + "docusaurus-plugin-image-zoom": "^1.0.1", "docusaurus-plugin-sass": "^0.2.3", "prism-react-renderer": "^1.3.5", "react": "^17.0.2", @@ -6773,6 +6774,18 @@ "node": ">=6" } }, + "node_modules/docusaurus-plugin-image-zoom": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-image-zoom/-/docusaurus-plugin-image-zoom-1.0.1.tgz", + "integrity": "sha512-96IpSKUx2RWy3db9aZ0s673OQo5DWgV9UVWouS+CPOSIVEdCWh6HKmWf6tB9rsoaiIF3oNn9keiyv6neEyKb1Q==", + "dependencies": { + "medium-zoom": "^1.0.6", + "validate-peer-dependencies": "^2.2.0" + }, + "peerDependencies": { + "@docusaurus/theme-classic": ">=2.2.0" + } + }, "node_modules/docusaurus-plugin-sass": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.3.tgz", @@ -9775,6 +9788,11 @@ "node": ">= 0.6" } }, + "node_modules/medium-zoom": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-1.1.0.tgz", + "integrity": "sha512-ewyDsp7k4InCUp3jRmwHBRFGyjBimKps/AJLjRSox+2q/2H4p/PNpQf+pwONWlJiOudkBXtbdmVbFjqyybfTmQ==" + }, "node_modules/memfs": { "version": "3.4.13", "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.13.tgz", @@ -11188,6 +11206,25 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-to-regexp": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", @@ -13072,6 +13109,17 @@ "node": ">=4" } }, + "node_modules/resolve-package-path": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/resolve-package-path/-/resolve-package-path-4.0.3.tgz", + "integrity": "sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==", + "dependencies": { + "path-root": "^0.1.1" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/resolve-pathname": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", @@ -14401,16 +14449,16 @@ } }, "node_modules/typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/ua-parser-js": { @@ -14968,6 +15016,18 @@ "node": ">=6" } }, + "node_modules/validate-peer-dependencies": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/validate-peer-dependencies/-/validate-peer-dependencies-2.2.0.tgz", + "integrity": "sha512-8X1OWlERjiUY6P6tdeU9E0EwO8RA3bahoOVG7ulOZT5MqgNDUO/BQoVjYiHPcNe+v8glsboZRIw9iToMAA2zAA==", + "dependencies": { + "resolve-package-path": "^4.0.3", + "semver": "^7.3.8" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", diff --git a/package.json b/package.json index fe975d730..e535d89de 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "@mdx-js/react": "^1.6.22", "asciinema-player": "^3.0.1", "clsx": "^1.2.1", + "docusaurus-plugin-image-zoom": "^1.0.1", "docusaurus-plugin-sass": "^0.2.3", "prism-react-renderer": "^1.3.5", "react": "^17.0.2",