@atomic-variants/next-plugin 0.1.3 → 0.2.0

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.
File without changes
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`@atomic-variants/webpack-plugin`);c=s(c);const l=`__atomic_generated`,u=RegExp(`/\\*\\s*${l}:([^*]+)\\s*\\*/`,`g`),d=`./.atomic-variants`,f=`./.atomic-variants/.atomic`;function p(e){return{...e,webpack:(t,n)=>(t.plugins?.push(new c.default),typeof e.webpack==`function`?e.webpack(t,n):t),experimental:{...e.experimental,swcPlugins:[...e.experimental?.swcPlugins||[],[`@atomic-variants/swc-plugin`,{tag:l}]]}}}exports.withAtomicVariants=p;
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`@atomic-variants/webpack-plugin`);c=s(c);let l=require(`path`);l=s(l);const u=`__atomic_generated`,d=RegExp(`/\\*\\s*${u}:([^*]+)\\s*\\*/`,`g`);function f(e){return{...e,webpack:(t,n)=>(t.plugins?.push(new c.default({filePath:l.default.resolve(__dirname,`../atomic-variants.css`)})),typeof e.webpack==`function`?e.webpack(t,n):t),experimental:{...e.experimental,swcPlugins:[...e.experimental?.swcPlugins||[],[`@atomic-variants/swc-plugin`,{tag:u}]]}}}exports.withAtomicVariants=f;
package/dist/index.d.cts CHANGED
@@ -1,40 +1,29 @@
1
+ import * as next_dist_server_config_shared0 from "next/dist/server/config-shared";
1
2
  import * as next_dist_compiled_webpack_webpack0 from "next/dist/compiled/webpack/webpack";
2
3
  import * as next_dist_build_webpack_plugins_subresource_integrity_plugin0 from "next/dist/build/webpack/plugins/subresource-integrity-plugin";
3
4
  import * as next_dist_shared_lib_utils0 from "next/dist/shared/lib/utils";
4
- import * as next_dist_server_config_shared0 from "next/dist/server/config-shared";
5
5
  import * as next_dist_server_lib_experimental_ppr0 from "next/dist/server/lib/experimental/ppr";
6
6
  import * as next0 from "next";
7
7
  import { NextConfig } from "next";
8
8
  import * as next_dist_cli_next_test0 from "next/dist/cli/next-test";
9
9
  import * as next_dist_lib_load_custom_routes0 from "next/dist/lib/load-custom-routes";
10
10
  import * as next_dist_shared_lib_image_config0 from "next/dist/shared/lib/image-config";
11
- import { Configuration } from "webpack";
12
11
 
13
12
  //#region src/index.d.ts
