@namiml/web-sdk 3.4.1-dev.202605280043 → 3.4.1-dev.202605281900

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -13,9 +13,10 @@
13
13
  */
14
14
  import { type TComponent, type TPages } from '@namiml/sdk-core';
15
15
  type TtsRequestPriority = 'low' | 'normal' | 'high';
16
+ type SpeakReason = 'composite' | 'focus' | 'manual';
16
17
  type SpeakOptions = {
17
18
  interrupt?: boolean;
18
- reason?: 'composite' | 'focus' | 'manual';
19
+ reason?: SpeakReason;
19
20
  transactionId?: number;
20
21
  element?: Element | null;
21
22
  focusPath?: Element[];
@@ -32,35 +33,35 @@ export type TtsEngineName = 'webos-luna-tts' | 'web-speech' | 'vizio-chromevox';
32
33
  export declare function setTtsDebugEnabled(enabled: boolean): void;
33
34
  export declare function hasActiveCompositeAccessibilityAlignment(element: Element): boolean;
34
35
  export declare const hasActiveWebOsLunaCompositeLabelAlignment: typeof hasActiveCompositeAccessibilityAlignment;
35
- export declare function getEstimatedSpeechRestoreDelayMs(text: string): number;
36
36
  export declare function restoreCompositeAccessibilityAlignment(element?: Element, transactionId?: number, reason?: string, force?: boolean): void;
37
37
  export declare const restoreWebOsLunaCompositeLabelAlignment: typeof restoreCompositeAccessibilityAlignment;
38
38
  export declare function scheduleCompositeAccessibilityAlignmentRestoreAfterBlur(element: Element, relatedTarget?: EventTarget | null): void;
39
39
  export declare const scheduleWebOsLunaCompositeLabelAlignmentRestoreAfterBlur: typeof scheduleCompositeAccessibilityAlignmentRestoreAfterBlur;
40
+ export declare function getEstimatedSpeechRestoreDelayMs(text: string): number;
40
41
  export declare function isTtsSupported(): boolean;
41
42
  export declare function setTtsEnabled(enabled: boolean): void;
42
43
  export declare function attachTtsEventListeners(): void;
43
44
  export declare function setMediaPlaying(playing: boolean): void;
44
45
  export declare function isMediaPlaying(): boolean;
45
- export declare function stopSpeech(preserveTransactionId?: number): void;
46
- export declare function cancelSpeech(): void;
47
46
  export declare function markTtsEngineUnavailable(engine?: TtsEngineName): void;
47
+ export declare function stopSpeech(preserveTransactionId?: number, allowVizioEmptyFallback?: boolean): void;
48
+ export declare function cancelSpeech(): void;
48
49
  export declare function speakText(text: string, options?: SpeakOptions): boolean;
49
- export declare function speak(text: string): void;
50
- export declare function diagnoseTtsEngine(text?: string): boolean;
51
50
  export declare function focusEventReadsLabel(): boolean;
52
51
  export declare function getSpeechLabelFromElement(element: Element | null | undefined): string;
53
52
  export declare function getSpeechLabelFromComponent(component: TComponent | null | undefined): string;
54
53
  export declare function applySpeechAttributes(element: Element, label: string): void;
55
- export declare function buildInitialScreenSpeech(page: TPages | null | undefined, renderedRoot?: ParentNode | null, includeControls?: boolean): string;
56
- export declare function speakInitialScreen(page: TPages | null | undefined, renderedRoot?: ParentNode | null): void;
57
- export declare function preparePrimaryCtaCompositeFocus(element: Element, context?: FocusEvent | FocusContext): boolean;
54
+ export declare function buildInitialScreenSpeech(page: TPages | null | undefined): string;
55
+ export declare function setActivePage(page: TPages | null): void;
56
+ export declare function setActivePageRenderRoot(root: ParentNode | null): void;
57
+ /**
58
+ * Legacy export kept for existing call sites. It now delegates to the page-first
59
+ * initial composite flow and no longer requires the element to be the primary CTA.
60
+ */
61
+ export declare function preparePrimaryCtaCompositeFocus(element: Element, context?: FocusContext | Event | null): boolean;
62
+ export declare function handleFocusedElementForSpeech(element: Element | null | undefined, context?: FocusContext | Event | null): boolean;
58
63
  export declare function attachFocusSpeechListeners(root?: Element | Document | DocumentFragment): () => void;
59
64
  export declare function detachFocusSpeechListeners(): void;
60
- export declare function setActivePage(page: TPages | null | undefined): void;
61
- export declare function setActivePageRenderRoot(root: ParentNode | null | undefined): void;
62
- export declare function getActivePage(): TPages | null;
63
- export declare function shouldAnnounceComposite(): boolean;
64
- export declare function markPageAnnounced(): void;
65
65
  export declare function resetScreenreaderState(): void;
66
+ export declare function resetTtsStateForTests(): void;
66
67
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@namiml/web-sdk",
3
3
  "type": "module",
4
- "version": "3.4.1-dev.202605280043",
4
+ "version": "3.4.1-dev.202605281900",
5
5
  "source": "src/nami-web.ts",
6
6
  "description": "Subscription monetization infrastructure — drop-in SDK with no-code paywalls, onboarding flows, A/B testing for web",
7
7
  "scripts": {
@@ -100,7 +100,7 @@
100
100
  "dependencies": {
101
101
  "@lit-labs/ssr-dom-shim": "^1.2.1",
102
102
  "@lit/context": "^1.1.3",
103
- "@namiml/sdk-core": "3.4.1-dev.202605280043",
103
+ "@namiml/sdk-core": "3.4.1-dev.202605281900",
104
104
  "bowser": "^2.11.0",
105
105
  "hls.js": "^1.5.18",
106
106
  "lit": "^3.3.1",