@js-empire/emperor-ui 0.1.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.
- package/.prettierrc +10 -0
- package/.storybook/main.ts +33 -0
- package/.storybook/preview.ts +19 -0
- package/.storybook/vitest.setup.ts +7 -0
- package/README.md +1 -0
- package/dist/emperor-ui.js +3171 -0
- package/dist/emperor-ui.umd.cjs +6 -0
- package/dist/src/components/filter/filter.d.ts +3 -0
- package/dist/src/components/filter/index.d.ts +1 -0
- package/dist/src/components/footer/footer.d.ts +3 -0
- package/dist/src/components/footer/index.d.ts +1 -0
- package/dist/src/components/header/header.d.ts +9 -0
- package/dist/src/components/header/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +8 -0
- package/dist/src/components/item-card/index.d.ts +1 -0
- package/dist/src/components/item-card/item-card.d.ts +3 -0
- package/dist/src/components/item-details/index.d.ts +1 -0
- package/dist/src/components/item-details/item-details.d.ts +3 -0
- package/dist/src/components/listings/index.d.ts +1 -0
- package/dist/src/components/listings/listings.d.ts +3 -0
- package/dist/src/components/nav-bar/index.d.ts +1 -0
- package/dist/src/components/nav-bar/nav-bar.d.ts +3 -0
- package/dist/src/components/scaffold/index.d.ts +1 -0
- package/dist/src/components/scaffold/scaffold.d.ts +3 -0
- package/dist/src/constants/defaults.d.ts +4 -0
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/context/emperor-ui-context.d.ts +3 -0
- package/dist/src/context/index.d.ts +1 -0
- package/dist/src/examples/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/use-emperor-ui.d.ts +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/providers/emperor-ui-provider.d.ts +3 -0
- package/dist/src/providers/index.d.ts +1 -0
- package/dist/src/types/components/filter/filter.d.ts +8 -0
- package/dist/src/types/components/filter/index.d.ts +1 -0
- package/dist/src/types/components/footer/footer.d.ts +8 -0
- package/dist/src/types/components/footer/index.d.ts +1 -0
- package/dist/src/types/components/header/header.d.ts +19 -0
- package/dist/src/types/components/header/index.d.ts +1 -0
- package/dist/src/types/components/index.d.ts +8 -0
- package/dist/src/types/components/item-card/index.d.ts +1 -0
- package/dist/src/types/components/item-card/item-card.d.ts +8 -0
- package/dist/src/types/components/item-details/index.d.ts +1 -0
- package/dist/src/types/components/item-details/item-details.d.ts +8 -0
- package/dist/src/types/components/listings/index.d.ts +1 -0
- package/dist/src/types/components/listings/listings.d.ts +8 -0
- package/dist/src/types/components/nav-bar/index.d.ts +1 -0
- package/dist/src/types/components/nav-bar/nav-bar.d.ts +8 -0
- package/dist/src/types/components/scaffold/index.d.ts +1 -0
- package/dist/src/types/components/scaffold/scaffold.d.ts +8 -0
- package/dist/src/types/context/emperor-ui.d.ts +31 -0
- package/dist/src/types/context/index.d.ts +1 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/src/types/shared/components.d.ts +6 -0
- package/dist/src/types/shared/index.d.ts +1 -0
- package/dist/src/utils/cn.d.ts +3 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/eslint.config.js +43 -0
- package/index.html +13 -0
- package/package.json +82 -0
- package/src/components/filter/filter.tsx +6 -0
- package/src/components/filter/index.ts +1 -0
- package/src/components/footer/footer.tsx +6 -0
- package/src/components/footer/index.ts +1 -0
- package/src/components/header/header.tsx +49 -0
- package/src/components/header/index.ts +1 -0
- package/src/components/index.ts +8 -0
- package/src/components/item-card/index.ts +1 -0
- package/src/components/item-card/item-card.tsx +6 -0
- package/src/components/item-details/index.ts +1 -0
- package/src/components/item-details/item-details.tsx +6 -0
- package/src/components/listings/index.ts +1 -0
- package/src/components/listings/listings.tsx +6 -0
- package/src/components/nav-bar/index.ts +1 -0
- package/src/components/nav-bar/nav-bar.tsx +6 -0
- package/src/components/scaffold/index.ts +1 -0
- package/src/components/scaffold/scaffold.tsx +15 -0
- package/src/constants/defaults.ts +22 -0
- package/src/constants/index.ts +1 -0
- package/src/context/emperor-ui-context.ts +6 -0
- package/src/context/index.ts +1 -0
- package/src/examples/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-emperor-ui.ts +12 -0
- package/src/index.css +1 -0
- package/src/index.ts +8 -0
- package/src/providers/emperor-ui-provider.tsx +31 -0
- package/src/providers/index.ts +1 -0
- package/src/types/components/filter/filter.ts +9 -0
- package/src/types/components/filter/index.ts +1 -0
- package/src/types/components/footer/footer.ts +9 -0
- package/src/types/components/footer/index.ts +1 -0
- package/src/types/components/header/header.ts +21 -0
- package/src/types/components/header/index.ts +1 -0
- package/src/types/components/index.ts +8 -0
- package/src/types/components/item-card/index.ts +1 -0
- package/src/types/components/item-card/item-card.ts +9 -0
- package/src/types/components/item-details/index.ts +1 -0
- package/src/types/components/item-details/item-details.ts +9 -0
- package/src/types/components/listings/index.ts +1 -0
- package/src/types/components/listings/listings.ts +9 -0
- package/src/types/components/nav-bar/index.ts +1 -0
- package/src/types/components/nav-bar/nav-bar.ts +9 -0
- package/src/types/components/scaffold/index.ts +1 -0
- package/src/types/components/scaffold/scaffold.ts +9 -0
- package/src/types/context/emperor-ui.ts +37 -0
- package/src/types/context/index.ts +1 -0
- package/src/types/index.ts +3 -0
- package/src/types/shared/components.ts +6 -0
- package/src/types/shared/index.ts +1 -0
- package/src/utils/cn.ts +6 -0
- package/src/utils/index.ts +1 -0
- package/tailwind.config.js +6 -0
- package/tsconfig.app.json +45 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +26 -0
- package/vite.config.ts +49 -0
- package/vitest.shims.d.ts +1 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { HeaderProps } from "@types";
|
|
2
|
+
import { cn } from "@utils";
|
|
3
|
+
import { cva, VariantProps } from "class-variance-authority";
|
|
4
|
+
import { ComponentProps, forwardRef } from "react";
|
|
5
|
+
|
|
6
|
+
const headerStyles = cva(["flex justify-center items-center min-h-16"], {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
primary: "bg-blue-500 text-white",
|
|
10
|
+
secondary: "bg-gray-500 text-black",
|
|
11
|
+
},
|
|
12
|
+
padding: {
|
|
13
|
+
sm: "p-2",
|
|
14
|
+
md: "p-4",
|
|
15
|
+
lg: "p-6",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: "primary",
|
|
20
|
+
padding: "md",
|
|
21
|
+
},
|
|
22
|
+
compoundVariants: [
|
|
23
|
+
{
|
|
24
|
+
variant: "primary",
|
|
25
|
+
padding: "lg",
|
|
26
|
+
class: "shadow-lg",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
variant: "secondary",
|
|
30
|
+
padding: "sm",
|
|
31
|
+
class: "border-2 border-black",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export const Header = forwardRef<
|
|
37
|
+
HTMLElement,
|
|
38
|
+
ComponentProps<"header"> & VariantProps<typeof headerStyles> & HeaderProps
|
|
39
|
+
>(({ className, variant, padding, ...props }, ref) => {
|
|
40
|
+
return (
|
|
41
|
+
<header
|
|
42
|
+
ref={ref}
|
|
43
|
+
className={cn(headerStyles({ variant, padding, className }))}
|
|
44
|
+
{...props}
|
|
45
|
+
>
|
|
46
|
+
this is a header
|
|
47
|
+
</header>
|
|
48
|
+
);
|
|
49
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./header";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./item-card";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./item-details";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./listings";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./nav-bar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./scaffold";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useEmperorUI } from "@hooks";
|
|
2
|
+
import type { ScaffoldProps } from "@types";
|
|
3
|
+
import { cn } from "@utils";
|
|
4
|
+
|
|
5
|
+
export function Scaffold({ className, children }: ScaffoldProps) {
|
|
6
|
+
const { config } = useEmperorUI();
|
|
7
|
+
|
|
8
|
+
const backgroundColor = config?.theme?.colors?.background;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div className={cn("flex flex-col", className)} style={{ backgroundColor }}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ColorsPalette, EmperorUIConfig } from "@types";
|
|
2
|
+
|
|
3
|
+
export const defaultColorsPalette: ColorsPalette = {
|
|
4
|
+
primary: "#1E40AF",
|
|
5
|
+
secondary: "#F59E0B",
|
|
6
|
+
background: "#FFFFFF",
|
|
7
|
+
text: "#111827",
|
|
8
|
+
danger: "#DC2626",
|
|
9
|
+
warning: "#D97706",
|
|
10
|
+
info: "#3B82F6",
|
|
11
|
+
success: "#16A34A",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const defaultEmperorUIConfig: EmperorUIConfig = {
|
|
15
|
+
theme: {
|
|
16
|
+
mode: "dark",
|
|
17
|
+
colors: defaultColorsPalette,
|
|
18
|
+
},
|
|
19
|
+
layout: {
|
|
20
|
+
withScaffold: true,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./defaults";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./emperor-ui-context";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./use-emperor-ui";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EmperorUIContext } from "@context";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
|
|
4
|
+
export function useEmperorUI() {
|
|
5
|
+
const context = useContext(EmperorUIContext);
|
|
6
|
+
|
|
7
|
+
if (!context) {
|
|
8
|
+
throw new Error("useEmperorUI must be used within a EmperorUIProvider");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return context;
|
|
12
|
+
}
|
package/src/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "tailwindcss";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { EmperorUIContextState, EmperorUIProviderProps } from "@types";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { EmperorUIContext } from "@context";
|
|
4
|
+
import { defaultEmperorUIConfig } from "@constants";
|
|
5
|
+
import { Scaffold } from "@components";
|
|
6
|
+
|
|
7
|
+
export function EmperorUIProvider({
|
|
8
|
+
children,
|
|
9
|
+
config = defaultEmperorUIConfig,
|
|
10
|
+
}: EmperorUIProviderProps) {
|
|
11
|
+
const emperorUIProviderValue: EmperorUIContextState = useMemo(() => {
|
|
12
|
+
return {
|
|
13
|
+
config,
|
|
14
|
+
};
|
|
15
|
+
}, [config]);
|
|
16
|
+
|
|
17
|
+
const withScaffold = config.layout?.withScaffold ?? true;
|
|
18
|
+
|
|
19
|
+
if (withScaffold)
|
|
20
|
+
return (
|
|
21
|
+
<EmperorUIContext.Provider value={emperorUIProviderValue}>
|
|
22
|
+
<Scaffold>{children}</Scaffold>
|
|
23
|
+
</EmperorUIContext.Provider>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<EmperorUIContext.Provider value={emperorUIProviderValue}>
|
|
28
|
+
{children}
|
|
29
|
+
</EmperorUIContext.Provider>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./emperor-ui-provider";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./filter";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./footer";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SharedComponentProps } from "@types";
|
|
2
|
+
|
|
3
|
+
export type HeaderClassnames = {
|
|
4
|
+
base?: string;
|
|
5
|
+
logo?: string;
|
|
6
|
+
navbar?: string;
|
|
7
|
+
userDropdown?: string;
|
|
8
|
+
sideMenu?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type HeaderActivations = {
|
|
12
|
+
hideLog?: boolean;
|
|
13
|
+
hideNavbar?: boolean;
|
|
14
|
+
hideUserDropdown?: boolean;
|
|
15
|
+
hideSideMenu?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type HeaderProps = SharedComponentProps & {
|
|
19
|
+
variant?: "default" | "compact";
|
|
20
|
+
classNames?: HeaderClassnames;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./header";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type * from "./header";
|
|
2
|
+
export type * from "./listings";
|
|
3
|
+
export type * from "./nav-bar";
|
|
4
|
+
export type * from "./scaffold";
|
|
5
|
+
export type * from "./filter";
|
|
6
|
+
export type * from "./footer";
|
|
7
|
+
export type * from "./item-card";
|
|
8
|
+
export type * from "./item-details";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./item-card";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./item-details";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./listings";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./nav-bar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./scaffold";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export type EmperorUIContextState = {
|
|
4
|
+
config: EmperorUIConfig;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type EmperorUIProviderProps = {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
config: EmperorUIConfig;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type ColorMode = "light" | "dark";
|
|
13
|
+
|
|
14
|
+
export type ColorsPalette = {
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
success: string;
|
|
18
|
+
danger: string;
|
|
19
|
+
warning: string;
|
|
20
|
+
info: string;
|
|
21
|
+
background: string;
|
|
22
|
+
text: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type EmperorUITheme = {
|
|
26
|
+
mode: ColorMode;
|
|
27
|
+
colors: Partial<ColorsPalette>;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type EmperorUILayout = {
|
|
31
|
+
withScaffold: boolean;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type EmperorUIConfig = {
|
|
35
|
+
theme?: Partial<EmperorUITheme>;
|
|
36
|
+
layout?: Partial<EmperorUILayout>;
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./emperor-ui";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./components";
|
package/src/utils/cn.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./cn";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"useDefineForClassFields": true,
|
|
7
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
8
|
+
"module": "ESNext",
|
|
9
|
+
"types": ["vite/client"],
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
|
|
12
|
+
/* Bundler mode */
|
|
13
|
+
"moduleResolution": "bundler",
|
|
14
|
+
"allowImportingTsExtensions": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
|
|
19
|
+
/* Linting */
|
|
20
|
+
"strict": true,
|
|
21
|
+
"noUnusedLocals": true,
|
|
22
|
+
"noUnusedParameters": true,
|
|
23
|
+
"erasableSyntaxOnly": true,
|
|
24
|
+
"noFallthroughCasesInSwitch": true,
|
|
25
|
+
"noUncheckedSideEffectImports": true,
|
|
26
|
+
|
|
27
|
+
"baseUrl": ".",
|
|
28
|
+
"paths": {
|
|
29
|
+
"@utils": ["./src/utils"],
|
|
30
|
+
"@components": ["./src/components"],
|
|
31
|
+
"@constants": ["./src/constants"],
|
|
32
|
+
"@hooks": ["./src/hooks"],
|
|
33
|
+
"@context": ["./src/context"],
|
|
34
|
+
"@examples": ["./src/examples"],
|
|
35
|
+
"@providers": ["./src/providers"],
|
|
36
|
+
"@types": ["./src/types"]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"include": [
|
|
40
|
+
"**/*.ts",
|
|
41
|
+
"src/**/*.(ts|js|tsx|jsx)",
|
|
42
|
+
"src/**/*.d.(ts|js|tsx|jsx)",
|
|
43
|
+
"src"
|
|
44
|
+
]
|
|
45
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"verbatimModuleSyntax": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"erasableSyntaxOnly": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUncheckedSideEffectImports": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["vite.config.ts"]
|
|
26
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { defineConfig } from "vite";
|
|
5
|
+
import dts from "vite-plugin-dts";
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
server: {
|
|
9
|
+
port: 3000,
|
|
10
|
+
},
|
|
11
|
+
plugins: [
|
|
12
|
+
react(),
|
|
13
|
+
tailwindcss(),
|
|
14
|
+
dts({
|
|
15
|
+
include: ["src/**/*.ts", "src/**/*.tsx"],
|
|
16
|
+
exclude: ["src/**/*.test.ts", "src/**/*.test.tsx"],
|
|
17
|
+
rollupTypes: false,
|
|
18
|
+
tsconfigPath: "./tsconfig.app.json",
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
resolve: {
|
|
22
|
+
alias: {
|
|
23
|
+
"@utils": path.resolve(__dirname, "./src/utils"),
|
|
24
|
+
"@components": path.resolve(__dirname, "./src/components"),
|
|
25
|
+
"@types": path.resolve(__dirname, "./src/types"),
|
|
26
|
+
"@providers": path.resolve(__dirname, "./src/providers"),
|
|
27
|
+
"@constants": path.resolve(__dirname, "./src/constants"),
|
|
28
|
+
"@hooks": path.resolve(__dirname, "./src/hooks"),
|
|
29
|
+
"@context": path.resolve(__dirname, "./src/context"),
|
|
30
|
+
"@examples": path.resolve(__dirname, "./src/examples"),
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
build: {
|
|
34
|
+
lib: {
|
|
35
|
+
entry: path.resolve(__dirname, "./src/index.ts"),
|
|
36
|
+
name: "EmperorUI",
|
|
37
|
+
fileName: "emperor-ui",
|
|
38
|
+
},
|
|
39
|
+
rollupOptions: {
|
|
40
|
+
external: ["react", "react-dom"],
|
|
41
|
+
output: {
|
|
42
|
+
globals: {
|
|
43
|
+
react: "React",
|
|
44
|
+
"react-dom": "ReactDOM",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="@vitest/browser-playwright" />
|