14
- type WebpackOptionsType = Parameters<NonNullable<NextConfig["webpack"]>>["1"];
15
13
  declare function withAtomicVariants(nextConfig: NextConfig): {
16
- webpack: (webpackConfig: Configuration, options: WebpackOptionsType) => any;
14
+ webpack: (webpackConfig: any, options: next_dist_server_config_shared0.WebpackConfigContext) => any;
17
15
  experimental: {
18
- swcPlugins: ([string, Record<string, unknown>] | (string | {
19
- tag: string;
20
- })[])[];
16
+ swcPlugins: [string, Record<string, unknown>][];
21
17
  adapterPath?: string;
22
18
  useSkewCookie?: boolean;
23
- cacheHandlers?: {
24
- default?: string;
25
- remote?: string;
26
- static?: string;
27
- [handlerName: string]: string | undefined;
28
- };
19
+ cacheHandlers?: NextConfig["cacheHandlers"];
29
20
  multiZoneDraftMode?: boolean;
30
21
  appNavFailHandling?: boolean;
31
22
  prerenderEarlyExit?: boolean;
32
23
  linkNoTouchStart?: boolean;
33
24
  caseSensitiveRoutes?: boolean;
34
- clientSegmentCache?: boolean | "client-only";
35
- clientParamParsing?: boolean;
25
+ clientParamParsingOrigins?: string[];
36
26
  dynamicOnHover?: boolean;
37
- appDocumentPreloading?: boolean;
38
27
  preloadEntriesOnStart?: boolean;
39
28
  clientRouterFilter?: boolean;
40
29
  clientRouterFilterRedirects?: boolean;
@@ -42,15 +31,10 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
42
31
  dynamic?: number;
43
32
  static?: number;
44
33
  };
45
- cacheLife?: {
46
- [profile: string]: {
47
- stale?: number;
48
- revalidate?: number;
49
- expire?: number;
50
- };
51
- };
34
+ cacheLife?: NextConfig["cacheLife"];
52
35
  clientRouterFilterAllowedRate?: number;
53
36
  externalMiddlewareRewritesResolve?: boolean;
37
+ externalProxyRewritesResolve?: boolean;
54
38
  extensionAlias?: Record<string, any>;
55
39
  allowedRevalidateHeaderKeys?: string[];
56
40
  fetchCacheKeyPrefix?: string;
@@ -62,6 +46,7 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
62
46
  optimisticClientCache?: boolean;
63
47
  expireTime?: number;
64
48
  middlewarePrefetch?: "strict" | "flexible";
49
+ proxyPrefetch?: "strict" | "flexible";
65
50
  manualClientBasePath?: boolean;
66
51
  cssChunking?: boolean | "strict";
67
52
  disablePostcssPresetEnv?: boolean;
@@ -74,11 +59,6 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
74
59
  nextScriptWorkers?: boolean;
75
60
  scrollRestoration?: boolean;
76
61
  externalDir?: boolean;
77
- amp?: {
78
- optimizer?: any;
79
- validator?: string;
80
- skipValidation?: boolean;
81
- };
82
62
  disableOptimizedLoading?: boolean;
83
63
  gzipSize?: boolean;
84
64
  craCompat?: boolean;
@@ -95,14 +75,19 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
95
75
  webVitalsAttribution?: Array<typeof next_dist_shared_lib_utils0.WEB_VITALS[number]>;
96
76
  optimizePackageImports?: string[];
97
77
  optimizeServerReact?: boolean;
98
- turbo?: next_dist_server_config_shared0.DeprecatedExperimentalTurboOptions;
99
78
  turbopackMemoryLimit?: number;
100
79
  turbopackMinify?: boolean;
80
+ turbopackImportTypeBytes?: boolean;
101
81
  turbopackScopeHoisting?: boolean;
102
- turbopackPersistentCaching?: boolean;
82
+ turbopackFileSystemCacheForDev?: boolean;
83
+ turbopackFileSystemCacheForBuild?: boolean;
103
84
  turbopackSourceMaps?: boolean;
104
85
  turbopackTreeShaking?: boolean;
105
86
  turbopackRemoveUnusedExports?: boolean;
87
+ turbopackUseSystemTlsCerts?: boolean;
88
+ turbopackUseBuiltinBabel?: boolean;
89
+ turbopackUseBuiltinSass?: boolean;
90
+ turbopackModuleIds?: "named" | "deterministic";
106
91
  mdxRs?: boolean | {
107
92
  development?: boolean;
108
93
  jsx?: boolean;
@@ -120,7 +105,6 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
120
105
  clientTraceMetadata?: string[];
121
106
  ppr?: next_dist_server_lib_experimental_ppr0.ExperimentalPPRConfig;
122
107
  taint?: boolean;
123
- routerBFCache?: boolean;
124
108
  removeUncaughtErrorAndRejectionListeners?: boolean;
125
109
  validateRSCRequestHeaders?: boolean;
126
110
  serverActions?: {
@@ -128,7 +112,6 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
128
112
  allowedOrigins?: string[];
129
113
  };
130
114
  serverMinification?: boolean;
131
- enablePrerenderSourceMaps?: boolean;
132
115
  serverSourceMaps?: boolean;
133
116
  useWasmBinary?: boolean;
134
117
  useLightningcss?: boolean;
@@ -138,13 +121,12 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
138
121
  allowDevelopmentBuild?: true;
139
122
  bundlePagesExternals?: boolean;
140
123
  serverComponentsExternalPackages?: string[];
141
- reactCompiler?: boolean | next_dist_server_config_shared0.ReactCompilerOptions;
124
+ reactDebugChannel?: boolean;
125
+ cacheComponents?: boolean;
142
126
  staticGenerationRetryCount?: number;
143
127
  staticGenerationMaxConcurrency?: number;
144
128
  staticGenerationMinPagesPerWorker?: number;
145
129
  serverComponentsHmrCache?: boolean;
146
- cacheComponents?: boolean;
147
- dynamicIO?: boolean;
148
130
  inlineCss?: boolean;
149
131
  authInterrupts?: boolean;
150
132
  useCache?: boolean;
@@ -152,15 +134,18 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
152
134
  buildTimeThresholdMs: number;
153
135
  };
154
136
  globalNotFound?: boolean;
155
- devtoolSegmentExplorer?: boolean;
156
137
  browserDebugInfoInTerminal?: boolean | {
157
138
  depthLimit?: number;
158
139
  edgeLimit?: number;
159
140
  showSourceLocation?: boolean;
160
141
  };
161
- optimizeRouterScrolling?: boolean;
162
142
  rootParams?: boolean;
143
+ isolatedDevBuild?: boolean;
163
144
  middlewareClientMaxBodySize?: next0.SizeLimit;
145
+ proxyClientMaxBodySize?: next0.SizeLimit;
146
+ mcpServer?: boolean;
147
+ lockDistDir?: boolean;
148
+ hideLogsAfterAbort?: boolean;
164
149
  };
