@namiml/web-sdk 3.4.7-rc.202607230359 → 3.4.7

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.
@@ -1,6 +1,6 @@
1
1
  import { type TTextInputComponent } from "@namiml/sdk-core";
2
2
  import { NamiElement } from "../NamiElement";
3
- import { type CSSResult } from "lit";
3
+ import { type CSSResult, type PropertyValueMap } from "lit";
4
4
  export declare class NamiTextInput extends NamiElement<TTextInputComponent> {
5
5
  component: TTextInputComponent;
6
6
  inFocusedState: boolean;
@@ -9,8 +9,11 @@ export declare class NamiTextInput extends NamiElement<TTextInputComponent> {
9
9
  private _value;
10
10
  /** Whether the input currently holds DOM focus. */
11
11
  private _focused;
12
+ /** Ref to the rendered `<input>`, used to drive autofocus (`component.focused`). */
13
+ private _inputEl?;
12
14
  constructor();
13
15
  connectedCallback(): void;
16
+ protected updated(changedProperties: PropertyValueMap<this>): void;
14
17
  private get isTelevision();
15
18
  /** Map the wire `type` to the validator's `TTextInputType`. */
16
19
  private validatorType;
@@ -19,6 +22,13 @@ export declare class NamiTextInput extends NamiElement<TTextInputComponent> {
19
22
  private _handleInput;
20
23
  private _handleFocus;
21
24
  private _handleBlur;
25
+ /**
26
+ * Dismiss the keyboard when a pointer-down lands outside this field. Blurring
27
+ * the inner `<input>` fires the `@blur` handler, which commits the value.
28
+ * Registered in the capture phase only while focused (see `_handleFocus`).
29
+ */
30
+ private _onOutsidePointerDown;
31
+ disconnectedCallback(): void;
22
32
  protected styles(): CSSResult;
23
33
  private resolvedSpacing;
24
34
  private resolvedBorderWidth;
@@ -44,6 +44,26 @@ export declare function zIndex({ zIndex }: TBaseComponent): string;
44
44
  export declare function dropShadow(dropShadow?: string, isText?: boolean): string;
45
45
  export declare function textStrikethrough(value: boolean | undefined): string;
46
46
  export declare function fontFamily(fontName?: string): string;
47
+ export declare function coerceNumeric(value: unknown): number;
48
+ export declare function hasValidLineHeight(component: {
49
+ lineHeight?: unknown;
50
+ }): boolean;
51
+ /**
52
+ * lineHeight/letterSpacing text properties (NAM-1409). Mirrors the Page
53
+ * Builder previewer's `textSpacing()` contract (nami-platform PR #1722,
54
+ * services/frontend/src/components/PaywallPreview/css.ts):
55
+ * - lineHeight is an ABSOLUTE px value; only emitted when it coerces to a
56
+ * finite number > 0 (scaled by `scaleFactor`). Otherwise the caller's
57
+ * existing computed default line-height applies unchanged.
58
+ * - letterSpacing is an em fraction of font-size, signed decimal in
59
+ * [-1, 1]; emitted directly as `em` (NOT scaled). Applied whenever finite.
60
+ * Numeric strings ("4", "0.08") coerce via Number(); non-numeric / an
61
+ * unresolved `${var}` smart-text token coerce to NaN and are omitted.
62
+ */
63
+ export declare function textSpacing(component: {
64
+ lineHeight?: unknown;
65
+ letterSpacing?: unknown;
66
+ }, scaleFactor: number): string;
47
67
  export declare function applyStyles(component: TBaseComponent, scaleFactor: number, inFocusedState?: boolean): string;
48
68
  export declare function applyGridStyles(component: TBaseComponent, inFocusedState?: boolean, scaleFactor?: number): string;
49
69
  export declare function parsePosition(position?: TContainerPosition): string;