@nano-app/frontend 0.3.6 → 0.5.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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +195 -0
  3. package/build/core/const.d.ts +4 -0
  4. package/build/core/const.js +9 -0
  5. package/build/core/loader/FileLoader.js +38 -0
  6. package/build/core/loader/FileReader.js +30 -0
  7. package/build/core/loader/Validator.js +70 -0
  8. package/build/core/types/objects.d.ts +4 -0
  9. package/build/core/utils/Formatter.js +14 -0
  10. package/build/creators/createController.d.ts +6 -0
  11. package/build/creators/createController.js +27 -0
  12. package/build/creators/createStores.js +15 -0
  13. package/build/index.d.ts +4 -0
  14. package/build/index.js +3 -0
  15. package/build/next.d.ts +8 -0
  16. package/build/next.js +21 -0
  17. package/build/proxy.d.ts +5 -0
  18. package/build/proxy.js +25 -0
  19. package/build/react/NanoAppProvider.d.ts +7 -0
  20. package/build/react/NanoAppProvider.js +25 -0
  21. package/build/stores/ApiStore.js +81 -0
  22. package/build/stores/Store.d.ts +15 -0
  23. package/build/stores/Store.js +33 -0
  24. package/build/types/component.d.ts +21 -0
  25. package/build/types/store.d.ts +9 -0
  26. package/package.json +54 -33
  27. package/bin/generate-stores.mjs +0 -128
  28. package/dist/auto-register.mjs +0 -327
  29. package/dist/index.d.ts +0 -10
  30. package/dist/index.js +0 -34
  31. package/dist/store/ApiStore.d.ts +0 -13
  32. package/dist/store/ApiStore.js +0 -51
  33. package/dist/store/AppStore.d.ts +0 -25
  34. package/dist/store/AppStore.js +0 -59
  35. package/dist/store/RenderManager.d.ts +0 -47
  36. package/dist/store/RenderManager.js +0 -78
  37. package/dist/store/StoreManager.d.ts +0 -15
  38. package/dist/store/StoreManager.js +0 -30
  39. package/dist/ui/Controller.d.ts +0 -20
  40. package/dist/ui/Controller.js +0 -49
  41. package/dist/ui/createComponent.d.ts +0 -17
  42. package/dist/ui/createComponent.js +0 -32
  43. package/dist/utils/QueryBuilder.d.ts +0 -19
  44. package/dist/utils/QueryBuilder.js +0 -31
  45. package/dist/utils/Toast.d.ts +0 -12
  46. package/dist/utils/Toast.js +0 -28
  47. package/dist/utils/TokenHelper.d.ts +0 -5
  48. package/dist/utils/TokenHelper.js +0 -17