165
150
  allowedDevOrigins?: string[];
166
151
  exportPathMap?: (defaultMap: next_dist_server_config_shared0.ExportPathMap, ctx: {
@@ -171,16 +156,19 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
171
156
  buildId: string;
172
157
  }) => Promise<next_dist_server_config_shared0.ExportPathMap> | next_dist_server_config_shared0.ExportPathMap;
173
158
  i18n?: next_dist_server_config_shared0.I18NConfig | null;
174
- eslint?: next_dist_server_config_shared0.ESLintConfig;
175
159
  typescript?: next_dist_server_config_shared0.TypeScriptConfig;
176
160
  typedRoutes?: boolean;
177
- headers?: () => Promise<next_dist_lib_load_custom_routes0.Header[]>;
161
+ headers?: () => Promise<next_dist_lib_load_custom_routes0.Header[]> | next_dist_lib_load_custom_routes0.Header[];
178
162
  rewrites?: () => Promise<next_dist_lib_load_custom_routes0.Rewrite[] | {
179
163
  beforeFiles?: next_dist_lib_load_custom_routes0.Rewrite[];
180
164
  afterFiles?: next_dist_lib_load_custom_routes0.Rewrite[];
181
165
  fallback?: next_dist_lib_load_custom_routes0.Rewrite[];
182
- }>;
183
- redirects?: () => Promise<next_dist_lib_load_custom_routes0.Redirect[]>;
166
+ }> | next_dist_lib_load_custom_routes0.Rewrite[] | {
167
+ beforeFiles?: next_dist_lib_load_custom_routes0.Rewrite[];
168
+ afterFiles?: next_dist_lib_load_custom_routes0.Rewrite[];
169
+ fallback?: next_dist_lib_load_custom_routes0.Rewrite[];
170
+ };
171
+ redirects?: () => Promise<next_dist_lib_load_custom_routes0.Redirect[]> | next_dist_lib_load_custom_routes0.Redirect[];
184
172
  excludeDefaultMomentLocales?: boolean;
185
173
  trailingSlash?: boolean;
186
174
  env?: Record<string, string | undefined>;
@@ -188,6 +176,12 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
188
176
  cleanDistDir?: boolean;
189
177
  assetPrefix?: string;
190
178
  cacheHandler?: string | undefined;
179
+ cacheHandlers?: {
180
+ default?: string;
181
+ remote?: string;
182
+ static?: string;
183
+ [handlerName: string]: string | undefined;
184
+ };
191
185
  cacheMaxMemorySize?: number;
