diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 4206896..279b8b0 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -12,6 +12,16 @@ export default withMermaid( base: "/temporal-contract/", lang: "en-US", + // `@btravstack/theme` re-exports VitePress's default theme, which imports + // `.css`. Externalizing it during SSR makes Node try to `import` those + // stylesheets and throw `ERR_UNKNOWN_FILE_EXTENSION`. Transform the theme + // package through Vite instead so the CSS imports are handled. + vite: { + ssr: { + noExternal: ["@btravstack/theme"], + }, + }, + ignoreDeadLinks: [ // Ignore localhost links as they're for development examples /^http:\/\/localhost/, diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css deleted file mode 100644 index 2b90513..0000000 --- a/docs/.vitepress/theme/custom.css +++ /dev/null @@ -1,9 +0,0 @@ -/** - * btravstack shared design system. - * Keeps these docs in visual sync with the landing page and the other - * btravstack projects. Source of truth: - * https://github.com/btravstack/btravstack.github.io/tree/main/theme - * Pinned to an immutable commit SHA for reproducible builds — to pull in - * upstream token changes, bump the SHA below. Do not fork colors here. - */ -@import "https://cdn.jsdelivr.net/gh/btravstack/btravstack.github.io@v1.0.0/theme/vitepress.css"; diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index c495bc1..de50c2e 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,4 +1,3 @@ -import DefaultTheme from "vitepress/theme"; -import "./custom.css"; +import Theme from "@btravstack/theme"; -export default DefaultTheme; +export default Theme; diff --git a/docs/package.json b/docs/package.json index a12c385..efdc450 100644 --- a/docs/package.json +++ b/docs/package.json @@ -18,6 +18,7 @@ "@temporal-contract/worker": "workspace:*" }, "devDependencies": { + "@btravstack/theme": "catalog:", "@temporal-contract/tsconfig": "workspace:*", "@types/node": "catalog:", "mermaid": "11.15.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8186b1..b486f97 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,9 @@ settings: catalogs: default: + '@btravstack/theme': + specifier: 1.2.0 + version: 1.2.0 '@changesets/cli': specifier: 2.31.0 version: 2.31.0 @@ -105,10 +108,10 @@ importers: devDependencies: '@changesets/cli': specifier: 'catalog:' - version: 2.31.0(@types/node@24.13.1) + version: 2.31.0(@types/node@24.13.2) '@commitlint/cli': specifier: 'catalog:' - version: 21.0.2(@types/node@24.13.1)(conventional-commits-parser@6.4.0)(typescript@6.0.3) + version: 21.0.2(@types/node@24.13.2)(conventional-commits-parser@6.4.0)(typescript@6.0.3) '@commitlint/config-conventional': specifier: 'catalog:' version: 21.0.2 @@ -143,6 +146,9 @@ importers: specifier: workspace:* version: link:../packages/worker devDependencies: + '@btravstack/theme': + specifier: 'catalog:' + version: 1.2.0(vitepress@1.6.4(@algolia/client-search@5.53.0)(@types/node@24.13.2)(lightningcss@1.32.0)(postcss@8.5.15)(terser@5.48.0)(typescript@6.0.3)) '@temporal-contract/tsconfig': specifier: workspace:* version: link:../tools/tsconfig @@ -384,7 +390,7 @@ importers: version: 1.4.1(typescript@6.0.3) vitest: specifier: 'catalog:' - version: 4.1.8(@types/node@24.13.1)(@vitest/coverage-v8@4.1.8)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) + version: 4.1.8(@types/node@24.13.2)(@vitest/coverage-v8@4.1.8)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) packages/testing: dependencies: @@ -644,6 +650,11 @@ packages: '@braintree/sanitize-url@7.1.2': resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==} + '@btravstack/theme@1.2.0': + resolution: {integrity: sha512-T6zN2V8xPY3ohlbjILbP01AMO1xbGl39HuPeVoY2qlJYTRVBRW3RBvuXJVeQAuRdLFcl0xTgFjzHsl9B8RLlkA==} + peerDependencies: + vitepress: ^1.6.0 + '@changesets/apply-release-plan@7.1.1': resolution: {integrity: sha512-9qPCm/rLx/xoOFXIHGB229+4GOL76S4MC+7tyOuTsR6+1jYlfFDQORdvwR5hDA6y4FL2BPt3qpbcQIS+dW85LA==} @@ -1311,12 +1322,6 @@ packages: '@mermaid-js/parser@1.1.1': resolution: {integrity: sha512-VuHdsYMK1bT6X2JbcAaWAhugTRvRBRyuZgd+c22swUeI9g/ntaxF7CY7dYarhZovofCbUNO0G7JesfmNtjYOCw==} - '@napi-rs/wasm-runtime@1.1.4': - resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} - peerDependencies: - '@emnapi/core': ^1.7.1 - '@emnapi/runtime': ^1.7.1 - '@napi-rs/wasm-runtime@1.1.5': resolution: {integrity: sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==} peerDependencies: @@ -2526,9 +2531,6 @@ packages: '@types/node@18.19.130': resolution: {integrity: sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==} - '@types/node@24.13.1': - resolution: {integrity: sha512-RSpUJGmvsJ1ZeBehQZFhIdpsz+bIpES0nIQXko4Ybq+N+kX6XvOq3Jo+iJ82FWLdblFq85AsMikd3m35jgezYg==} - '@types/node@24.13.2': resolution: {integrity: sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==} @@ -4082,10 +4084,6 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - obug@2.1.2: - resolution: {integrity: sha512-AWGB9WFcRXOQs48Z/udjI5ZcZMHXwX8XPByNpOydgcGsDLIzjGizhoMWJyKAWze7AVW/2W1i+/gPX4YtKe5cyg==} - engines: {node: '>=12.20.0'} - obug@2.1.3: resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==} engines: {node: '>=12.20.0'} @@ -4425,11 +4423,6 @@ packages: secure-json-parse@4.1.0: resolution: {integrity: sha512-l4KnYfEyqYJxDwlNVyRfO2E4NTHfMKAWdUuA8J0yve2Dz/E/PdBepY03RvyJpssIpRFwJoCD55wA+mEDs6ByWA==} - semver@7.8.3: - resolution: {integrity: sha512-wnilbGyMxzbY7dNOl7jpKbLSjcfeweJWU5j4+u5qW+6/wuGD9KzIGOyZnQVSBM9E7DtWaaH3CyHkppYrKYoxwg==} - engines: {node: '>=10'} - hasBin: true - semver@7.8.5: resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} engines: {node: '>=10'} @@ -5259,6 +5252,10 @@ snapshots: '@braintree/sanitize-url@7.1.2': {} + '@btravstack/theme@1.2.0(vitepress@1.6.4(@algolia/client-search@5.53.0)(@types/node@24.13.2)(lightningcss@1.32.0)(postcss@8.5.15)(terser@5.48.0)(typescript@6.0.3))': + dependencies: + vitepress: 1.6.4(@algolia/client-search@5.53.0)(@types/node@24.13.2)(lightningcss@1.32.0)(postcss@8.5.15)(terser@5.48.0)(typescript@6.0.3) + '@changesets/apply-release-plan@7.1.1': dependencies: '@changesets/config': 3.1.4 @@ -5273,7 +5270,7 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.8.3 + semver: 7.8.5 '@changesets/assemble-release-plan@6.0.10': dependencies: @@ -5282,13 +5279,13 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 - semver: 7.8.3 + semver: 7.8.5 '@changesets/changelog-git@0.2.1': dependencies: '@changesets/types': 6.1.0 - '@changesets/cli@2.31.0(@types/node@24.13.1)': + '@changesets/cli@2.31.0(@types/node@24.13.2)': dependencies: '@changesets/apply-release-plan': 7.1.1 '@changesets/assemble-release-plan': 6.0.10 @@ -5304,7 +5301,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.3(@types/node@24.13.1) + '@inquirer/external-editor': 1.0.3(@types/node@24.13.2) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 enquirer: 2.4.1 @@ -5313,7 +5310,7 @@ snapshots: package-manager-detector: 0.2.11 picocolors: 1.1.1 resolve-from: 5.0.0 - semver: 7.8.3 + semver: 7.8.5 spawndamnit: 3.0.1 term-size: 2.2.1 transitivePeerDependencies: @@ -5339,7 +5336,7 @@ snapshots: '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 picocolors: 1.1.1 - semver: 7.8.3 + semver: 7.8.5 '@changesets/get-release-plan@4.0.16': dependencies: @@ -5404,11 +5401,11 @@ snapshots: '@chevrotain/types@11.1.2': {} - '@commitlint/cli@21.0.2(@types/node@24.13.1)(conventional-commits-parser@6.4.0)(typescript@6.0.3)': + '@commitlint/cli@21.0.2(@types/node@24.13.2)(conventional-commits-parser@6.4.0)(typescript@6.0.3)': dependencies: '@commitlint/format': 21.0.1 '@commitlint/lint': 21.0.2 - '@commitlint/load': 21.0.2(@types/node@24.13.1)(typescript@6.0.3) + '@commitlint/load': 21.0.2(@types/node@24.13.2)(typescript@6.0.3) '@commitlint/read': 21.0.2(conventional-commits-parser@6.4.0) '@commitlint/types': 21.0.1 tinyexec: 1.2.4 @@ -5444,7 +5441,7 @@ snapshots: '@commitlint/is-ignored@21.0.2': dependencies: '@commitlint/types': 21.0.1 - semver: 7.8.3 + semver: 7.8.5 '@commitlint/lint@21.0.2': dependencies: @@ -5453,14 +5450,14 @@ snapshots: '@commitlint/rules': 21.0.2 '@commitlint/types': 21.0.1 - '@commitlint/load@21.0.2(@types/node@24.13.1)(typescript@6.0.3)': + '@commitlint/load@21.0.2(@types/node@24.13.2)(typescript@6.0.3)': dependencies: '@commitlint/config-validator': 21.0.1 '@commitlint/execute-rule': 21.0.1 '@commitlint/resolve-extends': 21.0.1 '@commitlint/types': 21.0.1 cosmiconfig: 9.0.2(typescript@6.0.3) - cosmiconfig-typescript-loader: 6.3.0(@types/node@24.13.1)(cosmiconfig@9.0.2(typescript@6.0.3))(typescript@6.0.3) + cosmiconfig-typescript-loader: 6.3.0(@types/node@24.13.2)(cosmiconfig@9.0.2(typescript@6.0.3))(typescript@6.0.3) es-toolkit: 1.47.0 is-plain-obj: 4.1.0 picocolors: 1.1.1 @@ -5516,7 +5513,7 @@ snapshots: dependencies: '@simple-libs/child-process-utils': 1.0.2 '@simple-libs/stream-utils': 1.2.0 - semver: 7.8.3 + semver: 7.8.5 optionalDependencies: conventional-commits-parser: 6.4.0 @@ -5760,12 +5757,12 @@ snapshots: '@iconify/types': 2.0.0 import-meta-resolve: 4.2.0 - '@inquirer/external-editor@1.0.3(@types/node@24.13.1)': + '@inquirer/external-editor@1.0.3(@types/node@24.13.2)': dependencies: chardet: 2.1.1 iconv-lite: 0.7.2 optionalDependencies: - '@types/node': 24.13.1 + '@types/node': 24.13.2 '@isaacs/cliui@8.0.2': dependencies: @@ -5961,13 +5958,6 @@ snapshots: dependencies: '@chevrotain/types': 11.1.2 - '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': - dependencies: - '@emnapi/core': 1.10.0 - '@emnapi/runtime': 1.10.0 - '@tybys/wasm-util': 0.10.2 - optional: true - '@napi-rs/wasm-runtime@1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': dependencies: '@emnapi/core': 1.10.0 @@ -6046,7 +6036,7 @@ snapshots: dependencies: '@emnapi/core': 1.10.0 '@emnapi/runtime': 1.10.0 - '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + '@napi-rs/wasm-runtime': 1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) optional: true '@oxc-parser/binding-win32-arm64-msvc@0.133.0': @@ -6840,10 +6830,6 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@24.13.1': - dependencies: - undici-types: 7.18.2 - '@types/node@24.13.2': dependencies: undici-types: 7.18.2 @@ -6894,7 +6880,7 @@ snapshots: istanbul-lib-report: 3.0.1 istanbul-reports: 3.2.0 magicast: 0.5.3 - obug: 2.1.2 + obug: 2.1.3 std-env: 4.1.0 tinyrainbow: 3.1.0 vitest: 4.1.8(@types/node@24.13.2)(@vitest/coverage-v8@4.1.8)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) @@ -7434,9 +7420,9 @@ snapshots: dependencies: layout-base: 2.0.1 - cosmiconfig-typescript-loader@6.3.0(@types/node@24.13.1)(cosmiconfig@9.0.2(typescript@6.0.3))(typescript@6.0.3): + cosmiconfig-typescript-loader@6.3.0(@types/node@24.13.2)(cosmiconfig@9.0.2(typescript@6.0.3))(typescript@6.0.3): dependencies: - '@types/node': 24.13.1 + '@types/node': 24.13.2 cosmiconfig: 9.0.2(typescript@6.0.3) jiti: 2.6.1 typescript: 6.0.3 @@ -8291,7 +8277,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.8.3 + semver: 7.8.5 mark.js@8.11.1: {} @@ -8437,8 +8423,6 @@ snapshots: normalize-path@3.0.0: {} - obug@2.1.2: {} - obug@2.1.3: {} on-exit-leak-free@2.1.2: {} @@ -8697,7 +8681,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.1 - '@types/node': 24.13.1 + '@types/node': 24.13.2 long: 5.3.2 pump@3.0.4: @@ -8905,8 +8889,6 @@ snapshots: secure-json-parse@4.1.0: {} - semver@7.8.3: {} - semver@7.8.5: {} shebang-command@2.0.0: @@ -9339,22 +9321,6 @@ snapshots: lightningcss: 1.32.0 terser: 5.48.0 - vite@8.0.16(@types/node@24.13.1)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0): - dependencies: - lightningcss: 1.32.0 - picomatch: 4.0.4 - postcss: 8.5.15 - rolldown: 1.0.3 - tinyglobby: 0.2.17 - optionalDependencies: - '@types/node': 24.13.1 - esbuild: 0.28.1 - fsevents: 2.3.3 - jiti: 2.7.0 - terser: 5.48.0 - tsx: 4.22.4 - yaml: 2.9.0 - vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: lightningcss: 1.32.0 @@ -9427,45 +9393,6 @@ snapshots: - typescript - universal-cookie - vitest@4.1.8(@types/node@24.13.1)(@vitest/coverage-v8@4.1.8)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0): - dependencies: - '@vitest/expect': 4.1.8 - '@vitest/mocker': 4.1.8(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0)) - '@vitest/pretty-format': 4.1.8 - '@vitest/runner': 4.1.8 - '@vitest/snapshot': 4.1.8 - '@vitest/spy': 4.1.8 - '@vitest/utils': 4.1.8 - es-module-lexer: 2.1.0 - expect-type: 1.3.0 - magic-string: 0.30.21 - obug: 2.1.2 - pathe: 2.0.3 - picomatch: 4.0.4 - std-env: 4.1.0 - tinybench: 2.9.0 - tinyexec: 1.2.4 - tinyglobby: 0.2.17 - tinyrainbow: 3.1.0 - vite: 8.0.16(@types/node@24.13.1)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 24.13.1 - '@vitest/coverage-v8': 4.1.8(vitest@4.1.8) - transitivePeerDependencies: - - '@vitejs/devtools' - - esbuild - - jiti - - less - - msw - - sass - - sass-embedded - - stylus - - sugarss - - terser - - tsx - - yaml - vitest@4.1.8(@types/node@24.13.2)(@vitest/coverage-v8@4.1.8)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: '@vitest/expect': 4.1.8 @@ -9478,7 +9405,7 @@ snapshots: es-module-lexer: 2.1.0 expect-type: 1.3.0 magic-string: 0.30.21 - obug: 2.1.2 + obug: 2.1.3 pathe: 2.0.3 picomatch: 4.0.4 std-env: 4.1.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index a3f3375..cc158f7 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -45,6 +45,7 @@ packages: - docs catalog: + "@btravstack/theme": 1.2.0 "@changesets/cli": 2.31.0 "@commitlint/cli": 21.0.2 "@commitlint/config-conventional": 21.0.2 @@ -88,5 +89,6 @@ minimumReleaseAgeStrict: true # First-party btravstack packages — the maturity delay guards against # third-party supply-chain risk, which does not apply to our own org's libraries. minimumReleaseAgeExclude: + - "@btravstack/theme" - "unthrown" - "@unthrown/vitest"