@akanjs/config 0.0.25 → 0.0.26
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/package.json +7 -10
- package/src/next.base.js +12 -2
- package/src/next.base.ts +12 -2
- package/src/postcss.config.base.js +25 -0
- package/src/styles.css +599 -0
- package/src/webpack.backend.d.ts +5 -0
- package/src/webpack.backend.js +83 -0
- package/src/webpack.backend.ts +74 -0
- package/src/webpack.csr.d.ts +5 -0
- package/src/webpack.csr.js +81 -0
- package/src/webpack.csr.ts +76 -0
- package/src/jest.preset.js +0 -3
- package/src/tailwind.base.js +0 -351
- package/src/webpack.backend.base.js +0 -43
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var webpack_backend_exports = {};
|
|
29
|
+
__export(webpack_backend_exports, {
|
|
30
|
+
default: () => webpack_backend_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(webpack_backend_exports);
|
|
33
|
+
var import_webpack = require("@nx/webpack");
|
|
34
|
+
var import_generate_package_json_webpack_plugin = __toESM(require("generate-package-json-webpack-plugin"));
|
|
35
|
+
var import_path = __toESM(require("path"));
|
|
36
|
+
var import_run_script_webpack_plugin = require("run-script-webpack-plugin");
|
|
37
|
+
var import_webpack2 = __toESM(require("webpack"));
|
|
38
|
+
var import_webpack_node_externals = __toESM(require("webpack-node-externals"));
|
|
39
|
+
const appName = process.env.NX_TASK_TARGET_PROJECT ?? "unknown";
|
|
40
|
+
const config = (0, import_webpack.composePlugins)((0, import_webpack.withNx)(), (config2) => {
|
|
41
|
+
const tsloaderRule = config2.module?.rules?.find((rule) => rule.loader?.includes("ts-loader"));
|
|
42
|
+
if (tsloaderRule) {
|
|
43
|
+
tsloaderRule.exclude = [
|
|
44
|
+
/\.tsx$/,
|
|
45
|
+
// Explicitly exclude .tsx files
|
|
46
|
+
/\/ui\/.*\.(ts|tsx)$/,
|
|
47
|
+
// Exclude .ts and .tsx files in any "ui" directory
|
|
48
|
+
/\/client\/.*\.(ts|tsx)$/,
|
|
49
|
+
// Exclude .ts and .tsx files in any "client" directory
|
|
50
|
+
/\/next\/.*\.(ts|tsx)$/,
|
|
51
|
+
// Exclude .ts and .tsx files in any "client" directory
|
|
52
|
+
/\.store\.ts$/
|
|
53
|
+
// Exclude files ending with .store.ts
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
const basePackage = {
|
|
57
|
+
name: `${appName}/backend`,
|
|
58
|
+
version: "1.0.0",
|
|
59
|
+
main: "./main.js",
|
|
60
|
+
engines: { node: ">= 18" }
|
|
61
|
+
};
|
|
62
|
+
config2.plugins ??= [];
|
|
63
|
+
config2.plugins.push(new import_generate_package_json_webpack_plugin.default(basePackage));
|
|
64
|
+
if (process.env.NX_TASK_TARGET_TARGET !== "serve-backend")
|
|
65
|
+
return config2;
|
|
66
|
+
const cwd = process.cwd();
|
|
67
|
+
Object.assign(config2, {
|
|
68
|
+
entry: [import_path.default.join(cwd, "node_modules/webpack/hot/poll?100"), `./main.ts`],
|
|
69
|
+
mode: "development",
|
|
70
|
+
output: {
|
|
71
|
+
path: import_path.default.join(cwd, `dist/apps/${appName}/backend`),
|
|
72
|
+
filename: "main.js"
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
config2.plugins.push(
|
|
76
|
+
new import_webpack2.default.HotModuleReplacementPlugin(),
|
|
77
|
+
new import_run_script_webpack_plugin.RunScriptWebpackPlugin({ name: "main.js", autoRestart: true })
|
|
78
|
+
);
|
|
79
|
+
config2.externals ??= [];
|
|
80
|
+
config2.externals.push((0, import_webpack_node_externals.default)({ allowlist: ["webpack/hot/poll?100"] }));
|
|
81
|
+
return config2;
|
|
82
|
+
});
|
|
83
|
+
var webpack_backend_default = config;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
2
|
+
import { composePlugins, withNx } from "@nx/webpack";
|
|
3
|
+
import GeneratePackageJsonPlugin from "generate-package-json-webpack-plugin";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import { RunScriptWebpackPlugin } from "run-script-webpack-plugin";
|
|
6
|
+
import webpack from "webpack";
|
|
7
|
+
import nodeExternals from "webpack-node-externals";
|
|
8
|
+
|
|
9
|
+
interface WebpackConfig extends webpack.Configuration {
|
|
10
|
+
module?: {
|
|
11
|
+
rules?: webpack.RuleSetRule[];
|
|
12
|
+
};
|
|
13
|
+
plugins?: webpack.WebpackPluginInstance[];
|
|
14
|
+
externals?: any[]; // Using any[] for externals as webpack types are complex and vary by version
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface PackageJson {
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
name: string;
|
|
20
|
+
version: string;
|
|
21
|
+
main: string;
|
|
22
|
+
engines: {
|
|
23
|
+
node: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const appName = process.env.NX_TASK_TARGET_PROJECT ?? "unknown";
|
|
28
|
+
|
|
29
|
+
const config = composePlugins(withNx(), (config: WebpackConfig) => {
|
|
30
|
+
const tsloaderRule = config.module?.rules?.find((rule) => rule.loader?.includes("ts-loader"));
|
|
31
|
+
if (tsloaderRule) {
|
|
32
|
+
tsloaderRule.exclude = [
|
|
33
|
+
/\.tsx$/, // Explicitly exclude .tsx files
|
|
34
|
+
/\/ui\/.*\.(ts|tsx)$/, // Exclude .ts and .tsx files in any "ui" directory
|
|
35
|
+
/\/client\/.*\.(ts|tsx)$/, // Exclude .ts and .tsx files in any "client" directory
|
|
36
|
+
/\/next\/.*\.(ts|tsx)$/, // Exclude .ts and .tsx files in any "client" directory
|
|
37
|
+
/\.store\.ts$/, // Exclude files ending with .store.ts
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const basePackage: PackageJson = {
|
|
42
|
+
name: `${appName}/backend`,
|
|
43
|
+
version: "1.0.0",
|
|
44
|
+
main: "./main.js",
|
|
45
|
+
engines: { node: ">= 18" },
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
config.plugins ??= [];
|
|
49
|
+
config.plugins.push(new GeneratePackageJsonPlugin(basePackage) as webpack.WebpackPluginInstance);
|
|
50
|
+
|
|
51
|
+
if (process.env.NX_TASK_TARGET_TARGET !== "serve-backend") return config;
|
|
52
|
+
|
|
53
|
+
const cwd = process.cwd();
|
|
54
|
+
Object.assign(config, {
|
|
55
|
+
entry: [path.join(cwd, "node_modules/webpack/hot/poll?100"), `./main.ts`],
|
|
56
|
+
mode: "development" as webpack.Configuration["mode"],
|
|
57
|
+
output: {
|
|
58
|
+
path: path.join(cwd, `dist/apps/${appName}/backend`),
|
|
59
|
+
filename: "main.js",
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
config.plugins.push(
|
|
64
|
+
new webpack.HotModuleReplacementPlugin(),
|
|
65
|
+
new RunScriptWebpackPlugin({ name: "main.js", autoRestart: true })
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
config.externals ??= [];
|
|
69
|
+
config.externals.push((nodeExternals as any)({ allowlist: ["webpack/hot/poll?100"] }));
|
|
70
|
+
|
|
71
|
+
return config;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export default config;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var webpack_csr_exports = {};
|
|
29
|
+
__export(webpack_csr_exports, {
|
|
30
|
+
default: () => webpack_csr_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(webpack_csr_exports);
|
|
33
|
+
var import_react = require("@nx/react");
|
|
34
|
+
var import_webpack = require("@nx/webpack");
|
|
35
|
+
var import_path = __toESM(require("path"));
|
|
36
|
+
var import_webpack2 = __toESM(require("webpack"));
|
|
37
|
+
const config = (0, import_webpack.composePlugins)((0, import_webpack.withNx)({ skipTypeChecking: true }), (0, import_react.withReact)(), (config2) => {
|
|
38
|
+
config2.resolve = {
|
|
39
|
+
...config2.resolve ?? {},
|
|
40
|
+
alias: {
|
|
41
|
+
...config2.resolve?.alias ?? {},
|
|
42
|
+
"next/font/local": import_path.default.resolve(__dirname, "./createFont"),
|
|
43
|
+
"next/font/google": import_path.default.resolve(__dirname, "./createFont"),
|
|
44
|
+
"next/navigation": import_path.default.resolve(__dirname, "./router"),
|
|
45
|
+
[`@${process.env.NX_TASK_TARGET_PROJECT}/lib`]: import_path.default.resolve(
|
|
46
|
+
__dirname,
|
|
47
|
+
`../../../${process.env.NX_TASK_TARGET_PROJECT}/lib/`
|
|
48
|
+
)
|
|
49
|
+
},
|
|
50
|
+
fallback: {
|
|
51
|
+
...config2.resolve?.fallback ?? {},
|
|
52
|
+
url: require.resolve("url"),
|
|
53
|
+
fs: false,
|
|
54
|
+
vm: require.resolve("vm-browserify"),
|
|
55
|
+
process: require.resolve("process"),
|
|
56
|
+
crypto: require.resolve("crypto-browserify"),
|
|
57
|
+
http: require.resolve("stream-http"),
|
|
58
|
+
https: require.resolve("https-browserify"),
|
|
59
|
+
os: require.resolve("os-browserify/browser"),
|
|
60
|
+
stream: require.resolve("stream-browserify")
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
config2.plugins = [
|
|
64
|
+
...config2.plugins?.filter((plugin) => plugin.constructor.name !== "ForkTsCheckerWebpackPlugin") ?? [],
|
|
65
|
+
//add process plugin
|
|
66
|
+
new import_webpack2.default.ProvidePlugin({
|
|
67
|
+
process: "process/browser"
|
|
68
|
+
}),
|
|
69
|
+
new import_webpack2.EnvironmentPlugin({
|
|
70
|
+
NEXT_PUBLIC_REPO_NAME: process.env.NEXT_PUBLIC_REPO_NAME,
|
|
71
|
+
NEXT_PUBLIC_SERVE_DOMAIN: process.env.NEXT_PUBLIC_SERVE_DOMAIN,
|
|
72
|
+
NEXT_PUBLIC_APP_NAME: process.env.NEXT_PUBLIC_APP_NAME ?? process.env.NX_TASK_TARGET_PROJECT,
|
|
73
|
+
NEXT_PUBLIC_ENV: process.env.NEXT_PUBLIC_ENV,
|
|
74
|
+
NEXT_PUBLIC_OPERATION_MODE: process.env.NEXT_PUBLIC_OPERATION_MODE,
|
|
75
|
+
APP_OPERATION_MODE: process.env.APP_OPERATION_MODE,
|
|
76
|
+
RENDER_ENV: "csr"
|
|
77
|
+
})
|
|
78
|
+
];
|
|
79
|
+
return config2;
|
|
80
|
+
});
|
|
81
|
+
var webpack_csr_default = config;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { withReact } from "@nx/react";
|
|
2
|
+
import { composePlugins, withNx } from "@nx/webpack";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import webpack, { EnvironmentPlugin } from "webpack";
|
|
5
|
+
|
|
6
|
+
interface WebpackConfig extends webpack.Configuration {
|
|
7
|
+
resolve?: {
|
|
8
|
+
alias?: Record<string, string>;
|
|
9
|
+
fallback?: Record<string, string | false>;
|
|
10
|
+
};
|
|
11
|
+
plugins?: webpack.WebpackPluginInstance[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ProcessEnv {
|
|
15
|
+
NX_TASK_TARGET_PROJECT?: string;
|
|
16
|
+
NEXT_PUBLIC_REPO_NAME?: string;
|
|
17
|
+
NEXT_PUBLIC_SERVE_DOMAIN?: string;
|
|
18
|
+
NEXT_PUBLIC_APP_NAME?: string;
|
|
19
|
+
NEXT_PUBLIC_ENV?: string;
|
|
20
|
+
NEXT_PUBLIC_OPERATION_MODE?: string;
|
|
21
|
+
APP_OPERATION_MODE?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const config = composePlugins(withNx({ skipTypeChecking: true }), withReact(), (config: WebpackConfig) => {
|
|
25
|
+
config.resolve = {
|
|
26
|
+
...(config.resolve ?? {}),
|
|
27
|
+
alias: {
|
|
28
|
+
...(config.resolve?.alias ?? {}),
|
|
29
|
+
"next/font/local": path.resolve(__dirname, "./createFont"),
|
|
30
|
+
"next/font/google": path.resolve(__dirname, "./createFont"),
|
|
31
|
+
"next/navigation": path.resolve(__dirname, "./router"),
|
|
32
|
+
[`@${process.env.NX_TASK_TARGET_PROJECT}/lib`]: path.resolve(
|
|
33
|
+
__dirname,
|
|
34
|
+
`../../../${process.env.NX_TASK_TARGET_PROJECT}/lib/`
|
|
35
|
+
),
|
|
36
|
+
},
|
|
37
|
+
fallback: {
|
|
38
|
+
...(config.resolve?.fallback ?? {}),
|
|
39
|
+
url: require.resolve("url"),
|
|
40
|
+
fs: false,
|
|
41
|
+
vm: require.resolve("vm-browserify"),
|
|
42
|
+
process: require.resolve("process"),
|
|
43
|
+
crypto: require.resolve("crypto-browserify"),
|
|
44
|
+
http: require.resolve("stream-http"),
|
|
45
|
+
https: require.resolve("https-browserify"),
|
|
46
|
+
os: require.resolve("os-browserify/browser"),
|
|
47
|
+
stream: require.resolve("stream-browserify"),
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// config.output = {
|
|
52
|
+
// path: path.resolve(__dirname, "public"),
|
|
53
|
+
// filename: "[name].js",
|
|
54
|
+
// globalObject: "self",
|
|
55
|
+
// };
|
|
56
|
+
// config.target = "webworker";
|
|
57
|
+
config.plugins = [
|
|
58
|
+
...(config.plugins?.filter((plugin) => plugin.constructor.name !== "ForkTsCheckerWebpackPlugin") ?? []),
|
|
59
|
+
//add process plugin
|
|
60
|
+
new webpack.ProvidePlugin({
|
|
61
|
+
process: "process/browser",
|
|
62
|
+
}),
|
|
63
|
+
new EnvironmentPlugin({
|
|
64
|
+
NEXT_PUBLIC_REPO_NAME: process.env.NEXT_PUBLIC_REPO_NAME,
|
|
65
|
+
NEXT_PUBLIC_SERVE_DOMAIN: process.env.NEXT_PUBLIC_SERVE_DOMAIN,
|
|
66
|
+
NEXT_PUBLIC_APP_NAME: process.env.NEXT_PUBLIC_APP_NAME ?? process.env.NX_TASK_TARGET_PROJECT,
|
|
67
|
+
NEXT_PUBLIC_ENV: process.env.NEXT_PUBLIC_ENV,
|
|
68
|
+
NEXT_PUBLIC_OPERATION_MODE: process.env.NEXT_PUBLIC_OPERATION_MODE,
|
|
69
|
+
APP_OPERATION_MODE: process.env.APP_OPERATION_MODE,
|
|
70
|
+
RENDER_ENV: "csr",
|
|
71
|
+
}),
|
|
72
|
+
];
|
|
73
|
+
return config;
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export default config;
|
package/src/jest.preset.js
DELETED
package/src/tailwind.base.js
DELETED
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
const { createGlobPatternsForDependencies } = require("@nx/next/tailwind");
|
|
2
|
-
const { join } = require("path");
|
|
3
|
-
|
|
4
|
-
const directions = ["Right", "Left", "Up", "Down"];
|
|
5
|
-
const percentages = [5, 15, 30, 100];
|
|
6
|
-
const duration = [150, 500, 1000];
|
|
7
|
-
|
|
8
|
-
// fadeInRight5_150ms: "fadeInRight5 0.15s ease-in-out forwards",
|
|
9
|
-
// fadeInRight5_500ms: "fadeInRight5 0.5s ease-in-out forwards",
|
|
10
|
-
// fadeInRight5_1000ms: "fadeInRight5 1s ease-in-out forwards",
|
|
11
|
-
// delay 는 animation-delay-300 을 className에 추가해서 사용
|
|
12
|
-
// 그 외의 duration,timing function, fill mode 적용시, animate-[fadeInRight100_1s_ease-in-out_2s_forwards]
|
|
13
|
-
const animations = directions.reduce((acc, direction) => {
|
|
14
|
-
percentages.forEach((percentage) => {
|
|
15
|
-
duration.forEach((time) => {
|
|
16
|
-
const key = `fadeIn${direction}${percentage}_${time}ms`;
|
|
17
|
-
const value = `fadeIn${direction}${percentage} ${time / 1000}s ease-in-out forwards`;
|
|
18
|
-
acc[key] = value;
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
return acc;
|
|
22
|
-
}, {});
|
|
23
|
-
|
|
24
|
-
const keyframes = directions.reduce((acc, direction) => {
|
|
25
|
-
percentages.forEach((percentage) => {
|
|
26
|
-
const key = `fadeIn${direction}${percentage}`;
|
|
27
|
-
const xPercentage = direction === "Left" ? -percentage : direction === "Right" ? percentage : 0;
|
|
28
|
-
const yPercentage = direction === "Up" ? percentage : direction === "Down" ? -percentage : 0;
|
|
29
|
-
|
|
30
|
-
const value = {
|
|
31
|
-
"0%": {
|
|
32
|
-
opacity: 0,
|
|
33
|
-
// transform: `translate(${xPercentage}%, ${yPercentage}%)`,
|
|
34
|
-
translate: `${xPercentage}% ${yPercentage}%`,
|
|
35
|
-
},
|
|
36
|
-
"100%": {
|
|
37
|
-
opacity: 1,
|
|
38
|
-
// transform: "translate(0, 0)",
|
|
39
|
-
translate: "0 0",
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
acc[key] = value;
|
|
44
|
-
});
|
|
45
|
-
return acc;
|
|
46
|
-
}, {});
|
|
47
|
-
|
|
48
|
-
const defaultPlugin = require("tailwindcss/plugin")(
|
|
49
|
-
({ matchUtilities, theme, addUtilities, addComponents, addBase }) => {
|
|
50
|
-
matchUtilities(
|
|
51
|
-
{
|
|
52
|
-
"animation-delay": (value) => {
|
|
53
|
-
return { "animation-delay": value };
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
{ values: theme("transitionDelay") }
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
addUtilities({
|
|
60
|
-
".centric": {
|
|
61
|
-
display: "flex",
|
|
62
|
-
"justify-content": "center",
|
|
63
|
-
"align-items": "center",
|
|
64
|
-
},
|
|
65
|
-
".all-initial": { all: "initial" },
|
|
66
|
-
".all-inherit": { all: "inherit" },
|
|
67
|
-
".all-revert": { all: "revert" },
|
|
68
|
-
".all-unset": { all: "unset" },
|
|
69
|
-
});
|
|
70
|
-
addComponents({});
|
|
71
|
-
addBase({});
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
theme: {
|
|
75
|
-
container: { center: true },
|
|
76
|
-
extend: {
|
|
77
|
-
colors: {
|
|
78
|
-
"primary-light": "hsl(var(--primary-light) / <alpha-value>)",
|
|
79
|
-
"primary-dark": "hsl(var(--primary-dark) / <alpha-value>)",
|
|
80
|
-
"secondary-light": "hsl(var(--secondary-light) / <alpha-value>)",
|
|
81
|
-
"secondary-dark": "hsl(var(--secondary-dark) / <alpha-value>)",
|
|
82
|
-
},
|
|
83
|
-
transitionProperty: {
|
|
84
|
-
all: "all",
|
|
85
|
-
},
|
|
86
|
-
keyframes: {
|
|
87
|
-
smaller: {
|
|
88
|
-
"0%": { scale: 1, height: "100%" },
|
|
89
|
-
"100%": { scale: 0, height: 0 },
|
|
90
|
-
},
|
|
91
|
-
bigger: {
|
|
92
|
-
"0%": {
|
|
93
|
-
transform: "scale(0.5)",
|
|
94
|
-
},
|
|
95
|
-
"100%": {
|
|
96
|
-
transform: "scale(1)",
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
fadeIn: {
|
|
100
|
-
"0%": { opacity: 0 },
|
|
101
|
-
"100%": { opacity: 1 },
|
|
102
|
-
},
|
|
103
|
-
flyOut: {
|
|
104
|
-
"0%": { opacity: 1, transform: "translate(-50%, -100%)" },
|
|
105
|
-
"100%": { opacity: 0, transform: "translate(-50%, -140%)" },
|
|
106
|
-
},
|
|
107
|
-
drop: {
|
|
108
|
-
"0%": { opacity: 0, transform: "translate(-50%, -140%)" },
|
|
109
|
-
"100%": { opacity: 1, transform: "translate(-50%, -100%)" },
|
|
110
|
-
},
|
|
111
|
-
fadeOut: {
|
|
112
|
-
"0%": { opacity: 1 },
|
|
113
|
-
"100%": { opacity: 0 },
|
|
114
|
-
},
|
|
115
|
-
flash: {
|
|
116
|
-
"0%": { opacity: 1 },
|
|
117
|
-
"50%": { opacity: 0.2 },
|
|
118
|
-
"100%": { opacity: 1 },
|
|
119
|
-
},
|
|
120
|
-
spin: {
|
|
121
|
-
"0%": { transform: "rotate(0deg)" },
|
|
122
|
-
"100%": { transform: "rotate(360deg)" },
|
|
123
|
-
},
|
|
124
|
-
pop: {
|
|
125
|
-
"0%": { transform: "scale(0, 0)" },
|
|
126
|
-
"50%": { transform: "scale(1.5, 1.5)" },
|
|
127
|
-
"100%": { transform: "scale(1, 1)" },
|
|
128
|
-
},
|
|
129
|
-
slideDown: {
|
|
130
|
-
from: { height: 0 },
|
|
131
|
-
to: { height: "var(--radix-accordion-content-height)" },
|
|
132
|
-
},
|
|
133
|
-
slideUp: {
|
|
134
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
135
|
-
to: { height: 0 },
|
|
136
|
-
},
|
|
137
|
-
menuOpen: {
|
|
138
|
-
"0%": {
|
|
139
|
-
opacity: 0,
|
|
140
|
-
width: 0,
|
|
141
|
-
},
|
|
142
|
-
"100%": {
|
|
143
|
-
opacity: 1,
|
|
144
|
-
width: 80,
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
menuClose: {
|
|
148
|
-
"0%": {
|
|
149
|
-
opacity: 1,
|
|
150
|
-
width: 80,
|
|
151
|
-
},
|
|
152
|
-
"100%": {
|
|
153
|
-
opacity: 0,
|
|
154
|
-
width: 0,
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
"backdrop-blur": {
|
|
158
|
-
"0%": { "backdrop-filter": "blur(0)" },
|
|
159
|
-
"100%": { "backdrop-filter": "blur(5px)" },
|
|
160
|
-
},
|
|
161
|
-
zoomIn: {
|
|
162
|
-
"0%": {
|
|
163
|
-
opacity: 0,
|
|
164
|
-
transform: "scale(0.6)",
|
|
165
|
-
},
|
|
166
|
-
"100%": {
|
|
167
|
-
opacity: 1,
|
|
168
|
-
transform: "scale(1)",
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
bottomUp: {
|
|
172
|
-
"0%": {
|
|
173
|
-
transform: "translateY(100%)",
|
|
174
|
-
},
|
|
175
|
-
"100%": {
|
|
176
|
-
transform: "translateY(0)",
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
bottomDown: {
|
|
180
|
-
"0%": {
|
|
181
|
-
transform: "translateY(0)",
|
|
182
|
-
},
|
|
183
|
-
"100%": {
|
|
184
|
-
transform: "translateY(100%)",
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
wave: {
|
|
188
|
-
"0%": {
|
|
189
|
-
"box-shadow":
|
|
190
|
-
"0 0 0 0 rgba(219, 39, 119, 0.3), 0 0 0 1em rgba(219, 39, 119, 0.3), 0 0 0 2em rgba(219, 39, 119, 0.3),0 0 0 3em rgba(219, 39, 119, 0.3)",
|
|
191
|
-
},
|
|
192
|
-
"100%": {
|
|
193
|
-
"box-shadow":
|
|
194
|
-
"0 0 0 1em rgba(219, 39, 119, 0.3), 0 0 0 2em rgba(219, 39, 119, 0.3), 0 0 0 3em rgba(219, 39, 119, 0.3), 0 0 0 4em rgba(219, 39, 119, 0)",
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
translateUp: {
|
|
198
|
-
"0%": {
|
|
199
|
-
transform: "translateY(0)",
|
|
200
|
-
},
|
|
201
|
-
"100%": {
|
|
202
|
-
transform: "translateY(-60%)",
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
|
-
tranlateLeft: {
|
|
206
|
-
"0%": {
|
|
207
|
-
transform: "translateX(100%)",
|
|
208
|
-
},
|
|
209
|
-
"100%": {
|
|
210
|
-
transform: "translateX(0)",
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
tranlateRight: {
|
|
214
|
-
"0%": {
|
|
215
|
-
transform: "translateX(-100%)",
|
|
216
|
-
},
|
|
217
|
-
"100%": {
|
|
218
|
-
transform: "translateX(0)",
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
floatUpDown: {
|
|
222
|
-
"0%": {
|
|
223
|
-
transform: "translateY(0%)",
|
|
224
|
-
},
|
|
225
|
-
"50%": {
|
|
226
|
-
transform: "translateY(10%)",
|
|
227
|
-
},
|
|
228
|
-
"100%": {
|
|
229
|
-
transform: "translateY(0%)",
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
floatDownUp: {
|
|
233
|
-
"0%": {
|
|
234
|
-
transform: "translateY(10%)",
|
|
235
|
-
},
|
|
236
|
-
"50%": {
|
|
237
|
-
transform: "translateY(0%)",
|
|
238
|
-
},
|
|
239
|
-
"100%": {
|
|
240
|
-
transform: "translateY(10%)",
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
scanDown: {
|
|
244
|
-
"0%": {
|
|
245
|
-
top: "-100%",
|
|
246
|
-
},
|
|
247
|
-
"100%": {
|
|
248
|
-
top: "200%",
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
...keyframes,
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
animation: {
|
|
256
|
-
smaller: "smaller 0.15s ease-in-out forwards",
|
|
257
|
-
bigger: "bigger 1s ease-in-out forwards",
|
|
258
|
-
fadeIn: "fadeIn 0.15s ease-in-out forwards",
|
|
259
|
-
fadeIn_750ms: "fadeIn 0.75s ease-in-out forwards",
|
|
260
|
-
fadeOut: "fadeOut 0.15s ease-in-out forwards",
|
|
261
|
-
flyOut: "flyOut 0.15s ease-in-out forwards",
|
|
262
|
-
drop: "drop 0.15s ease-in-out forwards",
|
|
263
|
-
flash: "flash 1s linear infinite",
|
|
264
|
-
spin: "spin 1s linear infinite",
|
|
265
|
-
spin_15s: "spin 15s linear infinite",
|
|
266
|
-
"backdrop-blur": "backdrop-blur 2s ease-in-out forwards",
|
|
267
|
-
pop: "pop 0.15s ease-in-out forwards",
|
|
268
|
-
menuOpen: "menuOpen 0.3s ease-in-out forwards",
|
|
269
|
-
menuClose: "menuClose 0.3s ease-in-out forwards",
|
|
270
|
-
slideDown: "slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)",
|
|
271
|
-
slideUp: "slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)",
|
|
272
|
-
zoomIn: "zoomIn 0.15s ease-in-out forwards",
|
|
273
|
-
zoomIn_1000ms: "zoomIn 1s ease-in-out forwards",
|
|
274
|
-
wave: "wave 1s linear infinite",
|
|
275
|
-
fadeIn_delay_1s: "fadeIn 0.3s ease-in-out 1s forwards",
|
|
276
|
-
translateUp: "translateUp 0.5s ease-in-out 0.5s forwards",
|
|
277
|
-
bottomUp: "bottomUp 0.5s ease-in-out 0.5s forwards",
|
|
278
|
-
translateLeft: "translateLeft 0.15s ease-in-out forwards",
|
|
279
|
-
translateRight: "tranlateRight 0.15s ease-in-out forwards",
|
|
280
|
-
spreadOutFromCenter: "spreadOutFromCenter 1s ease-out forwards",
|
|
281
|
-
floatUpDown: "floatUpDown 3s linear forwards infinite",
|
|
282
|
-
floatDownUp: "floatDownUp 3s linear forwards infinite",
|
|
283
|
-
scanDown: "scanDown 3s ease-in-out infinite",
|
|
284
|
-
...animations,
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
},
|
|
288
|
-
}
|
|
289
|
-
);
|
|
290
|
-
|
|
291
|
-
const withBase = (
|
|
292
|
-
dirname,
|
|
293
|
-
{
|
|
294
|
-
fonts = [],
|
|
295
|
-
themes = [],
|
|
296
|
-
config = {},
|
|
297
|
-
container = "normal",
|
|
298
|
-
colors = {},
|
|
299
|
-
backgroundImage = {},
|
|
300
|
-
extend = {},
|
|
301
|
-
plugins = [],
|
|
302
|
-
} = {}
|
|
303
|
-
) => ({
|
|
304
|
-
content: [
|
|
305
|
-
join(dirname, "./app/**/*.{js,ts,jsx,tsx}"),
|
|
306
|
-
join(dirname, "./lib/**/*.{js,ts,jsx,tsx}"),
|
|
307
|
-
join(dirname, "./ui/**/*.{js,ts,jsx,tsx}"),
|
|
308
|
-
...createGlobPatternsForDependencies(dirname),
|
|
309
|
-
],
|
|
310
|
-
theme: {
|
|
311
|
-
...config,
|
|
312
|
-
...(container === "compact"
|
|
313
|
-
? {
|
|
314
|
-
container: {
|
|
315
|
-
center: true,
|
|
316
|
-
// padding: '1rem',
|
|
317
|
-
screens: {
|
|
318
|
-
sm: "600px",
|
|
319
|
-
md: "768px",
|
|
320
|
-
lg: "1024px",
|
|
321
|
-
xl: "1280px",
|
|
322
|
-
"2xl": "1280px",
|
|
323
|
-
},
|
|
324
|
-
},
|
|
325
|
-
}
|
|
326
|
-
: {}),
|
|
327
|
-
extend: {
|
|
328
|
-
fontFamily: Object.fromEntries(fonts.map((font) => [font, [`var(--font-${font})`]])),
|
|
329
|
-
colors: colors || {},
|
|
330
|
-
backgroundImage: backgroundImage || {},
|
|
331
|
-
...extend,
|
|
332
|
-
},
|
|
333
|
-
},
|
|
334
|
-
daisyui: {
|
|
335
|
-
themes: Array.isArray(themes) ? (themes.length === 0 ? ["light", "dark"] : themes) : [themes],
|
|
336
|
-
logs: false,
|
|
337
|
-
},
|
|
338
|
-
plugins: [
|
|
339
|
-
defaultPlugin,
|
|
340
|
-
require("@tailwindcss/aspect-ratio"),
|
|
341
|
-
require("@tailwindcss/typography"),
|
|
342
|
-
require("@tailwindcss/container-queries"),
|
|
343
|
-
// require("tailwindcss-animation-delay"),
|
|
344
|
-
require("tailwind-scrollbar"),
|
|
345
|
-
require("daisyui"),
|
|
346
|
-
require("tailwindcss-radix")(),
|
|
347
|
-
...plugins,
|
|
348
|
-
],
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
module.exports = { defaultPlugin, withBase };
|