@akanjs/config 0.0.39 → 0.0.41
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/index.d.ts +132 -0
- package/package.json +1 -1
- package/src/akanConfig.d.ts +7 -0
- package/src/akanConfig.ts +141 -0
- package/src/baseConfigEnv.d.ts +8 -0
- package/src/baseConfigEnv.ts +21 -0
- package/src/capacitor.base.config.ts +39 -0
- package/src/nextConfig.d.ts +17 -0
- package/src/nextConfig.ts +195 -0
- package/src/postcss.config.base.js +24 -0
- package/src/styles.css +610 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { NextConfig } from "next";
|
|
2
|
+
export * from "./src/akanConfig";
|
|
3
|
+
export * from "./src/nextConfig";
|
|
4
|
+
export interface RunnerProps {
|
|
5
|
+
appName: string;
|
|
6
|
+
repoName: string;
|
|
7
|
+
serveDomain: string;
|
|
8
|
+
env: "testing" | "debug" | "develop" | "main";
|
|
9
|
+
command?: string;
|
|
10
|
+
}
|
|
11
|
+
export type Arch = "amd64" | "arm64";
|
|
12
|
+
export type ExplicitDependencies = string[] | {
|
|
13
|
+
[key in Arch]: string[];
|
|
14
|
+
};
|
|
15
|
+
export interface AppConfigResult {
|
|
16
|
+
rootLib?: string;
|
|
17
|
+
libs: string[];
|
|
18
|
+
backend: {
|
|
19
|
+
dockerfile: string;
|
|
20
|
+
explicitDependencies: ExplicitDependencies;
|
|
21
|
+
};
|
|
22
|
+
frontend: {
|
|
23
|
+
dockerfile: string;
|
|
24
|
+
nextConfig: NextConfig | (() => Promise<NextConfig> | NextConfig);
|
|
25
|
+
routes?: {
|
|
26
|
+
basePath?: string;
|
|
27
|
+
domains: {
|
|
28
|
+
main?: string[];
|
|
29
|
+
develop?: string[];
|
|
30
|
+
debug?: string[];
|
|
31
|
+
};
|
|
32
|
+
}[];
|
|
33
|
+
explicitDependencies: ExplicitDependencies;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface LibConfigResult {
|
|
37
|
+
rootLib?: string;
|
|
38
|
+
libs: string[];
|
|
39
|
+
backend: {
|
|
40
|
+
explicitDependencies: ExplicitDependencies;
|
|
41
|
+
};
|
|
42
|
+
frontend: {
|
|
43
|
+
explicitDependencies: ExplicitDependencies;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export type DeepPartial<T> = {
|
|
47
|
+
[P in keyof T]?: T[P] extends any[] ? T[P] : T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
48
|
+
};
|
|
49
|
+
export type AppConfig = DeepPartial<AppConfigResult> | ((props: RunnerProps) => DeepPartial<AppConfigResult>);
|
|
50
|
+
export type LibConfig = DeepPartial<LibConfigResult> | ((props: RunnerProps) => DeepPartial<LibConfigResult>);
|
|
51
|
+
export interface AkanConfigFile {
|
|
52
|
+
default: NextConfig;
|
|
53
|
+
}
|
|
54
|
+
export interface FileConventionScanResult {
|
|
55
|
+
constants: {
|
|
56
|
+
databases: string[];
|
|
57
|
+
scalars: string[];
|
|
58
|
+
};
|
|
59
|
+
dictionary: {
|
|
60
|
+
databases: string[];
|
|
61
|
+
services: string[];
|
|
62
|
+
scalars: string[];
|
|
63
|
+
};
|
|
64
|
+
documents: {
|
|
65
|
+
databases: string[];
|
|
66
|
+
scalars: string[];
|
|
67
|
+
};
|
|
68
|
+
services: {
|
|
69
|
+
databases: string[];
|
|
70
|
+
services: string[];
|
|
71
|
+
scalars: string[];
|
|
72
|
+
};
|
|
73
|
+
signal: {
|
|
74
|
+
databases: string[];
|
|
75
|
+
services: string[];
|
|
76
|
+
scalars: string[];
|
|
77
|
+
};
|
|
78
|
+
store: {
|
|
79
|
+
databases: string[];
|
|
80
|
+
services: string[];
|
|
81
|
+
scalars: string[];
|
|
82
|
+
};
|
|
83
|
+
components: {
|
|
84
|
+
databases: string[];
|
|
85
|
+
services: string[];
|
|
86
|
+
scalars: string[];
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export declare const getDefaultFileScan: () => FileConventionScanResult;
|
|
90
|
+
export interface AppScanResult {
|
|
91
|
+
name: string;
|
|
92
|
+
type: "app" | "lib";
|
|
93
|
+
akanConfig: AppConfigResult;
|
|
94
|
+
files: FileConventionScanResult;
|
|
95
|
+
libDeps: string[];
|
|
96
|
+
pkgDeps: string[];
|
|
97
|
+
dependencies: string[];
|
|
98
|
+
libs: {
|
|
99
|
+
[key: string]: LibScanResult;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export interface LibScanResult {
|
|
103
|
+
name: string;
|
|
104
|
+
type: "app" | "lib";
|
|
105
|
+
akanConfig: LibConfigResult;
|
|
106
|
+
files: FileConventionScanResult;
|
|
107
|
+
libDeps: string[];
|
|
108
|
+
pkgDeps: string[];
|
|
109
|
+
dependencies: string[];
|
|
110
|
+
libs: {
|
|
111
|
+
[key: string]: LibScanResult;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface PkgScanResult {
|
|
115
|
+
name: string;
|
|
116
|
+
pkgDeps: string[];
|
|
117
|
+
dependencies: string[];
|
|
118
|
+
}
|
|
119
|
+
export interface WorkspaceScanResult {
|
|
120
|
+
appNames: string[];
|
|
121
|
+
libNames: string[];
|
|
122
|
+
pkgNames: string[];
|
|
123
|
+
apps: {
|
|
124
|
+
[key: string]: AppScanResult;
|
|
125
|
+
};
|
|
126
|
+
libs: {
|
|
127
|
+
[key: string]: LibScanResult;
|
|
128
|
+
};
|
|
129
|
+
pkgs: {
|
|
130
|
+
[key: string]: PkgScanResult;
|
|
131
|
+
};
|
|
132
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AppConfig, AppConfigResult, DeepPartial, LibConfigResult, RunnerProps } from "@akanjs/config";
|
|
2
|
+
import type { NextConfig } from "next";
|
|
3
|
+
export declare const makeAppConfig: (config: DeepPartial<AppConfigResult>, props?: Partial<RunnerProps>) => AppConfigResult;
|
|
4
|
+
export declare const getAppConfig: (appRoot: string, props: RunnerProps) => Promise<AppConfigResult>;
|
|
5
|
+
export declare const makeLibConfig: (config: DeepPartial<LibConfigResult>, props?: Partial<RunnerProps>) => LibConfigResult;
|
|
6
|
+
export declare const getLibConfig: (libRoot: string, props: RunnerProps) => Promise<LibConfigResult>;
|
|
7
|
+
export declare const getNextConfig: (configImp: AppConfig, appData: any) => NextConfig | (() => Promise<NextConfig> | NextConfig);
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AppConfig,
|
|
3
|
+
AppConfigResult,
|
|
4
|
+
AppScanResult,
|
|
5
|
+
DeepPartial,
|
|
6
|
+
LibConfig,
|
|
7
|
+
LibConfigResult,
|
|
8
|
+
RunnerProps,
|
|
9
|
+
} from "@akanjs/config";
|
|
10
|
+
import fs from "fs";
|
|
11
|
+
import type { NextConfig } from "next";
|
|
12
|
+
import path from "path";
|
|
13
|
+
|
|
14
|
+
import { getBaseConfigEnv } from "./baseConfigEnv";
|
|
15
|
+
import { withBase } from "./nextConfig";
|
|
16
|
+
|
|
17
|
+
export const makeAppConfig = (
|
|
18
|
+
config: DeepPartial<AppConfigResult>,
|
|
19
|
+
props: Partial<RunnerProps> = {}
|
|
20
|
+
): AppConfigResult => {
|
|
21
|
+
const baseConfigEnv = getBaseConfigEnv(props.appName);
|
|
22
|
+
const {
|
|
23
|
+
appName = baseConfigEnv.appName,
|
|
24
|
+
repoName = baseConfigEnv.repoName,
|
|
25
|
+
serveDomain = baseConfigEnv.serveDomain,
|
|
26
|
+
env = baseConfigEnv.env,
|
|
27
|
+
command = "build",
|
|
28
|
+
} = props;
|
|
29
|
+
return {
|
|
30
|
+
rootLib: config.rootLib,
|
|
31
|
+
libs: config.libs ?? [],
|
|
32
|
+
backend: {
|
|
33
|
+
dockerfile:
|
|
34
|
+
config.backend?.dockerfile ??
|
|
35
|
+
`FROM node:22-slim
|
|
36
|
+
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
|
|
37
|
+
RUN apt-get update && apt-get upgrade -y
|
|
38
|
+
RUN apt-get install -y ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils udev
|
|
39
|
+
ARG TARGETARCH
|
|
40
|
+
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
|
41
|
+
wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-debian92-x86_64-100.3.1.deb && \
|
|
42
|
+
apt-get install -y ./mongodb-database-tools-*.deb && \
|
|
43
|
+
rm -f mongodb-database-tools-*.deb; \
|
|
44
|
+
fi
|
|
45
|
+
RUN apt-get install -y git redis build-essential python3
|
|
46
|
+
RUN rm -rf /var/lib/apt/lists/*
|
|
47
|
+
RUN mkdir -p /workspace
|
|
48
|
+
WORKDIR /workspace
|
|
49
|
+
COPY ./package.json ./package.json
|
|
50
|
+
RUN npx pnpm i --prod
|
|
51
|
+
COPY . .
|
|
52
|
+
ENV PORT 8080
|
|
53
|
+
ENV NODE_OPTIONS=--max_old_space_size=8192
|
|
54
|
+
ENV NEXT_PUBLIC_REPO_NAME=${repoName}
|
|
55
|
+
ENV NEXT_PUBLIC_SERVE_DOMAIN=${serveDomain}
|
|
56
|
+
ENV NEXT_PUBLIC_APP_NAME=${appName}
|
|
57
|
+
ENV NEXT_PUBLIC_ENV=${env}
|
|
58
|
+
ENV NEXT_PUBLIC_OPERATION_MODE=cloud
|
|
59
|
+
CMD ["node", "main.js"]`,
|
|
60
|
+
explicitDependencies: (config.backend?.explicitDependencies as string[] | undefined) ?? ([] as string[]),
|
|
61
|
+
},
|
|
62
|
+
frontend: {
|
|
63
|
+
dockerfile:
|
|
64
|
+
config.frontend?.dockerfile ??
|
|
65
|
+
`FROM node:22-alpine
|
|
66
|
+
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
|
|
67
|
+
RUN apk --no-cache add git
|
|
68
|
+
RUN mkdir -p /workspace
|
|
69
|
+
WORKDIR /workspace
|
|
70
|
+
COPY ./package.json ./package.json
|
|
71
|
+
RUN npx pnpm i --prod
|
|
72
|
+
COPY . .
|
|
73
|
+
ENV PORT 4200
|
|
74
|
+
ENV NODE_OPTIONS=--max_old_space_size=8192
|
|
75
|
+
ENV NEXT_PUBLIC_REPO_NAME=${repoName}
|
|
76
|
+
ENV NEXT_PUBLIC_SERVE_DOMAIN=${serveDomain}
|
|
77
|
+
ENV NEXT_PUBLIC_APP_NAME=${appName}
|
|
78
|
+
ENV NEXT_PUBLIC_ENV=${env}
|
|
79
|
+
ENV NEXT_PUBLIC_OPERATION_MODE=cloud
|
|
80
|
+
CMD ["npm", "start"]`,
|
|
81
|
+
nextConfig: withBase(
|
|
82
|
+
appName,
|
|
83
|
+
config.frontend?.nextConfig
|
|
84
|
+
? typeof config.frontend.nextConfig === "function"
|
|
85
|
+
? (config.frontend as { nextConfig: () => NextConfig }).nextConfig()
|
|
86
|
+
: config.frontend.nextConfig
|
|
87
|
+
: {},
|
|
88
|
+
config.libs ?? [],
|
|
89
|
+
config.frontend?.routes
|
|
90
|
+
),
|
|
91
|
+
explicitDependencies: (config.frontend?.explicitDependencies as string[] | undefined) ?? ([] as string[]),
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const getAppConfig = async (appRoot: string, props: RunnerProps): Promise<AppConfigResult> => {
|
|
97
|
+
const akanConfigPath = path.join(appRoot, "akan.config.ts");
|
|
98
|
+
if (!fs.existsSync(akanConfigPath)) throw new Error(`application akan.config.ts is not found ${appRoot}`);
|
|
99
|
+
const configImp = ((await import(`${appRoot}/akan.config.ts`)) as { default: AppConfig }).default;
|
|
100
|
+
const config = typeof configImp === "function" ? configImp(props) : configImp;
|
|
101
|
+
return makeAppConfig(config, props);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const makeLibConfig = (
|
|
105
|
+
config: DeepPartial<LibConfigResult>,
|
|
106
|
+
props: Partial<RunnerProps> = {}
|
|
107
|
+
): LibConfigResult => {
|
|
108
|
+
return {
|
|
109
|
+
rootLib: config.rootLib,
|
|
110
|
+
libs: config.libs ?? [],
|
|
111
|
+
backend: {
|
|
112
|
+
explicitDependencies: (config.backend?.explicitDependencies as string[] | undefined) ?? ([] as string[]),
|
|
113
|
+
},
|
|
114
|
+
frontend: {
|
|
115
|
+
explicitDependencies: (config.frontend?.explicitDependencies as string[] | undefined) ?? ([] as string[]),
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const getLibConfig = async (libRoot: string, props: RunnerProps): Promise<LibConfigResult> => {
|
|
121
|
+
const akanConfigPath = path.join(libRoot, "akan.config.ts");
|
|
122
|
+
if (!fs.existsSync(akanConfigPath)) throw new Error(`library akan.config.ts is not found ${libRoot}`);
|
|
123
|
+
const configImp = ((await import(`${libRoot}/akan.config.ts`)) as { default: LibConfig }).default;
|
|
124
|
+
const config = typeof configImp === "function" ? configImp(props) : configImp;
|
|
125
|
+
return makeLibConfig(config, props);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const getNextConfig = (configImp: AppConfig, appData: any) => {
|
|
129
|
+
const appInfo = appData as AppScanResult;
|
|
130
|
+
const baseConfigEnv = getBaseConfigEnv(appInfo.name);
|
|
131
|
+
const props: RunnerProps = {
|
|
132
|
+
appName: baseConfigEnv.appName,
|
|
133
|
+
repoName: baseConfigEnv.repoName,
|
|
134
|
+
serveDomain: baseConfigEnv.serveDomain,
|
|
135
|
+
env: baseConfigEnv.env,
|
|
136
|
+
command: "build",
|
|
137
|
+
};
|
|
138
|
+
const config = typeof configImp === "function" ? configImp(props) : configImp;
|
|
139
|
+
const akanConfig = makeAppConfig(config, props);
|
|
140
|
+
return akanConfig.frontend.nextConfig;
|
|
141
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface BaseConfigEnv {
|
|
2
|
+
appName: string;
|
|
3
|
+
repoName: string;
|
|
4
|
+
serveDomain: string;
|
|
5
|
+
env: "testing" | "debug" | "develop" | "main";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const getBaseConfigEnv = (appName = process.env.NEXT_PUBLIC_APP_NAME): BaseConfigEnv => {
|
|
9
|
+
if (!appName) throw new Error("NEXT_PUBLIC_APP_NAME is not set");
|
|
10
|
+
|
|
11
|
+
const repoName = process.env.NEXT_PUBLIC_REPO_NAME;
|
|
12
|
+
if (!repoName) throw new Error("NEXT_PUBLIC_REPO_NAME is not set");
|
|
13
|
+
|
|
14
|
+
const serveDomain = process.env.NEXT_PUBLIC_SERVE_DOMAIN;
|
|
15
|
+
if (!serveDomain) throw new Error("NEXT_PUBLIC_SERVE_DOMAIN is not set");
|
|
16
|
+
|
|
17
|
+
const env = (process.env.NEXT_PUBLIC_ENV ?? "debug") as "testing" | "debug" | "develop" | "main" | undefined;
|
|
18
|
+
if (!env) throw new Error("NEXT_PUBLIC_ENV is not set");
|
|
19
|
+
|
|
20
|
+
return { appName, repoName, serveDomain, env };
|
|
21
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { CapacitorConfig } from "@capacitor/cli";
|
|
2
|
+
import os from "os";
|
|
3
|
+
|
|
4
|
+
const getLocalIP = () => {
|
|
5
|
+
const interfaces = os.networkInterfaces();
|
|
6
|
+
for (const interfaceName in interfaces) {
|
|
7
|
+
const iface = interfaces[interfaceName];
|
|
8
|
+
if (!iface) continue;
|
|
9
|
+
for (const alias of iface) {
|
|
10
|
+
if (alias.family === "IPv4" && !alias.internal) return alias.address;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return "127.0.0.1"; // fallback to localhost if no suitable IP found
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const withBase = (applyConfig: (config: CapacitorConfig) => CapacitorConfig) => {
|
|
17
|
+
const projectName = process.env.NEXT_PUBLIC_APP_NAME;
|
|
18
|
+
if (!projectName) throw new Error("projectName is not defined, please run with nx command");
|
|
19
|
+
const ip = getLocalIP();
|
|
20
|
+
const baseConfig: CapacitorConfig = {
|
|
21
|
+
appId: `com.${projectName}`,
|
|
22
|
+
appName: projectName,
|
|
23
|
+
webDir: `../../dist/apps/${projectName}/csr/`,
|
|
24
|
+
// bundledWebRuntime: false, !not used
|
|
25
|
+
server:
|
|
26
|
+
process.env.APP_OPERATION_MODE !== "release"
|
|
27
|
+
? {
|
|
28
|
+
androidScheme: "http",
|
|
29
|
+
url: `http://${ip}:4201`,
|
|
30
|
+
cleartext: true,
|
|
31
|
+
allowNavigation: [`http://${ip}:8080/*`],
|
|
32
|
+
}
|
|
33
|
+
: undefined,
|
|
34
|
+
plugins: {
|
|
35
|
+
CapacitorCookies: { enabled: true },
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
return applyConfig(baseConfig);
|
|
39
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NextConfig } from "next";
|
|
2
|
+
export type NextConfigFn = (phase: string, context?: any) => Promise<NextConfig> | NextConfig;
|
|
3
|
+
export type NextPlugin = (config: NextConfig) => NextConfig;
|
|
4
|
+
export type NextPluginThatReturnsConfigFn = (config: NextConfig) => NextConfigFn;
|
|
5
|
+
export declare const composePlugins: (...plugins: (NextPlugin | NextPluginThatReturnsConfigFn)[]) => ((baseConfig: NextConfig) => NextConfigFn);
|
|
6
|
+
/**
|
|
7
|
+
* @type { (config: import('@nx/next/plugins/with-nx').WithNxOptions) = import('@nx/next/plugins/with-nx').WithNxOptions }
|
|
8
|
+
**/
|
|
9
|
+
export declare const withBase: (appName: string, config: NextConfig, libs: string[], routes?: {
|
|
10
|
+
basePath?: string;
|
|
11
|
+
domains: {
|
|
12
|
+
main?: string[];
|
|
13
|
+
develop?: string[];
|
|
14
|
+
debug?: string[];
|
|
15
|
+
};
|
|
16
|
+
}[]) => NextConfigFn;
|
|
17
|
+
export declare const defaultNextConfigFile = "import \"tsconfig-paths/register\";\n\nimport { getNextConfig } from \"@akanjs/config\";\n\nimport appInfo from \"./akan.app.json\";\nimport config from \"./akan.config\";\n\nexport default getNextConfig(config, appInfo);\n";
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
2
|
+
import withAnalyze from "@next/bundle-analyzer";
|
|
3
|
+
import type { NextConfig } from "next";
|
|
4
|
+
import pwa from "next-pwa";
|
|
5
|
+
import runtimeCaching from "next-pwa/cache";
|
|
6
|
+
import path from "path";
|
|
7
|
+
|
|
8
|
+
export type NextConfigFn = (phase: string, context?: any) => Promise<NextConfig> | NextConfig;
|
|
9
|
+
|
|
10
|
+
export type NextPlugin = (config: NextConfig) => NextConfig;
|
|
11
|
+
|
|
12
|
+
export type NextPluginThatReturnsConfigFn = (config: NextConfig) => NextConfigFn;
|
|
13
|
+
|
|
14
|
+
export const composePlugins = (
|
|
15
|
+
...plugins: (NextPlugin | NextPluginThatReturnsConfigFn)[]
|
|
16
|
+
): ((baseConfig: NextConfig) => NextConfigFn) => {
|
|
17
|
+
return function (baseConfig: NextConfig) {
|
|
18
|
+
return async function combined(phase: string, context: any): Promise<NextConfig> {
|
|
19
|
+
let config = baseConfig;
|
|
20
|
+
for (const plugin of plugins) {
|
|
21
|
+
const fn = plugin;
|
|
22
|
+
const configOrFn = fn(config);
|
|
23
|
+
if (typeof configOrFn === "function") config = await configOrFn(phase, context);
|
|
24
|
+
else config = configOrFn;
|
|
25
|
+
}
|
|
26
|
+
return config;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const commandType = process.env.AKAN_COMMAND_TYPE?.includes("serve")
|
|
32
|
+
? "serve"
|
|
33
|
+
: process.env.AKAN_COMMAND_TYPE?.includes("build")
|
|
34
|
+
? "build"
|
|
35
|
+
: "deploy";
|
|
36
|
+
const withPWA = pwa({
|
|
37
|
+
dest: "public",
|
|
38
|
+
register: true,
|
|
39
|
+
skipWaiting: true,
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
41
|
+
runtimeCaching,
|
|
42
|
+
disable: commandType === "serve",
|
|
43
|
+
});
|
|
44
|
+
const devDomain = process.env.NEXT_PUBLIC_SERVE_DOMAIN ?? "akanjs.com";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @type { (config: import('@nx/next/plugins/with-nx').WithNxOptions) = import('@nx/next/plugins/with-nx').WithNxOptions }
|
|
48
|
+
**/
|
|
49
|
+
export const withBase = (
|
|
50
|
+
appName: string,
|
|
51
|
+
config: NextConfig,
|
|
52
|
+
libs: string[],
|
|
53
|
+
routes: { basePath?: string; domains: { main?: string[]; develop?: string[]; debug?: string[] } }[] = []
|
|
54
|
+
) => {
|
|
55
|
+
return composePlugins(
|
|
56
|
+
withAnalyze({ enabled: process.env.ANALYZE === "true" }) as unknown as NextPlugin,
|
|
57
|
+
...(commandType !== "serve" || process.env.USE_PWA === "true" ? [withPWA as unknown as NextPlugin] : [])
|
|
58
|
+
)({
|
|
59
|
+
...config,
|
|
60
|
+
eslint: { ...config.eslint, ignoreDuringBuilds: true },
|
|
61
|
+
env: {
|
|
62
|
+
...config.env,
|
|
63
|
+
basePaths: routes.map(({ basePath }) => basePath).join(","),
|
|
64
|
+
},
|
|
65
|
+
transpilePackages: [
|
|
66
|
+
"swiper",
|
|
67
|
+
"ssr-window",
|
|
68
|
+
"dom7",
|
|
69
|
+
...libs.map((lib) => `@${lib}`),
|
|
70
|
+
"@akanjs/base",
|
|
71
|
+
"@akanjs/common",
|
|
72
|
+
"@akanjs/next",
|
|
73
|
+
"@akanjs/ui",
|
|
74
|
+
"@akanjs/client",
|
|
75
|
+
"@akanjs/server",
|
|
76
|
+
"@akanjs/service",
|
|
77
|
+
"@akanjs/signal",
|
|
78
|
+
"@akanjs/store",
|
|
79
|
+
"@akanjs/dictionary",
|
|
80
|
+
"@akanjs/constant",
|
|
81
|
+
"@akanjs/config",
|
|
82
|
+
"@akanjs/document",
|
|
83
|
+
],
|
|
84
|
+
reactStrictMode: commandType === "serve" ? false : true,
|
|
85
|
+
experimental: {
|
|
86
|
+
...(config.experimental ?? {}),
|
|
87
|
+
optimizePackageImports: [
|
|
88
|
+
...[appName, ...libs].map((lib) => [`@${lib}/ui`, `@${lib}/next`, `@${lib}/common`, `@${lib}/client`]).flat(),
|
|
89
|
+
"@contract",
|
|
90
|
+
"@akanjs/next",
|
|
91
|
+
"@akanjs/common",
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
// modularizeImports: {
|
|
95
|
+
// "react-icons/?(((\\w*)?/?)*)": {
|
|
96
|
+
// transform: "@react-icons/all-files/{{ matches.[1] }}/{{member}}",
|
|
97
|
+
// skipDefaultConversion: true,
|
|
98
|
+
// },
|
|
99
|
+
// lodash: { transform: "lodash/{{member}}", preventFullImport: true },
|
|
100
|
+
// ...Object.fromEntries(
|
|
101
|
+
// [appName, ...libs].reduce(
|
|
102
|
+
// (acc, lib) => [
|
|
103
|
+
// ...acc,
|
|
104
|
+
// [`@${lib}/ui`, { transform: `@${lib}/ui/{{member}}`, skipDefaultConversion: true }],
|
|
105
|
+
// [`@${lib}/next`, { transform: `@${lib}/next/{{member}}`, skipDefaultConversion: true }],
|
|
106
|
+
// [`@${lib}/common`, { transform: `@${lib}/common/{{member}}`, skipDefaultConversion: true }],
|
|
107
|
+
// [`@${lib}/client`, { transform: `@${lib}/lib/{{ camelCase member }}`, skipDefaultConversion: true }],
|
|
108
|
+
// ],
|
|
109
|
+
// [
|
|
110
|
+
// ["@contract", { transform: `@contract/src/{{member}}`, skipDefaultConversion: true }],
|
|
111
|
+
// [`@akanjs/next`, { transform: `@akanjs/next/src/{{member}}`, skipDefaultConversion: true }],
|
|
112
|
+
// [`@akanjs/common`, { transform: `@akanjs/common/src/{{member}}`, skipDefaultConversion: true }],
|
|
113
|
+
// ]
|
|
114
|
+
// )
|
|
115
|
+
// ),
|
|
116
|
+
// ...(config.modularizeImports ?? {}),
|
|
117
|
+
// },
|
|
118
|
+
images: {
|
|
119
|
+
formats: ["image/avif", "image/webp"],
|
|
120
|
+
...(config.images ?? {}),
|
|
121
|
+
remotePatterns: [
|
|
122
|
+
...(config.images?.remotePatterns ?? []),
|
|
123
|
+
...routes
|
|
124
|
+
.map(({ domains }) => [
|
|
125
|
+
...(domains.main?.map((domain) => ({ protocol: "https", hostname: `**.${domain}` })) ?? []),
|
|
126
|
+
...(domains.develop?.map((domain) => ({ protocol: "https", hostname: `**.${domain}` })) ?? []),
|
|
127
|
+
...(domains.debug?.map((domain) => ({ protocol: "https", hostname: `**.${domain}` })) ?? []),
|
|
128
|
+
])
|
|
129
|
+
.flat(),
|
|
130
|
+
{ protocol: "https", hostname: `**.${devDomain}` },
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
webpack: (config: NextConfig) => {
|
|
134
|
+
// react-pdf error fix
|
|
135
|
+
config.resolve.alias.canvas = false;
|
|
136
|
+
config.resolve.alias.encoding = false;
|
|
137
|
+
if (process.env.USE_AKANJS_PKGS === "true")
|
|
138
|
+
config.resolve.alias["@akanjs/config"] = path.resolve(__dirname, "../../../../pkgs/@akanjs/config");
|
|
139
|
+
return config;
|
|
140
|
+
},
|
|
141
|
+
redirects() {
|
|
142
|
+
return routes
|
|
143
|
+
.map(({ basePath, domains }) => [
|
|
144
|
+
{ basePath, domain: `${basePath}-debug.${devDomain}` },
|
|
145
|
+
{ basePath, domain: `${basePath}-develop.${devDomain}` },
|
|
146
|
+
{ basePath, domain: `${basePath}-main.${devDomain}` },
|
|
147
|
+
...(domains.main?.map((domain) => ({ basePath, domain })) ?? []),
|
|
148
|
+
...(domains.develop?.map((domain) => ({ basePath, domain })) ?? []),
|
|
149
|
+
...(domains.debug?.map((domain) => ({ basePath, domain })) ?? []),
|
|
150
|
+
])
|
|
151
|
+
.flat()
|
|
152
|
+
.map(({ basePath, domain }) => ({
|
|
153
|
+
source: `/:locale/${basePath}/:path*`,
|
|
154
|
+
has: [{ type: "host", value: domain }],
|
|
155
|
+
permanent: true,
|
|
156
|
+
destination: "/:locale/:path*",
|
|
157
|
+
}));
|
|
158
|
+
},
|
|
159
|
+
rewrites() {
|
|
160
|
+
return routes
|
|
161
|
+
.map(({ basePath, domains }) => [
|
|
162
|
+
{ basePath, domain: `${basePath}-debug.${devDomain}` },
|
|
163
|
+
{ basePath, domain: `${basePath}-develop.${devDomain}` },
|
|
164
|
+
{ basePath, domain: `${basePath}-main.${devDomain}` },
|
|
165
|
+
...(domains.main?.map((domain) => ({ basePath, domain })) ?? []),
|
|
166
|
+
...(domains.develop?.map((domain) => ({ basePath, domain })) ?? []),
|
|
167
|
+
...(domains.debug?.map((domain) => ({ basePath, domain })) ?? []),
|
|
168
|
+
])
|
|
169
|
+
.flat()
|
|
170
|
+
.map(({ basePath, domain }) => [
|
|
171
|
+
{
|
|
172
|
+
source: "/:locale",
|
|
173
|
+
has: [{ type: "host", value: domain }],
|
|
174
|
+
destination: `/:locale/${basePath}`,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
source: `/:locale/:path((?!${basePath}$)(?!admin(?:/|$)).*)`,
|
|
178
|
+
has: [{ type: "host", value: domain }],
|
|
179
|
+
destination: `/:locale/${basePath}/:path*`,
|
|
180
|
+
},
|
|
181
|
+
])
|
|
182
|
+
.flat();
|
|
183
|
+
},
|
|
184
|
+
} as unknown as NextConfig);
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export const defaultNextConfigFile = `import "tsconfig-paths/register";
|
|
188
|
+
|
|
189
|
+
import { getNextConfig } from "@akanjs/config";
|
|
190
|
+
|
|
191
|
+
import appInfo from "./akan.app.json";
|
|
192
|
+
import config from "./akan.config";
|
|
193
|
+
|
|
194
|
+
export default getNextConfig(config, appInfo);
|
|
195
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
|
|
3
|
+
const withBase = (config = {}) => ({
|
|
4
|
+
...config,
|
|
5
|
+
plugins: {
|
|
6
|
+
...(process.env.USE_AKANJS_PKGS === "true"
|
|
7
|
+
? {
|
|
8
|
+
"postcss-import": {
|
|
9
|
+
resolve(id) {
|
|
10
|
+
if (id.startsWith("@akanjs/config/src"))
|
|
11
|
+
return path.resolve(__dirname, id.replace("@akanjs/config/src/", ""));
|
|
12
|
+
else return id;
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
: {}),
|
|
17
|
+
"@tailwindcss/postcss": process.env.AKAN_WORKSPACE_ROOT
|
|
18
|
+
? { base: path.join(process.env.AKAN_WORKSPACE_ROOT, "./") }
|
|
19
|
+
: {},
|
|
20
|
+
...(config.plugins ?? {}),
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
module.exports = { withBase };
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
@plugin "tailwindcss-animation-delay";
|
|
2
|
+
@plugin "tailwind-scrollbar";
|
|
3
|
+
@plugin "tailwindcss-radix";
|
|
4
|
+
|
|
5
|
+
html,
|
|
6
|
+
body {
|
|
7
|
+
margin: 0;
|
|
8
|
+
/* -webkit-touch-callout: none;
|
|
9
|
+
-webkit-user-select: none; */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* invisible scrollbar */
|
|
13
|
+
::-webkit-scrollbar {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
color: inherit;
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* *,
|
|
23
|
+
::before,
|
|
24
|
+
::after {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
border-width: 0;
|
|
27
|
+
border-style: solid;
|
|
28
|
+
border-color: currentColor;
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
} */
|
|
31
|
+
|
|
32
|
+
/* .body {
|
|
33
|
+
-webkit-touch-callout: none;
|
|
34
|
+
-webkit-user-select: none;
|
|
35
|
+
} */
|
|
36
|
+
.img {
|
|
37
|
+
-webkit-user-drag: none;
|
|
38
|
+
}
|
|
39
|
+
.rounded-btn {
|
|
40
|
+
--rounded-btn: 0.75rem;
|
|
41
|
+
}
|
|
42
|
+
.animate-delay-2000 {
|
|
43
|
+
animation-delay: 2000ms;
|
|
44
|
+
}
|
|
45
|
+
.animate-delay-3000 {
|
|
46
|
+
animation-delay: 3000ms;
|
|
47
|
+
}
|
|
48
|
+
.animate-delay-4000 {
|
|
49
|
+
animation-delay: 4000ms;
|
|
50
|
+
}
|
|
51
|
+
.animate-delay-5000 {
|
|
52
|
+
animation-delay: 5000ms;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* 게시판 상세보기시 유튜브 */
|
|
56
|
+
.btn-ghost:hover {
|
|
57
|
+
opacity: 0.5;
|
|
58
|
+
transition: all 0.3s;
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
}
|
|
61
|
+
.btn {
|
|
62
|
+
text-transform: none;
|
|
63
|
+
font-weight: normal;
|
|
64
|
+
}
|
|
65
|
+
.page-content {
|
|
66
|
+
@apply overflow-y-auto h-screen;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@property --percentage {
|
|
70
|
+
initial-value: 100%;
|
|
71
|
+
inherits: false;
|
|
72
|
+
syntax: "<percentage>";
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.chart {
|
|
76
|
+
background: conic-gradient(rgb(244, 62, 21) var(--percentage), white 0);
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
width: 30px;
|
|
79
|
+
height: 30px;
|
|
80
|
+
animation: timer 10s infinite linear;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes timer {
|
|
84
|
+
to {
|
|
85
|
+
--percentage: 0%;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@layer base {
|
|
90
|
+
button:not(:disabled),
|
|
91
|
+
[role="button"]:not(:disabled) {
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@utility centric {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
align-items: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@utility container {
|
|
104
|
+
margin-inline: auto;
|
|
105
|
+
padding-inline: 2rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Always-included keyframes (non-theme animations) */
|
|
109
|
+
@keyframes smaller {
|
|
110
|
+
0% {
|
|
111
|
+
scale: 1;
|
|
112
|
+
height: 100%;
|
|
113
|
+
}
|
|
114
|
+
100% {
|
|
115
|
+
scale: 0;
|
|
116
|
+
height: 0;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@keyframes bigger {
|
|
121
|
+
0% {
|
|
122
|
+
transform: scale(0.5);
|
|
123
|
+
}
|
|
124
|
+
100% {
|
|
125
|
+
transform: scale(1);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@keyframes fadeIn {
|
|
130
|
+
0% {
|
|
131
|
+
opacity: 0;
|
|
132
|
+
}
|
|
133
|
+
100% {
|
|
134
|
+
opacity: 1;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@keyframes flyOut {
|
|
139
|
+
0% {
|
|
140
|
+
opacity: 1;
|
|
141
|
+
transform: translate(-50%, -100%);
|
|
142
|
+
}
|
|
143
|
+
100% {
|
|
144
|
+
opacity: 0;
|
|
145
|
+
transform: translate(-50%, -140%);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@keyframes drop {
|
|
150
|
+
0% {
|
|
151
|
+
opacity: 0;
|
|
152
|
+
transform: translate(-50%, -140%);
|
|
153
|
+
}
|
|
154
|
+
100% {
|
|
155
|
+
opacity: 1;
|
|
156
|
+
transform: translate(-50%, -100%);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@keyframes fadeOut {
|
|
161
|
+
0% {
|
|
162
|
+
opacity: 1;
|
|
163
|
+
}
|
|
164
|
+
100% {
|
|
165
|
+
opacity: 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@keyframes flash {
|
|
170
|
+
0% {
|
|
171
|
+
opacity: 1;
|
|
172
|
+
}
|
|
173
|
+
50% {
|
|
174
|
+
opacity: 0.2;
|
|
175
|
+
}
|
|
176
|
+
100% {
|
|
177
|
+
opacity: 1;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@keyframes spin {
|
|
182
|
+
0% {
|
|
183
|
+
transform: rotate(0deg);
|
|
184
|
+
}
|
|
185
|
+
100% {
|
|
186
|
+
transform: rotate(360deg);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@keyframes pop {
|
|
191
|
+
0% {
|
|
192
|
+
transform: scale(0, 0);
|
|
193
|
+
}
|
|
194
|
+
50% {
|
|
195
|
+
transform: scale(1.5, 1.5);
|
|
196
|
+
}
|
|
197
|
+
100% {
|
|
198
|
+
transform: scale(1, 1);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@keyframes slideDown {
|
|
203
|
+
from {
|
|
204
|
+
height: 0;
|
|
205
|
+
}
|
|
206
|
+
to {
|
|
207
|
+
height: var(--radix-accordion-content-height);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@keyframes slideUp {
|
|
212
|
+
from {
|
|
213
|
+
height: var(--radix-accordion-content-height);
|
|
214
|
+
}
|
|
215
|
+
to {
|
|
216
|
+
height: 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@keyframes menuOpen {
|
|
221
|
+
0% {
|
|
222
|
+
opacity: 0;
|
|
223
|
+
width: 0;
|
|
224
|
+
}
|
|
225
|
+
100% {
|
|
226
|
+
opacity: 1;
|
|
227
|
+
width: 80px;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@keyframes menuClose {
|
|
232
|
+
0% {
|
|
233
|
+
opacity: 1;
|
|
234
|
+
width: 80px;
|
|
235
|
+
}
|
|
236
|
+
100% {
|
|
237
|
+
opacity: 0;
|
|
238
|
+
width: 0;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@keyframes backdrop-blur {
|
|
243
|
+
0% {
|
|
244
|
+
backdrop-filter: blur(0);
|
|
245
|
+
}
|
|
246
|
+
100% {
|
|
247
|
+
backdrop-filter: blur(5px);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@keyframes zoomIn {
|
|
252
|
+
0% {
|
|
253
|
+
opacity: 0;
|
|
254
|
+
transform: scale(0.6);
|
|
255
|
+
}
|
|
256
|
+
100% {
|
|
257
|
+
opacity: 1;
|
|
258
|
+
transform: scale(1);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@keyframes bottomUp {
|
|
263
|
+
0% {
|
|
264
|
+
transform: translateY(100%);
|
|
265
|
+
}
|
|
266
|
+
100% {
|
|
267
|
+
transform: translateY(0);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
@keyframes bottomDown {
|
|
272
|
+
0% {
|
|
273
|
+
transform: translateY(0);
|
|
274
|
+
}
|
|
275
|
+
100% {
|
|
276
|
+
transform: translateY(100%);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@keyframes wave {
|
|
281
|
+
0% {
|
|
282
|
+
box-shadow:
|
|
283
|
+
0 0 0 0 rgba(219, 39, 119, 0.3),
|
|
284
|
+
0 0 0 1em rgba(219, 39, 119, 0.3),
|
|
285
|
+
0 0 0 2em rgba(219, 39, 119, 0.3),
|
|
286
|
+
0 0 0 3em rgba(219, 39, 119, 0.3);
|
|
287
|
+
}
|
|
288
|
+
100% {
|
|
289
|
+
box-shadow:
|
|
290
|
+
0 0 0 1em rgba(219, 39, 119, 0.3),
|
|
291
|
+
0 0 0 2em rgba(219, 39, 119, 0.3),
|
|
292
|
+
0 0 0 3em rgba(219, 39, 119, 0.3),
|
|
293
|
+
0 0 0 4em rgba(219, 39, 119, 0);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
@keyframes translateUp {
|
|
298
|
+
0% {
|
|
299
|
+
transform: translateY(0);
|
|
300
|
+
}
|
|
301
|
+
100% {
|
|
302
|
+
transform: translateY(-60%);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@keyframes tranlateLeft {
|
|
307
|
+
0% {
|
|
308
|
+
transform: translateX(100%);
|
|
309
|
+
}
|
|
310
|
+
100% {
|
|
311
|
+
transform: translateX(0);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@keyframes tranlateRight {
|
|
316
|
+
0% {
|
|
317
|
+
transform: translateX(-100%);
|
|
318
|
+
}
|
|
319
|
+
100% {
|
|
320
|
+
transform: translateX(0);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@keyframes floatUpDown {
|
|
325
|
+
0% {
|
|
326
|
+
transform: translateY(0%);
|
|
327
|
+
}
|
|
328
|
+
50% {
|
|
329
|
+
transform: translateY(10%);
|
|
330
|
+
}
|
|
331
|
+
100% {
|
|
332
|
+
transform: translateY(0%);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@keyframes floatDownUp {
|
|
337
|
+
0% {
|
|
338
|
+
transform: translateY(10%);
|
|
339
|
+
}
|
|
340
|
+
50% {
|
|
341
|
+
transform: translateY(0%);
|
|
342
|
+
}
|
|
343
|
+
100% {
|
|
344
|
+
transform: translateY(10%);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@keyframes scanDown {
|
|
349
|
+
0% {
|
|
350
|
+
top: -100%;
|
|
351
|
+
}
|
|
352
|
+
100% {
|
|
353
|
+
top: 200%;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/* Programmatic Animations */
|
|
358
|
+
@keyframes fadeInRight5 {
|
|
359
|
+
0% {
|
|
360
|
+
opacity: 0;
|
|
361
|
+
translate: 5% 0;
|
|
362
|
+
}
|
|
363
|
+
100% {
|
|
364
|
+
opacity: 1;
|
|
365
|
+
translate: 0 0;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
@keyframes fadeInRight15 {
|
|
369
|
+
0% {
|
|
370
|
+
opacity: 0;
|
|
371
|
+
translate: 15% 0;
|
|
372
|
+
}
|
|
373
|
+
100% {
|
|
374
|
+
opacity: 1;
|
|
375
|
+
translate: 0 0;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
@keyframes fadeInRight30 {
|
|
379
|
+
0% {
|
|
380
|
+
opacity: 0;
|
|
381
|
+
translate: 30% 0;
|
|
382
|
+
}
|
|
383
|
+
100% {
|
|
384
|
+
opacity: 1;
|
|
385
|
+
translate: 0 0;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
@keyframes fadeInRight100 {
|
|
389
|
+
0% {
|
|
390
|
+
opacity: 0;
|
|
391
|
+
translate: 100% 0;
|
|
392
|
+
}
|
|
393
|
+
100% {
|
|
394
|
+
opacity: 1;
|
|
395
|
+
translate: 0 0;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
@keyframes fadeInLeft5 {
|
|
400
|
+
0% {
|
|
401
|
+
opacity: 0;
|
|
402
|
+
translate: -5% 0;
|
|
403
|
+
}
|
|
404
|
+
100% {
|
|
405
|
+
opacity: 1;
|
|
406
|
+
translate: 0 0;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
@keyframes fadeInLeft15 {
|
|
410
|
+
0% {
|
|
411
|
+
opacity: 0;
|
|
412
|
+
translate: -15% 0;
|
|
413
|
+
}
|
|
414
|
+
100% {
|
|
415
|
+
opacity: 1;
|
|
416
|
+
translate: 0 0;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
@keyframes fadeInLeft30 {
|
|
420
|
+
0% {
|
|
421
|
+
opacity: 0;
|
|
422
|
+
translate: -30% 0;
|
|
423
|
+
}
|
|
424
|
+
100% {
|
|
425
|
+
opacity: 1;
|
|
426
|
+
translate: 0 0;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
@keyframes fadeInLeft100 {
|
|
430
|
+
0% {
|
|
431
|
+
opacity: 0;
|
|
432
|
+
translate: -100% 0;
|
|
433
|
+
}
|
|
434
|
+
100% {
|
|
435
|
+
opacity: 1;
|
|
436
|
+
translate: 0 0;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
@keyframes fadeInUp5 {
|
|
441
|
+
0% {
|
|
442
|
+
opacity: 0;
|
|
443
|
+
translate: 0 5%;
|
|
444
|
+
}
|
|
445
|
+
100% {
|
|
446
|
+
opacity: 1;
|
|
447
|
+
translate: 0 0;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
@keyframes fadeInUp15 {
|
|
451
|
+
0% {
|
|
452
|
+
opacity: 0;
|
|
453
|
+
translate: 0 15%;
|
|
454
|
+
}
|
|
455
|
+
100% {
|
|
456
|
+
opacity: 1;
|
|
457
|
+
translate: 0 0;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
@keyframes fadeInUp30 {
|
|
461
|
+
0% {
|
|
462
|
+
opacity: 0;
|
|
463
|
+
translate: 0 30%;
|
|
464
|
+
}
|
|
465
|
+
100% {
|
|
466
|
+
opacity: 1;
|
|
467
|
+
translate: 0 0;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
@keyframes fadeInUp100 {
|
|
471
|
+
0% {
|
|
472
|
+
opacity: 0;
|
|
473
|
+
translate: 0 100%;
|
|
474
|
+
}
|
|
475
|
+
100% {
|
|
476
|
+
opacity: 1;
|
|
477
|
+
translate: 0 0;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
@keyframes fadeInDown5 {
|
|
482
|
+
0% {
|
|
483
|
+
opacity: 0;
|
|
484
|
+
translate: 0 -5%;
|
|
485
|
+
}
|
|
486
|
+
100% {
|
|
487
|
+
opacity: 1;
|
|
488
|
+
translate: 0 0;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
@keyframes fadeInDown15 {
|
|
492
|
+
0% {
|
|
493
|
+
opacity: 0;
|
|
494
|
+
translate: 0 -15%;
|
|
495
|
+
}
|
|
496
|
+
100% {
|
|
497
|
+
opacity: 1;
|
|
498
|
+
translate: 0 0;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
@keyframes fadeInDown30 {
|
|
502
|
+
0% {
|
|
503
|
+
opacity: 0;
|
|
504
|
+
translate: 0 -30%;
|
|
505
|
+
}
|
|
506
|
+
100% {
|
|
507
|
+
opacity: 1;
|
|
508
|
+
translate: 0 0;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
@keyframes fadeInDown100 {
|
|
512
|
+
0% {
|
|
513
|
+
opacity: 0;
|
|
514
|
+
translate: 0 -100%;
|
|
515
|
+
}
|
|
516
|
+
100% {
|
|
517
|
+
opacity: 1;
|
|
518
|
+
translate: 0 0;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
@theme {
|
|
523
|
+
/* Theme Extensions */
|
|
524
|
+
--color-primary-light: hsl(var(--primary-light) / <alpha-value>);
|
|
525
|
+
--color-primary-dark: hsl(var(--primary-dark) / <alpha-value>);
|
|
526
|
+
--color-secondary-light: hsl(var(--secondary-light) / <alpha-value>);
|
|
527
|
+
--color-secondary-dark: hsl(var(--secondary-dark) / <alpha-value>);
|
|
528
|
+
|
|
529
|
+
/* Animation Variables */
|
|
530
|
+
--animate-smaller: smaller 0.15s ease-in-out forwards;
|
|
531
|
+
--animate-bigger: bigger 1s ease-in-out forwards;
|
|
532
|
+
--animate-fadeIn: fadeIn 0.15s ease-in-out forwards;
|
|
533
|
+
--animate-fadeIn_750ms: fadeIn 0.75s ease-in-out forwards;
|
|
534
|
+
--animate-fadeOut: fadeOut 0.15s ease-in-out forwards;
|
|
535
|
+
--animate-flyOut: flyOut 0.15s ease-in-out forwards;
|
|
536
|
+
--animate-drop: drop 0.15s ease-in-out forwards;
|
|
537
|
+
--animate-flash: flash 1s linear infinite;
|
|
538
|
+
--animate-spin: spin 1s linear infinite;
|
|
539
|
+
--animate-backdrop-blur: backdrop-blur-sm 2s ease-in-out forwards;
|
|
540
|
+
--animate-pop: pop 0.15s ease-in-out forwards;
|
|
541
|
+
--animate-menuOpen: menuOpen 0.3s ease-in-out forwards;
|
|
542
|
+
--animate-menuClose: menuClose 0.3s ease-in-out forwards;
|
|
543
|
+
--animate-slideDown: slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
544
|
+
--animate-slideUp: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
545
|
+
--animate-zoomIn: zoomIn 0.15s ease-in-out forwards;
|
|
546
|
+
--animate-wave: wave 1s linear infinite;
|
|
547
|
+
--animate-translateUp: translateUp 0.5s ease-in-out 0.5s forwards;
|
|
548
|
+
--animate-bottomUp: bottomUp 0.5s ease-in-out 0.5s forwards;
|
|
549
|
+
--animate-translateLeft: tranlateLeft 0.15s ease-in-out forwards;
|
|
550
|
+
--animate-translateRight: tranlateRight 0.15s ease-in-out forwards;
|
|
551
|
+
--animate-floatUpDown: floatUpDown 3s linear forwards infinite;
|
|
552
|
+
--animate-floatDownUp: floatDownUp 3s linear forwards infinite;
|
|
553
|
+
--animate-scanDown: scanDown 3s ease-in-out infinite;
|
|
554
|
+
|
|
555
|
+
/* Programmatic Animation Variables */
|
|
556
|
+
--animate-fadeInRight5-150ms: fadeInRight5 0.15s ease-in-out forwards;
|
|
557
|
+
--animate-fadeInRight5-500ms: fadeInRight5 0.5s ease-in-out forwards;
|
|
558
|
+
--animate-fadeInRight5-1000ms: fadeInRight5 1s ease-in-out forwards;
|
|
559
|
+
--animate-fadeInRight15-150ms: fadeInRight15 0.15s ease-in-out forwards;
|
|
560
|
+
--animate-fadeInRight15-500ms: fadeInRight15 0.5s ease-in-out forwards;
|
|
561
|
+
--animate-fadeInRight15-1000ms: fadeInRight15 1s ease-in-out forwards;
|
|
562
|
+
--animate-fadeInRight30-150ms: fadeInRight30 0.15s ease-in-out forwards;
|
|
563
|
+
--animate-fadeInRight30-500ms: fadeInRight30 0.5s ease-in-out forwards;
|
|
564
|
+
--animate-fadeInRight30-1000ms: fadeInRight30 1s ease-in-out forwards;
|
|
565
|
+
--animate-fadeInRight100-150ms: fadeInRight100 0.15s ease-in-out forwards;
|
|
566
|
+
--animate-fadeInRight100-500ms: fadeInRight100 0.5s ease-in-out forwards;
|
|
567
|
+
--animate-fadeInRight100-1000ms: fadeInRight100 1s ease-in-out forwards;
|
|
568
|
+
|
|
569
|
+
--animate-fadeInLeft5-150ms: fadeInLeft5 0.15s ease-in-out forwards;
|
|
570
|
+
--animate-fadeInLeft5-500ms: fadeInLeft5 0.5s ease-in-out forwards;
|
|
571
|
+
--animate-fadeInLeft5-1000ms: fadeInLeft5 1s ease-in-out forwards;
|
|
572
|
+
--animate-fadeInLeft15-150ms: fadeInLeft15 0.15s ease-in-out forwards;
|
|
573
|
+
--animate-fadeInLeft15-500ms: fadeInLeft15 0.5s ease-in-out forwards;
|
|
574
|
+
--animate-fadeInLeft15-1000ms: fadeInLeft15 1s ease-in-out forwards;
|
|
575
|
+
--animate-fadeInLeft30-150ms: fadeInLeft30 0.15s ease-in-out forwards;
|
|
576
|
+
--animate-fadeInLeft30-500ms: fadeInLeft30 0.5s ease-in-out forwards;
|
|
577
|
+
--animate-fadeInLeft30-1000ms: fadeInLeft30 1s ease-in-out forwards;
|
|
578
|
+
--animate-fadeInLeft100-150ms: fadeInLeft100 0.15s ease-in-out forwards;
|
|
579
|
+
--animate-fadeInLeft100-500ms: fadeInLeft100 0.5s ease-in-out forwards;
|
|
580
|
+
--animate-fadeInLeft100-1000ms: fadeInLeft100 1s ease-in-out forwards;
|
|
581
|
+
|
|
582
|
+
--animate-fadeInUp5-150ms: fadeInUp5 0.15s ease-in-out forwards;
|
|
583
|
+
--animate-fadeInUp5-500ms: fadeInUp5 0.5s ease-in-out forwards;
|
|
584
|
+
--animate-fadeInUp5-1000ms: fadeInUp5 1s ease-in-out forwards;
|
|
585
|
+
--animate-fadeInUp15-150ms: fadeInUp15 0.15s ease-in-out forwards;
|
|
586
|
+
--animate-fadeInUp15-500ms: fadeInUp15 0.5s ease-in-out forwards;
|
|
587
|
+
--animate-fadeInUp15-1000ms: fadeInUp15 1s ease-in-out forwards;
|
|
588
|
+
--animate-fadeInUp30-150ms: fadeInUp30 0.15s ease-in-out forwards;
|
|
589
|
+
--animate-fadeInUp30-500ms: fadeInUp30 0.5s ease-in-out forwards;
|
|
590
|
+
--animate-fadeInUp30-1000ms: fadeInUp30 1s ease-in-out forwards;
|
|
591
|
+
--animate-fadeInUp100-150ms: fadeInUp100 0.15s ease-in-out forwards;
|
|
592
|
+
--animate-fadeInUp100-500ms: fadeInUp100 0.5s ease-in-out forwards;
|
|
593
|
+
--animate-fadeInUp100-1000ms: fadeInUp100 1s ease-in-out forwards;
|
|
594
|
+
|
|
595
|
+
--animate-fadeInDown5-150ms: fadeInDown5 0.15s ease-in-out forwards;
|
|
596
|
+
--animate-fadeInDown5-500ms: fadeInDown5 0.5s ease-in-out forwards;
|
|
597
|
+
--animate-fadeInDown5-1000ms: fadeInDown5 1s ease-in-out forwards;
|
|
598
|
+
--animate-fadeInDown15-150ms: fadeInDown15 0.15s ease-in-out forwards;
|
|
599
|
+
--animate-fadeInDown15-500ms: fadeInDown15 0.5s ease-in-out forwards;
|
|
600
|
+
--animate-fadeInDown15-1000ms: fadeInDown15 1s ease-in-out forwards;
|
|
601
|
+
--animate-fadeInDown30-150ms: fadeInDown30 0.15s ease-in-out forwards;
|
|
602
|
+
--animate-fadeInDown30-500ms: fadeInDown30 0.5s ease-in-out forwards;
|
|
603
|
+
--animate-fadeInDown30-1000ms: fadeInDown30 1s ease-in-out forwards;
|
|
604
|
+
--animate-fadeInDown100-150ms: fadeInDown100 0.15s ease-in-out forwards;
|
|
605
|
+
--animate-fadeInDown100-500ms: fadeInDown100 0.5s ease-in-out forwards;
|
|
606
|
+
--animate-fadeInDown100-1000ms: fadeInDown100 1s ease-in-out forwards;
|
|
607
|
+
|
|
608
|
+
/* Transition Property */
|
|
609
|
+
--transition-property-all: all;
|
|
610
|
+
}
|