@solercia/ui 0.3.0 → 0.3.1

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 (30) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/fesm2022/solercia-ui.mjs +1884 -112
  3. package/fesm2022/solercia-ui.mjs.map +1 -1
  4. package/package.json +3 -2
  5. package/types/solercia-ui.d.ts +606 -26
  6. package/schematics/collection.json +0 -34
  7. package/schematics/entity/files/api/__name__-api.service.ts.template +0 -51
  8. package/schematics/entity/files/index.ts.template +0 -2
  9. package/schematics/entity/files/model/__name__.model.ts.template +0 -16
  10. package/schematics/entity/index.js +0 -40
  11. package/schematics/entity/schema.json +0 -19
  12. package/schematics/feature/files/index.ts.template +0 -1
  13. package/schematics/feature/files/ui/__name__.component.ts.template +0 -41
  14. package/schematics/feature/index.js +0 -40
  15. package/schematics/feature/schema.json +0 -19
  16. package/schematics/migrations/1-noop/index.js +0 -19
  17. package/schematics/migrations.json +0 -10
  18. package/schematics/ng-add/index.js +0 -340
  19. package/schematics/ng-add/schema.json +0 -18
  20. package/schematics/package.json +0 -3
  21. package/schematics/page/files/__name__.routes.ts.template +0 -6
  22. package/schematics/page/files/index.ts.template +0 -2
  23. package/schematics/page/files/ui/__name__-page.component.ts.template +0 -31
  24. package/schematics/page/index.js +0 -38
  25. package/schematics/page/schema.json +0 -19
  26. package/schematics/utils.js +0 -127
  27. package/schematics/widget/files/index.ts.template +0 -1
  28. package/schematics/widget/files/ui/__name__.component.ts.template +0 -54
  29. package/schematics/widget/index.js +0 -40
  30. package/schematics/widget/schema.json +0 -19
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, computed, ChangeDetectionStrategy, Component, signal, forwardRef, inject, viewChild, effect, HostListener, InjectionToken, numberAttribute, ElementRef, TemplateRef, Directive, model, contentChildren, linkedSignal, contentChild, untracked, Injectable, provideAppInitializer, DestroyRef, viewChildren } from '@angular/core';
2
+ import { input, output, computed, ChangeDetectionStrategy, Component, signal, forwardRef, inject, ElementRef, effect, Directive, viewChild, HostListener, InjectionToken, numberAttribute, TemplateRef, model, contentChildren, linkedSignal, contentChild, untracked, Injectable, provideAppInitializer, DestroyRef, viewChildren } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
4
  import { DomSanitizer } from '@angular/platform-browser';
5
5
  import { NgTemplateOutlet } from '@angular/common';
@@ -64,7 +64,7 @@ class SolButtonComponent {
64
64
  }
65
65
  <ng-content />
66
66
  </button>
67
- `, isInline: true, styles: [":host{display:inline-block;--sol-btn-primary-bg: var(--sol-color-primary, #6366f1);--sol-btn-primary-text: var(--sol-color-primary-contrast, #ffffff);--sol-btn-secondary-bg: var(--sol-color-secondary, #e2e8f0);--sol-btn-secondary-text: var(--sol-color-secondary-contrast, #1e293b);--sol-btn-danger-bg: var(--sol-color-danger, #ef4444);--sol-btn-danger-text: var(--sol-color-danger-contrast, #ffffff);--sol-btn-ghost-bg: transparent;--sol-btn-ghost-text: var(--sol-color-primary, #6366f1);--sol-btn-font-sm: var(--sol-font-size-sm, .75rem);--sol-btn-font-md: var(--sol-font-size-md, .875rem);--sol-btn-font-lg: var(--sol-font-size-lg, 1rem);--sol-btn-padding-sm: var(--sol-spacing-xs, .25rem) var(--sol-spacing-sm, .5rem);--sol-btn-padding-md: var(--sol-spacing-sm, .5rem) var(--sol-spacing-md, 1rem);--sol-btn-padding-lg: var(--sol-spacing-md, .75rem) var(--sol-spacing-lg, 1.5rem);--sol-btn-radius: var(--sol-button-radius, var(--sol-border-radius-md, .5rem));--sol-btn-font-weight: var(--sol-button-weight, 500);--sol-btn-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-btn-focus-ring: var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-btn-disabled-opacity: var(--sol-disabled-opacity, .55)}.sol-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;border:none;border-radius:var(--sol-btn-radius);box-shadow:var(--sol-button-shadow, none);font-family:inherit;font-weight:var(--sol-btn-font-weight);text-transform:var(--sol-button-transform, none);line-height:1;cursor:pointer;transition:background-color var(--sol-btn-transition),box-shadow var(--sol-btn-transition),transform var(--sol-btn-transition),filter var(--sol-btn-transition),opacity var(--sol-btn-transition);white-space:nowrap;-webkit-user-select:none;user-select:none}.sol-btn:active:not(:disabled){transform:scale(var(--sol-press-scale, .98))}.sol-btn:focus-visible{outline:none;box-shadow:var(--sol-btn-focus-ring)}.sol-btn:disabled{cursor:not-allowed;opacity:var(--sol-btn-disabled-opacity)}.sol-btn--primary{background-color:var(--sol-btn-primary-bg);color:var(--sol-btn-primary-text)}.sol-btn--primary:hover:not(:disabled){filter:brightness(1.1)}.sol-btn--primary:active:not(:disabled){filter:brightness(.95)}.sol-btn--secondary{background-color:var(--sol-btn-secondary-bg);color:var(--sol-btn-secondary-text)}.sol-btn--secondary:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-secondary-bg) 80%,black)}.sol-btn--secondary:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-secondary-bg) 70%,black)}.sol-btn--danger{background-color:var(--sol-btn-danger-bg);color:var(--sol-btn-danger-text)}.sol-btn--danger:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-danger-bg) 85%,black)}.sol-btn--danger:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-danger-bg) 75%,black)}.sol-btn--ghost{background-color:var(--sol-btn-ghost-bg);color:var(--sol-btn-ghost-text)}.sol-btn--ghost:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-ghost-text) 10%,transparent)}.sol-btn--ghost:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-ghost-text) 18%,transparent)}.sol-btn--sm{font-size:var(--sol-font-size-sm, 12px);height:32px;padding:0 12px}.sol-btn--md{font-size:var(--sol-font-size-base, 14px);height:36px;padding:0 16px}.sol-btn--lg{font-size:var(--sol-font-size-base, 14px);height:40px;padding:0 20px}.sol-btn__spinner{width:1em;height:1em;flex-shrink:0;animation:sol-spin .75s linear infinite}@keyframes sol-spin{to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
67
+ `, isInline: true, styles: [":host{display:inline-block;--sol-btn-primary-bg: var(--sol-color-primary, #6366f1);--sol-btn-primary-text: var(--sol-color-primary-contrast, #ffffff);--sol-btn-secondary-bg: var(--sol-color-secondary, #e2e8f0);--sol-btn-secondary-text: var(--sol-color-secondary-contrast, #1e293b);--sol-btn-danger-bg: var(--sol-color-danger, #ef4444);--sol-btn-danger-text: var(--sol-color-danger-contrast, #ffffff);--sol-btn-ghost-bg: transparent;--sol-btn-ghost-text: var(--sol-color-primary, #6366f1);--sol-btn-font-sm: var(--sol-font-size-sm, .75rem);--sol-btn-font-md: var(--sol-font-size-md, .875rem);--sol-btn-font-lg: var(--sol-font-size-lg, 1rem);--sol-btn-padding-sm: var(--sol-spacing-xs, .25rem) var(--sol-spacing-sm, .5rem);--sol-btn-padding-md: var(--sol-spacing-sm, .5rem) var(--sol-spacing-md, 1rem);--sol-btn-padding-lg: var(--sol-spacing-md, .75rem) var(--sol-spacing-lg, 1.5rem);--sol-btn-radius: var(--sol-button-radius, var(--sol-border-radius-md, .5rem));--sol-btn-font-weight: var(--sol-button-weight, 500);--sol-btn-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-btn-focus-ring: var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-btn-disabled-opacity: var(--sol-disabled-opacity, .55)}.sol-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;border:none;border-radius:var(--sol-btn-radius);box-shadow:var(--sol-button-shadow, none);font-family:inherit;font-weight:var(--sol-btn-font-weight);text-transform:var(--sol-button-transform, none);line-height:1;cursor:pointer;transition:background-color var(--sol-btn-transition),box-shadow var(--sol-btn-transition),transform var(--sol-btn-transition),filter var(--sol-btn-transition),opacity var(--sol-btn-transition);white-space:nowrap;-webkit-user-select:none;user-select:none}.sol-btn:active:not(:disabled){transform:scale(var(--sol-press-scale, .98))}.sol-btn:focus-visible{outline:none;box-shadow:var(--sol-btn-focus-ring)}.sol-btn:disabled{cursor:not-allowed;opacity:var(--sol-btn-disabled-opacity)}.sol-btn--primary{background-color:var(--sol-btn-primary-bg);color:var(--sol-btn-primary-text)}.sol-btn--primary:hover:not(:disabled){filter:brightness(1.1)}.sol-btn--primary:active:not(:disabled){filter:brightness(.95)}.sol-btn--secondary{background-color:var(--sol-btn-secondary-bg);color:var(--sol-btn-secondary-text)}.sol-btn--secondary:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-secondary-bg) 80%,black)}.sol-btn--secondary:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-secondary-bg) 70%,black)}.sol-btn--danger{background-color:var(--sol-btn-danger-bg);color:var(--sol-btn-danger-text)}.sol-btn--danger:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-danger-bg) 85%,black)}.sol-btn--danger:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-danger-bg) 75%,black)}.sol-btn--ghost{background-color:var(--sol-btn-ghost-bg);color:var(--sol-btn-ghost-text)}.sol-btn--ghost:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-ghost-text) 10%,transparent)}.sol-btn--ghost:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-ghost-text) 18%,transparent)}.sol-btn--sm{font-size:var(--sol-font-size-sm, 12px);height:32px;padding:0 12px}.sol-btn--md{font-size:var(--sol-font-size-base, 14px);height:36px;padding:0 16px}.sol-btn--lg{font-size:var(--sol-font-size-base, 14px);height:40px;padding:0 20px}.sol-btn--touch{font-size:var(--sol-font-size-base, 14px);height:44px;padding:0 20px}.sol-btn__spinner{width:1em;height:1em;flex-shrink:0;animation:sol-spin .75s linear infinite}@keyframes sol-spin{to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
68
  }
69
69
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolButtonComponent, decorators: [{
70
70
  type: Component,
@@ -95,7 +95,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
95
95
  }
96
96
  <ng-content />
97
97
  </button>
98
- `, styles: [":host{display:inline-block;--sol-btn-primary-bg: var(--sol-color-primary, #6366f1);--sol-btn-primary-text: var(--sol-color-primary-contrast, #ffffff);--sol-btn-secondary-bg: var(--sol-color-secondary, #e2e8f0);--sol-btn-secondary-text: var(--sol-color-secondary-contrast, #1e293b);--sol-btn-danger-bg: var(--sol-color-danger, #ef4444);--sol-btn-danger-text: var(--sol-color-danger-contrast, #ffffff);--sol-btn-ghost-bg: transparent;--sol-btn-ghost-text: var(--sol-color-primary, #6366f1);--sol-btn-font-sm: var(--sol-font-size-sm, .75rem);--sol-btn-font-md: var(--sol-font-size-md, .875rem);--sol-btn-font-lg: var(--sol-font-size-lg, 1rem);--sol-btn-padding-sm: var(--sol-spacing-xs, .25rem) var(--sol-spacing-sm, .5rem);--sol-btn-padding-md: var(--sol-spacing-sm, .5rem) var(--sol-spacing-md, 1rem);--sol-btn-padding-lg: var(--sol-spacing-md, .75rem) var(--sol-spacing-lg, 1.5rem);--sol-btn-radius: var(--sol-button-radius, var(--sol-border-radius-md, .5rem));--sol-btn-font-weight: var(--sol-button-weight, 500);--sol-btn-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-btn-focus-ring: var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-btn-disabled-opacity: var(--sol-disabled-opacity, .55)}.sol-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;border:none;border-radius:var(--sol-btn-radius);box-shadow:var(--sol-button-shadow, none);font-family:inherit;font-weight:var(--sol-btn-font-weight);text-transform:var(--sol-button-transform, none);line-height:1;cursor:pointer;transition:background-color var(--sol-btn-transition),box-shadow var(--sol-btn-transition),transform var(--sol-btn-transition),filter var(--sol-btn-transition),opacity var(--sol-btn-transition);white-space:nowrap;-webkit-user-select:none;user-select:none}.sol-btn:active:not(:disabled){transform:scale(var(--sol-press-scale, .98))}.sol-btn:focus-visible{outline:none;box-shadow:var(--sol-btn-focus-ring)}.sol-btn:disabled{cursor:not-allowed;opacity:var(--sol-btn-disabled-opacity)}.sol-btn--primary{background-color:var(--sol-btn-primary-bg);color:var(--sol-btn-primary-text)}.sol-btn--primary:hover:not(:disabled){filter:brightness(1.1)}.sol-btn--primary:active:not(:disabled){filter:brightness(.95)}.sol-btn--secondary{background-color:var(--sol-btn-secondary-bg);color:var(--sol-btn-secondary-text)}.sol-btn--secondary:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-secondary-bg) 80%,black)}.sol-btn--secondary:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-secondary-bg) 70%,black)}.sol-btn--danger{background-color:var(--sol-btn-danger-bg);color:var(--sol-btn-danger-text)}.sol-btn--danger:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-danger-bg) 85%,black)}.sol-btn--danger:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-danger-bg) 75%,black)}.sol-btn--ghost{background-color:var(--sol-btn-ghost-bg);color:var(--sol-btn-ghost-text)}.sol-btn--ghost:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-ghost-text) 10%,transparent)}.sol-btn--ghost:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-ghost-text) 18%,transparent)}.sol-btn--sm{font-size:var(--sol-font-size-sm, 12px);height:32px;padding:0 12px}.sol-btn--md{font-size:var(--sol-font-size-base, 14px);height:36px;padding:0 16px}.sol-btn--lg{font-size:var(--sol-font-size-base, 14px);height:40px;padding:0 20px}.sol-btn__spinner{width:1em;height:1em;flex-shrink:0;animation:sol-spin .75s linear infinite}@keyframes sol-spin{to{transform:rotate(360deg)}}\n"] }]
98
+ `, styles: [":host{display:inline-block;--sol-btn-primary-bg: var(--sol-color-primary, #6366f1);--sol-btn-primary-text: var(--sol-color-primary-contrast, #ffffff);--sol-btn-secondary-bg: var(--sol-color-secondary, #e2e8f0);--sol-btn-secondary-text: var(--sol-color-secondary-contrast, #1e293b);--sol-btn-danger-bg: var(--sol-color-danger, #ef4444);--sol-btn-danger-text: var(--sol-color-danger-contrast, #ffffff);--sol-btn-ghost-bg: transparent;--sol-btn-ghost-text: var(--sol-color-primary, #6366f1);--sol-btn-font-sm: var(--sol-font-size-sm, .75rem);--sol-btn-font-md: var(--sol-font-size-md, .875rem);--sol-btn-font-lg: var(--sol-font-size-lg, 1rem);--sol-btn-padding-sm: var(--sol-spacing-xs, .25rem) var(--sol-spacing-sm, .5rem);--sol-btn-padding-md: var(--sol-spacing-sm, .5rem) var(--sol-spacing-md, 1rem);--sol-btn-padding-lg: var(--sol-spacing-md, .75rem) var(--sol-spacing-lg, 1.5rem);--sol-btn-radius: var(--sol-button-radius, var(--sol-border-radius-md, .5rem));--sol-btn-font-weight: var(--sol-button-weight, 500);--sol-btn-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-btn-focus-ring: var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-btn-disabled-opacity: var(--sol-disabled-opacity, .55)}.sol-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;border:none;border-radius:var(--sol-btn-radius);box-shadow:var(--sol-button-shadow, none);font-family:inherit;font-weight:var(--sol-btn-font-weight);text-transform:var(--sol-button-transform, none);line-height:1;cursor:pointer;transition:background-color var(--sol-btn-transition),box-shadow var(--sol-btn-transition),transform var(--sol-btn-transition),filter var(--sol-btn-transition),opacity var(--sol-btn-transition);white-space:nowrap;-webkit-user-select:none;user-select:none}.sol-btn:active:not(:disabled){transform:scale(var(--sol-press-scale, .98))}.sol-btn:focus-visible{outline:none;box-shadow:var(--sol-btn-focus-ring)}.sol-btn:disabled{cursor:not-allowed;opacity:var(--sol-btn-disabled-opacity)}.sol-btn--primary{background-color:var(--sol-btn-primary-bg);color:var(--sol-btn-primary-text)}.sol-btn--primary:hover:not(:disabled){filter:brightness(1.1)}.sol-btn--primary:active:not(:disabled){filter:brightness(.95)}.sol-btn--secondary{background-color:var(--sol-btn-secondary-bg);color:var(--sol-btn-secondary-text)}.sol-btn--secondary:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-secondary-bg) 80%,black)}.sol-btn--secondary:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-secondary-bg) 70%,black)}.sol-btn--danger{background-color:var(--sol-btn-danger-bg);color:var(--sol-btn-danger-text)}.sol-btn--danger:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-danger-bg) 85%,black)}.sol-btn--danger:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-danger-bg) 75%,black)}.sol-btn--ghost{background-color:var(--sol-btn-ghost-bg);color:var(--sol-btn-ghost-text)}.sol-btn--ghost:hover:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-ghost-text) 10%,transparent)}.sol-btn--ghost:active:not(:disabled){background-color:color-mix(in srgb,var(--sol-btn-ghost-text) 18%,transparent)}.sol-btn--sm{font-size:var(--sol-font-size-sm, 12px);height:32px;padding:0 12px}.sol-btn--md{font-size:var(--sol-font-size-base, 14px);height:36px;padding:0 16px}.sol-btn--lg{font-size:var(--sol-font-size-base, 14px);height:40px;padding:0 20px}.sol-btn--touch{font-size:var(--sol-font-size-base, 14px);height:44px;padding:0 20px}.sol-btn__spinner{width:1em;height:1em;flex-shrink:0;animation:sol-spin .75s linear infinite}@keyframes sol-spin{to{transform:rotate(360deg)}}\n"] }]
99
99
  }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
100
100
 
101
101
  class SolInputComponent {
@@ -741,6 +741,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
741
741
  args: [{ selector: 'sol-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `<span class="sol-icon" [class]="sizeClass()" [innerHTML]="svg()"></span>`, styles: [".sol-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.sol-icon :deep(svg){width:100%;height:100%}.sol-icon-sm{width:16px;height:16px}.sol-icon-md{width:20px;height:20px}.sol-icon-lg{width:24px;height:24px}\n"] }]
742
742
  }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
743
743
 
744
+ /**
745
+ * `solFloatingPanel` — portal manual de paneles flotantes (CP-2).
746
+ *
747
+ * Extraído del código inline de `sol-select` para compartirlo con cualquier
748
+ * componente cuyo panel deba flotar POR ENCIMA de un `sol-modal` o un
749
+ * `sol-drawer`. El panel se mueve a `document.body` y se posiciona con
750
+ * `position: fixed` sobre coordenadas del viewport, de modo que ningún
751
+ * ancestro con `overflow` o `backdrop-filter` (típicamente `.sol-modal-body`)
752
+ * lo recorte.
753
+ *
754
+ * Cálculo de posición 100% manual: el proyecto prohíbe librerías de
755
+ * posicionamiento externas (`@floating-ui/dom`, `popper.js`).
756
+ *
757
+ * NO aplica a popovers deliberadamente clampados dentro de su host
758
+ * (p. ej. `sol-rich-editor`), que no desbordan y no deben portalearse.
759
+ */
760
+ /** Id del `<style>` compartido inyectado una sola vez en `document.head`. */
761
+ const FLOATING_PANEL_STYLE_ID = 'sol-floating-panel-styles';
762
+ /**
763
+ * Clase compartida de todo panel portaleado: el `z-index` supera al del modal
764
+ * para que el panel nunca quede debajo del overlay. Vive en un `<style>`
765
+ * global porque el panel deja de heredar del host al portalearse, y los
766
+ * estilos encapsulados por componente no deben competir por especificidad.
767
+ */
768
+ function ensureFloatingPanelStyles() {
769
+ if (typeof document === 'undefined')
770
+ return;
771
+ if (document.getElementById(FLOATING_PANEL_STYLE_ID))
772
+ return;
773
+ const style = document.createElement('style');
774
+ style.id = FLOATING_PANEL_STYLE_ID;
775
+ style.textContent =
776
+ '.sol-floating-panel { z-index: calc(var(--sol-z-modal, 1050) + 10); }';
777
+ document.head.appendChild(style);
778
+ }
779
+ class SolFloatingPanelDirective {
780
+ /** Elemento disparador cuyo rectángulo ancla el panel (requerido). */
781
+ trigger = input.required({ ...(ngDevMode ? { debugName: "trigger" } : /* istanbul ignore next */ {}), alias: 'solFloatingPanel' });
782
+ /** Separación en px entre el disparador y el panel. */
783
+ gap = input(4, /* @ts-ignore */
784
+ ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
785
+ /**
786
+ * Espacio mínimo (px) que debe quedar bajo el disparador para abrir hacia
787
+ * abajo. Si no alcanza —y sí hay espacio arriba— el panel voltea (`dropUp`).
788
+ */
789
+ flipThreshold = input(300, /* @ts-ignore */
790
+ ...(ngDevMode ? [{ debugName: "flipThreshold" }] : /* istanbul ignore next */ []));
791
+ /** Iguala el ancho del panel al del disparador (falso = ancho propio). */
792
+ matchTriggerWidth = input(true, /* @ts-ignore */
793
+ ...(ngDevMode ? [{ debugName: "matchTriggerWidth" }] : /* istanbul ignore next */ []));
794
+ /** Alineación horizontal contra el borde `start` o `end` del disparador. */
795
+ align = input('start', /* @ts-ignore */
796
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
797
+ _dropUp = signal(false, /* @ts-ignore */
798
+ ...(ngDevMode ? [{ debugName: "_dropUp" }] : /* istanbul ignore next */ []));
799
+ /** Verdadero cuando el panel abrió hacia arriba (el host aplica su clase). */
800
+ dropUp = this._dropUp.asReadonly();
801
+ /** Emite solo cuando la orientación cambia, para enlazarlo desde el template. */
802
+ dropUpChange = output();
803
+ panel = inject(ElementRef).nativeElement;
804
+ /** Disparador vigente mientras el panel está portaleado. */
805
+ activeTrigger = null;
806
+ /** Última orientación emitida (`null` = todavía no se emitió ninguna). */
807
+ lastEmittedDropUp = null;
808
+ /** Misma referencia para `addEventListener` / `removeEventListener`. */
809
+ repositionHandler = () => this.reposition();
810
+ constructor() {
811
+ ensureFloatingPanelStyles();
812
+ // El ciclo de vida del portal se ata al de la directiva: Angular la crea
813
+ // cuando el `@if` del host materializa el panel y la destruye al cerrarlo,
814
+ // así que el `onCleanup` retira listeners y nodo sin fugas.
815
+ effect(onCleanup => {
816
+ this.attach(this.trigger());
817
+ onCleanup(() => this.detach());
818
+ });
819
+ }
820
+ /** Adhiere el panel a `document.body` y lo posiciona siguiendo al disparador. */
821
+ attach(trigger) {
822
+ this.activeTrigger = trigger;
823
+ document.body.appendChild(this.panel);
824
+ this.reposition();
825
+ // `capture: true` es OBLIGATORIO: sin él, el listener no se entera del
826
+ // scroll de contenedores internos como `.sol-modal-body` (los eventos de
827
+ // scroll no burbujean), que es justo el caso que motiva este portal.
828
+ window.addEventListener('scroll', this.repositionHandler, { capture: true, passive: true });
829
+ window.addEventListener('resize', this.repositionHandler, { passive: true });
830
+ }
831
+ /** Retira listeners y el nodo portaleado. */
832
+ detach() {
833
+ window.removeEventListener('scroll', this.repositionHandler, { capture: true });
834
+ window.removeEventListener('resize', this.repositionHandler);
835
+ // Guarda necesaria: Angular puede haber destruido el nodo por su cuenta
836
+ // (el `removeChild` sobre un nodo ya desprendido lanzaría).
837
+ if (this.panel.parentNode === document.body) {
838
+ document.body.removeChild(this.panel);
839
+ }
840
+ this.activeTrigger = null;
841
+ this.lastEmittedDropUp = null;
842
+ }
843
+ /**
844
+ * Recalcula la posición del panel en coordenadas fijas del viewport.
845
+ * Público para que el host pueda forzar el recálculo tras cambios de
846
+ * contenido que alteren el tamaño del panel.
847
+ */
848
+ reposition() {
849
+ const trigger = this.activeTrigger;
850
+ if (!trigger)
851
+ return;
852
+ const rect = trigger.getBoundingClientRect();
853
+ const gap = this.gap();
854
+ const threshold = this.flipThreshold();
855
+ // Voltea solo si abajo no cabe Y arriba sí: sin la segunda condición, en
856
+ // viewports muy bajos el panel se iría hacia arriba a un espacio igual de
857
+ // insuficiente.
858
+ const spaceBelow = window.innerHeight - rect.bottom;
859
+ const dropUp = spaceBelow < threshold && rect.top > threshold;
860
+ this.setDropUp(dropUp);
861
+ const panel = this.panel;
862
+ panel.style.position = 'fixed';
863
+ panel.style.right = 'auto';
864
+ if (this.matchTriggerWidth()) {
865
+ panel.style.width = `${rect.width}px`;
866
+ }
867
+ panel.style.left = `${this.resolveLeft(rect, gap)}px`;
868
+ if (dropUp) {
869
+ panel.style.top = 'auto';
870
+ panel.style.bottom = `${window.innerHeight - rect.top + gap}px`;
871
+ }
872
+ else {
873
+ panel.style.top = `${rect.bottom + gap}px`;
874
+ panel.style.bottom = 'auto';
875
+ }
876
+ }
877
+ /** Coordenada X según la alineación, acotada al viewport cuando hay margen. */
878
+ resolveLeft(rect, gap) {
879
+ const width = this.matchTriggerWidth() ? rect.width : this.panel.offsetWidth;
880
+ let left = this.align() === 'end' ? rect.right - width : rect.left;
881
+ const maxLeft = window.innerWidth - width - gap;
882
+ if (maxLeft > gap)
883
+ left = Math.min(left, maxLeft);
884
+ return Math.max(gap, left);
885
+ }
886
+ /** Publica la orientación evitando emisiones repetidas en cada scroll. */
887
+ setDropUp(dropUp) {
888
+ this._dropUp.set(dropUp);
889
+ if (this.lastEmittedDropUp === dropUp)
890
+ return;
891
+ this.lastEmittedDropUp = dropUp;
892
+ this.dropUpChange.emit(dropUp);
893
+ }
894
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolFloatingPanelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
895
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: SolFloatingPanelDirective, isStandalone: true, selector: "[solFloatingPanel]", inputs: { trigger: { classPropertyName: "trigger", publicName: "solFloatingPanel", isSignal: true, isRequired: true, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, flipThreshold: { classPropertyName: "flipThreshold", publicName: "flipThreshold", isSignal: true, isRequired: false, transformFunction: null }, matchTriggerWidth: { classPropertyName: "matchTriggerWidth", publicName: "matchTriggerWidth", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropUpChange: "dropUpChange" }, host: { classAttribute: "sol-floating-panel" }, exportAs: ["solFloatingPanel"], ngImport: i0 });
896
+ }
897
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolFloatingPanelDirective, decorators: [{
898
+ type: Directive,
899
+ args: [{
900
+ selector: '[solFloatingPanel]',
901
+ standalone: true,
902
+ exportAs: 'solFloatingPanel',
903
+ host: { class: 'sol-floating-panel' },
904
+ }]
905
+ }], ctorParameters: () => [], propDecorators: { trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "solFloatingPanel", required: true }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], flipThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "flipThreshold", required: false }] }], matchTriggerWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchTriggerWidth", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], dropUpChange: [{ type: i0.Output, args: ["dropUpChange"] }] } });
906
+
744
907
  class SolSelectComponent {
745
908
  hostEl;
746
909
  /** Placeholder text when nothing is selected. */
@@ -783,17 +946,11 @@ class SolSelectComponent {
783
946
  ...(ngDevMode ? [{ debugName: "multiValues" }] : /* istanbul ignore next */ []));
784
947
  searchInput = viewChild('searchInput', /* @ts-ignore */
785
948
  ...(ngDevMode ? [{ debugName: "searchInput" }] : /* istanbul ignore next */ []));
786
- triggerBtn = viewChild('triggerBtn', /* @ts-ignore */
787
- ...(ngDevMode ? [{ debugName: "triggerBtn" }] : /* istanbul ignore next */ []));
788
949
  dropdownPanel = viewChild('dropdownPanel', /* @ts-ignore */
789
950
  ...(ngDevMode ? [{ debugName: "dropdownPanel" }] : /* istanbul ignore next */ []));
790
951
  /** Id único que enlaza el trigger (aria-controls) con el listbox portaleado. */
791
952
  static nextId = 0;
792
953
  panelId = `sol-select-panel-${SolSelectComponent.nextId++}`;
793
- /** Nodo del panel mientras vive portaleado en document.body. */
794
- portalPanel = null;
795
- /** Reposiciona el panel; misma referencia para add/removeEventListener. */
796
- reposition = () => this.positionPanel();
797
954
  filteredOptions = computed(() => {
798
955
  const term = this.searchTerm().toLowerCase();
799
956
  const opts = this.options();
@@ -835,23 +992,13 @@ class SolSelectComponent {
835
992
  const target = event.target;
836
993
  const insideHost = this.hostEl.nativeElement.contains(target);
837
994
  // El panel vive portaleado en document.body: también cuenta como "dentro".
838
- const insidePanel = this.portalPanel?.contains(target) ?? false;
995
+ const insidePanel = this.dropdownPanel()?.nativeElement.contains(target) ?? false;
839
996
  if (!insideHost && !insidePanel) {
840
997
  this.closeDropdown();
841
998
  }
842
999
  }
843
1000
  constructor(hostEl) {
844
1001
  this.hostEl = hostEl;
845
- // Portal manual (CP-2): cuando @if crea el panel, se mueve a document.body
846
- // con position:fixed y coordenadas del trigger; el cleanup del effect
847
- // retira listeners y el nodo al cerrar o destruir, sin fugas.
848
- effect(onCleanup => {
849
- const panel = this.dropdownPanel()?.nativeElement ?? null;
850
- if (!panel)
851
- return;
852
- this.attachPanel(panel);
853
- onCleanup(() => this.detachPanel());
854
- });
855
1002
  }
856
1003
  toggleDropdown() {
857
1004
  if (this.disabled())
@@ -862,49 +1009,6 @@ class SolSelectComponent {
862
1009
  setTimeout(() => this.searchInput()?.nativeElement?.focus(), 50);
863
1010
  }
864
1011
  }
865
- /** Adhiere el panel a document.body y lo posiciona siguiendo al trigger. */
866
- attachPanel(panel) {
867
- this.portalPanel = panel;
868
- document.body.appendChild(panel);
869
- this.positionPanel();
870
- window.addEventListener('scroll', this.reposition, { capture: true, passive: true });
871
- window.addEventListener('resize', this.reposition, { passive: true });
872
- }
873
- /** Retira listeners y el nodo portaleado (si Angular no lo removió ya). */
874
- detachPanel() {
875
- window.removeEventListener('scroll', this.reposition, { capture: true });
876
- window.removeEventListener('resize', this.reposition);
877
- if (this.portalPanel && this.portalPanel.parentNode === document.body) {
878
- document.body.removeChild(this.portalPanel);
879
- }
880
- this.portalPanel = null;
881
- }
882
- /**
883
- * Posiciona el panel con coordenadas fixed del viewport: ancho y eje X del
884
- * trigger; hacia abajo por defecto o anclado por bottom (dropUp) cuando el
885
- * espacio real bajo el trigger es menor a 300px.
886
- */
887
- positionPanel() {
888
- const panel = this.portalPanel;
889
- const trigger = this.triggerBtn()?.nativeElement;
890
- if (!panel || !trigger)
891
- return;
892
- const rect = trigger.getBoundingClientRect();
893
- const spaceBelow = window.innerHeight - rect.bottom;
894
- this.dropUp.set(spaceBelow < 300);
895
- panel.style.position = 'fixed';
896
- panel.style.left = `${rect.left}px`;
897
- panel.style.width = `${rect.width}px`;
898
- panel.style.right = 'auto';
899
- if (this.dropUp()) {
900
- panel.style.top = 'auto';
901
- panel.style.bottom = `${window.innerHeight - rect.top + 4}px`;
902
- }
903
- else {
904
- panel.style.top = `${rect.bottom + 4}px`;
905
- panel.style.bottom = 'auto';
906
- }
907
- }
908
1012
  closeDropdown() {
909
1013
  this.isOpen.set(false);
910
1014
  }
@@ -973,7 +1077,7 @@ class SolSelectComponent {
973
1077
  useExisting: forwardRef(() => SolSelectComponent),
974
1078
  multi: true,
975
1079
  },
976
- ], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "triggerBtn", first: true, predicate: ["triggerBtn"], descendants: true, isSignal: true }, { propertyName: "dropdownPanel", first: true, predicate: ["dropdownPanel"], descendants: true, isSignal: true }], ngImport: i0, template: `
1080
+ ], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "dropdownPanel", first: true, predicate: ["dropdownPanel"], descendants: true, isSignal: true }], ngImport: i0, template: `
977
1081
  @if (label()) {
978
1082
  <label class="sol-select__label">{{ label() }}</label>
979
1083
  }
