@xosue-utils/services 0.1.3 → 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.
package/README.md CHANGED
@@ -1,65 +1,44 @@
1
1
  # @xosue-utils/services
2
2
 
3
- Overlays de pantalla completa / root-level reutilizables (alert, toast, context-menu, media viewer, session request, loadings, AI autofill, browser notifications).
3
+ Overlays root-level con estética **Cupertino** (blur/scrim vía CSS vars, sheets redondeados).
4
4
 
5
- **Deben montarse una sola vez en el root del host** (`app.component.html`). Ocupan viewport completo vía `position: fixed`.
5
+ Montar una sola vez en el root del host.
6
6
 
7
- ## Instalación
7
+ ## Servicios / hosts
8
8
 
9
- ```json
10
- "@xosue-utils/services": "file:../xosue-utils/services"
11
- ```
12
-
13
- Peers: `@angular/common|core|forms|platform-browser|router|animations` ^19, `@lucide/angular`, `rxjs`.
14
-
15
- El host necesita `provideAnimations()` (o `BrowserAnimationsModule`) por alert/toast/session.
16
-
17
- ## Configuración
18
-
19
- ```ts
20
- import { provideXosueUtilsServices } from '@xosue-utils/services';
21
-
22
- providers: [
23
- provideXosueUtilsServices({
24
- alertAcceptLabel: 'OK',
25
- sessionLoginPath: '/login',
26
- toastSoundUrl: '/assets/sounds/toast.mp3',
27
- mediaFileNameFallback: 'File',
28
- }),
29
- ]
30
- ```
9
+ | Host selector | Service |
10
+ |---------------|---------|
11
+ | `alert-service` | `AlertService` (+ `showSheetConfirm`) |
12
+ | `toast-service` | `ToastService` |
13
+ | `context-menu-service` | `ContextMenuService` |
14
+ | `action-sheet-service` | `ActionSheetService` |
15
+ | `media-viewer-service` | `MediaViewerService` |
16
+ | `session-request-service` | `SessionRequestService` |
17
+ | `global-loading-service` | `GlobalLoadingService` |
18
+ | `navigation-loading-service` | `NavigationLoadingService` |
19
+ | `ai-autofill-overlay-service` | `AiAutofillOverlayService` |
20
+ | `network-status-service` | `NetworkStatusService` |
31
21
 
32
- Defaults en español (paridad Caludy).
22
+ Sin host (solo injectable): `CopyFeedbackService`, `ScrollLockService`, `HotkeyService`, `BrowserNotificationService`.
33
23
 
34
- ## Mount en el host
24
+ ## Mount
35
25
 
36
26
  ```html
37
27
  <alert-service></alert-service>
38
28
  <toast-service></toast-service>
39
29
  <context-menu-service></context-menu-service>
40
- <media-viewer-service></media-viewer-service>
41
- <session-request-service></session-request-service>
42
- <global-loading-service></global-loading-service>
43
- <navigation-loading-service></navigation-loading-service>
44
- <ai-autofill-overlay-service></ai-autofill-overlay-service>
30
+ <action-sheet-service></action-sheet-service>
31
+ <network-status-service></network-status-service>
32
+ <!-- … -->
45
33
  ```
46
34
 
47
- Importa los componentes standalone en `AppComponent`.
48
-
49
- ## Context menu
50
-
51
- Copia propia de `ContextMenuService` + `ContextMenuServiceComponent` (+ `FieldHelpTooltipComponent`).
52
- `@xosue-utils/inputs` sigue exportando su copia en `vendor/`; más adelante inputs puede re-exportar desde aquí sin romper apps actuales.
53
-
54
- ## Media viewer
55
-
56
- API: `MediaViewerService.open()` / `close()` / `state$`.
57
-
58
- El host pasa **URLs ya resueltas** (sin crypto/CDN decrypt en el paquete). Players de video/audio son nativos (sin `hls.js` / `wavesurfer.js`).
35
+ ```ts
36
+ providers: [provideXosueUtilsServices({ copySuccessLabel: 'Copied' })]
37
+ ```
59
38
 
60
39
  ## Colores
61
40
 
62
- Sin `#hex` / `rgb()` / `rgba()` en Sass. Solo `var(--…)` y `color-mix(in srgb, var(--…) N%, transparent)`.
41
+ Solo `var(--…)` / `color-mix`. Preferí `--overlay-scrim`, `--surface`, `--radius-*`.
63
42
 
64
43
  ## Build
65
44
 
@@ -9,6 +9,9 @@ export interface XosueUtilsServicesConfig {
9
9
  sessionLoginPath?: string;
10
10
  sessionRegisterLabel?: string;
11
11
  sessionLoginLabel?: string;
12
+ copySuccessLabel?: string;
13
+ copyErrorLabel?: string;
14
+ networkOfflineLabel?: string;
12
15
  /** toast assets (absolute or app-root relative) */
13
16
  toastSoundUrl?: string;
14
17
  toastErrorSoundUrl?: string;