bsmnt 0.1.0 → 0.1.2
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.
- package/CHANGELOG.md +16 -0
- package/CLAUDE.md +2 -3
- package/README.md +1 -2
- package/bun.lock +1 -1
- package/docs/architecture.drawio +0 -16
- package/docs/architecture.mermaid +1 -7
- package/package.json +42 -42
- package/packages/cli/bin/index.js +0 -4
- package/packages/cli/src/commands/add-integration.js +1 -14
- package/packages/cli/src/commands/create.js +28 -5
- package/packages/create-basement-app/src/mergers/config.js +4 -26
- package/packages/create-basement-app/src/mergers/index.js +2 -5
- package/packages/create-basement-app/templates/webgl/components/webgl/canvas/index.tsx +3 -8
- package/packages/create-basement-app/templates/webgl/components/webgl/components/scene/index.tsx +11 -3
- package/packages/create-basement-app/templates/webgl/lib/renderer.ts +7 -0
- package/packages/create-basement-app/templates/webgl/package.json +2 -2
- package/packages/create-basement-app/integrations/basehub/config.js +0 -21
- package/packages/create-basement-app/integrations/basehub/files/README.md +0 -3
- package/packages/create-basement-app/templates/webgpu/.biome/plugins/README.md +0 -21
- package/packages/create-basement-app/templates/webgpu/.biome/plugins/no-anchor-element.grit +0 -12
- package/packages/create-basement-app/templates/webgpu/.biome/plugins/no-relative-parent-imports.grit +0 -10
- package/packages/create-basement-app/templates/webgpu/.biome/plugins/no-unnecessary-forwardref.grit +0 -9
- package/packages/create-basement-app/templates/webgpu/.cursor/rules/README.md +0 -184
- package/packages/create-basement-app/templates/webgpu/.cursor/rules/architecture.mdc +0 -437
- package/packages/create-basement-app/templates/webgpu/.cursor/rules/components.mdc +0 -436
- package/packages/create-basement-app/templates/webgpu/.cursor/rules/integrations.mdc +0 -447
- package/packages/create-basement-app/templates/webgpu/.cursor/rules/main.mdc +0 -278
- package/packages/create-basement-app/templates/webgpu/.cursor/rules/styling.mdc +0 -433
- package/packages/create-basement-app/templates/webgpu/.editorconfig +0 -40
- package/packages/create-basement-app/templates/webgpu/.env.example +0 -81
- package/packages/create-basement-app/templates/webgpu/.gitattributes +0 -19
- package/packages/create-basement-app/templates/webgpu/.github/PULL_REQUEST_TEMPLATE.md +0 -14
- package/packages/create-basement-app/templates/webgpu/.github/workflows/lighthouse-to-slack.yml +0 -136
- package/packages/create-basement-app/templates/webgpu/.vscode/extensions.json +0 -20
- package/packages/create-basement-app/templates/webgpu/.vscode/settings.json +0 -105
- package/packages/create-basement-app/templates/webgpu/README.md +0 -221
- package/packages/create-basement-app/templates/webgpu/_gitignore +0 -67
- package/packages/create-basement-app/templates/webgpu/app/favicon.ico +0 -0
- package/packages/create-basement-app/templates/webgpu/app/layout.tsx +0 -104
- package/packages/create-basement-app/templates/webgpu/app/page.tsx +0 -275
- package/packages/create-basement-app/templates/webgpu/app/robots.ts +0 -15
- package/packages/create-basement-app/templates/webgpu/app/sitemap.ts +0 -16
- package/packages/create-basement-app/templates/webgpu/biome.json +0 -250
- package/packages/create-basement-app/templates/webgpu/components/basement.svg +0 -1
- package/packages/create-basement-app/templates/webgpu/components/layout/footer/index.tsx +0 -27
- package/packages/create-basement-app/templates/webgpu/components/layout/header/index.tsx +0 -11
- package/packages/create-basement-app/templates/webgpu/components/layout/theme/index.tsx +0 -66
- package/packages/create-basement-app/templates/webgpu/components/layout/wrapper/index.tsx +0 -65
- package/packages/create-basement-app/templates/webgpu/components/ui/README.md +0 -77
- package/packages/create-basement-app/templates/webgpu/components/ui/image/README.md +0 -37
- package/packages/create-basement-app/templates/webgpu/components/ui/image/index.tsx +0 -224
- package/packages/create-basement-app/templates/webgpu/components/ui/link/index.tsx +0 -146
- package/packages/create-basement-app/templates/webgpu/lib/README.md +0 -33
- package/packages/create-basement-app/templates/webgpu/lib/hooks/index.ts +0 -12
- package/packages/create-basement-app/templates/webgpu/lib/hooks/use-device-detection.ts +0 -81
- package/packages/create-basement-app/templates/webgpu/lib/hooks/use-media-breakpoint.ts +0 -15
- package/packages/create-basement-app/templates/webgpu/lib/hooks/use-prefetch.ts +0 -74
- package/packages/create-basement-app/templates/webgpu/lib/integrations/.gitkeep +0 -0
- package/packages/create-basement-app/templates/webgpu/lib/scripts/dev.ts +0 -52
- package/packages/create-basement-app/templates/webgpu/lib/scripts/generate-component.ts +0 -322
- package/packages/create-basement-app/templates/webgpu/lib/scripts/generate-page.ts +0 -193
- package/packages/create-basement-app/templates/webgpu/lib/scripts/generate.ts +0 -79
- package/packages/create-basement-app/templates/webgpu/lib/scripts/utils.ts +0 -246
- package/packages/create-basement-app/templates/webgpu/lib/store/app.ts +0 -11
- package/packages/create-basement-app/templates/webgpu/lib/store/index.ts +0 -11
- package/packages/create-basement-app/templates/webgpu/lib/styles/README.md +0 -64
- package/packages/create-basement-app/templates/webgpu/lib/styles/cn.ts +0 -7
- package/packages/create-basement-app/templates/webgpu/lib/styles/colors.ts +0 -63
- package/packages/create-basement-app/templates/webgpu/lib/styles/config.ts +0 -34
- package/packages/create-basement-app/templates/webgpu/lib/styles/css/global.css +0 -85
- package/packages/create-basement-app/templates/webgpu/lib/styles/css/index.css +0 -6
- package/packages/create-basement-app/templates/webgpu/lib/styles/css/reset.css +0 -166
- package/packages/create-basement-app/templates/webgpu/lib/styles/css/root.css +0 -68
- package/packages/create-basement-app/templates/webgpu/lib/styles/css/tailwind.css +0 -132
- package/packages/create-basement-app/templates/webgpu/lib/styles/easings.ts +0 -21
- package/packages/create-basement-app/templates/webgpu/lib/styles/fonts.ts +0 -28
- package/packages/create-basement-app/templates/webgpu/lib/styles/index.ts +0 -12
- package/packages/create-basement-app/templates/webgpu/lib/styles/layout.mjs +0 -27
- package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/README.md +0 -29
- package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/generate-root.ts +0 -57
- package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/generate-tailwind.ts +0 -162
- package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/postcss-functions.mjs +0 -168
- package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/setup-styles.ts +0 -24
- package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/utils.ts +0 -20
- package/packages/create-basement-app/templates/webgpu/lib/styles/typography.ts +0 -36
- package/packages/create-basement-app/templates/webgpu/lib/utils/README.md +0 -40
- package/packages/create-basement-app/templates/webgpu/lib/utils/css.d.ts +0 -21
- package/packages/create-basement-app/templates/webgpu/lib/utils/easings.ts +0 -240
- package/packages/create-basement-app/templates/webgpu/lib/utils/fetch.ts +0 -84
- package/packages/create-basement-app/templates/webgpu/lib/utils/math.test.ts +0 -221
- package/packages/create-basement-app/templates/webgpu/lib/utils/math.ts +0 -236
- package/packages/create-basement-app/templates/webgpu/lib/utils/metadata.ts +0 -126
- package/packages/create-basement-app/templates/webgpu/lib/utils/strings.test.ts +0 -166
- package/packages/create-basement-app/templates/webgpu/lib/utils/strings.ts +0 -246
- package/packages/create-basement-app/templates/webgpu/lib/utils/types.d.ts +0 -15
- package/packages/create-basement-app/templates/webgpu/lib/utils/viewport.test.ts +0 -256
- package/packages/create-basement-app/templates/webgpu/lib/utils/viewport.ts +0 -193
- package/packages/create-basement-app/templates/webgpu/next.config.ts +0 -142
- package/packages/create-basement-app/templates/webgpu/package.json +0 -69
- package/packages/create-basement-app/templates/webgpu/postcss.config.mjs +0 -42
- package/packages/create-basement-app/templates/webgpu/public/fonts/geist/Geist-Mono.woff2 +0 -0
- package/packages/create-basement-app/templates/webgpu/tsconfig.json +0 -43
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Viewport Utilities
|
|
3
|
-
*
|
|
4
|
-
* Convert pixel values to viewport-relative sizes and relative units.
|
|
5
|
-
* Mirrors the SASS functions for consistent responsive scaling.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* import { tovw, torem, toem } from '@/utils/viewport'
|
|
10
|
-
*
|
|
11
|
-
* // Convert to viewport width units
|
|
12
|
-
* const paddingX = tovw(16, 24) // "1.5625vw" with a minimum of 24px
|
|
13
|
-
* const fontSize = tovw(16, 'mobile') // "4.27vw" (no undefined needed!)
|
|
14
|
-
* const width = tovw(100, 50, 'desktop') // "max(50px, 6.94vw)"
|
|
15
|
-
*
|
|
16
|
-
* // Convert to rem/em
|
|
17
|
-
* const spacing = torem(24) // "1.5rem"
|
|
18
|
-
* const padding = toem(16, 14) // "1.14em"
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* ## When to Use
|
|
22
|
-
*
|
|
23
|
-
* - **CSS**: Prefer the PostCSS functions `tovw()`, `torem()`, and `toem()`
|
|
24
|
-
* - **JavaScript/TypeScript**: Use these for dynamic calculations or inline styles
|
|
25
|
-
* - **Runtime calculations**: Use for canvas, WebGL, or dynamic sizing
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
import { breakpoints } from "@/lib/styles/config"
|
|
29
|
-
|
|
30
|
-
type ContextSize = keyof typeof breakpoints | number
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Resolves a context size to a pixel value.
|
|
34
|
-
*
|
|
35
|
-
* @param context - Context identifier or pixel value
|
|
36
|
-
* @returns Pixel value
|
|
37
|
-
*/
|
|
38
|
-
function resolveContext(context: ContextSize): number {
|
|
39
|
-
if (typeof context === "number") {
|
|
40
|
-
return context
|
|
41
|
-
}
|
|
42
|
-
return breakpoints[context] ?? breakpoints.desktop
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Checks if a value is a context identifier (breakpoint key).
|
|
47
|
-
*
|
|
48
|
-
* @param value - Value to check
|
|
49
|
-
* @returns True if value is a breakpoint key
|
|
50
|
-
*/
|
|
51
|
-
function isContextIdentifier(
|
|
52
|
-
value: unknown
|
|
53
|
-
): value is keyof typeof breakpoints {
|
|
54
|
-
return typeof value === "string" && value in breakpoints
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Rounds a number to a maximum of 4 decimal places, removing trailing zeros.
|
|
59
|
-
*
|
|
60
|
-
* @param value - Number to round
|
|
61
|
-
* @returns Rounded number as string without trailing zeros
|
|
62
|
-
*/
|
|
63
|
-
function roundToMaxDecimals(value: number): string {
|
|
64
|
-
// Round to 4 decimal places
|
|
65
|
-
const rounded = Math.round(value * 10000) / 10000
|
|
66
|
-
// Convert to string and remove trailing zeros only after decimal point
|
|
67
|
-
return rounded
|
|
68
|
-
.toString()
|
|
69
|
-
.replace(/\.0+$/, "")
|
|
70
|
-
.replace(/(\.\d*?)0+$/, "$1")
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Function overloads for tovw
|
|
74
|
-
export function tovw(target: number): string
|
|
75
|
-
export function tovw(target: number, min: number): string
|
|
76
|
-
export function tovw(target: number, context: ContextSize): string
|
|
77
|
-
export function tovw(target: number, min: number, context: ContextSize): string
|
|
78
|
-
/**
|
|
79
|
-
* Converts a pixel value to viewport width units (vw).
|
|
80
|
-
* Optionally applies a minimum value using CSS max().
|
|
81
|
-
*
|
|
82
|
-
* Supports flexible parameter patterns:
|
|
83
|
-
* - `tovw(target)` - Uses default desktop context
|
|
84
|
-
* - `tovw(target, min)` - Sets minimum value
|
|
85
|
-
* - `tovw(target, context)` - Sets context (auto-detected if string identifier)
|
|
86
|
-
* - `tovw(target, min, context)` - Sets both min and context
|
|
87
|
-
*
|
|
88
|
-
* @param target - Target pixel value to convert
|
|
89
|
-
* @param minOrContext - Optional minimum pixel value OR context identifier
|
|
90
|
-
* @param context - Context size identifier (if min was provided)
|
|
91
|
-
* @returns CSS string with vw units (e.g., "6.94vw" or "max(50px, 6.94vw)")
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```ts
|
|
95
|
-
* // Basic conversion
|
|
96
|
-
* tovw(100) // "6.94vw"
|
|
97
|
-
* tovw(16, 'mobile') // "4.27vw" (no undefined needed!)
|
|
98
|
-
*
|
|
99
|
-
* // With minimum value
|
|
100
|
-
* tovw(100, 50) // "max(50px, 6.94vw)"
|
|
101
|
-
* tovw(100, 50, 'mobile') // "max(50px, 6.94vw)" with mobile context
|
|
102
|
-
*
|
|
103
|
-
* // Custom context
|
|
104
|
-
* tovw(100, 1920) // "5.21vw"
|
|
105
|
-
*
|
|
106
|
-
* // Handles zero
|
|
107
|
-
* tovw(0) // "0"
|
|
108
|
-
* ```
|
|
109
|
-
*/
|
|
110
|
-
export function tovw(
|
|
111
|
-
target: number,
|
|
112
|
-
minOrContext?: number | ContextSize,
|
|
113
|
-
context?: ContextSize
|
|
114
|
-
): string {
|
|
115
|
-
if (target === 0) {
|
|
116
|
-
return "0"
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
let min: number | undefined
|
|
120
|
-
let resolvedContext: ContextSize = "desktop"
|
|
121
|
-
|
|
122
|
-
if (minOrContext !== undefined) {
|
|
123
|
-
if (isContextIdentifier(minOrContext)) {
|
|
124
|
-
// Second param is context
|
|
125
|
-
resolvedContext = minOrContext
|
|
126
|
-
if (context !== undefined) {
|
|
127
|
-
resolvedContext = context
|
|
128
|
-
}
|
|
129
|
-
} else if (typeof minOrContext === "number") {
|
|
130
|
-
// Second param is min value
|
|
131
|
-
min = minOrContext
|
|
132
|
-
if (context !== undefined) {
|
|
133
|
-
resolvedContext = context
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
} else if (context !== undefined) {
|
|
137
|
-
// Only context provided as third param (legacy support)
|
|
138
|
-
resolvedContext = context
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const contextSize = resolveContext(resolvedContext)
|
|
142
|
-
const vwValue = (target / contextSize) * 100
|
|
143
|
-
|
|
144
|
-
if (min !== undefined) {
|
|
145
|
-
return `max(${min}px, ${roundToMaxDecimals(vwValue)}vw)`
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return `${roundToMaxDecimals(vwValue)}vw`
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Converts a pixel value to rem units.
|
|
153
|
-
*
|
|
154
|
-
* @param target - Target pixel value to convert
|
|
155
|
-
* @param context - Base font size in pixels (default: 16)
|
|
156
|
-
* @returns CSS string with rem units (e.g., "1.5rem")
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* ```ts
|
|
160
|
-
* torem(24) // "1.5rem" (24 / 16)
|
|
161
|
-
* torem(18, 14) // "1.29rem" (18 / 14)
|
|
162
|
-
* torem(0) // "0"
|
|
163
|
-
* ```
|
|
164
|
-
*/
|
|
165
|
-
export function torem(target: number, context = 16): string {
|
|
166
|
-
if (target === 0) {
|
|
167
|
-
return "0"
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return `${roundToMaxDecimals(target / context)}rem`
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Converts a pixel value to em units.
|
|
175
|
-
*
|
|
176
|
-
* @param target - Target pixel value to convert
|
|
177
|
-
* @param context - Context size in pixels (required)
|
|
178
|
-
* @returns CSS string with em units (e.g., "1.5em")
|
|
179
|
-
*
|
|
180
|
-
* @example
|
|
181
|
-
* ```ts
|
|
182
|
-
* toem(24, 16) // "1.5em" (24 / 16)
|
|
183
|
-
* toem(18, 14) // "1.29em" (18 / 14)
|
|
184
|
-
* toem(0, 16) // "0"
|
|
185
|
-
* ```
|
|
186
|
-
*/
|
|
187
|
-
export function toem(target: number, context: number): string {
|
|
188
|
-
if (target === 0) {
|
|
189
|
-
return "0"
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return `${roundToMaxDecimals(target / context)}em`
|
|
193
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import withBundleAnalyzer from "@next/bundle-analyzer"
|
|
2
|
-
import type { NextConfig } from "next"
|
|
3
|
-
|
|
4
|
-
const nextConfig: NextConfig = {
|
|
5
|
-
reactStrictMode: true,
|
|
6
|
-
reactCompiler: true,
|
|
7
|
-
typedRoutes: true,
|
|
8
|
-
turbopack: {
|
|
9
|
-
rules: {
|
|
10
|
-
"*.svg": {
|
|
11
|
-
loaders: [
|
|
12
|
-
{
|
|
13
|
-
loader: "@svgr/webpack",
|
|
14
|
-
options: {
|
|
15
|
-
memo: true,
|
|
16
|
-
dimensions: false,
|
|
17
|
-
svgoConfig: {
|
|
18
|
-
multipass: true,
|
|
19
|
-
plugins: [
|
|
20
|
-
"removeDimensions",
|
|
21
|
-
"removeOffCanvasPaths",
|
|
22
|
-
"reusePaths",
|
|
23
|
-
"removeElementsByAttr",
|
|
24
|
-
"removeStyleElement",
|
|
25
|
-
"removeScriptElement",
|
|
26
|
-
"prefixIds",
|
|
27
|
-
"cleanupIds",
|
|
28
|
-
{
|
|
29
|
-
name: "cleanupNumericValues",
|
|
30
|
-
params: {
|
|
31
|
-
floatPrecision: 1,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "convertPathData",
|
|
36
|
-
params: {
|
|
37
|
-
floatPrecision: 1,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "convertTransform",
|
|
42
|
-
params: {
|
|
43
|
-
floatPrecision: 1,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: "cleanupListOfValues",
|
|
48
|
-
params: {
|
|
49
|
-
floatPrecision: 1,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
as: "*.js",
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
cacheComponents: true,
|
|
62
|
-
experimental: {
|
|
63
|
-
browserDebugInfoInTerminal: true,
|
|
64
|
-
optimizePackageImports: [
|
|
65
|
-
"@react-three/drei",
|
|
66
|
-
"@react-three/fiber",
|
|
67
|
-
"gsap",
|
|
68
|
-
"three",
|
|
69
|
-
"postprocessing",
|
|
70
|
-
"lenis",
|
|
71
|
-
"zustand",
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
images: {
|
|
75
|
-
dangerouslyAllowSVG: true,
|
|
76
|
-
remotePatterns: [],
|
|
77
|
-
minimumCacheTTL: 60 * 60 * 24 * 30, // 30 days
|
|
78
|
-
qualities: [90],
|
|
79
|
-
formats: ["image/avif", "image/webp"],
|
|
80
|
-
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
|
|
81
|
-
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
|
|
82
|
-
},
|
|
83
|
-
headers: async () => [
|
|
84
|
-
{
|
|
85
|
-
source: "/(.*)",
|
|
86
|
-
headers: [
|
|
87
|
-
{
|
|
88
|
-
key: "X-Content-Type-Options",
|
|
89
|
-
value: "nosniff",
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
key: "Content-Security-Policy",
|
|
93
|
-
value: "frame-ancestors 'self';",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
key: "X-Frame-Options",
|
|
97
|
-
value: "SAMEORIGIN",
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
key: "X-XSS-Protection",
|
|
101
|
-
value: "1; mode=block",
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
key: "X-DNS-Prefetch-Control",
|
|
105
|
-
value: "on",
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
key: "Strict-Transport-Security",
|
|
109
|
-
value: "max-age=63072000; includeSubDomains; preload",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
key: "Permissions-Policy",
|
|
113
|
-
value: "camera=(), microphone=(), geolocation=()",
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
redirects: async () => [
|
|
119
|
-
{
|
|
120
|
-
source: "/home",
|
|
121
|
-
destination: "/",
|
|
122
|
-
permanent: true,
|
|
123
|
-
},
|
|
124
|
-
],
|
|
125
|
-
rewrites: async () => [
|
|
126
|
-
{
|
|
127
|
-
source: "/",
|
|
128
|
-
destination: "/home",
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const bundleAnalyzerPlugin = withBundleAnalyzer({
|
|
134
|
-
enabled: process.env.ANALYZE === "true",
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
const NextApp = () => {
|
|
138
|
-
const plugins = [bundleAnalyzerPlugin]
|
|
139
|
-
return plugins.reduce((config, plugin) => plugin(config), nextConfig)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export default NextApp
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "basement-next-starter",
|
|
3
|
-
"description": "Basement Next.js starter template",
|
|
4
|
-
"version": "0.1.0",
|
|
5
|
-
"private": true,
|
|
6
|
-
"packageManager": "bun@1.3.5",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"analyze": "cross-env ANALYZE=true bun run build",
|
|
9
|
-
"analyze:experimental": "next experimental-analyze",
|
|
10
|
-
"build": "bun run setup:styles && next build",
|
|
11
|
-
"dev": "bun ./lib/scripts/dev.ts",
|
|
12
|
-
"dev:https": "bun ./lib/scripts/dev.ts --https",
|
|
13
|
-
"dev:inspect": "bun ./lib/scripts/dev.ts --inspect",
|
|
14
|
-
"format": "biome format --write .",
|
|
15
|
-
"generate": "bun ./lib/scripts/generate.ts",
|
|
16
|
-
"lighthouse": "bunx @unlighthouse/cli --site http://localhost:3000",
|
|
17
|
-
"lint": "biome lint --max-diagnostics=200",
|
|
18
|
-
"lint:fix": "biome lint --write --unsafe --max-diagnostics=200",
|
|
19
|
-
"setup:styles": "bun ./lib/styles/scripts/setup-styles.ts",
|
|
20
|
-
"start": "next start",
|
|
21
|
-
"test": "bun test",
|
|
22
|
-
"test:setup": "bun test lib/scripts/setup-project.test.ts",
|
|
23
|
-
"typecheck": "tsgo --noEmit",
|
|
24
|
-
"typecheck:compare": "bun run typecheck:tsc && bun run typecheck",
|
|
25
|
-
"typecheck:tsc": "tsc --noEmit --incremental false"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@radix-ui/react-navigation-menu": "^1.2.5",
|
|
29
|
-
"@react-three/drei": "^11.0.0-alpha.4",
|
|
30
|
-
"@react-three/fiber": "10.0.0-alpha.2",
|
|
31
|
-
"class-variance-authority": "^0.7.1",
|
|
32
|
-
"leva": "^0.9.35",
|
|
33
|
-
"lucide-react": "^0.474.0",
|
|
34
|
-
"next": "16.1.4",
|
|
35
|
-
"react": "19.2.4",
|
|
36
|
-
"react-dom": "19.2.4",
|
|
37
|
-
"react-use": "^17.6.0",
|
|
38
|
-
"tailwind-merge": "^3.4.0",
|
|
39
|
-
"three": "^0.182.0",
|
|
40
|
-
"zod": "^4.3.6",
|
|
41
|
-
"zustand": "^5.0.10"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@biomejs/biome": "2.3.11",
|
|
45
|
-
"@clack/prompts": "^0.11.0",
|
|
46
|
-
"@csstools/postcss-global-data": "^3.1.0",
|
|
47
|
-
"@next/bundle-analyzer": "16.1.1",
|
|
48
|
-
"@svgr/webpack": "^8.1.0",
|
|
49
|
-
"@tailwindcss/postcss": "^4.1.18",
|
|
50
|
-
"@types/bun": "^1.3.6",
|
|
51
|
-
"@types/node": "^20.19.30",
|
|
52
|
-
"@types/react": "^19.2.9",
|
|
53
|
-
"@types/react-dom": "^19.2.3",
|
|
54
|
-
"@types/three": "^0.182.0",
|
|
55
|
-
"@typescript/native-preview": "^7.0.0-dev.20260122.3",
|
|
56
|
-
"babel-plugin-react-compiler": "1.0.0",
|
|
57
|
-
"cross-env": "^10.1.0",
|
|
58
|
-
"postcss-functions": "^4.0.2",
|
|
59
|
-
"postcss-preset-env": "^10.6.1",
|
|
60
|
-
"tailwindcss": "^4.1.18",
|
|
61
|
-
"typescript": "^5.9.3"
|
|
62
|
-
},
|
|
63
|
-
"trustedDependencies": [
|
|
64
|
-
"@biomejs/biome",
|
|
65
|
-
"@tailwindcss/oxide",
|
|
66
|
-
"esbuild",
|
|
67
|
-
"sharp"
|
|
68
|
-
]
|
|
69
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { functions } from "./lib/styles/scripts/postcss-functions.mjs"
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* PostCSS preset-env config
|
|
5
|
-
* @see Docs {@link https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/README.md#options}
|
|
6
|
-
* @see Features Flags {@link https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/FEATURES.md}
|
|
7
|
-
* @type {import('postcss-preset-env').pluginOptions}
|
|
8
|
-
*/
|
|
9
|
-
const presetEnvConfig = {
|
|
10
|
-
autoprefixer: {
|
|
11
|
-
flexbox: "no-2009",
|
|
12
|
-
},
|
|
13
|
-
stage: 3,
|
|
14
|
-
features: {
|
|
15
|
-
"custom-properties": false,
|
|
16
|
-
"custom-media-queries": true,
|
|
17
|
-
"nesting-rules": true,
|
|
18
|
-
},
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* PostCSS global data config
|
|
23
|
-
* Makes sure the css module files have access to these context files
|
|
24
|
-
* @see {@link https://github.com/csstools/postcss-global-data?tab=readme-ov-file#options}
|
|
25
|
-
* @type {import('@csstools/postcss-global-data').pluginOptions}
|
|
26
|
-
*/
|
|
27
|
-
const globalDataConfig = {
|
|
28
|
-
files: ["./lib/styles/css/root.css"],
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const postcssConfig = {
|
|
32
|
-
// NOTE: Order is important
|
|
33
|
-
plugins: {
|
|
34
|
-
"@tailwindcss/postcss": {},
|
|
35
|
-
"@csstools/postcss-global-data": globalDataConfig,
|
|
36
|
-
"postcss-functions": { functions },
|
|
37
|
-
// NOTE: This has to be last config
|
|
38
|
-
"postcss-preset-env": presetEnvConfig,
|
|
39
|
-
},
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default postcssConfig
|
|
Binary file
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2023",
|
|
4
|
-
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
5
|
-
"allowJs": true,
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"module": "esnext",
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"jsx": "react-jsx",
|
|
15
|
-
"incremental": true,
|
|
16
|
-
"noImplicitOverride": true,
|
|
17
|
-
"exactOptionalPropertyTypes": true,
|
|
18
|
-
"useUnknownInCatchVariables": true,
|
|
19
|
-
"noFallthroughCasesInSwitch": true,
|
|
20
|
-
"noImplicitReturns": true,
|
|
21
|
-
"noUncheckedSideEffectImports": true,
|
|
22
|
-
"noUnusedLocals": true,
|
|
23
|
-
"noUnusedParameters": true,
|
|
24
|
-
"noUncheckedIndexedAccess": true,
|
|
25
|
-
"plugins": [
|
|
26
|
-
{
|
|
27
|
-
"name": "next"
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"paths": {
|
|
31
|
-
"@/*": ["./*"]
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"include": [
|
|
35
|
-
"next-env.d.ts",
|
|
36
|
-
"**/*.ts",
|
|
37
|
-
"**/*.tsx",
|
|
38
|
-
".next/types/**/*.ts",
|
|
39
|
-
".next/dev/types/**/*.ts",
|
|
40
|
-
"**/*.mts"
|
|
41
|
-
],
|
|
42
|
-
"exclude": ["node_modules"]
|
|
43
|
-
}
|