diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml
index 225e4d20..a78b990e 100644
--- a/.github/workflows/develop.yml
+++ b/.github/workflows/develop.yml
@@ -24,7 +24,6 @@ jobs:
with:
node-version: 22
cache: 'npm'
-
- run: npm install
- run: npm run build-storybook --workspace=@tomplum/react-git-log-demo
@@ -39,6 +38,19 @@ jobs:
- run: npm install
- run: npm run lint
+ docs:
+ runs-on: ubuntu-latest
+ needs: [build-library, lint]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ - run: npm install
+ - run: npm run docs --workspace=@tomplum/react-git-log
+ working-directory: packages/library
+
unit-tests-library:
runs-on: ubuntu-latest
needs: [build-library, lint]
@@ -118,4 +130,4 @@ jobs:
with:
command: 'test'
json: true
- args: --severity-threshold=high --all-projects
+ args: --severity-threshold=high --all-projects
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5949aee0..d00b4382 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -49,6 +49,19 @@ jobs:
- run: npm install
- run: npm run lint
+ docs:
+ runs-on: ubuntu-latest
+ needs: [build-library, lint]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ - run: npm install
+ - run: npm run docs --workspace=@tomplum/react-git-log
+ working-directory: packages/library
+
unit-tests-library:
runs-on: ubuntu-latest
needs: [build-library, lint]
diff --git a/.gitignore b/.gitignore
index 1737f26b..6e2495d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,5 +26,5 @@ packages/library/tomplum-react-git-log-*
*storybook.log
packages/demo/storybook-static
-
-packages/library/coverage
\ No newline at end of file
+packages/library/coverage
+packages/library/docs
\ No newline at end of file
diff --git a/.run/library _ docs.run.xml b/.run/library _ docs.run.xml
new file mode 100644
index 00000000..87ce62dd
--- /dev/null
+++ b/.run/library _ docs.run.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index afc55dbb..c93b1808 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,7 @@ A flexible and interactive React component for visualising Git commit history. D
* [Development](#development)
* [References](#references)
* [Roadmap](#roadmap)
+* [Known Bugs](#known-bugs)
# Features
@@ -474,21 +475,26 @@ The following properties are injected into the functions `props` argument:
- And Iain Ballard for his experimental GUI [SnivellingGit](https://github.com/i-e-b/SnivellingGit/tree/master)
# Roadmap
+
+Storybook Demo
- Show code in stories
-- Expose custom theme object off the Theme type
-- Can Zustand help us here to reduce re-renders with GitContext Provider?
-- Expose component override props for things like CommitNode, CommitMessage etc.
-- Straight line prop to turn curves into right angles?
-- Line curve radius prop?
-- Fix React docgen in Storybook controls as its not showing the JSDoc from the interface props
-- Mobile responsiveness for the demo site
+- Fix React docgen in Storybook controls as it's not showing the JSDoc from the interface props
+- Mobile responsiveness
+
+Graphs
+- Straight line prop to turn curves into right angles
+- Line curve radius prop
- Tags should be independent. Add a new optional field to the log entry / commit objects.
- Branch / Tags column is fixed. Dynamically floor it to match the max tag size currently being rendered?
+- Support filtering so that the graph skips nodes
Canvas2D
-- Fade out of line at bottom
-- Tooltips?
+- Custom prop for BG colour because of how canvas alpha channel works
+- Tooltip support
- Row spacing support
-- First col background cut off by canvas
-- Branch/tag lines to lining up with nodes.
-- Selected node BG colour still isn't right.
\ No newline at end of file
+
+# Known Bugs
+- The `GraphCanvas2D` component has the preview/select background cut off by canvases left-edge.
+- The `GraphCanvas2D` component does not set the correct selected node BG colour, it's slightly off from the table row.
+- The `GraphHTMLGrid` component renders the node-edge gradient to last node, but should be solid.
+- The `GraphHTMLGrid` component is missing node edges from some commit nodes that are present in the canvas variant.
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index a3a81649..41b25d31 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1336,6 +1336,20 @@
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
+ "node_modules/@gerrit0/mini-shiki": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.7.0.tgz",
+ "integrity": "sha512-7iY9wg4FWXmeoFJpUL2u+tsmh0d0jcEJHAIzVxl3TG4KL493JNnisdLAILZ77zcD+z3J0keEXZ+lFzUgzQzPDg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/engine-oniguruma": "^3.7.0",
+ "@shikijs/langs": "^3.7.0",
+ "@shikijs/themes": "^3.7.0",
+ "@shikijs/types": "^3.7.0",
+ "@shikijs/vscode-textmate": "^10.0.2"
+ }
+ },
"node_modules/@humanfs/core": {
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
@@ -2570,6 +2584,55 @@
"sprintf-js": "~1.0.2"
}
},
+ "node_modules/@shikijs/engine-oniguruma": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.7.0.tgz",
+ "integrity": "sha512-5BxcD6LjVWsGu4xyaBC5bu8LdNgPCVBnAkWTtOCs/CZxcB22L8rcoWfv7Hh/3WooVjBZmFtyxhgvkQFedPGnFw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "3.7.0",
+ "@shikijs/vscode-textmate": "^10.0.2"
+ }
+ },
+ "node_modules/@shikijs/langs": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.7.0.tgz",
+ "integrity": "sha512-1zYtdfXLr9xDKLTGy5kb7O0zDQsxXiIsw1iIBcNOO8Yi5/Y1qDbJ+0VsFoqTlzdmneO8Ij35g7QKF8kcLyznCQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "3.7.0"
+ }
+ },
+ "node_modules/@shikijs/themes": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.7.0.tgz",
+ "integrity": "sha512-VJx8497iZPy5zLiiCTSIaOChIcKQwR0FebwE9S3rcN0+J/GTWwQ1v/bqhTbpbY3zybPKeO8wdammqkpXc4NVjQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "3.7.0"
+ }
+ },
+ "node_modules/@shikijs/types": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.7.0.tgz",
+ "integrity": "sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/vscode-textmate": "^10.0.2",
+ "@types/hast": "^3.0.4"
+ }
+ },
+ "node_modules/@shikijs/vscode-textmate": {
+ "version": "10.0.2",
+ "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz",
+ "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@storybook/addon-docs": {
"version": "9.0.14",
"resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-9.0.14.tgz",
@@ -3583,6 +3646,16 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/hast": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
+ "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
"node_modules/@types/json-schema": {
"version": "7.0.15",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
@@ -3641,6 +3714,13 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/unist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
+ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.0.tgz",
@@ -7913,6 +7993,16 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/linkify-it": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz",
+ "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "uc.micro": "^2.0.0"
+ }
+ },
"node_modules/local-pkg": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.1.tgz",
@@ -7985,6 +8075,13 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/lunr": {
+ "version": "2.3.9",
+ "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
+ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/lz-string": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
@@ -8033,6 +8130,37 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/markdown-it": {
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz",
+ "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^2.0.1",
+ "entities": "^4.4.0",
+ "linkify-it": "^5.0.0",
+ "mdurl": "^2.0.0",
+ "punycode.js": "^2.3.1",
+ "uc.micro": "^2.1.0"
+ },
+ "bin": {
+ "markdown-it": "bin/markdown-it.mjs"
+ }
+ },
+ "node_modules/markdown-it/node_modules/entities": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
@@ -8043,6 +8171,13 @@
"node": ">= 0.4"
}
},
+ "node_modules/mdurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz",
+ "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -8917,6 +9052,16 @@
"node": ">=6"
}
},
+ "node_modules/punycode.js": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz",
+ "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/quansync": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.10.tgz",
@@ -10472,6 +10617,43 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/typedoc": {
+ "version": "0.28.6",
+ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.6.tgz",
+ "integrity": "sha512-2VvfK6z3yupcu75qZB00LGICg4qa0lw4yPBrFcnZgqIMwpLjLWopTqNeJ4SSS/s92myvWBECY5zcOSMqpvW3CA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@gerrit0/mini-shiki": "^3.2.2",
+ "lunr": "^2.3.9",
+ "markdown-it": "^14.1.0",
+ "minimatch": "^9.0.5",
+ "yaml": "^2.7.1"
+ },
+ "bin": {
+ "typedoc": "bin/typedoc"
+ },
+ "engines": {
+ "node": ">= 18",
+ "pnpm": ">= 10"
+ },
+ "peerDependencies": {
+ "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x"
+ }
+ },
+ "node_modules/typedoc-plugin-markdown": {
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.7.0.tgz",
+ "integrity": "sha512-PitbnAps2vpcqK2gargKoiFXLWFttvwUbyns/E6zGIFG5Gz8ZQJGttHnYR9csOlcSjB/uyjd8tnoayrtsXG17w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "typedoc": "0.28.x"
+ }
+ },
"node_modules/typescript": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
@@ -10509,6 +10691,13 @@
"typescript": ">=4.8.4 <5.9.0"
}
},
+ "node_modules/uc.micro": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz",
+ "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/ufo": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz",
@@ -11262,6 +11451,19 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/yaml": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz",
+ "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "yaml": "bin.mjs"
+ },
+ "engines": {
+ "node": ">= 14.6"
+ }
+ },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
@@ -11288,14 +11490,14 @@
},
"devDependencies": {
"@chromatic-com/storybook": "^4.0.0",
- "@storybook/addon-docs": "^9.0.14",
- "@storybook/react": "^9.0.14",
- "@storybook/react-vite": "^9.0.14",
- "@tanstack/react-query": "^5.81.5",
+ "@storybook/addon-docs": "^9.0.12",
+ "@storybook/react": "^9.0.12",
+ "@storybook/react-vite": "^9.0.12",
+ "@tanstack/react-query": "^5.70.0",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"gh-pages": "^6.3.0",
- "storybook": "^9.0.14",
+ "storybook": "^9.0.12",
"typescript": "~5.8.0",
"typescript-eslint": "^8.24.1",
"vite": "^6.2.0",
@@ -11368,18 +11570,20 @@
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@testing-library/user-event": "^14.6.1",
- "@types/node": "^22.15.34",
+ "@types/node": "^22.13.10",
"@types/react": "^19.0.12",
"@types/react-dom": "^19.0.4",
"@vitejs/plugin-react-swc": "^3.8.0",
"@vitest/browser": "^3.0.9",
"@vitest/coverage-v8": "^3.0.9",
"@vitest/ui": "^3.0.9",
- "canvas": "^3.1.2",
+ "canvas": "^3.1.1",
"estree-walker": "^3.0.3",
"globals": "^16.0.0",
"jsdom": "^26.0.0",
"sass": "^1.85.1",
+ "typedoc": "^0.28.6",
+ "typedoc-plugin-markdown": "^4.7.0",
"typescript": "~5.8.0",
"vite": "^6.2.0",
"vite-bundle-analyzer": "^0.23.0",
diff --git a/packages/library/package.json b/packages/library/package.json
index 3ade3dfc..986858ef 100644
--- a/packages/library/package.json
+++ b/packages/library/package.json
@@ -35,7 +35,8 @@
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"release:local": "npm run build && npm pack",
- "clean": "rm -rf node_modules dist coverage"
+ "clean": "rm -rf node_modules dist coverage",
+ "docs": "typedoc"
},
"dependencies": {
"@uidotdev/usehooks": "^2.4.1",
@@ -76,6 +77,8 @@
"globals": "^16.0.0",
"jsdom": "^26.0.0",
"sass": "^1.85.1",
+ "typedoc": "^0.28.6",
+ "typedoc-plugin-markdown": "^4.7.0",
"typescript": "~5.8.0",
"vite": "^6.2.0",
"vite-bundle-analyzer": "^0.23.0",
diff --git a/packages/library/src/hooks/useTheme/types.ts b/packages/library/src/hooks/useTheme/types.ts
index 32e48f27..372e3d86 100644
--- a/packages/library/src/hooks/useTheme/types.ts
+++ b/packages/library/src/hooks/useTheme/types.ts
@@ -3,7 +3,7 @@ import { Commit } from 'types/Commit'
export interface ThemeFunctions {
/**
* The current active theme mode.
- * @xample light, dark
+ * @example light, dark
*/
theme: ThemeMode
diff --git a/packages/library/src/index.ts b/packages/library/src/index.ts
index eb9eb19e..80c791c1 100644
--- a/packages/library/src/index.ts
+++ b/packages/library/src/index.ts
@@ -6,6 +6,7 @@ export * from './GitLogPaged'
// Core Types
export * from './types/Commit'
export * from './types/GitLogEntry'
+export * from './hooks/useTheme/types'
// Sub-components
export * from './modules/Tags'
diff --git a/packages/library/src/modules/Graph/index.ts b/packages/library/src/modules/Graph/index.ts
index 47ee08ee..c04c16e5 100644
--- a/packages/library/src/modules/Graph/index.ts
+++ b/packages/library/src/modules/Graph/index.ts
@@ -1,3 +1,7 @@
export * from './types'
+
export * from './GraphCanvas2D'
-export * from './GraphHTMLGrid'
\ No newline at end of file
+export * from './strategies/Canvas/types'
+
+export * from './GraphHTMLGrid'
+export * from './strategies/Grid/types'
\ No newline at end of file
diff --git a/packages/library/src/modules/Graph/strategies/Grid/components/HorizontalLine/HorizontalLine.spec.tsx b/packages/library/src/modules/Graph/strategies/Grid/components/HorizontalLine/HorizontalLine.spec.tsx
index 0b9f485c..88809f27 100644
--- a/packages/library/src/modules/Graph/strategies/Grid/components/HorizontalLine/HorizontalLine.spec.tsx
+++ b/packages/library/src/modules/Graph/strategies/Grid/components/HorizontalLine/HorizontalLine.spec.tsx
@@ -12,6 +12,8 @@ const spyTheme = (stubs: Partial) => {
hoverColour: 'hoverColour',
theme: 'dark',
textColour: 'textColour',
+ getCommitNodeColours: vi.fn(),
+ getGraphColumnSelectedBackgroundColour: vi.fn(),
reduceOpacity: vi.fn(),
getCommitColour: vi.fn(),
getTooltipBackground: vi.fn(),
diff --git a/packages/library/src/modules/Graph/types.ts b/packages/library/src/modules/Graph/types.ts
index ec3ecafe..dcaba242 100644
--- a/packages/library/src/modules/Graph/types.ts
+++ b/packages/library/src/modules/Graph/types.ts
@@ -1,5 +1,5 @@
import { NodeTheme } from '../../hooks/useTheme'
-import { CustomCommitNode } from '../Graph/strategies/Grid'
+import { CustomCommitNode } from './strategies/Grid/types'
export type GraphOrientation = 'normal' | 'flipped'
@@ -37,7 +37,7 @@ export interface HTMLGridGraphProps extends GraphPropsCommon {
highlightedBackgroundHeight?: number
}
-interface GraphPropsCommon {
+export interface GraphPropsCommon {
/**
* The theme to apply the commit node
* elements in the graph.
@@ -63,7 +63,7 @@ interface GraphPropsCommon {
* The orientation of the graph.
*
* Normal mode draws the graph from
- * left to right so the checked-out
+ * left to right, so the checked-out
* branch is on the left-hand side.
*
* Flipped mode inverts the graph
diff --git a/packages/library/src/types.ts b/packages/library/src/types.ts
index 9fb3a0e6..ede01e90 100644
--- a/packages/library/src/types.ts
+++ b/packages/library/src/types.ts
@@ -10,6 +10,19 @@ interface GitLogCommonProps {
*/
entries: GitLogEntry[]
+ /**
+ * A list of SHA1 commit hashes that belong
+ * to commits that would normally be present
+ * on in the log but have been filtered out
+ * due to something like a search.
+ *
+ * The log, and any relevant subcomponents,
+ * will filter these commits out, so they no
+ * longer render, but will change their styling
+ * to make it clear that commits are missing.
+ */
+ filteredCommits?: string[]
+
/**
* The variant of the default colour
* theme to apply to the log.
@@ -57,7 +70,7 @@ interface GitLogCommonProps {
/**
* The default width of the graph in pixels.
*
- * Can be changed dynamically if {@link enableResize}
+ * Can be changed dynamically if {@link GraphPropsCommon.enableResize enableResize}
* is true.
*
* @default 300
@@ -164,11 +177,11 @@ export interface GitLogPagedProps extends GitLogCommonProps {
/**
* The SHA1 hash of the HEAD commit of
- * the {@link currentBranch} that is checked
+ * the {@link GitLogProps.currentBranch currentBranch} that is checked
* out in the repository.
*
* Only needs to be passed in if you are
- * passing in a sub-set of the Git log
+ * passing in a subset of the Git log
* {@link entries} due to managing your
* own pagination.
*
diff --git a/packages/library/typedoc.json b/packages/library/typedoc.json
new file mode 100644
index 00000000..f216c629
--- /dev/null
+++ b/packages/library/typedoc.json
@@ -0,0 +1,16 @@
+{
+ "entryPoints": ["src/index.ts"],
+ "out": "docs",
+ "includeVersion": true,
+ "excludePrivate": true,
+ "excludeProtected": true,
+ "excludeInternal": true,
+ "excludeExternals": false,
+ "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/__tests__/**","**/_test/**", "**/*.stories.tsx"],
+ "tsconfig": "tsconfig.build.json",
+ "plugin": ["typedoc-plugin-markdown"],
+ "preserveWatchOutput": true,
+ "sort": ["source-order"],
+ "logLevel": "Info",
+ "treatWarningsAsErrors": true
+}
\ No newline at end of file