@@ -0,0 +1,33 @@
1
+ import { observable, runInAction } from "mobx";
2
+ //#region src/stores/Store.ts
3
+ /** State of one store, read and written by path (`/drawer/isOpen`) */
4
+ var Store = class Store {
5
+ oState;
6
+ /** Makes the store's initial data observable, so reads are tracked and writes notify them */
7
+ constructor(oData = {}) {
8
+ this.oState = observable(oData);
9
+ }
10
+ /** Value at a path: an object comes back observable, so reading its fields stays tracked */
11
+ get(sPath) {
12
+ return Store.keys(sPath).reduce((oValue, sKey) => oValue?.[sKey], this.oState);
13
+ }
14
+ /** Writes a value at a path, creating the levels that are missing */
15
+ set(sPath, oValue) {
16
+ const aKeys = Store.keys(sPath);
17
+ const sLast = aKeys.pop();
18
+ if (!sLast) return;
19
+ runInAction(() => {
20
+ const oParent = aKeys.reduce((oLevel, sKey) => {
21
+ oLevel[sKey] ??= {};
22
+ return oLevel[sKey];
23
+ }, this.oState);
24
+ oParent[sLast] = oValue;
25
+ });
26
+ }
27
+ /** Keys of a path, with or without the leading slash */
28
+ static keys(sPath) {
29
+ return sPath.split("/").filter(Boolean);
30
+ }
31
+ };
32
+ //#endregion
33
+ export { Store as default };
@@ -0,0 +1,21 @@
1
+ import { NanoObject } from "../core/types/objects.js";
2
+ import { Stores } from "./store.js";
3
+ import { ReactNode } from "react";
4
+ //#region src/types/component.d.ts
5
+ /** Props a component receives from its parent */
6
+ export type ComponentProps = NanoObject<any>;
7
+ /** What a controller and its views receive: the props and the stores */
8
+ export type ComponentContext = {
9
+ props: ComponentProps;
10
+ stores: Stores;
11
+ };
12
+ /** Renders a component with the controller's methods; the context wins over a method's name */
13
+ export type View<M extends NanoObject> = (params: Omit<M, keyof ComponentContext> & ComponentContext) => ReactNode;
14
+ /** Returned by `createController`: binds views to its methods */
15
+ export type Controller<M extends NanoObject> = {
16
+ /** Creates a component that renders the view with the controller's methods */
17
+ bindView(view: View<M>): (props: ComponentProps) => ReactNode;
18
+ /** Creates a controller with these methods merged over its own: a method with the same name wins */
19
+ extend<E extends NanoObject>(methods: (context: ComponentContext) => E): Controller<Omit<M, keyof E> & E>;
20
+ };
21
+ //#endregion
@@ -0,0 +1,9 @@
1
+ import { APP_NAME } from "../core/const.js";
2
+ import { NanoObject } from "../core/types/objects.js";
3
+ import Store from "../stores/Store.js";
4
+ //#region src/types/store.d.ts
5
+ /** Stores of a React tree by name: a `Store` per `app` file, an `ApiStore` per `api` file */
6
+ export type Stores = NanoObject<any> & {
7
+ [APP_NAME]: Store;
8
+ };
9
+ //#endregion
package/package.json CHANGED
@@ -1,52 +1,73 @@
1
1
  {
2
2
  "name": "@nano-app/frontend",
3
- "version": "0.3.6",
4
- "description": "View + Controller frontend architecture for React/Next.js",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
3
+ "version": "0.5.0",
4
+ "description": "React provider for Next.js apps on top of @nano-app/backend",
5
+ "type": "module",
7
6
  "exports": {
8
7
  ".": {
9
- "import": "./dist/index.js",
10
- "require": "./dist/index.js",
11
- "types": "./dist/index.d.ts"
8
+ "types": "./build/index.d.ts",
9
+ "import": "./build/index.js"
10
+ },
11
+ "./next": {
12
+ "types": "./build/next.d.ts",
13
+ "import": "./build/next.js",
14
+ "default": "./build/next.js"
15
+ },
16
+ "./proxy": {
17
+ "types": "./build/proxy.d.ts",
18
+ "import": "./build/proxy.js"
12
19
  }
13
20
  },
14
- "bin": {
15
- "generate-stores": "./bin/generate-stores.mjs"
16
- },
17
21
  "files": [
18
- "dist",
19
- "bin"
22
+ "build",
23
+ "LICENSE"
20
24
  ],
21
25
  "scripts": {
22
- "build": "tsc",
23
- "publish": "npm run build && npm publish --access public"
26
+ "build": "tsdown",
27
+ "prepublishOnly": "pnpm run build",
28
+ "test": "tsx --test tests/*.test.ts tests/*.test.tsx ../core/tests/*.test.ts"
24
29
  },
25
30
  "keywords": [
26
- "architecture",
27
- "typescript",
28
- "react",
31
+ "nano-app",
29
32
  "next",
30
- "controller",
31
- "view"
33
+ "react",
34
+ "store"
32
35
  ],
33
36
  "author": "Cristian Serrano",
34
37
  "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/Nano-Nathan/nano-app.git",
41
+ "directory": "frontend"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "engines": {
47
+ "node": ">=22"
48
+ },
35
49
  "peerDependencies": {
36
- "@nano-app/backend": "^0.6.5",
37
- "next": ">=14.0.0",
38
- "react": ">=18.0.0",
39
- "react-dom": ">=18.0.0",
40
- "zustand": ">=5.0.0",
41
- "fs": "^0.0.1-security"
50
+ "next": ">=16.3.0",
51
+ "react": ">=19.0.0"
52
+ },
53
+ "dependencies": {
54
+ "glob": "^13.0.6",
55
+ "jiti": "^2.7.0",
56
+ "mobx": "^7.1.0",
57
+ "mobx-react-lite": "^5.1.0"
42
58
  },
43
59
  "devDependencies": {
44
- "@types/node": "^20.0.0",
45
- "@types/react": "^18.0.0",
46
- "next": "^14.0.0",
47
- "react": "^18.0.0",
48
- "react-dom": "^18.0.0",
49
- "typescript": "^5.3.0",
50
- "zustand": "^5.0.0"
60
+ "@happy-dom/global-registrator": "^21.0.3",
61
+ "@testing-library/dom": "^10.4.2",
62
+ "@testing-library/react": "^16.3.3",
63
+ "@types/node": "^26.6.5",
64
+ "@types/react": "^19.3.0",
65
+ "happy-dom": "^21.0.3",
66
+ "next": "^16.4.2",
67
+ "react": "^19.3.1",
68
+ "react-dom": "^19.3.1",
69
+ "tsdown": "^0.23.1",
70
+ "tsx": "^4.23.15",
71
+ "typescript": "^7.0.2"
51
72
  }
52
- }
73
+ }
@@ -1,128 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { createRequire } from "module";
4
- import { readdirSync, mkdirSync, writeFileSync, existsSync } from "fs";
5
- import { resolve, join } from "path";
6
-
7
- const cwd = process.cwd();
8
- const srcDir = join(cwd, "src");
9
- const outDir = join(cwd, "node_modules", "@nano-app", "frontend", "dist");
10
- const outFile = join(outDir, "auto-register.mjs");
11
-
12
- // Busca recursivamente archivos *.store.ts
13
- function findStoreFiles(dir) {
14
- const results = [];
15
- if (!existsSync(dir)) return results;
16
-
17
- for (const entry of readdirSync(dir, { withFileTypes: true })) {
18
- const fullPath = join(dir, entry.name);
19
- if (entry.isDirectory()) {
20
- results.push(...findStoreFiles(fullPath));
21
- } else if (entry.isFile() && entry.name.endsWith(".store.ts")) {
22
- results.push(fullPath);
23
- }
24
- }
25
- return results;
26
- }
27
-
28
- // Importa un archivo .ts usando jiti (transpilador de Next.js)
29
- function loadStoreFile(filePath) {
30
- try {
31
- const jitiPath = resolve(cwd, "node_modules", "jiti", "lib", "jiti.cjs");
32
- const require = createRequire(import.meta.url);
33
- const jiti = require(jitiPath);
34
- const load = jiti(filePath, { interopDefault: true });
35
- const mod = load(filePath);
36
- return mod?.default ?? mod;
37
- } catch (err) {
38
- console.error(` [ERROR] No se pudo cargar ${filePath}: ${err.message}`);
39
- return null;
40
- }
41
- }
42
-
43
- // Valida que el objeto tenga la forma correcta
44
- function validateEntry(entry, filePath) {
45
- if (!entry || typeof entry !== "object") {
46
- console.warn(` [WARN] ${filePath}: el export default no es un objeto, se ignora.`);
47
- return false;
48
- }
49
- if (entry.type !== "app" && entry.type !== "api") {
50
- console.warn(` [WARN] ${filePath}: type debe ser "app" o "api", se ignora.`);
51
- return false;
52
- }
53
- if (entry.type === "api" && !entry.path) {
54
- console.warn(` [WARN] ${filePath}: type "api" requiere un campo "path", se ignora.`);
55
- return false;
56
- }
57
- return true;
58
- }
59
-
60
- // Serializa el objeto de datos a string JS (soporta funciones)
61
- function serialize(value, indent = 0) {
62
- const pad = " ".repeat(indent);
63
- const padInner = " ".repeat(indent + 1);
64
-
65
- if (value === null) return "null";
66
- if (value === undefined) return "undefined";
67
- if (typeof value === "function") return value.toString();
68
- if (typeof value === "string") return JSON.stringify(value);
69
- if (typeof value === "number" || typeof value === "boolean") return String(value);
70
-
71
- if (Array.isArray(value)) {
72
- if (value.length === 0) return "[]";
73
- const items = value.map((v) => `${padInner}${serialize(v, indent + 1)}`).join(",\n");
74
- return `[\n${items}\n${pad}]`;
75
- }
76
-
77
- if (typeof value === "object") {
78
- const entries = Object.entries(value);
79
- if (entries.length === 0) return "{}";
80
- const lines = entries
81
- .map(([k, v]) => `${padInner}${JSON.stringify(k)}: ${serialize(v, indent + 1)}`)
82
- .join(",\n");
83
- return `{\n${lines}\n${pad}}`;
84
- }
85
-
86
- return String(value);
87
- }
88
-
89
- // ─── Main ────────────────────────────────────────────────────────────────────
90
-
91
- const storeFiles = findStoreFiles(srcDir);
92
- console.log(`\n[nano-app] Buscando archivos *.store.ts en ${srcDir}`);
93
- console.log(`[nano-app] Encontrados: ${storeFiles.length}\n`);
94
-
95
- const entries = [];
96
-
97
- for (const filePath of storeFiles) {
98
- console.log(` Procesando: ${filePath.replace(cwd, ".")}`);
99
- const mod = loadStoreFile(filePath);
100
- if (mod && validateEntry(mod, filePath)) {
101
- const name = filePath
102
- .replace(srcDir, "")
103
- .replace(/\\/g, "/")
104
- .replace(/^\//, "")
105
- .replace(/\.store\.ts$/, "")
106
- .split("/")
107
- .pop();
108
-
109
- entries.push({ name, ...mod });
110
- console.log(` ✓ Store "${name}" (${mod.type})`);
111
- }
112
- }
113
-
114
- // Genera el archivo de salida
115
- mkdirSync(outDir, { recursive: true });
116
-
117
- const serializedEntries = entries
118
- .map((entry) => ` ${serialize(entry, 1)}`)
119
- .join(",\n");
120
-
121
- const output = `// Auto-generado por @nano-app
122
- // No editar manualmente.
123
- export default [\n${serializedEntries}\n];\n`;
124
-
125
- writeFileSync(outFile, output, "utf-8");
126
-
127
- console.log(`\n[nano-app] Archivo generado: ${outFile.replace(cwd, ".")}`);
128
- console.log(`[nano-app] Stores registrados: ${entries.map((e) => `"${e.name}"`).join(", ") || "(ninguno — se usará store app vacío)"}\n`);
@@ -1,327 +0,0 @@
1
- // Auto-generado por @nano-app
2
- // No editar manualmente.
3
- export default [
4
- {
5
- "name": "api",
6
- "type": "api",
7
- "path": "/api",
8
- "data": {
9
- "busy": true,
10
- "DefaultItems": [],
11
- "UserStatusItems": [
12
- {
13
- "key": "SUSPENDED",
14
- "text": "Suspendido"
15
- },
16
- {
17
- "key": "PENDING",
18
- "text": "Pendiente"
19
- },
20
- {
21
- "key": "ACTIVE",
22
- "text": "Activo"
23
- }
24
- ]
25
- }
26
- },
27
- {
28
- "name": "app",
29
- "type": "app",
30
- "data": {
31
- "login": {
32
- "isRegister": false
33
- },
34
- "navbar": {
35
- "tabs": [],
36
- "selectedTabKey": "home",
37
- "selectedTab": {},
38
- "isMenuOpen": false
39
- },
40
- "form": {
41
- "data": {},
42
- "validate": []
43
- },
44
- "drawer": {
45
- "isOpen": false,
46
- "formType": "",
47
- "title": ""
48
- },
49
- "config": {
50
- "theme": "dark"
51
- }
52
- }
53
- },
54
- {
55
- "name": "const",
56
- "type": "app",
57
- "data": {
58
- "alias": "42974117.prex",
59
- "stepSkipTop": 20,
60
- "tabs": (rolId = 0) => [
61
- { key: "home", href: "/", label: "Home", minRole: -1 },
62
- { key: "resumen", href: "/resumen", label: "Resumen", minRole: -1 },
63
- { key: "admin", href: "/admin", label: "Administración", minRole: -1 },
64
- { key: "uli", href: "/", label: "Uli :v", minRole: -1 },
65
- { key: "luka", href: "/", label: "Lucas :v", minRole: -1 }].
66
- filter((tab) => tab.minRole <= rolId),
67
- "initialForms": {
68
- "User": {
69
- "rolId": 1,
70
- "status": "PENDING"
71
- },
72
- "Collection": {
73
- "total_months": 1,
74
- "start_date": "2026-03-01T00:00:00.000Z"
75
- }
76
- },
77
- "tableColumns": {
78
- "Users": [
79
- "name",
80
- "phone",
81
- "mail",
82
- "pending",
83
- "favor",
84
- "rol.name",
85
- "status"
86
- ],
87
- "Collections": [
88
- "user.name",
89
- "price",
90
- "description",
91
- "start_date",
92
- "total_months",
93
- "subscription.description"
94
- ],
95
- "Subscriptions": [
96
- "description",
97
- "price"
98
- ]
99
- },
100
- "formField": {
101
- "pay": [
102
- {
103
- "fieldName": "total",
104
- "valueType": "price",
105
- "isRequired": true
106
- }
107
- ],
108
- "login": [
109
- {
110
- "fieldName": "mail",
111
- "inputType": "email",
112
- "isRequired": true
113
- },
114
- {
115
- "fieldName": "password",
116
- "inputType": "password",
117
- "isRequired": true,
118
- "validateFn": (oForm) =>
119
- (oForm.password?.length || 0) < 4 ?
120
- "La contraseña debe tener al menos 4 caracteres" :
121
- ""
122
- }
123
- ],
124
- "register": [
125
- {
126
- "fieldName": "name",
127
- "isRequired": true
128
- },
129
- {
130
- "fieldName": "phone",
131
- "isRequired": true
132
- },
133
- {
134
- "fieldName": "mail",
135
- "inputType": "email",
136
- "isRequired": true
137
- },
138
- {
139
- "fieldName": "password",
140
- "inputType": "password",
141
- "isRequired": true,
142
- "validateFn": (oForm) =>
143
- (oForm.password?.length || 0) < 4 ?
144
- "La contraseña debe tener al menos 4 caracteres" :
145
- ""
146
- },
147
- {
148
- "fieldName": "confirmPassword",
149
- "inputType": "password",
150
- "isRequired": true,
151
- "validateFn": (oForm) =>
152
- oForm.confirmPassword != oForm.password ?
153
- 'Las contraseñas no coinciden' :
154
- ''
155
- }
156
- ],
157
- "Users": [
158
- {
159
- "fieldName": "name",
160
- "isRequired": true
161
- },
162
- {
163
- "fieldName": "mail",
164
- "inputType": "email",
165
- "isRequired": true
166
- },
167
- {
168
- "fieldName": "rolId",
169
- "valueType": "number",
170
- "isRequired": true,
171
- "inputType": "select",
172
- "select": {
173
- "items": "/Roles",
174
- "itemKey": "id",
175
- "showValues": [
176
- "name"
177
- ]
178
- }
179
- },
180
- {
181
- "fieldName": "status",
182
- "inputType": "select",
183
- "isRequired": true,
184
- "select": {
185
- "items": "/UserStatusItems",
186
- "itemKey": "key",
187
- "showValues": [
188
- "text"
189
- ]
190
- }
191
- },
192
- {
193
- "fieldName": "pending",
194
- "valueType": "price"
195
- },
196
- {
197
- "fieldName": "favor",
198
- "valueType": "price"
199
- }
200
- ],
201
- "Collections": [
202
- {
203
- "fieldName": "userId",
204
- "valueType": "number",
205
- "inputType": "select",
206
- "isRequired": true,
207
- "select": {
208
- "items": "Users",
209
- "itemKey": "id",
210
- "showValues": [
211
- "name"
212
- ]
213
- }
214
- },
215
- {
216
- "fieldName": "price",
217
- "valueType": "price",
218
- "isRequired": true
219
- },
220
- {
221
- "fieldName": "description",
222
- "isRequired": true
223
- },
224
- {
225
- "fieldName": "total_months",
226
- "valueType": "number",
227
- "isRequired": true
228
- },
229
- {
230
- "fieldName": "start_date",
231
- "valueType": "date",
232
- "inputType": "date",
233
- "isRequired": true
234
- },
235
- {
236
- "fieldName": "subscriptionId",
237
- "valueType": "number",
238
- "inputType": "select",
239
- "select": {
240
- "items": "Subscriptions",
241
- "itemKey": "id",
242
- "showValues": [
243
- "description"
244
- ]
245
- }
246
- }
247
- ],
248
- "Subscriptions": [
249
- {
250
- "fieldName": "description",
251
- "isRequired": true
252
- },
253
- {
254
- "fieldName": "price",
255
- "valueType": "price",
256
- "isRequired": true
257
- }
258
- ]
259
- },
260
- "expandFields": {
261
- "Users": "rol",
262
- "Collections": "user,subscription"
263
- }
264
- }
265
- },
266
- {
267
- "name": "i18n",
268
- "type": "app",
269
- "data": {
270
- "loginTexts": (isRegister) => ({
271
- headerText: isRegister ? "REGISTRARSE" : "INICIAR SESIÓN",
272
- footerText: isRegister ? "o iniciar sesión" : "o registrarse",
273
- buttonText: isRegister ? "Crear" : "Ingresar",
274
- formType: isRegister ? "register" : "login"
275
- }),
276
- "button": {
277
- "confirm": "Confirmar"
278
- },
279
- "create": (entity) => `Crear ${entity}`,
280
- "edit": (entity) => `Editar ${entity}`,
281
- "mapping": {
282
- "name": "Nombre",
283
- "phone": "Teléfono",
284
- "mail": "Mail",
285
- "pending": "Pendiente",
286
- "favor": "A favor",
287
- "rolId": "Rol",
288
- "rol.name": "Rol",
289
- "status": "Estado",
290
- "password": "Contraseña",
291
- "confirmPassword": "Repetir contraseña",
292
- "user.name": "Usuario",
293
- "userId": "Usuario",
294
- "price": "Precio",
295
- "description": "Descripción",
296
- "start_date": "Fecha de inicio",
297
- "total_months": "Meses totales",
298
- "subscription.description": "Subscripción",
299
- "subscriptionId": "Subscripción",
300
- "last_pay": "Último pago",
301
- "first_month": "Mes de inicio",
302
- "current_month": "Último mes pagado",
303
- "payed_months": "Meses pagados",
304
- "actions": "Acciones",
305
- "created_at": "Creado",
306
- "Users": "Usuarios",
307
- "Collections": "Cuotas",
308
- "Subscriptions": "Subscripciones",
309
- "total": "TOTAL"
310
- },
311
- "months": {
312
- "1": "Enero",
313
- "2": "Febrero",
314
- "3": "Marzo",
315
- "4": "Abril",
316
- "5": "Mayo",
317
- "6": "Junio",
318
- "7": "Julio",
319
- "8": "Agosto",
320
- "9": "Septiembre",
321
- "10": "Octubre",
322
- "11": "Noviembre",
323
- "12": "Diciembre"
324
- }
325
- }
326
- }
327
- ];
package/dist/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from "./store/ApiStore";
2
- export * from "./store/AppStore";
3
- export * from "./store/StoreManager";
4
- export * from "./store/RenderManager";
5
- export * from "./ui/Controller";
6
- export * from "./ui/createComponent";
7
- export * from "./utils/QueryBuilder";
8
- export * from "./utils/Toast";
9
- export * from "./utils/TokenHelper";
10
- export type { ApiResponse } from "@nano-app/backend";
package/dist/index.js DELETED
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- const StoreManager_1 = __importDefault(require("./store/StoreManager"));
21
- __exportStar(require("./store/ApiStore"), exports);
22
- __exportStar(require("./store/AppStore"), exports);
23
- __exportStar(require("./store/StoreManager"), exports);
24
- __exportStar(require("./store/RenderManager"), exports);
25
- __exportStar(require("./ui/Controller"), exports);
26
- __exportStar(require("./ui/createComponent"), exports);
27
- __exportStar(require("./utils/QueryBuilder"), exports);
28
- __exportStar(require("./utils/Toast"), exports);
29
- __exportStar(require("./utils/TokenHelper"), exports);
30
- // Inicializa los stores si existen
31
- try {
32
- StoreManager_1.default.init(require('./auto-register.mjs').default);
33
- }
34
- catch (e) { }