@eskais/app-sdk 0.0.0-stage → 0.2.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 (159) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -2
  3. package/dist/action/action.d.ts +133 -0
  4. package/dist/action/action.js +224 -0
  5. package/dist/action/bulk.d.ts +24 -0
  6. package/dist/action/bulk.js +24 -0
  7. package/dist/cli/cli.d.ts +2 -0
  8. package/dist/cli/cli.js +51 -0
  9. package/dist/cli/routes.d.ts +17 -0
  10. package/dist/cli/routes.js +36 -0
  11. package/dist/core/assume.d.ts +1 -0
  12. package/dist/core/assume.js +8 -0
  13. package/dist/core/constants.d.ts +359 -0
  14. package/dist/core/constants.js +187 -0
  15. package/dist/core/contracts.d.ts +107 -0
  16. package/dist/core/contracts.js +3 -0
  17. package/dist/core/data-labels.d.ts +210 -0
  18. package/dist/core/data-labels.js +385 -0
  19. package/dist/core/errors.d.ts +52 -0
  20. package/dist/core/errors.js +209 -0
  21. package/dist/core/guards.d.ts +9 -0
  22. package/dist/core/guards.js +14 -0
  23. package/dist/core/refusal.d.ts +30 -0
  24. package/dist/core/refusal.js +53 -0
  25. package/dist/dialogs/dialogs.d.ts +75 -0
  26. package/dist/dialogs/dialogs.js +66 -0
  27. package/dist/draft/draft.d.ts +36 -0
  28. package/dist/draft/draft.js +87 -0
  29. package/dist/errors/adapters.d.ts +21 -0
  30. package/dist/errors/adapters.js +81 -0
  31. package/dist/errors/define-errors.d.ts +88 -0
  32. package/dist/errors/define-errors.js +168 -0
  33. package/dist/errors/idempotency.d.ts +2 -0
  34. package/dist/errors/idempotency.js +13 -0
  35. package/dist/export/csv.d.ts +25 -0
  36. package/dist/export/csv.js +59 -0
  37. package/dist/i18n/adapters.d.ts +53 -0
  38. package/dist/i18n/adapters.js +56 -0
  39. package/dist/i18n/format.d.ts +10 -0
  40. package/dist/i18n/format.js +273 -0
  41. package/dist/i18n/labels.d.ts +10 -0
  42. package/dist/i18n/labels.js +227 -0
  43. package/dist/i18n/locale.d.ts +73 -0
  44. package/dist/i18n/locale.js +74 -0
  45. package/dist/i18n/messages.d.ts +93 -0
  46. package/dist/i18n/messages.js +16 -0
  47. package/dist/import/csv-parse.d.ts +11 -0
  48. package/dist/import/csv-parse.js +70 -0
  49. package/dist/import/import.d.ts +104 -0
  50. package/dist/import/import.js +266 -0
  51. package/dist/index.d.ts +46 -0
  52. package/dist/index.js +45 -0
  53. package/dist/navigation/nav.d.ts +128 -0
  54. package/dist/navigation/nav.js +301 -0
  55. package/dist/navigation/router.d.ts +81 -0
  56. package/dist/navigation/router.js +249 -0
  57. package/dist/navigation/shortcuts.d.ts +37 -0
  58. package/dist/navigation/shortcuts.js +93 -0
  59. package/dist/next/index.d.ts +3 -0
  60. package/dist/next/index.js +3 -0
  61. package/dist/next/screen-hydration.d.ts +12 -0
  62. package/dist/next/screen-hydration.js +26 -0
  63. package/dist/next/screen.d.ts +25 -0
  64. package/dist/next/screen.js +44 -0
  65. package/dist/next/server/handler.d.ts +39 -0
  66. package/dist/next/server/handler.js +190 -0
  67. package/dist/next/server/index.d.ts +6 -0
  68. package/dist/next/server/index.js +6 -0
  69. package/dist/next/server/page.d.ts +63 -0
  70. package/dist/next/server/page.js +110 -0
  71. package/dist/next/server/prefetch.d.ts +29 -0
  72. package/dist/next/server/prefetch.js +97 -0
  73. package/dist/next/server/session.d.ts +25 -0
  74. package/dist/next/server/session.js +23 -0
  75. package/dist/next/use-next-router.d.ts +21 -0
  76. package/dist/next/use-next-router.js +104 -0
  77. package/dist/permissions/permissions.d.ts +134 -0
  78. package/dist/permissions/permissions.js +121 -0
  79. package/dist/react/data-layer.d.ts +68 -0
  80. package/dist/react/data-layer.js +76 -0
  81. package/dist/react/hooks/use-action-dialog.d.ts +25 -0
  82. package/dist/react/hooks/use-action-dialog.js +31 -0
  83. package/dist/react/hooks/use-action.d.ts +37 -0
  84. package/dist/react/hooks/use-action.js +125 -0
  85. package/dist/react/hooks/use-better-auth.d.ts +12 -0
  86. package/dist/react/hooks/use-better-auth.js +11 -0
  87. package/dist/react/hooks/use-bulk-action.d.ts +20 -0
  88. package/dist/react/hooks/use-bulk-action.js +24 -0
  89. package/dist/react/hooks/use-dialogs.d.ts +14 -0
  90. package/dist/react/hooks/use-dialogs.js +20 -0
  91. package/dist/react/hooks/use-draft.d.ts +5 -0
  92. package/dist/react/hooks/use-draft.js +17 -0
  93. package/dist/react/hooks/use-nav.d.ts +17 -0
  94. package/dist/react/hooks/use-nav.js +35 -0
  95. package/dist/react/hooks/use-new-rows.d.ts +22 -0
  96. package/dist/react/hooks/use-new-rows.js +24 -0
  97. package/dist/react/hooks/use-permissions.d.ts +13 -0
  98. package/dist/react/hooks/use-permissions.js +19 -0
  99. package/dist/react/hooks/use-reauthenticate.d.ts +6 -0
  100. package/dist/react/hooks/use-reauthenticate.js +11 -0
  101. package/dist/react/hooks/use-resource.d.ts +92 -0
  102. package/dist/react/hooks/use-resource.js +255 -0
  103. package/dist/react/hooks/use-view.d.ts +6 -0
  104. package/dist/react/hooks/use-view.js +24 -0
  105. package/dist/react/index.d.ts +15 -0
  106. package/dist/react/index.js +15 -0
  107. package/dist/react/keys.d.ts +60 -0
  108. package/dist/react/keys.js +71 -0
  109. package/dist/react/new-rows.d.ts +22 -0
  110. package/dist/react/new-rows.js +72 -0
  111. package/dist/refresh/new-rows.d.ts +13 -0
  112. package/dist/refresh/new-rows.js +18 -0
  113. package/dist/resource/form-schema.d.ts +11 -0
  114. package/dist/resource/form-schema.js +51 -0
  115. package/dist/resource/relations.d.ts +99 -0
  116. package/dist/resource/relations.js +194 -0
  117. package/dist/resource/resource-relations.d.ts +47 -0
  118. package/dist/resource/resource-relations.js +154 -0
  119. package/dist/resource/resource-schema.d.ts +9 -0
  120. package/dist/resource/resource-schema.js +73 -0
  121. package/dist/resource/resource-texts.d.ts +18 -0
  122. package/dist/resource/resource-texts.js +13 -0
  123. package/dist/resource/resource-types.d.ts +420 -0
  124. package/dist/resource/resource-types.js +1 -0
  125. package/dist/resource/resource-words.d.ts +25 -0
  126. package/dist/resource/resource-words.js +221 -0
  127. package/dist/resource/resource.d.ts +15 -0
  128. package/dist/resource/resource.js +280 -0
  129. package/dist/resource/schema.d.ts +57 -0
  130. package/dist/resource/schema.js +115 -0
  131. package/dist/services/from-page-source.d.ts +15 -0
  132. package/dist/services/from-page-source.js +27 -0
  133. package/dist/services/memory-query.d.ts +8 -0
  134. package/dist/services/memory-query.js +165 -0
  135. package/dist/services/memory-service.d.ts +33 -0
  136. package/dist/services/memory-service.js +291 -0
  137. package/dist/services/read-only-service.d.ts +18 -0
  138. package/dist/services/read-only-service.js +25 -0
  139. package/dist/services/rest-service.d.ts +65 -0
  140. package/dist/services/rest-service.js +222 -0
  141. package/dist/services/rng.d.ts +9 -0
  142. package/dist/services/rng.js +22 -0
  143. package/dist/services/spring-service.d.ts +58 -0
  144. package/dist/services/spring-service.js +132 -0
  145. package/dist/session/better-auth.d.ts +83 -0
  146. package/dist/session/better-auth.js +86 -0
  147. package/dist/session/session.d.ts +45 -0
  148. package/dist/session/session.js +36 -0
  149. package/dist/view/preferences.d.ts +35 -0
  150. package/dist/view/preferences.js +93 -0
  151. package/dist/view/view-types.d.ts +124 -0
  152. package/dist/view/view-types.js +1 -0
  153. package/dist/view/view-url.d.ts +7 -0
  154. package/dist/view/view-url.js +54 -0
  155. package/dist/view/view.d.ts +4 -0
  156. package/dist/view/view.js +392 -0
  157. package/locales/en.json +193 -0
  158. package/locales/es.json +193 -0
  159. package/package.json +88 -4