192
186
  useFileSystemPublicRoutes?: boolean;
193
187
  generateBuildId?: () => string | null | Promise<string | null>;
@@ -197,18 +191,12 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
197
191
  poweredByHeader?: boolean;
198
192
  images?: next_dist_shared_lib_image_config0.ImageConfig;
199
193
  devIndicators?: false | {
200
- appIsrStatus?: boolean;
201
- buildActivity?: boolean;
202
- buildActivityPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
203
194
  position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
204
195
  };
205
196
  onDemandEntries?: {
206
197
  maxInactiveAge?: number;
207
198
  pagesBufferLength?: number;
208
199
  };
209
- amp?: {
210
- canonicalBase?: string;
211
- };
212
200
  deploymentId?: string;
213
201
  basePath?: string;
214
202
  sassOptions?: {
@@ -216,15 +204,10 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
216
204
  [key: string]: any;
217
205
  };
218
206
  productionBrowserSourceMaps?: boolean;
207
+ reactCompiler?: boolean | next_dist_server_config_shared0.ReactCompilerOptions;
219
208
  reactProductionProfiling?: boolean;
220
209
  reactStrictMode?: boolean | null;
221
210
  reactMaxHeadersLength?: number;
222
- publicRuntimeConfig?: {
223
- [key: string]: any;
224
- };
225
- serverRuntimeConfig?: {
226
- [key: string]: any;
227
- };
228
211
  httpAgentOptions?: {
229
212
  keepAlive?: boolean;
230
213
  };
@@ -259,6 +242,7 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
259
242
  transpilePackages?: string[];
260
243
  turbopack?: next_dist_server_config_shared0.TurbopackOptions;
261
244
  skipMiddlewareUrlNormalize?: boolean;
245
+ skipProxyUrlNormalize?: boolean;
262
246
  skipTrailingSlashRedirect?: boolean;
263
247
  modularizeImports?: Record<string, {
264
248
  transform: string | Record<string, string>;
@@ -266,6 +250,15 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
266
250
  skipDefaultConversion?: boolean;
267
251
  }>;
268
252
  logging?: next_dist_server_config_shared0.LoggingConfig | false;
253
+ enablePrerenderSourceMaps?: boolean;
254
+ cacheComponents?: boolean;
255
+ cacheLife?: {
256
+ [profile: string]: {
257
+ stale?: number;
258
+ revalidate?: number;
259
+ expire?: number;
260
+ };
261
+ };
269
262
  expireTime?: number;
270
263
  bundlePagesRouterDependencies?: boolean;
271
264
  serverExternalPackages?: string[];
package/dist/index.d.ts CHANGED
@@ -1,40 +1,29 @@
1
+ import * as next_dist_server_config_shared0 from "next/dist/server/config-shared";
1
2
  import * as next_dist_compiled_webpack_webpack0 from "next/dist/compiled/webpack/webpack";
2
3
  import * as next_dist_build_webpack_plugins_subresource_integrity_plugin0 from "next/dist/build/webpack/plugins/subresource-integrity-plugin";
3
4
  import * as next_dist_shared_lib_utils0 from "next/dist/shared/lib/utils";
4
- import * as next_dist_server_config_shared0 from "next/dist/server/config-shared";
5
5
  import * as next_dist_server_lib_experimental_ppr0 from "next/dist/server/lib/experimental/ppr";
6
6
  import * as next0 from "next";
7
7
  import { NextConfig } from "next";
8
8
  import * as next_dist_cli_next_test0 from "next/dist/cli/next-test";
9
9
  import * as next_dist_lib_load_custom_routes0 from "next/dist/lib/load-custom-routes";
10
10
  import * as next_dist_shared_lib_image_config0 from "next/dist/shared/lib/image-config";
11
- import { Configuration } from "webpack";
12
11
 
13
12
  //#region src/index.d.ts