@@ -997,15 +1101,18 @@ class SolSelectComponent {
997
1101
  </button>
998
1102
 
999
1103
  <!-- Panel del dropdown: al abrirse se portalea a document.body con
1000
- position:fixed (CP-2) para que ningún ancestro con overflow lo
1001
- recorte (ej. .sol-modal-body). El trigger queda enlazado por
1002
- aria-controls porque input y listbox viven en árboles distintos. -->
1104
+ position:fixed (CP-2, directiva compartida solFloatingPanel) para
1105
+ que ningún ancestro con overflow lo recorte (ej. .sol-modal-body).
1106
+ El trigger queda enlazado por aria-controls porque input y listbox
1107
+ viven en árboles distintos. -->
1003
1108
  @if (isOpen()) {
1004
1109
  <div
1005
1110
  #dropdownPanel
1006
1111
  class="sol-select__dropdown"
1007
1112
  role="listbox"
1008
1113
  [id]="panelId"
1114
+ [solFloatingPanel]="triggerBtn"
1115
+ (dropUpChange)="dropUp.set($event)"
1009
1116
  [class.sol-select__dropdown--up]="dropUp()"
1010
1117
  >
1011
1118
  <!-- Search -->
@@ -1068,11 +1175,11 @@ class SolSelectComponent {
1068
1175
  @if (error()) {
1069
1176
  <p class="sol-select__error">{{ error() }}</p>
1070
1177
  }
1071
- `, isInline: true, styles: [":host{display:block}:host,.sol-select__dropdown{--sol-select-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-select-text: var(--sol-color-text-primary, #1e293b);--sol-select-placeholder: var(--sol-color-text-muted, #94a3b8);--sol-select-border: var(--sol-border-color-default, #cbd5e1);--sol-select-border-focus: var(--sol-color-primary, #6366f1);--sol-select-error-color: var(--sol-color-danger, #ef4444);--sol-select-label-color: var(--sol-color-text-secondary, #475569);--sol-select-arrow-color: var(--sol-color-text-muted, #94a3b8);--sol-select-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-select-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-select-border-width: var(--sol-border-width-default, 1px);--sol-select-padding-x: var(--sol-space-sm, .75rem);--sol-select-height: var(--sol-size-input-height, 2.5rem);--sol-select-font-size: var(--sol-font-size-base, .875rem);--sol-select-label-font-size: var(--sol-font-size-sm, .75rem);--sol-select-label-font-weight: var(--sol-font-weight-bold, 600);--sol-select-shadow: var(--sol-input-shadow, var(--sol-shadow-sm, 0 1px 2px rgba(0,0,0,.05)));--sol-select-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-select-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-select-dropdown-bg: var(--sol-bg-surface, #ffffff);--sol-select-option-hover: var(--sol-color-bg-hover, rgba(0,0,0,.04));--sol-select-option-active-bg: color-mix(in srgb, var(--sol-color-primary, #6366f1) 12%, transparent);--sol-select-option-active-text: var(--sol-color-primary, #6366f1)}.sol-select__label{display:block;margin-bottom:.375rem;font-size:var(--sol-select-label-font-size);font-weight:var(--sol-select-label-font-weight);color:var(--sol-select-label-color);line-height:1.4}.sol-select__wrapper{position:relative;display:block}.sol-select__trigger{display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--sol-select-height);padding:0 var(--sol-select-padding-x);font-family:inherit;font-size:var(--sol-select-font-size);color:var(--sol-select-text);background-color:var(--sol-select-bg);border:var(--sol-input-border, var(--sol-select-border-width) solid var(--sol-select-border));border-radius:var(--sol-select-radius);box-shadow:var(--sol-select-shadow);cursor:pointer;transition:border-color var(--sol-select-transition),box-shadow var(--sol-select-transition);text-align:left}.sol-select__trigger:focus{outline:none;border:var(--sol-input-focus-border, var(--sol-select-border-width) solid var(--sol-select-border-focus));box-shadow:var(--sol-select-focus-ring)}.sol-select__trigger:disabled{cursor:not-allowed;opacity:var(--sol-select-disabled-opacity)}.sol-select__trigger--error{border-color:var(--sol-select-error-color)}.sol-select__trigger--open{border:var(--sol-input-focus-border, var(--sol-select-border-width) solid var(--sol-select-border-focus));box-shadow:var(--sol-select-focus-ring)}.sol-select__display{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sol-select__display--placeholder{color:var(--sol-select-placeholder)}.sol-select__arrow{width:1.25rem;height:1.25rem;flex-shrink:0;color:var(--sol-select-arrow-color);transition:transform var(--sol-select-transition)}.sol-select__arrow--open{transform:rotate(180deg)}.sol-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:calc(var(--sol-z-modal, 1050) + 10);background:var(--sol-select-dropdown-bg);border:var(--sol-select-border-width) solid var(--sol-select-border);border-radius:var(--sol-select-radius);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0,0,0,.15));max-height:280px;display:flex;flex-direction:column;animation:sol-select-fade .12s ease-out}.sol-select__search-box{padding:.5rem;border-bottom:1px solid var(--sol-select-border)}.sol-select__search{width:100%;height:2rem;padding:0 .5rem;font-family:inherit;font-size:var(--sol-select-font-size);color:var(--sol-select-text);background:var(--sol-select-bg);border:var(--sol-select-border-width) solid var(--sol-select-border);border-radius:calc(var(--sol-select-radius) - 2px);outline:none}.sol-select__search:focus{border-color:var(--sol-select-border-focus)}.sol-select__bulk-actions{display:flex;gap:.25rem;padding:.375rem .5rem;border-bottom:1px solid var(--sol-select-border)}.sol-select__bulk-btn{flex:1;padding:.25rem;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--sol-select-option-active-text);background:transparent;border:1px solid var(--sol-select-border);border-radius:calc(var(--sol-select-radius) - 2px);cursor:pointer;transition:background var(--sol-select-transition)}.sol-select__bulk-btn:hover{background:var(--sol-select-option-hover)}.sol-select__options{overflow-y:auto;flex:1;padding:.25rem 0}.sol-select__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:var(--sol-select-font-size);color:var(--sol-select-text);cursor:pointer;transition:background var(--sol-select-transition)}.sol-select__option:hover{background:var(--sol-select-option-hover)}.sol-select__option--active{background:var(--sol-select-option-active-bg);color:var(--sol-select-option-active-text);font-weight:500}.sol-select__check{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;border:2px solid var(--sol-select-border);border-radius:3px;font-size:.65rem;flex-shrink:0}.sol-select__check--checked{background:var(--sol-select-option-active-text);border-color:var(--sol-select-option-active-text);color:#fff}.sol-select__empty{padding:.75rem;text-align:center;color:var(--sol-select-placeholder);font-size:var(--sol-select-font-size)}.sol-select__error{margin:.25rem 0 0;font-size:var(--sol-select-label-font-size);color:var(--sol-select-error-color);line-height:1.4}.sol-select__dropdown--up{top:auto;bottom:calc(100% + 4px);animation:sol-select-fade-up .12s ease-out}@keyframes sol-select-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sol-select-fade-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(max-width:640px){.sol-select__search,.sol-select__trigger{font-size:16px}}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1178
+ `, isInline: true, styles: [":host{display:block}:host,.sol-select__dropdown{--sol-select-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-select-text: var(--sol-color-text-primary, #1e293b);--sol-select-placeholder: var(--sol-color-text-muted, #94a3b8);--sol-select-border: var(--sol-border-color-default, #cbd5e1);--sol-select-border-focus: var(--sol-color-primary, #6366f1);--sol-select-error-color: var(--sol-color-danger, #ef4444);--sol-select-label-color: var(--sol-color-text-secondary, #475569);--sol-select-arrow-color: var(--sol-color-text-muted, #94a3b8);--sol-select-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-select-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-select-border-width: var(--sol-border-width-default, 1px);--sol-select-padding-x: var(--sol-space-sm, .75rem);--sol-select-height: var(--sol-size-input-height, 2.5rem);--sol-select-font-size: var(--sol-font-size-base, .875rem);--sol-select-label-font-size: var(--sol-font-size-sm, .75rem);--sol-select-label-font-weight: var(--sol-font-weight-bold, 600);--sol-select-shadow: var(--sol-input-shadow, var(--sol-shadow-sm, 0 1px 2px rgba(0,0,0,.05)));--sol-select-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-select-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-select-dropdown-bg: var(--sol-bg-surface, #ffffff);--sol-select-option-hover: var(--sol-color-bg-hover, rgba(0,0,0,.04));--sol-select-option-active-bg: color-mix(in srgb, var(--sol-color-primary, #6366f1) 12%, transparent);--sol-select-option-active-text: var(--sol-color-primary, #6366f1)}.sol-select__label{display:block;margin-bottom:.375rem;font-size:var(--sol-select-label-font-size);font-weight:var(--sol-select-label-font-weight);color:var(--sol-select-label-color);line-height:1.4}.sol-select__wrapper{position:relative;display:block}.sol-select__trigger{display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--sol-select-height);padding:0 var(--sol-select-padding-x);font-family:inherit;font-size:var(--sol-select-font-size);color:var(--sol-select-text);background-color:var(--sol-select-bg);border:var(--sol-input-border, var(--sol-select-border-width) solid var(--sol-select-border));border-radius:var(--sol-select-radius);box-shadow:var(--sol-select-shadow);cursor:pointer;transition:border-color var(--sol-select-transition),box-shadow var(--sol-select-transition);text-align:left}.sol-select__trigger:focus{outline:none;border:var(--sol-input-focus-border, var(--sol-select-border-width) solid var(--sol-select-border-focus));box-shadow:var(--sol-select-focus-ring)}.sol-select__trigger:disabled{cursor:not-allowed;opacity:var(--sol-select-disabled-opacity)}.sol-select__trigger--error{border-color:var(--sol-select-error-color)}.sol-select__trigger--open{border:var(--sol-input-focus-border, var(--sol-select-border-width) solid var(--sol-select-border-focus));box-shadow:var(--sol-select-focus-ring)}.sol-select__display{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sol-select__display--placeholder{color:var(--sol-select-placeholder)}.sol-select__arrow{width:1.25rem;height:1.25rem;flex-shrink:0;color:var(--sol-select-arrow-color);transition:transform var(--sol-select-transition)}.sol-select__arrow--open{transform:rotate(180deg)}.sol-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--sol-select-dropdown-bg);border:var(--sol-select-border-width) solid var(--sol-select-border);border-radius:var(--sol-select-radius);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0,0,0,.15));max-height:280px;display:flex;flex-direction:column;animation:sol-select-fade .12s ease-out}.sol-select__search-box{padding:.5rem;border-bottom:1px solid var(--sol-select-border)}.sol-select__search{width:100%;height:2rem;padding:0 .5rem;font-family:inherit;font-size:var(--sol-select-font-size);color:var(--sol-select-text);background:var(--sol-select-bg);border:var(--sol-select-border-width) solid var(--sol-select-border);border-radius:calc(var(--sol-select-radius) - 2px);outline:none}.sol-select__search:focus{border-color:var(--sol-select-border-focus)}.sol-select__bulk-actions{display:flex;gap:.25rem;padding:.375rem .5rem;border-bottom:1px solid var(--sol-select-border)}.sol-select__bulk-btn{flex:1;padding:.25rem;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--sol-select-option-active-text);background:transparent;border:1px solid var(--sol-select-border);border-radius:calc(var(--sol-select-radius) - 2px);cursor:pointer;transition:background var(--sol-select-transition)}.sol-select__bulk-btn:hover{background:var(--sol-select-option-hover)}.sol-select__options{overflow-y:auto;flex:1;padding:.25rem 0}.sol-select__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:var(--sol-select-font-size);color:var(--sol-select-text);cursor:pointer;transition:background var(--sol-select-transition)}.sol-select__option:hover{background:var(--sol-select-option-hover)}.sol-select__option--active{background:var(--sol-select-option-active-bg);color:var(--sol-select-option-active-text);font-weight:500}.sol-select__check{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;border:2px solid var(--sol-select-border);border-radius:3px;font-size:.65rem;flex-shrink:0}.sol-select__check--checked{background:var(--sol-select-option-active-text);border-color:var(--sol-select-option-active-text);color:#fff}.sol-select__empty{padding:.75rem;text-align:center;color:var(--sol-select-placeholder);font-size:var(--sol-select-font-size)}.sol-select__error{margin:.25rem 0 0;font-size:var(--sol-select-label-font-size);color:var(--sol-select-error-color);line-height:1.4}.sol-select__dropdown--up{top:auto;bottom:calc(100% + 4px);animation:sol-select-fade-up .12s ease-out}@keyframes sol-select-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sol-select-fade-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(max-width:640px){.sol-select__search,.sol-select__trigger{font-size:16px}}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }, { kind: "directive", type: SolFloatingPanelDirective, selector: "[solFloatingPanel]", inputs: ["solFloatingPanel", "gap", "flipThreshold", "matchTriggerWidth", "align"], outputs: ["dropUpChange"], exportAs: ["solFloatingPanel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1072
1179
  }
1073
1180
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolSelectComponent, decorators: [{
1074
1181
  type: Component,
1075
- args: [{ selector: 'sol-select', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [SolIconComponent], providers: [
1182
+ args: [{ selector: 'sol-select', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [SolIconComponent, SolFloatingPanelDirective], providers: [
1076
1183
  {
1077
1184
  provide: NG_VALUE_ACCESSOR,
1078
1185
  useExisting: forwardRef(() => SolSelectComponent),
@@ -1102,15 +1209,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1102
1209
  </button>
1103
1210
 
1104
1211
  <!-- Panel del dropdown: al abrirse se portalea a document.body con
1105
- position:fixed (CP-2) para que ningún ancestro con overflow lo
1106
- recorte (ej. .sol-modal-body). El trigger queda enlazado por
1107
- aria-controls porque input y listbox viven en árboles distintos. -->
1212
+ position:fixed (CP-2, directiva compartida solFloatingPanel) para
1213
+ que ningún ancestro con overflow lo recorte (ej. .sol-modal-body).
1214
+ El trigger queda enlazado por aria-controls porque input y listbox
1215
+ viven en árboles distintos. -->
1108
1216
  @if (isOpen()) {
1109
1217
  <div
1110
1218
  #dropdownPanel
1111
1219
  class="sol-select__dropdown"
1112
1220
  role="listbox"
1113
1221
  [id]="panelId"
1222
+ [solFloatingPanel]="triggerBtn"
1223
+ (dropUpChange)="dropUp.set($event)"
1114
1224
  [class.sol-select__dropdown--up]="dropUp()"
1115
1225
  >
1116
1226
  <!-- Search -->
@@ -1173,8 +1283,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1173
1283
  @if (error()) {
1174
1284
  <p class="sol-select__error">{{ error() }}</p>
1175
1285
  }
1176
- `, styles: [":host{display:block}:host,.sol-select__dropdown{--sol-select-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-select-text: var(--sol-color-text-primary, #1e293b);--sol-select-placeholder: var(--sol-color-text-muted, #94a3b8);--sol-select-border: var(--sol-border-color-default, #cbd5e1);--sol-select-border-focus: var(--sol-color-primary, #6366f1);--sol-select-error-color: var(--sol-color-danger, #ef4444);--sol-select-label-color: var(--sol-color-text-secondary, #475569);--sol-select-arrow-color: var(--sol-color-text-muted, #94a3b8);--sol-select-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-select-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-select-border-width: var(--sol-border-width-default, 1px);--sol-select-padding-x: var(--sol-space-sm, .75rem);--sol-select-height: var(--sol-size-input-height, 2.5rem);--sol-select-font-size: var(--sol-font-size-base, .875rem);--sol-select-label-font-size: var(--sol-font-size-sm, .75rem);--sol-select-label-font-weight: var(--sol-font-weight-bold, 600);--sol-select-shadow: var(--sol-input-shadow, var(--sol-shadow-sm, 0 1px 2px rgba(0,0,0,.05)));--sol-select-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-select-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-select-dropdown-bg: var(--sol-bg-surface, #ffffff);--sol-select-option-hover: var(--sol-color-bg-hover, rgba(0,0,0,.04));--sol-select-option-active-bg: color-mix(in srgb, var(--sol-color-primary, #6366f1) 12%, transparent);--sol-select-option-active-text: var(--sol-color-primary, #6366f1)}.sol-select__label{display:block;margin-bottom:.375rem;font-size:var(--sol-select-label-font-size);font-weight:var(--sol-select-label-font-weight);color:var(--sol-select-label-color);line-height:1.4}.sol-select__wrapper{position:relative;display:block}.sol-select__trigger{display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--sol-select-height);padding:0 var(--sol-select-padding-x);font-family:inherit;font-size:var(--sol-select-font-size);color:var(--sol-select-text);background-color:var(--sol-select-bg);border:var(--sol-input-border, var(--sol-select-border-width) solid var(--sol-select-border));border-radius:var(--sol-select-radius);box-shadow:var(--sol-select-shadow);cursor:pointer;transition:border-color var(--sol-select-transition),box-shadow var(--sol-select-transition);text-align:left}.sol-select__trigger:focus{outline:none;border:var(--sol-input-focus-border, var(--sol-select-border-width) solid var(--sol-select-border-focus));box-shadow:var(--sol-select-focus-ring)}.sol-select__trigger:disabled{cursor:not-allowed;opacity:var(--sol-select-disabled-opacity)}.sol-select__trigger--error{border-color:var(--sol-select-error-color)}.sol-select__trigger--open{border:var(--sol-input-focus-border, var(--sol-select-border-width) solid var(--sol-select-border-focus));box-shadow:var(--sol-select-focus-ring)}.sol-select__display{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sol-select__display--placeholder{color:var(--sol-select-placeholder)}.sol-select__arrow{width:1.25rem;height:1.25rem;flex-shrink:0;color:var(--sol-select-arrow-color);transition:transform var(--sol-select-transition)}.sol-select__arrow--open{transform:rotate(180deg)}.sol-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:calc(var(--sol-z-modal, 1050) + 10);background:var(--sol-select-dropdown-bg);border:var(--sol-select-border-width) solid var(--sol-select-border);border-radius:var(--sol-select-radius);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0,0,0,.15));max-height:280px;display:flex;flex-direction:column;animation:sol-select-fade .12s ease-out}.sol-select__search-box{padding:.5rem;border-bottom:1px solid var(--sol-select-border)}.sol-select__search{width:100%;height:2rem;padding:0 .5rem;font-family:inherit;font-size:var(--sol-select-font-size);color:var(--sol-select-text);background:var(--sol-select-bg);border:var(--sol-select-border-width) solid var(--sol-select-border);border-radius:calc(var(--sol-select-radius) - 2px);outline:none}.sol-select__search:focus{border-color:var(--sol-select-border-focus)}.sol-select__bulk-actions{display:flex;gap:.25rem;padding:.375rem .5rem;border-bottom:1px solid var(--sol-select-border)}.sol-select__bulk-btn{flex:1;padding:.25rem;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--sol-select-option-active-text);background:transparent;border:1px solid var(--sol-select-border);border-radius:calc(var(--sol-select-radius) - 2px);cursor:pointer;transition:background var(--sol-select-transition)}.sol-select__bulk-btn:hover{background:var(--sol-select-option-hover)}.sol-select__options{overflow-y:auto;flex:1;padding:.25rem 0}.sol-select__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:var(--sol-select-font-size);color:var(--sol-select-text);cursor:pointer;transition:background var(--sol-select-transition)}.sol-select__option:hover{background:var(--sol-select-option-hover)}.sol-select__option--active{background:var(--sol-select-option-active-bg);color:var(--sol-select-option-active-text);font-weight:500}.sol-select__check{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;border:2px solid var(--sol-select-border);border-radius:3px;font-size:.65rem;flex-shrink:0}.sol-select__check--checked{background:var(--sol-select-option-active-text);border-color:var(--sol-select-option-active-text);color:#fff}.sol-select__empty{padding:.75rem;text-align:center;color:var(--sol-select-placeholder);font-size:var(--sol-select-font-size)}.sol-select__error{margin:.25rem 0 0;font-size:var(--sol-select-label-font-size);color:var(--sol-select-error-color);line-height:1.4}.sol-select__dropdown--up{top:auto;bottom:calc(100% + 4px);animation:sol-select-fade-up .12s ease-out}@keyframes sol-select-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sol-select-fade-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(max-width:640px){.sol-select__search,.sol-select__trigger{font-size:16px}}\n"] }]
1177
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], showAllOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAllOption", required: false }] }], allOptionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "allOptionLabel", required: false }] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }], triggerBtn: [{ type: i0.ViewChild, args: ['triggerBtn', { isSignal: true }] }], dropdownPanel: [{ type: i0.ViewChild, args: ['dropdownPanel', { isSignal: true }] }], onDocumentClick: [{
1286
+ `, styles: [":host{display:block}:host,.sol-select__dropdown{--sol-select-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-select-text: var(--sol-color-text-primary, #1e293b);--sol-select-placeholder: var(--sol-color-text-muted, #94a3b8);--sol-select-border: var(--sol-border-color-default, #cbd5e1);--sol-select-border-focus: var(--sol-color-primary, #6366f1);--sol-select-error-color: var(--sol-color-danger, #ef4444);--sol-select-label-color: var(--sol-color-text-secondary, #475569);--sol-select-arrow-color: var(--sol-color-text-muted, #94a3b8);--sol-select-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-select-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-select-border-width: var(--sol-border-width-default, 1px);--sol-select-padding-x: var(--sol-space-sm, .75rem);--sol-select-height: var(--sol-size-input-height, 2.5rem);--sol-select-font-size: var(--sol-font-size-base, .875rem);--sol-select-label-font-size: var(--sol-font-size-sm, .75rem);--sol-select-label-font-weight: var(--sol-font-weight-bold, 600);--sol-select-shadow: var(--sol-input-shadow, var(--sol-shadow-sm, 0 1px 2px rgba(0,0,0,.05)));--sol-select-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-select-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-select-dropdown-bg: var(--sol-bg-surface, #ffffff);--sol-select-option-hover: var(--sol-color-bg-hover, rgba(0,0,0,.04));--sol-select-option-active-bg: color-mix(in srgb, var(--sol-color-primary, #6366f1) 12%, transparent);--sol-select-option-active-text: var(--sol-color-primary, #6366f1)}.sol-select__label{display:block;margin-bottom:.375rem;font-size:var(--sol-select-label-font-size);font-weight:var(--sol-select-label-font-weight);color:var(--sol-select-label-color);line-height:1.4}.sol-select__wrapper{position:relative;display:block}.sol-select__trigger{display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--sol-select-height);padding:0 var(--sol-select-padding-x);font-family:inherit;font-size:var(--sol-select-font-size);color:var(--sol-select-text);background-color:var(--sol-select-bg);border:var(--sol-input-border, var(--sol-select-border-width) solid var(--sol-select-border));border-radius:var(--sol-select-radius);box-shadow:var(--sol-select-shadow);cursor:pointer;transition:border-color var(--sol-select-transition),box-shadow var(--sol-select-transition);text-align:left}.sol-select__trigger:focus{outline:none;border:var(--sol-input-focus-border, var(--sol-select-border-width) solid var(--sol-select-border-focus));box-shadow:var(--sol-select-focus-ring)}.sol-select__trigger:disabled{cursor:not-allowed;opacity:var(--sol-select-disabled-opacity)}.sol-select__trigger--error{border-color:var(--sol-select-error-color)}.sol-select__trigger--open{border:var(--sol-input-focus-border, var(--sol-select-border-width) solid var(--sol-select-border-focus));box-shadow:var(--sol-select-focus-ring)}.sol-select__display{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sol-select__display--placeholder{color:var(--sol-select-placeholder)}.sol-select__arrow{width:1.25rem;height:1.25rem;flex-shrink:0;color:var(--sol-select-arrow-color);transition:transform var(--sol-select-transition)}.sol-select__arrow--open{transform:rotate(180deg)}.sol-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--sol-select-dropdown-bg);border:var(--sol-select-border-width) solid var(--sol-select-border);border-radius:var(--sol-select-radius);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0,0,0,.15));max-height:280px;display:flex;flex-direction:column;animation:sol-select-fade .12s ease-out}.sol-select__search-box{padding:.5rem;border-bottom:1px solid var(--sol-select-border)}.sol-select__search{width:100%;height:2rem;padding:0 .5rem;font-family:inherit;font-size:var(--sol-select-font-size);color:var(--sol-select-text);background:var(--sol-select-bg);border:var(--sol-select-border-width) solid var(--sol-select-border);border-radius:calc(var(--sol-select-radius) - 2px);outline:none}.sol-select__search:focus{border-color:var(--sol-select-border-focus)}.sol-select__bulk-actions{display:flex;gap:.25rem;padding:.375rem .5rem;border-bottom:1px solid var(--sol-select-border)}.sol-select__bulk-btn{flex:1;padding:.25rem;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--sol-select-option-active-text);background:transparent;border:1px solid var(--sol-select-border);border-radius:calc(var(--sol-select-radius) - 2px);cursor:pointer;transition:background var(--sol-select-transition)}.sol-select__bulk-btn:hover{background:var(--sol-select-option-hover)}.sol-select__options{overflow-y:auto;flex:1;padding:.25rem 0}.sol-select__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:var(--sol-select-font-size);color:var(--sol-select-text);cursor:pointer;transition:background var(--sol-select-transition)}.sol-select__option:hover{background:var(--sol-select-option-hover)}.sol-select__option--active{background:var(--sol-select-option-active-bg);color:var(--sol-select-option-active-text);font-weight:500}.sol-select__check{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;border:2px solid var(--sol-select-border);border-radius:3px;font-size:.65rem;flex-shrink:0}.sol-select__check--checked{background:var(--sol-select-option-active-text);border-color:var(--sol-select-option-active-text);color:#fff}.sol-select__empty{padding:.75rem;text-align:center;color:var(--sol-select-placeholder);font-size:var(--sol-select-font-size)}.sol-select__error{margin:.25rem 0 0;font-size:var(--sol-select-label-font-size);color:var(--sol-select-error-color);line-height:1.4}.sol-select__dropdown--up{top:auto;bottom:calc(100% + 4px);animation:sol-select-fade-up .12s ease-out}@keyframes sol-select-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sol-select-fade-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(max-width:640px){.sol-select__search,.sol-select__trigger{font-size:16px}}\n"] }]
1287
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], showAllOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAllOption", required: false }] }], allOptionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "allOptionLabel", required: false }] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }], dropdownPanel: [{ type: i0.ViewChild, args: ['dropdownPanel', { isSignal: true }] }], onDocumentClick: [{
1178
1288
  type: HostListener,
1179
1289
  args: ['document:click', ['$event']]
1180
1290
  }] } });
@@ -1287,6 +1397,17 @@ class SolToggleComponent {
1287
1397
  /** Optional label displayed beside the toggle. */
1288
1398
  label = input('', /* @ts-ignore */
1289
1399
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1400
+ /**
1401
+ * Accessible name applied to the inner `button[role="switch"]`.
1402
+ *
1403
+ * The host element is not the switch, so an `aria-label` bound on
1404
+ * `<sol-toggle>` never reaches the control that screen readers announce.
1405
+ * Use this input whenever the toggle ships without a visible `label`
1406
+ * (e.g. a switch inside a table row, where the row already carries the
1407
+ * visible text). Empty string renders no attribute.
1408
+ */
1409
+ ariaLabel = input('', /* @ts-ignore */
1410
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
1290
1411
  /** Whether the toggle is disabled. */
1291
1412
  disabled = input(false, /* @ts-ignore */
1292
1413
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -1356,7 +1477,7 @@ class SolToggleComponent {
1356
1477
  // if the form sets disabled state, we reflect it through the template binding
1357
1478
  }
1358
1479
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1359
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolToggleComponent, isStandalone: true, selector: "sol-toggle", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, onText: { classPropertyName: "onText", publicName: "onText", isSignal: true, isRequired: false, transformFunction: null }, offText: { classPropertyName: "offText", publicName: "offText", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
1480
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolToggleComponent, isStandalone: true, selector: "sol-toggle", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, onText: { classPropertyName: "onText", publicName: "onText", isSignal: true, isRequired: false, transformFunction: null }, offText: { classPropertyName: "offText", publicName: "offText", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
1360
1481
  {
1361
1482
  provide: NG_VALUE_ACCESSOR,
1362
1483
  useExisting: forwardRef(() => SolToggleComponent),
@@ -1368,6 +1489,7 @@ class SolToggleComponent {
1368
1489
  type="button"
1369
1490
  role="switch"
1370
1491
  [attr.aria-checked]="checked()"
1492
+ [attr.aria-label]="ariaLabel() || null"
1371
1493
  [class]="trackClass()"
1372
1494
  [disabled]="disabled()"
1373
1495
  (click)="toggle()"
@@ -1400,6 +1522,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1400
1522
  type="button"
1401
1523
  role="switch"
1402
1524
  [attr.aria-checked]="checked()"
1525
+ [attr.aria-label]="ariaLabel() || null"
1403
1526
  [class]="trackClass()"
1404
1527
  [disabled]="disabled()"
1405
1528
  (click)="toggle()"
@@ -1417,7 +1540,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1417
1540
  }
1418
1541
  </label>
1419
1542
  `, styles: [":host{display:inline-block;--sol-toggle-track-off: var(--sol-color-text-muted, #cbd5e1);--sol-toggle-track-on: var(--sol-color-primary, #6366f1);--sol-toggle-thumb: var(--sol-bg-surface, #ffffff);--sol-toggle-label-color: var(--sol-color-text-primary, #1e293b);--sol-toggle-state-color: var(--sol-color-text-secondary, #475569);--sol-toggle-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-toggle-focus-ring: var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent));--sol-toggle-transition: var(--sol-transition-fast, .15s ease);--sol-toggle-shadow: var(--sol-shadow-sm, 0 1px 2px rgba(0,0,0,.1));--sol-toggle-md-width: 2.75rem;--sol-toggle-md-height: 1.5rem;--sol-toggle-md-thumb: 1.25rem;--sol-toggle-md-offset: .125rem;--sol-toggle-md-label-font: var(--sol-font-size-base, .875rem);--sol-toggle-sm-width: 2rem;--sol-toggle-sm-height: 1.125rem;--sol-toggle-sm-thumb: .875rem;--sol-toggle-sm-offset: .125rem;--sol-toggle-sm-label-font: var(--sol-font-size-sm, .75rem)}.sol-toggle{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}.sol-toggle--disabled{cursor:not-allowed;opacity:var(--sol-toggle-disabled-opacity)}.sol-toggle__track{position:relative;display:inline-flex;align-items:center;flex-shrink:0;border:none;padding:0;cursor:pointer;border-radius:9999px;background-color:var(--sol-toggle-track-off);transition:background-color var(--sol-toggle-transition)}.sol-toggle__track:focus-visible{outline:none;box-shadow:var(--sol-toggle-focus-ring)}.sol-toggle__track:disabled{cursor:not-allowed}.sol-toggle__track--on{background-color:var(--sol-toggle-track-on)}.sol-toggle__track--md{width:var(--sol-toggle-md-width);height:var(--sol-toggle-md-height)}.sol-toggle__track--sm{width:var(--sol-toggle-sm-width);height:var(--sol-toggle-sm-height)}.sol-toggle__thumb{display:block;border-radius:9999px;background-color:var(--sol-toggle-thumb);box-shadow:var(--sol-toggle-shadow);transition:transform var(--sol-toggle-transition)}.sol-toggle__thumb--md{width:var(--sol-toggle-md-thumb);height:var(--sol-toggle-md-thumb);transform:translate(var(--sol-toggle-md-offset))}.sol-toggle__thumb--md-on{transform:translate(calc(var(--sol-toggle-md-width) - var(--sol-toggle-md-thumb) - var(--sol-toggle-md-offset)))}.sol-toggle__thumb--sm{width:var(--sol-toggle-sm-thumb);height:var(--sol-toggle-sm-thumb);transform:translate(var(--sol-toggle-sm-offset))}.sol-toggle__thumb--sm-on{transform:translate(calc(var(--sol-toggle-sm-width) - var(--sol-toggle-sm-thumb) - var(--sol-toggle-sm-offset)))}.sol-toggle__state{min-width:1.75rem;font-weight:var(--sol-font-weight-bold, 600);text-transform:uppercase;letter-spacing:.04em;color:var(--sol-toggle-state-color);-webkit-user-select:none;user-select:none}.sol-toggle--sm .sol-toggle__state,.sol-toggle--md .sol-toggle__state{font-size:var(--sol-font-size-sm, .75rem)}.sol-toggle__label{color:var(--sol-toggle-label-color);-webkit-user-select:none;user-select:none}.sol-toggle--sm .sol-toggle__label{font-size:var(--sol-toggle-sm-label-font)}.sol-toggle--md .sol-toggle__label{font-size:var(--sol-toggle-md-label-font)}\n"] }]
1420
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], onText: [{ type: i0.Input, args: [{ isSignal: true, alias: "onText", required: false }] }], offText: [{ type: i0.Input, args: [{ isSignal: true, alias: "offText", required: false }] }] } });
1543
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], onText: [{ type: i0.Input, args: [{ isSignal: true, alias: "onText", required: false }] }], offText: [{ type: i0.Input, args: [{ isSignal: true, alias: "offText", required: false }] }] } });
1421
1544
 
1422
1545
  /**
1423
1546
  * Predicados puros compartidos por los overlays de la casa (`sol-modal`,
@@ -1673,6 +1796,9 @@ class SolDrawerComponent {
1673
1796
  /** Width preset for the drawer panel. */
1674
1797
  size = input('md', /* @ts-ignore */
1675
1798
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1799
+ /** Visual variant — `panel` (default, unchanged) or `sheet` (PR-C4, bottom sheet on mobile only). See {@link SolDrawerVariant}. */
1800
+ variant = input('panel', /* @ts-ignore */
1801
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1676
1802
  /** Whether the drawer can be closed by the user. */
1677
1803
  closeable = input(true, /* @ts-ignore */
1678
1804
  ...(ngDevMode ? [{ debugName: "closeable" }] : /* istanbul ignore next */ []));
@@ -1690,9 +1816,11 @@ class SolDrawerComponent {
1690
1816
  ...(ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []));
1691
1817
  /** Unique id consumed by `aria-labelledby`. */
1692
1818
  titleId = `sol-drawer-title-${SolDrawerComponent.nextId++}`;
1693
- overlayClasses = computed(() => `sol-drawer-overlay sol-drawer-overlay--${this.side()}`, /* @ts-ignore */
1819
+ overlayClasses = computed(() => `sol-drawer-overlay sol-drawer-overlay--${this.side()}` +
1820
+ (this.variant() === 'sheet' ? ' sol-drawer-overlay--sheet' : ''), /* @ts-ignore */
1694
1821
  ...(ngDevMode ? [{ debugName: "overlayClasses" }] : /* istanbul ignore next */ []));
1695
- panelClasses = computed(() => `sol-drawer-panel sol-drawer-panel--${this.side()} sol-drawer-${this.size()}`, /* @ts-ignore */
1822
+ panelClasses = computed(() => `sol-drawer-panel sol-drawer-panel--${this.side()} sol-drawer-${this.size()}` +
1823
+ (this.variant() === 'sheet' ? ' sol-drawer-panel--sheet' : ''), /* @ts-ignore */
1696
1824
  ...(ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []));
1697
1825
  closeLabel = computed(() => {
1698
1826
  this.i18n.activeLang();
@@ -1732,7 +1860,7 @@ class SolDrawerComponent {
1732
1860
  this.closed.emit();
1733
1861
  }
1734
1862
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1735
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolDrawerComponent, isStandalone: true, selector: "sol-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, closeable: { classPropertyName: "closeable", publicName: "closeable", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscapeKey()" } }, viewQueries: [{ propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
1863
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolDrawerComponent, isStandalone: true, selector: "sol-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, closeable: { classPropertyName: "closeable", publicName: "closeable", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscapeKey()" } }, viewQueries: [{ propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
1736
1864
  @if (open()) {
1737
1865
  <div
1738
1866
  [class]="overlayClasses()"
@@ -1769,7 +1897,7 @@ class SolDrawerComponent {
1769
1897
  </div>
1770
1898
  </div>
1771
1899
  }
1772
- `, isInline: true, styles: [".sol-drawer-overlay{position:fixed;inset:0;z-index:var(--sol-z-modal, 1000);display:flex;background:var(--sol-bg-overlay, rgba(0, 0, 0, .5));backdrop-filter:var(--sol-overlay-blur, blur(3px));-webkit-backdrop-filter:var(--sol-overlay-blur, blur(3px));animation:sol-drawer-fade-in var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}.sol-drawer-overlay--start{justify-content:flex-start}.sol-drawer-overlay--end{justify-content:flex-end}.sol-drawer-panel{position:relative;display:flex;flex-direction:column;height:100dvh;background:var(--sol-bg-surface, #fff);box-shadow:var(--sol-shadow-lg, 0 20px 60px rgba(0, 0, 0, .3));outline:none;animation:sol-drawer-slide-in var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}.sol-drawer-panel--start{--sol-drawer-slide-from: -100%;border-right:1px solid var(--sol-border-color-default, #e5e7eb);border-top-right-radius:var(--sol-border-radius-lg, 12px);border-bottom-right-radius:var(--sol-border-radius-lg, 12px)}.sol-drawer-panel--end{--sol-drawer-slide-from: 100%;border-left:1px solid var(--sol-border-color-default, #e5e7eb);border-top-left-radius:var(--sol-border-radius-lg, 12px);border-bottom-left-radius:var(--sol-border-radius-lg, 12px)}.sol-drawer-sm{width:min(20rem,100vw)}.sol-drawer-md{width:min(28rem,100vw)}.sol-drawer-lg{width:min(40rem,100vw)}.sol-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--sol-border-color-default, #e5e7eb);flex:none}.sol-drawer-title{margin:0;font-size:1.125rem;font-weight:600;color:var(--sol-color-text-primary, #111827)}.sol-drawer-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:var(--sol-border-radius-lg, 8px);background:transparent;color:var(--sol-color-text-secondary, #6b7280);cursor:pointer;transition:background var(--sol-dur-fast, .12s) ease,color var(--sol-dur-fast, .12s) ease}.sol-drawer-close:hover{background:var(--sol-color-bg-hover, rgba(0, 0, 0, .06));color:var(--sol-color-text-primary, #111827)}.sol-drawer-body{flex:1 1 auto;overflow-y:auto;padding:1.5rem}@media(max-width:640px){.sol-drawer-sm,.sol-drawer-md,.sol-drawer-lg{width:100vw}.sol-drawer-panel--start,.sol-drawer-panel--end{border-left:none;border-right:none;border-radius:0}}@keyframes sol-drawer-fade-in{0%{opacity:0}to{opacity:1}}@keyframes sol-drawer-slide-in{0%{transform:translate(var(--sol-drawer-slide-from, 100%))}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sol-drawer-overlay,.sol-drawer-panel{animation:none}}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1900
+ `, isInline: true, styles: [".sol-drawer-overlay{position:fixed;inset:0;z-index:var(--sol-z-modal, 1000);display:flex;background:var(--sol-bg-overlay, rgba(0, 0, 0, .5));backdrop-filter:var(--sol-overlay-blur, blur(3px));-webkit-backdrop-filter:var(--sol-overlay-blur, blur(3px));animation:sol-drawer-fade-in var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}.sol-drawer-overlay--start{justify-content:flex-start}.sol-drawer-overlay--end{justify-content:flex-end}.sol-drawer-panel{position:relative;display:flex;flex-direction:column;height:100dvh;background:var(--sol-bg-surface, #fff);box-shadow:var(--sol-shadow-lg, 0 20px 60px rgba(0, 0, 0, .3));outline:none;animation:sol-drawer-slide-in var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}.sol-drawer-panel--start{--sol-drawer-slide-from: -100%;border-right:1px solid var(--sol-border-color-default, #e5e7eb);border-top-right-radius:var(--sol-border-radius-lg, 12px);border-bottom-right-radius:var(--sol-border-radius-lg, 12px)}.sol-drawer-panel--end{--sol-drawer-slide-from: 100%;border-left:1px solid var(--sol-border-color-default, #e5e7eb);border-top-left-radius:var(--sol-border-radius-lg, 12px);border-bottom-left-radius:var(--sol-border-radius-lg, 12px)}.sol-drawer-sm{width:min(20rem,100vw)}.sol-drawer-md{width:min(28rem,100vw)}.sol-drawer-lg{width:min(40rem,100vw)}.sol-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--sol-border-color-default, #e5e7eb);flex:none}.sol-drawer-title{margin:0;font-size:1.125rem;font-weight:600;color:var(--sol-color-text-primary, #111827)}.sol-drawer-close{display:inline-flex;align-items:center;justify-content:center;min-width:2.75rem;min-height:2.75rem;border:none;border-radius:var(--sol-border-radius-lg, 8px);background:transparent;color:var(--sol-color-text-secondary, #6b7280);cursor:pointer;transition:background var(--sol-dur-fast, .12s) ease,color var(--sol-dur-fast, .12s) ease}.sol-drawer-close:hover{background:var(--sol-color-bg-hover, rgba(0, 0, 0, .06));color:var(--sol-color-text-primary, #111827)}.sol-drawer-body{flex:1 1 auto;overflow-y:auto;padding:1.5rem}@media(max-width:640px){.sol-drawer-sm,.sol-drawer-md,.sol-drawer-lg{width:100vw}.sol-drawer-panel--start,.sol-drawer-panel--end{border-left:none;border-right:none;border-radius:0}}@media(max-width:767px){.sol-drawer-overlay--sheet{align-items:flex-end}.sol-drawer-panel--sheet{width:100vw;height:min(92dvh,100dvh);max-height:92dvh;border-left:1px solid var(--sol-border-color-default, #e5e7eb);border-right:1px solid var(--sol-border-color-default, #e5e7eb);border-top-left-radius:var(--sol-border-radius-lg, 12px);border-top-right-radius:var(--sol-border-radius-lg, 12px);border-bottom-left-radius:0;border-bottom-right-radius:0;animation:sol-drawer-sheet-slide-up var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}}@keyframes sol-drawer-fade-in{0%{opacity:0}to{opacity:1}}@keyframes sol-drawer-slide-in{0%{transform:translate(var(--sol-drawer-slide-from, 100%))}to{transform:translate(0)}}@keyframes sol-drawer-sheet-slide-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.sol-drawer-overlay,.sol-drawer-panel{animation:none}}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1773
1901
  }
1774
1902
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolDrawerComponent, decorators: [{
1775
1903
  type: Component,
@@ -1810,8 +1938,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1810
1938
  </div>
1811
1939
  </div>
1812
1940
  }
1813
- `, styles: [".sol-drawer-overlay{position:fixed;inset:0;z-index:var(--sol-z-modal, 1000);display:flex;background:var(--sol-bg-overlay, rgba(0, 0, 0, .5));backdrop-filter:var(--sol-overlay-blur, blur(3px));-webkit-backdrop-filter:var(--sol-overlay-blur, blur(3px));animation:sol-drawer-fade-in var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}.sol-drawer-overlay--start{justify-content:flex-start}.sol-drawer-overlay--end{justify-content:flex-end}.sol-drawer-panel{position:relative;display:flex;flex-direction:column;height:100dvh;background:var(--sol-bg-surface, #fff);box-shadow:var(--sol-shadow-lg, 0 20px 60px rgba(0, 0, 0, .3));outline:none;animation:sol-drawer-slide-in var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}.sol-drawer-panel--start{--sol-drawer-slide-from: -100%;border-right:1px solid var(--sol-border-color-default, #e5e7eb);border-top-right-radius:var(--sol-border-radius-lg, 12px);border-bottom-right-radius:var(--sol-border-radius-lg, 12px)}.sol-drawer-panel--end{--sol-drawer-slide-from: 100%;border-left:1px solid var(--sol-border-color-default, #e5e7eb);border-top-left-radius:var(--sol-border-radius-lg, 12px);border-bottom-left-radius:var(--sol-border-radius-lg, 12px)}.sol-drawer-sm{width:min(20rem,100vw)}.sol-drawer-md{width:min(28rem,100vw)}.sol-drawer-lg{width:min(40rem,100vw)}.sol-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--sol-border-color-default, #e5e7eb);flex:none}.sol-drawer-title{margin:0;font-size:1.125rem;font-weight:600;color:var(--sol-color-text-primary, #111827)}.sol-drawer-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:var(--sol-border-radius-lg, 8px);background:transparent;color:var(--sol-color-text-secondary, #6b7280);cursor:pointer;transition:background var(--sol-dur-fast, .12s) ease,color var(--sol-dur-fast, .12s) ease}.sol-drawer-close:hover{background:var(--sol-color-bg-hover, rgba(0, 0, 0, .06));color:var(--sol-color-text-primary, #111827)}.sol-drawer-body{flex:1 1 auto;overflow-y:auto;padding:1.5rem}@media(max-width:640px){.sol-drawer-sm,.sol-drawer-md,.sol-drawer-lg{width:100vw}.sol-drawer-panel--start,.sol-drawer-panel--end{border-left:none;border-right:none;border-radius:0}}@keyframes sol-drawer-fade-in{0%{opacity:0}to{opacity:1}}@keyframes sol-drawer-slide-in{0%{transform:translate(var(--sol-drawer-slide-from, 100%))}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sol-drawer-overlay,.sol-drawer-panel{animation:none}}\n"] }]
1814
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], closeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeable", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], onEscapeKey: [{
1941
+ `, styles: [".sol-drawer-overlay{position:fixed;inset:0;z-index:var(--sol-z-modal, 1000);display:flex;background:var(--sol-bg-overlay, rgba(0, 0, 0, .5));backdrop-filter:var(--sol-overlay-blur, blur(3px));-webkit-backdrop-filter:var(--sol-overlay-blur, blur(3px));animation:sol-drawer-fade-in var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}.sol-drawer-overlay--start{justify-content:flex-start}.sol-drawer-overlay--end{justify-content:flex-end}.sol-drawer-panel{position:relative;display:flex;flex-direction:column;height:100dvh;background:var(--sol-bg-surface, #fff);box-shadow:var(--sol-shadow-lg, 0 20px 60px rgba(0, 0, 0, .3));outline:none;animation:sol-drawer-slide-in var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}.sol-drawer-panel--start{--sol-drawer-slide-from: -100%;border-right:1px solid var(--sol-border-color-default, #e5e7eb);border-top-right-radius:var(--sol-border-radius-lg, 12px);border-bottom-right-radius:var(--sol-border-radius-lg, 12px)}.sol-drawer-panel--end{--sol-drawer-slide-from: 100%;border-left:1px solid var(--sol-border-color-default, #e5e7eb);border-top-left-radius:var(--sol-border-radius-lg, 12px);border-bottom-left-radius:var(--sol-border-radius-lg, 12px)}.sol-drawer-sm{width:min(20rem,100vw)}.sol-drawer-md{width:min(28rem,100vw)}.sol-drawer-lg{width:min(40rem,100vw)}.sol-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--sol-border-color-default, #e5e7eb);flex:none}.sol-drawer-title{margin:0;font-size:1.125rem;font-weight:600;color:var(--sol-color-text-primary, #111827)}.sol-drawer-close{display:inline-flex;align-items:center;justify-content:center;min-width:2.75rem;min-height:2.75rem;border:none;border-radius:var(--sol-border-radius-lg, 8px);background:transparent;color:var(--sol-color-text-secondary, #6b7280);cursor:pointer;transition:background var(--sol-dur-fast, .12s) ease,color var(--sol-dur-fast, .12s) ease}.sol-drawer-close:hover{background:var(--sol-color-bg-hover, rgba(0, 0, 0, .06));color:var(--sol-color-text-primary, #111827)}.sol-drawer-body{flex:1 1 auto;overflow-y:auto;padding:1.5rem}@media(max-width:640px){.sol-drawer-sm,.sol-drawer-md,.sol-drawer-lg{width:100vw}.sol-drawer-panel--start,.sol-drawer-panel--end{border-left:none;border-right:none;border-radius:0}}@media(max-width:767px){.sol-drawer-overlay--sheet{align-items:flex-end}.sol-drawer-panel--sheet{width:100vw;height:min(92dvh,100dvh);max-height:92dvh;border-left:1px solid var(--sol-border-color-default, #e5e7eb);border-right:1px solid var(--sol-border-color-default, #e5e7eb);border-top-left-radius:var(--sol-border-radius-lg, 12px);border-top-right-radius:var(--sol-border-radius-lg, 12px);border-bottom-left-radius:0;border-bottom-right-radius:0;animation:sol-drawer-sheet-slide-up var(--sol-dur-base, .24s) var(--sol-ease-entrance, cubic-bezier(.2, 0, 0, 1))}}@keyframes sol-drawer-fade-in{0%{opacity:0}to{opacity:1}}@keyframes sol-drawer-slide-in{0%{transform:translate(var(--sol-drawer-slide-from, 100%))}to{transform:translate(0)}}@keyframes sol-drawer-sheet-slide-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.sol-drawer-overlay,.sol-drawer-panel{animation:none}}\n"] }]
1942
+ }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeable", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], onEscapeKey: [{
1815
1943
  type: HostListener,
1816
1944
  args: ['document:keydown.escape']
1817
1945
  }] } });
@@ -2913,7 +3041,10 @@ const POPOVER_WIDTH$1 = 300;
2913
3041
  *
2914
3042
  * Presentación: un campo de texto de solo lectura con ícono de calendario que,
2915
3043
  * al enfocar o hacer clic, abre un popover con posicionamiento manual (arriba
2916
- * o abajo según el viewport), que cierra con clic-fuera o Escape.
3044
+ * o abajo según el viewport), que cierra con clic-fuera o Escape. El popover
3045
+ * se portalea a `document.body` mediante la directiva compartida
3046
+ * `solFloatingPanel`, de modo que flota por encima de un `sol-modal` o un
3047
+ * `sol-drawer` sin que sus contenedores con `overflow` lo recorten.
2917
3048
  *
2918
3049
  * API dual: funciona como componente controlado (`value` + `valueChange`) y
2919
3050
  * como `ControlValueAccessor` (ngModel / reactive forms). Emite siempre
@@ -2950,6 +3081,11 @@ class SolDatePickerComponent {
2950
3081
  // ── Estado interno ──
2951
3082
  triggerRef = viewChild('trigger', /* @ts-ignore */
2952
3083
  ...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
3084
+ /** Popover mientras vive portaleado en document.body (fuera del host). */
3085
+ popRef = viewChild('pop', /* @ts-ignore */
3086
+ ...(ngDevMode ? [{ debugName: "popRef" }] : /* istanbul ignore next */ []));
3087
+ /** Alto estimado del popover; umbral de volteo que consume la directiva. */
3088
+ popoverHeight = POPOVER_HEIGHT;
2953
3089
  /** Fecha seleccionada canónica (fuente de verdad del display). */
2954
3090
  selected = signal(null, /* @ts-ignore */
2955
3091
  ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
@@ -3163,15 +3299,24 @@ class SolDatePickerComponent {
3163
3299
  }
3164
3300
  /** Cierra al hacer clic fuera del componente. */
3165
3301
  onDocumentClick(event) {
3166
- if (this.isOpen() && !this.hostEl.nativeElement.contains(event.target)) {
3302
+ if (!this.isOpen())
3303
+ return;
3304
+ const target = event.target;
3305
+ const insideHost = this.hostEl.nativeElement.contains(target);
3306
+ // El popover vive portaleado en document.body: también cuenta como "dentro".
3307
+ const insidePop = this.popRef()?.nativeElement.contains(target) ?? false;
3308
+ if (!insideHost && !insidePop) {
3167
3309
  this.close();
3168
3310
  }
3169
3311
  }
3170
- /** Calcula manualmente si el popover abre hacia arriba/derecha (viewport). */
3312
+ /**
3313
+ * Decide la alineación horizontal antes de abrir: si el popover no cabe
3314
+ * hacia la derecha del disparador, se ancla por su borde derecho. El eje
3315
+ * vertical (volteo `dropUp`) lo resuelve la directiva `solFloatingPanel`,
3316
+ * que además reposiciona en scroll y resize.
3317
+ */
3171
3318
  positionPopover() {
3172
3319
  const rect = this.hostEl.nativeElement.getBoundingClientRect();
3173
- const spaceBelow = window.innerHeight - rect.bottom;
3174
- this.dropUp.set(spaceBelow < POPOVER_HEIGHT && rect.top > POPOVER_HEIGHT);
3175
3320
  this.alignEnd.set(rect.left + POPOVER_WIDTH$1 > window.innerWidth);
3176
3321
  }
3177
3322
  // ── Navegación del encabezado ──
@@ -3326,7 +3471,9 @@ class SolDatePickerComponent {
3326
3471
  /** Enfoca la celda con foco tras el próximo render (roving tabindex). */
3327
3472
  focusActiveCellSoon() {
3328
3473
  setTimeout(() => {
3329
- const cell = this.hostEl.nativeElement.querySelector('.sol-date-picker__day.is-focused');
3474
+ // Se busca dentro del popover, no del host: al portalearse deja de ser
3475
+ // descendiente de `<sol-date-picker>`.
3476
+ const cell = this.popRef()?.nativeElement.querySelector('.sol-date-picker__day.is-focused');
3330
3477
  cell?.focus();
3331
3478
  });
3332
3479
  }
@@ -3337,10 +3484,11 @@ class SolDatePickerComponent {
3337
3484
  useExisting: forwardRef(() => SolDatePickerComponent),
3338
3485
  multi: true,
3339
3486
  },
3340
- ], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: `
3487
+ ], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "popRef", first: true, predicate: ["pop"], descendants: true, isSignal: true }], ngImport: i0, template: `
3341
3488
  <div class="sol-date-picker" [class.sol-date-picker--sm]="size() === 'sm'">
3342
3489
  <!-- Campo disparador -->
3343
3490
  <div
3491
+ #field
3344
3492
  class="sol-date-picker__field"
3345
3493
  [class.sol-date-picker__field--open]="isOpen()"
3346
3494
  [class.sol-date-picker__field--disabled]="isDisabled()"
@@ -3374,12 +3522,21 @@ class SolDatePickerComponent {
3374
3522
  </button>
3375
3523
  </div>
3376
3524
 
3377
- <!-- Popover -->
3525
+ <!-- Popover: se portalea a document.body con position:fixed (directiva
3526
+ compartida solFloatingPanel) para que ningún ancestro con overflow
3527
+ o backdrop-filter lo recorte — típicamente .sol-modal-body o el
3528
+ cuerpo de un sol-drawer. Ancho propio (matchTriggerWidth:false) y
3529
+ alineación por el borde derecho cuando no cabe hacia la derecha. -->
3378
3530
  @if (isOpen()) {
3379
3531
  <div
3532
+ #pop
3380
3533
  class="sol-date-picker__pop"
3534
+ [solFloatingPanel]="field"
3535
+ [matchTriggerWidth]="false"
3536
+ [flipThreshold]="popoverHeight"
3537
+ [align]="alignEnd() ? 'end' : 'start'"
3538
+ (dropUpChange)="dropUp.set($event)"
3381
3539
  [class.sol-date-picker__pop--up]="dropUp()"
3382
- [class.sol-date-picker__pop--end]="alignEnd()"
3383
3540
  role="dialog"
3384
3541
  [attr.aria-label]="dialogAria()"
3385
3542
  (keydown)="onPopoverKeydown($event)"
@@ -3491,11 +3648,11 @@ class SolDatePickerComponent {
3491
3648
  </div>
3492
3649
  }
3493
3650
  </div>
3494
- `, isInline: true, styles: [":host{display:block;--sol-dp-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-dp-text: var(--sol-color-text-primary, #1e293b);--sol-dp-placeholder: var(--sol-color-text-muted, #94a3b8);--sol-dp-border: var(--sol-border-color-default, #cbd5e1);--sol-dp-border-focus: var(--sol-color-primary, #2563eb);--sol-dp-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-dp-border-width: var(--sol-border-width-default, 1px);--sol-dp-height: var(--sol-size-input-height, 2.5rem);--sol-dp-font-size: var(--sol-font-size-base, .875rem);--sol-dp-shadow: var(--sol-input-shadow, var(--sol-shadow-sm, 0 1px 2px rgba(0, 0, 0, .05)));--sol-dp-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #2563eb) 40%, transparent));--sol-dp-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-dp-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-dp-pop-bg: var(--sol-card-bg, var(--sol-bg-surface, #ffffff));--sol-dp-pop-radius: var(--sol-card-radius, var(--sol-border-radius-lg, .75rem));--sol-dp-pop-shadow: var(--sol-card-shadow, var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .15)));--sol-dp-primary: var(--sol-color-primary, #2563eb);--sol-dp-hover: var(--sol-color-bg-hover, rgba(0, 0, 0, .04));--sol-dp-muted: var(--sol-color-text-muted, #94a3b8)}.sol-date-picker{position:relative;display:block}.sol-date-picker__field{display:flex;align-items:center;width:100%;height:var(--sol-dp-height);background:var(--sol-dp-bg);border:var(--sol-input-border, var(--sol-dp-border-width) solid var(--sol-dp-border));border-radius:var(--sol-dp-radius);box-shadow:var(--sol-dp-shadow);transition:border-color var(--sol-dp-transition),box-shadow var(--sol-dp-transition)}.sol-date-picker--sm .sol-date-picker__field{height:2rem}.sol-date-picker__field--open,.sol-date-picker__field:focus-within{border:var(--sol-input-focus-border, var(--sol-dp-border-width) solid var(--sol-dp-border-focus));box-shadow:var(--sol-dp-focus-ring)}.sol-date-picker__field--disabled{cursor:not-allowed;opacity:var(--sol-dp-disabled-opacity)}.sol-date-picker__input{flex:1;min-width:0;height:100%;padding:0 .5rem 0 var(--sol-space-sm, .75rem);border:none;background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;outline:none}.sol-date-picker--sm .sol-date-picker__input{font-size:var(--sol-font-size-sm, .8125rem)}.sol-date-picker__input::placeholder{color:var(--sol-dp-placeholder)}.sol-date-picker__input:disabled{cursor:not-allowed}.sol-date-picker__trigger-btn{display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0 .5rem;border:none;background:transparent;color:var(--sol-dp-muted);cursor:pointer}.sol-date-picker__trigger-btn:disabled{cursor:not-allowed}.sol-date-picker__pop{position:absolute;top:calc(100% + 4px);left:0;z-index:var(--sol-z-dropdown, 1000);width:300px;max-width:calc(100vw - 24px);padding:.625rem;background:var(--sol-dp-pop-bg);border:var(--sol-dp-border-width) solid var(--sol-dp-border);border-radius:var(--sol-dp-pop-radius);box-shadow:var(--sol-dp-pop-shadow);animation:sol-dp-fade var(--sol-dur-fast, .15s) var(--sol-ease, ease-out)}.sol-date-picker__pop--up{top:auto;bottom:calc(100% + 4px)}.sol-date-picker__pop--end{left:auto;right:0}.sol-date-picker__header{display:flex;align-items:center;justify-content:space-between;gap:.25rem;margin-bottom:.5rem}.sol-date-picker__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);cursor:pointer;transition:background var(--sol-dp-transition)}.sol-date-picker__nav:hover{background:var(--sol-dp-hover)}.sol-date-picker__title{flex:1;height:2rem;border:none;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);font-weight:var(--sol-font-weight-bold, 600);cursor:pointer;transition:background var(--sol-dp-transition)}.sol-date-picker__title:hover:not(:disabled){background:var(--sol-dp-hover)}.sol-date-picker__title:disabled{cursor:default}.sol-date-picker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.sol-date-picker__weekday{text-align:center;font-size:var(--sol-font-size-sm, .75rem);font-weight:500;color:var(--sol-dp-muted);padding:.25rem 0}.sol-date-picker__grid{display:flex;flex-direction:column;gap:2px}.sol-date-picker__row{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.sol-date-picker__day{display:inline-flex;align-items:center;justify-content:center;aspect-ratio:1 / 1;width:100%;border:1px solid transparent;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;transition:background var(--sol-dp-transition),color var(--sol-dp-transition),border-color var(--sol-dp-transition)}.sol-date-picker__day:hover:not(:disabled):not(.is-selected){background:var(--sol-dp-hover)}.sol-date-picker__day.is-outside{color:var(--sol-dp-muted);opacity:.6}.sol-date-picker__day.is-today:not(.is-selected){border-color:var(--sol-dp-primary);font-weight:600}.sol-date-picker__day.is-selected{background:var(--sol-dp-primary);border-color:var(--sol-dp-primary);color:#fff;font-weight:600}.sol-date-picker__day.is-focused:not(.is-selected){outline:2px solid var(--sol-dp-primary);outline-offset:-2px}.sol-date-picker__day:disabled{opacity:.3;cursor:not-allowed}.sol-date-picker__cells{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.sol-date-picker__cell{display:inline-flex;align-items:center;justify-content:center;height:3rem;border:1px solid transparent;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;transition:background var(--sol-dp-transition),color var(--sol-dp-transition),border-color var(--sol-dp-transition)}.sol-date-picker__cell:hover:not(:disabled):not(.is-selected){background:var(--sol-dp-hover)}.sol-date-picker__cell.is-outside{color:var(--sol-dp-muted);opacity:.6}.sol-date-picker__cell.is-today:not(.is-selected){border-color:var(--sol-dp-primary);font-weight:600}.sol-date-picker__cell.is-selected{background:var(--sol-dp-primary);border-color:var(--sol-dp-primary);color:#fff;font-weight:600}.sol-date-picker__cell:disabled{opacity:.3;cursor:not-allowed}@keyframes sol-dp-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.sol-date-picker__pop--up{animation-name:sol-dp-fade-up}@keyframes sol-dp-fade-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.sol-date-picker__pop{animation:none}}@media(max-width:640px){.sol-date-picker__input,.sol-date-picker--sm .sol-date-picker__input{font-size:16px}}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3651
+ `, isInline: true, styles: [":host{display:block;--sol-dp-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-dp-text: var(--sol-color-text-primary, #1e293b);--sol-dp-placeholder: var(--sol-color-text-muted, #94a3b8);--sol-dp-border: var(--sol-border-color-default, #cbd5e1);--sol-dp-border-focus: var(--sol-color-primary, #2563eb);--sol-dp-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-dp-border-width: var(--sol-border-width-default, 1px);--sol-dp-height: var(--sol-size-input-height, 2.5rem);--sol-dp-font-size: var(--sol-font-size-base, .875rem);--sol-dp-shadow: var(--sol-input-shadow, var(--sol-shadow-sm, 0 1px 2px rgba(0, 0, 0, .05)));--sol-dp-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #2563eb) 40%, transparent));--sol-dp-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-dp-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-dp-pop-bg: var(--sol-card-bg, var(--sol-bg-surface, #ffffff));--sol-dp-pop-radius: var(--sol-card-radius, var(--sol-border-radius-lg, .75rem));--sol-dp-pop-shadow: var(--sol-card-shadow, var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .15)));--sol-dp-primary: var(--sol-color-primary, #2563eb);--sol-dp-hover: var(--sol-color-bg-hover, rgba(0, 0, 0, .04));--sol-dp-muted: var(--sol-color-text-muted, #94a3b8)}.sol-date-picker{position:relative;display:block}.sol-date-picker__field{display:flex;align-items:center;width:100%;height:var(--sol-dp-height);background:var(--sol-dp-bg);border:var(--sol-input-border, var(--sol-dp-border-width) solid var(--sol-dp-border));border-radius:var(--sol-dp-radius);box-shadow:var(--sol-dp-shadow);transition:border-color var(--sol-dp-transition),box-shadow var(--sol-dp-transition)}.sol-date-picker--sm .sol-date-picker__field{height:2rem}.sol-date-picker__field--open,.sol-date-picker__field:focus-within{border:var(--sol-input-focus-border, var(--sol-dp-border-width) solid var(--sol-dp-border-focus));box-shadow:var(--sol-dp-focus-ring)}.sol-date-picker__field--disabled{cursor:not-allowed;opacity:var(--sol-dp-disabled-opacity)}.sol-date-picker__input{flex:1;min-width:0;height:100%;padding:0 .5rem 0 var(--sol-space-sm, .75rem);border:none;background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;outline:none}.sol-date-picker--sm .sol-date-picker__input{font-size:var(--sol-font-size-sm, .8125rem)}.sol-date-picker__input::placeholder{color:var(--sol-dp-placeholder)}.sol-date-picker__input:disabled{cursor:not-allowed}.sol-date-picker__trigger-btn{display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0 .5rem;border:none;background:transparent;color:var(--sol-dp-muted);cursor:pointer}.sol-date-picker__trigger-btn:disabled{cursor:not-allowed}.sol-date-picker__pop{position:absolute;top:calc(100% + 4px);left:0;width:300px;max-width:calc(100vw - 24px);padding:.625rem;background:var(--sol-dp-pop-bg);border:var(--sol-dp-border-width) solid var(--sol-dp-border);border-radius:var(--sol-dp-pop-radius);box-shadow:var(--sol-dp-pop-shadow);animation:sol-dp-fade var(--sol-dur-fast, .15s) var(--sol-ease, ease-out)}.sol-date-picker__pop--up{top:auto;bottom:calc(100% + 4px)}.sol-date-picker__header{display:flex;align-items:center;justify-content:space-between;gap:.25rem;margin-bottom:.5rem}.sol-date-picker__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);cursor:pointer;transition:background var(--sol-dp-transition)}.sol-date-picker__nav:hover{background:var(--sol-dp-hover)}.sol-date-picker__title{flex:1;height:2rem;border:none;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);font-weight:var(--sol-font-weight-bold, 600);cursor:pointer;transition:background var(--sol-dp-transition)}.sol-date-picker__title:hover:not(:disabled){background:var(--sol-dp-hover)}.sol-date-picker__title:disabled{cursor:default}.sol-date-picker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.sol-date-picker__weekday{text-align:center;font-size:var(--sol-font-size-sm, .75rem);font-weight:500;color:var(--sol-dp-muted);padding:.25rem 0}.sol-date-picker__grid{display:flex;flex-direction:column;gap:2px}.sol-date-picker__row{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.sol-date-picker__day{display:inline-flex;align-items:center;justify-content:center;aspect-ratio:1 / 1;width:100%;border:1px solid transparent;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;transition:background var(--sol-dp-transition),color var(--sol-dp-transition),border-color var(--sol-dp-transition)}.sol-date-picker__day:hover:not(:disabled):not(.is-selected){background:var(--sol-dp-hover)}.sol-date-picker__day.is-outside{color:var(--sol-dp-muted);opacity:.6}.sol-date-picker__day.is-today:not(.is-selected){border-color:var(--sol-dp-primary);font-weight:600}.sol-date-picker__day.is-selected{background:var(--sol-dp-primary);border-color:var(--sol-dp-primary);color:#fff;font-weight:600}.sol-date-picker__day.is-focused:not(.is-selected){outline:2px solid var(--sol-dp-primary);outline-offset:-2px}.sol-date-picker__day:disabled{opacity:.3;cursor:not-allowed}.sol-date-picker__cells{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.sol-date-picker__cell{display:inline-flex;align-items:center;justify-content:center;height:3rem;border:1px solid transparent;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;transition:background var(--sol-dp-transition),color var(--sol-dp-transition),border-color var(--sol-dp-transition)}.sol-date-picker__cell:hover:not(:disabled):not(.is-selected){background:var(--sol-dp-hover)}.sol-date-picker__cell.is-outside{color:var(--sol-dp-muted);opacity:.6}.sol-date-picker__cell.is-today:not(.is-selected){border-color:var(--sol-dp-primary);font-weight:600}.sol-date-picker__cell.is-selected{background:var(--sol-dp-primary);border-color:var(--sol-dp-primary);color:#fff;font-weight:600}.sol-date-picker__cell:disabled{opacity:.3;cursor:not-allowed}@keyframes sol-dp-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.sol-date-picker__pop--up{animation-name:sol-dp-fade-up}@keyframes sol-dp-fade-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.sol-date-picker__pop{animation:none}}@media(max-width:640px){.sol-date-picker__input,.sol-date-picker--sm .sol-date-picker__input{font-size:16px}}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }, { kind: "directive", type: SolFloatingPanelDirective, selector: "[solFloatingPanel]", inputs: ["solFloatingPanel", "gap", "flipThreshold", "matchTriggerWidth", "align"], outputs: ["dropUpChange"], exportAs: ["solFloatingPanel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3495
3652
  }
3496
3653
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolDatePickerComponent, decorators: [{
3497
3654
  type: Component,
3498
- args: [{ selector: 'sol-date-picker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [SolIconComponent], providers: [
3655
+ args: [{ selector: 'sol-date-picker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [SolIconComponent, SolFloatingPanelDirective], providers: [
3499
3656
  {
3500
3657
  provide: NG_VALUE_ACCESSOR,
3501
3658
  useExisting: forwardRef(() => SolDatePickerComponent),
@@ -3505,6 +3662,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
3505
3662
  <div class="sol-date-picker" [class.sol-date-picker--sm]="size() === 'sm'">
3506
3663
  <!-- Campo disparador -->
3507
3664
  <div
3665
+ #field
3508
3666
  class="sol-date-picker__field"
3509
3667
  [class.sol-date-picker__field--open]="isOpen()"
3510
3668
  [class.sol-date-picker__field--disabled]="isDisabled()"
@@ -3538,12 +3696,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
3538
3696
  </button>
3539
3697
  </div>
3540
3698
 
3541
- <!-- Popover -->
3699
+ <!-- Popover: se portalea a document.body con position:fixed (directiva
3700
+ compartida solFloatingPanel) para que ningún ancestro con overflow
3701
+ o backdrop-filter lo recorte — típicamente .sol-modal-body o el
3702
+ cuerpo de un sol-drawer. Ancho propio (matchTriggerWidth:false) y
3703
+ alineación por el borde derecho cuando no cabe hacia la derecha. -->
3542
3704
  @if (isOpen()) {
3543
3705
  <div
3706
+ #pop
3544
3707
  class="sol-date-picker__pop"
3708
+ [solFloatingPanel]="field"
3709
+ [matchTriggerWidth]="false"
3710
+ [flipThreshold]="popoverHeight"
3711
+ [align]="alignEnd() ? 'end' : 'start'"
3712
+ (dropUpChange)="dropUp.set($event)"
3545
3713
  [class.sol-date-picker__pop--up]="dropUp()"
3546
- [class.sol-date-picker__pop--end]="alignEnd()"
3547
3714
  role="dialog"
3548
3715
  [attr.aria-label]="dialogAria()"
3549
3716
  (keydown)="onPopoverKeydown($event)"
@@ -3655,8 +3822,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
3655
3822
  </div>
3656
3823
  }
3657
3824
  </div>
3658
- `, styles: [":host{display:block;--sol-dp-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-dp-text: var(--sol-color-text-primary, #1e293b);--sol-dp-placeholder: var(--sol-color-text-muted, #94a3b8);--sol-dp-border: var(--sol-border-color-default, #cbd5e1);--sol-dp-border-focus: var(--sol-color-primary, #2563eb);--sol-dp-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-dp-border-width: var(--sol-border-width-default, 1px);--sol-dp-height: var(--sol-size-input-height, 2.5rem);--sol-dp-font-size: var(--sol-font-size-base, .875rem);--sol-dp-shadow: var(--sol-input-shadow, var(--sol-shadow-sm, 0 1px 2px rgba(0, 0, 0, .05)));--sol-dp-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #2563eb) 40%, transparent));--sol-dp-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-dp-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-dp-pop-bg: var(--sol-card-bg, var(--sol-bg-surface, #ffffff));--sol-dp-pop-radius: var(--sol-card-radius, var(--sol-border-radius-lg, .75rem));--sol-dp-pop-shadow: var(--sol-card-shadow, var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .15)));--sol-dp-primary: var(--sol-color-primary, #2563eb);--sol-dp-hover: var(--sol-color-bg-hover, rgba(0, 0, 0, .04));--sol-dp-muted: var(--sol-color-text-muted, #94a3b8)}.sol-date-picker{position:relative;display:block}.sol-date-picker__field{display:flex;align-items:center;width:100%;height:var(--sol-dp-height);background:var(--sol-dp-bg);border:var(--sol-input-border, var(--sol-dp-border-width) solid var(--sol-dp-border));border-radius:var(--sol-dp-radius);box-shadow:var(--sol-dp-shadow);transition:border-color var(--sol-dp-transition),box-shadow var(--sol-dp-transition)}.sol-date-picker--sm .sol-date-picker__field{height:2rem}.sol-date-picker__field--open,.sol-date-picker__field:focus-within{border:var(--sol-input-focus-border, var(--sol-dp-border-width) solid var(--sol-dp-border-focus));box-shadow:var(--sol-dp-focus-ring)}.sol-date-picker__field--disabled{cursor:not-allowed;opacity:var(--sol-dp-disabled-opacity)}.sol-date-picker__input{flex:1;min-width:0;height:100%;padding:0 .5rem 0 var(--sol-space-sm, .75rem);border:none;background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;outline:none}.sol-date-picker--sm .sol-date-picker__input{font-size:var(--sol-font-size-sm, .8125rem)}.sol-date-picker__input::placeholder{color:var(--sol-dp-placeholder)}.sol-date-picker__input:disabled{cursor:not-allowed}.sol-date-picker__trigger-btn{display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0 .5rem;border:none;background:transparent;color:var(--sol-dp-muted);cursor:pointer}.sol-date-picker__trigger-btn:disabled{cursor:not-allowed}.sol-date-picker__pop{position:absolute;top:calc(100% + 4px);left:0;z-index:var(--sol-z-dropdown, 1000);width:300px;max-width:calc(100vw - 24px);padding:.625rem;background:var(--sol-dp-pop-bg);border:var(--sol-dp-border-width) solid var(--sol-dp-border);border-radius:var(--sol-dp-pop-radius);box-shadow:var(--sol-dp-pop-shadow);animation:sol-dp-fade var(--sol-dur-fast, .15s) var(--sol-ease, ease-out)}.sol-date-picker__pop--up{top:auto;bottom:calc(100% + 4px)}.sol-date-picker__pop--end{left:auto;right:0}.sol-date-picker__header{display:flex;align-items:center;justify-content:space-between;gap:.25rem;margin-bottom:.5rem}.sol-date-picker__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);cursor:pointer;transition:background var(--sol-dp-transition)}.sol-date-picker__nav:hover{background:var(--sol-dp-hover)}.sol-date-picker__title{flex:1;height:2rem;border:none;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);font-weight:var(--sol-font-weight-bold, 600);cursor:pointer;transition:background var(--sol-dp-transition)}.sol-date-picker__title:hover:not(:disabled){background:var(--sol-dp-hover)}.sol-date-picker__title:disabled{cursor:default}.sol-date-picker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.sol-date-picker__weekday{text-align:center;font-size:var(--sol-font-size-sm, .75rem);font-weight:500;color:var(--sol-dp-muted);padding:.25rem 0}.sol-date-picker__grid{display:flex;flex-direction:column;gap:2px}.sol-date-picker__row{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.sol-date-picker__day{display:inline-flex;align-items:center;justify-content:center;aspect-ratio:1 / 1;width:100%;border:1px solid transparent;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;transition:background var(--sol-dp-transition),color var(--sol-dp-transition),border-color var(--sol-dp-transition)}.sol-date-picker__day:hover:not(:disabled):not(.is-selected){background:var(--sol-dp-hover)}.sol-date-picker__day.is-outside{color:var(--sol-dp-muted);opacity:.6}.sol-date-picker__day.is-today:not(.is-selected){border-color:var(--sol-dp-primary);font-weight:600}.sol-date-picker__day.is-selected{background:var(--sol-dp-primary);border-color:var(--sol-dp-primary);color:#fff;font-weight:600}.sol-date-picker__day.is-focused:not(.is-selected){outline:2px solid var(--sol-dp-primary);outline-offset:-2px}.sol-date-picker__day:disabled{opacity:.3;cursor:not-allowed}.sol-date-picker__cells{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.sol-date-picker__cell{display:inline-flex;align-items:center;justify-content:center;height:3rem;border:1px solid transparent;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;transition:background var(--sol-dp-transition),color var(--sol-dp-transition),border-color var(--sol-dp-transition)}.sol-date-picker__cell:hover:not(:disabled):not(.is-selected){background:var(--sol-dp-hover)}.sol-date-picker__cell.is-outside{color:var(--sol-dp-muted);opacity:.6}.sol-date-picker__cell.is-today:not(.is-selected){border-color:var(--sol-dp-primary);font-weight:600}.sol-date-picker__cell.is-selected{background:var(--sol-dp-primary);border-color:var(--sol-dp-primary);color:#fff;font-weight:600}.sol-date-picker__cell:disabled{opacity:.3;cursor:not-allowed}@keyframes sol-dp-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.sol-date-picker__pop--up{animation-name:sol-dp-fade-up}@keyframes sol-dp-fade-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.sol-date-picker__pop{animation:none}}@media(max-width:640px){.sol-date-picker__input,.sol-date-picker--sm .sol-date-picker__input{font-size:16px}}\n"] }]
3659
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], onDocumentClick: [{
3825
+ `, styles: [":host{display:block;--sol-dp-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-dp-text: var(--sol-color-text-primary, #1e293b);--sol-dp-placeholder: var(--sol-color-text-muted, #94a3b8);--sol-dp-border: var(--sol-border-color-default, #cbd5e1);--sol-dp-border-focus: var(--sol-color-primary, #2563eb);--sol-dp-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-dp-border-width: var(--sol-border-width-default, 1px);--sol-dp-height: var(--sol-size-input-height, 2.5rem);--sol-dp-font-size: var(--sol-font-size-base, .875rem);--sol-dp-shadow: var(--sol-input-shadow, var(--sol-shadow-sm, 0 1px 2px rgba(0, 0, 0, .05)));--sol-dp-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #2563eb) 40%, transparent));--sol-dp-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease);--sol-dp-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-dp-pop-bg: var(--sol-card-bg, var(--sol-bg-surface, #ffffff));--sol-dp-pop-radius: var(--sol-card-radius, var(--sol-border-radius-lg, .75rem));--sol-dp-pop-shadow: var(--sol-card-shadow, var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .15)));--sol-dp-primary: var(--sol-color-primary, #2563eb);--sol-dp-hover: var(--sol-color-bg-hover, rgba(0, 0, 0, .04));--sol-dp-muted: var(--sol-color-text-muted, #94a3b8)}.sol-date-picker{position:relative;display:block}.sol-date-picker__field{display:flex;align-items:center;width:100%;height:var(--sol-dp-height);background:var(--sol-dp-bg);border:var(--sol-input-border, var(--sol-dp-border-width) solid var(--sol-dp-border));border-radius:var(--sol-dp-radius);box-shadow:var(--sol-dp-shadow);transition:border-color var(--sol-dp-transition),box-shadow var(--sol-dp-transition)}.sol-date-picker--sm .sol-date-picker__field{height:2rem}.sol-date-picker__field--open,.sol-date-picker__field:focus-within{border:var(--sol-input-focus-border, var(--sol-dp-border-width) solid var(--sol-dp-border-focus));box-shadow:var(--sol-dp-focus-ring)}.sol-date-picker__field--disabled{cursor:not-allowed;opacity:var(--sol-dp-disabled-opacity)}.sol-date-picker__input{flex:1;min-width:0;height:100%;padding:0 .5rem 0 var(--sol-space-sm, .75rem);border:none;background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;outline:none}.sol-date-picker--sm .sol-date-picker__input{font-size:var(--sol-font-size-sm, .8125rem)}.sol-date-picker__input::placeholder{color:var(--sol-dp-placeholder)}.sol-date-picker__input:disabled{cursor:not-allowed}.sol-date-picker__trigger-btn{display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0 .5rem;border:none;background:transparent;color:var(--sol-dp-muted);cursor:pointer}.sol-date-picker__trigger-btn:disabled{cursor:not-allowed}.sol-date-picker__pop{position:absolute;top:calc(100% + 4px);left:0;width:300px;max-width:calc(100vw - 24px);padding:.625rem;background:var(--sol-dp-pop-bg);border:var(--sol-dp-border-width) solid var(--sol-dp-border);border-radius:var(--sol-dp-pop-radius);box-shadow:var(--sol-dp-pop-shadow);animation:sol-dp-fade var(--sol-dur-fast, .15s) var(--sol-ease, ease-out)}.sol-date-picker__pop--up{top:auto;bottom:calc(100% + 4px)}.sol-date-picker__header{display:flex;align-items:center;justify-content:space-between;gap:.25rem;margin-bottom:.5rem}.sol-date-picker__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);cursor:pointer;transition:background var(--sol-dp-transition)}.sol-date-picker__nav:hover{background:var(--sol-dp-hover)}.sol-date-picker__title{flex:1;height:2rem;border:none;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);font-weight:var(--sol-font-weight-bold, 600);cursor:pointer;transition:background var(--sol-dp-transition)}.sol-date-picker__title:hover:not(:disabled){background:var(--sol-dp-hover)}.sol-date-picker__title:disabled{cursor:default}.sol-date-picker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.sol-date-picker__weekday{text-align:center;font-size:var(--sol-font-size-sm, .75rem);font-weight:500;color:var(--sol-dp-muted);padding:.25rem 0}.sol-date-picker__grid{display:flex;flex-direction:column;gap:2px}.sol-date-picker__row{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.sol-date-picker__day{display:inline-flex;align-items:center;justify-content:center;aspect-ratio:1 / 1;width:100%;border:1px solid transparent;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;transition:background var(--sol-dp-transition),color var(--sol-dp-transition),border-color var(--sol-dp-transition)}.sol-date-picker__day:hover:not(:disabled):not(.is-selected){background:var(--sol-dp-hover)}.sol-date-picker__day.is-outside{color:var(--sol-dp-muted);opacity:.6}.sol-date-picker__day.is-today:not(.is-selected){border-color:var(--sol-dp-primary);font-weight:600}.sol-date-picker__day.is-selected{background:var(--sol-dp-primary);border-color:var(--sol-dp-primary);color:#fff;font-weight:600}.sol-date-picker__day.is-focused:not(.is-selected){outline:2px solid var(--sol-dp-primary);outline-offset:-2px}.sol-date-picker__day:disabled{opacity:.3;cursor:not-allowed}.sol-date-picker__cells{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.sol-date-picker__cell{display:inline-flex;align-items:center;justify-content:center;height:3rem;border:1px solid transparent;border-radius:var(--sol-border-radius-md, .5rem);background:transparent;color:var(--sol-dp-text);font-family:inherit;font-size:var(--sol-dp-font-size);cursor:pointer;transition:background var(--sol-dp-transition),color var(--sol-dp-transition),border-color var(--sol-dp-transition)}.sol-date-picker__cell:hover:not(:disabled):not(.is-selected){background:var(--sol-dp-hover)}.sol-date-picker__cell.is-outside{color:var(--sol-dp-muted);opacity:.6}.sol-date-picker__cell.is-today:not(.is-selected){border-color:var(--sol-dp-primary);font-weight:600}.sol-date-picker__cell.is-selected{background:var(--sol-dp-primary);border-color:var(--sol-dp-primary);color:#fff;font-weight:600}.sol-date-picker__cell:disabled{opacity:.3;cursor:not-allowed}@keyframes sol-dp-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.sol-date-picker__pop--up{animation-name:sol-dp-fade-up}@keyframes sol-dp-fade-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.sol-date-picker__pop{animation:none}}@media(max-width:640px){.sol-date-picker__input,.sol-date-picker--sm .sol-date-picker__input{font-size:16px}}\n"] }]
3826
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], popRef: [{ type: i0.ViewChild, args: ['pop', { isSignal: true }] }], onDocumentClick: [{
3660
3827
  type: HostListener,
3661
3828
  args: ['document:click', ['$event']]
3662
3829
  }] } });
@@ -7932,7 +8099,7 @@ class SolRichEditorComponent {
7932
8099
  (change)="onFileSelected($event)" tabindex="-1" aria-hidden="true"
7933
8100
  />
7934
8101
  </div>
7935
- `, isInline: true, styles: [":host{display:block;--sre-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sre-text: var(--sol-color-text-primary, #1e293b);--sre-muted: var(--sol-color-text-muted, #94a3b8);--sre-border: var(--sol-border-color-default, #cbd5e1);--sre-border-focus: var(--sol-color-primary, #6366f1);--sre-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sre-toolbar-bg: var(--sol-bg-sunken, var(--sol-bg-page, #f8fafc));--sre-btn-hover: color-mix(in srgb, var(--sol-color-primary, #6366f1) 12%, transparent);--sre-btn-active: color-mix(in srgb, var(--sol-color-primary, #6366f1) 18%, transparent);--sre-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 30%, transparent));--sre-font: var(--sol-font-family, system-ui, sans-serif);--sre-font-size: var(--sol-font-size-base, .9375rem);--sre-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-rich-editor{position:relative;display:flex;flex-direction:column;border:var(--sol-input-border, var(--sol-border-width-default, 1px) solid var(--sre-border));border-radius:var(--sre-radius);background:var(--sre-bg);box-shadow:var(--sol-input-shadow, none);overflow:hidden;transition:border-color var(--sre-transition),box-shadow var(--sre-transition)}.sol-rich-editor:focus-within{border-color:var(--sre-border-focus);box-shadow:var(--sre-focus-ring)}.sol-rich-editor--disabled{opacity:var(--sol-disabled-opacity, .55)}.sol-rich-editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem;padding:.375rem .5rem;background:var(--sre-toolbar-bg);border-bottom:1px solid var(--sre-border)}.sol-rich-editor__group{display:flex;align-items:center;gap:.125rem}.sol-rich-editor__group--menu{position:relative;display:inline-flex}.sol-rich-editor__sep{width:1px;align-self:stretch;margin:.125rem .25rem;background:var(--sre-border)}.sol-rich-editor__btn{display:inline-flex;align-items:center;justify-content:center;width:1.875rem;height:1.875rem;padding:0;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);cursor:pointer;transition:background-color var(--sre-transition),color var(--sre-transition)}.sol-rich-editor__btn:hover:not(:disabled){background:var(--sre-btn-hover)}.sol-rich-editor__btn:focus-visible{outline:2px solid var(--sre-border-focus);outline-offset:1px}.sol-rich-editor__btn.is-active{background:var(--sre-btn-active);color:var(--sol-color-primary, #6366f1)}.sol-rich-editor__btn:disabled{cursor:not-allowed;opacity:.5}.sol-rich-editor__menu{position:absolute;top:calc(100% + .25rem);left:0;z-index:var(--sol-z-dropdown, 1000);min-width:9rem;padding:.25rem;background:var(--sol-bg-surface, #ffffff);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-md, .5rem);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .12))}.sol-rich-editor__menu-item{display:block;width:100%;padding:.375rem .625rem;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);text-align:left;cursor:pointer}.sol-rich-editor__menu-item:hover{background:var(--sre-btn-hover)}.sol-rich-editor__menu-item--h1{font-size:1.375rem;font-weight:700}.sol-rich-editor__menu-item--h2{font-size:1.125rem;font-weight:700}.sol-rich-editor__menu-item--h3{font-size:1rem;font-weight:600}.sol-rich-editor__menu--table{min-width:auto}.sol-rich-editor__grid{display:flex;flex-direction:column;gap:2px}.sol-rich-editor__grid-row{display:flex;gap:2px}.sol-rich-editor__grid-cell{width:1rem;height:1rem;padding:0;border:1px solid var(--sre-border);border-radius:2px;background:var(--sol-bg-surface, #ffffff);cursor:pointer}.sol-rich-editor__grid-cell.is-on{background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 45%,transparent);border-color:var(--sol-color-primary, #6366f1)}.sol-rich-editor__grid-label{margin-top:.375rem;text-align:center;font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);color:var(--sre-muted)}.sol-rich-editor__menu--link{min-width:15rem}.sol-rich-editor__link-input{width:100%;height:var(--sol-size-input-height, 2.25rem);padding:0 .5rem;font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);color:var(--sre-text);background:var(--sre-bg);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-sm, .375rem);outline:none;box-sizing:border-box}.sol-rich-editor__link-input:focus{border-color:var(--sre-border-focus)}.sol-rich-editor__link-actions{display:flex;gap:.375rem;margin-top:.375rem}.sol-rich-editor__link-btn{flex:1;padding:.375rem .5rem;border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);cursor:pointer}.sol-rich-editor__link-btn:hover{background:var(--sre-btn-hover)}.sol-rich-editor__link-btn--primary{background:var(--sol-color-primary, #6366f1);border-color:var(--sol-color-primary, #6366f1);color:var(--sol-color-primary-contrast, #ffffff)}.sol-rich-editor__content{flex:1;padding:.75rem .875rem;overflow-y:auto;font-family:var(--sre-font);font-size:var(--sre-font-size);line-height:var(--sol-line-height, 1.6);color:var(--sre-text);outline:none;word-break:break-word}.sol-rich-editor__content.is-empty:before{content:attr(data-placeholder);color:var(--sre-muted);pointer-events:none}.sol-rich-editor__error{margin:0;padding:.375rem .875rem;font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);color:var(--sol-color-danger, #ef4444)}.sol-rich-editor__file{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sol-rich-editor__popover{position:absolute;z-index:var(--sol-z-dropdown, 1000);min-width:12rem;max-width:18rem;max-height:14rem;overflow-y:auto;padding:.25rem;background:var(--sol-bg-surface, #ffffff);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-md, .5rem);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .12))}.sol-rich-editor__popover--task{min-width:16rem}.sol-rich-editor__popover-item{display:flex;align-items:center;gap:.5rem;width:100%;padding:.375rem .5rem;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);text-align:left;cursor:pointer}.sol-rich-editor__popover-item:hover,.sol-rich-editor__popover-item.is-active{background:var(--sre-btn-hover)}.sol-rich-editor__popover-label{flex:1;min-width:0}.sol-rich-editor__popover-label--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sol-rich-editor__avatar{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:9999px;background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 20%,transparent);color:var(--sol-color-primary, #6366f1);font-size:var(--sol-font-size-sm, .75rem);font-weight:600}.sol-rich-editor__task-key{flex-shrink:0;padding:.0625rem .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-success, #10b981) 14%,transparent);color:var(--sol-color-success, #10b981);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-size:var(--sol-font-size-sm, .75rem);font-weight:600}.sol-rich-editor__content ::ng-deep span[data-mention-id]{display:inline-block;padding:0 .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 12%,transparent);color:var(--sol-color-primary, #6366f1);font-weight:500;white-space:nowrap}.sol-rich-editor__content ::ng-deep span[data-task-key]{display:inline-block;padding:0 .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-success, #10b981) 14%,transparent);color:var(--sol-color-success, #10b981);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-weight:600;white-space:nowrap}.sol-rich-editor__content ::ng-deep h1{font-size:1.5rem;font-weight:700;margin:.5rem 0;line-height:1.25}.sol-rich-editor__content ::ng-deep h2{font-size:1.25rem;font-weight:700;margin:.5rem 0;line-height:1.3}.sol-rich-editor__content ::ng-deep h3{font-size:1.0625rem;font-weight:600;margin:.5rem 0;line-height:1.35}.sol-rich-editor__content ::ng-deep p{margin:0 0 .5rem}.sol-rich-editor__content ::ng-deep ul,.sol-rich-editor__content ::ng-deep ol{margin:0 0 .5rem;padding-left:1.5rem}.sol-rich-editor__content ::ng-deep li{margin:.125rem 0}.sol-rich-editor__content ::ng-deep a{color:var(--sol-color-primary, #6366f1);text-decoration:underline}.sol-rich-editor__content ::ng-deep img{max-width:100%;height:auto;border-radius:var(--sol-border-radius-sm, .375rem)}.sol-rich-editor__content ::ng-deep table{border-collapse:collapse;margin:.5rem 0;width:auto}.sol-rich-editor__content ::ng-deep td,.sol-rich-editor__content ::ng-deep th{border:1px solid var(--sre-border);padding:.375rem .5rem;min-width:3rem}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8102
+ `, isInline: true, styles: [":host{display:block;--sre-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sre-text: var(--sol-color-text-primary, #1e293b);--sre-muted: var(--sol-color-text-muted, #94a3b8);--sre-border: var(--sol-border-color-default, #cbd5e1);--sre-border-focus: var(--sol-color-primary, #6366f1);--sre-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sre-toolbar-bg: var(--sol-bg-sunken, var(--sol-bg-page, #f8fafc));--sre-btn-hover: color-mix(in srgb, var(--sol-color-primary, #6366f1) 12%, transparent);--sre-btn-active: color-mix(in srgb, var(--sol-color-primary, #6366f1) 18%, transparent);--sre-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 30%, transparent));--sre-font: var(--sol-font-family, system-ui, sans-serif);--sre-font-size: var(--sol-font-size-base, .9375rem);--sre-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-rich-editor{position:relative;display:flex;flex-direction:column;border:var(--sol-input-border, var(--sol-border-width-default, 1px) solid var(--sre-border));border-radius:var(--sre-radius);background:var(--sre-bg);box-shadow:var(--sol-input-shadow, none);transition:border-color var(--sre-transition),box-shadow var(--sre-transition)}.sol-rich-editor:focus-within{border-color:var(--sre-border-focus);box-shadow:var(--sre-focus-ring)}.sol-rich-editor--disabled{opacity:var(--sol-disabled-opacity, .55)}.sol-rich-editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem;padding:.375rem .5rem;background:var(--sre-toolbar-bg);border-bottom:1px solid var(--sre-border);border-radius:calc(var(--sre-radius) - 1px) calc(var(--sre-radius) - 1px) 0 0}.sol-rich-editor__group{display:flex;align-items:center;gap:.125rem}.sol-rich-editor__group--menu{position:relative;display:inline-flex}.sol-rich-editor__sep{width:1px;align-self:stretch;margin:.125rem .25rem;background:var(--sre-border)}.sol-rich-editor__btn{display:inline-flex;align-items:center;justify-content:center;width:1.875rem;height:1.875rem;padding:0;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);cursor:pointer;transition:background-color var(--sre-transition),color var(--sre-transition)}.sol-rich-editor__btn:hover:not(:disabled){background:var(--sre-btn-hover)}.sol-rich-editor__btn:focus-visible{outline:2px solid var(--sre-border-focus);outline-offset:1px}.sol-rich-editor__btn.is-active{background:var(--sre-btn-active);color:var(--sol-color-primary, #6366f1)}.sol-rich-editor__btn:disabled{cursor:not-allowed;opacity:.5}.sol-rich-editor__menu{position:absolute;top:calc(100% + .25rem);left:0;z-index:var(--sol-z-dropdown, 1000);min-width:9rem;padding:.25rem;background:var(--sol-bg-surface, #ffffff);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-md, .5rem);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .12))}.sol-rich-editor__menu-item{display:block;width:100%;padding:.375rem .625rem;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);text-align:left;cursor:pointer}.sol-rich-editor__menu-item:hover{background:var(--sre-btn-hover)}.sol-rich-editor__menu-item--h1{font-size:1.375rem;font-weight:700}.sol-rich-editor__menu-item--h2{font-size:1.125rem;font-weight:700}.sol-rich-editor__menu-item--h3{font-size:1rem;font-weight:600}.sol-rich-editor__menu--table{min-width:auto}.sol-rich-editor__grid{display:flex;flex-direction:column;gap:2px}.sol-rich-editor__grid-row{display:flex;gap:2px}.sol-rich-editor__grid-cell{width:1rem;height:1rem;padding:0;border:1px solid var(--sre-border);border-radius:2px;background:var(--sol-bg-surface, #ffffff);cursor:pointer}.sol-rich-editor__grid-cell.is-on{background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 45%,transparent);border-color:var(--sol-color-primary, #6366f1)}.sol-rich-editor__grid-label{margin-top:.375rem;text-align:center;font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);color:var(--sre-muted)}.sol-rich-editor__menu--link{min-width:15rem}.sol-rich-editor__link-input{width:100%;height:var(--sol-size-input-height, 2.25rem);padding:0 .5rem;font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);color:var(--sre-text);background:var(--sre-bg);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-sm, .375rem);outline:none;box-sizing:border-box}.sol-rich-editor__link-input:focus{border-color:var(--sre-border-focus)}.sol-rich-editor__link-actions{display:flex;gap:.375rem;margin-top:.375rem}.sol-rich-editor__link-btn{flex:1;padding:.375rem .5rem;border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);cursor:pointer}.sol-rich-editor__link-btn:hover{background:var(--sre-btn-hover)}.sol-rich-editor__link-btn--primary{background:var(--sol-color-primary, #6366f1);border-color:var(--sol-color-primary, #6366f1);color:var(--sol-color-primary-contrast, #ffffff)}.sol-rich-editor__content{flex:1;padding:.75rem .875rem;overflow-y:auto;border-radius:0 0 calc(var(--sre-radius) - 1px) calc(var(--sre-radius) - 1px);font-family:var(--sre-font);font-size:var(--sre-font-size);line-height:var(--sol-line-height, 1.6);color:var(--sre-text);outline:none;word-break:break-word}.sol-rich-editor__content.is-empty:before{content:attr(data-placeholder);color:var(--sre-muted);pointer-events:none}.sol-rich-editor__error{margin:0;padding:.375rem .875rem;font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);color:var(--sol-color-danger, #ef4444)}.sol-rich-editor__file{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sol-rich-editor__popover{position:absolute;z-index:var(--sol-z-dropdown, 1000);min-width:12rem;max-width:18rem;max-height:14rem;overflow-y:auto;padding:.25rem;background:var(--sol-bg-surface, #ffffff);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-md, .5rem);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .12))}.sol-rich-editor__popover--task{min-width:16rem}.sol-rich-editor__popover-item{display:flex;align-items:center;gap:.5rem;width:100%;padding:.375rem .5rem;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);text-align:left;cursor:pointer}.sol-rich-editor__popover-item:hover,.sol-rich-editor__popover-item.is-active{background:var(--sre-btn-hover)}.sol-rich-editor__popover-label{flex:1;min-width:0}.sol-rich-editor__popover-label--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sol-rich-editor__avatar{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:9999px;background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 20%,transparent);color:var(--sol-color-primary, #6366f1);font-size:var(--sol-font-size-sm, .75rem);font-weight:600}.sol-rich-editor__task-key{flex-shrink:0;padding:.0625rem .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-success, #10b981) 14%,transparent);color:var(--sol-color-success, #10b981);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-size:var(--sol-font-size-sm, .75rem);font-weight:600}.sol-rich-editor__content ::ng-deep span[data-mention-id]{display:inline-block;padding:0 .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 12%,transparent);color:var(--sol-color-primary, #6366f1);font-weight:500;white-space:nowrap}.sol-rich-editor__content ::ng-deep span[data-task-key]{display:inline-block;padding:0 .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-success, #10b981) 14%,transparent);color:var(--sol-color-success, #10b981);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-weight:600;white-space:nowrap}.sol-rich-editor__content ::ng-deep h1{font-size:1.5rem;font-weight:700;margin:.5rem 0;line-height:1.25}.sol-rich-editor__content ::ng-deep h2{font-size:1.25rem;font-weight:700;margin:.5rem 0;line-height:1.3}.sol-rich-editor__content ::ng-deep h3{font-size:1.0625rem;font-weight:600;margin:.5rem 0;line-height:1.35}.sol-rich-editor__content ::ng-deep p{margin:0 0 .5rem}.sol-rich-editor__content ::ng-deep ul,.sol-rich-editor__content ::ng-deep ol{margin:0 0 .5rem;padding-left:1.5rem}.sol-rich-editor__content ::ng-deep li{margin:.125rem 0}.sol-rich-editor__content ::ng-deep a{color:var(--sol-color-primary, #6366f1);text-decoration:underline}.sol-rich-editor__content ::ng-deep img{max-width:100%;height:auto;border-radius:var(--sol-border-radius-sm, .375rem)}.sol-rich-editor__content ::ng-deep table{border-collapse:collapse;margin:.5rem 0;width:auto}.sol-rich-editor__content ::ng-deep td,.sol-rich-editor__content ::ng-deep th{border:1px solid var(--sre-border);padding:.375rem .5rem;min-width:3rem}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7936
8103
  }
7937
8104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolRichEditorComponent, decorators: [{
7938
8105
  type: Component,
@@ -8191,7 +8358,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
8191
8358
  (change)="onFileSelected($event)" tabindex="-1" aria-hidden="true"
8192
8359
  />
8193
8360
  </div>
8194
- `, styles: [":host{display:block;--sre-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sre-text: var(--sol-color-text-primary, #1e293b);--sre-muted: var(--sol-color-text-muted, #94a3b8);--sre-border: var(--sol-border-color-default, #cbd5e1);--sre-border-focus: var(--sol-color-primary, #6366f1);--sre-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sre-toolbar-bg: var(--sol-bg-sunken, var(--sol-bg-page, #f8fafc));--sre-btn-hover: color-mix(in srgb, var(--sol-color-primary, #6366f1) 12%, transparent);--sre-btn-active: color-mix(in srgb, var(--sol-color-primary, #6366f1) 18%, transparent);--sre-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 30%, transparent));--sre-font: var(--sol-font-family, system-ui, sans-serif);--sre-font-size: var(--sol-font-size-base, .9375rem);--sre-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-rich-editor{position:relative;display:flex;flex-direction:column;border:var(--sol-input-border, var(--sol-border-width-default, 1px) solid var(--sre-border));border-radius:var(--sre-radius);background:var(--sre-bg);box-shadow:var(--sol-input-shadow, none);overflow:hidden;transition:border-color var(--sre-transition),box-shadow var(--sre-transition)}.sol-rich-editor:focus-within{border-color:var(--sre-border-focus);box-shadow:var(--sre-focus-ring)}.sol-rich-editor--disabled{opacity:var(--sol-disabled-opacity, .55)}.sol-rich-editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem;padding:.375rem .5rem;background:var(--sre-toolbar-bg);border-bottom:1px solid var(--sre-border)}.sol-rich-editor__group{display:flex;align-items:center;gap:.125rem}.sol-rich-editor__group--menu{position:relative;display:inline-flex}.sol-rich-editor__sep{width:1px;align-self:stretch;margin:.125rem .25rem;background:var(--sre-border)}.sol-rich-editor__btn{display:inline-flex;align-items:center;justify-content:center;width:1.875rem;height:1.875rem;padding:0;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);cursor:pointer;transition:background-color var(--sre-transition),color var(--sre-transition)}.sol-rich-editor__btn:hover:not(:disabled){background:var(--sre-btn-hover)}.sol-rich-editor__btn:focus-visible{outline:2px solid var(--sre-border-focus);outline-offset:1px}.sol-rich-editor__btn.is-active{background:var(--sre-btn-active);color:var(--sol-color-primary, #6366f1)}.sol-rich-editor__btn:disabled{cursor:not-allowed;opacity:.5}.sol-rich-editor__menu{position:absolute;top:calc(100% + .25rem);left:0;z-index:var(--sol-z-dropdown, 1000);min-width:9rem;padding:.25rem;background:var(--sol-bg-surface, #ffffff);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-md, .5rem);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .12))}.sol-rich-editor__menu-item{display:block;width:100%;padding:.375rem .625rem;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);text-align:left;cursor:pointer}.sol-rich-editor__menu-item:hover{background:var(--sre-btn-hover)}.sol-rich-editor__menu-item--h1{font-size:1.375rem;font-weight:700}.sol-rich-editor__menu-item--h2{font-size:1.125rem;font-weight:700}.sol-rich-editor__menu-item--h3{font-size:1rem;font-weight:600}.sol-rich-editor__menu--table{min-width:auto}.sol-rich-editor__grid{display:flex;flex-direction:column;gap:2px}.sol-rich-editor__grid-row{display:flex;gap:2px}.sol-rich-editor__grid-cell{width:1rem;height:1rem;padding:0;border:1px solid var(--sre-border);border-radius:2px;background:var(--sol-bg-surface, #ffffff);cursor:pointer}.sol-rich-editor__grid-cell.is-on{background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 45%,transparent);border-color:var(--sol-color-primary, #6366f1)}.sol-rich-editor__grid-label{margin-top:.375rem;text-align:center;font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);color:var(--sre-muted)}.sol-rich-editor__menu--link{min-width:15rem}.sol-rich-editor__link-input{width:100%;height:var(--sol-size-input-height, 2.25rem);padding:0 .5rem;font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);color:var(--sre-text);background:var(--sre-bg);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-sm, .375rem);outline:none;box-sizing:border-box}.sol-rich-editor__link-input:focus{border-color:var(--sre-border-focus)}.sol-rich-editor__link-actions{display:flex;gap:.375rem;margin-top:.375rem}.sol-rich-editor__link-btn{flex:1;padding:.375rem .5rem;border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);cursor:pointer}.sol-rich-editor__link-btn:hover{background:var(--sre-btn-hover)}.sol-rich-editor__link-btn--primary{background:var(--sol-color-primary, #6366f1);border-color:var(--sol-color-primary, #6366f1);color:var(--sol-color-primary-contrast, #ffffff)}.sol-rich-editor__content{flex:1;padding:.75rem .875rem;overflow-y:auto;font-family:var(--sre-font);font-size:var(--sre-font-size);line-height:var(--sol-line-height, 1.6);color:var(--sre-text);outline:none;word-break:break-word}.sol-rich-editor__content.is-empty:before{content:attr(data-placeholder);color:var(--sre-muted);pointer-events:none}.sol-rich-editor__error{margin:0;padding:.375rem .875rem;font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);color:var(--sol-color-danger, #ef4444)}.sol-rich-editor__file{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sol-rich-editor__popover{position:absolute;z-index:var(--sol-z-dropdown, 1000);min-width:12rem;max-width:18rem;max-height:14rem;overflow-y:auto;padding:.25rem;background:var(--sol-bg-surface, #ffffff);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-md, .5rem);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .12))}.sol-rich-editor__popover--task{min-width:16rem}.sol-rich-editor__popover-item{display:flex;align-items:center;gap:.5rem;width:100%;padding:.375rem .5rem;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);text-align:left;cursor:pointer}.sol-rich-editor__popover-item:hover,.sol-rich-editor__popover-item.is-active{background:var(--sre-btn-hover)}.sol-rich-editor__popover-label{flex:1;min-width:0}.sol-rich-editor__popover-label--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sol-rich-editor__avatar{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:9999px;background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 20%,transparent);color:var(--sol-color-primary, #6366f1);font-size:var(--sol-font-size-sm, .75rem);font-weight:600}.sol-rich-editor__task-key{flex-shrink:0;padding:.0625rem .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-success, #10b981) 14%,transparent);color:var(--sol-color-success, #10b981);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-size:var(--sol-font-size-sm, .75rem);font-weight:600}.sol-rich-editor__content ::ng-deep span[data-mention-id]{display:inline-block;padding:0 .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 12%,transparent);color:var(--sol-color-primary, #6366f1);font-weight:500;white-space:nowrap}.sol-rich-editor__content ::ng-deep span[data-task-key]{display:inline-block;padding:0 .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-success, #10b981) 14%,transparent);color:var(--sol-color-success, #10b981);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-weight:600;white-space:nowrap}.sol-rich-editor__content ::ng-deep h1{font-size:1.5rem;font-weight:700;margin:.5rem 0;line-height:1.25}.sol-rich-editor__content ::ng-deep h2{font-size:1.25rem;font-weight:700;margin:.5rem 0;line-height:1.3}.sol-rich-editor__content ::ng-deep h3{font-size:1.0625rem;font-weight:600;margin:.5rem 0;line-height:1.35}.sol-rich-editor__content ::ng-deep p{margin:0 0 .5rem}.sol-rich-editor__content ::ng-deep ul,.sol-rich-editor__content ::ng-deep ol{margin:0 0 .5rem;padding-left:1.5rem}.sol-rich-editor__content ::ng-deep li{margin:.125rem 0}.sol-rich-editor__content ::ng-deep a{color:var(--sol-color-primary, #6366f1);text-decoration:underline}.sol-rich-editor__content ::ng-deep img{max-width:100%;height:auto;border-radius:var(--sol-border-radius-sm, .375rem)}.sol-rich-editor__content ::ng-deep table{border-collapse:collapse;margin:.5rem 0;width:auto}.sol-rich-editor__content ::ng-deep td,.sol-rich-editor__content ::ng-deep th{border:1px solid var(--sre-border);padding:.375rem .5rem;min-width:3rem}\n"] }]
8361
+ `, styles: [":host{display:block;--sre-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sre-text: var(--sol-color-text-primary, #1e293b);--sre-muted: var(--sol-color-text-muted, #94a3b8);--sre-border: var(--sol-border-color-default, #cbd5e1);--sre-border-focus: var(--sol-color-primary, #6366f1);--sre-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sre-toolbar-bg: var(--sol-bg-sunken, var(--sol-bg-page, #f8fafc));--sre-btn-hover: color-mix(in srgb, var(--sol-color-primary, #6366f1) 12%, transparent);--sre-btn-active: color-mix(in srgb, var(--sol-color-primary, #6366f1) 18%, transparent);--sre-focus-ring: var(--sol-input-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 30%, transparent));--sre-font: var(--sol-font-family, system-ui, sans-serif);--sre-font-size: var(--sol-font-size-base, .9375rem);--sre-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-rich-editor{position:relative;display:flex;flex-direction:column;border:var(--sol-input-border, var(--sol-border-width-default, 1px) solid var(--sre-border));border-radius:var(--sre-radius);background:var(--sre-bg);box-shadow:var(--sol-input-shadow, none);transition:border-color var(--sre-transition),box-shadow var(--sre-transition)}.sol-rich-editor:focus-within{border-color:var(--sre-border-focus);box-shadow:var(--sre-focus-ring)}.sol-rich-editor--disabled{opacity:var(--sol-disabled-opacity, .55)}.sol-rich-editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem;padding:.375rem .5rem;background:var(--sre-toolbar-bg);border-bottom:1px solid var(--sre-border);border-radius:calc(var(--sre-radius) - 1px) calc(var(--sre-radius) - 1px) 0 0}.sol-rich-editor__group{display:flex;align-items:center;gap:.125rem}.sol-rich-editor__group--menu{position:relative;display:inline-flex}.sol-rich-editor__sep{width:1px;align-self:stretch;margin:.125rem .25rem;background:var(--sre-border)}.sol-rich-editor__btn{display:inline-flex;align-items:center;justify-content:center;width:1.875rem;height:1.875rem;padding:0;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);cursor:pointer;transition:background-color var(--sre-transition),color var(--sre-transition)}.sol-rich-editor__btn:hover:not(:disabled){background:var(--sre-btn-hover)}.sol-rich-editor__btn:focus-visible{outline:2px solid var(--sre-border-focus);outline-offset:1px}.sol-rich-editor__btn.is-active{background:var(--sre-btn-active);color:var(--sol-color-primary, #6366f1)}.sol-rich-editor__btn:disabled{cursor:not-allowed;opacity:.5}.sol-rich-editor__menu{position:absolute;top:calc(100% + .25rem);left:0;z-index:var(--sol-z-dropdown, 1000);min-width:9rem;padding:.25rem;background:var(--sol-bg-surface, #ffffff);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-md, .5rem);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .12))}.sol-rich-editor__menu-item{display:block;width:100%;padding:.375rem .625rem;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);text-align:left;cursor:pointer}.sol-rich-editor__menu-item:hover{background:var(--sre-btn-hover)}.sol-rich-editor__menu-item--h1{font-size:1.375rem;font-weight:700}.sol-rich-editor__menu-item--h2{font-size:1.125rem;font-weight:700}.sol-rich-editor__menu-item--h3{font-size:1rem;font-weight:600}.sol-rich-editor__menu--table{min-width:auto}.sol-rich-editor__grid{display:flex;flex-direction:column;gap:2px}.sol-rich-editor__grid-row{display:flex;gap:2px}.sol-rich-editor__grid-cell{width:1rem;height:1rem;padding:0;border:1px solid var(--sre-border);border-radius:2px;background:var(--sol-bg-surface, #ffffff);cursor:pointer}.sol-rich-editor__grid-cell.is-on{background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 45%,transparent);border-color:var(--sol-color-primary, #6366f1)}.sol-rich-editor__grid-label{margin-top:.375rem;text-align:center;font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);color:var(--sre-muted)}.sol-rich-editor__menu--link{min-width:15rem}.sol-rich-editor__link-input{width:100%;height:var(--sol-size-input-height, 2.25rem);padding:0 .5rem;font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);color:var(--sre-text);background:var(--sre-bg);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-sm, .375rem);outline:none;box-sizing:border-box}.sol-rich-editor__link-input:focus{border-color:var(--sre-border-focus)}.sol-rich-editor__link-actions{display:flex;gap:.375rem;margin-top:.375rem}.sol-rich-editor__link-btn{flex:1;padding:.375rem .5rem;border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);cursor:pointer}.sol-rich-editor__link-btn:hover{background:var(--sre-btn-hover)}.sol-rich-editor__link-btn--primary{background:var(--sol-color-primary, #6366f1);border-color:var(--sol-color-primary, #6366f1);color:var(--sol-color-primary-contrast, #ffffff)}.sol-rich-editor__content{flex:1;padding:.75rem .875rem;overflow-y:auto;border-radius:0 0 calc(var(--sre-radius) - 1px) calc(var(--sre-radius) - 1px);font-family:var(--sre-font);font-size:var(--sre-font-size);line-height:var(--sol-line-height, 1.6);color:var(--sre-text);outline:none;word-break:break-word}.sol-rich-editor__content.is-empty:before{content:attr(data-placeholder);color:var(--sre-muted);pointer-events:none}.sol-rich-editor__error{margin:0;padding:.375rem .875rem;font-family:var(--sre-font);font-size:var(--sol-font-size-sm, .75rem);color:var(--sol-color-danger, #ef4444)}.sol-rich-editor__file{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sol-rich-editor__popover{position:absolute;z-index:var(--sol-z-dropdown, 1000);min-width:12rem;max-width:18rem;max-height:14rem;overflow-y:auto;padding:.25rem;background:var(--sol-bg-surface, #ffffff);border:1px solid var(--sre-border);border-radius:var(--sol-border-radius-md, .5rem);box-shadow:var(--sol-shadow-lg, 0 10px 25px rgba(0, 0, 0, .12))}.sol-rich-editor__popover--task{min-width:16rem}.sol-rich-editor__popover-item{display:flex;align-items:center;gap:.5rem;width:100%;padding:.375rem .5rem;border:none;border-radius:var(--sol-border-radius-sm, .375rem);background:transparent;color:var(--sre-text);font-family:var(--sre-font);font-size:var(--sol-font-size-base, .9375rem);text-align:left;cursor:pointer}.sol-rich-editor__popover-item:hover,.sol-rich-editor__popover-item.is-active{background:var(--sre-btn-hover)}.sol-rich-editor__popover-label{flex:1;min-width:0}.sol-rich-editor__popover-label--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sol-rich-editor__avatar{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:9999px;background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 20%,transparent);color:var(--sol-color-primary, #6366f1);font-size:var(--sol-font-size-sm, .75rem);font-weight:600}.sol-rich-editor__task-key{flex-shrink:0;padding:.0625rem .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-success, #10b981) 14%,transparent);color:var(--sol-color-success, #10b981);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-size:var(--sol-font-size-sm, .75rem);font-weight:600}.sol-rich-editor__content ::ng-deep span[data-mention-id]{display:inline-block;padding:0 .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-primary, #6366f1) 12%,transparent);color:var(--sol-color-primary, #6366f1);font-weight:500;white-space:nowrap}.sol-rich-editor__content ::ng-deep span[data-task-key]{display:inline-block;padding:0 .375rem;border-radius:var(--sol-border-radius-sm, .375rem);background:color-mix(in srgb,var(--sol-color-success, #10b981) 14%,transparent);color:var(--sol-color-success, #10b981);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-weight:600;white-space:nowrap}.sol-rich-editor__content ::ng-deep h1{font-size:1.5rem;font-weight:700;margin:.5rem 0;line-height:1.25}.sol-rich-editor__content ::ng-deep h2{font-size:1.25rem;font-weight:700;margin:.5rem 0;line-height:1.3}.sol-rich-editor__content ::ng-deep h3{font-size:1.0625rem;font-weight:600;margin:.5rem 0;line-height:1.35}.sol-rich-editor__content ::ng-deep p{margin:0 0 .5rem}.sol-rich-editor__content ::ng-deep ul,.sol-rich-editor__content ::ng-deep ol{margin:0 0 .5rem;padding-left:1.5rem}.sol-rich-editor__content ::ng-deep li{margin:.125rem 0}.sol-rich-editor__content ::ng-deep a{color:var(--sol-color-primary, #6366f1);text-decoration:underline}.sol-rich-editor__content ::ng-deep img{max-width:100%;height:auto;border-radius:var(--sol-border-radius-sm, .375rem)}.sol-rich-editor__content ::ng-deep table{border-collapse:collapse;margin:.5rem 0;width:auto}.sol-rich-editor__content ::ng-deep td,.sol-rich-editor__content ::ng-deep th{border:1px solid var(--sre-border);padding:.375rem .5rem;min-width:3rem}\n"] }]
8195
8362
  }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], imageMaxBytes: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageMaxBytes", required: false }] }], imageUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUpload", required: false }] }], mentionableUsers: [{ type: i0.Input, args: [{ isSignal: true, alias: "mentionableUsers", required: false }] }], linkableTasks: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkableTasks", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], mentionsChange: [{ type: i0.Output, args: ["mentionsChange"] }], taskLinksChange: [{ type: i0.Output, args: ["taskLinksChange"] }], editable: [{ type: i0.ViewChild, args: ['editable', { isSignal: true }] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], linkInput: [{ type: i0.ViewChild, args: ['linkInput', { isSignal: true }] }] } });
8196
8363
 
8197
8364
  /**
@@ -8280,6 +8447,17 @@ class SolIconButtonComponent {
8280
8447
  /** Clases CSS combinando variante y tamaño. */
8281
8448
  cssClass = computed(() => `sol-icon-btn sol-icon-btn--${this.variant()} sol-icon-btn--${this.size()}`, /* @ts-ignore */
8282
8449
  ...(ngDevMode ? [{ debugName: "cssClass" }] : /* istanbul ignore next */ []));
8450
+ /**
8451
+ * `sol-icon`'s own size preset ('sm'|'md'|'lg', no 'touch' — el ícono es
8452
+ * SOLO la "tinta" visible, PR-C4/GOAL §4: crece el botón, no el ícono).
8453
+ * `touch` (44px) mapea al ícono 'lg' — el mismo glyph que ya se veía en un
8454
+ * botón `lg` (40px), solo con más padding invisible alrededor.
8455
+ */
8456
+ iconSize = computed(() => {
8457
+ const current = this.size();
8458
+ return current === 'touch' ? 'lg' : current;
8459
+ }, /* @ts-ignore */
8460
+ ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
8283
8461
  onClick(event) {
8284
8462
  if (this.disabled()) {
8285
8463
  event.stopPropagation();
@@ -8296,9 +8474,9 @@ class SolIconButtonComponent {
8296
8474
  [attr.aria-label]="ariaLabel()"
8297
8475
  (click)="onClick($event)"
8298
8476
  >
8299
- <sol-icon [name]="icon()" [size]="size()" />
8477
+ <sol-icon [name]="icon()" [size]="iconSize()" />
8300
8478
  </button>
8301
- `, isInline: true, styles: [":host{display:inline-block}.sol-icon-btn{display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:var(--sol-button-radius, var(--sol-border-radius-md, .5rem));background:transparent;color:var(--sol-color-text-muted, #64748b);cursor:pointer;transition:background-color var(--sol-dur-fast, .15s) var(--sol-ease, ease),color var(--sol-dur-fast, .15s) var(--sol-ease, ease),box-shadow var(--sol-dur-fast, .15s) var(--sol-ease, ease),transform var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-icon-btn:active:not(:disabled){transform:scale(var(--sol-press-scale, .96))}.sol-icon-btn:focus-visible{outline:none;box-shadow:var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent))}.sol-icon-btn:disabled{cursor:not-allowed;opacity:var(--sol-disabled-opacity, .55)}.sol-icon-btn--default{border-color:var(--sol-border-color-default, #e2e8f0);background:var(--sol-bg-surface, #fff);color:var(--sol-color-text-muted, #64748b)}.sol-icon-btn--default:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-primary, #2563eb) 8%,var(--sol-bg-surface, #fff));color:var(--sol-color-text-primary, #0f172a)}.sol-icon-btn--danger{color:var(--sol-color-danger, #ef4444)}.sol-icon-btn--danger:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-danger, #ef4444) 12%,transparent)}.sol-icon-btn--ghost{color:var(--sol-color-text-muted, #64748b)}.sol-icon-btn--ghost:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-primary, #2563eb) 10%,transparent);color:var(--sol-color-text-primary, #0f172a)}.sol-icon-btn--sm{width:32px;height:32px}.sol-icon-btn--md{width:36px;height:36px}.sol-icon-btn--lg{width:40px;height:40px}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8479
+ `, isInline: true, styles: [":host{display:inline-block}.sol-icon-btn{display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:var(--sol-button-radius, var(--sol-border-radius-md, .5rem));background:transparent;color:var(--sol-color-text-muted, #64748b);cursor:pointer;transition:background-color var(--sol-dur-fast, .15s) var(--sol-ease, ease),color var(--sol-dur-fast, .15s) var(--sol-ease, ease),box-shadow var(--sol-dur-fast, .15s) var(--sol-ease, ease),transform var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-icon-btn:active:not(:disabled){transform:scale(var(--sol-press-scale, .96))}.sol-icon-btn:focus-visible{outline:none;box-shadow:var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent))}.sol-icon-btn:disabled{cursor:not-allowed;opacity:var(--sol-disabled-opacity, .55)}.sol-icon-btn--default{border-color:var(--sol-border-color-default, #e2e8f0);background:var(--sol-bg-surface, #fff);color:var(--sol-color-text-muted, #64748b)}.sol-icon-btn--default:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-primary, #2563eb) 8%,var(--sol-bg-surface, #fff));color:var(--sol-color-text-primary, #0f172a)}.sol-icon-btn--danger{color:var(--sol-color-danger, #ef4444)}.sol-icon-btn--danger:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-danger, #ef4444) 12%,transparent)}.sol-icon-btn--ghost{color:var(--sol-color-text-muted, #64748b)}.sol-icon-btn--ghost:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-primary, #2563eb) 10%,transparent);color:var(--sol-color-text-primary, #0f172a)}.sol-icon-btn--sm{width:32px;height:32px}.sol-icon-btn--md{width:36px;height:36px}.sol-icon-btn--lg{width:40px;height:40px}.sol-icon-btn--touch{width:44px;height:44px}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8302
8480
  }
8303
8481
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolIconButtonComponent, decorators: [{
8304
8482
  type: Component,
@@ -8310,9 +8488,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
8310
8488
  [attr.aria-label]="ariaLabel()"
8311
8489
  (click)="onClick($event)"
8312
8490
  >
8313
- <sol-icon [name]="icon()" [size]="size()" />
8491
+ <sol-icon [name]="icon()" [size]="iconSize()" />
8314
8492
  </button>
8315
- `, styles: [":host{display:inline-block}.sol-icon-btn{display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:var(--sol-button-radius, var(--sol-border-radius-md, .5rem));background:transparent;color:var(--sol-color-text-muted, #64748b);cursor:pointer;transition:background-color var(--sol-dur-fast, .15s) var(--sol-ease, ease),color var(--sol-dur-fast, .15s) var(--sol-ease, ease),box-shadow var(--sol-dur-fast, .15s) var(--sol-ease, ease),transform var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-icon-btn:active:not(:disabled){transform:scale(var(--sol-press-scale, .96))}.sol-icon-btn:focus-visible{outline:none;box-shadow:var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent))}.sol-icon-btn:disabled{cursor:not-allowed;opacity:var(--sol-disabled-opacity, .55)}.sol-icon-btn--default{border-color:var(--sol-border-color-default, #e2e8f0);background:var(--sol-bg-surface, #fff);color:var(--sol-color-text-muted, #64748b)}.sol-icon-btn--default:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-primary, #2563eb) 8%,var(--sol-bg-surface, #fff));color:var(--sol-color-text-primary, #0f172a)}.sol-icon-btn--danger{color:var(--sol-color-danger, #ef4444)}.sol-icon-btn--danger:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-danger, #ef4444) 12%,transparent)}.sol-icon-btn--ghost{color:var(--sol-color-text-muted, #64748b)}.sol-icon-btn--ghost:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-primary, #2563eb) 10%,transparent);color:var(--sol-color-text-primary, #0f172a)}.sol-icon-btn--sm{width:32px;height:32px}.sol-icon-btn--md{width:36px;height:36px}.sol-icon-btn--lg{width:40px;height:40px}\n"] }]
8493
+ `, styles: [":host{display:inline-block}.sol-icon-btn{display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:var(--sol-button-radius, var(--sol-border-radius-md, .5rem));background:transparent;color:var(--sol-color-text-muted, #64748b);cursor:pointer;transition:background-color var(--sol-dur-fast, .15s) var(--sol-ease, ease),color var(--sol-dur-fast, .15s) var(--sol-ease, ease),box-shadow var(--sol-dur-fast, .15s) var(--sol-ease, ease),transform var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-icon-btn:active:not(:disabled){transform:scale(var(--sol-press-scale, .96))}.sol-icon-btn:focus-visible{outline:none;box-shadow:var(--sol-focus-ring, 0 0 0 3px color-mix(in srgb, var(--sol-color-primary, #6366f1) 40%, transparent))}.sol-icon-btn:disabled{cursor:not-allowed;opacity:var(--sol-disabled-opacity, .55)}.sol-icon-btn--default{border-color:var(--sol-border-color-default, #e2e8f0);background:var(--sol-bg-surface, #fff);color:var(--sol-color-text-muted, #64748b)}.sol-icon-btn--default:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-primary, #2563eb) 8%,var(--sol-bg-surface, #fff));color:var(--sol-color-text-primary, #0f172a)}.sol-icon-btn--danger{color:var(--sol-color-danger, #ef4444)}.sol-icon-btn--danger:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-danger, #ef4444) 12%,transparent)}.sol-icon-btn--ghost{color:var(--sol-color-text-muted, #64748b)}.sol-icon-btn--ghost:hover:not(:disabled){background:color-mix(in srgb,var(--sol-color-primary, #2563eb) 10%,transparent);color:var(--sol-color-text-primary, #0f172a)}.sol-icon-btn--sm{width:32px;height:32px}.sol-icon-btn--md{width:36px;height:36px}.sol-icon-btn--lg{width:40px;height:40px}.sol-icon-btn--touch{width:44px;height:44px}\n"] }]
8316
8494
  }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
8317
8495
 
8318
8496
  /**
@@ -10184,7 +10362,7 @@ function countIds(items) {
10184
10362
  return frequency;
10185
10363
  }
10186
10364
  /** Clave de `track` segura: el índice si `id` está ausente o duplicado; si no, el propio `id`. */
10187
- function safeTrackKey(id, index, frequency) {
10365
+ function safeTrackKey$1(id, index, frequency) {
10188
10366
  if (id == null)
10189
10367
  return index;
10190
10368
  return (frequency.get(id) ?? 0) > 1 ? index : id;
@@ -10288,7 +10466,7 @@ class SolKanbanColumnComponent {
10288
10466
  ...(ngDevMode ? [{ debugName: "itemIdFrequency" }] : /* istanbul ignore next */ []));
10289
10467
  /** `track` seguro: cae al índice si el `id` del item está ausente o duplicado, en vez de dejar que Angular lance `NG0955`. */
10290
10468
  trackItem(item, index) {
10291
- return safeTrackKey(item?.id, index, this.itemIdFrequency());
10469
+ return safeTrackKey$1(item?.id, index, this.itemIdFrequency());
10292
10470
  }
10293
10471
  title = computed(() => resolveColumnTitle(this.column(), (key) => this.i18n.translate(key)), /* @ts-ignore */
10294
10472
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
@@ -10380,6 +10558,11 @@ class SolKanbanColumnComponent {
10380
10558
  toColumnId: event.container.id,
10381
10559
  previousIndex: event.previousIndex,
10382
10560
  currentIndex: event.currentIndex,
10561
+ // Reenvío CRUDO del dato arrastrado (11-g PR2) — usado SOLO por el
10562
+ // board cuando el drop viene de una `cdkDropList` externa al tablero
10563
+ // (`externalItemDropped`); un drag interno normal lo ignora por
10564
+ // completo (`KanbanReorderService.reorder` nunca lo lee).
10565
+ data: event.item.data,
10383
10566
  });
10384
10567
  }
10385
10568
  onCdkEntered() {
@@ -10752,6 +10935,21 @@ class SolKanbanBoardComponent {
10752
10935
  * `[columns]` para el rollback (ver doc de la clase).
10753
10936
  */
10754
10937
  itemMoved = output();
10938
+ /**
10939
+ * Arrastre de un item AJENO al board (11-g-crm-contactos-y-acciones, PR2
10940
+ * de boki-front) — un consumidor externo puede conectar su propia
10941
+ * `cdkDropList` (`[cdkDropListConnectedTo]` = ids de columna del board,
10942
+ * obtenibles de `columns()`) para permitir soltar SUS propios items sobre
10943
+ * una columna. `KanbanReorderService.reorder` descarta ese drop (el
10944
+ * `fromColumnId` no es ninguna columna propia — no hay nada que
10945
+ * reordenar), pero el board SÍ reconoce el caso: el `toColumnId` ES una
10946
+ * columna propia y el `fromColumnId` NO lo es. En ese caso emite este
10947
+ * output ADITIVO con el `data` crudo del item arrastrado (`CdkDrag.data`
10948
+ * del origen) en vez de `itemMoved` — el board NUNCA muta sus propias
10949
+ * columnas por un drop externo; el consumidor decide qué hacer (p. ej.
10950
+ * crear una tarjeta nueva) y refresca `[columns]` cuando corresponda.
10951
+ */
10952
+ externalItemDropped = output();
10755
10953
  reorderService = inject(KanbanReorderService);
10756
10954
  i18n = inject(SOL_I18N);
10757
10955
  /** `protected` (no `private`): el template de este mismo componente necesita leerlo, y Angular exige acceso no-privado para bindings de plantilla. */
@@ -10795,7 +10993,7 @@ class SolKanbanBoardComponent {
10795
10993
  ...(ngDevMode ? [{ debugName: "columnIdFrequency" }] : /* istanbul ignore next */ []));
10796
10994
  /** `track` seguro: cae al índice si el `id` de la columna está ausente o duplicado. */
10797
10995
  trackColumn(column, index) {
10798
- return safeTrackKey(column?.id, index, this.columnIdFrequency());
10996
+ return safeTrackKey$1(column?.id, index, this.columnIdFrequency());
10799
10997
  }
10800
10998
  onColumnAction(action) {
10801
10999
  this.columnAction.emit(action);
@@ -10815,14 +11013,30 @@ class SolKanbanBoardComponent {
10815
11013
  */
10816
11014
  onItemDropped(event) {
10817
11015
  const result = this.reorderService.reorder(this.mirroredColumns(), event);
10818
- if (!result)
11016
+ if (!result) {
11017
+ this.emitExternalDropIfApplicable(event);
10819
11018
  return;
11019
+ }
10820
11020
  this.mirroredColumns.set(result.columns);
10821
11021
  this.itemMoved.emit(result.moved);
10822
11022
  this.announceMove(result.moved);
10823
11023
  // Marca el gesto como "con drop" — ver doc de `droppedThisGesture`.
10824
11024
  this.droppedThisGesture = true;
10825
11025
  }
11026
+ /**
11027
+ * Distingue "evento inconsistente" (columna origen/destino inexistente,
11028
+ * índice fuera de rango — se ignora, comportamiento histórico) de "drop
11029
+ * externo válido" (`toColumnId` ES una columna propia, `fromColumnId` NO
11030
+ * lo es — ver doc de `externalItemDropped`).
11031
+ */
11032
+ emitExternalDropIfApplicable(event) {
11033
+ const columns = this.mirroredColumns();
11034
+ const toColumnExists = columns.some(c => c.id === event.toColumnId);
11035
+ const fromColumnExists = columns.some(c => c.id === event.fromColumnId);
11036
+ if (toColumnExists && !fromColumnExists) {
11037
+ this.externalItemDropped.emit({ toColumnId: event.toColumnId, data: event.data });
11038
+ }
11039
+ }
10826
11040
  /**
10827
11041
  * Fuerza el re-seed del espejo desde el `columns()` ACTUAL (corrección 4R
10828
11042
  * WARNING) — NO depende de que la referencia cambie (a diferencia del
@@ -10869,7 +11083,7 @@ class SolKanbanBoardComponent {
10869
11083
  : this.i18n.translate('shared.kanban.movedToColumn', { column: columnLabel }));
10870
11084
  }
10871
11085
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolKanbanBoardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10872
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolKanbanBoardComponent, isStandalone: true, selector: "sol-kanban-board", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: true, isRequired: true, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, anchorTemplate: { classPropertyName: "anchorTemplate", publicName: "anchorTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnAction: "columnAction", addRequested: "addRequested", itemMoved: "itemMoved" }, ngImport: i0, template: `
11086
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolKanbanBoardComponent, isStandalone: true, selector: "sol-kanban-board", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: true, isRequired: true, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, anchorTemplate: { classPropertyName: "anchorTemplate", publicName: "anchorTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnAction: "columnAction", addRequested: "addRequested", itemMoved: "itemMoved", externalItemDropped: "externalItemDropped" }, ngImport: i0, template: `
10873
11087
  <div class="sol-kanban-board" cdkDropListGroup>
10874
11088
  @for (column of mirroredColumns(); track trackColumn(column, $index)) {
10875
11089
  <sol-kanban-column
@@ -10908,7 +11122,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
10908
11122
  </div>
10909
11123
  <div class="sol-kanban-board__announce" aria-live="polite" role="status">{{ announcement() }}</div>
10910
11124
  `, styles: [":host{display:block}.sol-kanban-board{display:flex;align-items:flex-start;gap:var(--sol-space-md, 12px);overflow-x:auto;padding-bottom:var(--sol-space-sm, 8px)}.sol-kanban-board__announce{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
10911
- }], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], cardTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardTemplate", required: true }] }], headerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTemplate", required: false }] }], anchorTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchorTemplate", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], columnAction: [{ type: i0.Output, args: ["columnAction"] }], addRequested: [{ type: i0.Output, args: ["addRequested"] }], itemMoved: [{ type: i0.Output, args: ["itemMoved"] }] } });
11125
+ }], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], cardTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardTemplate", required: true }] }], headerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTemplate", required: false }] }], anchorTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchorTemplate", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], columnAction: [{ type: i0.Output, args: ["columnAction"] }], addRequested: [{ type: i0.Output, args: ["addRequested"] }], itemMoved: [{ type: i0.Output, args: ["itemMoved"] }], externalItemDropped: [{ type: i0.Output, args: ["externalItemDropped"] }] } });
11126
+
11127
+ /**
11128
+ * `sol-kanban-drag-source` — origen de arrastre EXTERNO al tablero (11-g-crm-
11129
+ * contactos-y-acciones, PR2 de boki-front, T06): un consumidor AJENO a
11130
+ * `sol-kanban-board` (p. ej. una lista de contactos) puede declarar sus
11131
+ * propios items como arrastrables y soltarlos sobre las columnas de un
11132
+ * tablero YA renderizado en otra parte de la página — conectando
11133
+ * `[connectedTo]` a los MISMOS ids de columna que `sol-kanban-board` expone
11134
+ * (`KanbanColumn.id`, el `cdkDropList` id interno de `sol-kanban-column`).
11135
+ *
11136
+ * Sin conocimiento de dominio (mismo criterio que el resto de `ui/kanban/`):
11137
+ * NUNCA referencia `Client`/`Lead`/etc. — el consumidor proyecta su propio
11138
+ * contenido vía `itemTemplate` y decide qué es un `KanbanItem` para él.
11139
+ *
11140
+ * `@angular/cdk/drag-drop` vive EXCLUSIVAMENTE aquí dentro de `ui/kanban/`
11141
+ * (gate ESLint T40, `no-restricted-imports`) — ninguna vista de una app
11142
+ * consumidora puede importar CDK directo; este componente es la ÚNICA
11143
+ * puerta para un origen de arrastre EXTERNO al board, igual que
11144
+ * `sol-kanban-board`/`sol-kanban-column` lo son para el arrastre INTERNO.
11145
+ *
11146
+ * `cdkDropListSortingDisabled`: esta lista NUNCA reordena sus propios
11147
+ * items por drag (no tiene sentido para un origen — solo transfiere HACIA
11148
+ * afuera). La recepción del drop la resuelve la columna DESTINO
11149
+ * (`sol-kanban-column`/`sol-kanban-board`, que ya distingue un origen
11150
+ * ajeno vía `externalItemDropped` — ver `kanban-board.component.ts`); este
11151
+ * componente no necesita saber nada sobre qué pasó con el item soltado.
11152
+ */
11153
+ class SolKanbanDragSourceComponent {
11154
+ /** Items arrastrables — tolera `null`/`undefined` (mismo criterio de robustez que `sol-kanban-board`). */
11155
+ items = input.required(/* @ts-ignore */
11156
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
11157
+ /** Ids de las `cdkDropList` destino (las columnas del tablero AJENO al que soltar). */
11158
+ connectedTo = input([], /* @ts-ignore */
11159
+ ...(ngDevMode ? [{ debugName: "connectedTo" }] : /* istanbul ignore next */ []));
11160
+ /** Template del contenido de cada item — el consumidor decide qué renderiza (sin conocimiento de dominio acá). */
11161
+ itemTemplate = input.required(/* @ts-ignore */
11162
+ ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
11163
+ /** Ids de items NO arrastrables (p. ej. "ya en pipeline") — comparados por `KanbanItem.id`. */
11164
+ disabledIds = input(new Set(), /* @ts-ignore */
11165
+ ...(ngDevMode ? [{ debugName: "disabledIds" }] : /* istanbul ignore next */ []));
11166
+ /** `id` de la `cdkDropList` propia — normalmente irrelevante (nadie se conecta HACIA ella), pero CDK lo exige. */
11167
+ listId = input('sol-kanban-drag-source', /* @ts-ignore */
11168
+ ...(ngDevMode ? [{ debugName: "listId" }] : /* istanbul ignore next */ []));
11169
+ /** `protected` (no `private`): el template propio necesita leerlo — Angular exige acceso no-privado para bindings de plantilla. */
11170
+ normalizedItems = computed(() => (this.items() ?? []).filter((i) => !!i), /* @ts-ignore */
11171
+ ...(ngDevMode ? [{ debugName: "normalizedItems" }] : /* istanbul ignore next */ []));
11172
+ itemIdFrequency = computed(() => countIds(this.normalizedItems()), /* @ts-ignore */
11173
+ ...(ngDevMode ? [{ debugName: "itemIdFrequency" }] : /* istanbul ignore next */ []));
11174
+ trackItem(item, index) {
11175
+ return safeTrackKey$1(item?.id, index, this.itemIdFrequency());
11176
+ }
11177
+ isItemDisabled(item) {
11178
+ return this.disabledIds().has(item.id);
11179
+ }
11180
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolKanbanDragSourceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11181
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolKanbanDragSourceComponent, isStandalone: true, selector: "sol-kanban-drag-source", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, connectedTo: { classPropertyName: "connectedTo", publicName: "connectedTo", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: true, transformFunction: null }, disabledIds: { classPropertyName: "disabledIds", publicName: "disabledIds", isSignal: true, isRequired: false, transformFunction: null }, listId: { classPropertyName: "listId", publicName: "listId", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
11182
+ <div
11183
+ class="sol-kanban-drag-source"
11184
+ cdkDropList
11185
+ [id]="listId()"
11186
+ [cdkDropListData]="normalizedItems()"
11187
+ [cdkDropListConnectedTo]="connectedTo()"
11188
+ cdkDropListSortingDisabled
11189
+ >
11190
+ @for (item of normalizedItems(); track trackItem(item, $index)) {
11191
+ <div
11192
+ class="sol-kanban-drag-source__item"
11193
+ cdkDrag
11194
+ [cdkDragData]="item"
11195
+ [cdkDragDisabled]="isItemDisabled(item)"
11196
+ >
11197
+ <ng-container *ngTemplateOutlet="itemTemplate(); context: { $implicit: item }" />
11198
+ </div>
11199
+ }
11200
+ </div>
11201
+ `, isInline: true, styles: [".sol-kanban-drag-source{display:flex;flex-direction:column;gap:var(--sol-space-sm, 8px)}.sol-kanban-drag-source__item{cursor:grab}.sol-kanban-drag-source__item.cdk-drag-disabled{cursor:default}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11202
+ }
11203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolKanbanDragSourceComponent, decorators: [{
11204
+ type: Component,
11205
+ args: [{ selector: 'sol-kanban-drag-source', standalone: true, imports: [CdkDropList, CdkDrag, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: `
11206
+ <div
11207
+ class="sol-kanban-drag-source"
11208
+ cdkDropList
11209
+ [id]="listId()"
11210
+ [cdkDropListData]="normalizedItems()"
11211
+ [cdkDropListConnectedTo]="connectedTo()"
11212
+ cdkDropListSortingDisabled
11213
+ >
11214
+ @for (item of normalizedItems(); track trackItem(item, $index)) {
11215
+ <div
11216
+ class="sol-kanban-drag-source__item"
11217
+ cdkDrag
11218
+ [cdkDragData]="item"
11219
+ [cdkDragDisabled]="isItemDisabled(item)"
11220
+ >
11221
+ <ng-container *ngTemplateOutlet="itemTemplate(); context: { $implicit: item }" />
11222
+ </div>
11223
+ }
11224
+ </div>
11225
+ `, styles: [".sol-kanban-drag-source{display:flex;flex-direction:column;gap:var(--sol-space-sm, 8px)}.sol-kanban-drag-source__item{cursor:grab}.sol-kanban-drag-source__item.cdk-drag-disabled{cursor:default}\n"] }]
11226
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], connectedTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectedTo", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: true }] }], disabledIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledIds", required: false }] }], listId: [{ type: i0.Input, args: [{ isSignal: true, alias: "listId", required: false }] }] } });
10912
11227
 
10913
11228
  /**
10914
11229
  * `sol-chip` — átomo presentacional de selección (11-f PR2, ciclo 3 UX).
@@ -11589,7 +11904,7 @@ class SolNumberInputComponent {
11589
11904
  <sol-icon name="plus" size="sm" />
11590
11905
  </button>
11591
11906
  </div>
11592
- `, isInline: true, styles: [":host{display:inline-block;--sol-number-input-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-number-input-text: var(--sol-color-text-primary, #1e293b);--sol-number-input-border: var(--sol-border-color-default, #cbd5e1);--sol-number-input-btn-text: var(--sol-color-text-secondary, #475569);--sol-number-input-hover-bg: var(--sol-color-bg-hover, rgba(0, 0, 0, .04));--sol-number-input-focus-ring: var(--sol-color-primary, #6366f1);--sol-number-input-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-number-input-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-number-input-font-size: var(--sol-font-size-base, .875rem);--sol-number-input-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-number-input{display:inline-flex;align-items:stretch;border:1px solid var(--sol-number-input-border);border-radius:var(--sol-number-input-radius);overflow:hidden;background:var(--sol-number-input-bg)}.sol-number-input--disabled{opacity:var(--sol-number-input-disabled-opacity)}.sol-number-input__btn{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;border:none;background:transparent;color:var(--sol-number-input-btn-text);cursor:pointer;transition:background-color var(--sol-number-input-transition)}.sol-number-input__btn--decrement{border-right:1px solid var(--sol-number-input-border)}.sol-number-input__btn--increment{border-left:1px solid var(--sol-number-input-border)}.sol-number-input__btn:hover:not(:disabled){background:var(--sol-number-input-hover-bg)}.sol-number-input__btn:focus-visible{outline:2px solid var(--sol-number-input-focus-ring);outline-offset:-2px}.sol-number-input__btn:disabled{cursor:not-allowed;opacity:var(--sol-number-input-disabled-opacity)}.sol-number-input__field{width:3.5rem;border:none;background:transparent;text-align:center;font-family:inherit;font-size:var(--sol-number-input-font-size);color:var(--sol-number-input-text);-moz-appearance:textfield}.sol-number-input__field:focus{outline:none}.sol-number-input__field:disabled{cursor:not-allowed}@media(max-width:640px){.sol-number-input__field{font-size:16px}}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11907
+ `, isInline: true, styles: [":host{display:inline-block;--sol-number-input-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-number-input-text: var(--sol-color-text-primary, #1e293b);--sol-number-input-border: var(--sol-input-border, var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #cbd5e1));--sol-number-input-focus-border: var(--sol-input-focus-border, var(--sol-border-width-default, 1px) solid var(--sol-color-primary, #6366f1));--sol-number-input-focus-ring: var(--sol-input-focus-ring, 0 0 0 2px color-mix(in srgb, var(--sol-color-primary, #6366f1) 20%, transparent));--sol-number-input-btn-text: var(--sol-color-text-secondary, #475569);--sol-number-input-hover-bg: var(--sol-color-bg-hover, rgba(0, 0, 0, .04));--sol-number-input-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-number-input-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-number-input-height: var(--sol-size-input-height, 2.25rem);--sol-number-input-font-size: var(--sol-font-size-base, .875rem);--sol-number-input-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-number-input{display:inline-flex;align-items:stretch;height:var(--sol-number-input-height);border:var(--sol-number-input-border);border-radius:var(--sol-number-input-radius);overflow:hidden;background:var(--sol-number-input-bg);box-sizing:border-box;transition:border-color var(--sol-number-input-transition),box-shadow var(--sol-number-input-transition)}.sol-number-input:focus-within{border:var(--sol-number-input-focus-border);box-shadow:var(--sol-number-input-focus-ring)}.sol-number-input--disabled{opacity:var(--sol-number-input-disabled-opacity)}.sol-number-input__btn{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;border:none;background:transparent;color:var(--sol-number-input-btn-text);cursor:pointer;transition:background-color var(--sol-number-input-transition)}.sol-number-input__btn--decrement{border-right:var(--sol-number-input-border)}.sol-number-input__btn--increment{border-left:var(--sol-number-input-border)}.sol-number-input__btn:hover:not(:disabled){background:var(--sol-number-input-hover-bg)}.sol-number-input__btn:focus-visible{outline:2px solid var(--sol-color-primary, #6366f1);outline-offset:-2px}.sol-number-input__btn:disabled{cursor:not-allowed;opacity:var(--sol-number-input-disabled-opacity)}.sol-number-input__field{width:3.5rem;border:none;background:transparent;text-align:center;font-family:inherit;font-size:var(--sol-number-input-font-size);color:var(--sol-number-input-text);-moz-appearance:textfield}.sol-number-input__field:focus{outline:none}.sol-number-input__field:disabled{cursor:not-allowed}@media(max-width:640px){.sol-number-input__field{font-size:16px}}\n"], dependencies: [{ kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11593
11908
  }
11594
11909
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolNumberInputComponent, decorators: [{
11595
11910
  type: Component,
@@ -11638,7 +11953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
11638
11953
  <sol-icon name="plus" size="sm" />
11639
11954
  </button>
11640
11955
  </div>
11641
- `, styles: [":host{display:inline-block;--sol-number-input-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-number-input-text: var(--sol-color-text-primary, #1e293b);--sol-number-input-border: var(--sol-border-color-default, #cbd5e1);--sol-number-input-btn-text: var(--sol-color-text-secondary, #475569);--sol-number-input-hover-bg: var(--sol-color-bg-hover, rgba(0, 0, 0, .04));--sol-number-input-focus-ring: var(--sol-color-primary, #6366f1);--sol-number-input-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-number-input-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-number-input-font-size: var(--sol-font-size-base, .875rem);--sol-number-input-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-number-input{display:inline-flex;align-items:stretch;border:1px solid var(--sol-number-input-border);border-radius:var(--sol-number-input-radius);overflow:hidden;background:var(--sol-number-input-bg)}.sol-number-input--disabled{opacity:var(--sol-number-input-disabled-opacity)}.sol-number-input__btn{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;border:none;background:transparent;color:var(--sol-number-input-btn-text);cursor:pointer;transition:background-color var(--sol-number-input-transition)}.sol-number-input__btn--decrement{border-right:1px solid var(--sol-number-input-border)}.sol-number-input__btn--increment{border-left:1px solid var(--sol-number-input-border)}.sol-number-input__btn:hover:not(:disabled){background:var(--sol-number-input-hover-bg)}.sol-number-input__btn:focus-visible{outline:2px solid var(--sol-number-input-focus-ring);outline-offset:-2px}.sol-number-input__btn:disabled{cursor:not-allowed;opacity:var(--sol-number-input-disabled-opacity)}.sol-number-input__field{width:3.5rem;border:none;background:transparent;text-align:center;font-family:inherit;font-size:var(--sol-number-input-font-size);color:var(--sol-number-input-text);-moz-appearance:textfield}.sol-number-input__field:focus{outline:none}.sol-number-input__field:disabled{cursor:not-allowed}@media(max-width:640px){.sol-number-input__field{font-size:16px}}\n"] }]
11956
+ `, styles: [":host{display:inline-block;--sol-number-input-bg: var(--sol-input-bg, var(--sol-bg-surface, #ffffff));--sol-number-input-text: var(--sol-color-text-primary, #1e293b);--sol-number-input-border: var(--sol-input-border, var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #cbd5e1));--sol-number-input-focus-border: var(--sol-input-focus-border, var(--sol-border-width-default, 1px) solid var(--sol-color-primary, #6366f1));--sol-number-input-focus-ring: var(--sol-input-focus-ring, 0 0 0 2px color-mix(in srgb, var(--sol-color-primary, #6366f1) 20%, transparent));--sol-number-input-btn-text: var(--sol-color-text-secondary, #475569);--sol-number-input-hover-bg: var(--sol-color-bg-hover, rgba(0, 0, 0, .04));--sol-number-input-disabled-opacity: var(--sol-disabled-opacity, .55);--sol-number-input-radius: var(--sol-input-radius, var(--sol-border-radius-md, .5rem));--sol-number-input-height: var(--sol-size-input-height, 2.25rem);--sol-number-input-font-size: var(--sol-font-size-base, .875rem);--sol-number-input-transition: var(--sol-dur-fast, .15s) var(--sol-ease, ease)}.sol-number-input{display:inline-flex;align-items:stretch;height:var(--sol-number-input-height);border:var(--sol-number-input-border);border-radius:var(--sol-number-input-radius);overflow:hidden;background:var(--sol-number-input-bg);box-sizing:border-box;transition:border-color var(--sol-number-input-transition),box-shadow var(--sol-number-input-transition)}.sol-number-input:focus-within{border:var(--sol-number-input-focus-border);box-shadow:var(--sol-number-input-focus-ring)}.sol-number-input--disabled{opacity:var(--sol-number-input-disabled-opacity)}.sol-number-input__btn{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;border:none;background:transparent;color:var(--sol-number-input-btn-text);cursor:pointer;transition:background-color var(--sol-number-input-transition)}.sol-number-input__btn--decrement{border-right:var(--sol-number-input-border)}.sol-number-input__btn--increment{border-left:var(--sol-number-input-border)}.sol-number-input__btn:hover:not(:disabled){background:var(--sol-number-input-hover-bg)}.sol-number-input__btn:focus-visible{outline:2px solid var(--sol-color-primary, #6366f1);outline-offset:-2px}.sol-number-input__btn:disabled{cursor:not-allowed;opacity:var(--sol-number-input-disabled-opacity)}.sol-number-input__field{width:3.5rem;border:none;background:transparent;text-align:center;font-family:inherit;font-size:var(--sol-number-input-font-size);color:var(--sol-number-input-text);-moz-appearance:textfield}.sol-number-input__field:focus{outline:none}.sol-number-input__field:disabled{cursor:not-allowed}@media(max-width:640px){.sol-number-input__field{font-size:16px}}\n"] }]
11642
11957
  }], ctorParameters: () => [], propDecorators: { min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: true }] }], decrementLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "decrementLabelKey", required: false }] }], incrementLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "incrementLabelKey", required: false }] }] } });
11643
11958
 
11644
11959
  /** Superficie neutra por tokens — fallback compartido por el default null-object (sin `color`/`color` no seguro) y por `sol-calendar-grid` cuando una Strategy inyectada lanza (corrección 4R WARNING — resilience). */
@@ -12474,6 +12789,1463 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
12474
12789
  `, styles: [":host{display:block}.sol-calendar{display:flex;flex-direction:column;gap:var(--sol-space-sm, 8px)}.sol-calendar__legend{display:flex;align-items:center;gap:var(--sol-space-md, 12px);flex-wrap:wrap}.sol-calendar__legend-item{display:inline-flex;align-items:center;gap:5px}.sol-calendar__legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.sol-calendar__legend-label{font-size:var(--sol-font-size-xs, 12px);color:var(--sol-color-text-muted)}\n"] }]
12475
12790
  }], ctorParameters: () => [], propDecorators: { events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: true }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: true }] }], currentDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentDate", required: true }] }], eventTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventTemplate", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], eventClicked: [{ type: i0.Output, args: ["eventClicked"] }], slotClicked: [{ type: i0.Output, args: ["slotClicked"] }] } });
12476
12791
 
12792
+ /**
12793
+ * Validez de destino al "tap-para-conectar" de `sol-flow-canvas` (Ola 5
12794
+ * PR-C2B) — PURA, sin Angular/DOM (mismo criterio que `flow-canvas-layout.ts`).
12795
+ *
12796
+ * Decisión de diseño: `sol-flow-canvas` es una librería AGNÓSTICA de dominio
12797
+ * (ver docstring de `flow-canvas.model.ts` — "cero conocimiento de dominio",
12798
+ * NUNCA referencia `FlowNodeSpec`/`handler_kind`) y por FSD (`app → ... →
12799
+ * shared`) NUNCA puede importar `entities/flow/model/flow.validators.ts` de
12800
+ * la app — sería una dependencia hacia ARRIBA, prohibida. Este módulo
12801
+ * reimplementa el MISMO criterio estructural que motiva 2 reglas de
12802
+ * `flow.validators.ts` (`checkNoDuplicateTransitions` y el espíritu de
12803
+ * "ciclo ilegal" de `FlowValidator._validate_cycles` en boki-ai) como grafo
12804
+ * PURO — sin `yields_turn` (atributo de dominio que ni siquiera viaja a la
12805
+ * API, ver docstring de `flow.validators.ts`), así que la regla de ciclos de
12806
+ * acá es DELIBERADAMENTE más estricta que la del backend: excluye CUALQUIER
12807
+ * destino que hoy ya pueda alcanzar el origen (cerraría un ciclo visible en
12808
+ * el lienzo), aunque el validador real permita ciclos legítimos con
12809
+ * `interrupt()`. Es un HINT visual del canvas (resalta destinos sugeridos),
12810
+ * NO bloquea la conexión ni reemplaza al validador real — `entities/flow`
12811
+ * sigue siendo la fuente de verdad final sobre legalidad de dominio.
12812
+ */
12813
+ function safeNodes(nodes) {
12814
+ return (nodes ?? []).filter((n) => !!n);
12815
+ }
12816
+ function safeEdges(edges) {
12817
+ return (edges ?? []).filter((e) => !!e);
12818
+ }
12819
+ /**
12820
+ * Destinos válidos para conectar DESDE `sourceId`, dado el grafo actual:
12821
+ * 1. Nunca el propio `sourceId` (sin auto-loop).
12822
+ * 2. Nunca un destino con el que YA existe una arista `sourceId→destino`
12823
+ * (evita una conexión duplicada).
12824
+ * 3. Nunca un destino desde el que HOY se puede alcanzar `sourceId` (directa
12825
+ * o transitivamente) vía aristas existentes — conectarlo cerraría un
12826
+ * ciclo.
12827
+ *
12828
+ * `sourceId` ausente entre los nodos actuales devuelve un set vacío
12829
+ * (defensivo — mismo criterio de robustez del resto del módulo).
12830
+ */
12831
+ function computeValidConnectionTargets(nodes, edges, sourceId) {
12832
+ const idSet = new Set(safeNodes(nodes).map((n) => n.id));
12833
+ if (!idSet.has(sourceId))
12834
+ return new Set();
12835
+ const incoming = new Map(); // target -> [sources] — para el BFS reverso de la regla 3
12836
+ const existingOutgoingPairs = new Set(); // "source::target" ya conectados — para la regla 2
12837
+ for (const edge of safeEdges(edges)) {
12838
+ if (!idSet.has(edge.sourceId) || !idSet.has(edge.targetId))
12839
+ continue; // arista "fantasma" — mismo criterio que visibleEdges()
12840
+ const predecessors = incoming.get(edge.targetId) ?? [];
12841
+ predecessors.push(edge.sourceId);
12842
+ incoming.set(edge.targetId, predecessors);
12843
+ existingOutgoingPairs.add(`${edge.sourceId}::${edge.targetId}`);
12844
+ }
12845
+ // BFS reverso desde sourceId siguiendo aristas ENTRANTES: todo nodo alcanzado YA puede llegar a
12846
+ // sourceId por el camino existente — conectarlo como destino cerraría un ciclo. sourceId mismo
12847
+ // arranca incluido (cubre la regla 1, el auto-loop, sin un caso especial aparte).
12848
+ const reachesSource = new Set([sourceId]);
12849
+ const queue = [sourceId];
12850
+ while (queue.length > 0) {
12851
+ const current = queue.shift();
12852
+ for (const predecessor of incoming.get(current) ?? []) {
12853
+ if (reachesSource.has(predecessor))
12854
+ continue; // primer toque gana — mismo criterio anti-ciclo-infinito que computeAutoLayoutPositions
12855
+ reachesSource.add(predecessor);
12856
+ queue.push(predecessor);
12857
+ }
12858
+ }
12859
+ const valid = new Set();
12860
+ for (const id of idSet) {
12861
+ if (reachesSource.has(id))
12862
+ continue; // regla 1 (sourceId) + regla 3 (cerraría un ciclo)
12863
+ if (existingOutgoingPairs.has(`${sourceId}::${id}`))
12864
+ continue; // regla 2 (ya conectados — duplicado)
12865
+ valid.add(id);
12866
+ }
12867
+ return valid;
12868
+ }
12869
+
12870
+ /**
12871
+ * Geometría bezier de las aristas de `sol-flow-canvas` (Ola 5 PR-C2B) — PURA,
12872
+ * sin Angular/DOM (mismo criterio que `flow-canvas-layout.ts`). Sustituye las
12873
+ * líneas rectas del shell de PR-C1 (`edgeLine()`, `x1/y1/x2/y2`) por curvas
12874
+ * cúbicas con "dirección del flujo": control points HORIZONTALES simétricos
12875
+ * (`c1` a la derecha del origen, `c2` a la izquierda del destino) — mismo
12876
+ * criterio visual que n8n/react-flow, coherente con el layout BFS-por-columnas
12877
+ * de `flow-canvas-layout.ts` (`COLUMN_GAP_PX` en el eje x).
12878
+ */
12879
+ /** Piso del offset del handle — evita una curva imperceptible en distancias horizontales cortas. */
12880
+ const MIN_HANDLE_PX = 40;
12881
+ /** Fracción de la distancia horizontal usada como offset del handle — más separación horizontal, curva más pronunciada. */
12882
+ const HANDLE_RATIO = 0.5;
12883
+ function computeEdgeControlPoints(source, target) {
12884
+ const dx = target.x - source.x;
12885
+ // Math.abs(dx): el offset SIEMPRE es positivo — incluso con dx=0 (nodos apilados en la misma columna) o
12886
+ // dx<0 (destino a la izquierda del origen, p. ej. una conexión "hacia atrás") la curva sigue siendo visible.
12887
+ const offset = Math.max(MIN_HANDLE_PX, Math.abs(dx) * HANDLE_RATIO);
12888
+ return {
12889
+ c1: { x: source.x + offset, y: source.y },
12890
+ c2: { x: target.x - offset, y: target.y },
12891
+ };
12892
+ }
12893
+ /** Atributo `d` de un elemento SVG "path" — curva cúbica `M origen C c1 c2 destino`. */
12894
+ function computeEdgePathD(source, target) {
12895
+ const { c1, c2 } = computeEdgeControlPoints(source, target);
12896
+ return `M ${source.x},${source.y} C ${c1.x},${c1.y} ${c2.x},${c2.y} ${target.x},${target.y}`;
12897
+ }
12898
+ /** Fórmula de Bernstein general de una bezier cúbica — `t` en [0,1]. Genérica a propósito (no asume handles horizontales) para que siga siendo correcta si el criterio de control points cambia en el futuro. */
12899
+ function computeCubicBezierPoint(p0, p1, p2, p3, t) {
12900
+ const mt = 1 - t;
12901
+ const w0 = mt * mt * mt;
12902
+ const w1 = 3 * mt * mt * t;
12903
+ const w2 = 3 * mt * t * t;
12904
+ const w3 = t * t * t;
12905
+ return {
12906
+ x: w0 * p0.x + w1 * p1.x + w2 * p2.x + w3 * p3.x,
12907
+ y: w0 * p0.y + w1 * p1.y + w2 * p2.y + w3 * p3.y,
12908
+ };
12909
+ }
12910
+ /**
12911
+ * Punto SOBRE la curva bezier (t=0.5) para posicionar el label de la arista —
12912
+ * reemplaza el punto medio de la RECTA que usaba el shell de PR-C1.
12913
+ *
12914
+ * Nota de diseño: con los handles horizontales simétricos de
12915
+ * {@link computeEdgeControlPoints} (`c1.y=source.y`, `c2.y=target.y`, y
12916
+ * `c1.x + c2.x = source.x + target.x` porque el offset se suma de un lado y
12917
+ * se resta del otro), el punto en t=0.5 de CUALQUIER bezier cúbica —
12918
+ * `B(0.5) = (P0 + 3·P1 + 3·P2 + P3) / 8` — colapsa algebraicamente al
12919
+ * promedio exacto `(source + target) / 2` sin importar el offset (los
12920
+ * términos del offset se cancelan). Es decir: para ESTA construcción de
12921
+ * control points, el punto medio de la curva y el punto medio de la recta
12922
+ * coinciden en valor — la diferencia real está en que este helper calcula el
12923
+ * punto GENUINO de la curva (válido si el criterio de control points cambia
12924
+ * a uno no simétrico más adelante), no en que el número resultante hoy sea
12925
+ * distinto.
12926
+ */
12927
+ function computeEdgeMidpoint(source, target) {
12928
+ const { c1, c2 } = computeEdgeControlPoints(source, target);
12929
+ return computeCubicBezierPoint(source, c1, c2, target, 0.5);
12930
+ }
12931
+
12932
+ /**
12933
+ * Motor de auto-layout de `sol-flow-canvas` (Ola 5 PR-C3 — GOAL §4:
12934
+ * "Persistencia de posiciones + auto-layout (dagre/ELK)", reemplaza el
12935
+ * placeholder BFS-por-capas de PR-C1) — PURO, sin Angular, sin DOM.
12936
+ *
12937
+ * `@dagrejs/dagre` (MIT, fork mantenido del `dagre` original — verificado
12938
+ * `npm view @dagrejs/dagre license` antes de instalar; su única dependencia,
12939
+ * `@dagrejs/graphlib`, también MIT) implementa el algoritmo de Sugiyama
12940
+ * (ranking + minimización de cruces + posicionamiento) — a diferencia del
12941
+ * BFS de "primer toque gana" que reemplaza, resuelve el ranking GLOBAL
12942
+ * respetando TODAS las aristas simultáneamente (una rama más larga hacia el
12943
+ * mismo destino empuja el rango real, no solo el del primer camino
12944
+ * visitado) y reordena filas dentro de cada rango para minimizar cruces
12945
+ * visuales — ver los casos "DIAMANTE"/"MINIMIZA cruces" en
12946
+ * `flow-canvas-layout.spec.ts`, que el BFS anterior NO podía satisfacer.
12947
+ *
12948
+ * Encapsulado DETRÁS de esta función — ningún componente de la app
12949
+ * (`boki-front`) importa `@dagrejs/dagre` directo; solo consume
12950
+ * `SolFlowCanvasComponent.autoLayout()`, que delega en `computeAutoLayoutPositions`
12951
+ * (sin cambios en su firma pública salvo volverse `Promise` — ver W3 abajo).
12952
+ *
12953
+ * **W3 (4R Ola 5 post PR-C3, fuga de bundle)** — `@dagrejs/dagre` (~100kB)
12954
+ * pasaba por el chunk EAGER (`main-*.js`) porque `flow-canvas-layout.ts` lo
12955
+ * importaba de forma ESTÁTICA — el peso viajaba a TODA la app, incluso a
12956
+ * quien nunca visita `/dashboard/flujos`. `computeAutoLayoutPositions` ahora
12957
+ * es `async` y carga el módulo vía `import()` DINÁMICO (mismo espíritu de
12958
+ * encapsulación que `sol-chart`/`SOL_CHART_ENGINE` con `chart.js`, llevado un
12959
+ * paso más allá: acá el propio MÓDULO se carga perezoso, no solo la
12960
+ * instancia que lo consume) — el bundler lo saca a un chunk propio, lazy,
12961
+ * que solo se pide la PRIMERA vez que `autoLayout()` corre de verdad.
12962
+ * `dagreModulePromise` cachea la promesa a nivel de MÓDULO: la primera
12963
+ * llamada dispara el `import()`; las siguientes reusan la misma promesa
12964
+ * resuelta, nunca reimportan. CAMBIO DE CONTRATO DELIBERADO: `autoLayout()`
12965
+ * (`flow-canvas.component.ts`) también pasa a `Promise<void>` — ver su
12966
+ * docstring y el de `flow-canvas-acceptance.spec.ts`.
12967
+ *
12968
+ * **W2 (4R Ola 5 post PR-C3, "dagre sin red")** — un `import()` dinámico
12969
+ * puede FALLAR a mitad de sesión (chunk 404 tras un deploy nuevo, conexión
12970
+ * caída, etc.) — mismo riesgo que cualquier `loadComponent()` de ruta de
12971
+ * Angular. `computeAutoLayoutPositions` envuelve TANTO la carga del módulo
12972
+ * COMO el cálculo del layout en un único `try/catch`: si cualquiera de los
12973
+ * dos falla, cae a {@link computeLayeredFallbackPositions} — el placeholder
12974
+ * BFS-por-capas ORIGINAL de PR-C1, conservado TAL CUAL (nunca se borró, solo
12975
+ * se renombró) como red de seguridad síncrona que NUNCA depende de red. Un
12976
+ * `console.warn` (mismo criterio que `i18n.provider.ts`/`theme.service.ts`
12977
+ * de este mismo repo) deja rastro del degradado sin romper la UX — el
12978
+ * usuario sigue viendo un layout usable, solo con un algoritmo más simple.
12979
+ *
12980
+ * `rankdir: 'LR'` (izquierda→derecha) — mismo eje horizontal que las curvas
12981
+ * bezier de `flow-canvas-edge-geometry.ts`. `NODE_WIDTH_PX`/`NODE_HEIGHT_PX`
12982
+ * duplican a propósito las mismas constantes de `flow-canvas.component.ts`
12983
+ * (mismo criterio de duplicación deliberada ya documentado en este archivo
12984
+ * para `countNodeIds`/`countEdgeIds`: cada módulo de `@solercia/ui` que las
12985
+ * necesita mantiene su propia copia mínima en vez de un acoplamiento
12986
+ * cruzado). dagre devuelve el CENTRO de cada nodo; `sol-flow-canvas`
12987
+ * posiciona por esquina superior izquierda (`resolvedPosition`/`nodeCenter`
12988
+ * en el componente) — la conversión ocurre acá, una sola vez.
12989
+ */
12990
+ const NODE_WIDTH_PX$1 = 180;
12991
+ const NODE_HEIGHT_PX$1 = 56;
12992
+ /** Separación horizontal ENTRE columnas (gap, no distancia centro-a-centro) — mismo pitch visual aproximado que el placeholder anterior (220px de columna con nodos de 180px de ancho). */
12993
+ const RANK_SEP_PX = 60;
12994
+ /** Separación vertical entre nodos de la MISMA columna. */
12995
+ const NODE_SEP_PX = 70;
12996
+ /** Placeholder BFS-por-capas ORIGINAL de PR-C1 — mismo pitch visual que usaba antes de dagre. */
12997
+ const FALLBACK_COLUMN_GAP_PX = 220;
12998
+ const FALLBACK_ROW_GAP_PX = 120;
12999
+ /** Cache a nivel de MÓDULO (W3) — la primera llamada dispara el `import()`; las siguientes reusan la misma promesa. */
13000
+ let dagreModulePromise = null;
13001
+ function loadDagre() {
13002
+ if (!dagreModulePromise) {
13003
+ dagreModulePromise = import('@dagrejs/dagre');
13004
+ }
13005
+ return dagreModulePromise;
13006
+ }
13007
+ /**
13008
+ * Calcula una posición `{x,y}` (esquina superior izquierda, espacio canvas)
13009
+ * para CADA nodo de `nodes` — dagre cuando el chunk lazy carga y el layout
13010
+ * corre sin errores; el fallback BFS síncrono si cualquiera de los dos falla
13011
+ * (W2, "dagre sin red" — ver docstring del módulo). Aristas que referencian
13012
+ * un nodo ausente en `nodes` se ignoran (mismo criterio de robustez que
13013
+ * `visibleEdges()` del componente). Grafos con ciclos (incluidos self-loops,
13014
+ * ver `flow-canvas-layout.spec.ts`) NUNCA lanzan por sí solos — dagre los
13015
+ * rompe internamente (`acyclicer`) solo para calcular el ranking, sin mutar
13016
+ * el grafo de entrada de este módulo; el `try/catch` cubre fallas AJENAS al
13017
+ * grafo (carga del chunk, errores internos inesperados de la librería).
13018
+ *
13019
+ * Determinístico bajo AMBOS caminos: nodos/aristas se insertan/procesan en
13020
+ * un orden ESTABLE (ids ordenados alfabéticamente), nunca el orden de
13021
+ * inserción de `nodes`/`edges` — la MISMA entrada produce SIEMPRE la misma
13022
+ * salida. Normaliza el resultado al origen (nunca devuelve coordenadas
13023
+ * negativas), mismo criterio que `clampPosition` en `flow-canvas.component.ts`
13024
+ * (ese clamp sigue existiendo como red de seguridad en el punto de lectura).
13025
+ *
13026
+ * Robustez de entrada (mismo criterio que el resto de `@solercia/ui`):
13027
+ * `nodes`/`edges` toleran `null`/`undefined` sin lanzar.
13028
+ */
13029
+ async function computeAutoLayoutPositions(nodes, edges) {
13030
+ const safeNodes = (nodes ?? []).filter((n) => !!n);
13031
+ const safeEdges = (edges ?? []).filter((e) => !!e);
13032
+ if (safeNodes.length === 0)
13033
+ return new Map();
13034
+ try {
13035
+ const { graphlib, layout: dagreLayout } = await loadDagre();
13036
+ return computeDagrePositions(graphlib, dagreLayout, safeNodes, safeEdges);
13037
+ }
13038
+ catch (err) {
13039
+ // W2 — el chunk lazy de dagre puede fallar a mitad de sesión (chunk 404
13040
+ // tras un deploy nuevo, offline, etc.); nunca deja al usuario sin ningún
13041
+ // layout, solo degrada al fallback BFS síncrono.
13042
+ console.warn('[sol-flow-canvas] auto-layout con dagre falló — se usa el fallback BFS por capas.', err);
13043
+ return computeLayeredFallbackPositions(safeNodes, safeEdges);
13044
+ }
13045
+ }
13046
+ function computeDagrePositions(graphlib, dagreLayout, safeNodes, safeEdges) {
13047
+ const idSet = new Set(safeNodes.map((n) => n.id));
13048
+ const sortedIds = [...idSet].sort(); // orden determinista, independiente del orden de inserción
13049
+ const graph = new graphlib.Graph();
13050
+ graph.setGraph({ rankdir: 'LR', nodesep: NODE_SEP_PX, ranksep: RANK_SEP_PX, marginx: 0, marginy: 0 });
13051
+ graph.setDefaultEdgeLabel(() => ({}));
13052
+ for (const id of sortedIds) {
13053
+ graph.setNode(id, { width: NODE_WIDTH_PX$1, height: NODE_HEIGHT_PX$1 });
13054
+ }
13055
+ const sortedEdges = safeEdges
13056
+ .filter((edge) => idSet.has(edge.sourceId) && idSet.has(edge.targetId))
13057
+ .sort((a, b) => (a.sourceId === b.sourceId ? a.targetId.localeCompare(b.targetId) : a.sourceId.localeCompare(b.sourceId)));
13058
+ for (const edge of sortedEdges) {
13059
+ graph.setEdge(edge.sourceId, edge.targetId);
13060
+ }
13061
+ dagreLayout(graph);
13062
+ const rawPositions = new Map();
13063
+ let minX = Number.POSITIVE_INFINITY;
13064
+ let minY = Number.POSITIVE_INFINITY;
13065
+ for (const id of sortedIds) {
13066
+ const box = graph.node(id);
13067
+ const topLeft = { x: box.x - NODE_WIDTH_PX$1 / 2, y: box.y - NODE_HEIGHT_PX$1 / 2 };
13068
+ rawPositions.set(id, topLeft);
13069
+ minX = Math.min(minX, topLeft.x);
13070
+ minY = Math.min(minY, topLeft.y);
13071
+ }
13072
+ const positions = new Map();
13073
+ for (const [id, position] of rawPositions) {
13074
+ positions.set(id, { x: position.x - minX, y: position.y - minY });
13075
+ }
13076
+ return positions;
13077
+ }
13078
+ /**
13079
+ * W2 (4R Ola 5 post PR-C3) — placeholder BFS-por-capas ORIGINAL de PR-C1,
13080
+ * conservado TAL CUAL (renombrado desde `computeAutoLayoutPositions` de
13081
+ * aquel PR): capas por BFS desde las raíces (nodos sin arista entrante), sin
13082
+ * minimizar cruces ni enrutar curvas. Sirve de fallback SÍNCRONO —
13083
+ * NUNCA depende de red — cuando el chunk lazy de dagre falla a mitad de
13084
+ * sesión ("dagre sin red").
13085
+ *
13086
+ * BFS de "primer toque gana" (NUNCA recalcula la profundidad de un nodo ya
13087
+ * visitado) a propósito: un layout por camino MÁS LARGO sería más prolijo en
13088
+ * grafos en diamante, pero puede DIVERGER en un ciclo LEGAL (p. ej. un nodo
13089
+ * de recolección que vuelve sobre sí mismo tras un `interrupt()` — ver
13090
+ * `FlowValidator._validate_cycles` en boki-ai) si se recalculara la
13091
+ * profundidad cada vez que se re-alcanza un nodo. BFS clásico visita cada
13092
+ * nodo UNA sola vez → termina siempre, incluso con ciclos (incluidos
13093
+ * self-loops).
13094
+ */
13095
+ function computeLayeredFallbackPositions(nodes, edges) {
13096
+ const safeNodes = (nodes ?? []).filter((n) => !!n);
13097
+ const safeEdges = (edges ?? []).filter((e) => !!e);
13098
+ const ids = safeNodes.map((n) => n.id);
13099
+ const idSet = new Set(ids);
13100
+ const outgoing = new Map();
13101
+ const hasIncoming = new Set();
13102
+ for (const edge of safeEdges) {
13103
+ if (!idSet.has(edge.sourceId) || !idSet.has(edge.targetId))
13104
+ continue;
13105
+ const list = outgoing.get(edge.sourceId) ?? [];
13106
+ list.push(edge.targetId);
13107
+ outgoing.set(edge.sourceId, list);
13108
+ hasIncoming.add(edge.targetId);
13109
+ }
13110
+ const roots = ids.filter((id) => !hasIncoming.has(id));
13111
+ const seeds = [...(roots.length > 0 ? roots : ids)].sort(); // orden determinista, independiente del orden de inserción
13112
+ const depthOf = new Map();
13113
+ const queue = [];
13114
+ for (const seed of seeds) {
13115
+ if (depthOf.has(seed))
13116
+ continue;
13117
+ depthOf.set(seed, 0);
13118
+ queue.push(seed);
13119
+ }
13120
+ while (queue.length > 0) {
13121
+ const current = queue.shift();
13122
+ const depth = depthOf.get(current);
13123
+ for (const next of outgoing.get(current) ?? []) {
13124
+ if (depthOf.has(next))
13125
+ continue; // primer toque gana — ver docstring de la función (evita divergir en ciclos)
13126
+ depthOf.set(next, depth + 1);
13127
+ queue.push(next);
13128
+ }
13129
+ }
13130
+ for (const id of ids) {
13131
+ if (!depthOf.has(id))
13132
+ depthOf.set(id, 0); // inalcanzable desde cualquier raíz (grafo desconectado): columna propia
13133
+ }
13134
+ const byDepth = new Map();
13135
+ for (const id of ids) {
13136
+ const depth = depthOf.get(id);
13137
+ const bucket = byDepth.get(depth) ?? [];
13138
+ bucket.push(id);
13139
+ byDepth.set(depth, bucket);
13140
+ }
13141
+ const positions = new Map();
13142
+ for (const [depth, bucket] of byDepth) {
13143
+ const ordered = [...bucket].sort(); // filas deterministas dentro de la misma columna
13144
+ ordered.forEach((id, index) => {
13145
+ positions.set(id, { x: depth * FALLBACK_COLUMN_GAP_PX, y: index * FALLBACK_ROW_GAP_PX });
13146
+ });
13147
+ }
13148
+ return positions;
13149
+ }
13150
+ /**
13151
+ * Frecuencia de `id` entre los nodos actuales — soporte de {@link safeTrackKey}
13152
+ * (fix NG0955 con id duplicado/ausente). Duplicado A PROPÓSITO de
13153
+ * `ui/kanban/kanban-track.ts`/`ui/timeline`/`ui/calendar` (mismo criterio ya
13154
+ * documentado en `calendar-grid.component.ts::observeMobileViewport`): cada
13155
+ * componente de `@solercia/ui` que necesita esto mantiene su propia copia
13156
+ * mínima en vez de crear un acoplamiento cruzado entre carpetas de `ui/*`.
13157
+ */
13158
+ function countNodeIds(nodes) {
13159
+ const frequency = new Map();
13160
+ for (const node of nodes) {
13161
+ if (!node)
13162
+ continue;
13163
+ frequency.set(node.id, (frequency.get(node.id) ?? 0) + 1);
13164
+ }
13165
+ return frequency;
13166
+ }
13167
+ /** `track` seguro: cae al índice si el id está ausente o duplicado. */
13168
+ function safeTrackKey(id, index, frequency) {
13169
+ if (id === undefined || id === null || (frequency.get(id) ?? 0) > 1)
13170
+ return index;
13171
+ return id;
13172
+ }
13173
+ /**
13174
+ * Frecuencia de `id` entre las edges actuales — soporte de {@link safeTrackKey}
13175
+ * aplicado a las aristas (fix NG0955 con id duplicado — antes solo los nodos
13176
+ * tenían este resguardo; C2, 4R Ola 5). Copia mínima A PROPÓSITO de
13177
+ * {@link countNodeIds} sobre una colección distinta (edges, no nodos) — mismo
13178
+ * criterio de duplicación deliberada documentado arriba.
13179
+ */
13180
+ function countEdgeIds(edges) {
13181
+ const frequency = new Map();
13182
+ for (const edge of edges) {
13183
+ if (!edge)
13184
+ continue;
13185
+ frequency.set(edge.id, (frequency.get(edge.id) ?? 0) + 1);
13186
+ }
13187
+ return frequency;
13188
+ }
13189
+
13190
+ const DEFAULT_VIEWPORT = { panX: 0, panY: 0, zoom: 1 };
13191
+ /**
13192
+ * Rango de zoom — mismo orden de magnitud que herramientas comparables
13193
+ * (n8n/Figma rondan 0.2x–2x/4x); 0.25x–2.5x cubre "ver el flujo completo"
13194
+ * (decenas de nodos) hasta "leer el detalle de un nodo" sin permitir un zoom
13195
+ * tan extremo que el drag/las curvas bezier se vuelvan imprecisos.
13196
+ */
13197
+ const MIN_ZOOM = 0.25;
13198
+ const MAX_ZOOM = 2.5;
13199
+ /** Sensibilidad exponencial de la rueda — un solo "tick" típico (~100 unidades de deltaY) mueve el zoom ~10%. */
13200
+ const WHEEL_ZOOM_SENSITIVITY = 0.001;
13201
+ function clampZoom(zoom) {
13202
+ return Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, zoom));
13203
+ }
13204
+ function screenToWorld(viewport, screenPoint) {
13205
+ return {
13206
+ x: (screenPoint.x - viewport.panX) / viewport.zoom,
13207
+ y: (screenPoint.y - viewport.panY) / viewport.zoom,
13208
+ };
13209
+ }
13210
+ function worldToScreen(viewport, worldPoint) {
13211
+ return {
13212
+ x: worldPoint.x * viewport.zoom + viewport.panX,
13213
+ y: worldPoint.y * viewport.zoom + viewport.panY,
13214
+ };
13215
+ }
13216
+ /**
13217
+ * Cambia el zoom a `nextZoomRaw` (clampeado) recalculando el pan para que
13218
+ * `screenAnchor` (p. ej. la posición del cursor o el punto medio de un pinch)
13219
+ * quede EXACTAMENTE en el mismo punto `world` antes y después — "zoom hacia
13220
+ * el cursor", el mismo criterio que cualquier editor de canvas (Figma, n8n).
13221
+ */
13222
+ function zoomAtScreenPoint(viewport, screenAnchor, nextZoomRaw) {
13223
+ const nextZoom = clampZoom(nextZoomRaw);
13224
+ if (nextZoom === viewport.zoom)
13225
+ return viewport; // sin cambio real: evita objetos nuevos y una división innecesaria
13226
+ const worldAnchor = screenToWorld(viewport, screenAnchor);
13227
+ return {
13228
+ zoom: nextZoom,
13229
+ panX: screenAnchor.x - worldAnchor.x * nextZoom,
13230
+ panY: screenAnchor.y - worldAnchor.y * nextZoom,
13231
+ };
13232
+ }
13233
+ /**
13234
+ * `deltaY` crudo de un `WheelEvent` — negativo (scroll "hacia adelante"/rueda
13235
+ * arriba en la mayoría de mice) ACERCA, mismo sentido que Figma/n8n/Google
13236
+ * Maps. Factor exponencial (no lineal): mantiene la sensación de "porcentaje
13237
+ * relativo" constante sea cual sea el zoom actual.
13238
+ */
13239
+ function computeWheelZoom(viewport, deltaY, screenAnchor) {
13240
+ const factor = Math.exp(-deltaY * WHEEL_ZOOM_SENSITIVITY);
13241
+ return zoomAtScreenPoint(viewport, screenAnchor, viewport.zoom * factor);
13242
+ }
13243
+ /**
13244
+ * Arrastre del FONDO — delta en coordenadas "screen" (pantalla), aplicado
13245
+ * DIRECTO al pan sin dividir por zoom: el fondo debe seguir al dedo/cursor 1:1
13246
+ * en píxeles de pantalla sin importar el zoom actual (mismo criterio que
13247
+ * paneas cualquier mapa/editor — solo el contenido ESCALADO se mueve más o
13248
+ * menos "rápido" en unidades world, el pan en sí es puramente de pantalla).
13249
+ */
13250
+ function panBy(viewport, screenDelta) {
13251
+ return { ...viewport, panX: viewport.panX + screenDelta.x, panY: viewport.panY + screenDelta.y };
13252
+ }
13253
+ function distanceBetween(a, b) {
13254
+ return Math.hypot(b.x - a.x, b.y - a.y);
13255
+ }
13256
+ function midpoint(a, b) {
13257
+ return { x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 };
13258
+ }
13259
+ /**
13260
+ * Pinch de dos punteros (touch): la RAZÓN entre la distancia actual y la
13261
+ * anterior entre los dos punteros define el factor de zoom incremental —
13262
+ * separar los dedos (distancia crece) acerca, juntarlos aleja. `screenAnchor`
13263
+ * es el punto medio ACTUAL de los dos punteros (se recalcula en cada
13264
+ * `pointermove` — el componente pasa el punto medio vigente, no el inicial,
13265
+ * para que el ancla del zoom siga a los dedos igual que un pinch real).
13266
+ */
13267
+ function computePinchZoom(viewport, previousDistance, currentDistance, screenAnchor) {
13268
+ if (previousDistance <= 0)
13269
+ return viewport; // defensivo: sin distancia previa válida, no hay razón que calcular
13270
+ const ratio = currentDistance / previousDistance;
13271
+ return zoomAtScreenPoint(viewport, screenAnchor, viewport.zoom * ratio);
13272
+ }
13273
+ /** Margen (px de PANTALLA) que deja `panToRevealWorldRect` entre el borde del rect revelado y el borde del viewport. */
13274
+ const REVEAL_MARGIN_PX = 24;
13275
+ /**
13276
+ * Ajusta el PAN (nunca el zoom — evita saltos de escala inesperados al tabular) para que `worldRect`
13277
+ * quede completamente visible dentro de un viewport de pantalla de `viewportSize`, con
13278
+ * {@link REVEAL_MARGIN_PX} de margen. No-op si `worldRect` ya es completamente visible, o si
13279
+ * `viewportSize` no tiene un tamaño medible todavía (0×0 — p. ej. antes del primer layout real; nunca
13280
+ * lanza ni produce NaN).
13281
+ *
13282
+ * Motivación (PR-C2B, W-fix): el shell de PR-C1 usaba `overflow: auto` — el navegador hacía
13283
+ * "scroll into view" GRATIS cuando el foco de teclado (Tab) llegaba a un nodo fuera del viewport
13284
+ * visible. `sol-flow-canvas` reemplaza ese scroll nativo por `overflow: hidden` + pan/zoom propio (`transform`)
13285
+ * — sin este ajuste, Tab movería el foco LÓGICO sin revelarlo visualmente, una regresión real de
13286
+ * accesibilidad (ver Learned del reporte de fase PR-C2B).
13287
+ */
13288
+ function panToRevealWorldRect(viewport, worldRect, viewportSize, margin = REVEAL_MARGIN_PX) {
13289
+ if (viewportSize.width <= 0 || viewportSize.height <= 0)
13290
+ return viewport; // sin tamaño medible: no hay decisión segura que tomar
13291
+ const topLeft = worldToScreen(viewport, { x: worldRect.x, y: worldRect.y });
13292
+ const bottomRight = worldToScreen(viewport, { x: worldRect.x + worldRect.width, y: worldRect.y + worldRect.height });
13293
+ const dx = axisRevealDelta(topLeft.x, bottomRight.x, viewportSize.width, margin);
13294
+ const dy = axisRevealDelta(topLeft.y, bottomRight.y, viewportSize.height, margin);
13295
+ if (dx === 0 && dy === 0)
13296
+ return viewport;
13297
+ return panBy(viewport, { x: dx, y: dy });
13298
+ }
13299
+ /** Delta de pan de UN eje — prioriza revelar el borde de INICIO (top/left) si el rect no cabe entero entre los dos márgenes (rect más grande que el viewport visible). */
13300
+ function axisRevealDelta(startScreen, endScreen, viewportLength, margin) {
13301
+ if (startScreen < margin)
13302
+ return margin - startScreen;
13303
+ if (endScreen > viewportLength - margin)
13304
+ return viewportLength - margin - endScreen;
13305
+ return 0;
13306
+ }
13307
+
13308
+ /** Tamaño supuesto de un nodo para calcular el punto medio de las aristas (el motor no mide el DOM real). */
13309
+ const NODE_WIDTH_PX = 180;
13310
+ const NODE_HEIGHT_PX = 56;
13311
+ /** Un gesto de pointerdown→pointerup con menos desplazamiento de PANTALLA que esto se trata como click, no como arrastre (mouse/pen: precisión motora alta). */
13312
+ const DRAG_THRESHOLD_PX = 4;
13313
+ /**
13314
+ * PR-C4 (GOAL §4, móvil) — hallazgo real del e2e móvil (`e2e/flows/
13315
+ * flows-mobile.spec.ts`): un TAP real de dedo (`pointerType: 'touch'`)
13316
+ * reporta varios px de "temblor" incluso inmóvil — el umbral de 4px
13317
+ * (afinado para mouse) clasificaba un tap normal como arrastre, y
13318
+ * `onNodeActivate` descartaba el click siguiente (`lastGestureWasDrag`),
13319
+ * dejando el nodo SIN abrir su editor. Slop más generoso, mismo orden de
13320
+ * magnitud que el "touch slop" estándar de las plataformas (Android
13321
+ * `ViewConfiguration.getScaledTouchSlop()` ~8dp, iOS ~10pt) — ver
13322
+ * {@link dragThresholdFor}.
13323
+ */
13324
+ const DRAG_THRESHOLD_PX_TOUCH = 10;
13325
+ /**
13326
+ * Umbral clic-vs-arrastre según el tipo de puntero del evento — ver
13327
+ * {@link DRAG_THRESHOLD_PX}/{@link DRAG_THRESHOLD_PX_TOUCH}. Solo
13328
+ * `pointerType === 'touch'` (yema de un dedo) cae al umbral TÁCTIL más
13329
+ * permisivo — `'pen'` (lápiz óptico/stylus) usa el mismo umbral de
13330
+ * PRECISIÓN que `'mouse'` a propósito (WARNING, 4R post PR-C4): la punta de
13331
+ * un lápiz ofrece la misma precisión motora que un cursor de mouse
13332
+ * (contacto puntual, sin el "temblor" natural de una yema de dedo que
13333
+ * motiva el slop táctil más generoso — ver el JSDoc de
13334
+ * {@link DRAG_THRESHOLD_PX_TOUCH}), mismo criterio que el "touch slop"
13335
+ * diferenciado de las plataformas nativas (Android distingue
13336
+ * `MotionEvent.TOOL_TYPE_STYLUS` de `TOOL_TYPE_FINGER`, con un slop menor
13337
+ * para el primero).
13338
+ */
13339
+ function dragThresholdFor(event) {
13340
+ return event.pointerType === 'touch' ? DRAG_THRESHOLD_PX_TOUCH : DRAG_THRESHOLD_PX;
13341
+ }
13342
+ /** Paso de cada nudge por teclado (paridad a11y del arrastre) — fijo en espacio CANVAS, independiente del zoom (ver docstring de {@link onNodeKeydown}). */
13343
+ const KEYBOARD_NUDGE_STEP_PX = 10;
13344
+ const ARROW_KEY_DELTA = {
13345
+ ArrowUp: { x: 0, y: -1 },
13346
+ ArrowDown: { x: 0, y: 1 },
13347
+ ArrowLeft: { x: -1, y: 0 },
13348
+ ArrowRight: { x: 1, y: 0 },
13349
+ };
13350
+ let uniqueMarkerCounter = 0;
13351
+ /** El origen (0,0) del lienzo es un límite real — un contenedor `overflow: auto` no tiene scroll negativo, así que ningún nodo debe commitear ni mostrarse en coordenadas negativas (W4, 4R Ola 5). */
13352
+ function clampPosition(position) {
13353
+ return { x: Math.max(0, position.x), y: Math.max(0, position.y) };
13354
+ }
13355
+ /**
13356
+ * `sol-flow-canvas` — contrato AGNÓSTICO del motor de un lienzo tipo n8n
13357
+ * (Ola 5, `openspec/GOAL-ola5-flow-canvas-y-cutover.md` §4).
13358
+ *
13359
+ * API PÚBLICA ESTABLE (inputs/outputs/`autoLayout()`/proyección de
13360
+ * template): esta clase NUNCA cambia su contrato público entre bake-offs —
13361
+ * solo el INTERIOR de la implementación difiere.
13362
+ *
13363
+ * **Esta es la implementación de PR-C2B** (motor nativo SVG + Pointer Events,
13364
+ * CDK evaluado y descartado — ver `Learned` del reporte de fase: ni
13365
+ * `DragDropModule` ni `ScrollingModule` aportan algo que Pointer Events +
13366
+ * `transform` no resuelvan mejor para un lienzo 2D con pan/zoom propio, y el
13367
+ * arrastre de nodos YA usaba Pointer Events nativos desde PR-C1 — "CDK
13368
+ * reservado a `ui/kanban/`"). Reemplaza el interior MÍNIMO del shell de
13369
+ * PR-C1 (render absoluto estático + líneas rectas, sin pan/zoom) por:
13370
+ * - **Pan/zoom del lienzo**: arrastrar el FONDO panea; rueda/pinch de dos
13371
+ * punteros hace zoom anclado al cursor/punto medio. Un único `transform:
13372
+ * translate(pan) scale(zoom)` sobre `.sol-flow-canvas__world` (grupo
13373
+ * interno que envuelve edges+nodos) — ver {@link worldTransform} y
13374
+ * `flow-canvas-viewport.ts` (puro, sin Angular). El pan/zoom es una
13375
+ * cuestión de VISTA, no de dominio — sigue activo en `readonly` (a
13376
+ * diferencia de arrastrar/conectar/quitar, que sí quedan bloqueados).
13377
+ * `overflow: hidden` (necesario para que rueda/pinch no peleen con el
13378
+ * scroll nativo) reemplaza el "scroll into view" gratis que traía
13379
+ * `overflow: auto` del shell de PR-C1 — {@link onNodeFocus} lo restituye
13380
+ * paneando (nunca zoom) hacia cualquier nodo que reciba foco (Tab) fuera
13381
+ * del área visible. La rueda/el pinch corren de forma INDEPENDIENTE de un
13382
+ * arrastre de nodo en curso — a propósito (C1, 4R Ola 5): ver el JSDoc de
13383
+ * {@link onNodePointerMove} para el porqué y el fix del bug asociado.
13384
+ * - **Aristas bezier**: curvas cúbicas con dirección horizontal (favorecen
13385
+ * el layout BFS-por-columnas de `flow-canvas-layout.ts`) en vez de líneas
13386
+ * rectas — ver `flow-canvas-edge-geometry.ts` (puro). El label de cada
13387
+ * arista se posiciona sobre el punto real de la curva (t=0.5), no sobre
13388
+ * el punto medio de una recta.
13389
+ * - **Tap-para-conectar refinado**: la MECÁNICA sigue siendo la de PR-C1
13390
+ * (arma origen → activa destino, API de eventos sin cambios) — el
13391
+ * refinamiento es puramente VISUAL: mientras está armado, los destinos
13392
+ * VÁLIDOS (sin auto-loop, sin duplicar una conexión existente, sin cerrar
13393
+ * un ciclo — ver `flow-canvas-connect.ts`, puro) se resaltan y una curva
13394
+ * FANTASMA sigue al cursor desde el nodo origen. Es un HINT visual, NUNCA
13395
+ * bloquea la conexión — el validador real de dominio (`entities/flow`,
13396
+ * fuera de esta librería agnóstica) sigue siendo la fuente de verdad.
13397
+ *
13398
+ * **PR-C4 (GOAL §4, móvil) — 3 hallazgos de auditoría + 2 adiciones**:
13399
+ * 1. **Pointer Events unificados**: auditado — CERO `mouse*`/`touch*` en
13400
+ * este componente (ni en `flow-canvas-viewport.ts`/`-connect.ts`/
13401
+ * `-edge-geometry.ts`/`-layout.ts`, ni en los widgets/página consumidores
13402
+ * de PR-C3) — el motor YA es 100% Pointer Events desde el bake-off
13403
+ * (C2B). Nada que unificar.
13404
+ * 2. **Targets ≥44px con hit-area invisible, zoom-invariante (CRITICAL +
13405
+ * WARNING corregidos en la re-auditoría 4R post PR-C4)**:
13406
+ * `.sol-flow-canvas__node-connect-handle` (28px→`--sol-flow-canvas-hit-
13407
+ * min` real, `align-self:center` para no estirarse con node-surface),
13408
+ * `.sol-flow-canvas__node-surface` (min-height:`--sol-flow-canvas-hit-
13409
+ * min`) y `.sol-flow-canvas__edge-remove` (`width`/`height` fijos a
13410
+ * `--sol-flow-canvas-hit-min`, margin negativo EXACTAMENTE igual y
13411
+ * opuesto por lado — el hijo sigue "pesando" 13×13px dentro del flex de
13412
+ * la píldora, el tamaño "de siempre", así que ésta no se agranda
13413
+ * visualmente) — los 3 alcanzan ≥44px FÍSICOS reales a CUALQUIER zoom
13414
+ * del rango (0.25x-2.5x, `flow-canvas-viewport.ts`), no solo a zoom=1:
13415
+ * `--sol-flow-canvas-zoom` (seteado en el binding del host) compensa el
13416
+ * `scale(zoom)` de `.sol-flow-canvas__world` — CRITICAL de la
13417
+ * re-auditoría: sin esta compensación, un piso de 44px CSS encogía a
13418
+ * ~22-29px FÍSICOS a ~0.5x (medido real con Playwright `boundingBox()`,
13419
+ * ver `e2e/flows/flows-mobile.spec.ts`, FLOW-E2E-M04/M05, y los tests de
13420
+ * `flow-canvas.component.spec.ts` que cubren el binding `--sol-flow-
13421
+ * canvas-zoom`).
13422
+ * 3. **Resaltado "solo válidos"**: auditado — el hint YA distingue
13423
+ * `--connect-valid-target` (resalta, borde+glow verde) de
13424
+ * `--connect-invalid-target` (SOLO atenúa, `opacity:0.45`, sin color
13425
+ * propio) desde PR-C2B/C3 — ya cumple el texto literal del GOAL
13426
+ * ("resaltan SOLO destinos válidos"). Sin cambio de CSS/lógica; el
13427
+ * aria-live del conteo (PR-C3) se conserva sin tocar.
13428
+ * 4. **Auto-layout siempre visible en móvil**: botón flotante nuevo
13429
+ * (`.sol-flow-canvas__auto-layout`, oculto en desktop vía
13430
+ * `@media (max-width:767px)`) que invoca `autoLayout()` — ver
13431
+ * {@link onAutoLayoutClick}.
13432
+ * 5. **Bottom sheet móvil**: vive en `sol-drawer` (variant `sheet`, nueva),
13433
+ * NO en este componente — `flow-node-editor-drawer` (boki-front) es
13434
+ * quien la activa.
13435
+ *
13436
+ * Interacciones (documentadas porque el GESTO concreto es decisión de cada
13437
+ * motor del bake-off — la suite de aceptación compartida prueba la API, no
13438
+ * el gesto):
13439
+ * - **Selección**: cada nodo es un `<button>` real — click nativo, y
13440
+ * Enter/Espacio manejados de forma EXPLÍCITA en `onNodeKeydown` (W6, 4R
13441
+ * Ola 5: NO se delega en la activación nativa del navegador sobre el
13442
+ * botón). Ambos caminos emiten `nodeSelected` de la MISMA forma.
13443
+ * - **Mover un nodo (mouse)**: `pointerdown`→`pointermove`→`pointerup`
13444
+ * sobre el nodo. El umbral clic-vs-arrastre ({@link DRAG_THRESHOLD_PX}) se
13445
+ * mide en PANTALLA (PR-C2B: precisión motora humana, zoom-invariante — NO
13446
+ * en espacio canvas, que sería más permisivo alejado y más estricto
13447
+ * acercado). Un `pointerdown` sobre un nodo NUNCA burbujea a convertirse
13448
+ * además en un pan de fondo (`stopPropagation` explícito). El delta de
13449
+ * pantalla→canvas se acumula por SEGMENTO con el zoom vigente de cada
13450
+ * `pointermove` (C1, 4R Ola 5) — un cambio de zoom a mitad de gesto (rueda
13451
+ * del mouse sostenido, o pinch de fondo concurrente) nunca corrompe el
13452
+ * tramo ya recorrido, ver {@link onNodePointerMove}.
13453
+ * - **Mover un nodo (teclado)**: flechas sobre el nodo enfocado — nudge de
13454
+ * {@link KEYBOARD_NUDGE_STEP_PX}px FIJOS en espacio canvas (el zoom NUNCA
13455
+ * afecta el paso — a11y: la navegación por teclado es predecible sin
13456
+ * importar cuánto esté acercado el lienzo).
13457
+ * - **Crear conexión**: cada nodo tiene un botón "conectar desde" — al
13458
+ * activarlo arma el origen; activar OTRO nodo completa la conexión
13459
+ * (`connectionCreated`). Activar el MISMO nodo, o `Escape`, cancela el
13460
+ * modo.
13461
+ * - **Quitar conexión**: botón "×" sobre la etiqueta de cada arista.
13462
+ * - **`readonly`**: oculta/deshabilita TODA mutación del GRAFO (arrastre,
13463
+ * nudge, conectar, quitar) — la selección y el pan/zoom siguen activos
13464
+ * (no son mutaciones del grafo).
13465
+ *
13466
+ * Espejo interno (`mirroredNodes`, mismo patrón que `sol-kanban-board`):
13467
+ * mantiene una copia propia de `nodes()`, re-sembrada en cada cambio del
13468
+ * input, mutada LOCALMENTE en cada interacción (feedback visual inmediato)
13469
+ * y SIEMPRE acompañada del output correspondiente para que el consumidor
13470
+ * persista.
13471
+ */
13472
+ class SolFlowCanvasComponent {
13473
+ i18n = inject(SOL_I18N);
13474
+ /** Tolera `null`/`undefined` (lección PR3/PR4 del resto de la lib): un input no garantiza un valor no-nulo en runtime. */
13475
+ nodes = input([], /* @ts-ignore */
13476
+ ...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
13477
+ edges = input([], /* @ts-ignore */
13478
+ ...(ngDevMode ? [{ debugName: "edges" }] : /* istanbul ignore next */ []));
13479
+ /**
13480
+ * Alias `readonly` (nombre público exacto que pide el contrato) — la
13481
+ * propiedad TS se llama `isReadonly` a propósito: `readonly` es palabra
13482
+ * reservada como MODIFICADOR de miembro de clase.
13483
+ */
13484
+ isReadonly = input(false, { ...(ngDevMode ? { debugName: "isReadonly" } : /* istanbul ignore next */ {}), alias: 'readonly' });
13485
+ selectedId = input(null, /* @ts-ignore */
13486
+ ...(ngDevMode ? [{ debugName: "selectedId" }] : /* istanbul ignore next */ []));
13487
+ highlightedNodeId = input(null, /* @ts-ignore */
13488
+ ...(ngDevMode ? [{ debugName: "highlightedNodeId" }] : /* istanbul ignore next */ []));
13489
+ /** Sin este, cada nodo cae a mostrar solo `label` (mismo patrón que `eventTemplate` de `sol-calendar-grid`). */
13490
+ nodeTemplate = input(null, /* @ts-ignore */
13491
+ ...(ngDevMode ? [{ debugName: "nodeTemplate" }] : /* istanbul ignore next */ []));
13492
+ nodeMoved = output();
13493
+ nodeSelected = output();
13494
+ connectionCreated = output();
13495
+ connectionRemoved = output();
13496
+ mirroredNodes = signal([], /* @ts-ignore */
13497
+ ...(ngDevMode ? [{ debugName: "mirroredNodes" }] : /* istanbul ignore next */ []));
13498
+ connectSourceId = signal(null, /* @ts-ignore */
13499
+ ...(ngDevMode ? [{ debugName: "connectSourceId" }] : /* istanbul ignore next */ []));
13500
+ announcement = signal('', /* @ts-ignore */
13501
+ ...(ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []));
13502
+ markerId = `sol-flow-canvas-arrow-${uniqueMarkerCounter++}`;
13503
+ /** Estado del viewport (pan/zoom) — PR-C2B. Es una cuestión de VISTA: nunca se bloquea en `readonly` ni se resetea cuando cambian `nodes()`/`edges()`. */
13504
+ viewport = signal(DEFAULT_VIEWPORT, /* @ts-ignore */
13505
+ ...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
13506
+ /** Posición (espacio world) del puntero mientras hay una conexión armada — alimenta la curva fantasma. `null` = sin curva que dibujar. */
13507
+ ghostPointerWorld = signal(null, /* @ts-ignore */
13508
+ ...(ngDevMode ? [{ debugName: "ghostPointerWorld" }] : /* istanbul ignore next */ []));
13509
+ /** Referencia al host `.sol-flow-canvas` — solo para medir su tamaño real (`getBoundingClientRect()`) en {@link onNodeFocus}/{@link canvasRelativePoint}, nunca para mutar el DOM a mano. */
13510
+ canvasHostRef = viewChild.required('canvasHost', /* @ts-ignore */
13511
+ ...(ngDevMode ? [{ debugName: "canvasHostRef" }] : /* istanbul ignore next */ []));
13512
+ dragState = null;
13513
+ lastGestureWasDrag = false;
13514
+ /** Punteros activos que arrancaron sobre el FONDO (nunca sobre un nodo — ver `stopPropagation` en {@link onNodePointerDown}) — 1 puntero = pan, 2 = pinch. */
13515
+ backgroundPointers = new Map();
13516
+ nodesById = computed(() => new Map(this.mirroredNodes().map((node) => [node.id, node])), /* @ts-ignore */
13517
+ ...(ngDevMode ? [{ debugName: "nodesById" }] : /* istanbul ignore next */ []));
13518
+ visibleEdges = computed(() => {
13519
+ const byId = this.nodesById();
13520
+ return (this.edges() ?? []).filter((edge) => !!edge && byId.has(edge.sourceId) && byId.has(edge.targetId));
13521
+ }, /* @ts-ignore */
13522
+ ...(ngDevMode ? [{ debugName: "visibleEdges" }] : /* istanbul ignore next */ []));
13523
+ /** Destinos válidos del origen armado (sin auto-loop, sin duplicar, sin cerrar un ciclo — ver `flow-canvas-connect.ts`). Set vacío sin conexión armada. */
13524
+ validConnectTargetIds = computed(() => {
13525
+ const sourceId = this.connectSourceId();
13526
+ if (sourceId === null)
13527
+ return new Set();
13528
+ return computeValidConnectionTargets(this.mirroredNodes(), this.visibleEdges(), sourceId);
13529
+ }, /* @ts-ignore */
13530
+ ...(ngDevMode ? [{ debugName: "validConnectTargetIds" }] : /* istanbul ignore next */ []));
13531
+ /** `translate(pan) scale(zoom)` — mismo criterio que `flow-canvas-viewport.ts::worldToScreen` (world se escala primero, se traslada después). */
13532
+ worldTransform = computed(() => {
13533
+ const vp = this.viewport();
13534
+ return `translate(${vp.panX}px, ${vp.panY}px) scale(${vp.zoom})`;
13535
+ }, /* @ts-ignore */
13536
+ ...(ngDevMode ? [{ debugName: "worldTransform" }] : /* istanbul ignore next */ []));
13537
+ nodeIdFrequency = computed(() => countNodeIds(this.mirroredNodes()), /* @ts-ignore */
13538
+ ...(ngDevMode ? [{ debugName: "nodeIdFrequency" }] : /* istanbul ignore next */ []));
13539
+ edgeIdFrequency = computed(() => countEdgeIds(this.visibleEdges()), /* @ts-ignore */
13540
+ ...(ngDevMode ? [{ debugName: "edgeIdFrequency" }] : /* istanbul ignore next */ []));
13541
+ constructor() {
13542
+ effect(() => {
13543
+ const incoming = (this.nodes() ?? []).filter((node) => !!node);
13544
+ this.mirroredNodes.set(incoming);
13545
+ });
13546
+ // W1+W2 (4R Ola 5, heredado de PR-C1): un flip de `readonly` a mitad de gesto cancela CUALQUIER
13547
+ // mutación en curso — revierte el drag SIN emitir y desarma "conectar" (curva fantasma incluida,
13548
+ // PR-C2B). El pan/zoom NUNCA se toca acá — no es una mutación del grafo (ver docstring de la clase).
13549
+ effect(() => {
13550
+ if (!this.isReadonly())
13551
+ return;
13552
+ const hadActiveGesture = this.dragState !== null || untracked(() => this.connectSourceId()) !== null;
13553
+ this.dragState = null;
13554
+ this.disarmConnect();
13555
+ if (hadActiveGesture)
13556
+ this.announce('shared.flowCanvas.moveCancelledAnnouncement');
13557
+ });
13558
+ }
13559
+ trackNode(node, index) {
13560
+ return safeTrackKey(node?.id, index, this.nodeIdFrequency());
13561
+ }
13562
+ /** Fallback anti-NG0955 para edges — mismo patrón que {@link trackNode}. */
13563
+ trackEdge(edge, index) {
13564
+ return safeTrackKey(edge?.id, index, this.edgeIdFrequency());
13565
+ }
13566
+ isSelected(node) {
13567
+ return this.selectedId() === node.id;
13568
+ }
13569
+ isHighlighted(node) {
13570
+ return this.highlightedNodeId() === node.id;
13571
+ }
13572
+ isValidConnectTarget(node) {
13573
+ return this.connectSourceId() !== null && this.validConnectTargetIds().has(node.id);
13574
+ }
13575
+ /** El origen armado NUNCA es "inválido" (ya tiene su propio estilo vía `--connect-source`) — solo los DEMÁS nodos no-válidos se atenúan. */
13576
+ isInvalidConnectTarget(node) {
13577
+ const sourceId = this.connectSourceId();
13578
+ if (sourceId === null || sourceId === node.id)
13579
+ return false;
13580
+ return !this.validConnectTargetIds().has(node.id);
13581
+ }
13582
+ hasValidPosition(node) {
13583
+ const position = node?.position;
13584
+ return !!position && Number.isFinite(position.x) && Number.isFinite(position.y);
13585
+ }
13586
+ resolvedPosition(node) {
13587
+ // W4 (4R Ola 5): clamp en el PUNTO DE LECTURA — mantiene `dragState.currentPosition` sin transformar.
13588
+ if (this.dragState && this.dragState.nodeId === node.id)
13589
+ return clampPosition(this.dragState.currentPosition);
13590
+ if (this.hasValidPosition(node))
13591
+ return clampPosition(node.position);
13592
+ return { x: 0, y: 0 };
13593
+ }
13594
+ nodeCenter(node) {
13595
+ const position = this.resolvedPosition(node);
13596
+ return { x: position.x + NODE_WIDTH_PX / 2, y: position.y + NODE_HEIGHT_PX / 2 };
13597
+ }
13598
+ /** Atributo `d` de la curva bezier de una arista — ver `flow-canvas-edge-geometry.ts` (puro). Extremos ausentes → sin curva (mismo criterio de robustez que `visibleEdges()`, defensivo aunque `visibleEdges()` ya filtra). */
13599
+ edgePathD(edge) {
13600
+ const byId = this.nodesById();
13601
+ const source = byId.get(edge.sourceId);
13602
+ const target = byId.get(edge.targetId);
13603
+ if (!source || !target)
13604
+ return '';
13605
+ return computeEdgePathD(this.nodeCenter(source), this.nodeCenter(target));
13606
+ }
13607
+ /** Punto SOBRE la curva bezier (t=0.5) para el label de la arista — reemplaza el punto medio de la recta del shell de PR-C1. */
13608
+ edgeMidpoint(edge) {
13609
+ const byId = this.nodesById();
13610
+ const source = byId.get(edge.sourceId);
13611
+ const target = byId.get(edge.targetId);
13612
+ if (!source || !target)
13613
+ return { x: 0, y: 0 };
13614
+ return computeEdgeMidpoint(this.nodeCenter(source), this.nodeCenter(target));
13615
+ }
13616
+ /** Curva fantasma (origen armado → cursor) mientras hay una conexión en curso — `null` esconde el `@if` del template. */
13617
+ ghostEdgePathD() {
13618
+ const sourceId = this.connectSourceId();
13619
+ const pointerWorld = this.ghostPointerWorld();
13620
+ if (sourceId === null || pointerWorld === null)
13621
+ return null;
13622
+ const source = this.nodesById().get(sourceId);
13623
+ if (!source)
13624
+ return null;
13625
+ return computeEdgePathD(this.nodeCenter(source), pointerWorld);
13626
+ }
13627
+ nodeTemplateContext(node) {
13628
+ return { $implicit: node, node, selected: this.isSelected(node), highlighted: this.isHighlighted(node) };
13629
+ }
13630
+ // --- i18n (claves reales en boki-front/src/assets/i18n/es-CO.json bajo shared.flowCanvas.*) ---
13631
+ regionLabel() {
13632
+ this.i18n.activeLang();
13633
+ return this.i18n.translate('shared.flowCanvas.regionLabel');
13634
+ }
13635
+ nodeAriaLabel(node) {
13636
+ this.i18n.activeLang();
13637
+ return this.i18n.translate('shared.flowCanvas.nodeAriaLabel', { label: node.label });
13638
+ }
13639
+ connectFromLabel(node) {
13640
+ this.i18n.activeLang();
13641
+ return this.i18n.translate('shared.flowCanvas.connectFromLabel', { label: node.label });
13642
+ }
13643
+ removeConnectionLabel() {
13644
+ this.i18n.activeLang();
13645
+ return this.i18n.translate('shared.flowCanvas.removeConnectionLabel');
13646
+ }
13647
+ autoLayoutButtonLabel() {
13648
+ this.i18n.activeLang();
13649
+ return this.i18n.translate('shared.flowCanvas.autoLayoutButton');
13650
+ }
13651
+ autoLayoutButtonAriaLabel() {
13652
+ this.i18n.activeLang();
13653
+ return this.i18n.translate('shared.flowCanvas.autoLayoutButtonAriaLabel');
13654
+ }
13655
+ // --- selección / conectar ---
13656
+ onNodeActivate(node) {
13657
+ if (this.lastGestureWasDrag) {
13658
+ this.lastGestureWasDrag = false;
13659
+ return;
13660
+ }
13661
+ const source = this.connectSourceId();
13662
+ if (source !== null) {
13663
+ this.disarmConnect();
13664
+ // W1+W2 (4R Ola 5): guard extra de isReadonly() — el effect del constructor ya desarma
13665
+ // connectSourceId al flipear a readonly, este guard cubre la ventana síncrona previa a que corra.
13666
+ if (source !== node.id && !this.isReadonly()) {
13667
+ this.connectionCreated.emit({ sourceId: source, targetId: node.id });
13668
+ this.announce('shared.flowCanvas.connectionCreatedAnnouncement', { source, target: node.id });
13669
+ return;
13670
+ }
13671
+ // Activar el MISMO nodo que armó "conectar" (o un flip a readonly a mitad de gesto) cancela el modo y cae a selección normal.
13672
+ }
13673
+ this.nodeSelected.emit({ id: node.id });
13674
+ }
13675
+ /**
13676
+ * PR-C3 (GOAL §4, "señal accesible del hint de destinos válidos"): el
13677
+ * anuncio `aria-live` incluye la CANTIDAD de destinos válidos junto con el
13678
+ * origen — sin esto, el resaltado visual (`--connect-valid-target`/
13679
+ * `--connect-invalid-target`) es invisible para un lector de pantalla
13680
+ * (deuda documentada en `EVALUACION-MOTORES.md`: "gap de a11y del hint,
13681
+ * documentado, no silencioso"). `validConnectTargetIds()` se lee DESPUÉS
13682
+ * de fijar `connectSourceId` — los signals de Angular se recalculan de
13683
+ * forma síncrona a la lectura, no hace falta esperar un tick.
13684
+ */
13685
+ onStartConnect(node, event) {
13686
+ event.stopPropagation();
13687
+ if (this.isReadonly())
13688
+ return;
13689
+ this.connectSourceId.set(node.id);
13690
+ const validTargetCount = this.validConnectTargetIds().size;
13691
+ this.announce('shared.flowCanvas.connectArmedAnnouncement', { label: node.label, count: validTargetCount });
13692
+ }
13693
+ cancelConnect() {
13694
+ this.disarmConnect();
13695
+ }
13696
+ /** Desarma "conectar" (cancelar/completar/flip a readonly) — SIEMPRE limpia también la curva fantasma, mismo criterio en los 3 casos (PR-C2B). */
13697
+ disarmConnect() {
13698
+ this.connectSourceId.set(null);
13699
+ this.ghostPointerWorld.set(null);
13700
+ }
13701
+ onRemoveConnection(edge) {
13702
+ if (this.isReadonly())
13703
+ return;
13704
+ this.connectionRemoved.emit({ id: edge.id });
13705
+ this.announce('shared.flowCanvas.connectionRemovedAnnouncement');
13706
+ }
13707
+ // --- arrastre por mouse (pointer events nativos — CDK evaluado y descartado, ver docstring de la clase) ---
13708
+ onNodePointerDown(node, event) {
13709
+ // PR-C2B: un pointerdown sobre un nodo NUNCA debe además arrancar un pan de fondo — incondicional,
13710
+ // incluso si el resto del método corta abajo por readonly/drag-ya-activo (mismo comportamiento sea
13711
+ // cual sea el modo, en vez de que readonly "degrade" sorpresivamente el gesto a un pan).
13712
+ event.stopPropagation();
13713
+ if (this.isReadonly())
13714
+ return;
13715
+ // C1 (4R Ola 5): un drag YA activo (de OTRO puntero, sobre el mismo nodo o uno distinto) ignora por
13716
+ // completo un segundo pointerdown — el primer puntero en arrancar gana, nunca se corrompe/reasigna.
13717
+ if (this.dragState)
13718
+ return;
13719
+ const target = event.currentTarget;
13720
+ target.focus();
13721
+ target.setPointerCapture?.(event.pointerId);
13722
+ const start = this.resolvedPosition(node);
13723
+ this.dragState = {
13724
+ nodeId: node.id,
13725
+ pointerId: event.pointerId,
13726
+ startPointer: { x: event.clientX, y: event.clientY },
13727
+ lastPointer: { x: event.clientX, y: event.clientY },
13728
+ startPosition: start,
13729
+ currentPosition: start,
13730
+ };
13731
+ }
13732
+ /**
13733
+ * C1 (4R Ola 5) — fix del bug "zoom a mitad de drag corrompe la posición": acumula el delta de
13734
+ * PANTALLA por SEGMENTO (desde {@link DragState.lastPointer}, nunca desde `startPointer`) y lo
13735
+ * convierte con el zoom VIGENTE en CADA `pointermove` — nunca con el zoom final. Es matemáticamente
13736
+ * correcto bajo CUALQUIER secuencia de zooms durante el drag: si el zoom cambia a mitad de gesto
13737
+ * (rueda del mouse con el puntero sostenido, o pinch de fondo concurrente — {@link onCanvasWheel} y
13738
+ * `applyPinchMove` NUNCA consultan `dragState`, a propósito), el segmento YA acumulado con el zoom
13739
+ * viejo queda intacto; solo el segmento SIGUIENTE usa el zoom nuevo.
13740
+ *
13741
+ * Alternativa descartada — "zoom exclusivo del gesto" (bloquear wheel/pinch mientras `dragState !=
13742
+ * null`): más simple de implementar, pero degrada la UX — un usuario que sostiene un nodo y gira la
13743
+ * rueda (trackpad, gesto accidental o intencional) esperaría que el zoom siga respondiendo, igual que
13744
+ * en Figma/n8n. La solución incremental preserva esa expectativa sin sacrificar corrección, al costo
13745
+ * de un campo extra (`lastPointer`) en `DragState`.
13746
+ *
13747
+ * (Bug pre-fix: `dx = (event.clientX - state.startPointer.x) / zoomVigente` dividía el delta TOTAL de
13748
+ * pantalla desde el INICIO del drag por el zoom ACTUAL — si el zoom cambiaba a mitad de gesto, el
13749
+ * tramo ya recorrido bajo el zoom viejo se re-escalaba retroactivamente y el nodo "saltaba" visualmente
13750
+ * al soltar/commitear. Ver el test "zoom a mitad de drag" en flow-canvas.component.spec.ts, que
13751
+ * documenta el valor corrupto exacto que producía el código anterior.)
13752
+ */
13753
+ onNodePointerMove(node, event) {
13754
+ const state = this.dragState;
13755
+ // C1: solo el puntero DUEÑO del drag, sobre SU nodo, puede mutar dragState — un puntero/nodo ajeno no hace nada.
13756
+ if (!state || state.pointerId !== event.pointerId || state.nodeId !== node.id)
13757
+ return;
13758
+ if (this.isReadonly())
13759
+ return; // W1+W2: ventana síncrona previa a que el effect del constructor revierta
13760
+ // PR-C2B: conversión de coordenadas pantalla→canvas — un delta de PANTALLA (`clientX/Y`) representa
13761
+ // menos distancia real en el canvas cuanto más acercado está el zoom (a 2x, 40px de pantalla = 20px
13762
+ // de canvas). Dividir por `zoom` es la operación inversa exacta del `scale(zoom)` del transform del
13763
+ // mundo — ver `screenToWorld`/`worldToScreen` en flow-canvas-viewport.ts.
13764
+ const zoom = this.viewport().zoom;
13765
+ const currentPointer = { x: event.clientX, y: event.clientY };
13766
+ const dx = (currentPointer.x - state.lastPointer.x) / zoom;
13767
+ const dy = (currentPointer.y - state.lastPointer.y) / zoom;
13768
+ this.dragState = {
13769
+ ...state,
13770
+ lastPointer: currentPointer,
13771
+ currentPosition: { x: state.currentPosition.x + dx, y: state.currentPosition.y + dy },
13772
+ };
13773
+ }
13774
+ onNodePointerUp(node, event) {
13775
+ const state = this.dragState;
13776
+ // C1: el up de un puntero/nodo AJENO nunca toca el drag activo (ni lo limpia ni lo commitea).
13777
+ if (!state || state.pointerId !== event.pointerId || state.nodeId !== node.id)
13778
+ return;
13779
+ this.dragState = null;
13780
+ event.currentTarget.releasePointerCapture?.(event.pointerId);
13781
+ if (this.isReadonly())
13782
+ return; // W1+W2: ventana síncrona previa a que el effect del constructor revierta — no commitea
13783
+ // PR-C2B: el umbral clic-vs-arrastre se mide en PANTALLA (`event.clientX/Y` crudos contra
13784
+ // `state.startPointer`, ambos en espacio pantalla), NUNCA en espacio canvas — es una cuestión de
13785
+ // precisión motora HUMANA (cuánto tiembla un dedo/mouse en píxeles de pantalla), zoom-invariante por
13786
+ // definición. Medirlo en canvas haría el umbral más permisivo alejado (jitter mínimo ya cruzaría 4px
13787
+ // de canvas) y más estricto acercado — ambos efectos indeseados que esta medición evita por completo.
13788
+ const screenDistance = Math.hypot(event.clientX - state.startPointer.x, event.clientY - state.startPointer.y);
13789
+ if (screenDistance < dragThresholdFor(event))
13790
+ return; // sin desplazamiento real: el click nativo que sigue resuelve selección/conexión (PR-C4: umbral touch-aware, ver dragThresholdFor)
13791
+ this.lastGestureWasDrag = true;
13792
+ this.commitNodePosition(node, state.currentPosition); // commitNodePosition clampea a coordenadas no negativas (W4)
13793
+ }
13794
+ /**
13795
+ * `pointercancel`/`lostpointercapture` (W3+W5, 4R Ola 5) — SIEMPRE revierte, NUNCA commitea.
13796
+ */
13797
+ onNodePointerCancel(node, event) {
13798
+ const state = this.dragState;
13799
+ if (!state || state.pointerId !== event.pointerId || state.nodeId !== node.id)
13800
+ return; // C1: puntero/nodo ajeno, no toca el drag activo
13801
+ this.dragState = null;
13802
+ event.currentTarget.releasePointerCapture?.(event.pointerId);
13803
+ this.announce('shared.flowCanvas.moveCancelledAnnouncement');
13804
+ }
13805
+ // --- nudge por teclado (paridad a11y) ---
13806
+ /**
13807
+ * El paso ({@link KEYBOARD_NUDGE_STEP_PX}) es SIEMPRE canvas-space, nunca se escala por zoom (PR-C2B,
13808
+ * a11y): la navegación por teclado representa "cuánto se movió el DATO", igual que el nudge del mouse
13809
+ * commitea en canvas-space — el zoom es puramente una cuestión de VISTA y no debe alterar cuánto se
13810
+ * mueve un nodo por cada pulsación de flecha (impredecible para un usuario de teclado si dependiera del
13811
+ * zoom vigente).
13812
+ */
13813
+ onNodeKeydown(node, event) {
13814
+ if (event.key === 'Enter' || event.key === ' ') {
13815
+ event.preventDefault();
13816
+ this.onNodeActivate(node);
13817
+ return;
13818
+ }
13819
+ if (this.isReadonly())
13820
+ return;
13821
+ const delta = ARROW_KEY_DELTA[event.key];
13822
+ if (!delta)
13823
+ return;
13824
+ event.preventDefault();
13825
+ const current = this.resolvedPosition(node);
13826
+ this.commitNodePosition(node, {
13827
+ x: current.x + delta.x * KEYBOARD_NUDGE_STEP_PX,
13828
+ y: current.y + delta.y * KEYBOARD_NUDGE_STEP_PX,
13829
+ });
13830
+ }
13831
+ /**
13832
+ * `(focus)` de un nodo (Tab, o `target.focus()` explícito en
13833
+ * {@link onNodePointerDown}) — panea el lienzo lo justo para que el nodo
13834
+ * recién enfocado quede visible, NUNCA cambia el zoom (ver
13835
+ * {@link panToRevealWorldRect}, puro).
13836
+ *
13837
+ * Motivación (PR-C2B, W-fix de a11y): el shell de PR-C1 usaba
13838
+ * `overflow: auto` — el navegador hacía "scroll into view" GRATIS cuando el
13839
+ * foco (Tab) llegaba a un nodo fuera del área visible. Este motor reemplaza
13840
+ * ese scroll nativo por `overflow: hidden` + `transform` (pan/zoom propio,
13841
+ * necesario para que la rueda/pinch funcionen sin pelear con el scroll del
13842
+ * navegador) — sin este método, Tab movería el foco LÓGICO sin revelarlo
13843
+ * VISUALMENTE, una regresión real de accesibilidad que este PR introduciría
13844
+ * en silencio si no se corrigiera acá.
13845
+ */
13846
+ onNodeFocus(node) {
13847
+ const hostEl = this.canvasHostRef().nativeElement;
13848
+ const rect = hostEl.getBoundingClientRect();
13849
+ const position = this.resolvedPosition(node);
13850
+ const worldRect = { x: position.x, y: position.y, width: NODE_WIDTH_PX, height: NODE_HEIGHT_PX };
13851
+ this.viewport.update((vp) => panToRevealWorldRect(vp, worldRect, { width: rect.width, height: rect.height }));
13852
+ }
13853
+ commitNodePosition(node, position) {
13854
+ const clamped = clampPosition(position); // W4: ningún commit (arrastre o nudge) puede dejar coordenadas negativas
13855
+ this.mirroredNodes.update((nodes) => nodes.map((n) => (n.id === node.id ? { ...n, position: clamped } : n)));
13856
+ this.nodeMoved.emit({ id: node.id, position: clamped });
13857
+ this.announce('shared.flowCanvas.movedAnnouncement', { label: node.label });
13858
+ }
13859
+ announce(key, params) {
13860
+ this.i18n.activeLang();
13861
+ this.announcement.set(this.i18n.translate(key, params));
13862
+ }
13863
+ // --- pan/zoom del lienzo (PR-C2B — ver flow-canvas-viewport.ts, puro) ---
13864
+ /*
13865
+ * W1 (4R Ola 5, deuda DOCUMENTADA — NO implementada en este ciclo; el refactor de gestos ya está
13866
+ * agendado para PR-C3, cuando este componente (904L, 5 responsabilidades) se divida): los handlers de
13867
+ * ESTA sección ({@link onCanvasPointerMove}, {@link onCanvasWheel}, {@link applyPinchMove}) son de alta
13868
+ * frecuencia — un `pointermove`/`wheel` de usuario puede disparar decenas por segundo — y cada uno
13869
+ * escribe el signal `viewport`/`ghostPointerWorld` SIN agrupar (batch) los eventos del mismo frame.
13870
+ * Candidato a coalescing con `requestAnimationFrame` en ese refactor. Línea base medida hoy (smoke
13871
+ * sobre jsdom, NO paint/compositing real de navegador): ~5.3ms/100 eventos de pan sostenido sobre 60
13872
+ * nodos — ver el test "línea base — 100 pointermove..." en flow-canvas.component.spec.ts.
13873
+ */
13874
+ /**
13875
+ * Arranca el seguimiento de un puntero de FONDO — nunca se dispara para un puntero que arrancó sobre un
13876
+ * nodo (`stopPropagation` en {@link onNodePointerDown}) ni sobre el botón "conectar desde"/"×" (sin
13877
+ * listener de pointerdown propio, así que si el `pointerup` llega casi de inmediato el pan resultante es
13878
+ * ~(0,0), inofensivo — el `click` que resuelve esos botones es un evento aparte, no lo interfiere esto).
13879
+ */
13880
+ onCanvasPointerDown(event) {
13881
+ const target = event.currentTarget;
13882
+ target.setPointerCapture?.(event.pointerId);
13883
+ this.backgroundPointers.set(event.pointerId, { x: event.clientX, y: event.clientY });
13884
+ }
13885
+ onCanvasPointerMove(event) {
13886
+ const current = { x: event.clientX, y: event.clientY };
13887
+ if (this.backgroundPointers.has(event.pointerId)) {
13888
+ if (this.backgroundPointers.size >= 2) {
13889
+ this.applyPinchMove(event.pointerId, current, event);
13890
+ }
13891
+ else {
13892
+ const previous = this.backgroundPointers.get(event.pointerId);
13893
+ this.backgroundPointers.set(event.pointerId, current);
13894
+ const delta = { x: current.x - previous.x, y: current.y - previous.y };
13895
+ this.viewport.update((vp) => panBy(vp, delta));
13896
+ }
13897
+ }
13898
+ // Curva fantasma: sigue al puntero mientras haya una conexión armada, sin importar si ESTE puntero
13899
+ // también está paneando/pinchando (solapamiento raro en uso real — inofensivo dejarlo actualizar igual).
13900
+ if (this.connectSourceId() !== null) {
13901
+ this.ghostPointerWorld.set(screenToWorld(this.viewport(), this.canvasRelativePoint(current, event)));
13902
+ }
13903
+ }
13904
+ onCanvasPointerUp(event) {
13905
+ this.backgroundPointers.delete(event.pointerId);
13906
+ event.currentTarget.releasePointerCapture?.(event.pointerId);
13907
+ }
13908
+ onCanvasPointerCancel(event) {
13909
+ this.backgroundPointers.delete(event.pointerId);
13910
+ }
13911
+ /**
13912
+ * Corre de forma INDEPENDIENTE de {@link dragState} — a propósito (C1, 4R Ola 5): el zoom sigue
13913
+ * respondiendo aunque haya un nodo siendo arrastrado. {@link onNodePointerMove} acumula su delta POR
13914
+ * SEGMENTO con el zoom vigente en cada momento, así que un cambio de zoom a mitad de gesto nunca
13915
+ * corrompe la posición ya recorrida — ver su JSDoc para el fix completo.
13916
+ */
13917
+ onCanvasWheel(event) {
13918
+ event.preventDefault(); // repropone la rueda como zoom del lienzo — nunca debe además hacer scroll de la página
13919
+ const anchor = this.canvasRelativePoint({ x: event.clientX, y: event.clientY }, event);
13920
+ this.viewport.update((vp) => computeWheelZoom(vp, event.deltaY, anchor));
13921
+ }
13922
+ /**
13923
+ * Segundo puntero de fondo activo → pinch. La distancia PREVIA se lee ANTES de sobrescribir la posición
13924
+ * de `pointerId` en el mapa (si no, "previa" y "actual" serían el mismo valor) — la razón entre ambas
13925
+ * distancias es el factor de zoom INCREMENTAL de este solo `pointermove` (se compone con el siguiente
13926
+ * `pointermove` del otro puntero, no hace falta recordar la distancia "inicial" del pinch completo).
13927
+ *
13928
+ * Corre de forma INDEPENDIENTE de {@link dragState} — a propósito (C1, 4R Ola 5, mismo criterio que
13929
+ * {@link onCanvasWheel}): un pinch de fondo (dos punteros AJENOS al que arrastra un nodo) sigue
13930
+ * zoomeando sin corromper el drag activo — ver el JSDoc de {@link onNodePointerMove}.
13931
+ */
13932
+ applyPinchMove(pointerId, current, event) {
13933
+ const otherEntry = [...this.backgroundPointers.entries()].find(([id]) => id !== pointerId);
13934
+ if (!otherEntry)
13935
+ return; // defensivo — no debería ocurrir con size>=2, pero nunca lanzar por esto
13936
+ const [, otherPosition] = otherEntry;
13937
+ const previousPosition = this.backgroundPointers.get(pointerId);
13938
+ const previousDistance = distanceBetween(previousPosition, otherPosition);
13939
+ const currentDistance = distanceBetween(current, otherPosition);
13940
+ const anchor = this.canvasRelativePoint(midpoint(current, otherPosition), event);
13941
+ this.backgroundPointers.set(pointerId, current);
13942
+ this.viewport.update((vp) => computePinchZoom(vp, previousDistance, currentDistance, anchor));
13943
+ }
13944
+ /** `clientX/Y` (pantalla del navegador) → "screen" relativo al host `.sol-flow-canvas` (resta `getBoundingClientRect()`), la convención que espera `flow-canvas-viewport.ts`. */
13945
+ canvasRelativePoint(clientPoint, event) {
13946
+ const rect = event.currentTarget.getBoundingClientRect();
13947
+ return { x: clientPoint.x - rect.left, y: clientPoint.y - rect.top };
13948
+ }
13949
+ /**
13950
+ * Calcula y aplica una posición a TODO nodo actual sin `position` válido
13951
+ * usando {@link computeAutoLayoutPositions} (dagre real, PR-C3 — con
13952
+ * fallback BFS síncrono si el chunk lazy falla, ver W2 en
13953
+ * `flow-canvas-layout.ts`). Los nodos YA posicionados NO se tocan. Emite
13954
+ * `nodeMoved` por cada nodo repositionado. Opera 100% en espacio CANVAS
13955
+ * (igual que `node.position` siempre) — el pan/zoom vigente NUNCA entra en
13956
+ * este cálculo, no hay conversión de coordenadas que hacer acá (a
13957
+ * diferencia del arrastre, que sí consume `clientX/Y` de pantalla).
13958
+ *
13959
+ * No-op si `isReadonly()` es `true` (S1, 4R Ola 5).
13960
+ *
13961
+ * **W3 (4R Ola 5 post PR-C3, fuga de bundle) — CAMBIO DE CONTRATO
13962
+ * DELIBERADO**: pasa de síncrono a `Promise<void>` porque
13963
+ * `computeAutoLayoutPositions` ahora carga `@dagrejs/dagre` vía `import()`
13964
+ * dinámico (el módulo entero se saca del chunk eager, no solo la
13965
+ * instancia — ver docstring de `flow-canvas-layout.ts`). Consumidores
13966
+ * existentes que llamaban `autoLayout()` de forma "fire-and-forget" (el
13967
+ * effect de `pages/flows`) siguen funcionando sin `await` — el nodo queda
13968
+ * sin posición hasta que la promesa resuelve, que es exactamente el mismo
13969
+ * intervalo que antes tomaba el cálculo síncrono, solo que ahora incluye
13970
+ * la carga del chunk la PRIMERA vez.
13971
+ */
13972
+ /**
13973
+ * PR-C4 (GOAL §4 punto 5) — dispara `autoLayout()` desde el botón flotante
13974
+ * SIEMPRE visible en móvil (`@if (!isReadonly())` en el template ya cubre
13975
+ * el guard de solo-lectura; este método solo existe para darle un nombre
13976
+ * de evento propio al `(click)`, fire-and-forget igual que el efecto de
13977
+ * `pages/flows` que ya invoca `autoLayout()` sin `await`).
13978
+ */
13979
+ onAutoLayoutClick() {
13980
+ void this.autoLayout();
13981
+ }
13982
+ async autoLayout() {
13983
+ if (this.isReadonly())
13984
+ return;
13985
+ const current = this.mirroredNodes();
13986
+ const pending = current.filter((node) => !this.hasValidPosition(node));
13987
+ if (pending.length === 0)
13988
+ return;
13989
+ const computed = await computeAutoLayoutPositions(current, this.edges() ?? []);
13990
+ const updates = [];
13991
+ this.mirroredNodes.update((nodes) => nodes.map((node) => {
13992
+ if (this.hasValidPosition(node))
13993
+ return node;
13994
+ const position = computed.get(node.id);
13995
+ if (!position)
13996
+ return node;
13997
+ updates.push({ id: node.id, position });
13998
+ return { ...node, position };
13999
+ }));
14000
+ for (const update of updates)
14001
+ this.nodeMoved.emit(update);
14002
+ }
14003
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolFlowCanvasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14004
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolFlowCanvasComponent, isStandalone: true, selector: "sol-flow-canvas", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, edges: { classPropertyName: "edges", publicName: "edges", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, highlightedNodeId: { classPropertyName: "highlightedNodeId", publicName: "highlightedNodeId", isSignal: true, isRequired: false, transformFunction: null }, nodeTemplate: { classPropertyName: "nodeTemplate", publicName: "nodeTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeMoved: "nodeMoved", nodeSelected: "nodeSelected", connectionCreated: "connectionCreated", connectionRemoved: "connectionRemoved" }, viewQueries: [{ propertyName: "canvasHostRef", first: true, predicate: ["canvasHost"], descendants: true, isSignal: true }], ngImport: i0, template: `
14005
+ <div
14006
+ #canvasHost
14007
+ class="sol-flow-canvas"
14008
+ role="application"
14009
+ [attr.aria-label]="regionLabel()"
14010
+ [style.--sol-flow-canvas-zoom]="viewport().zoom"
14011
+ (keydown.escape)="cancelConnect()"
14012
+ (pointerdown)="onCanvasPointerDown($event)"
14013
+ (pointermove)="onCanvasPointerMove($event)"
14014
+ (pointerup)="onCanvasPointerUp($event)"
14015
+ (pointercancel)="onCanvasPointerCancel($event)"
14016
+ (lostpointercapture)="onCanvasPointerCancel($event)"
14017
+ (wheel)="onCanvasWheel($event)"
14018
+ >
14019
+ <div class="sol-flow-canvas__world" [style.transform]="worldTransform()">
14020
+ <svg class="sol-flow-canvas__edges" aria-hidden="true">
14021
+ <defs>
14022
+ <marker
14023
+ [attr.id]="markerId"
14024
+ markerWidth="8"
14025
+ markerHeight="8"
14026
+ refX="7"
14027
+ refY="4"
14028
+ orient="auto-start-reverse"
14029
+ >
14030
+ <path d="M0,0 L8,4 L0,8 Z" class="sol-flow-canvas__edge-arrow" />
14031
+ </marker>
14032
+ </defs>
14033
+ @for (edge of visibleEdges(); track trackEdge(edge, $index)) {
14034
+ <path
14035
+ class="sol-flow-canvas__edge-line"
14036
+ [attr.d]="edgePathD(edge)"
14037
+ [attr.marker-end]="'url(#' + markerId + ')'"
14038
+ />
14039
+ }
14040
+ @if (ghostEdgePathD(); as ghostD) {
14041
+ <path class="sol-flow-canvas__edge-ghost" [attr.d]="ghostD" [attr.marker-end]="'url(#' + markerId + ')'" />
14042
+ }
14043
+ </svg>
14044
+
14045
+ @for (edge of visibleEdges(); track trackEdge(edge, $index)) {
14046
+ <div class="sol-flow-canvas__edge-label" [style.left.px]="edgeMidpoint(edge).x" [style.top.px]="edgeMidpoint(edge).y">
14047
+ <span class="sol-flow-canvas__edge-label-text">{{ edge.label ?? edge.kind }}</span>
14048
+ @if (!isReadonly()) {
14049
+ <button
14050
+ type="button"
14051
+ class="sol-flow-canvas__edge-remove"
14052
+ [attr.aria-label]="removeConnectionLabel()"
14053
+ (click)="onRemoveConnection(edge)"
14054
+ >
14055
+ ×
14056
+ </button>
14057
+ }
14058
+ </div>
14059
+ }
14060
+
14061
+ @for (node of mirroredNodes(); track trackNode(node, $index)) {
14062
+ <div
14063
+ class="sol-flow-canvas__node"
14064
+ [class.sol-flow-canvas__node--selected]="isSelected(node)"
14065
+ [class.sol-flow-canvas__node--highlighted]="isHighlighted(node)"
14066
+ [class.sol-flow-canvas__node--connect-source]="connectSourceId() === node.id"
14067
+ [class.sol-flow-canvas__node--connect-valid-target]="isValidConnectTarget(node)"
14068
+ [class.sol-flow-canvas__node--connect-invalid-target]="isInvalidConnectTarget(node)"
14069
+ [attr.data-visual-state]="node.visualState ?? 'idle'"
14070
+ [attr.data-testid]="'flow-canvas-node-' + node.id"
14071
+ [style.left.px]="resolvedPosition(node).x"
14072
+ [style.top.px]="resolvedPosition(node).y"
14073
+ >
14074
+ <button
14075
+ type="button"
14076
+ class="sol-flow-canvas__node-surface"
14077
+ [attr.aria-pressed]="isSelected(node)"
14078
+ [attr.aria-label]="nodeAriaLabel(node)"
14079
+ (pointerdown)="onNodePointerDown(node, $event)"
14080
+ (pointermove)="onNodePointerMove(node, $event)"
14081
+ (pointerup)="onNodePointerUp(node, $event)"
14082
+ (pointercancel)="onNodePointerCancel(node, $event)"
14083
+ (lostpointercapture)="onNodePointerCancel(node, $event)"
14084
+ (click)="onNodeActivate(node)"
14085
+ (keydown)="onNodeKeydown(node, $event)"
14086
+ (focus)="onNodeFocus(node)"
14087
+ >
14088
+ @if (nodeTemplate(); as tpl) {
14089
+ <ng-container *ngTemplateOutlet="tpl; context: nodeTemplateContext(node)" />
14090
+ } @else {
14091
+ <span class="sol-flow-canvas__node-label">{{ node.label }}</span>
14092
+ }
14093
+ </button>
14094
+
14095
+ @if (!isReadonly()) {
14096
+ <button
14097
+ type="button"
14098
+ class="sol-flow-canvas__node-connect-handle"
14099
+ [attr.aria-label]="connectFromLabel(node)"
14100
+ (click)="onStartConnect(node, $event)"
14101
+ >
14102
+ ⇢
14103
+ </button>
14104
+ }
14105
+ </div>
14106
+ }
14107
+ </div>
14108
+
14109
+ @if (!isReadonly()) {
14110
+ <button
14111
+ type="button"
14112
+ class="sol-flow-canvas__auto-layout"
14113
+ data-testid="flow-canvas-auto-layout"
14114
+ [attr.aria-label]="autoLayoutButtonAriaLabel()"
14115
+ (click)="onAutoLayoutClick()"
14116
+ >
14117
+ {{ autoLayoutButtonLabel() }}
14118
+ </button>
14119
+ }
14120
+
14121
+ <div class="sol-flow-canvas__announce" aria-live="polite" role="status">{{ announcement() }}</div>
14122
+ </div>
14123
+ `, isInline: true, styles: [":host{display:block;position:relative}.sol-flow-canvas{position:relative;width:100%;min-height:320px;overflow:hidden;background:var(--sol-bg-sunken, var(--sol-bg-page, #f8fafc));border-radius:var(--sol-border-radius-lg, 12px);touch-action:none;--sol-flow-canvas-hit-min: min(calc(44px / var(--sol-flow-canvas-zoom, 1)), 176px)}.sol-flow-canvas__world{position:absolute;inset:0;transform-origin:0 0;will-change:transform}.sol-flow-canvas__edges{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.sol-flow-canvas__edge-line{stroke:var(--sol-border-color-default, #94a3b8);stroke-width:2;fill:none}.sol-flow-canvas__edge-ghost{stroke:var(--sol-color-info, #3b82f6);stroke-width:2;stroke-dasharray:6 4;fill:none}.sol-flow-canvas__edge-arrow{fill:var(--sol-border-color-default, #94a3b8)}.sol-flow-canvas__edge-label{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;gap:4px;background:var(--sol-bg-surface, #fff);border:1px solid var(--sol-border-color-default, #e2e8f0);border-radius:var(--sol-border-radius-full, 999px);padding:2px 8px;font-size:var(--sol-font-size-xs, 11px);color:var(--sol-color-text-secondary, #475569);z-index:2}.sol-flow-canvas__edge-remove{border:none;background:transparent;color:var(--sol-color-danger, #ef4444);cursor:pointer;font-size:var(--sol-font-size-sm, 13px);line-height:1;display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--sol-flow-canvas-hit-min, 44px);height:var(--sol-flow-canvas-hit-min, 44px);margin:calc((13px - var(--sol-flow-canvas-hit-min, 44px)) / 2)}.sol-flow-canvas__node{position:absolute;width:180px;display:flex;align-items:stretch;gap:4px;z-index:3;touch-action:none}.sol-flow-canvas__node-surface{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:var(--sol-flow-canvas-hit-min, 44px);text-align:left;padding:10px 12px;background:var(--sol-bg-surface, #fff);border:2px solid var(--sol-border-color-default, #e2e8f0);border-radius:var(--sol-border-radius-lg, 10px);box-shadow:var(--sol-shadow-sm, 0 1px 2px rgba(0, 0, 0, .06));cursor:grab;font-family:var(--sol-font-family);color:var(--sol-color-text-primary);transition:opacity .15s ease}.sol-flow-canvas__node-surface:focus-visible{outline:2px solid var(--sol-color-primary, #2563eb);outline-offset:2px}.sol-flow-canvas__node--selected .sol-flow-canvas__node-surface{border-color:var(--sol-color-primary, #2563eb)}.sol-flow-canvas__node--highlighted .sol-flow-canvas__node-surface{box-shadow:0 0 0 3px color-mix(in srgb,var(--sol-color-primary, #2563eb) 30%,transparent)}.sol-flow-canvas__node--connect-source .sol-flow-canvas__node-surface{border-style:dashed;border-color:var(--sol-color-info, #3b82f6)}.sol-flow-canvas__node--connect-valid-target .sol-flow-canvas__node-surface{border-style:dashed;border-color:var(--sol-color-success, #10b981);box-shadow:0 0 0 3px color-mix(in srgb,var(--sol-color-success, #10b981) 25%,transparent)}.sol-flow-canvas__node--connect-invalid-target .sol-flow-canvas__node-surface{opacity:.45}.sol-flow-canvas__node[data-visual-state=running] .sol-flow-canvas__node-surface{border-color:var(--sol-color-info, #3b82f6)}.sol-flow-canvas__node[data-visual-state=ok] .sol-flow-canvas__node-surface{border-color:var(--sol-color-success, #10b981)}.sol-flow-canvas__node[data-visual-state=error] .sol-flow-canvas__node-surface{border-color:var(--sol-color-danger, #ef4444)}.sol-flow-canvas__node-label{font-size:var(--sol-font-size-sm, 13px);font-weight:600}.sol-flow-canvas__node-connect-handle{align-self:center;flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:var(--sol-flow-canvas-hit-min, 44px);min-height:var(--sol-flow-canvas-hit-min, 44px);border:1px solid var(--sol-border-color-default, #e2e8f0);border-radius:var(--sol-border-radius-md, 8px);background:var(--sol-bg-surface, #fff);color:var(--sol-color-text-secondary, #475569);cursor:pointer}.sol-flow-canvas__announce{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sol-flow-canvas__auto-layout{display:none;position:absolute;right:12px;bottom:12px;z-index:4;min-width:44px;min-height:44px;padding:0 16px;align-items:center;justify-content:center;border:1px solid var(--sol-border-color-default, #e2e8f0);border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-bg-surface, #fff);color:var(--sol-color-text-primary);font-family:var(--sol-font-family);font-size:var(--sol-font-size-sm, 13px);font-weight:600;box-shadow:var(--sol-shadow-md, 0 4px 12px rgba(0, 0, 0, .12));cursor:pointer}.sol-flow-canvas__auto-layout:focus-visible{outline:2px solid var(--sol-color-primary, #2563eb);outline-offset:2px}@media(max-width:767px){.sol-flow-canvas__auto-layout{display:inline-flex}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
14124
+ }
14125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolFlowCanvasComponent, decorators: [{
14126
+ type: Component,
14127
+ args: [{ selector: 'sol-flow-canvas', standalone: true, imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: `
14128
+ <div
14129
+ #canvasHost
14130
+ class="sol-flow-canvas"
14131
+ role="application"
14132
+ [attr.aria-label]="regionLabel()"
14133
+ [style.--sol-flow-canvas-zoom]="viewport().zoom"
14134
+ (keydown.escape)="cancelConnect()"
14135
+ (pointerdown)="onCanvasPointerDown($event)"
14136
+ (pointermove)="onCanvasPointerMove($event)"
14137
+ (pointerup)="onCanvasPointerUp($event)"
14138
+ (pointercancel)="onCanvasPointerCancel($event)"
14139
+ (lostpointercapture)="onCanvasPointerCancel($event)"
14140
+ (wheel)="onCanvasWheel($event)"
14141
+ >
14142
+ <div class="sol-flow-canvas__world" [style.transform]="worldTransform()">
14143
+ <svg class="sol-flow-canvas__edges" aria-hidden="true">
14144
+ <defs>
14145
+ <marker
14146
+ [attr.id]="markerId"
14147
+ markerWidth="8"
14148
+ markerHeight="8"
14149
+ refX="7"
14150
+ refY="4"
14151
+ orient="auto-start-reverse"
14152
+ >
14153
+ <path d="M0,0 L8,4 L0,8 Z" class="sol-flow-canvas__edge-arrow" />
14154
+ </marker>
14155
+ </defs>
14156
+ @for (edge of visibleEdges(); track trackEdge(edge, $index)) {
14157
+ <path
14158
+ class="sol-flow-canvas__edge-line"
14159
+ [attr.d]="edgePathD(edge)"
14160
+ [attr.marker-end]="'url(#' + markerId + ')'"
14161
+ />
14162
+ }
14163
+ @if (ghostEdgePathD(); as ghostD) {
14164
+ <path class="sol-flow-canvas__edge-ghost" [attr.d]="ghostD" [attr.marker-end]="'url(#' + markerId + ')'" />
14165
+ }
14166
+ </svg>
14167
+
14168
+ @for (edge of visibleEdges(); track trackEdge(edge, $index)) {
14169
+ <div class="sol-flow-canvas__edge-label" [style.left.px]="edgeMidpoint(edge).x" [style.top.px]="edgeMidpoint(edge).y">
14170
+ <span class="sol-flow-canvas__edge-label-text">{{ edge.label ?? edge.kind }}</span>
14171
+ @if (!isReadonly()) {
14172
+ <button
14173
+ type="button"
14174
+ class="sol-flow-canvas__edge-remove"
14175
+ [attr.aria-label]="removeConnectionLabel()"
14176
+ (click)="onRemoveConnection(edge)"
14177
+ >
14178
+ ×
14179
+ </button>
14180
+ }
14181
+ </div>
14182
+ }
14183
+
14184
+ @for (node of mirroredNodes(); track trackNode(node, $index)) {
14185
+ <div
14186
+ class="sol-flow-canvas__node"
14187
+ [class.sol-flow-canvas__node--selected]="isSelected(node)"
14188
+ [class.sol-flow-canvas__node--highlighted]="isHighlighted(node)"
14189
+ [class.sol-flow-canvas__node--connect-source]="connectSourceId() === node.id"
14190
+ [class.sol-flow-canvas__node--connect-valid-target]="isValidConnectTarget(node)"
14191
+ [class.sol-flow-canvas__node--connect-invalid-target]="isInvalidConnectTarget(node)"
14192
+ [attr.data-visual-state]="node.visualState ?? 'idle'"
14193
+ [attr.data-testid]="'flow-canvas-node-' + node.id"
14194
+ [style.left.px]="resolvedPosition(node).x"
14195
+ [style.top.px]="resolvedPosition(node).y"
14196
+ >
14197
+ <button
14198
+ type="button"
14199
+ class="sol-flow-canvas__node-surface"
14200
+ [attr.aria-pressed]="isSelected(node)"
14201
+ [attr.aria-label]="nodeAriaLabel(node)"
14202
+ (pointerdown)="onNodePointerDown(node, $event)"
14203
+ (pointermove)="onNodePointerMove(node, $event)"
14204
+ (pointerup)="onNodePointerUp(node, $event)"
14205
+ (pointercancel)="onNodePointerCancel(node, $event)"
14206
+ (lostpointercapture)="onNodePointerCancel(node, $event)"
14207
+ (click)="onNodeActivate(node)"
14208
+ (keydown)="onNodeKeydown(node, $event)"
14209
+ (focus)="onNodeFocus(node)"
14210
+ >
14211
+ @if (nodeTemplate(); as tpl) {
14212
+ <ng-container *ngTemplateOutlet="tpl; context: nodeTemplateContext(node)" />
14213
+ } @else {
14214
+ <span class="sol-flow-canvas__node-label">{{ node.label }}</span>
14215
+ }
14216
+ </button>
14217
+
14218
+ @if (!isReadonly()) {
14219
+ <button
14220
+ type="button"
14221
+ class="sol-flow-canvas__node-connect-handle"
14222
+ [attr.aria-label]="connectFromLabel(node)"
14223
+ (click)="onStartConnect(node, $event)"
14224
+ >
14225
+ ⇢
14226
+ </button>
14227
+ }
14228
+ </div>
14229
+ }
14230
+ </div>
14231
+
14232
+ @if (!isReadonly()) {
14233
+ <button
14234
+ type="button"
14235
+ class="sol-flow-canvas__auto-layout"
14236
+ data-testid="flow-canvas-auto-layout"
14237
+ [attr.aria-label]="autoLayoutButtonAriaLabel()"
14238
+ (click)="onAutoLayoutClick()"
14239
+ >
14240
+ {{ autoLayoutButtonLabel() }}
14241
+ </button>
14242
+ }
14243
+
14244
+ <div class="sol-flow-canvas__announce" aria-live="polite" role="status">{{ announcement() }}</div>
14245
+ </div>
14246
+ `, styles: [":host{display:block;position:relative}.sol-flow-canvas{position:relative;width:100%;min-height:320px;overflow:hidden;background:var(--sol-bg-sunken, var(--sol-bg-page, #f8fafc));border-radius:var(--sol-border-radius-lg, 12px);touch-action:none;--sol-flow-canvas-hit-min: min(calc(44px / var(--sol-flow-canvas-zoom, 1)), 176px)}.sol-flow-canvas__world{position:absolute;inset:0;transform-origin:0 0;will-change:transform}.sol-flow-canvas__edges{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.sol-flow-canvas__edge-line{stroke:var(--sol-border-color-default, #94a3b8);stroke-width:2;fill:none}.sol-flow-canvas__edge-ghost{stroke:var(--sol-color-info, #3b82f6);stroke-width:2;stroke-dasharray:6 4;fill:none}.sol-flow-canvas__edge-arrow{fill:var(--sol-border-color-default, #94a3b8)}.sol-flow-canvas__edge-label{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;gap:4px;background:var(--sol-bg-surface, #fff);border:1px solid var(--sol-border-color-default, #e2e8f0);border-radius:var(--sol-border-radius-full, 999px);padding:2px 8px;font-size:var(--sol-font-size-xs, 11px);color:var(--sol-color-text-secondary, #475569);z-index:2}.sol-flow-canvas__edge-remove{border:none;background:transparent;color:var(--sol-color-danger, #ef4444);cursor:pointer;font-size:var(--sol-font-size-sm, 13px);line-height:1;display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--sol-flow-canvas-hit-min, 44px);height:var(--sol-flow-canvas-hit-min, 44px);margin:calc((13px - var(--sol-flow-canvas-hit-min, 44px)) / 2)}.sol-flow-canvas__node{position:absolute;width:180px;display:flex;align-items:stretch;gap:4px;z-index:3;touch-action:none}.sol-flow-canvas__node-surface{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:var(--sol-flow-canvas-hit-min, 44px);text-align:left;padding:10px 12px;background:var(--sol-bg-surface, #fff);border:2px solid var(--sol-border-color-default, #e2e8f0);border-radius:var(--sol-border-radius-lg, 10px);box-shadow:var(--sol-shadow-sm, 0 1px 2px rgba(0, 0, 0, .06));cursor:grab;font-family:var(--sol-font-family);color:var(--sol-color-text-primary);transition:opacity .15s ease}.sol-flow-canvas__node-surface:focus-visible{outline:2px solid var(--sol-color-primary, #2563eb);outline-offset:2px}.sol-flow-canvas__node--selected .sol-flow-canvas__node-surface{border-color:var(--sol-color-primary, #2563eb)}.sol-flow-canvas__node--highlighted .sol-flow-canvas__node-surface{box-shadow:0 0 0 3px color-mix(in srgb,var(--sol-color-primary, #2563eb) 30%,transparent)}.sol-flow-canvas__node--connect-source .sol-flow-canvas__node-surface{border-style:dashed;border-color:var(--sol-color-info, #3b82f6)}.sol-flow-canvas__node--connect-valid-target .sol-flow-canvas__node-surface{border-style:dashed;border-color:var(--sol-color-success, #10b981);box-shadow:0 0 0 3px color-mix(in srgb,var(--sol-color-success, #10b981) 25%,transparent)}.sol-flow-canvas__node--connect-invalid-target .sol-flow-canvas__node-surface{opacity:.45}.sol-flow-canvas__node[data-visual-state=running] .sol-flow-canvas__node-surface{border-color:var(--sol-color-info, #3b82f6)}.sol-flow-canvas__node[data-visual-state=ok] .sol-flow-canvas__node-surface{border-color:var(--sol-color-success, #10b981)}.sol-flow-canvas__node[data-visual-state=error] .sol-flow-canvas__node-surface{border-color:var(--sol-color-danger, #ef4444)}.sol-flow-canvas__node-label{font-size:var(--sol-font-size-sm, 13px);font-weight:600}.sol-flow-canvas__node-connect-handle{align-self:center;flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:var(--sol-flow-canvas-hit-min, 44px);min-height:var(--sol-flow-canvas-hit-min, 44px);border:1px solid var(--sol-border-color-default, #e2e8f0);border-radius:var(--sol-border-radius-md, 8px);background:var(--sol-bg-surface, #fff);color:var(--sol-color-text-secondary, #475569);cursor:pointer}.sol-flow-canvas__announce{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sol-flow-canvas__auto-layout{display:none;position:absolute;right:12px;bottom:12px;z-index:4;min-width:44px;min-height:44px;padding:0 16px;align-items:center;justify-content:center;border:1px solid var(--sol-border-color-default, #e2e8f0);border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-bg-surface, #fff);color:var(--sol-color-text-primary);font-family:var(--sol-font-family);font-size:var(--sol-font-size-sm, 13px);font-weight:600;box-shadow:var(--sol-shadow-md, 0 4px 12px rgba(0, 0, 0, .12));cursor:pointer}.sol-flow-canvas__auto-layout:focus-visible{outline:2px solid var(--sol-color-primary, #2563eb);outline-offset:2px}@media(max-width:767px){.sol-flow-canvas__auto-layout{display:inline-flex}}\n"] }]
14247
+ }], ctorParameters: () => [], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], edges: [{ type: i0.Input, args: [{ isSignal: true, alias: "edges", required: false }] }], isReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }], highlightedNodeId: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightedNodeId", required: false }] }], nodeTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTemplate", required: false }] }], nodeMoved: [{ type: i0.Output, args: ["nodeMoved"] }], nodeSelected: [{ type: i0.Output, args: ["nodeSelected"] }], connectionCreated: [{ type: i0.Output, args: ["connectionCreated"] }], connectionRemoved: [{ type: i0.Output, args: ["connectionRemoved"] }], canvasHostRef: [{ type: i0.ViewChild, args: ['canvasHost', { isSignal: true }] }] } });
14248
+
12477
14249
  // Shared UI — atomic design system components
12478
14250
 
12479
14251
  /*
@@ -12484,5 +14256,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
12484
14256
  * Generated bundle index. Do not edit.
12485
14257
  */
12486
14258
 
12487
- export { DEFAULT_SCORE_THRESHOLDS, EMIT_TABLE, KANBAN_ADD_ACTION, KanbanReorderService, NEUTRAL_CALENDAR_COLOR, SOL_CALENDAR_COLOR, SOL_CHART_ENGINE, SOL_DEFAULT_THEME, SOL_I18N, SOL_TENANT_RESOLVER, SolAvatarComponent, SolBadgeComponent, SolButtonComponent, SolCalendarComponent, SolCalendarGridComponent, SolCalendarHeaderComponent, SolCardComponent, SolChartComponent, SolCheckboxComponent, SolChipComponent, SolChipGroupComponent, SolDataTableComponent, SolDatePickerComponent, SolDayPickerComponent, SolDrawerComponent, SolEmptyStateComponent, SolFileUploadComponent, SolFormFieldComponent, SolIconButtonComponent, SolIconComponent, SolInputComponent, SolKanbanBoardComponent, SolKanbanCardComponent, SolKanbanColumnComponent, SolMessageStatusComponent, SolModalComponent, SolNumberInputComponent, SolPageHeaderComponent, SolPaginationComponent, SolProgressBarComponent, SolRichEditorComponent, SolScoreBadgeComponent, SolSearchInputComponent, SolSelectComponent, SolSkeletonComponent, SolSpinnerComponent, SolStepperComponent, SolTabsComponent, SolTextareaComponent, SolTimelineComponent, SolToggleComponent, SolTooltipComponent, SolTrendComponent, SolViewToggleComponent, SolVirtualScrollComponent, SolWizardComponent, SolWizardStepDirective, TCPDF_ALLOWED_STYLE_PROPERTIES, TCPDF_ALLOWED_TAGS, THEME_SOURCE, ThemeService, buildDayColumns, buildGoogleFontsUrl, collectUndatedNodes, computeEventHeight, computeEventTop, computeGlobalRange, computeInitials, computeMonthAxisTicks, computeNowTop, createIdentitySolI18n, dayKey, defaultStatusToken, defaultTrendFormat, getWeekStart, hashToPaletteIndex, isRenderableTheme, isSafeBackgroundImage, isSafeCssColor, parseEventDate, positionRows, provideTheme, resolveCssVars, resolveScoreTone, resolveTrendDirection, sanitizeAssetUrl, sanitizeHtmlToTcpdf, serializeElementToTcpdfHtml };
14259
+ export { DEFAULT_SCORE_THRESHOLDS, EMIT_TABLE, KANBAN_ADD_ACTION, KanbanReorderService, NEUTRAL_CALENDAR_COLOR, SOL_CALENDAR_COLOR, SOL_CHART_ENGINE, SOL_DEFAULT_THEME, SOL_I18N, SOL_TENANT_RESOLVER, SolAvatarComponent, SolBadgeComponent, SolButtonComponent, SolCalendarComponent, SolCalendarGridComponent, SolCalendarHeaderComponent, SolCardComponent, SolChartComponent, SolCheckboxComponent, SolChipComponent, SolChipGroupComponent, SolDataTableComponent, SolDatePickerComponent, SolDayPickerComponent, SolDrawerComponent, SolEmptyStateComponent, SolFileUploadComponent, SolFlowCanvasComponent, SolFormFieldComponent, SolIconButtonComponent, SolIconComponent, SolInputComponent, SolKanbanBoardComponent, SolKanbanCardComponent, SolKanbanColumnComponent, SolKanbanDragSourceComponent, SolMessageStatusComponent, SolModalComponent, SolNumberInputComponent, SolPageHeaderComponent, SolPaginationComponent, SolProgressBarComponent, SolRichEditorComponent, SolScoreBadgeComponent, SolSearchInputComponent, SolSelectComponent, SolSkeletonComponent, SolSpinnerComponent, SolStepperComponent, SolTabsComponent, SolTextareaComponent, SolTimelineComponent, SolToggleComponent, SolTooltipComponent, SolTrendComponent, SolViewToggleComponent, SolVirtualScrollComponent, SolWizardComponent, SolWizardStepDirective, TCPDF_ALLOWED_STYLE_PROPERTIES, TCPDF_ALLOWED_TAGS, THEME_SOURCE, ThemeService, buildDayColumns, buildGoogleFontsUrl, collectUndatedNodes, computeAutoLayoutPositions, computeEventHeight, computeEventTop, computeGlobalRange, computeInitials, computeMonthAxisTicks, computeNowTop, createIdentitySolI18n, dayKey, defaultStatusToken, defaultTrendFormat, getWeekStart, hashToPaletteIndex, isRenderableTheme, isSafeBackgroundImage, isSafeCssColor, parseEventDate, positionRows, provideTheme, resolveCssVars, resolveScoreTone, resolveTrendDirection, sanitizeAssetUrl, sanitizeHtmlToTcpdf, serializeElementToTcpdfHtml };
12488
14260
  //# sourceMappingURL=solercia-ui.mjs.map