codexly-ui 0.10.66 → 0.10.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codexly-ui",
3
- "version": "0.10.66",
3
+ "version": "0.10.68",
4
4
  "description": "Standalone, signal-based Angular UI component library for Codexly, styled with Tailwind CSS.",
5
5
  "keywords": [
6
6
  "angular",
@@ -2997,20 +2997,40 @@ declare class ClxProductDetailComponent {
2997
2997
  readonly _carousel: _angular_core.Signal<ClxCarouselComponent | undefined>;
2998
2998
  readonly quantity: _angular_core.WritableSignal<number>;
2999
2999
  readonly activeTab: _angular_core.WritableSignal<string>;
3000
+ /** Only holds specs the visitor has explicitly clicked — starts empty, not pre-filled with the
3001
+ * initial variation's specs, so a spec option can be toggled off (click again to deselect)
3002
+ * without fighting a "fully selected" starting state that never lets go of its last value. */
3000
3003
  readonly selectedSpecs: _angular_core.WritableSignal<Record<string, string>>;
3004
+ private readonly _initialVariation;
3001
3005
  /** Same card treatment as clx-product (bg-clx-surface + shadow-sm) — keeps the gallery/info
3002
3006
  * panels visually consistent with the rest of the e-commerce card set. */
3003
3007
  protected readonly _panelClass = "bg-clx-surface rounded-2xl shadow-sm p-4";
3004
3008
  readonly tabItems: ClxTabItem[];
3005
3009
  constructor();
3010
+ /** With no specs selected (fresh load, or every spec toggled back off) this is the variation
3011
+ * the visitor originally landed on. Otherwise, resolves the variation matching every currently
3012
+ * selected spec — with a partial selection (some spec types still untouched), any variation
3013
+ * whose specs are a superset of the selection counts as a match, since the visitor hasn't
3014
+ * narrowed those other spec types down to one value yet. */
3006
3015
  readonly activeVariation: _angular_core.Signal<ClxVariation | null>;
3007
3016
  readonly finalPrice: _angular_core.Signal<number>;
3008
3017
  readonly discount: _angular_core.Signal<number>;
3009
- /** An option is available only if some variation matching it (combined with the rest of the
3010
- * current selection) both exists AND has stock — a sold-out combination is treated the same
3011
- * as a non-existent one and hidden, per the same "hide, don't disable" rule already applied to
3012
- * invalid combinations, so the visitor never sees a spec they can't actually buy. */
3018
+ /** An option is available if some in-stock variation matches it together with the rest of the
3019
+ * current selection — a sold-out combination is hidden, same "hide, don't disable" rule already
3020
+ * applied to invalid combinations, so the visitor never sees a spec they can't actually buy.
3021
+ *
3022
+ * Falls back to ignoring the cross-selection filter (any in-stock variation with this option,
3023
+ * regardless of other selected specs) when the strict cross-filter would hide every option of
3024
+ * this spec type — that happens when the *currently selected* combination itself has no stock
3025
+ * (e.g. landed on Negro+XL, which is sold out): without the fallback, Color and Talla would
3026
+ * hide each other's only selected value and the whole panel would render empty, even though
3027
+ * other in-stock combinations (Azul L, Gris M, …) exist. */
3013
3028
  isOptionAvailable(specTypeId: string, specOptionId: string): boolean;
3029
+ /** Clicking an already-selected option deselects it (toggle) instead of being a no-op — the only
3030
+ * way to escape a narrowed-down selection and see all options again, per the "hide unavailable
3031
+ * options" design: there's no separate disabled state to click through, so toggling off is the
3032
+ * sole path back. Once every spec is toggled off, activeVariation() falls back to the variation
3033
+ * the visitor originally landed on (see _initialVariation). */
3014
3034
  selectSpec(specTypeId: string, specOptionId: string): void;
3015
3035
  isSpecSelected(specTypeId: string, specOptionId: string): boolean;
3016
3036
  selectedOptionLabel(specType: ClxSpecType): string;