@darkfrost-1107/scaff-z-react 0.1.7

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 (634) hide show
  1. package/LICENSE.md +5 -0
  2. package/README.md +75 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  4. package/dist/action-processor.d.ts +2 -0
  5. package/dist/app/config/sqlite.registry.cjs +1 -0
  6. package/dist/app/config/sqlite.registry.esm +37 -0
  7. package/dist/app.config.d.ts +1 -0
  8. package/dist/async-combobox.input.d.ts +4 -0
  9. package/dist/async-multi-select.input.d.ts +4 -0
  10. package/dist/async-select.input.d.ts +4 -0
  11. package/dist/audit-view.d.ts +2 -0
  12. package/dist/back-button.action.d.ts +6 -0
  13. package/dist/badge.d.ts +2 -0
  14. package/dist/base.connector.d.ts +4 -0
  15. package/dist/base.entity.d.ts +2 -0
  16. package/dist/base.node.d.ts +2 -0
  17. package/dist/base.service.d.ts +4 -0
  18. package/dist/breadcrumb.d.ts +2 -0
  19. package/dist/build.router.d.ts +4 -0
  20. package/dist/builder-device.guard.d.ts +2 -0
  21. package/dist/builder.d.ts +2 -0
  22. package/dist/button.d.ts +2 -0
  23. package/dist/calendar.d.ts +2 -0
  24. package/dist/canvas-view.layout.d.ts +2 -0
  25. package/dist/card.d.ts +2 -0
  26. package/dist/checkbox-inline.input.d.ts +4 -0
  27. package/dist/checkbox.d.ts +2 -0
  28. package/dist/checkbox.input.d.ts +4 -0
  29. package/dist/code.input.d.ts +4 -0
  30. package/dist/color.input.d.ts +4 -0
  31. package/dist/combobox.d.ts +2 -0
  32. package/dist/combobox.input.d.ts +4 -0
  33. package/dist/command.d.ts +2 -0
  34. package/dist/component.factory.d.ts +4 -0
  35. package/dist/component.guard.d.ts +2 -0
  36. package/dist/components.registry.d.ts +2 -0
  37. package/dist/context.guard.d.ts +2 -0
  38. package/dist/context.verifier.d.ts +2 -0
  39. package/dist/crypto.service.d.ts +2 -0
  40. package/dist/dark.style.d.ts +2 -0
  41. package/dist/data-table.component.d.ts +2 -0
  42. package/dist/data-table.provider.d.ts +1 -0
  43. package/dist/date.input.d.ts +2 -0
  44. package/dist/deckgl-overlay.d.ts +2 -0
  45. package/dist/detail-tabs.layout.d.ts +6 -0
  46. package/dist/detail-view.layout.d.ts +6 -0
  47. package/dist/device-artifact.guard.d.ts +2 -0
  48. package/dist/device.guard.d.ts +2 -0
  49. package/dist/device.verifier.registry.d.ts +2 -0
  50. package/dist/dialog.d.ts +2 -0
  51. package/dist/dnd.provider.d.ts +2 -0
  52. package/dist/draggeable.d.ts +2 -0
  53. package/dist/droppable.d.ts +2 -0
  54. package/dist/droppeable.d.ts +2 -0
  55. package/dist/dynamic-device.guard.d.ts +2 -0
  56. package/dist/dynamic-icon.d.ts +6 -0
  57. package/dist/email.input.d.ts +4 -0
  58. package/dist/enum.verifier.d.ts +2 -0
  59. package/dist/env.manager.d.ts +2 -0
  60. package/dist/feedback.layout.d.ts +2 -0
  61. package/dist/field.d.ts +2 -0
  62. package/dist/file.input.d.ts +4 -0
  63. package/dist/flow-canvas.d.ts +2 -0
  64. package/dist/flow.renderer.d.ts +2 -0
  65. package/dist/flow.types.d.ts +1 -0
  66. package/dist/form-dialog-layout.d.ts +4 -0
  67. package/dist/form-tab-layout.d.ts +4 -0
  68. package/dist/form.component.d.ts +2 -0
  69. package/dist/grid.layout.d.ts +2 -0
  70. package/dist/guard.d.ts +2 -0
  71. package/dist/hover.d.ts +2 -0
  72. package/dist/icon-box.d.ts +2 -0
  73. package/dist/icon-button.d.ts +2 -0
  74. package/dist/image.input.d.ts +4 -0
  75. package/dist/index.d.ts +2 -0
  76. package/dist/indexeddb.service.d.ts +6 -0
  77. package/dist/input-group.d.ts +2 -0
  78. package/dist/input.d.ts +2 -0
  79. package/dist/interceptor.builder.d.ts +2 -0
  80. package/dist/label.d.ts +2 -0
  81. package/dist/language-toggle.d.ts +2 -0
  82. package/dist/list-select.input.d.ts +4 -0
  83. package/dist/logger.d.ts +2 -0
  84. package/dist/main.connector.d.ts +2 -0
  85. package/dist/main.service.d.ts +6 -0
  86. package/dist/maps.renderer.d.ts +4 -0
  87. package/dist/marker.factory.d.ts +2 -0
  88. package/dist/marker.guard.d.ts +2 -0
  89. package/dist/markers.meta.d.ts +1 -0
  90. package/dist/modules/actions/entities/action.entity.cjs +1 -0
  91. package/dist/modules/actions/entities/action.entity.esm +139 -0
  92. package/dist/modules/artifacts/entities/artifact.entity.cjs +1 -0
  93. package/dist/modules/artifacts/entities/artifact.entity.esm +82 -0
  94. package/dist/modules/integrations/entities/integration.entity.cjs +1 -0
  95. package/dist/modules/integrations/entities/integration.entity.esm +75 -0
  96. package/dist/modules/inventory/entities/category.entity.cjs +1 -0
  97. package/dist/modules/inventory/entities/category.entity.esm +50 -0
  98. package/dist/modules/inventory/entities/inventory-item.entity.cjs +1 -0
  99. package/dist/modules/inventory/entities/inventory-item.entity.esm +68 -0
  100. package/dist/modules/inventory/entities/product-item.entity.cjs +1 -0
  101. package/dist/modules/inventory/entities/product-item.entity.esm +69 -0
  102. package/dist/modules/inventory/entities/zone.entity.cjs +1 -0
  103. package/dist/modules/inventory/entities/zone.entity.esm +50 -0
  104. package/dist/modules/memberships/entities/membership.entity.cjs +1 -0
  105. package/dist/modules/memberships/entities/membership.entity.esm +53 -0
  106. package/dist/modules/organizations/entities/organization.entity.cjs +1 -0
  107. package/dist/modules/organizations/entities/organization.entity.esm +75 -0
  108. package/dist/modules/projects/entities/project.entity.cjs +1 -0
  109. package/dist/modules/projects/entities/project.entity.esm +100 -0
  110. package/dist/modules/test/entities/experiment.entity.cjs +1 -0
  111. package/dist/modules/test/entities/experiment.entity.esm +71 -0
  112. package/dist/modules/tickets/entities/ticket.entity.cjs +1 -0
  113. package/dist/modules/tickets/entities/ticket.entity.esm +92 -0
  114. package/dist/modules/tools/entities/tool.entity.cjs +1 -0
  115. package/dist/modules/tools/entities/tool.entity.esm +129 -0
  116. package/dist/modules/users/entities/user-role.enum.cjs +1 -0
  117. package/dist/modules/users/entities/user-role.enum.esm +6 -0
  118. package/dist/modules/users/entities/user.entity.cjs +1 -0
  119. package/dist/modules/users/entities/user.entity.esm +88 -0
  120. package/dist/nfc.service.d.ts +6 -0
  121. package/dist/nosql.repo.d.ts +2 -0
  122. package/dist/nosql.repo.service.d.ts +4 -0
  123. package/dist/packages/capacitor/app.config.cjs +1 -0
  124. package/dist/packages/capacitor/app.config.d.ts +1 -0
  125. package/dist/packages/capacitor/app.config.esm +7 -0
  126. package/dist/packages/crypto/crypto.service.cjs +1 -0
  127. package/dist/packages/crypto/crypto.service.d.ts +6 -0
  128. package/dist/packages/crypto/crypto.service.esm +17 -0
  129. package/dist/packages/crypto/index.cjs +1 -0
  130. package/dist/packages/crypto/index.d.ts +1 -0
  131. package/dist/packages/crypto/index.esm +2 -0
  132. package/dist/packages/dnd/dnd.provider.cjs +1 -0
  133. package/dist/packages/dnd/dnd.provider.d.ts +3 -0
  134. package/dist/packages/dnd/dnd.provider.esm +8 -0
  135. package/dist/packages/dnd/draggeable.cjs +1 -0
  136. package/dist/packages/dnd/draggeable.d.ts +4 -0
  137. package/dist/packages/dnd/draggeable.esm +12 -0
  138. package/dist/packages/dnd/droppable.cjs +1 -0
  139. package/dist/packages/dnd/droppable.d.ts +8 -0
  140. package/dist/packages/dnd/droppable.esm +14 -0
  141. package/dist/packages/dnd/droppeable.cjs +1 -0
  142. package/dist/packages/dnd/droppeable.d.ts +5 -0
  143. package/dist/packages/dnd/droppeable.esm +13 -0
  144. package/dist/packages/dnd/sortable.cjs +1 -0
  145. package/dist/packages/dnd/sortable.d.ts +11 -0
  146. package/dist/packages/dnd/sortable.esm +18 -0
  147. package/dist/packages/env/env.manager.cjs +1 -0
  148. package/dist/packages/env/env.manager.d.ts +11 -0
  149. package/dist/packages/env/env.manager.esm +69 -0
  150. package/dist/packages/env/index.cjs +1 -0
  151. package/dist/packages/env/index.d.ts +1 -0
  152. package/dist/packages/env/index.esm +2 -0
  153. package/dist/packages/flow/flow.renderer.cjs +1 -0
  154. package/dist/packages/flow/flow.renderer.d.ts +13 -0
  155. package/dist/packages/flow/flow.renderer.esm +50 -0
  156. package/dist/packages/flow/flow.types.cjs +0 -0
  157. package/dist/packages/flow/flow.types.d.ts +30 -0
  158. package/dist/packages/flow/flow.types.esm +0 -0
  159. package/dist/packages/formatters/qr-code/qr.encoder.service.cjs +1 -0
  160. package/dist/packages/formatters/qr-code/qr.encoder.service.d.ts +5 -0
  161. package/dist/packages/formatters/qr-code/qr.encoder.service.esm +17 -0
  162. package/dist/packages/formatters/qr-code/qr.renderer.cjs +1 -0
  163. package/dist/packages/formatters/qr-code/qr.renderer.d.ts +3 -0
  164. package/dist/packages/formatters/qr-code/qr.renderer.esm +16 -0
  165. package/dist/packages/formatters/text-code/text-coder.service.cjs +1 -0
  166. package/dist/packages/formatters/text-code/text-coder.service.d.ts +9 -0
  167. package/dist/packages/formatters/text-code/text-coder.service.esm +36 -0
  168. package/dist/packages/i18n/index.cjs +1 -0
  169. package/dist/packages/i18n/index.d.ts +10 -0
  170. package/dist/packages/i18n/index.esm +18 -0
  171. package/dist/packages/i18n/language-toggle.cjs +1 -0
  172. package/dist/packages/i18n/language-toggle.d.ts +9 -0
  173. package/dist/packages/i18n/language-toggle.esm +73 -0
  174. package/dist/packages/indexeddb/builder.cjs +1 -0
  175. package/dist/packages/indexeddb/builder.d.ts +13 -0
  176. package/dist/packages/indexeddb/builder.esm +35 -0
  177. package/dist/packages/indexeddb/index.cjs +1 -0
  178. package/dist/packages/indexeddb/index.d.ts +5 -0
  179. package/dist/packages/indexeddb/index.esm +5 -0
  180. package/dist/packages/indexeddb/indexeddb.service.cjs +1 -0
  181. package/dist/packages/indexeddb/indexeddb.service.d.ts +21 -0
  182. package/dist/packages/indexeddb/indexeddb.service.esm +59 -0
  183. package/dist/packages/indexeddb/nosql.repo.cjs +1 -0
  184. package/dist/packages/indexeddb/nosql.repo.d.ts +33 -0
  185. package/dist/packages/indexeddb/nosql.repo.esm +69 -0
  186. package/dist/packages/indexeddb/nosql.repo.service.cjs +1 -0
  187. package/dist/packages/indexeddb/nosql.repo.service.d.ts +46 -0
  188. package/dist/packages/indexeddb/nosql.repo.service.esm +87 -0
  189. package/dist/packages/indexeddb/registry.cjs +1 -0
  190. package/dist/packages/indexeddb/registry.d.ts +21 -0
  191. package/dist/packages/indexeddb/registry.esm +22 -0
  192. package/dist/packages/indexeddb/types.cjs +0 -0
  193. package/dist/packages/indexeddb/types.d.ts +33 -0
  194. package/dist/packages/indexeddb/types.esm +0 -0
  195. package/dist/packages/logger/index.cjs +1 -0
  196. package/dist/packages/logger/index.d.ts +2 -0
  197. package/dist/packages/logger/index.esm +3 -0
  198. package/dist/packages/logger/logger.cjs +1 -0
  199. package/dist/packages/logger/logger.d.ts +137 -0
  200. package/dist/packages/logger/logger.esm +186 -0
  201. package/dist/packages/logger/registry.cjs +1 -0
  202. package/dist/packages/logger/registry.d.ts +9 -0
  203. package/dist/packages/logger/registry.esm +17 -0
  204. package/dist/packages/maps/deckgl-overlay.cjs +1 -0
  205. package/dist/packages/maps/deckgl-overlay.d.ts +9 -0
  206. package/dist/packages/maps/deckgl-overlay.esm +12 -0
  207. package/dist/packages/maps/maps.renderer.cjs +1 -0
  208. package/dist/packages/maps/maps.renderer.d.ts +19 -0
  209. package/dist/packages/maps/maps.renderer.esm +25 -0
  210. package/dist/packages/maps/markers/marker.factory.cjs +1 -0
  211. package/dist/packages/maps/markers/marker.factory.d.ts +8 -0
  212. package/dist/packages/maps/markers/marker.factory.esm +58 -0
  213. package/dist/packages/maps/markers/marker.guard.cjs +1 -0
  214. package/dist/packages/maps/markers/marker.guard.d.ts +22 -0
  215. package/dist/packages/maps/markers/marker.guard.esm +37 -0
  216. package/dist/packages/maps/markers/markers.meta.cjs +0 -0
  217. package/dist/packages/maps/markers/markers.meta.d.ts +12 -0
  218. package/dist/packages/maps/markers/markers.meta.esm +0 -0
  219. package/dist/packages/maps/styles/dark.style.cjs +1 -0
  220. package/dist/packages/maps/styles/dark.style.d.ts +1 -0
  221. package/dist/packages/maps/styles/dark.style.esm +93 -0
  222. package/dist/packages/nfc/nfc.service.cjs +1 -0
  223. package/dist/packages/nfc/nfc.service.d.ts +41 -0
  224. package/dist/packages/nfc/nfc.service.esm +104 -0
  225. package/dist/packages/requests/axios/base.connector.cjs +1 -0
  226. package/dist/packages/requests/axios/base.connector.d.ts +37 -0
  227. package/dist/packages/requests/axios/base.connector.esm +25 -0
  228. package/dist/packages/requests/axios/base.service.cjs +1 -0
  229. package/dist/packages/requests/axios/base.service.d.ts +41 -0
  230. package/dist/packages/requests/axios/base.service.esm +11 -0
  231. package/dist/packages/requests/axios/interceptor.builder.cjs +1 -0
  232. package/dist/packages/requests/axios/interceptor.builder.d.ts +26 -0
  233. package/dist/packages/requests/axios/interceptor.builder.esm +20 -0
  234. package/dist/packages/router/build.router.cjs +1 -0
  235. package/dist/packages/router/build.router.d.ts +6 -0
  236. package/dist/packages/router/build.router.esm +9 -0
  237. package/dist/packages/router/route.builder.cjs +1 -0
  238. package/dist/packages/router/route.builder.d.ts +46 -0
  239. package/dist/packages/router/route.builder.esm +50 -0
  240. package/dist/packages/scanner/scanner.formats.cjs +1 -0
  241. package/dist/packages/scanner/scanner.formats.d.ts +51 -0
  242. package/dist/packages/scanner/scanner.formats.esm +96 -0
  243. package/dist/packages/scanner/scanner.service.cjs +1 -0
  244. package/dist/packages/scanner/scanner.service.d.ts +32 -0
  245. package/dist/packages/scanner/scanner.service.esm +32 -0
  246. package/dist/packages/sheets/index.cjs +1 -0
  247. package/dist/packages/sheets/index.d.ts +2 -0
  248. package/dist/packages/sheets/index.esm +3 -0
  249. package/dist/packages/sheets/sheets.connector.cjs +1 -0
  250. package/dist/packages/sheets/sheets.connector.d.ts +6 -0
  251. package/dist/packages/sheets/sheets.connector.esm +21 -0
  252. package/dist/packages/sheets/sheets.service.cjs +1 -0
  253. package/dist/packages/sheets/sheets.service.d.ts +21 -0
  254. package/dist/packages/sheets/sheets.service.esm +38 -0
  255. package/dist/packages/sqlite/base/base.entity.cjs +1 -0
  256. package/dist/packages/sqlite/base/base.entity.d.ts +5 -0
  257. package/dist/packages/sqlite/base/base.entity.esm +41 -0
  258. package/dist/packages/sqlite/repo.service.cjs +1 -0
  259. package/dist/packages/sqlite/repo.service.d.ts +22 -0
  260. package/dist/packages/sqlite/repo.service.esm +52 -0
  261. package/dist/packages/sqlite/sqlite.service.cjs +1 -0
  262. package/dist/packages/sqlite/sqlite.service.d.ts +40 -0
  263. package/dist/packages/sqlite/sqlite.service.esm +77 -0
  264. package/dist/packages/sqlite/templates/test.entity.cjs +1 -0
  265. package/dist/packages/sqlite/templates/test.entity.d.ts +6 -0
  266. package/dist/packages/sqlite/templates/test.entity.esm +62 -0
  267. package/dist/packages/sqlite/templates/test.repo.service.cjs +1 -0
  268. package/dist/packages/sqlite/templates/test.repo.service.d.ts +8 -0
  269. package/dist/packages/sqlite/templates/test.repo.service.esm +26 -0
  270. package/dist/packages/stores/storage.service.cjs +1 -0
  271. package/dist/packages/stores/storage.service.d.ts +5 -0
  272. package/dist/packages/stores/storage.service.esm +22 -0
  273. package/dist/packages/stores/store.hook.cjs +1 -0
  274. package/dist/packages/stores/store.hook.d.ts +23 -0
  275. package/dist/packages/stores/store.hook.esm +22 -0
  276. package/dist/packages/stores/store.service.cjs +1 -0
  277. package/dist/packages/stores/store.service.d.ts +12 -0
  278. package/dist/packages/stores/store.service.esm +48 -0
  279. package/dist/packages/theme/theme-builder.cjs +1 -0
  280. package/dist/packages/theme/theme-builder.d.ts +19 -0
  281. package/dist/packages/theme/theme-builder.esm +25 -0
  282. package/dist/packages/theme/theme-provider.cjs +1 -0
  283. package/dist/packages/theme/theme-provider.d.ts +7 -0
  284. package/dist/packages/theme/theme-provider.esm +17 -0
  285. package/dist/packages/theme/theme-toggle.cjs +1 -0
  286. package/dist/packages/theme/theme-toggle.d.ts +6 -0
  287. package/dist/packages/theme/theme-toggle.esm +33 -0
  288. package/dist/packages/w3/tron/index.cjs +1 -0
  289. package/dist/packages/w3/tron/index.d.ts +4 -0
  290. package/dist/packages/w3/tron/index.esm +4 -0
  291. package/dist/packages/w3/tron/tron-assets.service.cjs +1 -0
  292. package/dist/packages/w3/tron/tron-assets.service.d.ts +38 -0
  293. package/dist/packages/w3/tron/tron-assets.service.esm +116 -0
  294. package/dist/packages/w3/tron/tron-wallet.entity.cjs +1 -0
  295. package/dist/packages/w3/tron/tron-wallet.entity.d.ts +15 -0
  296. package/dist/packages/w3/tron/tron-wallet.entity.esm +88 -0
  297. package/dist/packages/w3/tron/tron-wallet.repo.cjs +1 -0
  298. package/dist/packages/w3/tron/tron-wallet.repo.d.ts +30 -0
  299. package/dist/packages/w3/tron/tron-wallet.repo.esm +52 -0
  300. package/dist/packages/w3/tron/tron.service.cjs +1 -0
  301. package/dist/packages/w3/tron/tron.service.d.ts +124 -0
  302. package/dist/packages/w3/tron/tron.service.esm +406 -0
  303. package/dist/packages/w3/tron/tron.types.cjs +0 -0
  304. package/dist/packages/w3/tron/tron.types.d.ts +129 -0
  305. package/dist/packages/w3/tron/tron.types.esm +0 -0
  306. package/dist/page-container.d.ts +2 -0
  307. package/dist/popover.d.ts +2 -0
  308. package/dist/qr.encoder.service.d.ts +4 -0
  309. package/dist/qr.renderer.d.ts +4 -0
  310. package/dist/registry.d.ts +2 -0
  311. package/dist/repo.service.d.ts +4 -0
  312. package/dist/repository.contract.d.ts +1 -0
  313. package/dist/route.builder.d.ts +4 -0
  314. package/dist/scanner.formats.d.ts +2 -0
  315. package/dist/scanner.service.d.ts +2 -0
  316. package/dist/scroll-area.d.ts +2 -0
  317. package/dist/secret.input.d.ts +4 -0
  318. package/dist/select.d.ts +2 -0
  319. package/dist/select.input.d.ts +4 -0
  320. package/dist/separator.d.ts +2 -0
  321. package/dist/shared/assets/social-icons.cjs +1 -0
  322. package/dist/shared/assets/social-icons.d.ts +2 -0
  323. package/dist/shared/assets/social-icons.esm +30 -0
  324. package/dist/shared/constants/connectors/main.connector.cjs +1 -0
  325. package/dist/shared/constants/connectors/main.connector.d.ts +8 -0
  326. package/dist/shared/constants/connectors/main.connector.esm +38 -0
  327. package/dist/shared/constants/services/main.service.cjs +1 -0
  328. package/dist/shared/constants/services/main.service.d.ts +7 -0
  329. package/dist/shared/constants/services/main.service.esm +26 -0
  330. package/dist/shared/contracts/repository.contract.cjs +0 -0
  331. package/dist/shared/contracts/repository.contract.d.ts +26 -0
  332. package/dist/shared/contracts/repository.contract.esm +0 -0
  333. package/dist/shared/custom/actions/back-button.action.cjs +1 -0
  334. package/dist/shared/custom/actions/back-button.action.d.ts +13 -0
  335. package/dist/shared/custom/actions/back-button.action.esm +20 -0
  336. package/dist/shared/custom/audit/audit-view.cjs +1 -0
  337. package/dist/shared/custom/audit/audit-view.d.ts +46 -0
  338. package/dist/shared/custom/audit/audit-view.esm +73 -0
  339. package/dist/shared/custom/confirm/use-confirm.cjs +1 -0
  340. package/dist/shared/custom/confirm/use-confirm.d.ts +15 -0
  341. package/dist/shared/custom/confirm/use-confirm.esm +57 -0
  342. package/dist/shared/custom/data-table/data-table.component.cjs +1 -0
  343. package/dist/shared/custom/data-table/data-table.component.d.ts +9 -0
  344. package/dist/shared/custom/data-table/data-table.component.esm +26 -0
  345. package/dist/shared/custom/data-table/data-table.provider.cjs +0 -0
  346. package/dist/shared/custom/data-table/data-table.provider.d.ts +1 -0
  347. package/dist/shared/custom/data-table/data-table.provider.esm +0 -0
  348. package/dist/shared/custom/flow/flow-canvas.cjs +1 -0
  349. package/dist/shared/custom/flow/flow-canvas.d.ts +10 -0
  350. package/dist/shared/custom/flow/flow-canvas.esm +23 -0
  351. package/dist/shared/custom/flow/nodes/base.node.cjs +1 -0
  352. package/dist/shared/custom/flow/nodes/base.node.d.ts +9 -0
  353. package/dist/shared/custom/flow/nodes/base.node.esm +51 -0
  354. package/dist/shared/custom/form/form.component.cjs +1 -0
  355. package/dist/shared/custom/form/form.component.d.ts +13 -0
  356. package/dist/shared/custom/form/form.component.esm +26 -0
  357. package/dist/shared/custom/form/index.cjs +1 -0
  358. package/dist/shared/custom/form/index.d.ts +17 -0
  359. package/dist/shared/custom/form/index.esm +2 -0
  360. package/dist/shared/custom/form/inputs/async-combobox.input.cjs +1 -0
  361. package/dist/shared/custom/form/inputs/async-combobox.input.d.ts +18 -0
  362. package/dist/shared/custom/form/inputs/async-combobox.input.esm +91 -0
  363. package/dist/shared/custom/form/inputs/async-multi-select.input.cjs +1 -0
  364. package/dist/shared/custom/form/inputs/async-multi-select.input.d.ts +20 -0
  365. package/dist/shared/custom/form/inputs/async-multi-select.input.esm +127 -0
  366. package/dist/shared/custom/form/inputs/async-select.input.cjs +1 -0
  367. package/dist/shared/custom/form/inputs/async-select.input.d.ts +15 -0
  368. package/dist/shared/custom/form/inputs/async-select.input.esm +71 -0
  369. package/dist/shared/custom/form/inputs/checkbox-inline.input.cjs +1 -0
  370. package/dist/shared/custom/form/inputs/checkbox-inline.input.d.ts +15 -0
  371. package/dist/shared/custom/form/inputs/checkbox-inline.input.esm +41 -0
  372. package/dist/shared/custom/form/inputs/checkbox.input.cjs +1 -0
  373. package/dist/shared/custom/form/inputs/checkbox.input.d.ts +21 -0
  374. package/dist/shared/custom/form/inputs/checkbox.input.esm +50 -0
  375. package/dist/shared/custom/form/inputs/code.input.cjs +1 -0
  376. package/dist/shared/custom/form/inputs/code.input.d.ts +11 -0
  377. package/dist/shared/custom/form/inputs/code.input.esm +58 -0
  378. package/dist/shared/custom/form/inputs/color.input.cjs +1 -0
  379. package/dist/shared/custom/form/inputs/color.input.d.ts +11 -0
  380. package/dist/shared/custom/form/inputs/color.input.esm +47 -0
  381. package/dist/shared/custom/form/inputs/combobox.input.cjs +1 -0
  382. package/dist/shared/custom/form/inputs/combobox.input.d.ts +18 -0
  383. package/dist/shared/custom/form/inputs/combobox.input.esm +73 -0
  384. package/dist/shared/custom/form/inputs/date.input.cjs +1 -0
  385. package/dist/shared/custom/form/inputs/date.input.d.ts +11 -0
  386. package/dist/shared/custom/form/inputs/date.input.esm +52 -0
  387. package/dist/shared/custom/form/inputs/email.input.cjs +1 -0
  388. package/dist/shared/custom/form/inputs/email.input.d.ts +12 -0
  389. package/dist/shared/custom/form/inputs/email.input.esm +47 -0
  390. package/dist/shared/custom/form/inputs/file.input.cjs +1 -0
  391. package/dist/shared/custom/form/inputs/file.input.d.ts +11 -0
  392. package/dist/shared/custom/form/inputs/file.input.esm +95 -0
  393. package/dist/shared/custom/form/inputs/image.input.cjs +1 -0
  394. package/dist/shared/custom/form/inputs/image.input.d.ts +11 -0
  395. package/dist/shared/custom/form/inputs/image.input.esm +90 -0
  396. package/dist/shared/custom/form/inputs/list-select.input.cjs +1 -0
  397. package/dist/shared/custom/form/inputs/list-select.input.d.ts +17 -0
  398. package/dist/shared/custom/form/inputs/list-select.input.esm +53 -0
  399. package/dist/shared/custom/form/inputs/secret.input.cjs +1 -0
  400. package/dist/shared/custom/form/inputs/secret.input.d.ts +11 -0
  401. package/dist/shared/custom/form/inputs/secret.input.esm +53 -0
  402. package/dist/shared/custom/form/inputs/select.input.cjs +1 -0
  403. package/dist/shared/custom/form/inputs/select.input.d.ts +17 -0
  404. package/dist/shared/custom/form/inputs/select.input.esm +44 -0
  405. package/dist/shared/custom/form/inputs/tags.input.cjs +1 -0
  406. package/dist/shared/custom/form/inputs/tags.input.d.ts +16 -0
  407. package/dist/shared/custom/form/inputs/tags.input.esm +80 -0
  408. package/dist/shared/custom/form/inputs/text.input.cjs +1 -0
  409. package/dist/shared/custom/form/inputs/text.input.d.ts +13 -0
  410. package/dist/shared/custom/form/inputs/text.input.esm +47 -0
  411. package/dist/shared/custom/form/inputs/textarea.input.cjs +1 -0
  412. package/dist/shared/custom/form/inputs/textarea.input.d.ts +12 -0
  413. package/dist/shared/custom/form/inputs/textarea.input.esm +36 -0
  414. package/dist/shared/custom/form/layout/form-dialog-layout.cjs +1 -0
  415. package/dist/shared/custom/form/layout/form-dialog-layout.d.ts +25 -0
  416. package/dist/shared/custom/form/layout/form-dialog-layout.esm +37 -0
  417. package/dist/shared/custom/form/layout/form-tab-layout.cjs +1 -0
  418. package/dist/shared/custom/form/layout/form-tab-layout.d.ts +30 -0
  419. package/dist/shared/custom/form/layout/form-tab-layout.esm +69 -0
  420. package/dist/shared/custom/hover/hover.cjs +1 -0
  421. package/dist/shared/custom/hover/hover.d.ts +6 -0
  422. package/dist/shared/custom/hover/hover.esm +20 -0
  423. package/dist/shared/custom/layouts/canvas-view.layout.cjs +1 -0
  424. package/dist/shared/custom/layouts/canvas-view.layout.d.ts +18 -0
  425. package/dist/shared/custom/layouts/canvas-view.layout.esm +15 -0
  426. package/dist/shared/custom/layouts/detail-tabs.layout.cjs +1 -0
  427. package/dist/shared/custom/layouts/detail-tabs.layout.d.ts +27 -0
  428. package/dist/shared/custom/layouts/detail-tabs.layout.esm +32 -0
  429. package/dist/shared/custom/layouts/detail-view.layout.cjs +1 -0
  430. package/dist/shared/custom/layouts/detail-view.layout.d.ts +33 -0
  431. package/dist/shared/custom/layouts/detail-view.layout.esm +64 -0
  432. package/dist/shared/custom/layouts/feedback.layout.cjs +1 -0
  433. package/dist/shared/custom/layouts/feedback.layout.d.ts +14 -0
  434. package/dist/shared/custom/layouts/feedback.layout.esm +20 -0
  435. package/dist/shared/custom/layouts/grid.layout.cjs +1 -0
  436. package/dist/shared/custom/layouts/grid.layout.d.ts +38 -0
  437. package/dist/shared/custom/layouts/grid.layout.esm +39 -0
  438. package/dist/shared/custom/layouts/page-container.cjs +1 -0
  439. package/dist/shared/custom/layouts/page-container.d.ts +6 -0
  440. package/dist/shared/custom/layouts/page-container.esm +12 -0
  441. package/dist/shared/custom/ui/icon-box.cjs +1 -0
  442. package/dist/shared/custom/ui/icon-box.d.ts +12 -0
  443. package/dist/shared/custom/ui/icon-box.esm +21 -0
  444. package/dist/shared/custom/ui/typography.cjs +1 -0
  445. package/dist/shared/custom/ui/typography.d.ts +11 -0
  446. package/dist/shared/custom/ui/typography.esm +30 -0
  447. package/dist/shared/hooks/use-device.cjs +1 -0
  448. package/dist/shared/hooks/use-device.d.ts +10 -0
  449. package/dist/shared/hooks/use-device.esm +37 -0
  450. package/dist/shared/hooks/use-i18n.cjs +1 -0
  451. package/dist/shared/hooks/use-i18n.d.ts +10 -0
  452. package/dist/shared/hooks/use-i18n.esm +15 -0
  453. package/dist/shared/hooks/use-mobile.cjs +1 -0
  454. package/dist/shared/hooks/use-mobile.d.ts +1 -0
  455. package/dist/shared/hooks/use-mobile.esm +14 -0
  456. package/dist/shared/lib/utils.cjs +1 -0
  457. package/dist/shared/lib/utils.d.ts +2 -0
  458. package/dist/shared/lib/utils.esm +8 -0
  459. package/dist/shared/logic/action/action-processor.cjs +1 -0
  460. package/dist/shared/logic/action/action-processor.d.ts +86 -0
  461. package/dist/shared/logic/action/action-processor.esm +30 -0
  462. package/dist/shared/logic/components/components.registry.cjs +1 -0
  463. package/dist/shared/logic/components/components.registry.d.ts +16 -0
  464. package/dist/shared/logic/components/components.registry.esm +26 -0
  465. package/dist/shared/logic/events/startable.cjs +1 -0
  466. package/dist/shared/logic/events/startable.d.ts +7 -0
  467. package/dist/shared/logic/events/startable.esm +32 -0
  468. package/dist/shared/logic/events/use-on-start.hook.cjs +1 -0
  469. package/dist/shared/logic/events/use-on-start.hook.d.ts +12 -0
  470. package/dist/shared/logic/events/use-on-start.hook.esm +15 -0
  471. package/dist/shared/logic/factory/component.factory.cjs +1 -0
  472. package/dist/shared/logic/factory/component.factory.d.ts +9 -0
  473. package/dist/shared/logic/factory/component.factory.esm +28 -0
  474. package/dist/shared/logic/guards/builder-device.guard.cjs +1 -0
  475. package/dist/shared/logic/guards/builder-device.guard.d.ts +5 -0
  476. package/dist/shared/logic/guards/builder-device.guard.esm +10 -0
  477. package/dist/shared/logic/guards/component.guard.cjs +1 -0
  478. package/dist/shared/logic/guards/component.guard.d.ts +5 -0
  479. package/dist/shared/logic/guards/component.guard.esm +13 -0
  480. package/dist/shared/logic/guards/context.guard.cjs +1 -0
  481. package/dist/shared/logic/guards/context.guard.d.ts +13 -0
  482. package/dist/shared/logic/guards/context.guard.esm +9 -0
  483. package/dist/shared/logic/guards/device-artifact.guard.cjs +1 -0
  484. package/dist/shared/logic/guards/device-artifact.guard.d.ts +16 -0
  485. package/dist/shared/logic/guards/device-artifact.guard.esm +44 -0
  486. package/dist/shared/logic/guards/device.guard.cjs +1 -0
  487. package/dist/shared/logic/guards/device.guard.d.ts +17 -0
  488. package/dist/shared/logic/guards/device.guard.esm +40 -0
  489. package/dist/shared/logic/guards/dynamic-device.guard.cjs +1 -0
  490. package/dist/shared/logic/guards/dynamic-device.guard.d.ts +5 -0
  491. package/dist/shared/logic/guards/dynamic-device.guard.esm +10 -0
  492. package/dist/shared/logic/guards/guard.cjs +1 -0
  493. package/dist/shared/logic/guards/guard.d.ts +24 -0
  494. package/dist/shared/logic/guards/guard.esm +18 -0
  495. package/dist/shared/logic/service/base.service.cjs +1 -0
  496. package/dist/shared/logic/service/base.service.d.ts +3 -0
  497. package/dist/shared/logic/service/base.service.esm +5 -0
  498. package/dist/shared/logic/verifiers/context.verifier.cjs +1 -0
  499. package/dist/shared/logic/verifiers/context.verifier.d.ts +7 -0
  500. package/dist/shared/logic/verifiers/context.verifier.esm +31 -0
  501. package/dist/shared/logic/verifiers/device.verifier.registry.cjs +1 -0
  502. package/dist/shared/logic/verifiers/device.verifier.registry.d.ts +13 -0
  503. package/dist/shared/logic/verifiers/device.verifier.registry.esm +36 -0
  504. package/dist/shared/logic/verifiers/enum.verifier.cjs +1 -0
  505. package/dist/shared/logic/verifiers/enum.verifier.d.ts +4 -0
  506. package/dist/shared/logic/verifiers/enum.verifier.esm +9 -0
  507. package/dist/shared/logic/verifiers/value.verifier.cjs +1 -0
  508. package/dist/shared/logic/verifiers/value.verifier.d.ts +5 -0
  509. package/dist/shared/logic/verifiers/value.verifier.esm +9 -0
  510. package/dist/shared/ui/badge.cjs +1 -0
  511. package/dist/shared/ui/badge.d.ts +9 -0
  512. package/dist/shared/ui/badge.esm +27 -0
  513. package/dist/shared/ui/breadcrumb.cjs +1 -0
  514. package/dist/shared/ui/breadcrumb.d.ts +11 -0
  515. package/dist/shared/ui/breadcrumb.esm +70 -0
  516. package/dist/shared/ui/button.cjs +1 -0
  517. package/dist/shared/ui/button.d.ts +11 -0
  518. package/dist/shared/ui/button.esm +47 -0
  519. package/dist/shared/ui/calendar.cjs +1 -0
  520. package/dist/shared/ui/calendar.d.ts +10 -0
  521. package/dist/shared/ui/calendar.esm +92 -0
  522. package/dist/shared/ui/card.cjs +1 -0
  523. package/dist/shared/ui/card.d.ts +11 -0
  524. package/dist/shared/ui/card.esm +56 -0
  525. package/dist/shared/ui/checkbox.cjs +1 -0
  526. package/dist/shared/ui/checkbox.d.ts +4 -0
  527. package/dist/shared/ui/checkbox.esm +20 -0
  528. package/dist/shared/ui/combobox.cjs +1 -0
  529. package/dist/shared/ui/combobox.d.ts +24 -0
  530. package/dist/shared/ui/combobox.esm +163 -0
  531. package/dist/shared/ui/command.cjs +1 -0
  532. package/dist/shared/ui/command.d.ts +18 -0
  533. package/dist/shared/ui/command.esm +87 -0
  534. package/dist/shared/ui/custom/dynamic-icon.cjs +1 -0
  535. package/dist/shared/ui/custom/dynamic-icon.d.ts +13 -0
  536. package/dist/shared/ui/custom/dynamic-icon.esm +15 -0
  537. package/dist/shared/ui/dialog.cjs +1 -0
  538. package/dist/shared/ui/dialog.d.ts +17 -0
  539. package/dist/shared/ui/dialog.esm +95 -0
  540. package/dist/shared/ui/field.cjs +1 -0
  541. package/dist/shared/ui/field.d.ts +24 -0
  542. package/dist/shared/ui/field.esm +107 -0
  543. package/dist/shared/ui/icon-button.cjs +1 -0
  544. package/dist/shared/ui/icon-button.d.ts +6 -0
  545. package/dist/shared/ui/icon-button.esm +14 -0
  546. package/dist/shared/ui/index.cjs +1 -0
  547. package/dist/shared/ui/index.d.ts +23 -0
  548. package/dist/shared/ui/index.esm +24 -0
  549. package/dist/shared/ui/input-group.cjs +1 -0
  550. package/dist/shared/ui/input-group.d.ts +16 -0
  551. package/dist/shared/ui/input-group.esm +77 -0
  552. package/dist/shared/ui/input.cjs +1 -0
  553. package/dist/shared/ui/input.d.ts +3 -0
  554. package/dist/shared/ui/input.esm +14 -0
  555. package/dist/shared/ui/label.cjs +1 -0
  556. package/dist/shared/ui/label.d.ts +4 -0
  557. package/dist/shared/ui/label.esm +14 -0
  558. package/dist/shared/ui/popover.cjs +1 -0
  559. package/dist/shared/ui/popover.d.ts +7 -0
  560. package/dist/shared/ui/popover.esm +35 -0
  561. package/dist/shared/ui/scroll-area.cjs +1 -0
  562. package/dist/shared/ui/scroll-area.d.ts +5 -0
  563. package/dist/shared/ui/scroll-area.esm +36 -0
  564. package/dist/shared/ui/select.cjs +1 -0
  565. package/dist/shared/ui/select.d.ts +15 -0
  566. package/dist/shared/ui/select.esm +99 -0
  567. package/dist/shared/ui/separator.cjs +1 -0
  568. package/dist/shared/ui/separator.d.ts +4 -0
  569. package/dist/shared/ui/separator.esm +16 -0
  570. package/dist/shared/ui/sheet.cjs +1 -0
  571. package/dist/shared/ui/sheet.d.ts +14 -0
  572. package/dist/shared/ui/sheet.esm +89 -0
  573. package/dist/shared/ui/sidebar.cjs +1 -0
  574. package/dist/shared/ui/sidebar.d.ts +69 -0
  575. package/dist/shared/ui/sidebar.esm +348 -0
  576. package/dist/shared/ui/skeleton.cjs +1 -0
  577. package/dist/shared/ui/skeleton.d.ts +2 -0
  578. package/dist/shared/ui/skeleton.esm +12 -0
  579. package/dist/shared/ui/sonner.cjs +1 -0
  580. package/dist/shared/ui/sonner.d.ts +3 -0
  581. package/dist/shared/ui/sonner.esm +29 -0
  582. package/dist/shared/ui/table.cjs +1 -0
  583. package/dist/shared/ui/table.d.ts +10 -0
  584. package/dist/shared/ui/table.esm +66 -0
  585. package/dist/shared/ui/tabs.cjs +1 -0
  586. package/dist/shared/ui/tabs.d.ts +11 -0
  587. package/dist/shared/ui/tabs.esm +45 -0
  588. package/dist/shared/ui/textarea.cjs +1 -0
  589. package/dist/shared/ui/textarea.d.ts +3 -0
  590. package/dist/shared/ui/textarea.esm +13 -0
  591. package/dist/shared/ui/tooltip.cjs +1 -0
  592. package/dist/shared/ui/tooltip.d.ts +7 -0
  593. package/dist/shared/ui/tooltip.esm +36 -0
  594. package/dist/sheet.d.ts +2 -0
  595. package/dist/sheets.connector.d.ts +2 -0
  596. package/dist/sheets.service.d.ts +2 -0
  597. package/dist/sidebar.d.ts +2 -0
  598. package/dist/skeleton.d.ts +2 -0
  599. package/dist/social-icons.d.ts +2 -0
  600. package/dist/sonner.d.ts +2 -0
  601. package/dist/sortable.d.ts +2 -0
  602. package/dist/sqlite.service.d.ts +6 -0
  603. package/dist/startable.d.ts +4 -0
  604. package/dist/storage.service.d.ts +4 -0
  605. package/dist/store.hook.d.ts +4 -0
  606. package/dist/store.service.d.ts +4 -0
  607. package/dist/table.d.ts +2 -0
  608. package/dist/tabs.d.ts +2 -0
  609. package/dist/tags.input.d.ts +4 -0
  610. package/dist/test.entity.d.ts +2 -0
  611. package/dist/test.repo.service.d.ts +6 -0
  612. package/dist/text-coder.service.d.ts +2 -0
  613. package/dist/text.input.d.ts +4 -0
  614. package/dist/textarea.d.ts +2 -0
  615. package/dist/textarea.input.d.ts +4 -0
  616. package/dist/theme-builder.d.ts +2 -0
  617. package/dist/theme-provider.d.ts +2 -0
  618. package/dist/theme-toggle.d.ts +2 -0
  619. package/dist/tooltip.d.ts +2 -0
  620. package/dist/tron-assets.service.d.ts +2 -0
  621. package/dist/tron-wallet.entity.d.ts +2 -0
  622. package/dist/tron-wallet.repo.d.ts +2 -0
  623. package/dist/tron.service.d.ts +2 -0
  624. package/dist/tron.types.d.ts +1 -0
  625. package/dist/types.d.ts +1 -0
  626. package/dist/typography.d.ts +2 -0
  627. package/dist/use-confirm.d.ts +2 -0
  628. package/dist/use-device.d.ts +2 -0
  629. package/dist/use-i18n.d.ts +2 -0
  630. package/dist/use-mobile.d.ts +2 -0
  631. package/dist/use-on-start.hook.d.ts +2 -0
  632. package/dist/utils.d.ts +2 -0
  633. package/dist/value.verifier.d.ts +4 -0
  634. package/package.json +155 -0
