@solercia/ui 0.6.1 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solercia/ui",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Design system Solercia (componentes sol-*, theming agnóstico por puertos, contrato i18n y schematics ng add/ng generate) para proyectos Angular del ecosistema Solercia.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Solercia Solutions SAS",
@@ -40,6 +40,10 @@
40
40
  "types": "./types/solercia-ui.d.ts",
41
41
  "default": "./fesm2022/solercia-ui.mjs"
42
42
  },
43
+ "./login-appearance": {
44
+ "types": "./types/solercia-ui-login-appearance.d.ts",
45
+ "default": "./fesm2022/solercia-ui-login-appearance.mjs"
46
+ },
43
47
  "./theme-studio": {
44
48
  "types": "./types/solercia-ui-theme-studio.d.ts",
45
49
  "default": "./fesm2022/solercia-ui-theme-studio.mjs"
@@ -0,0 +1,379 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _solercia_ui from '@solercia/ui';
3
+ import { ThemeFile } from '@solercia/ui';
4
+ import * as _solercia_ui_login_appearance from '@solercia/ui/login-appearance';
5
+ import { Observable } from 'rxjs';
6
+
7
+ /**
8
+ * Shape of the `meta.login` block of a `ThemeFile`: photos, motion and composition of the sign-in
9
+ * screen. It lives in `meta` (opaque to the token resolver), so a theme without it renders exactly
10
+ * as before and the host decides whether to use it.
11
+ */
12
+ type LoginEffect = 'zoom' | 'focus' | 'none';
13
+ type LoginTransition = 'fade' | 'focus';
14
+ type LoginPosition = 'left' | 'right' | 'center';
15
+ type LoginBackground = 'glass-fade' | 'glass' | 'solid' | 'triangles' | 'split-circle' | 'facets' | 'circles';
16
+ type LoginCaptionPosition = 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
17
+ type LoginMode = 'light' | 'dark';
18
+ /** Gradient that covers the photo behind the form. `rgb` is a `r,g,b` triple; the rest are 0-1. */
19
+ interface ThemeLoginVeil {
20
+ rgb?: string;
21
+ from?: number;
22
+ to?: number;
23
+ bottom?: number;
24
+ }
25
+ /** Translucent panel behind the form (rectangular backgrounds only). */
26
+ interface ThemeLoginPanel {
27
+ bg?: string;
28
+ blur?: string;
29
+ saturate?: number;
30
+ border?: string;
31
+ radius?: string;
32
+ }
33
+ interface ThemeLoginModeConfig {
34
+ position?: LoginPosition;
35
+ background?: LoginBackground;
36
+ captionPosition?: LoginCaptionPosition;
37
+ veil?: ThemeLoginVeil;
38
+ panel?: ThemeLoginPanel;
39
+ }
40
+ interface ThemeLoginCaption {
41
+ /** Small label above the tagline (for example, the product name). */
42
+ label?: string;
43
+ /** Photo indicators next to the caption. */
44
+ indicators?: boolean;
45
+ }
46
+ interface ThemeLogin {
47
+ images?: string[];
48
+ intervalMs?: number;
49
+ effect?: LoginEffect;
50
+ transition?: LoginTransition;
51
+ caption?: ThemeLoginCaption;
52
+ modes?: Partial<Record<LoginMode, ThemeLoginModeConfig>>;
53
+ }
54
+ /** Logo as a host may publish it before sign-in (already sanitized by `normalizeLoginAppearance`). */
55
+ interface LoginLogo {
56
+ url: string;
57
+ urlDark: string | null;
58
+ altText: string;
59
+ }
60
+ /**
61
+ * Appearance a host can serve anonymously (before sign-in the full theme is usually private).
62
+ * The library makes no HTTP call: the host fetches it from its own endpoint and normalizes it.
63
+ */
64
+ interface PublishedLoginAppearance {
65
+ login: ThemeLogin | null;
66
+ logo: LoginLogo | null;
67
+ /** `meta.defaultMode` of the tenant: without a session it is the only way to know the mode. */
68
+ mode?: LoginMode | null;
69
+ }
70
+ /** Everything the screen needs to paint itself, already resolved for the active mode. */
71
+ interface LoginView {
72
+ readonly images: readonly string[];
73
+ readonly intervalMs: number;
74
+ readonly effect: LoginEffect;
75
+ readonly transition: LoginTransition;
76
+ readonly label: string | null;
77
+ readonly indicators: boolean;
78
+ readonly position: LoginPosition;
79
+ readonly background: LoginBackground;
80
+ readonly captionPosition: LoginCaptionPosition;
81
+ readonly variables: Readonly<Record<string, string>>;
82
+ }
83
+ declare const LOGIN_EFFECTS: readonly LoginEffect[];
84
+ declare const LOGIN_TRANSITIONS: readonly LoginTransition[];
85
+ declare const LOGIN_POSITIONS: readonly LoginPosition[];
86
+ declare const LOGIN_BACKGROUNDS: readonly LoginBackground[];
87
+ declare const LOGIN_CAPTION_POSITIONS: readonly LoginCaptionPosition[];
88
+ declare const LOGIN_MAX_IMAGES = 12;
89
+ declare const LOGIN_INTERVAL_MIN_MS = 3000;
90
+ declare const LOGIN_INTERVAL_MAX_MS = 20000;
91
+ declare const LOGIN_INTERVAL_DEFAULT_MS = 7000;
92
+ declare const LOGIN_DEFAULT_EFFECT: LoginEffect;
93
+ declare const LOGIN_DEFAULT_TRANSITION: LoginTransition;
94
+ declare const LOGIN_DEFAULT_POSITION: LoginPosition;
95
+ declare const LOGIN_DEFAULT_BACKGROUND: LoginBackground;
96
+ /** Backgrounds whose shape is the form container; the others use a rectangular panel. */
97
+ declare const LOGIN_SHAPE_BACKGROUNDS: readonly LoginBackground[];
98
+ declare const hasLoginShapes: (background: LoginBackground) => boolean;
99
+ declare const LOGIN_META_SCHEMA: ThemeLogin;
100
+
101
+ /** `true` for a photo URL the login may paint (see `IMAGE_URL`). */
102
+ declare function isAllowedLoginImage(url: unknown): url is string;
103
+ /** Closed and bounded values; anything unrecognized is dropped or takes its default. */
104
+ declare function normalizeLogin(raw: unknown): ThemeLogin | null;
105
+ /**
106
+ * Body a host serves before sign-in (`{ login, logo, mode }`); `null` when it carries nothing
107
+ * usable. The library never fetches it: the host calls its own endpoint and passes the body here.
108
+ */
109
+ declare function normalizeLoginAppearance(raw: unknown): PublishedLoginAppearance | null;
110
+ /** Resolves a normalized `meta.login` for one mode. `images` are the photos to paint (non-empty). */
111
+ declare function buildLoginView(login: ThemeLogin | null, images: readonly string[], dark: boolean): LoginView;
112
+ interface LoginAppearanceSources {
113
+ /** `login` already normalized from the host's anonymous endpoint (`normalizeLoginAppearance`). */
114
+ published: ThemeLogin | null;
115
+ /** `meta.login` of the active theme, raw from the JSON. */
116
+ theme: unknown;
117
+ /** Host fallback photos (for example, bundled ones) used when no source brings its own. */
118
+ fallbackImages?: readonly string[];
119
+ }
120
+ /**
121
+ * Precedence: published appearance → theme `meta.login` → fallback photos → classic layout (`null`).
122
+ * Photos resolve separately: a configuration without photos keeps its motion and composition but
123
+ * takes the photos of the next source that has them.
124
+ */
125
+ declare function resolveLoginView(sources: LoginAppearanceSources, dark: boolean): LoginView | null;
126
+
127
+ /** Logo accepted by the brand block: the theme `meta.logo` or a published `LoginLogo`. */
128
+ interface LoginBrandLogo {
129
+ url: string;
130
+ urlDark?: string | null;
131
+ altText?: string;
132
+ }
133
+ /**
134
+ * Brand above the form title: the theme logo (its dark variant in dark mode) and an optional
135
+ * tagline. Without a usable logo it writes the alternative text as a wordmark, so the block never
136
+ * renders a broken image.
137
+ */
138
+ declare class SolLoginBrandComponent {
139
+ readonly logo: _angular_core.InputSignal<LoginBrandLogo | null>;
140
+ readonly dark: _angular_core.InputSignal<boolean>;
141
+ readonly tagline: _angular_core.InputSignal<string | null>;
142
+ protected readonly src: _angular_core.Signal<string | null>;
143
+ protected readonly alt: _angular_core.Signal<string>;
144
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolLoginBrandComponent, never>;
145
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolLoginBrandComponent, "sol-login-brand", never, { "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "dark": { "alias": "dark"; "required": false; "isSignal": true; }; "tagline": { "alias": "tagline"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
146
+ }
147
+
148
+ /**
149
+ * Themed sign-in frame: photos, veil, shapes and caption from `meta.login`, and the card where the
150
+ * host projects its own form (`<ng-content>`: user and password, SSO buttons, notices…). The
151
+ * library ships no auth logic and makes no HTTP call. With `view` null (no photos anywhere) it
152
+ * renders a plain centered card on the page background, so the host keeps one template.
153
+ *
154
+ * ```html
155
+ * <sol-login-frame [view]="view()" [tagline]="tagline()" [logo]="logo()" [dark]="isDark()">
156
+ * <h1>…</h1>
157
+ * <my-login-form />
158
+ * </sol-login-frame>
159
+ * ```
160
+ */
161
+ declare class SolLoginFrameComponent {
162
+ /** Resolved appearance (`resolveLoginView` / `buildLoginView`); `null` keeps the classic card. */
163
+ readonly view: _angular_core.InputSignal<LoginView | null>;
164
+ /** Large caption text over the photo (for example, the theme `meta.tagline`). */
165
+ readonly tagline: _angular_core.InputSignal<string>;
166
+ /** Brand block above the projected form; without it the host renders its own. */
167
+ readonly logo: _angular_core.InputSignal<LoginBrandLogo | null>;
168
+ /** Optional line under the logo. */
169
+ readonly brandTagline: _angular_core.InputSignal<string | null>;
170
+ /** Active mode, to pick the dark logo variant. */
171
+ readonly dark: _angular_core.InputSignal<boolean>;
172
+ protected readonly withShapes: _angular_core.Signal<boolean>;
173
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolLoginFrameComponent, never>;
174
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolLoginFrameComponent, "sol-login-frame", never, { "view": { "alias": "view"; "required": false; "isSignal": true; }; "tagline": { "alias": "tagline"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "brandTagline": { "alias": "brandTagline"; "required": false; "isSignal": true; }; "dark": { "alias": "dark"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
175
+ }
176
+
177
+ /**
178
+ * What sits behind the form: photos, veil, shapes and caption. Every layer is fixed to the
179
+ * viewport (or to the preview canvas, whose `transform` contains them) and takes no events. The
180
+ * real login (`sol-login-frame`) and the editor preview share it.
181
+ */
182
+ declare class SolLoginSceneComponent {
183
+ readonly view: _angular_core.InputSignal<LoginView>;
184
+ /** Large caption text (for example, the theme `meta.tagline`). Empty hides it. */
185
+ readonly tagline: _angular_core.InputSignal<string>;
186
+ protected readonly activePhoto: _angular_core.WritableSignal<number>;
187
+ protected readonly withShapes: _angular_core.Signal<boolean>;
188
+ /** With a gradient and the caption below, a bottom band; otherwise only the caption corner. */
189
+ protected readonly captionVeilClass: _angular_core.Signal<string>;
190
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolLoginSceneComponent, never>;
191
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolLoginSceneComponent, "sol-login-scene", never, { "view": { "alias": "view"; "required": true; "isSignal": true; }; "tagline": { "alias": "tagline"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
192
+ }
193
+
194
+ /**
195
+ * Full-screen photos of the login. The effect (what happens to the photo while in front) and the
196
+ * transition (how the next one comes in) are independent. It is decorative, so it is hidden from
197
+ * screen readers. Whoever asks for reduced motion sees the first photo, still. Photo URLs come from
198
+ * the theme only (`meta.login.images`, already normalized).
199
+ */
200
+ declare class SolLoginPhotosComponent {
201
+ readonly photos: _angular_core.InputSignal<readonly string[]>;
202
+ readonly effect: _angular_core.InputSignal<LoginEffect>;
203
+ readonly transition: _angular_core.InputSignal<LoginTransition>;
204
+ readonly intervalMs: _angular_core.InputSignal<number>;
205
+ /** Index of the photo in front after each change. */
206
+ readonly activePhoto: _angular_core.OutputEmitterRef<number>;
207
+ protected readonly active: _angular_core.WritableSignal<number>;
208
+ protected readonly previous: _angular_core.WritableSignal<number | null>;
209
+ protected readonly duration: _angular_core.Signal<string>;
210
+ private timer;
211
+ /** Reschedules when the list or the interval change: the theme preview edits them live. */
212
+ private readonly carousel;
213
+ constructor();
214
+ private stop;
215
+ private advance;
216
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolLoginPhotosComponent, never>;
217
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolLoginPhotosComponent, "sol-login-photos", never, { "photos": { "alias": "photos"; "required": true; "isSignal": true; }; "effect": { "alias": "effect"; "required": false; "isSignal": true; }; "transition": { "alias": "transition"; "required": false; "isSignal": true; }; "intervalMs": { "alias": "intervalMs"; "required": false; "isSignal": true; }; }, { "activePhoto": "activePhoto"; }, never, never, true, never>;
218
+ }
219
+
220
+ /**
221
+ * Shapes of the background: they are the form container. They live inside the card, anchored to
222
+ * its center, and scale with the real form box (see `SHAPE_FORM_BOX`). They are `div`s with
223
+ * `clip-path` and `mix-blend-mode`; the blend with the photo only works when no ancestor creates its
224
+ * own stacking context, which is why `em` does the scaling instead of `transform`. Below 768 px
225
+ * they are hidden and the card uses the simple panel.
226
+ */
227
+ declare class SolLoginShapesComponent {
228
+ private readonly element;
229
+ private readonly destroyRef;
230
+ readonly background: _angular_core.InputSignal<LoginBackground>;
231
+ readonly position: _angular_core.InputSignal<LoginPosition>;
232
+ /** Explicit scale for editor thumbnails, which are not anchored to a form. */
233
+ readonly fixedScale: _angular_core.InputSignal<number | null>;
234
+ private readonly scale;
235
+ protected readonly effectiveScale: _angular_core.Signal<number>;
236
+ protected readonly shapes: _angular_core.Signal<{
237
+ style: Record<string, string>;
238
+ child: Record<string, string> | null;
239
+ }[]>;
240
+ constructor();
241
+ private observe;
242
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolLoginShapesComponent, never>;
243
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolLoginShapesComponent, "sol-login-shapes", never, { "background": { "alias": "background"; "required": true; "isSignal": true; }; "position": { "alias": "position"; "required": true; "isSignal": true; }; "fixedScale": { "alias": "fixedScale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
244
+ }
245
+
246
+ /**
247
+ * Background of the form. With gradient, glass or solid it is the rectangular panel (driven by the
248
+ * `--sol-auth-panel-*` variables). With a shape there is no panel or veil: the shape is the
249
+ * container. Below 768 px, with a shape, a simple panel comes back.
250
+ */
251
+ declare class SolLoginPanelBackgroundComponent {
252
+ readonly background: _angular_core.InputSignal<LoginBackground>;
253
+ readonly position: _angular_core.InputSignal<LoginPosition>;
254
+ protected readonly classes: _angular_core.Signal<string>;
255
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolLoginPanelBackgroundComponent, never>;
256
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolLoginPanelBackgroundComponent, "sol-login-panel-background", never, { "background": { "alias": "background"; "required": true; "isSignal": true; }; "position": { "alias": "position"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
257
+ }
258
+
259
+ /**
260
+ * The login, scaled inside a frame, with the same scene, shapes and panel as the real one. The
261
+ * canvas `transform` is the containing block of its `position: fixed` layers. The tokens of the
262
+ * shown mode apply only here: "Dark" looks dark even when the app is light, and vice versa. The
263
+ * form is an inert mock: the preview never signs in.
264
+ */
265
+ declare class SolLoginPreviewComponent {
266
+ private readonly element;
267
+ private readonly destroyRef;
268
+ protected readonly t: (key: string, params?: Record<string, unknown>) => string;
269
+ readonly view: _angular_core.InputSignal<LoginView>;
270
+ /** Theme whose tokens paint the frame for the shown mode; `null` keeps the app tokens. */
271
+ readonly theme: _angular_core.InputSignal<ThemeFile | null>;
272
+ readonly dark: _angular_core.InputSignal<boolean>;
273
+ /** Caption text; by default the theme `meta.tagline` or the library fallback. */
274
+ readonly tagline: _angular_core.InputSignal<string | null>;
275
+ protected readonly shownTagline: _angular_core.Signal<string>;
276
+ protected readonly logo: _angular_core.Signal<_solercia_ui.ThemeLogo | null>;
277
+ protected readonly scale: _angular_core.WritableSignal<number>;
278
+ protected readonly height: _angular_core.WritableSignal<number>;
279
+ protected readonly withShapes: _angular_core.Signal<boolean>;
280
+ protected readonly variables: _angular_core.Signal<{
281
+ [x: string]: string;
282
+ }>;
283
+ constructor();
284
+ /** A theme that cannot be resolved must not break the preview: it keeps the app tokens. */
285
+ private modeTokens;
286
+ private observeWidth;
287
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolLoginPreviewComponent, never>;
288
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolLoginPreviewComponent, "sol-login-preview", never, { "view": { "alias": "view"; "required": true; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "dark": { "alias": "dark"; "required": false; "isSignal": true; }; "tagline": { "alias": "tagline"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
289
+ }
290
+
291
+ /** Uploads one photo and returns its published URL (usually the store `uploadLogo`). */
292
+ type LoginPhotoUploader = (file: File) => Observable<string>;
293
+ /**
294
+ * Editor of the theme `meta.login` block: photos, motion, per-mode composition and caption, with
295
+ * a live preview. It emits the whole block only when the person changes something; saving is the
296
+ * host's job (inside `sol-theme-studio`, its «Aplicar tema»). Veil and panel have no controls: they
297
+ * travel untouched inside the block.
298
+ */
299
+ declare class SolLoginAppearanceEditorComponent {
300
+ private readonly themeService;
301
+ protected readonly t: (key: string, params?: Record<string, unknown>) => string;
302
+ /** Current `meta.login`, already normalized; untouched, the editor only shows it. */
303
+ readonly base: _angular_core.InputSignal<ThemeLogin>;
304
+ /** Theme whose tokens paint the preview (the one being edited); by default the active one. */
305
+ readonly theme: _angular_core.InputSignal<ThemeFile | null>;
306
+ /** Host photos for the preview when the block has none, and what «Restablecer» restores. */
307
+ readonly fallbackImages: _angular_core.InputSignal<readonly string[]>;
308
+ /** Photo upload; without it the editor only orders and removes photos. */
309
+ readonly uploader: _angular_core.InputSignal<LoginPhotoUploader | null>;
310
+ /** Readable message of an upload error (for example, the store `extractStoreErrorMessage`). */
311
+ readonly describeError: _angular_core.InputSignal<((error: unknown) => string | null) | null>;
312
+ /** Shows the note and the button that send the person to «Aplicar tema». */
313
+ readonly showApplyShortcut: _angular_core.InputSignal<boolean>;
314
+ /** Full `meta.login` after each change made by the person. */
315
+ readonly loginChange: _angular_core.OutputEmitterRef<ThemeLogin>;
316
+ readonly goToApply: _angular_core.OutputEmitterRef<void>;
317
+ protected readonly effects: readonly _solercia_ui_login_appearance.LoginEffect[];
318
+ protected readonly transitions: readonly _solercia_ui_login_appearance.LoginTransition[];
319
+ protected readonly positions: readonly LoginPosition[];
320
+ protected readonly backgrounds: readonly LoginBackground[];
321
+ protected readonly modes: readonly LoginMode[];
322
+ protected readonly maxImages = 12;
323
+ protected readonly minSeconds: number;
324
+ protected readonly maxSeconds: number;
325
+ /** Draft of the person's edits; a new `base` (import, version, apply) discards it. */
326
+ private readonly draft;
327
+ protected readonly value: _angular_core.Signal<ThemeLogin>;
328
+ protected readonly previewTheme: _angular_core.Signal<ThemeFile | null>;
329
+ protected readonly mode: _angular_core.WritableSignal<LoginMode>;
330
+ protected readonly modeConfig: _angular_core.Signal<ThemeLoginModeConfig & {
331
+ position: LoginPosition;
332
+ background: LoginBackground;
333
+ }>;
334
+ protected readonly images: _angular_core.Signal<string[]>;
335
+ protected readonly full: _angular_core.Signal<boolean>;
336
+ protected readonly seconds: _angular_core.Signal<number>;
337
+ protected readonly effect: _angular_core.Signal<_solercia_ui_login_appearance.LoginEffect>;
338
+ protected readonly transition: _angular_core.Signal<_solercia_ui_login_appearance.LoginTransition>;
339
+ protected readonly captionLabel: _angular_core.Signal<string>;
340
+ protected readonly indicators: _angular_core.Signal<boolean>;
341
+ protected readonly uploading: _angular_core.WritableSignal<{
342
+ current: number;
343
+ total: number;
344
+ } | null>;
345
+ protected readonly photoError: _angular_core.WritableSignal<string | null>;
346
+ private readonly previous;
347
+ protected readonly canUndo: _angular_core.Signal<boolean>;
348
+ protected readonly resetDone: _angular_core.WritableSignal<boolean>;
349
+ private readonly safeFallback;
350
+ protected readonly previewView: _angular_core.Signal<_solercia_ui_login_appearance.LoginView | null>;
351
+ private commit;
352
+ protected set(changes: Partial<ThemeLogin>): void;
353
+ protected setMode(changes: Partial<ThemeLoginModeConfig>): void;
354
+ protected stepSeconds(delta: number): void;
355
+ protected setLabel(event: Event): void;
356
+ protected setIndicators(event: Event): void;
357
+ protected move(index: number, delta: number): void;
358
+ protected remove(index: number): void;
359
+ protected nameOf(url: string): string;
360
+ protected onFiles(event: Event): Promise<void>;
361
+ private upload;
362
+ protected reset(): void;
363
+ protected undo(): void;
364
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolLoginAppearanceEditorComponent, never>;
365
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolLoginAppearanceEditorComponent, "sol-login-appearance-editor", never, { "base": { "alias": "base"; "required": true; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "fallbackImages": { "alias": "fallbackImages"; "required": false; "isSignal": true; }; "uploader": { "alias": "uploader"; "required": false; "isSignal": true; }; "describeError": { "alias": "describeError"; "required": false; "isSignal": true; }; "showApplyShortcut": { "alias": "showApplyShortcut"; "required": false; "isSignal": true; }; }, { "loginChange": "loginChange"; "goToApply": "goToApply"; }, never, never, true, never>;
366
+ }
367
+
368
+ /** Text tree of the login appearance pieces (keys under `sol.loginAppearance`). */
369
+ type LoginAppearanceDictionary = {
370
+ readonly [key: string]: string | LoginAppearanceDictionary;
371
+ };
372
+ /** Default texts in Colombian Spanish (formal, tuteo). The host overrides any key in its engine. */
373
+ declare const SOL_LOGIN_APPEARANCE_I18N_ES_CO: LoginAppearanceDictionary;
374
+ declare const SOL_LOGIN_APPEARANCE_I18N_EN: LoginAppearanceDictionary;
375
+ /** Prefix of every key in the host translation engine. */
376
+ declare const LOGIN_APPEARANCE_I18N_PREFIX = "sol.loginAppearance.";
377
+
378
+ export { LOGIN_APPEARANCE_I18N_PREFIX, LOGIN_BACKGROUNDS, LOGIN_CAPTION_POSITIONS, LOGIN_DEFAULT_BACKGROUND, LOGIN_DEFAULT_EFFECT, LOGIN_DEFAULT_POSITION, LOGIN_DEFAULT_TRANSITION, LOGIN_EFFECTS, LOGIN_INTERVAL_DEFAULT_MS, LOGIN_INTERVAL_MAX_MS, LOGIN_INTERVAL_MIN_MS, LOGIN_MAX_IMAGES, LOGIN_META_SCHEMA, LOGIN_POSITIONS, LOGIN_SHAPE_BACKGROUNDS, LOGIN_TRANSITIONS, SOL_LOGIN_APPEARANCE_I18N_EN, SOL_LOGIN_APPEARANCE_I18N_ES_CO, SolLoginAppearanceEditorComponent, SolLoginBrandComponent, SolLoginFrameComponent, SolLoginPanelBackgroundComponent, SolLoginPhotosComponent, SolLoginPreviewComponent, SolLoginSceneComponent, SolLoginShapesComponent, buildLoginView, hasLoginShapes, isAllowedLoginImage, normalizeLogin, normalizeLoginAppearance, resolveLoginView };
379
+ export type { LoginAppearanceDictionary, LoginAppearanceSources, LoginBackground, LoginBrandLogo, LoginCaptionPosition, LoginEffect, LoginLogo, LoginMode, LoginPhotoUploader, LoginPosition, LoginTransition, LoginView, PublishedLoginAppearance, ThemeLogin, ThemeLoginCaption, ThemeLoginModeConfig, ThemeLoginPanel, ThemeLoginVeil };
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { InjectionToken, OnInit, OnDestroy } from '@angular/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { ThemeFile, ThemeMode, SolTableVariant, ThemeLogo } from '@solercia/ui';
5
+ import { ThemeLogin, LoginPhotoUploader } from '@solercia/ui/login-appearance';
5
6
 
6
7
  /**
7
8
  * Una versión guardada del tema del tenant. El `ThemeFile` NO lleva campo de versión: el
@@ -249,6 +250,12 @@ interface SolThemeStudioFeatures {
249
250
  * (`ThemeService.setDarkMode`), para que nadie quede pegado en un modo viejo. Por defecto `false`.
250
251
  */
251
252
  persistDefaultModeOnApply?: boolean;
253
+ /**
254
+ * Pestaña «Inicio de sesión»: editor de `meta.login` (fotos, movimiento, composición por modo y
255
+ * lema) de `@solercia/ui/login-appearance`, con su vista previa. Se guarda con el mismo
256
+ * «Aplicar tema». Por defecto `false`.
257
+ */
258
+ loginAppearance?: boolean;
252
259
  }
253
260
  /** Opción de un control segmentado: valor del contrato + clave de su texto. */
254
261
  interface SegmentOption {
@@ -368,6 +375,20 @@ declare class SolThemeStudioComponent implements OnInit, OnDestroy {
368
375
  protected readonly splitMax = 75;
369
376
  /** Base del builder: importado/versión en borrador → tema guardado → base del host → empaquetado. */
370
377
  private readonly workingBase;
378
+ /** Pestaña visible cuando `features.loginAppearance` está activa. */
379
+ protected readonly section: _angular_core.WritableSignal<"general" | "login">;
380
+ /** `meta.login` de la base, normalizado: lo que el editor muestra mientras nadie lo toque. */
381
+ protected readonly loginBase: _angular_core.Signal<ThemeLogin>;
382
+ /**
383
+ * Último `meta.login` editado; `null` mientras la persona no cambie nada en la pestaña. Una base
384
+ * nueva (importación, versión del historial) lo descarta: sin cambios, el `meta.login` propio de
385
+ * la base viaja intacto.
386
+ */
387
+ protected readonly loginEdited: _angular_core.WritableSignal<ThemeLogin | null>;
388
+ /** Hay cambios de inicio de sesión que todavía no se aplicaron. */
389
+ protected readonly loginUnsaved: _angular_core.Signal<boolean>;
390
+ protected readonly loginUploader: LoginPhotoUploader | null;
391
+ protected readonly describeStoreError: typeof extractStoreErrorMessage;
371
392
  /** Indicador de carga para la vista previa (solo con la sección activa). */
372
393
  protected readonly previewLoader: _angular_core.Signal<ThemeLoaderConfig | undefined>;
373
394
  /**
@@ -75,6 +75,23 @@ interface SolSelectOption {
75
75
  value: string;
76
76
  label: string;
77
77
  }
78
+ /**
79
+ * Se usa de dos formas:
80
+ * - **Formulario:** `ngModel` o `formControl` (ControlValueAccessor).
81
+ * - **Controlado:** `[value]` y `(valueChange)`. El valor llega en la primera
82
+ * pintada, sin esperar la escritura asíncrona de `ngModel`, así que también
83
+ * queda bien en el HTML prerenderizado. Lo que se muestra sigue siempre a
84
+ * `[value]`: si el dueño no lo cambia, el select conserva el valor anterior.
85
+ *
86
+ * Teclado (patrón de botón + listbox): flechas, Inicio y Fin mueven la opción
87
+ * activa; Enter la elige; Esc cierra y devuelve el foco al botón. Con buscador
88
+ * el foco queda en su campo; sin él, en la lista. En pantalla táctil el foco va
89
+ * siempre a la lista, para que el teclado no la tape. Con texto escrito en el
90
+ * buscador, Inicio y Fin vuelven a mover el cursor dentro del texto.
91
+ *
92
+ * El botón toma su nombre de `label`, de `ariaLabel` o de un `<label>` que lo
93
+ * envuelva.
94
+ */
78
95
  declare class SolSelectComponent implements ControlValueAccessor {
79
96
  private hostEl;
80
97
  /** Placeholder text when nothing is selected. */
@@ -95,6 +112,16 @@ declare class SolSelectComponent implements ControlValueAccessor {
95
112
  readonly showAllOption: _angular_core.InputSignal<boolean>;
96
113
  /** Label for the "all" option in single mode. */
97
114
  readonly allOptionLabel: _angular_core.InputSignal<string>;
115
+ /** Accessible name of the trigger when no `label` or wrapping `<label>` gives one. */
116
+ readonly ariaLabel: _angular_core.InputSignal<string>;
117
+ /** Placeholder (and accessible name) of the search input. */
118
+ readonly searchPlaceholder: _angular_core.InputSignal<string>;
119
+ /** Message when the search matches nothing. */
120
+ readonly emptyLabel: _angular_core.InputSignal<string>;
121
+ /** Controlled value in single mode: use it with `(valueChange)` instead of a form binding. */
122
+ readonly value: _angular_core.InputSignal<string | null | undefined>;
123
+ /** The person picked a value (single mode). */
124
+ readonly valueChange: _angular_core.OutputEmitterRef<string>;
98
125
  /**
99
126
  * Viewport width (px) at or below which the trigger and the inner search
100
127
  * rise to 16px to avoid iOS Safari auto-zoom. The CSS baseline keeps
@@ -111,12 +138,24 @@ declare class SolSelectComponent implements ControlValueAccessor {
111
138
  readonly searchTerm: _angular_core.WritableSignal<string>;
112
139
  readonly singleValue: _angular_core.WritableSignal<string>;
113
140
  readonly multiValues: _angular_core.WritableSignal<Set<string>>;
141
+ /** Opción activa dentro de `navItems`; -1 si no hay ninguna. */
142
+ readonly activeIndex: _angular_core.WritableSignal<number>;
143
+ readonly triggerBtn: _angular_core.Signal<ElementRef<HTMLButtonElement> | undefined>;
114
144
  readonly searchInput: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
115
145
  readonly dropdownPanel: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
116
- /** Id único que enlaza el trigger (aria-controls) con el listbox portaleado. */
146
+ readonly listbox: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
147
+ /** Ids únicos: enlazan el trigger (aria-controls) con el listbox portaleado. */
117
148
  private static nextId;
149
+ private readonly uid;
118
150
  readonly panelId: string;
151
+ readonly triggerId: string;
152
+ private readonly injector;
119
153
  readonly filteredOptions: _angular_core.Signal<SolSelectOption[]>;
154
+ /** Lo que se recorre con el teclado: la opción "Todos" (si hay) y las filtradas. */
155
+ readonly navItems: _angular_core.Signal<SolSelectOption[]>;
156
+ readonly activeOptionId: _angular_core.Signal<string | null>;
157
+ /** `ariaLabel` tapa el contenido del botón: el valor vigente se repite en el nombre. */
158
+ readonly triggerAriaLabel: _angular_core.Signal<string | null>;
120
159
  readonly displayText: _angular_core.Signal<string>;
121
160
  readonly triggerClass: _angular_core.Signal<string>;
122
161
  private onChange;
@@ -125,9 +164,17 @@ declare class SolSelectComponent implements ControlValueAccessor {
125
164
  constructor(hostEl: ElementRef);
126
165
  onViewportResize(): void;
127
166
  private static readViewportWidth;
167
+ optionId(index: number): string;
128
168
  toggleDropdown(): void;
129
- closeDropdown(): void;
169
+ private openDropdown;
170
+ /** `returnFocus`: al elegir o con Esc el foco vuelve al botón; con un clic fuera, se queda donde cayó. */
171
+ closeDropdown(returnFocus?: boolean): void;
130
172
  onSearchInput(event: Event): void;
173
+ /** Teclado del botón y del panel (el panel vive fuera del host, portaleado). */
174
+ onKeydown(event: KeyboardEvent): void;
175
+ private moveActive;
176
+ private chooseActive;
177
+ private scrollActiveIntoView;
131
178
  isSelected(value: string): boolean;
132
179
  onOptionClick(value: string): void;
133
180
  onSelectSingle(value: string): void;
@@ -140,7 +187,7 @@ declare class SolSelectComponent implements ControlValueAccessor {
140
187
  setDisabledState(_: boolean): void;
141
188
  private emitMultiValue;
142
189
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolSelectComponent, never>;
143
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolSelectComponent, "sol-select", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "showAllOption": { "alias": "showAllOption"; "required": false; "isSignal": true; }; "allOptionLabel": { "alias": "allOptionLabel"; "required": false; "isSignal": true; }; "mobileBreakpoint": { "alias": "mobileBreakpoint"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
190
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolSelectComponent, "sol-select", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "showAllOption": { "alias": "showAllOption"; "required": false; "isSignal": true; }; "allOptionLabel": { "alias": "allOptionLabel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "mobileBreakpoint": { "alias": "mobileBreakpoint"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
144
191
  }
145
192
 
146
193
  declare class SolTextareaComponent implements ControlValueAccessor {