@@ -0,0 +1,193 @@
1
+ {
2
+ "create": "{gender, select, f {Nueva {one}} other {Nuevo {one}}}",
3
+ "edit": "Editar",
4
+ "editRecord": "Editar {title}",
5
+ "remove": "Eliminar",
6
+ "restore": "Restaurar",
7
+ "save": "Guardar",
8
+ "cancel": "Cancelar",
9
+ "undo": "Deshacer",
10
+ "open": "Abrir",
11
+ "back": "Volver",
12
+ "retry": "Reintentar",
13
+ "records": "Registros de {other}",
14
+ "listTool": "Lista de {other}",
15
+ "removeRecords": "Borrar {other}",
16
+ "rowActions": "Acciones de {title}",
17
+ "quickCreate": "Alta rápida de {one}",
18
+ "createOption": "Crear «{text}»",
19
+ "creatingOption": "Creando «{text}»…",
20
+ "empty": "No hay {other}",
21
+ "errorTitle": "{gender, select, f {No se han podido cargar las {other}} other {No se han podido cargar los {other}}}",
22
+ "notFound": "{gender, select, f {Esta {one} no existe} other {Este {one} no existe}}",
23
+ "forbidden": "{gender, select, f {No tienes permiso para ver esta {one}} other {No tienes permiso para ver este {one}}}",
24
+ "notAllowed": "No tienes permiso",
25
+ "forbiddenPage": "No tienes acceso a esta página",
26
+ "newRows": "Mostrar {count} {count, plural, one {fila nueva} other {filas nuevas}}",
27
+ "confirm": "Confirmar",
28
+ "ok": "Aceptar",
29
+ "range": "{shape, select, partial {Mostrando {from}–{to}} estimate {Mostrando {from}–{to} de unos {total}} other {Mostrando {from}–{to} de {total}}}",
30
+ "loading": "Cargando…",
31
+ "search": "Buscar {other}",
32
+ "filters": "Filtros de {other}",
33
+ "pageSize": "Filas por página",
34
+ "addFilter": "Añadir filtro",
35
+ "resetFilters": "Quitar filtros",
36
+ "removeFilter": "Quitar el filtro {field}",
37
+ "previousPage": "Página anterior",
38
+ "nextPage": "Página siguiente",
39
+ "page": "Página {page}",
40
+ "pagination": "Páginas de {other}",
41
+ "loadMore": "Cargar más",
42
+ "showDeleted": "Ver eliminados",
43
+ "columns": "Columnas",
44
+ "views": "Vistas de {other}",
45
+ "allRows": "Todos",
46
+ "saveView": "Guardar vista",
47
+ "viewName": "Nombre de la vista",
48
+ "removeView": "Eliminar la vista {label}",
49
+ "removeViews": "Eliminar vistas de {other}",
50
+ "confirmRemoveView": "¿Eliminar la vista {label}?",
51
+ "viewOptions": "Opciones de la vista {label}",
52
+ "viewModified": "Modificada",
53
+ "saveViewChanges": "Guardar cambios",
54
+ "renameView": "Cambiar nombre",
55
+ "defaultView": "Por defecto",
56
+ "setDefaultView": "Usar por defecto",
57
+ "unsetDefaultView": "Dejar de usar por defecto",
58
+ "onlyThisBrowser": "Solo en este navegador",
59
+ "selected": "{gender, select, f {{count} seleccionadas} other {{count} seleccionados}}",
60
+ "selectAllMatching": "{gender, select, f {Seleccionar las {count} {other}} other {Seleccionar los {count} {other}}}",
61
+ "allMatchingSelected": "{gender, select, f {Seleccionadas las {count} {other} que cumplen el filtro} other {Seleccionados los {count} {other} que cumplen el filtro}}",
62
+ "clearSelection": "Quitar la selección",
63
+ "exportCsv": "Exportar CSV",
64
+ "importCsv": "Importar CSV",
65
+ "importTitle": "Importar {other}",
66
+ "importTool": "Importación de {other}",
67
+ "importNoRows": "El fichero no tiene filas bajo la cabecera.",
68
+ "columnField": "Campo para {column}",
69
+ "skipColumn": "No importar",
70
+ "next": "Siguiente",
71
+ "close": "Cerrar",
72
+ "importReady": "{valid} {valid, plural, one {fila lista} other {filas listas}}, {invalid} con errores",
73
+ "importRows": "Importar {count} {count, plural, one {fila} other {filas}}",
74
+ "downloadErrors": "Descargar las filas con errores",
75
+ "importing": "Importadas {done} de {total}",
76
+ "stop": "Detener",
77
+ "importSummary": "{cancelled, select, yes {Detenida. } other {}}{created} creadas, {updated} actualizadas, {failed} con error.",
78
+ "line": "Fila",
79
+ "errorColumn": "Error",
80
+ "exportTooLarge": "{count} filas superan el límite de {limit} de una exportación en el navegador",
81
+ "confirmRemove": "¿Eliminar {target}?",
82
+ "confirmRemoveDescription": "No se puede deshacer.",
83
+ "removeAgentConfirm": "Elimina {target}",
84
+ "removed": "{gender, select, f {{count} {other} eliminadas} other {{count} {other} eliminados}}",
85
+ "created": "{gender, select, f {{title} creada} other {{title} creado}}",
86
+ "saved": "{gender, select, f {{title} guardada} other {{title} guardado}}",
87
+ "restored": "{gender, select, f {{count} restauradas} other {{count} restaurados}}",
88
+ "failed": "Algo ha fallado",
89
+ "unsavedChanges": "¿Descartar los cambios sin guardar?",
90
+ "discard": "Descartar",
91
+ "keepEditing": "Seguir editando",
92
+ "draftFound": "Tienes cambios sin guardar del {date, date, medium}, {date, time, short}.",
93
+ "draft": "Borrador de {title}",
94
+ "restoreDraft": "Recuperar",
95
+ "discardDraft": "Descartar",
96
+ "favorites": "Favoritos",
97
+ "recents": "Recientes",
98
+ "pin": "Fijar {label}",
99
+ "unpin": "Quitar {label} de favoritos",
100
+ "goTo": "Ir a",
101
+ "pages": "Páginas",
102
+ "actions": "Acciones",
103
+ "breadcrumb": "Migas de pan",
104
+ "audit": {
105
+ "createdAt": "Alta",
106
+ "createdBy": "Creado por",
107
+ "updatedAt": "Modificado",
108
+ "updatedBy": "Modificado por"
109
+ },
110
+ "yes": "Sí",
111
+ "no": "No",
112
+ "notSet": "Sin valor",
113
+ "dropFile": "Suelta un archivo aquí",
114
+ "browseFiles": "Elegir archivos",
115
+ "controls": {
116
+ "refreshing": "Actualizando",
117
+ "filters": {
118
+ "chip": "{empty, select, yes {{field}} other {{field}: {summary}}}",
119
+ "selected": "{count} seleccionados",
120
+ "any": "Cualquiera",
121
+ "from": "Desde",
122
+ "to": "Hasta",
123
+ "min": "Mínimo",
124
+ "max": "Máximo",
125
+ "value": "Valor",
126
+ "comparison": "Comparación",
127
+ "operators": {
128
+ "eq": "Igual a",
129
+ "neq": "Distinto de",
130
+ "lt": "Menos de",
131
+ "lte": "Como mucho",
132
+ "gt": "Más de",
133
+ "gte": "Como mínimo",
134
+ "between": "Entre"
135
+ }
136
+ },
137
+ "combobox": {
138
+ "trigger": "Mostrar opciones",
139
+ "clear": "Borrar",
140
+ "remove": "Quitar {label}",
141
+ "error": "No se han podido cargar las opciones",
142
+ "empty": "{empty, select, yes {No hay opciones} other {Nada coincide con «{query}»}}",
143
+ "count": "{count}{more, select, yes {+} other {}} {count, plural, one {opción} other {opciones}}"
144
+ },
145
+ "files": {
146
+ "list": "Archivos",
147
+ "remove": "Quitar {name}",
148
+ "rejected": "No se puede añadir {name}"
149
+ },
150
+ "date": {
151
+ "clear": "Borrar la fecha",
152
+ "previousMonth": "Mes anterior",
153
+ "nextMonth": "Mes siguiente",
154
+ "start": "Fecha de inicio",
155
+ "end": "Fecha de fin"
156
+ },
157
+ "time": "Hora",
158
+ "colorValue": "Valor del color"
159
+ },
160
+ "issues": {
161
+ "required": "Este campo es obligatorio.",
162
+ "minLength": "Escribe al menos {min} {min, plural, one {carácter} other {caracteres}}.",
163
+ "maxLength": "Escribe como máximo {max} {max, plural, one {carácter} other {caracteres}}.",
164
+ "minItems": "Elige al menos {min}.",
165
+ "maxItems": "Elige como máximo {max}.",
166
+ "min": "Introduce {min} o más.",
167
+ "max": "Introduce {max} o menos.",
168
+ "email": "Introduce un correo electrónico válido.",
169
+ "url": "Introduce una URL válida.",
170
+ "pattern": "Usa el formato indicado.",
171
+ "invalid": "Este valor no es válido."
172
+ },
173
+ "missingRecord": "No hay ningún registro con el id {id}",
174
+ "addRow": "Añadir fila",
175
+ "removeRow": "Quitar la fila {row}",
176
+ "invalidDuration": "Escribe una duración, como 1:30",
177
+ "errors": {
178
+ "network": "No se ha podido conectar con el servidor. Comprueba la conexión y vuelve a intentarlo.",
179
+ "timeout": "El servidor ha tardado demasiado en responder. Vuelve a intentarlo.",
180
+ "unauthorized": "Inicia sesión para continuar.",
181
+ "session-expired": "Tu sesión ha caducado. Vuelve a iniciar sesión.",
182
+ "forbidden": "No tienes permiso para hacer esto.",
183
+ "not-found": "Ya no existe.",
184
+ "conflict": "Alguien lo ha cambiado mientras tanto. Revísalo y vuelve a intentarlo.",
185
+ "validation": "Revisa los campos marcados.",
186
+ "rate-limited": "Demasiadas peticiones. Espera un momento y vuelve a intentarlo.",
187
+ "server": "El servidor ha tenido un problema. Vuelve a intentarlo más tarde.",
188
+ "unknown": "Algo ha fallado.",
189
+ "aborted": "Cancelado."
190
+ },
191
+ "bulkResult": "{succeeded} correctos, {failed} con error",
192
+ "retryFailed": "Reintentar los fallidos ({count})"
193
+ }
package/package.json CHANGED
@@ -1,6 +1,90 @@
1
1
  {
2
2
  "name": "@eskais/app-sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "A declarative application layer over Eskais UI: resources, actions, views, navigation and permissions, with React hooks on TanStack Query and Next.js App Router pages.",
5
+ "keywords": [
6
+ "admin",
7
+ "agents",
8
+ "backoffice",
9
+ "crud",
10
+ "eskais-ui",
11
+ "nextjs",
12
+ "react",
13
+ "tanstack-query"
14
+ ],
15
+ "homepage": "https://ui.eskais.com/docs/app-sdk/",
16
+ "bugs": {
17
+ "url": "https://github.com/p-otero/eskais-ui/issues"
18
+ },
19
+ "license": "MIT",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/p-otero/eskais-ui.git",
23
+ "directory": "packages/app-sdk"
24
+ },
25
+ "bin": {
26
+ "app-sdk": "dist/cli/cli.js"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "locales"
31
+ ],
32
+ "type": "module",
33
+ "sideEffects": false,
34
+ "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "default": "./dist/index.js"
39
+ },
40
+ "./react": {
41
+ "types": "./dist/react/index.d.ts",
42
+ "default": "./dist/react/index.js"
43
+ },
44
+ "./next": {
45
+ "types": "./dist/next/index.d.ts",
46
+ "default": "./dist/next/index.js"
47
+ },
48
+ "./next/server": {
49
+ "types": "./dist/next/server/index.d.ts",
50
+ "default": "./dist/next/server/index.js"
51
+ },
52
+ "./locales/en.json": "./locales/en.json",
53
+ "./locales/es.json": "./locales/es.json",
54
+ "./package.json": "./package.json"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public",
58
+ "provenance": true
59
+ },
60
+ "scripts": {
61
+ "build": "node build.mjs"
62
+ },
63
+ "peerDependencies": {
64
+ "@tanstack/react-query": "^5.0.0",
65
+ "@tanstack/react-router": "^1.0.0",
66
+ "next": "^15.0.0 || ^16.0.0",
67
+ "react": "^19.0.0",
68
+ "zod": "^4.0.0"
69
+ },
70
+ "peerDependenciesMeta": {
71
+ "@tanstack/react-query": {
72
+ "optional": true
73
+ },
74
+ "@tanstack/react-router": {
75
+ "optional": true
76
+ },
77
+ "next": {
78
+ "optional": true
79
+ },
80
+ "react": {
81
+ "optional": true
82
+ },
83
+ "zod": {
84
+ "optional": true
85
+ }
86
+ },
87
+ "engines": {
88
+ "node": ">=22.18.0"
89
+ }
90
+ }