@grazziotin/react-components-next 0.1.0 → 1.0.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.
@@ -0,0 +1,150 @@
1
+ 'use strict';
2
+
3
+ var tailwindMerge = require('tailwind-merge');
4
+ var clsx = require('clsx');
5
+ var material = require('@mui/material');
6
+ var core = require('@mantine/core');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ var DialogMui = require('@mui/material/Dialog');
9
+ var DialogTitle = require('@mui/material/DialogTitle');
10
+ var DialogActions = require('@mui/material/DialogActions');
11
+ var DialogContent = require('@mui/material/DialogContent');
12
+
13
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
+
15
+ var DialogMui__default = /*#__PURE__*/_interopDefault(DialogMui);
16
+ var DialogTitle__default = /*#__PURE__*/_interopDefault(DialogTitle);
17
+ var DialogActions__default = /*#__PURE__*/_interopDefault(DialogActions);
18
+ var DialogContent__default = /*#__PURE__*/_interopDefault(DialogContent);
19
+
20
+ var __defProp = Object.defineProperty;
21
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
22
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
23
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
24
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
25
+ var __spreadValues = (a, b) => {
26
+ for (var prop in b || (b = {}))
27
+ if (__hasOwnProp.call(b, prop))
28
+ __defNormalProp(a, prop, b[prop]);
29
+ if (__getOwnPropSymbols)
30
+ for (var prop of __getOwnPropSymbols(b)) {
31
+ if (__propIsEnum.call(b, prop))
32
+ __defNormalProp(a, prop, b[prop]);
33
+ }
34
+ return a;
35
+ };
36
+ function cn(...values) {
37
+ return tailwindMerge.twMerge(clsx.clsx(values));
38
+ }
39
+ function Card({
40
+ margin,
41
+ onClick,
42
+ title,
43
+ toolTip,
44
+ className,
45
+ borderTitle,
46
+ children,
47
+ borderRadius,
48
+ width = "100%",
49
+ height = "auto",
50
+ titleWidth = "100%",
51
+ justifyContent = "space-between",
52
+ titleColor = "var(--color-primary)",
53
+ icon
54
+ }) {
55
+ return /* @__PURE__ */ jsxRuntime.jsxs(
56
+ material.Box,
57
+ {
58
+ onClick,
59
+ className: cn(className, "text-sm!"),
60
+ sx: __spreadValues({
61
+ width,
62
+ margin,
63
+ height,
64
+ borderRadius,
65
+ "@media (max-width: 768px)": { width: "100%" },
66
+ boxShadow: "0 0.15rem 0.5rem rgba(0, 0, 0, 0.16)"
67
+ }, onClick && { cursor: "pointer !important" }),
68
+ children: [
69
+ /* @__PURE__ */ jsxRuntime.jsxs(
70
+ material.Box,
71
+ {
72
+ sx: {
73
+ justifyContent,
74
+ height: "24px",
75
+ color: "white",
76
+ display: "flex",
77
+ width: titleWidth,
78
+ overflow: "hidden",
79
+ padding: "0px 15px",
80
+ alignItems: "center",
81
+ flexDirection: "row",
82
+ borderRadius: borderTitle,
83
+ backgroundColor: titleColor
84
+ },
85
+ children: [
86
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 font-semibold! truncate!", children: /* @__PURE__ */ jsxRuntime.jsx(
87
+ core.Tooltip,
88
+ {
89
+ withArrow: true,
90
+ radius: "md",
91
+ label: title,
92
+ arrowSize: 6,
93
+ position: "top",
94
+ arrowOffset: 15,
95
+ disabled: !toolTip,
96
+ color: titleColor,
97
+ classNames: { tooltip: "text-xs!" },
98
+ offset: { mainAxis: 11, crossAxis: -21 },
99
+ transitionProps: { transition: "fade", duration: 100 },
100
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block! truncate!", children: title })
101
+ }
102
+ ) }),
103
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: icon })
104
+ ]
105
+ }
106
+ ),
107
+ children
108
+ ]
109
+ }
110
+ );
111
+ }
112
+ var card_default = Card;
113
+
114
+ // src/components/ui/dialog/utils/constants.ts
115
+ var DIALOG_BACKDROP_STYLE = {
116
+ backdropFilter: "blur(4px)",
117
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
118
+ };
119
+ function Dialog({
120
+ open,
121
+ title,
122
+ onClose,
123
+ actions,
124
+ children,
125
+ maxWidth,
126
+ blurBackdrop = false
127
+ }) {
128
+ const backdropStyle = blurBackdrop ? DIALOG_BACKDROP_STYLE : {};
129
+ return /* @__PURE__ */ jsxRuntime.jsxs(
130
+ DialogMui__default.default,
131
+ {
132
+ fullWidth: true,
133
+ open,
134
+ onClose,
135
+ maxWidth,
136
+ slotProps: { backdrop: { sx: backdropStyle } },
137
+ children: [
138
+ title && /* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-black-de", children: title }) }),
139
+ /* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { className: "text-black", children }),
140
+ actions && /* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: actions })
141
+ ]
142
+ }
143
+ );
144
+ }
145
+ var dialog_default = Dialog;
146
+
147
+ exports.Card = card_default;
148
+ exports.Dialog = dialog_default;
149
+ //# sourceMappingURL=index.js.map
150
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/functions/cn/cn.ts","../../src/components/ui/card/index.tsx","../../src/components/ui/dialog/utils/constants.ts","../../src/components/ui/dialog/index.tsx"],"names":["twMerge","clsx","jsxs","Box","jsx","Tooltip","DialogMui","DialogTitle","DialogContent","DialogActions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,MAAM,MAAA,EAA8B;AAClD,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;AC2CA,SAAS,IAAA,CAAK;AAAA,EACZ,MAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,WAAA;AA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G,4BAAA,EAAA,EACC,QAAA,kBAAAH,eAAC,GAAA,EAAA,EAAE,SAAA,EAAU,qCAAA,EAAuC,QAAA,EAAA,KAAA,EAAM,CAAA,EAC5D,CAAA;AAAA,wBAEFA,cAAAA,CAACI,8BAAA,EAAA,EAAc,SAAA,EAAU,cAAc,QAAA,EAAS,CAAA;AAAA,QAC/C,OAAA,oBAAWJ,cAAAA,CAACK,8BAAA,EAAA,EAAe,QAAA,EAAA,OAAA,EAAQ;AAAA;AAAA;AAAA,GACtC;AAEJ;AAEA,IAAO,cAAA,GAAQ","file":"index.js","sourcesContent":["import { twMerge } from \"tailwind-merge\";\r\nimport { clsx } from \"clsx\";\r\nimport type { ClassValue } from \"./utils/interfaces\";\r\n\r\nexport function cn(...values: ClassValue[]): string {\r\n return twMerge(clsx(values));\r\n}\r\n","import { cn } from \"@/functions\";\r\nimport { Box } from \"@mui/material\";\r\nimport { Tooltip } from \"@mantine/core\";\r\nimport type { CardProps } from \"./utils/interface\";\r\n\r\n/**\r\n * Container de UI com cabeçalho colorido (título e ícone opcionais) e área de conteúdo.\r\n *\r\n * O card usa MUI `Box` para dimensões, sombra e responsividade; classes Tailwind\r\n * extras podem ser passadas em `className` e são mescladas com `cn`. O título é\r\n * sempre exibido e truncado quando necessário; o tooltip (Mantine) só aparece se\r\n * `toolTip` for `true`.\r\n *\r\n * @param props - Propriedades do componente. Detalhes em {@link CardProps}.\r\n * @param props.width - Largura do card. Padrão: `\"100%\"`.\r\n * @param props.height - Altura do card. Padrão: `\"auto\"`.\r\n * @param props.margin - Margem externa.\r\n * @param props.title - Texto do cabeçalho.\r\n * @param props.toolTip - Habilita tooltip no título.\r\n * @param props.className - `className` nativo do React no container.\r\n * @param props.titleWidth - Largura da barra do cabeçalho. Padrão: `\"100%\"`.\r\n * @param props.titleColor - Cor de fundo do cabeçalho. Padrão: `var(--color-primary)`.\r\n * @param props.borderTitle - `border-radius` só do cabeçalho.\r\n * @param props.onClick - Clique no card; adiciona `cursor: pointer !important`.\r\n * @param props.borderRadius - `border-radius` do container.\r\n * @param props.icon - Conteúdo à direita do título.\r\n * @param props.children - Corpo do card.\r\n * @param props.justifyContent - Alinhamento título/ícone. Padrão: `\"space-between\"`.\r\n *\r\n * @returns Elemento `Box` com cabeçalho e `children`.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Card title=\"Resumo\" toolTip icon={<span>+</span>}>\r\n * <p>Conteúdo interno</p>\r\n * </Card>\r\n * ```\r\n *\r\n * @example\r\n * ```tsx\r\n * <Card\r\n * title=\"Clique aqui\"\r\n * width=\"320px\"\r\n * onClick={() => alert(\"Card clicado\")}\r\n * >\r\n * Card interativo\r\n * </Card>\r\n * ```\r\n */\r\nfunction Card({\r\n margin,\r\n onClick,\r\n title,\r\n toolTip,\r\n className,\r\n borderTitle,\r\n children,\r\n borderRadius,\r\n width = \"100%\",\r\n height = \"auto\",\r\n titleWidth = \"100%\",\r\n justifyContent = \"space-between\",\r\n titleColor = \"var(--color-primary)\",\r\n icon,\r\n}: Readonly<CardProps>): React.ReactElement {\r\n return (\r\n <Box\r\n onClick={onClick}\r\n className={cn(className, \"text-sm!\")}\r\n sx={{\r\n width,\r\n margin,\r\n height,\r\n borderRadius,\r\n \"@media (max-width: 768px)\": { width: \"100%\" },\r\n boxShadow: \"0 0.15rem 0.5rem rgba(0, 0, 0, 0.16)\",\r\n ...(onClick && { cursor: \"pointer !important\" }),\r\n }}\r\n >\r\n <Box\r\n sx={{\r\n justifyContent,\r\n height: \"24px\",\r\n color: \"white\",\r\n display: \"flex\",\r\n width: titleWidth,\r\n overflow: \"hidden\",\r\n padding: \"0px 15px\",\r\n alignItems: \"center\",\r\n flexDirection: \"row\",\r\n borderRadius: borderTitle,\r\n backgroundColor: titleColor,\r\n }}\r\n >\r\n <span className=\"min-w-0 flex-1 font-semibold! truncate!\">\r\n <Tooltip\r\n withArrow\r\n radius=\"md\"\r\n label={title}\r\n arrowSize={6}\r\n position=\"top\"\r\n arrowOffset={15}\r\n disabled={!toolTip}\r\n color={titleColor}\r\n classNames={{ tooltip: \"text-xs!\" }}\r\n offset={{ mainAxis: 11, crossAxis: -21 }}\r\n transitionProps={{ transition: \"fade\", duration: 100 }}\r\n >\r\n <span className=\"block! truncate!\">{title}</span>\r\n </Tooltip>\r\n </span>\r\n <div>{icon}</div>\r\n </Box>\r\n {children}\r\n </Box>\r\n );\r\n}\r\nexport default Card;\r\n","export const DIALOG_BACKDROP_STYLE = {\r\n backdropFilter: \"blur(4px)\",\r\n backgroundColor: \"rgba(0, 0, 0, 0.5)\",\r\n};\r\n\r\nconst dialogConstants = `\r\nModal de diálogo baseado no MUI \\`Dialog\\`, com título, conteúdo e ações opcionais.\r\nSuporta \\`maxWidth\\` e backdrop com blur via \\`blurBackdrop\\`.\r\n\r\n**Importação:**\r\n\\`\\`\\`tsx\r\nimport Dialog from \"@/components/ui/dialog\";\r\n// ou, no pacote publicado:\r\n// import { Dialog } from \"@grazziotin/react-components-next/ui\";\r\n\\`\\`\\`\r\n\r\n**Uso básico:**\r\n\\`\\`\\`tsx\r\nconst [open, setOpen] = useState(false);\r\n\r\n<Dialog\r\n open={open}\r\n title=\"Confirmar\"\r\n onClose={() => setOpen(false)}\r\n actions={<button type=\"button\">OK</button>}\r\n>\r\n Conteúdo do diálogo\r\n</Dialog>\r\n\\`\\`\\`\r\n`;\r\n\r\nexport default dialogConstants;\r\n","import React from \"react\";\r\nimport DialogMui from \"@mui/material/Dialog\";\r\nimport type { DialogProps } from \"./utils/interface\";\r\nimport DialogTitle from \"@mui/material/DialogTitle\";\r\nimport DialogActions from \"@mui/material/DialogActions\";\r\nimport DialogContent from \"@mui/material/DialogContent\";\r\nimport { DIALOG_BACKDROP_STYLE } from \"./utils/constants\";\r\n\r\n/**\r\n * Modal de diálogo baseado no MUI `Dialog`, com título, conteúdo e ações opcionais.\r\n *\r\n * O componente usa `fullWidth` por padrão e permite limitar a largura via `maxWidth`.\r\n * Com `blurBackdrop`, o fundo recebe desfoque e overlay escuro semitransparente.\r\n *\r\n * @param props - Propriedades do componente. Detalhes em {@link DialogProps}.\r\n * @param props.open - Controla se o diálogo está visível.\r\n * @param props.title - Título exibido no topo; omitido se não informado.\r\n * @param props.onClose - Callback ao fechar (clique fora, ESC ou botão de fechar do MUI).\r\n * @param props.actions - Rodapé com botões ou ações customizadas.\r\n * @param props.children - Conteúdo principal do diálogo.\r\n * @param props.maxWidth - Largura máxima do MUI (`xs`, `sm`, `md`, `lg`, `xl` ou `false`).\r\n * @param props.blurBackdrop - Aplica blur e escurecimento no backdrop. Padrão: `false`.\r\n *\r\n * @returns Instância do `Dialog` do Material UI.\r\n *\r\n * @example\r\n * ```tsx\r\n * const [open, setOpen] = useState(false);\r\n *\r\n * <Dialog\r\n * open={open}\r\n * title=\"Confirmar exclusão\"\r\n * onClose={() => setOpen(false)}\r\n * actions={<Button onClick={() => setOpen(false)}>OK</Button>}\r\n * >\r\n * Deseja realmente excluir este item?\r\n * </Dialog>\r\n * ```\r\n *\r\n * @example\r\n * ```tsx\r\n * <Dialog\r\n * open={open}\r\n * onClose={handleClose}\r\n * maxWidth=\"sm\"\r\n * blurBackdrop\r\n * >\r\n * Conteúdo sem título.\r\n * </Dialog>\r\n * ```\r\n */\r\nfunction Dialog({\r\n open,\r\n title,\r\n onClose,\r\n actions,\r\n children,\r\n maxWidth,\r\n blurBackdrop = false,\r\n}: Readonly<DialogProps>): React.ReactElement {\r\n const backdropStyle = blurBackdrop ? DIALOG_BACKDROP_STYLE : {};\r\n\r\n return (\r\n <DialogMui\r\n fullWidth\r\n open={open}\r\n onClose={onClose}\r\n maxWidth={maxWidth}\r\n slotProps={{ backdrop: { sx: backdropStyle } }}\r\n >\r\n {title && (\r\n <DialogTitle>\r\n <p className=\"text-sm font-semibold text-black-de\">{title}</p>\r\n </DialogTitle>\r\n )}\r\n <DialogContent className=\"text-black\">{children}</DialogContent>\r\n {actions && <DialogActions>{actions}</DialogActions>}\r\n </DialogMui>\r\n );\r\n}\r\n\r\nexport default Dialog;\r\n"]}
@@ -0,0 +1,4 @@
1
+ export { card_default as Card, dialog_default as Dialog } from '../chunk-CNXFSE26.mjs';
2
+ import '../chunk-NHHZBMJL.mjs';
3
+ //# sourceMappingURL=index.mjs.map
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
package/package.json CHANGED
@@ -1,73 +1,102 @@
1
- {
2
- "name": "@grazziotin/react-components-next",
3
- "version": "0.1.0",
4
- "description": "Biblioteca de componentes React reutilizáveis",
5
- "private": false,
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.mjs",
13
- "require": "./dist/index.js"
14
- },
15
- "./styles": "./dist/index.css"
16
- },
17
- "files": [
18
- "dist"
19
- ],
20
- "scripts": {
21
- "storybook": "storybook dev -p 6006",
22
- "build-storybook": "storybook build",
23
- "build:css": "tailwindcss -i ./src/styles/index.css -o ./dist/index.css --minify",
24
- "build:lib": "tsup && npm run build:css",
25
- "build:lib:watch": "tsup --watch",
26
- "type-check": "tsc --noEmit",
27
- "lint": "eslint src/",
28
- "prepublishOnly": "npm run build:lib"
29
- },
30
- "keywords": [
31
- "react",
32
- "components",
33
- "ui",
34
- "typescript",
35
- "tailwindcss"
36
- ],
37
- "author": "",
38
- "license": "MIT",
39
- "peerDependencies": {
40
- "react": ">=18.0.0",
41
- "react-dom": ">=18.0.0"
42
- },
43
- "dependencies": {
44
- "next": "16.2.6",
45
- "react": ">=18.0.0",
46
- "react-dom": ">=18.0.0"
47
- },
48
- "devDependencies": {
49
- "@chromatic-com/storybook": "^5.2.1",
50
- "@storybook/addon-a11y": "^10.4.0",
51
- "@storybook/addon-docs": "^10.4.0",
52
- "@storybook/addon-mcp": "^0.6.0",
53
- "@storybook/addon-vitest": "^10.4.0",
54
- "@storybook/nextjs-vite": "^10.4.0",
55
- "@tailwindcss/cli": "^4.3.0",
56
- "@tailwindcss/postcss": "^4",
57
- "@types/node": "^20",
58
- "@types/react": "^19",
59
- "@types/react-dom": "^19",
60
- "@vitest/browser-playwright": "^4.1.7",
61
- "@vitest/coverage-v8": "^4.1.7",
62
- "eslint": "^9",
63
- "eslint-config-next": "16.2.6",
64
- "eslint-plugin-storybook": "^10.4.0",
65
- "playwright": "^1.60.0",
66
- "storybook": "^10.4.0",
67
- "tailwindcss": "^4",
68
- "tsup": "^8.5.1",
69
- "typescript": "^5",
70
- "vite": "^8.0.13",
71
- "vitest": "^4.1.7"
72
- }
73
- }
1
+ {
2
+ "name": "@grazziotin/react-components-next",
3
+ "version": "1.0.0",
4
+ "description": "Biblioteca de componentes React reutilizáveis",
5
+ "private": false,
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./ui": {
16
+ "types": "./dist/ui/index.d.ts",
17
+ "import": "./dist/ui/index.mjs",
18
+ "require": "./dist/ui/index.js"
19
+ },
20
+ "./functions": {
21
+ "types": "./dist/functions/index.d.ts",
22
+ "import": "./dist/functions/index.mjs",
23
+ "require": "./dist/functions/index.js"
24
+ },
25
+ "./styles": "./dist/index.css"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "sideEffects": [
31
+ "**/*.css"
32
+ ],
33
+ "scripts": {
34
+ "storybook": "storybook dev -p 6006",
35
+ "build-storybook": "storybook build",
36
+ "build:css": "tailwindcss -i ./src/styles/index.css -o ./dist/index.css --minify",
37
+ "build:css:src": "tailwindcss -i ./src/styles/index.css -o ./src/styles/tailwind-output.css --minify",
38
+ "build:lib": "npm run build:css:src && tsup && npm run build:css",
39
+ "build:lib:watch": "tsup --watch",
40
+ "type-check": "tsc --noEmit",
41
+ "lint": "eslint src/",
42
+ "prepublishOnly": "npm run build:lib"
43
+ },
44
+ "keywords": [
45
+ "react",
46
+ "components",
47
+ "ui",
48
+ "typescript",
49
+ "tailwindcss"
50
+ ],
51
+ "author": "",
52
+ "license": "MIT",
53
+ "peerDependencies": {
54
+ "react": ">=18.0.0",
55
+ "react-dom": ">=18.0.0"
56
+ },
57
+ "dependencies": {
58
+ "@emotion/react": "^11.14.0",
59
+ "@emotion/styled": "^11.14.1",
60
+ "@mantine/core": "^9.2.1",
61
+ "@mantine/hooks": "^9.2.1",
62
+ "@mui/material": "^9.0.1",
63
+ "clsx": "^2.1.1",
64
+ "next": "^15.5.18",
65
+ "react": ">=18.0.0",
66
+ "react-dom": ">=18.0.0",
67
+ "tailwind-merge": "^3.6.0"
68
+ },
69
+ "overrides": {
70
+ "caniuse-lite": "1.0.30001792"
71
+ },
72
+ "devDependencies": {
73
+ "@chromatic-com/storybook": "^5.2.1",
74
+ "@storybook/addon-a11y": "^10.4.0",
75
+ "@storybook/addon-docs": "^10.4.0",
76
+ "@storybook/addon-mcp": "^0.6.0",
77
+ "@storybook/addon-vitest": "^10.4.0",
78
+ "@storybook/react-vite": "^10.4.0",
79
+ "@tailwindcss/cli": "^4.3.0",
80
+ "@tailwindcss/postcss": "^4",
81
+ "@types/node": "^20",
82
+ "@types/react": "^19",
83
+ "@types/react-dom": "^19",
84
+ "@vitest/browser-playwright": "^4.1.7",
85
+ "@vitest/coverage-v8": "^4.1.7",
86
+ "eslint": "^9",
87
+ "eslint-config-next": "^16.2.6",
88
+ "eslint-config-prettier": "^10.1.8",
89
+ "eslint-plugin-prettier": "^5.5.5",
90
+ "eslint-plugin-storybook": "^10.4.0",
91
+ "playwright": "^1.60.0",
92
+ "postcss-preset-mantine": "^1.18.0",
93
+ "postcss-simple-vars": "^7.0.1",
94
+ "prettier": "^3.8.3",
95
+ "storybook": "^10.4.0",
96
+ "tailwindcss": "^4",
97
+ "tsup": "^8.5.1",
98
+ "typescript": "^5",
99
+ "vite": "^8.0.13",
100
+ "vitest": "^4.1.7"
101
+ }
102
+ }