@vantagecompute/docusaurus-theme 0.1.3 → 0.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.
@@ -5,18 +5,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.rehypeTabsTransform = exports.staticDir = void 0;
7
7
  exports.default = themeVantage;
8
- const path_1 = __importDefault(require("path"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
9
  function themeVantage() {
10
10
  return {
11
11
  name: '@vantagecompute/docusaurus-theme',
12
12
  getThemePath() {
13
- return path_1.default.resolve(__dirname, '../src/theme');
13
+ return node_path_1.default.resolve(__dirname, '../src/theme');
14
14
  },
15
15
  getPathsToWatch() {
16
- return [path_1.default.resolve(__dirname, '../src/theme/**/*.{js,jsx,ts,tsx,css}')];
16
+ return [node_path_1.default.resolve(__dirname, '../src/theme/**/*.{js,jsx,ts,tsx,css}')];
17
17
  },
18
18
  getClientModules() {
19
- return [path_1.default.resolve(__dirname, '../src/css/custom.css')];
19
+ return [node_path_1.default.resolve(__dirname, '../src/css/custom.css')];
20
20
  },
21
21
  };
22
22
  }
@@ -31,7 +31,7 @@ function themeVantage() {
31
31
  * };
32
32
  * ```
33
33
  */
34
- exports.staticDir = path_1.default.resolve(__dirname, '../static');
34
+ exports.staticDir = node_path_1.default.resolve(__dirname, '../static');
35
35
  // Re-export the rehype utility (plain JS, lives in src/utils/)
36
- exports.rehypeTabsTransform = require(path_1.default.resolve(__dirname, '../src/utils/rehypeTabsTransform'));
37
- //# sourceMappingURL=index.js.map
36
+ exports.rehypeTabsTransform = require(node_path_1.default.resolve(__dirname, '../src/utils/rehypeTabsTransform'));
37
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":";;;;;;;AAAA,0DAA6B;AAG7B;IACE,OAAO;QACL,IAAI,EAAE,kCAAkC;QAExC,YAAY;YACV,OAAO,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACjD,CAAC;QAED,eAAe;YACb,OAAO,CAAC,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uCAAuC,CAAC,CAAC,CAAC;QAC5E,CAAC;QAED,gBAAgB;YACd,OAAO,CAAC,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC5D,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACU,QAAA,SAAS,GAAG,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAE9D,+DAA+D;AAClD,QAAA,mBAAmB,GAAG,OAAO,CAAC,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC,CAAC"}
@@ -13,4 +13,4 @@ export default function themeVantage(): Plugin;
13
13
  */
14
14
  export declare const staticDir: string;
15
15
  export declare const rehypeTabsTransform: any;
16
- //# sourceMappingURL=index.d.ts.map
16
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,UAAU,YAAY,IAAI,MAAM,CAgB7C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,QAAuC,CAAC;AAG9D,eAAO,MAAM,mBAAmB,KAAuE,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@vantagecompute/docusaurus-theme",
3
- "version": "0.1.3",
3
+ "version": "0.2.1",
4
4
  "description": "Shared Vantage Compute Docusaurus theme — design system, brand assets, and common theme overrides for all vantagecompute documentation sites.",
5
5
  "license": "MIT",
6
- "main": "lib/index.js",
7
- "types": "lib/index.d.ts",
6
+ "main": "lib/index.cjs",
7
+ "types": "lib/index.d.cts",
8
8
  "files": [
9
9
  "lib",
10
10
  "static",
@@ -16,21 +16,22 @@
16
16
  },
17
17
  "peerDependencies": {
18
18
  "@docusaurus/core": "^3.0.0",
19
- "@docusaurus/theme-common": "^3.0.0",
20
19
  "@docusaurus/plugin-content-docs": "^3.0.0",
20
+ "@docusaurus/theme-common": "^3.0.0",
21
21
  "react": "^18.0.0 || ^19.0.0",
22
22
  "react-dom": "^18.0.0 || ^19.0.0"
23
23
  },
24
24
  "dependencies": {
25
- "clsx": "^2.0.0",
26
- "unist-util-visit": "^5.0.0"
25
+ "clsx": "^2.1.1",
26
+ "unist-util-visit": "^5.1.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@docusaurus/module-type-aliases": "^3.10.1",
30
30
  "@docusaurus/tsconfig": "^3.10.1",
31
31
  "@docusaurus/types": "^3.10.1",
32
+ "@types/node": "^26.1.1",
32
33
  "@types/react": "^19.2.17",
33
- "typescript": "~5.6.2"
34
+ "typescript": "~7.0.2"
34
35
  },
35
36
  "repository": {
36
37
  "type": "git",
@@ -42,5 +43,8 @@
42
43
  "vantage",
43
44
  "vantagecompute",
44
45
  "documentation"
45
- ]
46
+ ],
47
+ "engines": {
48
+ "node": ">=22.0"
49
+ }
46
50
  }
@@ -1,4 +1,4 @@
1
- import path from 'path';
1
+ import path from 'node:path';
2
2
  import type { Plugin } from '@docusaurus/types';
3
3
 
4
4
  export default function themeVantage(): Plugin {
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import {memo} from 'react'
2
2
  import clsx from 'clsx'
3
3
  import useIsBrowser from '@docusaurus/useIsBrowser'
4
4
  import { translate } from '@docusaurus/Translate'
@@ -57,4 +57,4 @@ function ColorModeToggle({ className, buttonClassName, value, onChange }) {
57
57
  </div>
58
58
  )
59
59
  }
60
- export default React.memo(ColorModeToggle)
60
+ export default memo(ColorModeToggle)
@@ -2,7 +2,6 @@
2
2
  * Custom DocBreadcrumbs component that ensures full path representation
3
3
  * e.g., Home -> Platform -> <platform page>
4
4
  */
5
- import React from 'react';
6
5
  import clsx from 'clsx';
7
6
  import {ThemeClassNames} from '@docusaurus/theme-common';
8
7
  import {useSidebarBreadcrumbs} from '@docusaurus/plugin-content-docs/client';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal';
3
2
 
4
3
  export default function NavbarMobileSidebarSecondaryMenu() {
@@ -11,7 +11,7 @@
11
11
  * `useTabsContextValue` (for value extraction) and the rendered
12
12
  * `TabsContainer`.
13
13
  */
14
- import React from 'react';
14
+ import {useRef} from 'react';
15
15
  import clsx from 'clsx';
16
16
  import {ThemeClassNames} from '@docusaurus/theme-common';
17
17
  import {
@@ -26,12 +26,12 @@ import styles from './styles.module.css';
26
26
 
27
27
  function TabList({className}) {
28
28
  const {selectedValue, selectValue, tabValues, block} = useTabs();
29
- const tabRefs = [];
29
+ const tabRefs = useRef([]);
30
30
  const {blockElementScrollPositionUntilNextRender} =
31
31
  useScrollPositionBlocker();
32
32
  const handleTabChange = (event) => {
33
33
  const newTab = event.currentTarget;
34
- const newTabIndex = tabRefs.indexOf(newTab);
34
+ const newTabIndex = tabRefs.current.indexOf(newTab);
35
35
  const newTabValue = tabValues[newTabIndex].value;
36
36
  if (newTabValue !== selectedValue) {
37
37
  blockElementScrollPositionUntilNextRender(newTab);
@@ -46,13 +46,13 @@ function TabList({className}) {
46
46
  break;
47
47
  }
48
48
  case 'ArrowRight': {
49
- const nextTab = tabRefs.indexOf(event.currentTarget) + 1;
50
- focusElement = tabRefs[nextTab] ?? tabRefs[0];
49
+ const nextTab = tabRefs.current.indexOf(event.currentTarget) + 1;
50
+ focusElement = tabRefs.current[nextTab] ?? tabRefs.current[0];
51
51
  break;
52
52
  }
53
53
  case 'ArrowLeft': {
54
- const prevTab = tabRefs.indexOf(event.currentTarget) - 1;
55
- focusElement = tabRefs[prevTab] ?? tabRefs[tabRefs.length - 1];
54
+ const prevTab = tabRefs.current.indexOf(event.currentTarget) - 1;
55
+ focusElement = tabRefs.current[prevTab] ?? tabRefs.current[tabRefs.current.length - 1];
56
56
  break;
57
57
  }
58
58
  default:
@@ -78,7 +78,7 @@ function TabList({className}) {
78
78
  aria-selected={selectedValue === value}
79
79
  key={value}
80
80
  ref={(ref) => {
81
- tabRefs.push(ref);
81
+ tabRefs.current.push(ref);
82
82
  }}
83
83
  onKeyDown={handleKeydown}
84
84
  onClick={handleTabChange}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,UAAU,YAAY,IAAI,MAAM,CAgB7C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,QAAuC,CAAC;AAG9D,eAAO,MAAM,mBAAmB,KAAuE,CAAC"}
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAGA,+BAgBC;AAnBD,gDAAwB;AAGxB,SAAwB,YAAY;IAClC,OAAO;QACL,IAAI,EAAE,kCAAkC;QAExC,YAAY;YACV,OAAO,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACjD,CAAC;QAED,eAAe;YACb,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uCAAuC,CAAC,CAAC,CAAC;QAC5E,CAAC;QAED,gBAAgB;YACd,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC5D,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACU,QAAA,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAE9D,+DAA+D;AAClD,QAAA,mBAAmB,GAAG,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC,CAAC"}