14
- type WebpackOptionsType = Parameters<NonNullable<NextConfig["webpack"]>>["1"];
15
13
  declare function withAtomicVariants(nextConfig: NextConfig): {
16
- webpack: (webpackConfig: Configuration, options: WebpackOptionsType) => any;
14
+ webpack: (webpackConfig: any, options: next_dist_server_config_shared0.WebpackConfigContext) => any;
17
15
  experimental: {
18
- swcPlugins: ([string, Record<string, unknown>] | (string | {
19
- tag: string;
20
- })[])[];
16
+ swcPlugins: [string, Record<string, unknown>][];
21
17
  adapterPath?: string;
22
18
  useSkewCookie?: boolean;
23
- cacheHandlers?: {
24
- default?: string;
25
- remote?: string;
26
- static?: string;
27
- [handlerName: string]: string | undefined;
28
- };
19
+ cacheHandlers?: NextConfig["cacheHandlers"];
29
20
  multiZoneDraftMode?: boolean;
30
21
  appNavFailHandling?: boolean;
31
22
  prerenderEarlyExit?: boolean;
32
23
  linkNoTouchStart?: boolean;
33
24
  caseSensitiveRoutes?: boolean;
34
- clientSegmentCache?: boolean | "client-only";
35
- clientParamParsing?: boolean;
25
+ clientParamParsingOrigins?: string[];
36
26
  dynamicOnHover?: boolean;
37
- appDocumentPreloading?: boolean;
38
27
  preloadEntriesOnStart?: boolean;
39
28
  clientRouterFilter?: boolean;
40
29
  clientRouterFilterRedirects?: boolean;
@@ -42,15 +31,10 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
42
31
  dynamic?: number;
43
32
  static?: number;
44
33
  };
45
- cacheLife?: {
46
- [profile: string]: {
47
- stale?: number;
48
- revalidate?: number;
49
- expire?: number;
50
- };
51
- };
34
+ cacheLife?: NextConfig["cacheLife"];
52
35
  clientRouterFilterAllowedRate?: number;
53
36
  externalMiddlewareRewritesResolve?: boolean;
37
+ externalProxyRewritesResolve?: boolean;
54
38
  extensionAlias?: Record<string, any>;
55
39
  allowedRevalidateHeaderKeys?: string[];
56
40
  fetchCacheKeyPrefix?: string;
@@ -62,6 +46,7 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
62
46
  optimisticClientCache?: boolean;
63
47
  expireTime?: number;
64
48
  middlewarePrefetch?: "strict" | "flexible";
49
+ proxyPrefetch?: "strict" | "flexible";
65
50
  manualClientBasePath?: boolean;
66
51
  cssChunking?: boolean | "strict";
67
52
  disablePostcssPresetEnv?: boolean;
@@ -74,11 +59,6 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
74
59
  nextScriptWorkers?: boolean;
75
60
  scrollRestoration?: boolean;
76
61
  externalDir?: boolean;
77
- amp?: {
78
- optimizer?: any;
79
- validator?: string;
80
- skipValidation?: boolean;
81
- };
82
62
  disableOptimizedLoading?: boolean;
83
63
  gzipSize?: boolean;
84
64
  craCompat?: boolean;
@@ -95,14 +75,19 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
95
75
  webVitalsAttribution?: Array<typeof next_dist_shared_lib_utils0.WEB_VITALS[number]>;
96
76
  optimizePackageImports?: string[];
97
77
  optimizeServerReact?: boolean;
98
- turbo?: next_dist_server_config_shared0.DeprecatedExperimentalTurboOptions;
99
78
  turbopackMemoryLimit?: number;
100
79
  turbopackMinify?: boolean;
80
+ turbopackImportTypeBytes?: boolean;
101
81
  turbopackScopeHoisting?: boolean;
102
- turbopackPersistentCaching?: boolean;
82
+ turbopackFileSystemCacheForDev?: boolean;
83
+ turbopackFileSystemCacheForBuild?: boolean;
103
84
  turbopackSourceMaps?: boolean;
104
85
  turbopackTreeShaking?: boolean;
105
86
  turbopackRemoveUnusedExports?: boolean;
87
+ turbopackUseSystemTlsCerts?: boolean;
88
+ turbopackUseBuiltinBabel?: boolean;
89
+ turbopackUseBuiltinSass?: boolean;
90
+ turbopackModuleIds?: "named" | "deterministic";
106
91
  mdxRs?: boolean | {
107
92
  development?: boolean;
108
93
  jsx?: boolean;
@@ -120,7 +105,6 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
120
105
  clientTraceMetadata?: string[];
121
106
  ppr?: next_dist_server_lib_experimental_ppr0.ExperimentalPPRConfig;
122
107
  taint?: boolean;
123
- routerBFCache?: boolean;
124
108
  removeUncaughtErrorAndRejectionListeners?: boolean;
125
109
  validateRSCRequestHeaders?: boolean;
126
110
  serverActions?: {
@@ -128,7 +112,6 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
128
112
  allowedOrigins?: string[];
129
113
  };
130
114
  serverMinification?: boolean;
131
- enablePrerenderSourceMaps?: boolean;
132
115
  serverSourceMaps?: boolean;
133
116
  useWasmBinary?: boolean;
134
117
  useLightningcss?: boolean;
@@ -138,13 +121,12 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
138
121
  allowDevelopmentBuild?: true;
139
122
  bundlePagesExternals?: boolean;
140
123
  serverComponentsExternalPackages?: string[];
141
- reactCompiler?: boolean | next_dist_server_config_shared0.ReactCompilerOptions;
124
+ reactDebugChannel?: boolean;
125
+ cacheComponents?: boolean;
142
126
  staticGenerationRetryCount?: number;
143
127
  staticGenerationMaxConcurrency?: number;
144
128
  staticGenerationMinPagesPerWorker?: number;
145
129
  serverComponentsHmrCache?: boolean;
146
- cacheComponents?: boolean;
147
- dynamicIO?: boolean;
148
130
  inlineCss?: boolean;
149
131
  authInterrupts?: boolean;
150
132
  useCache?: boolean;
@@ -152,15 +134,18 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
152
134
  buildTimeThresholdMs: number;
153
135
  };
154
136
  globalNotFound?: boolean;
155
- devtoolSegmentExplorer?: boolean;
156
137
  browserDebugInfoInTerminal?: boolean | {
157
138
  depthLimit?: number;
158
139
  edgeLimit?: number;
159
140
  showSourceLocation?: boolean;
160
141
  };
161
- optimizeRouterScrolling?: boolean;
162
142
  rootParams?: boolean;
143
+ isolatedDevBuild?: boolean;
163
144
  middlewareClientMaxBodySize?: next0.SizeLimit;
145
+ proxyClientMaxBodySize?: next0.SizeLimit;
146
+ mcpServer?: boolean;
147
+ lockDistDir?: boolean;
148
+ hideLogsAfterAbort?: boolean;
164
149
  };
