Skip to content

Commit c4082d3

Browse files
committed
Bump @villagekit/ui to ^1.1.1; stub next/* in screenshot
ui 1.1.1 ships proper dist/ exports (publishConfig.exports now honored via pnpm publish upstream). Screenshot is a vite app and doesn't pull in next, so stub next/link & next/navigation to let vite tree-shake ui's barrel re-exported nav components.
1 parent e1a2871 commit c4082d3

15 files changed

Lines changed: 127 additions & 50 deletions

File tree

apps/storybook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@villagekit/part-gridpanel": "workspace:*",
1818
"@villagekit/sandbox": "workspace:*",
1919
"@villagekit/tsconfig": "workspace:*",
20-
"@villagekit/ui": "^1.0.0",
20+
"@villagekit/ui": "^1.1.1",
2121
"react": "^19.1.0",
2222
"react-dom": "^19.1.0",
2323
"use-query-params": "^2.2.1"

apps/studio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@villagekit/plugin-smart-fasteners": "workspace:*",
3838
"@villagekit/product": "workspace:*",
3939
"@villagekit/product-kit": "workspace:*",
40-
"@villagekit/ui": "^1.0.0",
40+
"@villagekit/ui": "^1.1.1",
4141
"@xstate/react": "^6.0.0",
4242
"codemirror": "^6.0.1",
4343
"codemirror-theme-catppuccin": "^0.3.0",

commands/screenshot/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
"exports": {
77
"./package.json": "./package.json"
88
},
9-
"files": ["./src", "./dist"],
9+
"files": [
10+
"./src",
11+
"./dist"
12+
],
1013
"sideEffects": false,
1114
"scripts": {
1215
"build:pkg": "vite build",
@@ -33,7 +36,7 @@
3336
"@villagekit/plugin-smart-fasteners": "workspace:*",
3437
"@villagekit/product": "workspace:*",
3538
"@villagekit/product-kit": "workspace:*",
36-
"@villagekit/ui": "^1.0.0",
39+
"@villagekit/ui": "^1.1.1",
3740
"@vitejs/plugin-react": "^4.3.1",
3841
"argsclopts": "^1.0.4",
3942
"lodash-es": "^4.17.21",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { AnchorHTMLAttributes, ForwardedRef } from 'react'
2+
import { forwardRef } from 'react'
3+
4+
const NextLink = forwardRef(function NextLink(
5+
props: AnchorHTMLAttributes<HTMLAnchorElement>,
6+
ref: ForwardedRef<HTMLAnchorElement>,
7+
) {
8+
return <a ref={ref} {...props} />
9+
})
10+
11+
export default NextLink
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function usePathname(): string {
2+
return ''
3+
}

commands/screenshot/vite.config.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
import { readFile, readdir, realpath } from 'node:fs/promises'
2-
import { join } from 'node:path'
2+
import { fileURLToPath } from 'node:url'
3+
import { dirname, join } from 'node:path'
34
import react from '@vitejs/plugin-react'
45
import { reverse, sortBy } from 'lodash-es'
56
import { defineConfig } from 'vite'
67

8+
const here = dirname(fileURLToPath(import.meta.url))
9+
10+
// @villagekit/ui re-exports nav/layouts from its barrel, and those components
11+
// import from next/link & next/navigation. Next is an optional peer; we don't
12+
// use those nav components here, so stub the modules out so vite can tree-shake.
13+
const nextStubs = {
14+
'next/link': join(here, 'src/next-stubs/link.tsx'),
15+
'next/navigation': join(here, 'src/next-stubs/navigation.ts'),
16+
}
17+
718
// https://vitejs.dev/config/
819
export default defineConfig({
920
plugins: [react()],
1021
resolve: {
1122
alias: {
23+
...nextStubs,
1224
...(await workspaceAliases()),
1325
},
1426
},

core/parameters/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
},
1212
"./package.json": "./package.json"
1313
},
14-
"files": ["./src", "./dist"],
14+
"files": [
15+
"./src",
16+
"./dist"
17+
],
1518
"sideEffects": false,
1619
"scripts": {
1720
"build:pkg": "tsup src",
@@ -30,7 +33,7 @@
3033
},
3134
"homepage": "https://github.com/villagekit/gridkit/tree/main/core/parameters#readme",
3235
"dependencies": {
33-
"@villagekit/ui": "^1.0.0",
36+
"@villagekit/ui": "^1.1.1",
3437
"@xstate/react": "^6.0.0",
3538
"lodash-es": "^4.17.21",
3639
"query-string": "^9.0.0",

core/part/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
},
3030
"./package.json": "./package.json"
3131
},
32-
"files": ["./src", "./dist"],
32+
"files": [
33+
"./src",
34+
"./dist"
35+
],
3336
"sideEffects": false,
3437
"scripts": {
3538
"build:pkg": "tsup src",
@@ -50,7 +53,7 @@
5053
"dependencies": {
5154
"@tarikjabiri/dxf": "^2.8.9",
5255
"@villagekit/math": "workspace:*",
53-
"@villagekit/ui": "^1.0.0",
56+
"@villagekit/ui": "^1.1.1",
5457
"lodash-es": "^4.17.21",
5558
"nanoid": "^5.0.7",
5659
"zod": "^3.23.8"

core/product/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
},
1212
"./package.json": "./package.json"
1313
},
14-
"files": ["./src", "./dist"],
14+
"files": [
15+
"./src",
16+
"./dist"
17+
],
1518
"sideEffects": false,
1619
"scripts": {
1720
"build:pkg": "tsup src",
@@ -33,7 +36,7 @@
3336
"@curvenote/ansi-to-react": "^7.0.0",
3437
"@villagekit/parameters": "workspace:*",
3538
"@villagekit/sandbox": "workspace:*",
36-
"@villagekit/ui": "^1.0.0",
39+
"@villagekit/ui": "^1.1.1",
3740
"@xstate/react": "^6.0.0",
3841
"react-icons": "^5.2.1",
3942
"use-fit-text-new": "^3.0.0",

core/sandbox/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@
1111
},
1212
"./package.json": "./package.json"
1313
},
14-
"files": ["./src", "./dist"],
15-
"sideEffects": ["./src/globals.ts", "./dist/globals.js"],
14+
"files": [
15+
"./src",
16+
"./dist"
17+
],
18+
"sideEffects": [
19+
"./src/globals.ts",
20+
"./dist/globals.js"
21+
],
1622
"scripts": {
1723
"build:pkg": "tsup src",
1824
"deps": "depcheck",
@@ -33,7 +39,7 @@
3339
"@juggle/resize-observer": "^3.4.0",
3440
"@react-three/drei": "^10.0.0",
3541
"@villagekit/parameters": "workspace:*",
36-
"@villagekit/ui": "^1.0.0",
42+
"@villagekit/ui": "^1.1.1",
3743
"camera-controls": "^1.38.2",
3844
"r3f-perf": "^7.2.1",
3945
"react-icons": "^5.2.1",

0 commit comments

Comments
 (0)