wcz-test 6.14.0 → 6.20.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.
Files changed (51) hide show
  1. package/dist/ApprovalStatus-C9HPyMiS.js.map +1 -1
  2. package/dist/DialogsHooks-Bi8dZoyu.js +338 -0
  3. package/dist/DialogsHooks-Bi8dZoyu.js.map +1 -0
  4. package/dist/FileHooks-hWKTwLCr.js +195 -0
  5. package/dist/FileHooks-hWKTwLCr.js.map +1 -0
  6. package/dist/FileMeta-G1oT3mYK.js.map +1 -1
  7. package/dist/{RouterListItemButton-Cx7rXEfm.js → RouterListItemButton-CHS7rofI.js} +4 -4
  8. package/dist/RouterListItemButton-CHS7rofI.js.map +1 -0
  9. package/dist/auth-client-B6cIXYDV.js +1417 -0
  10. package/dist/auth-client-B6cIXYDV.js.map +1 -0
  11. package/dist/client.d.ts +61 -49
  12. package/dist/client.js +7 -3
  13. package/dist/client.js.map +1 -1
  14. package/dist/components.js +68 -3405
  15. package/dist/components.js.map +1 -1
  16. package/dist/env-CoxTjaDr.js.map +1 -1
  17. package/dist/error-BhAKg8LX-X0sdNXNa.js +195 -0
  18. package/dist/error-BhAKg8LX-X0sdNXNa.js.map +1 -0
  19. package/dist/hooks.d.ts +6 -2
  20. package/dist/hooks.js +35 -1040
  21. package/dist/hooks.js.map +1 -1
  22. package/dist/index.js +90 -504
  23. package/dist/index.js.map +1 -1
  24. package/dist/manifest.webmanifest +18 -18
  25. package/dist/models.d.ts +10 -10
  26. package/dist/models.js +4 -4
  27. package/dist/models.js.map +1 -1
  28. package/dist/queries.d.ts +6 -6
  29. package/dist/queries.js +2 -2
  30. package/dist/queries.js.map +1 -1
  31. package/dist/server-mxQ3s5dx-CC81W42s.js +644 -0
  32. package/dist/server-mxQ3s5dx-CC81W42s.js.map +1 -0
  33. package/dist/server.d.ts +2 -0
  34. package/dist/server.js +8659 -5
  35. package/dist/server.js.map +1 -1
  36. package/dist/{utils-JYv9O0GI.js → utils-DKyKGba7.js} +2 -1
  37. package/dist/utils-DKyKGba7.js.map +1 -0
  38. package/dist/utils.d.ts +11 -0
  39. package/dist/utils.js +9 -0
  40. package/dist/utils.js.map +1 -0
  41. package/dist/vite.js +3 -0
  42. package/dist/vite.js.map +1 -1
  43. package/package.json +120 -116
  44. package/dist/DialogsHooks-BlUsVlfv.js +0 -39
  45. package/dist/DialogsHooks-BlUsVlfv.js.map +0 -1
  46. package/dist/FileHooks-41k6-RtZ.js +0 -3262
  47. package/dist/FileHooks-41k6-RtZ.js.map +0 -1
  48. package/dist/RouterListItemButton-Cx7rXEfm.js.map +0 -1
  49. package/dist/auth-client-o9U0_qmf.js +0 -79
  50. package/dist/auth-client-o9U0_qmf.js.map +0 -1
  51. package/dist/utils-JYv9O0GI.js.map +0 -1
@@ -36,6 +36,7 @@ const rootRouteHead = () => ({
36
36
  });
37
37
  const httpClient = axios.create({
38
38
  baseURL: clientEnv.VITE_API_URL
39
+ // TODO: Not working in children projects
39
40
  });