165
150
  allowedDevOrigins?: string[];
166
151
  exportPathMap?: (defaultMap: next_dist_server_config_shared0.ExportPathMap, ctx: {
@@ -171,16 +156,19 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
171
156
  buildId: string;
172
157
  }) => Promise<next_dist_server_config_shared0.ExportPathMap> | next_dist_server_config_shared0.ExportPathMap;
173
158
  i18n?: next_dist_server_config_shared0.I18NConfig | null;
174
- eslint?: next_dist_server_config_shared0.ESLintConfig;
175
159
  typescript?: next_dist_server_config_shared0.TypeScriptConfig;
176
160
  typedRoutes?: boolean;
177
- headers?: () => Promise<next_dist_lib_load_custom_routes0.Header[]>;
161
+ headers?: () => Promise<next_dist_lib_load_custom_routes0.Header[]> | next_dist_lib_load_custom_routes0.Header[];
178
162
  rewrites?: () => Promise<next_dist_lib_load_custom_routes0.Rewrite[] | {
179
163
  beforeFiles?: next_dist_lib_load_custom_routes0.Rewrite[];
180
164
  afterFiles?: next_dist_lib_load_custom_routes0.Rewrite[];
181
165
  fallback?: next_dist_lib_load_custom_routes0.Rewrite[];
182
- }>;
183
- redirects?: () => Promise<next_dist_lib_load_custom_routes0.Redirect[]>;
166
+ }> | next_dist_lib_load_custom_routes0.Rewrite[] | {
167
+ beforeFiles?: next_dist_lib_load_custom_routes0.Rewrite[];
168
+ afterFiles?: next_dist_lib_load_custom_routes0.Rewrite[];
169
+ fallback?: next_dist_lib_load_custom_routes0.Rewrite[];
170
+ };
171
+ redirects?: () => Promise<next_dist_lib_load_custom_routes0.Redirect[]> | next_dist_lib_load_custom_routes0.Redirect[];
184
172
  excludeDefaultMomentLocales?: boolean;