@@ -0,0 +1,35 @@
1
+ import { INDEXEDDB_REGISTRY as e } from "./registry.esm";
2
+ //#region src/packages/indexeddb/builder.ts
3
+ var t = class {
4
+ constructor(e) {
5
+ this.config = void 0, this.config = {
6
+ name: e,
7
+ keyPath: "id",
8
+ autoIncrement: !1,
9
+ indexes: []
10
+ };
11
+ }
12
+ setKeyPath(e) {
13
+ return this.config.keyPath = e, this;
14
+ }
15
+ setAutoIncrement(e = !0) {
16
+ return this.config.autoIncrement = e, this;
17
+ }
18
+ addIndex(e, t, n) {
19
+ let r = {
20
+ name: e,
21
+ keyPath: t,
22
+ unique: n?.unique ?? !1,
23
+ multiEntry: n?.multiEntry ?? !1
24
+ };
25
+ return this.config.indexes?.push(r), this;
26
+ }
27
+ build() {
28
+ return { ...this.config };
29
+ }
30
+ register() {
31
+ return e.register(this.build());
32
+ }
33
+ };
34
+ //#endregion
35
+ export { t as StoreBuilder };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./registry.cjs`),t=require(`./builder.cjs`),n=require(`./nosql.repo.cjs`),r=require(`./indexeddb.service.cjs`);exports.INDEXEDDB_REGISTRY=e.INDEXEDDB_REGISTRY,exports.INDEXEDDB_SERVICE=r.INDEXEDDB_SERVICE,exports.IndexedDbService=r,exports.NoSqlRepository=n.NoSqlRepository,exports.StoreBuilder=t.StoreBuilder;
@@ -0,0 +1,5 @@
1
+ export { default as IndexedDbService, INDEXEDDB_SERVICE } from './indexeddb.service';
2
+ export * from './nosql.repo';
3
+ export * from './types';
4
+ export * from './builder';
5
+ export * from './registry';
@@ -0,0 +1,5 @@
1
+ import { INDEXEDDB_REGISTRY as e } from "./registry.esm";
2
+ import { StoreBuilder as t } from "./builder.esm";
3
+ import { NoSqlRepository as n } from "./nosql.repo.esm";
4
+ import r, { INDEXEDDB_SERVICE as i } from "./indexeddb.service.esm";
5
+ export { e as INDEXEDDB_REGISTRY, i as INDEXEDDB_SERVICE, r as IndexedDbService, n as NoSqlRepository, t as StoreBuilder };
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../shared/logic/service/base.service.cjs`),t=require(`../logger/logger.cjs`),n=require(`./nosql.repo.cjs`);let r=require(`sonner`);var i=t.GLOBAL_LOGGER.child(`[IndexedDB]`),a=class t extends e{constructor(){super(),this._db=null,this._config=null,i.debug(`Initializing IndexedDB Service...`)}static get instance(){return this._instance||=new t,this._instance}async initialize(e){return i.info(`Starting initialization for Database "${e.name}" (v${e.version})...`),this._config=e,new Promise((t,n)=>{let a=indexedDB.open(e.name,e.version);a.onupgradeneeded=t=>{let n=t.target.result,r=t.oldVersion,a=t.newVersion;i.info(`Upgrading Database "${e.name}" from v${r} to v${a}`),e.stores.forEach(e=>{if(!n.objectStoreNames.contains(e.name)){i.debug(`Creating object store: ${e.name}`);let t=n.createObjectStore(e.name,{keyPath:e.keyPath,autoIncrement:e.autoIncrement??!1});e.indexes?.forEach(n=>{i.debug(`- Creating index: ${n.name} for ${e.name}`),t.createIndex(n.name,n.keyPath,{unique:n.unique??!1,multiEntry:n.multiEntry??!1})})}})},a.onsuccess=n=>{this._db=n.target.result,i.info(`Database "${e.name}" connected successfully (v${this._db.version})`),this._db.onversionchange=()=>{this._db?.close(),i.warn(`Database version changed in another tab. Closing connection to allow upgrade.`),window.location.reload()},this.setReady(),t()},a.onblocked=()=>{i.warn(`Upgrade blocked! Please close other tabs of "${e.name}" to allow version upgrade.`),r.toast.warning(`Actualización bloqueada`,{description:`Por favor, cierra otras pestañas de la aplicación para completar la migración de datos.`})},a.onerror=t=>{let r=t.target.error;i.error(`Failed to connect to Database "${e.name}"`,r),n(r)}})}getRepository(e){return new n.NoSqlRepository(e)}get db(){if(!this._db)throw Error(`Database not initialized`);return this._db}get config(){return this._config}};a._instance=void 0;var o=a.instance;exports.INDEXEDDB_SERVICE=o,exports.default=a;
@@ -0,0 +1,21 @@
1
+ import { default as BaseService } from '../../shared/logic/service/base.service';
2
+ import { DatabaseConfig } from './types';
3
+ import { NoSqlRepository } from './nosql.repo';
4
+ export default class IndexedDbService extends BaseService {
5
+ private _db;
6
+ private _config;
7
+ private constructor();
8
+ private static _instance;
9
+ static get instance(): IndexedDbService;
10
+ /**
11
+ * Initializes the database connection
12
+ */
13
+ initialize(config: DatabaseConfig): Promise<void>;
14
+ /**
15
+ * Gets a repository for a specific object store
16
+ */
17
+ getRepository<T>(storeName: string): NoSqlRepository<T>;
18
+ get db(): IDBDatabase;
19
+ get config(): DatabaseConfig | null;
20
+ }
21
+ export declare const INDEXEDDB_SERVICE: IndexedDbService;
@@ -0,0 +1,59 @@
1
+ import e from "../../shared/logic/service/base.service.esm";
2
+ import { GLOBAL_LOGGER as t } from "../logger/logger.esm";
3
+ import { NoSqlRepository as n } from "./nosql.repo.esm";
4
+ import { toast as r } from "sonner";
5
+ //#region src/packages/indexeddb/indexeddb.service.ts
6
+ var i = t.child("[IndexedDB]"), a = class t extends e {
7
+ constructor() {
8
+ super(), this._db = null, this._config = null, i.debug("Initializing IndexedDB Service...");
9
+ }
10
+ static get instance() {
11
+ return this._instance ||= new t(), this._instance;
12
+ }
13
+ async initialize(e) {
14
+ return i.info(`Starting initialization for Database "${e.name}" (v${e.version})...`), this._config = e, new Promise((t, n) => {
15
+ let a = indexedDB.open(e.name, e.version);
16
+ a.onupgradeneeded = (t) => {
17
+ let n = t.target.result, r = t.oldVersion, a = t.newVersion;
18
+ i.info(`Upgrading Database "${e.name}" from v${r} to v${a}`), e.stores.forEach((e) => {
19
+ if (!n.objectStoreNames.contains(e.name)) {
20
+ i.debug(`Creating object store: ${e.name}`);
21
+ let t = n.createObjectStore(e.name, {
22
+ keyPath: e.keyPath,
23
+ autoIncrement: e.autoIncrement ?? !1
24
+ });
25
+ e.indexes?.forEach((n) => {
26
+ i.debug(`- Creating index: ${n.name} for ${e.name}`), t.createIndex(n.name, n.keyPath, {
27
+ unique: n.unique ?? !1,
28
+ multiEntry: n.multiEntry ?? !1
29
+ });
30
+ });
31
+ }
32
+ });
33
+ }, a.onsuccess = (n) => {
34
+ this._db = n.target.result, i.info(`Database "${e.name}" connected successfully (v${this._db.version})`), this._db.onversionchange = () => {
35
+ this._db?.close(), i.warn("Database version changed in another tab. Closing connection to allow upgrade."), window.location.reload();
36
+ }, this.setReady(), t();
37
+ }, a.onblocked = () => {
38
+ i.warn(`Upgrade blocked! Please close other tabs of "${e.name}" to allow version upgrade.`), r.warning("Actualización bloqueada", { description: "Por favor, cierra otras pestañas de la aplicación para completar la migración de datos." });
39
+ }, a.onerror = (t) => {
40
+ let r = t.target.error;
41
+ i.error(`Failed to connect to Database "${e.name}"`, r), n(r);
42
+ };
43
+ });
44
+ }
45
+ getRepository(e) {
46
+ return new n(e);
47
+ }
48
+ get db() {
49
+ if (!this._db) throw Error("Database not initialized");
50
+ return this._db;
51
+ }
52
+ get config() {
53
+ return this._config;
54
+ }
55
+ };
56
+ a._instance = void 0;
57
+ var o = a.instance;
58
+ //#endregion
59
+ export { o as INDEXEDDB_SERVICE, a as default };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../logger/logger.cjs`),t=require(`./indexeddb.service.cjs`);var n=e.GLOBAL_LOGGER.child(`[NoSqlRepo]`),r=class{constructor(e){this.storeName=e}get db(){return t.INDEXEDDB_SERVICE.db}async save(e){return new Promise((t,r)=>{let i=this.db.transaction([this.storeName],`readwrite`).objectStore(this.storeName).put(e);i.onsuccess=()=>t(e),i.onerror=()=>{n.error(`Error saving item in ${this.storeName}`,i.error),r(i.error)}})}async get(e){return new Promise((t,r)=>{let i=this.db.transaction([this.storeName],`readonly`).objectStore(this.storeName).get(e);i.onsuccess=()=>t(i.result||null),i.onerror=()=>{n.error(`Error getting item ${e} from ${this.storeName}`,i.error),r(i.error)}})}async getAll(){return new Promise((e,t)=>{let r=this.db.transaction([this.storeName],`readonly`).objectStore(this.storeName).getAll();r.onsuccess=()=>e(r.result),r.onerror=()=>{n.error(`Error getting all items from ${this.storeName}`,r.error),t(r.error)}})}async delete(e){return new Promise((t,r)=>{let i=this.db.transaction([this.storeName],`readwrite`).objectStore(this.storeName).delete(e);i.onsuccess=()=>t(),i.onerror=()=>{n.error(`Error deleting item ${e} from ${this.storeName}`,i.error),r(i.error)}})}async clear(){return new Promise((e,t)=>{let r=this.db.transaction([this.storeName],`readwrite`).objectStore(this.storeName).clear();r.onsuccess=()=>e(),r.onerror=()=>{n.error(`Error clearing store ${this.storeName}`,r.error),t(r.error)}})}async findByIndex(e,t){return new Promise((r,i)=>{let a=this.db.transaction([this.storeName],`readonly`).objectStore(this.storeName).index(e).get(t);a.onsuccess=()=>r(a.result||null),a.onerror=()=>{n.error(`Error finding item in ${this.storeName} by index ${e}`,a.error),i(a.error)}})}async findAllByIndex(e,t){return new Promise((r,i)=>{let a=this.db.transaction([this.storeName],`readonly`).objectStore(this.storeName).index(e).getAll(t);a.onsuccess=()=>r(a.result||[]),a.onerror=()=>{n.error(`Error finding items in ${this.storeName} by index ${e}`,a.error),i(a.error)}})}};exports.NoSqlRepository=r;
@@ -0,0 +1,33 @@
1
+ export declare class NoSqlRepository<T> {
2
+ private storeName;
3
+ constructor(storeName: string);
4
+ private get db();
5
+ /**
6
+ * Saves or updates an item in the store
7
+ */
8
+ save(item: T): Promise<T>;
9
+ /**
10
+ * Gets an item by its key
11
+ */
12
+ get(id: string | number): Promise<T | null>;
13
+ /**
14
+ * Gets all items from the store
15
+ */
16
+ getAll(): Promise<T[]>;
17
+ /**
18
+ * Deletes an item by its key
19
+ */
20
+ delete(id: string | number): Promise<void>;
21
+ /**
22
+ * Clears all items from the store
23
+ */
24
+ clear(): Promise<void>;
25
+ /**
26
+ * Finds an item using an index
27
+ */
28
+ findByIndex(indexName: string, value: any): Promise<T | null>;
29
+ /**
30
+ * Finds all items using an index
31
+ */
32
+ findAllByIndex(indexName: string, value: any): Promise<T[]>;
33
+ }
@@ -0,0 +1,69 @@
1
+ import { GLOBAL_LOGGER as e } from "../logger/logger.esm";
2
+ import { INDEXEDDB_SERVICE as t } from "./indexeddb.service.esm";
3
+ //#region src/packages/indexeddb/nosql.repo.ts
4
+ var n = e.child("[NoSqlRepo]"), r = class {
5
+ constructor(e) {
6
+ this.storeName = e;
7
+ }
8
+ get db() {
9
+ return t.db;
10
+ }
11
+ async save(e) {
12
+ return new Promise((t, r) => {
13
+ let i = this.db.transaction([this.storeName], "readwrite").objectStore(this.storeName).put(e);
14
+ i.onsuccess = () => t(e), i.onerror = () => {
15
+ n.error(`Error saving item in ${this.storeName}`, i.error), r(i.error);
16
+ };
17
+ });
18
+ }
19
+ async get(e) {
20
+ return new Promise((t, r) => {
21
+ let i = this.db.transaction([this.storeName], "readonly").objectStore(this.storeName).get(e);
22
+ i.onsuccess = () => t(i.result || null), i.onerror = () => {
23
+ n.error(`Error getting item ${e} from ${this.storeName}`, i.error), r(i.error);
24
+ };
25
+ });
26
+ }
27
+ async getAll() {
28
+ return new Promise((e, t) => {
29
+ let r = this.db.transaction([this.storeName], "readonly").objectStore(this.storeName).getAll();
30
+ r.onsuccess = () => e(r.result), r.onerror = () => {
31
+ n.error(`Error getting all items from ${this.storeName}`, r.error), t(r.error);
32
+ };
33
+ });
34
+ }
35
+ async delete(e) {
36
+ return new Promise((t, r) => {
37
+ let i = this.db.transaction([this.storeName], "readwrite").objectStore(this.storeName).delete(e);
38
+ i.onsuccess = () => t(), i.onerror = () => {
39
+ n.error(`Error deleting item ${e} from ${this.storeName}`, i.error), r(i.error);
40
+ };
41
+ });
42
+ }
43
+ async clear() {
44
+ return new Promise((e, t) => {
45
+ let r = this.db.transaction([this.storeName], "readwrite").objectStore(this.storeName).clear();
46
+ r.onsuccess = () => e(), r.onerror = () => {
47
+ n.error(`Error clearing store ${this.storeName}`, r.error), t(r.error);
48
+ };
49
+ });
50
+ }
51
+ async findByIndex(e, t) {
52
+ return new Promise((r, i) => {
53
+ let a = this.db.transaction([this.storeName], "readonly").objectStore(this.storeName).index(e).get(t);
54
+ a.onsuccess = () => r(a.result || null), a.onerror = () => {
55
+ n.error(`Error finding item in ${this.storeName} by index ${e}`, a.error), i(a.error);
56
+ };
57
+ });
58
+ }
59
+ async findAllByIndex(e, t) {
60
+ return new Promise((r, i) => {
61
+ let a = this.db.transaction([this.storeName], "readonly").objectStore(this.storeName).index(e).getAll(t);
62
+ a.onsuccess = () => r(a.result || []), a.onerror = () => {
63
+ n.error(`Error finding items in ${this.storeName} by index ${e}`, a.error), i(a.error);
64
+ };
65
+ });
66
+ }
67
+ };
68
+ //#endregion
69
+ export { r as NoSqlRepository };
@@ -0,0 +1 @@
1
+ const e=require(`../../shared/logic/service/base.service.cjs`),t=require(`../logger/logger.cjs`),n=require(`./indexeddb.service.cjs`);var r=class extends e{constructor(e){super(),this.storeName=e,this._repository=void 0,this.defaultLog=t.GLOBAL_LOGGER.child(`[NoSqlRepo]`),n.INDEXEDDB_SERVICE.onReady(()=>{this._repository=n.INDEXEDDB_SERVICE.getRepository(this.storeName),this.setReady()})}async ensureReady(){if(!this.isReady())return new Promise(e=>this.onReady(e))}get isInitialized(){return this._repository!==void 0}get repository(){if(!this.isInitialized)throw Error(`Repository for ${this.storeName} not initialized`);return this._repository}async persist(e,t=this.defaultLog){await this.ensureReady();let n=t.trace(`persist:${this.constructor.name}`);try{return await this.repository.save(e)}finally{n.end()}}async remove(e,t=this.defaultLog){await this.ensureReady();let n=t.trace(`remove:${this.constructor.name}`);try{if(e.id===void 0)throw Error(`Cannot remove entity without ID`);return await this.repository.delete(e.id),e}finally{n.end()}}async findById(e,t=this.defaultLog){await this.ensureReady();let n=t.trace(`findById:${this.constructor.name}`);try{return await this.repository.get(e)}finally{n.end()}}async findAll(e,t=this.defaultLog){await this.ensureReady();let n=t.trace(`findAll:${this.constructor.name}`);try{return await this.repository.getAll()}finally{n.end()}}async clear(e,t=this.defaultLog){await this.ensureReady();let n=t.trace(`clear:${this.constructor.name}`);try{await this.repository.clear()}finally{n.end()}}async findByIndex(e,t=this.defaultLog){await this.ensureReady();let n=t.trace(`findByIndex:${this.constructor.name}`);try{return await this.repository.findByIndex(e.indexName,e.value)}finally{n.end()}}async findAllByIndex(e,t=this.defaultLog){await this.ensureReady();let n=t.trace(`findAllByIndex:${this.constructor.name}`);try{return await this.repository.findAllByIndex(e.indexName,e.value)}finally{n.end()}}};module.exports=r;
@@ -0,0 +1,46 @@
1
+ import { default as BaseService } from '../../shared/logic/service/base.service';
2
+ import { NoSqlRepository } from './nosql.repo';
3
+ import { Logger } from '../logger/logger';
4
+ import { IRepository } from '../../shared/contracts/repository.contract';
5
+ /**
6
+ * NoSqlRepoService
7
+ *
8
+ * Clase base para servicios de persistencia basados en IndexedDB (NoSQL).
9
+ * Implementa IRepository y sigue la convención (payload, logger?).
10
+ */
11
+ export default class NoSqlRepoService<T extends {
12
+ id?: string | number;
13
+ }> extends BaseService implements IRepository<T> {
14
+ private storeName;
15
+ private _repository;
16
+ protected defaultLog: Logger;
17
+ protected constructor(storeName: string);
18
+ /**
19
+ * Garantiza que el servicio esté listo antes de operar
20
+ */
21
+ protected ensureReady(): Promise<void>;
22
+ get isInitialized(): boolean;
23
+ protected get repository(): NoSqlRepository<T>;
24
+ persist(entity: T, logger?: Logger): Promise<T>;
25
+ remove(entity: T, logger?: Logger): Promise<T>;
26
+ findById(id: string | number, logger?: Logger): Promise<T | null>;
27
+ findAll(_?: any, logger?: Logger): Promise<T[]>;
28
+ /**
29
+ * Limpia todo el almacén
30
+ */
31
+ clear(_?: any, logger?: Logger): Promise<void>;
32
+ /**
33
+ * Busca por índice
34
+ */
35
+ protected findByIndex(payload: {
36
+ indexName: string;
37
+ value: any;
38
+ }, logger?: Logger): Promise<T | null>;
39
+ /**
40
+ * Busca todos por índice
41
+ */
42
+ protected findAllByIndex(payload: {
43
+ indexName: string;
44
+ value: any;
45
+ }, logger?: Logger): Promise<T[]>;
46
+ }
@@ -0,0 +1,87 @@
1
+ import e from "../../shared/logic/service/base.service.esm";
2
+ import { GLOBAL_LOGGER as t } from "../logger/logger.esm";
3
+ import { INDEXEDDB_SERVICE as n } from "./indexeddb.service.esm";
4
+ //#region src/packages/indexeddb/nosql.repo.service.ts
5
+ var r = class extends e {
6
+ constructor(e) {
7
+ super(), this.storeName = e, this._repository = void 0, this.defaultLog = t.child("[NoSqlRepo]"), n.onReady(() => {
8
+ this._repository = n.getRepository(this.storeName), this.setReady();
9
+ });
10
+ }
11
+ async ensureReady() {
12
+ if (!this.isReady()) return new Promise((e) => this.onReady(e));
13
+ }
14
+ get isInitialized() {
15
+ return this._repository !== void 0;
16
+ }
17
+ get repository() {
18
+ if (!this.isInitialized) throw Error(`Repository for ${this.storeName} not initialized`);
19
+ return this._repository;
20
+ }
21
+ async persist(e, t = this.defaultLog) {
22
+ await this.ensureReady();
23
+ let n = t.trace(`persist:${this.constructor.name}`);
24
+ try {
25
+ return await this.repository.save(e);
26
+ } finally {
27
+ n.end();
28
+ }
29
+ }
30
+ async remove(e, t = this.defaultLog) {
31
+ await this.ensureReady();
32
+ let n = t.trace(`remove:${this.constructor.name}`);
33
+ try {
34
+ if (e.id === void 0) throw Error("Cannot remove entity without ID");
35
+ return await this.repository.delete(e.id), e;
36
+ } finally {
37
+ n.end();
38
+ }
39
+ }
40
+ async findById(e, t = this.defaultLog) {
41
+ await this.ensureReady();
42
+ let n = t.trace(`findById:${this.constructor.name}`);
43
+ try {
44
+ return await this.repository.get(e);
45
+ } finally {
46
+ n.end();
47
+ }
48
+ }
49
+ async findAll(e, t = this.defaultLog) {
50
+ await this.ensureReady();
51
+ let n = t.trace(`findAll:${this.constructor.name}`);
52
+ try {
53
+ return await this.repository.getAll();
54
+ } finally {
55
+ n.end();
56
+ }
57
+ }
58
+ async clear(e, t = this.defaultLog) {
59
+ await this.ensureReady();
60
+ let n = t.trace(`clear:${this.constructor.name}`);
61
+ try {
62
+ await this.repository.clear();
63
+ } finally {
64
+ n.end();
65
+ }
66
+ }
67
+ async findByIndex(e, t = this.defaultLog) {
68
+ await this.ensureReady();
69
+ let n = t.trace(`findByIndex:${this.constructor.name}`);
70
+ try {
71
+ return await this.repository.findByIndex(e.indexName, e.value);
72
+ } finally {
73
+ n.end();
74
+ }
75
+ }
76
+ async findAllByIndex(e, t = this.defaultLog) {
77
+ await this.ensureReady();
78
+ let n = t.trace(`findAllByIndex:${this.constructor.name}`);
79
+ try {
80
+ return await this.repository.findAllByIndex(e.indexName, e.value);
81
+ } finally {
82
+ n.end();
83
+ }
84
+ }
85
+ };
86
+ //#endregion
87
+ export { r as default };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=class e{constructor(){this._stores=new Map}static get instance(){return this._instance||=new e,this._instance}register(e){return this._stores.set(e.name,e),e}getStores(){return Array.from(this._stores.values())}getStore(e){return this._stores.get(e)}};e._instance=void 0;var t=e.instance;exports.INDEXEDDB_REGISTRY=t;
@@ -0,0 +1,21 @@
1
+ import { ObjectStoreConfig } from './types';
2
+ declare class IndexedDbRegistry {
3
+ private static _instance;
4
+ private _stores;
5
+ private constructor();
6
+ static get instance(): IndexedDbRegistry;
7
+ /**
8
+ * Registers an object store configuration
9
+ */
10
+ register(config: ObjectStoreConfig): ObjectStoreConfig;
11
+ /**
12
+ * Gets all registered stores
13
+ */
14
+ getStores(): ObjectStoreConfig[];
15
+ /**
16
+ * Gets a specific store configuration by name
17
+ */
18
+ getStore(name: string): ObjectStoreConfig | undefined;
19
+ }
20
+ export declare const INDEXEDDB_REGISTRY: IndexedDbRegistry;
21
+ export {};
@@ -0,0 +1,22 @@
1
+ //#region src/packages/indexeddb/registry.ts
2
+ var e = class e {
3
+ constructor() {
4
+ this._stores = /* @__PURE__ */ new Map();
5
+ }
6
+ static get instance() {
7
+ return this._instance ||= new e(), this._instance;
8
+ }
9
+ register(e) {
10
+ return this._stores.set(e.name, e), e;
11
+ }
12
+ getStores() {
13
+ return Array.from(this._stores.values());
14
+ }
15
+ getStore(e) {
16
+ return this._stores.get(e);
17
+ }
18
+ };
19
+ e._instance = void 0;
20
+ var t = e.instance;
21
+ //#endregion
22
+ export { t as INDEXEDDB_REGISTRY };
File without changes
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Configuration for an IndexedDB Object Store
3
+ */
4
+ export interface ObjectStoreConfig {
5
+ name: string;
6
+ keyPath: string;
7
+ autoIncrement?: boolean;
8
+ indexes?: IndexConfig[];
9
+ }
10
+ /**
11
+ * Configuration for an IndexedDB Index
12
+ */
13
+ export interface IndexConfig {
14
+ name: string;
15
+ keyPath: string | string[];
16
+ unique?: boolean;
17
+ multiEntry?: boolean;
18
+ }
19
+ /**
20
+ * Configuration for an IndexedDB Database
21
+ */
22
+ export interface DatabaseConfig {
23
+ name: string;
24
+ version: number;
25
+ stores: ObjectStoreConfig[];
26
+ }
27
+ /**
28
+ * Generic interface for NoSQL entities
29
+ */
30
+ export interface BaseEntity {
31
+ id?: string | number;
32
+ [key: string]: any;
33
+ }
File without changes
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./registry.cjs`),t=require(`./logger.cjs`);exports.GLOBAL_LOGGER=t.GLOBAL_LOGGER,exports.Logger=t.Logger,exports.TRACE_REGISTRY=e.TRACE_REGISTRY;
@@ -0,0 +1,2 @@
1
+ export * from './logger';
2
+ export * from './registry';
@@ -0,0 +1,3 @@
1
+ import { TRACE_REGISTRY as e } from "./registry.esm";
2
+ import { GLOBAL_LOGGER as t, Logger as n } from "./logger.esm";
3
+ export { t as GLOBAL_LOGGER, n as Logger, e as TRACE_REGISTRY };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./registry.cjs`);var t={debug:0,info:1,success:2,warn:3,error:4,silent:99},n={debug:`color:#94a3b8;font-weight:600;`,info:`color:#38bdf8;font-weight:600;`,success:`color:#4ade80;font-weight:600;`,warn:`color:#fb923c;font-weight:600;`,error:`color:#f87171;font-weight:600;`,context:`color:#a78bfa;font-weight:700;background:#1e1b4b;padding:1px 4px;border-radius:3px;`,trace:`color:#f0abfc;font-weight:700;background:#4a044e;padding:1px 4px;border-radius:3px;`,ended:`color:#f87171;font-weight:700;`,dim:`color:#475569;`},r={debug:`[⬡ DEBUG ]`,info:`[◈ INFO ]`,success:`[◉ SUCCESS]`,warn:`[⚠ WARN ]`,error:`[✖ ERROR ]`,silent:``},i=class i{constructor(e){this.context=void 0,this.minLevel=void 0,this.capture=void 0,this.broadcast=void 0,this.traceId=void 0,this.parent=void 0,this.startedAt=void 0,this.history=void 0,this.traces=[],this.ended=!1,this.context=e.context,this.capture=e.capture??!1,this.broadcast=e.broadcast??!1,this.traceId=e._traceId,this.parent=e._parent,this.startedAt=e._startedAt,this.history=e._history??[],this.minLevel=t[e.minLevel??`warn`]}debug(e,t){this._log(`debug`,e,t)}info(e,t){this._log(`info`,e,t)}success(e,t){this._log(`success`,e,t)}warn(e,t){this._log(`warn`,e,t)}error(e,t){this._log(`error`,e,t)}trace(e){let t=e??this._generateTraceId(),n=new Date().toISOString();return new i({context:this.context,minLevel:this._levelName(),capture:this.capture,broadcast:this.broadcast,_traceId:t,_history:[],_parent:this,_startedAt:n})}child(e){return new i({context:`${this.context} › ${e}`,minLevel:this._levelName(),capture:this.capture,broadcast:this.broadcast,_traceId:this.traceId,_history:this.history,_parent:this.parent,_startedAt:this.startedAt})}end(e=`ok`){if(!this.traceId){console.warn(`[Logger] end() llamado en un logger de módulo, no en un trace. Ignorado.`);return}if(this.ended){console.warn(`[Logger] end() llamado más de una vez en trace #${this.traceId}. Ignorado.`);return}this.ended=!0;let t=new Date().toISOString(),r=this.startedAt??t,i=new Date(t).getTime()-new Date(r).getTime(),a={traceId:this.traceId,context:this.context,startedAt:r,endedAt:t,durationMs:i,status:e,entries:[...this.history]};this.parent?._receiveTrace(a);let o=e===`ok`?`◎`:`✖`,s=e===`ok`?n.success:n.error;console.log(`%c${o} %c${this.context}%c #${this.traceId}%c trace ended — ${i}ms [${e}]`,s,n.context,n.trace,n.dim)}async timeAsync(e,t){let n=this.child(e),r=performance.now();n.debug(`starting`);try{let e=await t(n),i=(performance.now()-r).toFixed(1);return n.success(`done ${i}ms`),e}catch(e){let t=(performance.now()-r).toFixed(1);throw n.error(`failed ${t}ms`,e),e}}time(e,t){let n=this.child(e),r=performance.now();n.debug(`starting`);try{let e=t(n),i=(performance.now()-r).toFixed(1);return n.success(`done ${i}ms`),e}catch(e){let t=(performance.now()-r).toFixed(1);throw n.error(`failed ${t}ms`,e),e}}group(e,t){let r=this.traceId?` #${this.traceId}`:``;console.groupCollapsed(`%c${this.context}%c${r}%c ${e}`,n.context,n.trace,n.dim),t(),console.groupEnd()}getTraces(){return this.traces}dumpTraces(){return JSON.stringify(this.traces,null,2)}getFailedTraces(){return this.traces.filter(e=>e.status===`error`)}clearTraces(){this.traces.length=0}getHistory(){return this.history}dumpHistory(){return JSON.stringify(this.history,null,2)}getTraceId(){return this.traceId}_receiveTrace(t){this.traces.push(t),e.TRACE_REGISTRY.register(t)}_log(e,r,i){if(this.ended){console.warn(`%c[Logger] log ignorado — trace #${this.traceId} ya fue cerrado con end()`,n.ended);return}if(t[e]<this.minLevel)return;let a=new Date().toISOString(),o={level:e,context:this.context,message:r,timestamp:a,...this.traceId!==void 0&&{traceId:this.traceId},...i!==void 0&&{data:i}};(this.capture||this.traceId!==void 0)&&this.history.push(o),this.broadcast&&this._emit(o),this._print(e,r,a,i)}_print(e,t,i,a){let o=r[e],s=i.slice(11,23),c=this.traceId?`#${this.traceId}`:``,l=e===`error`?console.error:e===`warn`?console.warn:console.log,u=c?`%c${o} %c${this.context}%c ${c}%c ${t} %c${s}`:`%c${o} %c${this.context}%c ${t} %c${s}`,d=c?[n[e],n.context,n.trace,``,n.dim]:[n[e],n.context,``,n.dim];a===void 0?l(u,...d):l(u,...d,a)}_emit(e){window.dispatchEvent(new CustomEvent(`app:log`,{detail:e}))}_levelName(){return Object.keys(t).find(e=>t[e]===this.minLevel)??`debug`}_generateTraceId(){return Math.random().toString(16).slice(2,10)}},a=new i({context:`GLOBAL`});exports.GLOBAL_LOGGER=a,exports.Logger=i;
@@ -0,0 +1,137 @@
1
+ export type LogLevel = 'debug' | 'info' | 'success' | 'warn' | 'error' | 'silent';
2
+ export interface LogEntry {
3
+ level: LogLevel;
4
+ context: string;
5
+ message: string;
6
+ timestamp: string;
7
+ traceId?: string;
8
+ data?: unknown;
9
+ }
10
+ /** Snapshot que el padre guarda al recibir un flush */
11
+ export interface TraceRecord {
12
+ traceId: string;
13
+ context: string;
14
+ startedAt: string;
15
+ endedAt: string;
16
+ durationMs: number;
17
+ status: 'ok' | 'error';
18
+ entries: LogEntry[];
19
+ }
20
+ export interface LoggerOptions {
21
+ context: string;
22
+ minLevel?: LogLevel;
23
+ capture?: boolean;
24
+ broadcast?: boolean;
25
+ _traceId?: string;
26
+ _history?: LogEntry[];
27
+ _parent?: Logger;
28
+ _startedAt?: string;
29
+ }
30
+ export declare class Logger {
31
+ private readonly context;
32
+ private readonly minLevel;
33
+ private readonly capture;
34
+ private readonly broadcast;
35
+ private readonly traceId;
36
+ private readonly parent;
37
+ private readonly startedAt;
38
+ private readonly history;
39
+ private readonly traces;
40
+ private ended;
41
+ constructor(options: LoggerOptions);
42
+ debug(message: string, data?: unknown): void;
43
+ info(message: string, data?: unknown): void;
44
+ success(message: string, data?: unknown): void;
45
+ warn(message: string, data?: unknown): void;
46
+ error(message: string, data?: unknown): void;
47
+ /**
48
+ * Crea un logger de operación.
49
+ * - Genera un traceId único (o reutiliza uno externo)
50
+ * - Guarda referencia al padre (this) para el flush en end()
51
+ * - Comparte una historia vacía entre todos sus children
52
+ *
53
+ * @example
54
+ * const op = authLogger.trace()
55
+ * // ... operación ...
56
+ * op.end() // ← flush al padre al terminar
57
+ */
58
+ trace(externalTraceId?: string): Logger;
59
+ /**
60
+ * Crea un sub-logger con contexto anidado.
61
+ * Hereda traceId, historia y padre — es parte del mismo trace.
62
+ *
63
+ * @example
64
+ * const op = authLogger.trace() // [auth] #a3f9
65
+ * const apiOp = op.child('api') // [auth › api] #a3f9 — mismo trace
66
+ */
67
+ child(subContext: string): Logger;
68
+ /**
69
+ * Cierra el trace y hace flush al padre.
70
+ *
71
+ * El padre (logger de módulo) guarda un TraceRecord con:
72
+ * - traceId, contexto, timestamps, duración, status, y todos los entries
73
+ *
74
+ * Después de end(), cualquier intento de loguear emite un warning y no-op.
75
+ *
76
+ * @param status - 'ok' (default) o 'error' si el use case terminó con fallo
77
+ *
78
+ * @example
79
+ * const op = authLogger.trace()
80
+ * try {
81
+ * await doSomething(op)
82
+ * op.success('done')
83
+ * op.end() // flush con status 'ok'
84
+ * } catch (err) {
85
+ * op.error('failed', err)
86
+ * op.end('error') // flush con status 'error'
87
+ * throw err
88
+ * }
89
+ */
90
+ end(status?: 'ok' | 'error'): void;
91
+ /**
92
+ * Mide el tiempo de ejecución de una función async.
93
+ * Propaga traceId y padre automáticamente.
94
+ *
95
+ * @example
96
+ * const user = await op.timeAsync('fetchUser', async (scoped) => {
97
+ * scoped.debug('calling endpoint')
98
+ * return api.getUser(id)
99
+ * })
100
+ */
101
+ timeAsync<T>(label: string, fn: (scoped: Logger) => Promise<T>): Promise<T>;
102
+ time<T>(label: string, fn: (scoped: Logger) => T): T;
103
+ /**
104
+ * Agrupa logs visualmente en devtools.
105
+ */
106
+ group(label: string, fn: () => void): void;
107
+ /**
108
+ * Retorna todos los TraceRecords completados que este módulo ha recibido.
109
+ * Solo disponible en loggers de módulo (sin traceId).
110
+ *
111
+ * @example
112
+ * authLogger.getTraces()
113
+ * // → [{ traceId: 'a3f9', status: 'ok', durationMs: 143, entries: [...] }, ...]
114
+ */
115
+ getTraces(): ReadonlyArray<TraceRecord>;
116
+ /**
117
+ * Dump estructurado de todo el audit log del módulo.
118
+ * Ideal para mandar a Sentry, DataDog, o una IA para análisis post-mortem.
119
+ */
120
+ dumpTraces(): string;
121
+ /**
122
+ * Retorna solo los traces fallidos.
123
+ */
124
+ getFailedTraces(): ReadonlyArray<TraceRecord>;
125
+ clearTraces(): void;
126
+ getHistory(): ReadonlyArray<LogEntry>;
127
+ dumpHistory(): string;
128
+ getTraceId(): string | undefined;
129
+ /** Llamado por end() del trace hijo — no usar directamente */
130
+ _receiveTrace(record: TraceRecord): void;
131
+ private _log;
132
+ private _print;
133
+ private _emit;
134
+ private _levelName;
135
+ private _generateTraceId;
136
+ }
137
+ export declare const GLOBAL_LOGGER: Logger;