40
41
  const getFieldStatus = (field) => {
41
42
  const { meta } = field.state;
@@ -54,4 +55,4 @@ export {
54
55
  rootRouteHead as r,
55
56
  toKebabCase as t
56
57
  };
57
- //# sourceMappingURL=utils-JYv9O0GI.js.map
58
+ //# sourceMappingURL=utils-DKyKGba7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-DKyKGba7.js","sources":["../src/lib/utils.ts"],"sourcesContent":["import axios from \"axios\";\nimport type { AnyFieldApi } from \"@tanstack/react-form\";\nimport { clientEnv } from \"~/env\";\n\nexport class Platform {\n static get isAndroid() { return /android/i.test(this.userAgent); }\n static get isIOS() { return /iPad|iPhone|iPod/.test(this.userAgent); }\n static get isWindows() { return /windows/i.test(this.userAgent); }\n static get isMacOS() { return /Macintosh|MacIntel|MacPPC|Mac68K/.test(this.userAgent); }\n\n private static get userAgent() { return typeof navigator === \"undefined\" ? \"\" : navigator.userAgent; }\n}\n\nexport const rootRouteHead = () => ({\n meta: [\n { charSet: \"utf-8\" },\n { name: \"viewport\", content: \"width=device-width, initial-scale=1\" },\n { title: clientEnv.VITE_APP_TITLE },\n { name: \"og:type\", content: \"website\" },\n { name: \"og:title\", content: clientEnv.VITE_APP_TITLE },\n { name: \"og:image\", content: \"/favicon-32x32.png\" }\n ],\n links: [\n { rel: \"apple-touch-icon\", sizes: \"180x180\", href: \"/apple-touch-icon.png\", },\n { rel: \"icon\", type: \"image/png\", sizes: \"32x32\", href: \"/favicon-32x32.png\", },\n { rel: \"icon\", type: \"image/png\", sizes: \"16x16\", href: \"/favicon-16x16.png\", },\n { rel: \"manifest\", href: \"/manifest.webmanifest\" },\n { rel: \"icon\", href: \"/favicon.ico\" },\n ],\n});\n\nexport const httpClient = axios.create({\n baseURL: clientEnv.VITE_API_URL // TODO: Not working in children projects\n});\n\n/* Internal Utils */\nexport type FormOmittedProps =\n \"name\" |\n \"value\" |\n \"onChange\" |\n \"onBlur\" |\n \"error\" |\n \"helperText\" |\n \"renderInput\" |\n \"type\" |\n \"aria-label\";\n\nexport const getFieldStatus = (field: AnyFieldApi) => {\n const { meta } = field.state;\n\n const isTouched = meta.isTouched;\n const hasError = !!meta.errors.length;\n const helperText = meta.errors[0]?.message;\n\n return { isTouched, hasError, helperText };\n};\n\nexport const toKebabCase = (str: string): string => {\n return str\n .replaceAll(/([a-z])([A-Z])/g, \"$1-$2\")\n .replaceAll(/[\\s_]+/g, \"-\")\n .replaceAll(/[^a-zA-Z0-9-]/g, \"\")\n .toLowerCase()\n .replaceAll(/-+/g, \"-\")\n .replaceAll(/(^-|-$)/g, \"\");\n};\n"],"names":[],"mappings":";;AAIO,MAAM,SAAS;AAAA,EAClB,WAAW,YAAY;AAAE,WAAO,WAAW,KAAK,KAAK,SAAS;AAAA,EAAG;AAAA,EACjE,WAAW,QAAQ;AAAE,WAAO,mBAAmB,KAAK,KAAK,SAAS;AAAA,EAAG;AAAA,EACrE,WAAW,YAAY;AAAE,WAAO,WAAW,KAAK,KAAK,SAAS;AAAA,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WAAW,YAAY,EAAE;AAClC;"}
@@ -0,0 +1,11 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { createEnv } from '@t3-oss/env-core';
3
+ import { uuidv7 } from 'uuidv7';
4
+
5
+ export { createEnv }
6
+
7
+ export declare const httpClient: AxiosInstance;
8
+
9
+ export { uuidv7 }
10
+
11
+ export { }
package/dist/utils.js ADDED
@@ -0,0 +1,9 @@
1
+ import { uuidv7 } from "uuidv7";
2
+ import { h } from "./utils-DKyKGba7.js";
3
+ import { createEnv } from "@t3-oss/env-core";
4
+ export {
5
+ createEnv,
6
+ h as httpClient,
7
+ uuidv7
8
+ };
9
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
package/dist/vite.js CHANGED
@@ -14,6 +14,9 @@ function viteWczLayout() {
14
14
  return {
15
15
  optimizeDeps: {
16
16
  exclude: [virtualModuleId]
17
+ },
18
+ ssr: {
19
+ noExternal: ["@mui/*"]
17
20
  }
18
21
  };
19
22
  },
package/dist/vite.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vite.js","sources":["../src/lib/vite-plugin.ts"],"sourcesContent":["import fs from \"node:fs\";\r\nimport path from \"node:path\";\r\nimport type { Resource } from \"i18next\";\r\nimport type { Plugin } from \"vite\";\r\n\r\nexport function viteWczLayout(): Plugin {\r\n const virtualModuleId = \"virtual:wcz-layout\";\r\n const resolvedVirtualModuleId = \"\\0\" + virtualModuleId;\r\n\r\n let localesPath: string;\r\n\r\n return {\r\n name: \"vite:wcz-layout\",\r\n enforce: \"pre\",\r\n configResolved(resolvedConfig) {\r\n localesPath = path.resolve(resolvedConfig.root, \"src/locales\");\r\n },\r\n config() {\r\n return {\r\n optimizeDeps: {\r\n exclude: [virtualModuleId],\r\n }\r\n };\r\n },\r\n resolveId(id) {\r\n if (id === virtualModuleId) return resolvedVirtualModuleId;\r\n return null;\r\n },\r\n load(id) {\r\n if (id !== resolvedVirtualModuleId) return null;\r\n\r\n if (!fs.existsSync(localesPath)) {\r\n fs.mkdirSync(localesPath, { recursive: true });\r\n }\r\n\r\n const enPath = path.join(localesPath, \"en.json\");\r\n if (!fs.existsSync(enPath)) {\r\n fs.writeFileSync(enPath, JSON.stringify({}));\r\n }\r\n\r\n const files = fs.readdirSync(localesPath);\r\n const jsonFiles = files.filter((f) => f.endsWith(\".json\"));\r\n\r\n const resources: Resource = {};\r\n\r\n for (const file of jsonFiles) {\r\n const lang = path.basename(file, \".json\");\r\n const filePath = path.join(localesPath, file);\r\n\r\n try {\r\n const content = fs.readFileSync(filePath, \"utf-8\");\r\n const translations = JSON.parse(content);\r\n resources[lang] = { translation: translations };\r\n } catch (error) {\r\n console.error(`[vite:layout] Error parsing ${file}:`, error);\r\n resources[lang] = { translation: {} };\r\n }\r\n\r\n this.addWatchFile(filePath);\r\n }\r\n\r\n return `export const resources = ${JSON.stringify(resources)};`;\r\n },\r\n };\r\n}\r\n"],"names":[],"mappings":";;AAKO,SAAS,gBAAwB;AACpC,QAAM,kBAAkB;AACxB,QAAM,0BAA0B,OAAO;AAEvC,MAAI;AAEJ,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS;AAAA,IACT,eAAe,gBAAgB;AAC3B,oBAAc,KAAK,QAAQ,eAAe,MAAM,aAAa;AAAA,IACjE;AAAA,IACA,SAAS;AACL,aAAO;AAAA,QACH,cAAc;AAAA,UACV,SAAS,CAAC,eAAe;AAAA,QAAA;AAAA,MAC7B;AAAA,IAER;AAAA,IACA,UAAU,IAAI;AACV,UAAI,OAAO,gBAAiB,QAAO;AACnC,aAAO;AAAA,IACX;AAAA,IACA,KAAK,IAAI;AACL,UAAI,OAAO,wBAAyB,QAAO;AAE3C,UAAI,CAAC,GAAG,WAAW,WAAW,GAAG;AAC7B,WAAG,UAAU,aAAa,EAAE,WAAW,MAAM;AAAA,MACjD;AAEA,YAAM,SAAS,KAAK,KAAK,aAAa,SAAS;AAC/C,UAAI,CAAC,GAAG,WAAW,MAAM,GAAG;AACxB,WAAG,cAAc,QAAQ,KAAK,UAAU,CAAA,CAAE,CAAC;AAAA,MAC/C;AAEA,YAAM,QAAQ,GAAG,YAAY,WAAW;AACxC,YAAM,YAAY,MAAM,OAAO,CAAC,MAAM,EAAE,SAAS,OAAO,CAAC;AAEzD,YAAM,YAAsB,CAAA;AAE5B,iBAAW,QAAQ,WAAW;AAC1B,cAAM,OAAO,KAAK,SAAS,MAAM,OAAO;AACxC,cAAM,WAAW,KAAK,KAAK,aAAa,IAAI;AAE5C,YAAI;AACA,gBAAM,UAAU,GAAG,aAAa,UAAU,OAAO;AACjD,gBAAM,eAAe,KAAK,MAAM,OAAO;AACvC,oBAAU,IAAI,IAAI,EAAE,aAAa,aAAA;AAAA,QACrC,SAAS,OAAO;AACZ,kBAAQ,MAAM,+BAA+B,IAAI,KAAK,KAAK;AAC3D,oBAAU,IAAI,IAAI,EAAE,aAAa,CAAA,EAAC;AAAA,QACtC;AAEA,aAAK,aAAa,QAAQ;AAAA,MAC9B;AAEA,aAAO,4BAA4B,KAAK,UAAU,SAAS,CAAC;AAAA,IAChE;AAAA,EAAA;AAER;"}
1
+ {"version":3,"file":"vite.js","sources":["../src/lib/vite-plugin.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { Resource } from \"i18next\";\nimport type { Plugin } from \"vite\";\n\nexport function viteWczLayout(): Plugin {\n const virtualModuleId = \"virtual:wcz-layout\";\n const resolvedVirtualModuleId = \"\\0\" + virtualModuleId;\n\n let localesPath: string;\n\n return {\n name: \"vite:wcz-layout\",\n enforce: \"pre\",\n configResolved(resolvedConfig) {\n localesPath = path.resolve(resolvedConfig.root, \"src/locales\");\n },\n config() {\n return {\n optimizeDeps: {\n exclude: [virtualModuleId],\n },\n ssr: {\n noExternal: [\"@mui/*\"],\n },\n };\n },\n resolveId(id) {\n if (id === virtualModuleId) return resolvedVirtualModuleId;\n return null;\n },\n load(id) {\n if (id !== resolvedVirtualModuleId) return null;\n\n if (!fs.existsSync(localesPath)) {\n fs.mkdirSync(localesPath, { recursive: true });\n }\n\n const enPath = path.join(localesPath, \"en.json\");\n if (!fs.existsSync(enPath)) {\n fs.writeFileSync(enPath, JSON.stringify({}));\n }\n\n const files = fs.readdirSync(localesPath);\n const jsonFiles = files.filter((f) => f.endsWith(\".json\"));\n\n const resources: Resource = {};\n\n for (const file of jsonFiles) {\n const lang = path.basename(file, \".json\");\n const filePath = path.join(localesPath, file);\n\n try {\n const content = fs.readFileSync(filePath, \"utf-8\");\n const translations = JSON.parse(content);\n resources[lang] = { translation: translations };\n } catch (error) {\n console.error(`[vite:layout] Error parsing ${file}:`, error);\n resources[lang] = { translation: {} };\n }\n\n this.addWatchFile(filePath);\n }\n\n return `export const resources = ${JSON.stringify(resources)};`;\n },\n };\n}\n"],"names":[],"mappings":";;AAKO,SAAS,gBAAwB;AACpC,QAAM,kBAAkB;AACxB,QAAM,0BAA0B,OAAO;AAEvC,MAAI;AAEJ,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS;AAAA,IACT,eAAe,gBAAgB;AAC3B,oBAAc,KAAK,QAAQ,eAAe,MAAM,aAAa;AAAA,IACjE;AAAA,IACA,SAAS;AACL,aAAO;AAAA,QACH,cAAc;AAAA,UACV,SAAS,CAAC,eAAe;AAAA,QAAA;AAAA,QAE7B,KAAK;AAAA,UACD,YAAY,CAAC,QAAQ;AAAA,QAAA;AAAA,MACzB;AAAA,IAER;AAAA,IACA,UAAU,IAAI;AACV,UAAI,OAAO,gBAAiB,QAAO;AACnC,aAAO;AAAA,IACX;AAAA,IACA,KAAK,IAAI;AACL,UAAI,OAAO,wBAAyB,QAAO;AAE3C,UAAI,CAAC,GAAG,WAAW,WAAW,GAAG;AAC7B,WAAG,UAAU,aAAa,EAAE,WAAW,MAAM;AAAA,MACjD;AAEA,YAAM,SAAS,KAAK,KAAK,aAAa,SAAS;AAC/C,UAAI,CAAC,GAAG,WAAW,MAAM,GAAG;AACxB,WAAG,cAAc,QAAQ,KAAK,UAAU,CAAA,CAAE,CAAC;AAAA,MAC/C;AAEA,YAAM,QAAQ,GAAG,YAAY,WAAW;AACxC,YAAM,YAAY,MAAM,OAAO,CAAC,MAAM,EAAE,SAAS,OAAO,CAAC;AAEzD,YAAM,YAAsB,CAAA;AAE5B,iBAAW,QAAQ,WAAW;AAC1B,cAAM,OAAO,KAAK,SAAS,MAAM,OAAO;AACxC,cAAM,WAAW,KAAK,KAAK,aAAa,IAAI;AAE5C,YAAI;AACA,gBAAM,UAAU,GAAG,aAAa,UAAU,OAAO;AACjD,gBAAM,eAAe,KAAK,MAAM,OAAO;AACvC,oBAAU,IAAI,IAAI,EAAE,aAAa,aAAA;AAAA,QACrC,SAAS,OAAO;AACZ,kBAAQ,MAAM,+BAA+B,IAAI,KAAK,KAAK;AAC3D,oBAAU,IAAI,IAAI,EAAE,aAAa,CAAA,EAAC;AAAA,QACtC;AAEA,aAAK,aAAa,QAAQ;AAAA,MAC9B;AAEA,aAAO,4BAA4B,KAAK,UAAU,SAAS,CAAC;AAAA,IAChE;AAAA,EAAA;AAER;"}
package/package.json CHANGED
@@ -1,116 +1,120 @@
1
- {
2
- "name": "wcz-test",
3
- "version": "6.14.0",
4
- "private": false,
5
- "sideEffects": false,
6
- "type": "module",
7
- "main": "dist/index.js",
8
- "module": "dist/index.js",
9
- "types": "dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js"
14
- },
15
- "./client": {
16
- "types": "./dist/client.d.ts",
17
- "import": "./dist/client.js"
18
- },
19
- "./server": {
20
- "types": "./dist/server.d.ts",
21
- "import": "./dist/server.js"
22
- },
23
- "./components": {
24
- "types": "./dist/components.d.ts",
25
- "import": "./dist/components.js"
26
- },
27
- "./hooks": {
28
- "types": "./dist/hooks.d.ts",
29
- "import": "./dist/hooks.js"
30
- },
31
- "./models": {
32
- "types": "./dist/models.d.ts",
33
- "import": "./dist/models.js"
34
- },
35
- "./queries": {
36
- "types": "./dist/queries.d.ts",
37
- "import": "./dist/queries.js"
38
- },
39
- "./vite": {
40
- "types": "./dist/vite.d.ts",
41
- "import": "./dist/vite.js"
42
- }
43
- },
44
- "files": [
45
- "dist"
46
- ],
47
- "scripts": {
48
- "dev": "vite dev",
49
- "patch": "npm version patch --git-tag-version false",
50
- "minor": "npm version minor --git-tag-version false",
51
- "npm:install": "npm install",
52
- "npm:update": "npm update",
53
- "db:studio": "drizzle-kit studio",
54
- "db:generate": "drizzle-kit generate",
55
- "db:push": "drizzle-kit push",
56
- "auth:generate": "npx @better-auth/cli generate --config src/lib/auth/auth.ts --output src/lib/db/schema/auth.ts",
57
- "build": "vite build --config vite.build.config.ts",
58
- "prepublishOnly": "npm run build"
59
- },
60
- "dependencies": {
61
- "file-saver": "^2.0.5",
62
- "i18next-browser-languagedetector": "^8.2.0",
63
- "react-dropzone": "^14.3.8",
64
- "react-number-format": "^5.4.4",
65
- "tus-js-client": "^4.3.1"
66
- },
67
- "devDependencies": {
68
- "@tanstack/eslint-config": "^0.3.3",
69
- "@tanstack/eslint-plugin-query": "^5.91.2",
70
- "@tanstack/eslint-plugin-router": "^1.139.0",
71
- "@types/file-saver": "^2.0.7",
72
- "@types/node": "^22.10.2",
73
- "@types/pg": "^8.15.6",
74
- "@types/react": "^19.2.7",
75
- "@types/react-dom": "^19.2.3",
76
- "@vitejs/plugin-react": "^5.1.1",
77
- "babel-plugin-react-compiler": "^1.0.0",
78
- "drizzle-kit": "^0.31.7",
79
- "nitro": "^3.0.1-alpha.1",
80
- "react-markdown": "^10.1.0",
81
- "typescript": "^5.9.3",
82
- "vite": "^7.2.6",
83
- "vite-plugin-checker": "^0.11.0",
84
- "vite-plugin-dts": "^4.5.4",
85
- "vite-plugin-pwa": "^1.2.0",
86
- "vite-tsconfig-paths": "^5.1.4"
87
- },
88
- "peerDependencies": {
89
- "@emotion/react": "11.x",
90
- "@emotion/styled": "11.x",
91
- "@mui/icons-material": "7.x",
92
- "@mui/material": "7.x",
93
- "@mui/x-data-grid-premium": "8.x",
94
- "@mui/x-date-pickers-pro": "8.x",
95
- "@t3-oss/env-core": "0.x",
96
- "@tanstack/query-db-collection": "1.x",
97
- "@tanstack/react-db": "0.x",
98
- "@tanstack/react-form": "1.x",
99
- "@tanstack/react-query": "5.x",
100
- "@tanstack/react-router": "1.x",
101
- "@tanstack/react-router-ssr-query": "1.x",
102
- "@tanstack/react-start": "1.x",
103
- "axios": "1.x",
104
- "better-auth": "1.x",
105
- "dayjs": "1.x",
106
- "drizzle-orm": "0.x",
107
- "i18next": "25.x",
108
- "pg": "8.x",
109
- "react": "19.x",
110
- "react-dom": "19.x",
111
- "react-i18next": "16.x",
112
- "react-intersection-observer": "10.x",
113
- "uuidv7": "1.x",
114
- "zod": "4.x"
115
- }
116
- }
1
+ {
2
+ "name": "wcz-test",
3
+ "version": "6.20.0",
4
+ "private": false,
5
+ "sideEffects": false,
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./client": {
16
+ "types": "./dist/client.d.ts",
17
+ "import": "./dist/client.js"
18
+ },
19
+ "./server": {
20
+ "types": "./dist/server.d.ts",
21
+ "import": "./dist/server.js"
22
+ },
23
+ "./components": {
24
+ "types": "./dist/components.d.ts",
25
+ "import": "./dist/components.js"
26
+ },
27
+ "./hooks": {
28
+ "types": "./dist/hooks.d.ts",
29
+ "import": "./dist/hooks.js"
30
+ },
31
+ "./models": {
32
+ "types": "./dist/models.d.ts",
33
+ "import": "./dist/models.js"
34
+ },
35
+ "./queries": {
36
+ "types": "./dist/queries.d.ts",
37
+ "import": "./dist/queries.js"
38
+ },
39
+ "./utils": {
40
+ "types": "./dist/utils.d.ts",
41
+ "import": "./dist/utils.js"
42
+ },
43
+ "./vite": {
44
+ "types": "./dist/vite.d.ts",
45
+ "import": "./dist/vite.js"
46
+ }
47
+ },
48
+ "files": [
49
+ "dist"
50
+ ],
51
+ "scripts": {
52
+ "dev": "vite dev",
53
+ "patch": "npm version patch --git-tag-version false",
54
+ "minor": "npm version minor --git-tag-version false",
55
+ "npm:install": "npm install",
56
+ "npm:update": "npm update",
57
+ "db:studio": "drizzle-kit studio",
58
+ "db:generate": "drizzle-kit generate",
59
+ "db:push": "drizzle-kit push",
60
+ "auth:generate": "npx @better-auth/cli generate --config src/lib/auth/auth.ts --output src/lib/db/schema/auth.ts",
61
+ "build": "vite build --config vite.build.config.ts",
62
+ "prepublishOnly": "npm run build"
63
+ },
64
+ "dependencies": {
65
+ "@t3-oss/env-core": "^0.13.8",
66
+ "@types/pg": "^8.15.6",
67
+ "axios": "^1.13.2",
68
+ "better-auth": "1.4.1",
69
+ "dayjs": "^1.11.19",
70
+ "drizzle-orm": "^0.44.7",
71
+ "file-saver": "^2.0.5",
72
+ "i18next": "^25.6.3",
73
+ "i18next-browser-languagedetector": "^8.2.0",
74
+ "pg": "^8.16.3",
75
+ "react-dropzone": "^14.3.8",
76
+ "react-i18next": "^16.3.5",
77
+ "react-intersection-observer": "^10.0.0",
78
+ "react-number-format": "^5.4.4",
79
+ "tus-js-client": "^4.3.1",
80
+ "uuidv7": "^1.1.0",
81
+ "zod": "^4.1.13"
82
+ },
83
+ "devDependencies": {
84
+ "@tanstack/eslint-config": "^0.3.3",
85
+ "@tanstack/eslint-plugin-query": "^5.91.2",
86
+ "@tanstack/eslint-plugin-router": "^1.139.0",
87
+ "@types/file-saver": "^2.0.7",
88
+ "@types/node": "^22.10.2",
89
+ "@types/react": "^19.2.7",
90
+ "@types/react-dom": "^19.2.3",
91
+ "@vitejs/plugin-react": "^5.1.1",
92
+ "babel-plugin-react-compiler": "^1.0.0",
93
+ "drizzle-kit": "^0.31.7",
94
+ "nitro": "^3.0.1-alpha.1",
95
+ "react-markdown": "^10.1.0",
96
+ "typescript": "^5.9.3",
97
+ "vite": "^7.2.6",
98
+ "vite-plugin-checker": "^0.11.0",
99
+ "vite-plugin-dts": "^4.5.4",
100
+ "vite-plugin-pwa": "^1.2.0",
101
+ "vite-tsconfig-paths": "^5.1.4"
102
+ },
103
+ "peerDependencies": {
104
+ "@emotion/react": "11.x",
105
+ "@emotion/styled": "11.x",
106
+ "@mui/icons-material": "7.x",
107
+ "@mui/material": "7.x",
108
+ "@mui/x-data-grid-premium": "8.x",
109
+ "@mui/x-date-pickers-pro": "8.x",
110
+ "@tanstack/query-db-collection": "1.x",
111
+ "@tanstack/react-db": "0.x",
112
+ "@tanstack/react-form": "1.x",
113
+ "@tanstack/react-query": "5.x",
114
+ "@tanstack/react-router": "1.x",
115
+ "@tanstack/react-router-ssr-query": "1.x",
116
+ "@tanstack/react-start": "1.x",
117
+ "react": "19.x",
118
+ "react-dom": "19.x"
119
+ }
120
+ }
@@ -1,39 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useEventCallback, Dialog, DialogTitle, DialogContent, DialogActions, Button } from "@mui/material";
3
- import { createContext, useContext } from "react";
4
- import { useTranslation } from "react-i18next";
5
- const DialogsContext = createContext({});
6
- function AlertDialog({ open, payload, onClose }) {
7
- const { t } = useTranslation();
8
- return /* @__PURE__ */ jsxs(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(), disableRestoreFocus: true, children: [
9
- /* @__PURE__ */ jsx(DialogTitle, { children: payload.title ?? t("Layout.Dialog.Alert") }),
10
- /* @__PURE__ */ jsx(DialogContent, { children: payload.message }),
11
- /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, { onClick: () => onClose(), autoFocus: true, children: t("Layout.Dialog.Confirm") }) })
12
- ] });
13
- }
14
- function ConfirmDialog({ open, payload, onClose }) {
15
- const { t } = useTranslation();
16
- return /* @__PURE__ */ jsxs(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(false), disableRestoreFocus: true, children: [
17
- /* @__PURE__ */ jsx(DialogTitle, { children: payload.title ?? t("Layout.Dialog.Confirm") }),
18
- /* @__PURE__ */ jsx(DialogContent, { children: payload.message }),
19
- /* @__PURE__ */ jsxs(DialogActions, { children: [
20
- /* @__PURE__ */ jsx(Button, { onClick: () => onClose(false), children: payload.cancelText ?? t("Layout.Dialog.Cancel") }),
21
- /* @__PURE__ */ jsx(Button, { onClick: () => onClose(true), autoFocus: true, children: t("Layout.Dialog.Confirm") })
22
- ] })
23
- ] });
24
- }
25
- function useDialogs() {
26
- const { open, close } = useContext(DialogsContext);
27
- const alert = useEventCallback(
28
- (message, { ...options } = {}) => open(AlertDialog, { ...options, message })
29
- );
30
- const confirm = useEventCallback(
31
- (message, { ...options } = {}) => open(ConfirmDialog, { ...options, message })
32
- );
33
- return { alert, confirm, open, close };
34
- }
35
- export {
36
- DialogsContext as D,
37
- useDialogs as u
38
- };
39
- //# sourceMappingURL=DialogsHooks-BlUsVlfv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DialogsHooks-BlUsVlfv.js","sources":["../src/contexts/DialogsContext.ts","../src/hooks/DialogsHooks.tsx"],"sourcesContent":["import { createContext } from \"react\";\r\nimport type { CloseDialog, OpenDialog } from \"../hooks/DialogsHooks\";\r\n\r\nexport interface DialogsContextValue {\r\n open: OpenDialog;\r\n close: CloseDialog;\r\n}\r\n\r\nexport const DialogsContext = createContext<DialogsContextValue>({} as DialogsContextValue);","import { Button, Dialog, DialogActions, DialogContent, DialogTitle, useEventCallback } from \"@mui/material\";\r\nimport { useContext } from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { DialogsContext } from \"../contexts/DialogsContext\";\r\nimport type { ReactNode } from \"react\";\r\n\r\nexport interface OpenDialogOptions<TResult> {\r\n onClose?: (result: TResult) => Promise<void>;\r\n}\r\n\r\nexport interface AlertOptions {\r\n title?: ReactNode;\r\n}\r\n\r\nexport interface ConfirmOptions {\r\n title?: ReactNode;\r\n cancelText?: ReactNode;\r\n}\r\n\r\nexport interface DialogProps<TPayload = undefined, TResult = void> {\r\n payload: TPayload;\r\n open: boolean;\r\n onClose: (result: TResult) => Promise<void>;\r\n}\r\n\r\nexport type OpenAlertDialog = (message: ReactNode, options?: AlertOptions) => Promise<void>;\r\n\r\nexport type OpenConfirmDialog = (message: ReactNode, options?: ConfirmOptions) => Promise<boolean>;\r\n\r\nexport type DialogComponent<TPayload, TResult> = React.ComponentType<DialogProps<TPayload, TResult>>;\r\n\r\nexport interface OpenDialog {\r\n <TPayload extends undefined, TResult>(Component: DialogComponent<TPayload, TResult>, payload?: TPayload, options?: OpenDialogOptions<TResult>): Promise<TResult>;\r\n <TPayload, TResult>(Component: DialogComponent<TPayload, TResult>, payload: TPayload, options?: OpenDialogOptions<TResult>): Promise<TResult>;\r\n}\r\n\r\nexport type CloseDialog = <TResult>(dialog: Promise<TResult>, result: TResult) => Promise<TResult>;\r\n\r\nexport interface AlertDialogPayload extends AlertOptions {\r\n message: ReactNode;\r\n}\r\n\r\nexport type AlertDialogProps = DialogProps<AlertDialogPayload, void>\r\n\r\nexport function AlertDialog({ open, payload, onClose }: Readonly<AlertDialogProps>) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n <Dialog maxWidth=\"xs\" fullWidth open={open} onClose={() => onClose()} disableRestoreFocus>\r\n <DialogTitle>{payload.title ?? t(\"Layout.Dialog.Alert\")}</DialogTitle>\r\n <DialogContent>{payload.message}</DialogContent>\r\n <DialogActions>\r\n <Button onClick={() => onClose()} autoFocus>\r\n {t(\"Layout.Dialog.Confirm\")}\r\n </Button>\r\n </DialogActions>\r\n </Dialog>\r\n );\r\n}\r\n\r\nexport interface ConfirmDialogPayload extends ConfirmOptions {\r\n message: ReactNode;\r\n}\r\n\r\nexport type ConfirmDialogProps = DialogProps<ConfirmDialogPayload, boolean>\r\n\r\nexport function ConfirmDialog({ open, payload, onClose }: Readonly<ConfirmDialogProps>) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n <Dialog maxWidth=\"xs\" fullWidth open={open} onClose={() => onClose(false)} disableRestoreFocus>\r\n <DialogTitle>{payload.title ?? t(\"Layout.Dialog.Confirm\")}</DialogTitle>\r\n <DialogContent>{payload.message}</DialogContent>\r\n <DialogActions>\r\n <Button onClick={() => onClose(false)}>\r\n {payload.cancelText ?? t(\"Layout.Dialog.Cancel\")}\r\n </Button>\r\n <Button onClick={() => onClose(true)} autoFocus>\r\n {t(\"Layout.Dialog.Confirm\")}\r\n </Button>\r\n </DialogActions>\r\n </Dialog>\r\n );\r\n}\r\n\r\ninterface DialogHook {\r\n alert: OpenAlertDialog;\r\n confirm: OpenConfirmDialog;\r\n open: OpenDialog;\r\n close: CloseDialog;\r\n}\r\n\r\nexport function useDialogs(): DialogHook {\r\n const { open, close } = useContext(DialogsContext);\r\n\r\n const alert = useEventCallback<OpenAlertDialog>((message, { ...options } = {}) =>\r\n open(AlertDialog, { ...options, message }),\r\n );\r\n\r\n const confirm = useEventCallback<OpenConfirmDialog>((message, { ...options } = {}) =>\r\n open(ConfirmDialog, { ...options, message }),\r\n );\r\n\r\n return { alert, confirm, open, close };\r\n}\r\n"],"names":[],"mappings":";;;;AAQO,MAAM,iBAAiB,cAAmC,CAAA,CAAyB;ACoCnF,SAAS,YAAY,EAAE,MAAM,SAAS,WAAuC;AAChF,QAAM,EAAE,EAAA,IAAM,eAAA;AAEd,SACI,qBAAC,QAAA,EAAO,UAAS,MAAK,WAAS,MAAC,MAAY,SAAS,MAAM,QAAA,GAAW,qBAAmB,MACrF,UAAA;AAAA,IAAA,oBAAC,aAAA,EAAa,UAAA,QAAQ,SAAS,EAAE,qBAAqB,GAAE;AAAA,IACxD,oBAAC,eAAA,EAAe,UAAA,QAAQ,QAAA,CAAQ;AAAA,IAChC,oBAAC,eAAA,EACG,UAAA,oBAAC,QAAA,EAAO,SAAS,MAAM,QAAA,GAAW,WAAS,MACtC,UAAA,EAAE,uBAAuB,GAC9B,EAAA,CACJ;AAAA,EAAA,GACJ;AAER;AAQO,SAAS,cAAc,EAAE,MAAM,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