185
173
  trailingSlash?: boolean;
186
174
  env?: Record<string, string | undefined>;
@@ -188,6 +176,12 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
188
176
  cleanDistDir?: boolean;
189
177
  assetPrefix?: string;
190
178
  cacheHandler?: string | undefined;
179
+ cacheHandlers?: {
180
+ default?: string;
181
+ remote?: string;
182
+ static?: string;
183
+ [handlerName: string]: string | undefined;
184
+ };
191
185
  cacheMaxMemorySize?: number;
192
186
  useFileSystemPublicRoutes?: boolean;
193
187
  generateBuildId?: () => string | null | Promise<string | null>;
@@ -197,18 +191,12 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
197
191
  poweredByHeader?: boolean;
198
192
  images?: next_dist_shared_lib_image_config0.ImageConfig;
199
193
  devIndicators?: false | {
200
- appIsrStatus?: boolean;
201
- buildActivity?: boolean;
202
- buildActivityPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
203
194
  position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
204
195
  };
205
196
  onDemandEntries?: {
206
197
  maxInactiveAge?: number;
207
198
  pagesBufferLength?: number;
208
199
  };
209
- amp?: {
210
- canonicalBase?: string;
211
- };
212
200
  deploymentId?: string;
213
201
  basePath?: string;
214
202
  sassOptions?: {
@@ -216,15 +204,10 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
216
204
  [key: string]: any;
217
205
  };
218
206
  productionBrowserSourceMaps?: boolean;
207
+ reactCompiler?: boolean | next_dist_server_config_shared0.ReactCompilerOptions;
219
208
  reactProductionProfiling?: boolean;
220
209
  reactStrictMode?: boolean | null;
221
210
  reactMaxHeadersLength?: number;
222
- publicRuntimeConfig?: {
223
- [key: string]: any;
224
- };
225
- serverRuntimeConfig?: {
226
- [key: string]: any;
227
- };
228
211
  httpAgentOptions?: {
229
212
  keepAlive?: boolean;
230
213
  };
@@ -259,6 +242,7 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
259
242
  transpilePackages?: string[];
260
243
  turbopack?: next_dist_server_config_shared0.TurbopackOptions;
261
244
  skipMiddlewareUrlNormalize?: boolean;
245
+ skipProxyUrlNormalize?: boolean;
262
246
  skipTrailingSlashRedirect?: boolean;
263
247
  modularizeImports?: Record<string, {
264
248
  transform: string | Record<string, string>;
@@ -266,6 +250,15 @@ declare function withAtomicVariants(nextConfig: NextConfig): {
266
250
  skipDefaultConversion?: boolean;
267
251
  }>;
268
252
  logging?: next_dist_server_config_shared0.LoggingConfig | false;
253
+ enablePrerenderSourceMaps?: boolean;
254
+ cacheComponents?: boolean;
255
+ cacheLife?: {
256
+ [profile: string]: {
257
+ stale?: number;
258
+ revalidate?: number;
259
+ expire?: number;
260
+ };
261
+ };
269
262
  expireTime?: number;
270
263
  bundlePagesRouterDependencies?: boolean;
271
264
  serverExternalPackages?: string[];
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import e from"@atomic-variants/webpack-plugin";const t=`__atomic_generated`;RegExp(`/\\*\\s*${t}:([^*]+)\\s*\\*/`,`g`);function n(n){return{...n,webpack:(t,r)=>(t.plugins?.push(new e),typeof n.webpack==`function`?n.webpack(t,r):t),experimental:{...n.experimental,swcPlugins:[...n.experimental?.swcPlugins||[],[`@atomic-variants/swc-plugin`,{tag:t}]]}}}export{n as withAtomicVariants};
1
+ import e from"@atomic-variants/webpack-plugin";import t from"path";const n=`__atomic_generated`;RegExp(`/\\*\\s*${n}:([^*]+)\\s*\\*/`,`g`);function r(r){return{...r,webpack:(n,i)=>(n.plugins?.push(new e({filePath:t.resolve(__dirname,`../atomic-variants.css`)})),typeof r.webpack==`function`?r.webpack(n,i):n),experimental:{...r.experimental,swcPlugins:[...r.experimental?.swcPlugins||[],[`@atomic-variants/swc-plugin`,{tag:n}]]}}}export{r as withAtomicVariants};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomic-variants/next-plugin",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "Next.js plugin for atomic-variants to enable responsive, type-safe TailwindCSS variants at build time.",
5
5
  "keywords": [
6
6
  "atomic-variants",
@@ -25,6 +25,7 @@
25
25
  "exports": {
26
26
  ".": {
27
27
  "types": "./dist/index.d.ts",
28
+ "style": "./atomic-variants.css",
28
29
  "import": "./dist/index.js",
29
30
  "require": "./dist/index.cjs"
30
31
  },
@@ -35,7 +36,8 @@
35
36
  "types": "./dist/index.d.ts",
36
37
  "files": [
37
38
  "src",
38
- "dist"
39
+ "dist",
40
+ "atomic-variants.css"
39
41
  ],
40
42
  "scripts": {
41
43
  "build": "tsdown src/index.ts",
@@ -44,13 +46,13 @@
44
46
  },
45
47
  "dependencies": {
46
48
  "@atomic-variants/swc-plugin": "0.1.0",
47
- "@atomic-variants/webpack-plugin": "0.1.1"
49
+ "@atomic-variants/webpack-plugin": "0.2.0"
48
50
  },
49
51
  "devDependencies": {
50
52
  "@atomic-variants/constants": "0.0.1",
51
53
  "@types/bun": "latest",
52
54
  "@types/jest": "^30.0.0",
53
- "next": "^15.5.5",
55
+ "next": "16.0.10",
54
56
  "tsdown": "^0.15.7",
55
57
  "typescript": "^5",
56
58
  "webpack": "^5.102.1"
package/src/index.ts CHANGED
@@ -1,15 +1,17 @@
1
1
  import { ATOMIC_TAG } from "@atomic-variants/constants";
2
2
  import AtomicVariantsPlugin from "@atomic-variants/webpack-plugin";
3
3
  import type { NextConfig } from "next";
4
- import type { Configuration } from "webpack";
5
-
6
- type WebpackOptionsType = Parameters<NonNullable<NextConfig["webpack"]>>["1"];
4
+ import path from "path";
7
5
 
8
6
  export function withAtomicVariants(nextConfig: NextConfig) {
9
7
  return {
10
8
  ...nextConfig,
11
- webpack: (webpackConfig: Configuration, options: WebpackOptionsType) => {
12
- webpackConfig.plugins?.push(new AtomicVariantsPlugin());
9
+ webpack: (webpackConfig, options) => {
10
+ webpackConfig.plugins?.push(
11
+ new AtomicVariantsPlugin({
12
+ filePath: path.resolve(__dirname, "../atomic-variants.css"),
13
+ })
14
+ );
13
15
 
14
16
  if (typeof nextConfig.webpack === "function") {
15
17
  return nextConfig.webpack(webpackConfig, options);
@@ -24,5 +26,5 @@ export function withAtomicVariants(nextConfig: NextConfig) {
24
26
  ["@atomic-variants/swc-plugin", { tag: ATOMIC_TAG }],
25
27
  ],
26
28
  },
27
- };
29
+ } satisfies NextConfig;
28
30
  }