@blotch/angular-lynx 22.2.1 → 22.2.2

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,4349 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ApplicationConfig, ApplicationRef, ComponentRef, EmbeddedViewRef, EnvironmentInjector, EnvironmentProviders, ErrorDetails, ErrorHandler, Injector, OnChanges, OnDestroy, SimpleChanges, TemplateRef, Type, ViewContainerRef, signal } from "@angular/core";
3
+ import { Animation, AnimationEvent, AnimationOptions, Element, KeyEvent, LayoutChangeEvent, MouseEvent, TouchEvent, TransitionEvent, UIAppearanceEvent, WheelEvent } from "@lynx-js/types/main-thread";
4
+ import { AnyObject } from "@lynx-js/types/common";
5
+ import { ControlValueAccessor } from "@angular/forms";
6
+ import { PlatformType, ResourcePrefetchData, ResourcePrefetchResult, TextInfo, TextMetrics, TouchEvent as TouchEvent$1 } from "@lynx-js/types";
7
+ import { LocationChangeListener, LocationStrategy, PlatformLocation } from "@angular/common";
8
+ import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy, RouterFeatures, Routes } from "@angular/router";
9
+ /**
10
+ * Programmatic accessibility control for screen readers on Lynx.
11
+ *
12
+ * Provides two imperative APIs that complement the declarative accessibility
13
+ * attributes (`accessibility-element`, `accessibility-label`, etc.) already
14
+ * available on Lynx element directives.
15
+ *
16
+ * @usageNotes
17
+ * ```typescript
18
+ * const a11y = inject(LynxAccessibility);
19
+ *
20
+ * // Announce a state change to screen readers
21
+ * await a11y.announce('Item added to cart');
22
+ *
23
+ * // Move accessibility focus to a specific element
24
+ * await a11y.requestFocus('#confirmation-message');
25
+ * ```
26
+ */
27
+ export declare class LynxAccessibility {
28
+ /**
29
+ * Makes screen readers announce the specified text content.
30
+ *
31
+ * Use this to notify visually impaired users of state changes or
32
+ * operation results that aren't reflected by focus movement alone
33
+ * (e.g. toast messages, background task completion, live counters).
34
+ *
35
+ * Wraps `lynx.accessibilityAnnounce()`.
36
+ */
37
+ announce(content: string): Promise<void>;
38
+ /**
39
+ * Programmatically moves accessibility focus (screen reader cursor)
40
+ * to the element matching the given selector.
41
+ *
42
+ * The target element should have `accessibility-element="true"` set.
43
+ * Only ID selectors are reliably supported (e.g. `'#myElement'`).
44
+ *
45
+ * Wraps `lynx.createSelectorQuery().select(selector).invoke({ method: 'requestAccessibilityFocus' }).exec()`.
46
+ */
47
+ requestFocus(selector: string): Promise<void>;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxAccessibility, never>;
49
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
50
+ }
51
+ /**
52
+ * Phantom brand symbol — makes each ElementRef variant nominally distinct at
53
+ * the type level even though Lynx PAPI handles have no runtime structure.
54
+ */
55
+ declare const __brand: unique symbol;
56
+ /**
57
+ * Generic opaque handle returned by every __Create* PAPI function.
58
+ * The Tag parameter narrows the type to a specific native element kind,
59
+ * preventing accidental cross-element assignments (e.g. ListElementRef ≠ ViewElementRef).
60
+ */
61
+ type ElementRef<Tag extends string = string> = {
62
+ readonly [__brand]?: Tag;
63
+ };
64
+ /**
65
+ * ComponentElementRef accepts both 'component' and 'page' so that
66
+ * PageElementRef (which is ElementRef<'page'>) remains assignable to it,
67
+ * preserving the original hierarchy: Page ⊆ Component ⊆ ElementRef.
68
+ */
69
+ type ComponentElementRef = ElementRef<'component' | 'page'>;
70
+ type PageElementRef = ElementRef<'page'>;
71
+ type ListElementRef = ElementRef<'list'>;
72
+ type ViewElementRef = ElementRef<'view'>;
73
+ type TextElementRef = ElementRef<'text'>;
74
+ type RawTextElementRef = ElementRef<'raw-text'>;
75
+ type ImageElementRef = ElementRef<'image'>;
76
+ type ScrollElementRef = ElementRef<'scroll'>;
77
+ type WrapperElementRef = ElementRef<'wrapper'>;
78
+ type NoneElementRef = ElementRef<'none'>;
79
+ type IfElementRef = ElementRef<'if'>;
80
+ type ForElementRef = ElementRef<'for'>;
81
+ type BlockElementRef = ElementRef<'block'>;
82
+ type FrameElementRef = ElementRef<'frame'>;
83
+ /**
84
+ * AnyObject = Record<string, any>, sourced from @lynx-js/types rather than
85
+ * duplicating the definition locally.
86
+ */
87
+ type ElementInfo = AnyObject;
88
+ type SelectorParams = {
89
+ onlyCurrentComponent?: boolean;
90
+ };
91
+ type DynamicComponentResult = {
92
+ code: number;
93
+ data: {
94
+ evalResult: (url: string) => {
95
+ name: string;
96
+ };
97
+ };
98
+ };
99
+ /**
100
+ * Global PAPI declarations — these __* functions are injected by the Lynx
101
+ * native engine and are not part of @lynx-js/types (which covers the
102
+ * high-level JS API layer only).
103
+ */
104
+ declare global {
105
+ function __CreatePage(componentId: string, cssId: number, info?: ElementInfo): PageElementRef;
106
+ function __CreateComponent(parentComponentUniId: number, componentId: string, cssId: number, entryName: string, name: string, path: string, config?: Record<string, unknown>): ComponentElementRef;
107
+ function __CreateView(parentComponentUniId: number, info?: ElementInfo): ViewElementRef;
108
+ function __CreateScrollView(parentComponentUniId: number, info?: ElementInfo): ScrollElementRef;
109
+ function __CreateText(parentComponentUniId: number, info?: ElementInfo): TextElementRef;
110
+ function __CreateRawText(text: string, info?: ElementInfo): RawTextElementRef;
111
+ function __CreateImage(parentComponentUniId: number, info?: ElementInfo): ImageElementRef;
112
+ function __CreateWrapperElement(parentComponentUniId: number): WrapperElementRef;
113
+ function __CreateNonElement(parentComponentUniId: number): ElementRef;
114
+ function __CreateIf(parentComponentUniId: number, info?: ElementInfo): IfElementRef;
115
+ function __CreateFor(parentComponentUniId: number, info?: ElementInfo): ForElementRef;
116
+ function __CreateBlock(parentComponentUniId: number, info?: ElementInfo): BlockElementRef;
117
+ function __CreateList(parentComponentUniId: number, componentAtIndex: (listRef: ListElementRef, listId: number, cellIndex: number, opId: number) => number | undefined, enqueueComponent: (listRef: ListElementRef, listId: number, eleId: number) => void, info?: ElementInfo, componentAtIndexes?: (listRef: ListElementRef, listId: number, cellIndexes: number[], opIds: number[], enableReuseNotification: boolean, asyncFlush: boolean) => void): ListElementRef;
118
+ function __UpdateListCallbacks(node: ListElementRef, componentAtIndex: (listRef: ListElementRef, listId: number, cellIndex: number, opId: number) => number | undefined, enqueueComponent: (listRef: ListElementRef, listId: number, eleId: number) => void, componentAtIndexes?: (listRef: ListElementRef, listId: number, cellIndexes: number[], opIds: number[], enableReuseNotification: boolean, asyncFlush: boolean) => void | null): void;
119
+ function __CreateFrame(parentComponentUniId: number, info?: ElementInfo): FrameElementRef;
120
+ function __CreateElement(tag: string, comParentUniID: number, info?: ElementInfo): ElementRef;
121
+ function __AppendElement(parent: ElementRef, current: ElementRef): ElementRef;
122
+ function __RemoveElement(parent: ElementRef, current: ElementRef): ElementRef;
123
+ function __InsertElementBefore(parent: ElementRef, current: ElementRef, marker: ElementRef): ElementRef;
124
+ function __SwapElement(a: ElementRef, b: ElementRef): void;
125
+ function __ReplaceElement(a: ElementRef, b: ElementRef): void;
126
+ function __ReplaceElements(parent: ElementRef, a: ElementRef | ElementRef[] | undefined, b: ElementRef | ElementRef[] | undefined): void;
127
+ function __GetParent(current: ElementRef): ElementRef | null;
128
+ function __GetChildren(current: ElementRef): ElementRef[];
129
+ function __FirstElement(current: ElementRef): ElementRef;
130
+ function __LastElement(current: ElementRef): ElementRef;
131
+ function __NextElement(node: ElementRef): ElementRef;
132
+ function __GetTag(node: ElementRef): string;
133
+ function __SetAttribute(current: ElementRef, attrName: string, value: any): void;
134
+ function __AddClass(current: ElementRef, className: string): void;
135
+ function __SetClasses(current: ElementRef, className: string | undefined): void;
136
+ function __GetClasses(current: ElementRef): string[];
137
+ function __SetStaticStyle(node: ElementRef, key: number, value: unknown): void;
138
+ function __SetInlineStyles(node: ElementRef, value: unknown): void;
139
+ function __GetInlineStyle(node: ElementRef, propertyId: number): string;
140
+ function __GetInlineStyles(node: ElementRef): string;
141
+ function __SetID(node: ElementRef, id: string | undefined): void;
142
+ function __GetID(node: ElementRef): string;
143
+ function __SetCSSId(node: ElementRef, cssId: number, entryName?: string): void;
144
+ function __AddEvent(node: ElementRef, type: string, name: string, func: string | Record<string, unknown> | undefined): void;
145
+ function __SetEvents(node: ElementRef, events: Record<string, unknown>[] | undefined): void;
146
+ function __GetEvent(node: ElementRef, name: string, type: string): Record<string, any>;
147
+ function __GetEvents(node: ElementRef): Record<string, any>[];
148
+ function __AddDataset(node: ElementRef, key: string, value: unknown): void;
149
+ function __SetDataset(node: ElementRef, value: Record<string, unknown> | undefined): void;
150
+ function __GetDataset(node: ElementRef): Record<string, unknown>;
151
+ function __GetDataByKey(node: ElementRef, key: string): any;
152
+ function __GetElementUniqueID(node: ElementRef): number;
153
+ function __ElementIsEqual(left: ElementRef, right: ElementRef): boolean;
154
+ function __UpdateComponentID(node: ElementRef, id: string): void;
155
+ function __GetComponentID(node: ElementRef): string;
156
+ function __UpdateComponentInfo(node: ElementRef, params: {
157
+ componentID?: string;
158
+ name?: string;
159
+ path?: string;
160
+ entry?: string;
161
+ cssID?: number;
162
+ }): void;
163
+ function __FlushElementTree(element?: ElementRef, options?: {
164
+ triggerLayout?: boolean;
165
+ triggerDataUpdated?: boolean;
166
+ operationID?: number;
167
+ operationIDs?: number[];
168
+ nativeUpdateDataOrder?: number;
169
+ __lynx_timing_flag?: string;
170
+ elementID?: number;
171
+ elementIDs?: number[];
172
+ reloadTemplate?: boolean;
173
+ listID?: number;
174
+ pipelineOptions?: Record<string, any>;
175
+ /**
176
+ * Delegate async scheduling to the native engine (used in componentAtIndexes batch path).
177
+ */
178
+ asyncFlush?: boolean;
179
+ }): void;
180
+ function __AsyncResolveElement(element: ElementRef): void;
181
+ function __OnLifecycleEvent(args: any[]): void;
182
+ function _ReportError(err: Error, info: {
183
+ errorCode: number;
184
+ }): void;
185
+ function __ElementFromBinary(elementTemplateKey: string, parentComponentUniId: number): ElementRef[];
186
+ function __GetTemplateParts(ele: ElementRef): Record<string, ElementRef>;
187
+ function __CloneElement(ele: ElementRef, options: Record<string, any>): ElementRef;
188
+ function __IsTemplateElement(ele: ElementRef): boolean;
189
+ function __MarkTemplateElement(ele: ElementRef): void;
190
+ function __MarkPartElement(ele: ElementRef, key: string): void;
191
+ function __QuerySelector(root: ElementRef, cssSelector: string, params: SelectorParams): ElementRef;
192
+ function __QuerySelectorAll(root: ElementRef, cssSelector: string, params: SelectorParams): ElementRef[];
193
+ function __AddConfig(ele: ElementRef, key: string, value: any): void;
194
+ function __SetConfig(ele: ElementRef, config: Record<string, any>): void;
195
+ function __GetElementConfig(ele: ElementRef): Record<string, unknown>;
196
+ function __QueryComponent(source: string, callback: (evalResult: DynamicComponentResult) => void): {
197
+ evalResult: unknown;
198
+ };
199
+ function __AddInlineStyle(e: ElementRef, key: number | string, value: unknown): void;
200
+ function __ElementAnimate(element: ElementRef, args: [operation: 0, name: string, keyframes: Record<string, string | number>[], options?: LynxAnimationOptions] | [operation: 1 | 2 | 3, name: string]): void;
201
+ function __GetAttributeByName(e: ElementRef, name: string): any;
202
+ function __GetAttributeNames(e: ElementRef): string[];
203
+ function __GetAttributes(e: ElementRef): Record<string, any>;
204
+ function __GetComputedStyleByKey(e: ElementRef, key: string): string;
205
+ function __GetPageElement(): ElementRef;
206
+ function __InvokeUIMethod(e: ElementRef, method: string, params: Record<string, unknown>, callback: (res: {
207
+ code: number;
208
+ data: unknown;
209
+ }) => void): ElementRef[];
210
+ function __LoadLepusChunk(name: string, cfg: {
211
+ chunkType: number;
212
+ }): void;
213
+ function __CreateGestureDetector(node: ElementRef, gestureID: number, gestureType: number, config: {
214
+ callbacks: Array<{
215
+ name: string;
216
+ callback: unknown;
217
+ }>;
218
+ config?: Record<string, unknown>;
219
+ }, relationMap: Record<string, number[]>): void;
220
+ function __SetGestureDetector(node: ElementRef, gestureID: number, gestureType: number, config: {
221
+ callbacks: Array<{
222
+ name: string;
223
+ callback: unknown;
224
+ }>;
225
+ config?: Record<string, unknown>;
226
+ }, relationMap: Record<string, number[]>): void;
227
+ function __RemoveGestureDetector(node: ElementRef, gestureID: number): void;
228
+ function __SetGestureState(node: ElementRef, gestureID: number, state: number): void;
229
+ function __ConsumeGesture(node: ElementRef, gestureID: number, options: Record<string, boolean>): void;
230
+ function __GeneratePipelineOptions(): Record<string, any>;
231
+ function __OnPipelineStart(pipeLineId: string, pipeLineOrigin: string): void;
232
+ function __BindPipelineIDWithTimingFlag(pipeLineId: string, timingFlag: string): void;
233
+ function __MarkTiming(pipeLineId: string, timingFlag: string): void;
234
+ function __AddTimingListener(): void;
235
+ function __SetLepusInitData(initData: Record<string, unknown>): void;
236
+ function __GetElementByUniqueID(elementId: number): ElementRef | undefined;
237
+ function __UpdateIfNodeIndex(node: IfElementRef, ifIndex: number): void;
238
+ function __UpdateForChildCount(node: ForElementRef, childCount: number): void;
239
+ }
240
+ /**
241
+ * Extends the official AnimationOptions with Lynx-native property aliases
242
+ * and relaxed types that accept string values (e.g. "300ms").
243
+ */
244
+ type LynxAnimationOptions = AnimationOptions & {
245
+ iterationCount?: number | string;
246
+ fillMode?: string;
247
+ timingFunction?: string;
248
+ };
249
+ /**
250
+ * Shared interface for all animation implementations (real and no-op).
251
+ * Used by `BaseLynxElement.animate()` return type so both `LynxAnimation`
252
+ * (main thread) and `NoopLynxAnimation` (background thread) are valid.
253
+ * Required because LynxAnimation uses ES private fields (#element, #count)
254
+ * which brand the class — TypeScript's structural typing won't accept
255
+ * NoopLynxAnimation as assignable to LynxAnimation. This shared Pick type
256
+ * extracts only the public API both implementations satisfy.
257
+ */
258
+ type BaseLynxAnimation = Pick<Animation, 'id' | 'cancel' | 'pause' | 'play'>;
259
+ /**
260
+ * Represents a running animation on a Lynx element.
261
+ * Created by calling `element.animate()` on a LynxElement.
262
+ * Mirrors the Animation class from React Lynx's worklet-runtime.
263
+ */
264
+ export declare class LynxAnimation implements Pick<Animation, 'id' | 'cancel' | 'pause' | 'play'> {
265
+ #private;
266
+ readonly id: string;
267
+ constructor(element: ElementRef, keyframes: Record<string, string | number>[], options: LynxAnimationOptions);
268
+ play(): void;
269
+ pause(): void;
270
+ cancel(): void;
271
+ }
272
+ /**
273
+ * Wraps Lynx's native performance tracing APIs (`lynx.performance`).
274
+ *
275
+ * All methods are no-ops when `lynx.performance` is unavailable (e.g. in tests
276
+ * or non-Lynx environments) or when profiling is not actively recording.
277
+ *
278
+ * @usageNotes
279
+ * ```typescript
280
+ * const perf = inject(LynxPerformance);
281
+ *
282
+ * perf.profileStart('MyComponent::render', { itemCount: 42 });
283
+ * // ... do work ...
284
+ * perf.profileEnd();
285
+ *
286
+ * perf.profileMark('dataLoaded', { source: 'cache' });
287
+ * ```
288
+ */
289
+ export declare class LynxPerformance {
290
+ #private;
291
+ /**
292
+ * Whether profiling is actively recording traces.
293
+ * Returns false when `lynx.performance` is unavailable.
294
+ */
295
+ isRecording(): boolean;
296
+ /**
297
+ * Begin a named trace. Must be paired with `profileEnd()`.
298
+ * Traces nest — multiple `profileStart` calls create a stack.
299
+ */
300
+ profileStart(name: string, options?: {
301
+ flowId?: number;
302
+ args?: Record<string, unknown>;
303
+ }): void;
304
+ /**
305
+ * End the current trace (top of the trace stack).
306
+ */
307
+ profileEnd(): void;
308
+ /**
309
+ * Emit a discrete mark event in the trace timeline.
310
+ */
311
+ profileMark(name: string, options?: {
312
+ args?: Record<string, unknown>;
313
+ }): void;
314
+ /**
315
+ * Generate a unique flow ID for correlating multi-threaded traces.
316
+ */
317
+ profileFlowId(): number;
318
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxPerformance, never>;
319
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
320
+ }
321
+ /**
322
+ * Profiling counters collected by the renderer during a session.
323
+ * Only populated when the app is built with `__PROFILE__` enabled —
324
+ * in production, instrumentation is dead-code-eliminated and all values stay 0.
325
+ */
326
+ type DevToolsStats = {
327
+ cdCycles: number;
328
+ elementCreated: number;
329
+ elementRemoved: number;
330
+ flushCount: number;
331
+ lastCdDurationMs: number;
332
+ };
333
+ /**
334
+ * High-level DevTools service exposing performance stats as Angular signals.
335
+ *
336
+ * Stats are only meaningful when the app is built with `__PROFILE__` enabled.
337
+ * In production builds, counters are never incremented (the instrumentation
338
+ * code is dead-code-eliminated), so all values remain zero.
339
+ *
340
+ * @usageNotes
341
+ * ```typescript
342
+ * const devtools = inject(LynxDevTools);
343
+ *
344
+ * // Read stats reactively in a template
345
+ * <text>CD cycles: {{ devtools.stats().cdCycles }}</text>
346
+ *
347
+ * // Take a one-shot snapshot
348
+ * const snap = devtools.snapshot();
349
+ * console.log('Elements created:', snap.elementCreated);
350
+ *
351
+ * // Reset counters
352
+ * devtools.reset();
353
+ * ```
354
+ */
355
+ export declare class LynxDevTools {
356
+ #private;
357
+ /**
358
+ * Reactive stats snapshot. Re-reads from `devStats` each time
359
+ * `refresh()` is called, or automatically after `reset()`.
360
+ */
361
+ readonly stats: import("@angular/core").Signal<DevToolsStats>;
362
+ /**
363
+ * Take a non-reactive snapshot of current counters.
364
+ */
365
+ snapshot(): DevToolsStats;
366
+ /**
367
+ * Bump the signal so `stats()` re-evaluates with latest counter values.
368
+ */
369
+ refresh(): void;
370
+ /**
371
+ * Zero all counters and update the reactive signal.
372
+ */
373
+ reset(): void;
374
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxDevTools, never>;
375
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
376
+ }
377
+ /**
378
+ * Module-level counters for hot-path instrumentation.
379
+ * Plain object avoids DI/signal overhead on every element operation.
380
+ * Only incremented when __PROFILE__ is true (dead-code-eliminated otherwise).
381
+ */
382
+ declare const devStats: DevToolsStats & {
383
+ reset(): void;
384
+ };
385
+ /**
386
+ * Extend this interface to type the raw data passed from native before processing.
387
+ *
388
+ * @example
389
+ * declare module '@blotch/angular-lynx' {
390
+ * interface InitDataRaw { userId: string; }
391
+ * }
392
+ */
393
+ interface InitDataRaw extends Record<string, unknown> {}
394
+ /**
395
+ * Extend this interface to type the processed init data used throughout the app.
396
+ *
397
+ * @example
398
+ * declare module '@blotch/angular-lynx' {
399
+ * interface InitData { userId: string; }
400
+ * }
401
+ */
402
+ interface InitData extends Record<string, unknown> {}
403
+ /**
404
+ * Extend this interface to type the global data passed from the native host.
405
+ *
406
+ * @example
407
+ * declare module '@blotch/angular-lynx' {
408
+ * interface GlobalData { theme: 'light' | 'dark'; }
409
+ * }
410
+ */
411
+ interface GlobalData extends Record<string, unknown> {}
412
+ type DataProcessorDefinition = {
413
+ /**
414
+ * Transform raw native init data before it is stored in LynxInitData.
415
+ */
416
+ defaultDataProcessor?: (rawInitData: InitDataRaw) => InitData;
417
+ /**
418
+ * Named processors callable by the native side via processData(data, processorName).
419
+ */
420
+ dataProcessors?: Record<string, (...args: any[]) => any>;
421
+ };
422
+ /**
423
+ * Register data processor functions that the native Lynx runtime calls before
424
+ * delivering init data to the app. Maps to the global `processData` callback.
425
+ *
426
+ * Call this before bootstrapApplication so that native data is transformed
427
+ * before LynxInitData receives the first onDataChanged event.
428
+ *
429
+ * @example
430
+ * registerDataProcessors({
431
+ * defaultDataProcessor: (raw) => ({ ...raw, theme: raw.theme ?? 'light' }),
432
+ * });
433
+ * bootstrapApplication(App, appConfig);
434
+ */
435
+ export declare const registerDataProcessors: (definition: DataProcessorDefinition) => void;
436
+ export declare class LynxGlobalData {
437
+ readonly globalData: import("@angular/core").WritableSignal<GlobalData>;
438
+ constructor();
439
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxGlobalData, never>;
440
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
441
+ }
442
+ export declare class LynxInitData {
443
+ readonly initData: import("@angular/core").WritableSignal<InitData>;
444
+ constructor();
445
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxInitData, never>;
446
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
447
+ }
448
+ /**
449
+ * Angular ErrorHandler that routes errors to the native Lynx error reporting API.
450
+ *
451
+ * Automatically provided by provideRenderer(). Also writes to __lynxLastError
452
+ * so components can surface errors as <text> elements (no console on device).
453
+ */
454
+ export declare class LynxErrorHandler implements ErrorHandler {
455
+ handleError(error: unknown): void;
456
+ /**
457
+ * Called by Angular for rendering errors caught by an `@boundary` block.
458
+ *
459
+ * Without this override Angular falls back to `handleError`, which reports a
460
+ * fatal LEPUS error — on device that raises the red error overlay even though
461
+ * the boundary already swapped in its `@error` fallback and the app is still
462
+ * usable. A caught error is recoverable by definition, so it goes to
463
+ * `lynx.reportError` at `warning` level instead: monitoring still sees it,
464
+ * but it isn't treated as a crash.
465
+ *
466
+ * Angular calls this synchronously mid-render, so it must not write to
467
+ * signals (NG0600) — it only touches a plain global and the native bridge.
468
+ */
469
+ onViewError(error: Error, _details: ErrorDetails): void;
470
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxErrorHandler, never>;
471
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
472
+ }
473
+ export declare class LynxExposure implements OnDestroy {
474
+ #private;
475
+ readonly visible: import("@angular/core").WritableSignal<boolean>;
476
+ constructor();
477
+ ngOnDestroy(): void;
478
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxExposure, never>;
479
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxExposure, "[lynxExposure]", ["lynxExposure"], {}, {}, never, never, true, never>;
480
+ }
481
+ /**
482
+ * Wire format for individual exposure/disexposure event entries.
483
+ * Dual-cased fields (kebab and camel) match the Lynx engine's output exactly.
484
+ */
485
+ type ExposureEventDetail = {
486
+ 'exposure-id': string;
487
+ 'exposure-scene': string;
488
+ exposureID: string;
489
+ exposureScene: string;
490
+ 'unique-id': number;
491
+ };
492
+ /**
493
+ * The Lynx engine batches element visibility changes at ~20fps and dispatches
494
+ * them as arrays via GlobalEventEmitter ('exposure' / 'disexposure' events).
495
+ */
496
+ type GlobalExposureEvent = ExposureEventDetail[];
497
+ type ObserverFrameRateOptions = {
498
+ forPageRect?: number;
499
+ forExposureCheck?: number;
500
+ };
501
+ export declare class LynxGlobalExposure {
502
+ readonly exposures: import("@angular/core").WritableSignal<GlobalExposureEvent>;
503
+ readonly disexposures: import("@angular/core").WritableSignal<GlobalExposureEvent>;
504
+ readonly active: import("@angular/core").WritableSignal<boolean>;
505
+ constructor();
506
+ /**
507
+ * Pauses global exposure detection. Elements with exposure-id stop generating
508
+ * exposure/disexposure GlobalEventEmitter events. Element-level
509
+ * binduiappear/binduidisappear events continue to fire.
510
+ */
511
+ stopExposure(options?: {
512
+ sendEvent: boolean;
513
+ }): void;
514
+ resumeExposure(): void;
515
+ setObserverFrameRate(options?: ObserverFrameRateOptions): void;
516
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxGlobalExposure, never>;
517
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
518
+ }
519
+ /**
520
+ * Configuration for a custom font face to register dynamically via `lynx.addFont()`.
521
+ *
522
+ * Only `fontFamily` and `src` are supported by the Lynx engine.
523
+ * Platform formats: Android (TTF, OTF, TTC), iOS (TTF, OTF, WOFF, WOFF2).
524
+ */
525
+ type LynxFontFaceConfig = {
526
+ fontFamily: string;
527
+ src: string;
528
+ };
529
+ type LynxFontStatus = 'idle' | 'loading' | 'loaded' | 'error';
530
+ type LynxFontEntry = {
531
+ fontFamily: string;
532
+ src: string;
533
+ status: LynxFontStatus;
534
+ error?: Error;
535
+ };
536
+ /**
537
+ * Wraps `lynx.addFont()` with a Promise-based API and reactive signal state.
538
+ *
539
+ * Use CSS `@font-face` in stylesheets for fonts known at build time (the
540
+ * standard Angular approach). Use this service only for fonts that must be
541
+ * loaded dynamically at runtime.
542
+ *
543
+ * @usageNotes
544
+ * ```typescript
545
+ * const fontService = inject(LynxFont);
546
+ *
547
+ * await fontService.addFont({
548
+ * fontFamily: 'CustomFont',
549
+ * src: 'https://example.com/custom-font.ttf',
550
+ * });
551
+ *
552
+ * // Reactive state
553
+ * const loaded = fontService.loadedFamilies(); // ReadonlySet<string>
554
+ * ```
555
+ */
556
+ export declare class LynxFont {
557
+ #private;
558
+ readonly fonts: import("@angular/core").Signal<ReadonlyMap<string, LynxFontEntry>>;
559
+ readonly loadedFamilies: import("@angular/core").Signal<ReadonlySet<string>>;
560
+ addFont(config: LynxFontFaceConfig): Promise<void>;
561
+ isLoaded(fontFamily: string): boolean;
562
+ getStatus(fontFamily: string): LynxFontStatus;
563
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxFont, never>;
564
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
565
+ }
566
+ /**
567
+ * Loads an external Lynx component bundle at runtime and returns the Angular
568
+ * component type. Wraps the native `__QueryComponent` PAPI — bundles must be
569
+ * built with `experimental_isLazyBundle: true` in the rsbuild plugin.
570
+ */
571
+ export declare const loadLazyBundle: (source: string) => Promise<Type<unknown>>;
572
+ /**
573
+ * Reads `lynx.__globalProps.appLocale` directly, without Angular DI.
574
+ *
575
+ * Use this before `bootstrapApplication()` runs — e.g. to conditionally call
576
+ * `loadTranslations()` — since no injector exists yet at that point. Once the
577
+ * app is bootstrapped, prefer injecting `LynxLocale` for reactive access.
578
+ *
579
+ * Returns `undefined` outside a Lynx environment or when the host hasn't set
580
+ * a locale; callers decide their own fallback.
581
+ *
582
+ * @usageNotes
583
+ * ```typescript
584
+ * if (getLynxAppLocale() === 'fr') {
585
+ * loadTranslations({ 'app.greeting': 'Bonjour le monde !' });
586
+ * }
587
+ *
588
+ * bootstrapApplication(App, appConfig);
589
+ * ```
590
+ */
591
+ export declare const getLynxAppLocale: () => string | undefined;
592
+ /**
593
+ * Provides reactive access to the current locale on Lynx.
594
+ *
595
+ * Reads `lynx.__globalProps.appLocale` (set by the native host). Falls back to
596
+ * the `sourceLocale` from angular.json (injected as `__LYNX_SOURCE_LOCALE__`
597
+ * at build time), then to `'en-US'`.
598
+ *
599
+ * @usageNotes
600
+ * ```typescript
601
+ * const locale = inject(LynxLocale);
602
+ *
603
+ * // Reactive in templates
604
+ * template: `<text>Current locale: {{ locale.locale() }}</text>`
605
+ *
606
+ * // For LOCALE_ID integration, add provideLocale() to your app config
607
+ * ```
608
+ */
609
+ export declare class LynxLocale {
610
+ #private;
611
+ /**
612
+ * The current locale. Reactive — updates when global props change.
613
+ */
614
+ readonly locale: import("@angular/core").Signal<string>;
615
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxLocale, never>;
616
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
617
+ }
618
+ /**
619
+ * Provides Angular's `LOCALE_ID` token from the Lynx runtime locale.
620
+ *
621
+ * Add this to your application's providers to automatically configure
622
+ * Angular's locale-aware features (pipes, i18n) with the locale from
623
+ * `lynx.__globalProps.appLocale`.
624
+ *
625
+ * @usageNotes
626
+ * ```typescript
627
+ * bootstrapApplication(App, {
628
+ * providers: [provideRenderer(), provideLocale()],
629
+ * });
630
+ * ```
631
+ */
632
+ export declare const provideLocale: () => EnvironmentProviders;
633
+ /**
634
+ * Controls gesture state from within a callback.
635
+ * Wraps __SetGestureState and __ConsumeGesture PAPI calls.
636
+ * Passed as the second argument to gesture callbacks so handlers can
637
+ * programmatically drive the gesture state machine (e.g. activate a gesture
638
+ * only when a condition is met, or fail it early to let a competing gesture win).
639
+ */
640
+ export declare class GestureStateManager {
641
+ #private;
642
+ constructor(element: ElementRef, gestureId: number);
643
+ /**
644
+ * State codes match Lynx's native gesture state enum:
645
+ * 1 = ACTIVE, 2 = FAILED, 3 = END
646
+ */
647
+ fail(): void;
648
+ activate(): void;
649
+ end(): void;
650
+ /**
651
+ * `{ consume }` stops the gesture from bubbling up to ancestor elements.
652
+ * Use this when this element should handle the gesture exclusively and
653
+ * parent scroll containers or gesture detectors should not also receive it.
654
+ */
655
+ consumeGesture(consume?: boolean): void;
656
+ /**
657
+ * `{ inner: intercept }` intercepts gestures from DESCENDANT elements —
658
+ * the opposite direction of consumeGesture. Use this on a parent to claim
659
+ * a gesture before children can handle it (e.g. a pull-to-refresh view
660
+ * intercepting scrolls inside its list child).
661
+ */
662
+ interceptGesture(intercept?: boolean): void;
663
+ }
664
+ /**
665
+ * Gesture type IDs matching the Lynx native engine (from @lynx-js/react gesture-runtime).
666
+ */
667
+ export declare enum GestureType {
668
+ PAN = 0,
669
+ FLING = 1,
670
+ DEFAULT = 2,
671
+ TAP = 3,
672
+ LONGPRESS = 4,
673
+ ROTATION = 5,
674
+ PINCH = 6,
675
+ NATIVE = 7
676
+ }
677
+ export declare enum GestureState {
678
+ UNDETERMINED = 0,
679
+ BEGAN = 1,
680
+ ACTIVE = 2,
681
+ END = 3,
682
+ FAILED = 4,
683
+ CANCELED = 5
684
+ }
685
+ type GestureEvent = {
686
+ /**
687
+ * Optional: the native engine conveys the phase through the callback that
688
+ * fires (onBegin/onStart/onUpdate/onEnd), not a field on the event payload,
689
+ * so `state` is usually absent at runtime.
690
+ */
691
+ state?: GestureState;
692
+ /**
693
+ * Absolute (page-relative) coordinates, derived at runtime by mapGestureEvent
694
+ * from the native `pageX`/`pageY`. Optional (was required) because they're
695
+ * only present when the gesture's payload carries coordinates — making the
696
+ * type promise a `number` that isn't always there was a latent footgun.
697
+ */
698
+ absoluteX?: number;
699
+ absoluteY?: number;
700
+ /**
701
+ * The untouched native params dict (Lynx field names: scrollX, pageX, x, y,
702
+ * isAtStart, …). Escape hatch for reading fields that have no flat alias —
703
+ * the flat properties above are derived from it. See mapGestureEvent.
704
+ */
705
+ params?: Record<string, unknown>;
706
+ };
707
+ type PanGestureEvent = {
708
+ translationX: number;
709
+ translationY: number;
710
+ velocityX: number;
711
+ velocityY: number;
712
+ } & GestureEvent;
713
+ type TapGestureEvent = {
714
+ x: number;
715
+ y: number;
716
+ } & GestureEvent;
717
+ type FlingGestureEvent = {
718
+ velocityX: number;
719
+ velocityY: number;
720
+ } & GestureEvent;
721
+ type PinchGestureEvent = {
722
+ scale: number;
723
+ velocity: number;
724
+ } & GestureEvent;
725
+ type RotationGestureEvent = {
726
+ rotation: number;
727
+ velocity: number;
728
+ } & GestureEvent;
729
+ type LongPressGestureEvent = {
730
+ x: number;
731
+ y: number;
732
+ duration: number;
733
+ } & GestureEvent;
734
+ /**
735
+ * Bitmask values — combine with bitwise OR for multi-direction fling:
736
+ * e.g. FlingDirection.LEFT | FlingDirection.RIGHT for horizontal fling.
737
+ */
738
+ export declare enum FlingDirection {
739
+ RIGHT = 1,
740
+ LEFT = 2,
741
+ UP = 4,
742
+ DOWN = 8
743
+ }
744
+ type GestureCallback<TEvent extends GestureEvent = GestureEvent> = (event: TEvent) => void;
745
+ type GestureCallbackWithState<TEvent extends GestureEvent = GestureEvent> = (event: TEvent, stateManager: GestureStateManager) => void;
746
+ export declare abstract class BaseGesture<TEvent extends GestureEvent = GestureEvent, TSelf extends BaseGesture<TEvent, any> = any> {
747
+ readonly id: number;
748
+ abstract readonly type: GestureType;
749
+ /**
750
+ * @internal — accessed by the directive to build the PAPI config.
751
+ * GestureCallback<any> avoids an invariance error when assigning concrete gesture
752
+ * subclasses (e.g. PanGesture) to BaseGesture<GestureEvent, any>. The directive
753
+ * already casts callbacks to any when invoking them, so the wider type is safe.
754
+ */
755
+ _callbacks: Record<string, GestureCallback<any>>;
756
+ /**
757
+ * @internal
758
+ */
759
+ _config: Record<string, unknown>;
760
+ /**
761
+ * @internal
762
+ */
763
+ _waitFor: BaseGesture[];
764
+ /**
765
+ * @internal
766
+ */
767
+ _simultaneousWith: BaseGesture[];
768
+ /**
769
+ * @internal
770
+ */
771
+ _continueWith: BaseGesture[];
772
+ onBegin(cb: GestureCallbackWithState<TEvent>): TSelf;
773
+ /**
774
+ * Fires when the gesture is RECOGNIZED (transitions to active). For a tap this
775
+ * is the only callback that fires exclusively on success — see `onEnd`.
776
+ */
777
+ onStart(cb: GestureCallbackWithState<TEvent>): TSelf;
778
+ /**
779
+ * Fires when the gesture ends.
780
+ *
781
+ * For discrete gestures (tap, long-press) LynxGestureDetector normalizes this
782
+ * to fire ONLY when the gesture was actually recognized. Lynx's native engine
783
+ * emits `onEnd` on failure too — the iOS `fail` path calls it — so a drag that
784
+ * overshoots a tap's `maxDistance` would otherwise still trigger `onEnd`. The
785
+ * directive suppresses that failed-gesture `onEnd`; continuous gestures pass
786
+ * through unchanged. See gesture-detector.ts.
787
+ */
788
+ onEnd(cb: GestureCallbackWithState<TEvent>): TSelf;
789
+ onTouchesDown(cb: GestureCallbackWithState<TEvent>): TSelf;
790
+ onTouchesUp(cb: GestureCallbackWithState<TEvent>): TSelf;
791
+ /**
792
+ * Delays this gesture until all listed gestures have failed.
793
+ * Use to give higher-priority gestures (e.g. double-tap) first right of refusal.
794
+ * `as unknown as TSelf` is needed because TypeScript can't prove that `this`
795
+ * satisfies the concrete TSelf bound — the double cast is intentional.
796
+ */
797
+ waitFor(...gestures: BaseGesture[]): TSelf;
798
+ /**
799
+ * Allows this gesture and the listed gestures to be active at the same time.
800
+ * Without this, Lynx's gesture system lets only one gesture be active per element.
801
+ */
802
+ simultaneousWith(...gestures: BaseGesture[]): TSelf;
803
+ /**
804
+ * This gesture activates after the listed gestures END (not fail).
805
+ * Useful for chaining: e.g. a long-press followed by a drag.
806
+ */
807
+ continueWith(...gestures: BaseGesture[]): TSelf;
808
+ enabled(value: boolean): TSelf;
809
+ }
810
+ /**
811
+ * Continuous gestures (pan, fling, rotation, pinch) have an onUpdate callback
812
+ * that fires on every frame while the gesture is active.
813
+ */
814
+ export declare abstract class ContinuousGesture<TEvent extends GestureEvent = GestureEvent, TSelf extends ContinuousGesture<TEvent, any> = any> extends BaseGesture<TEvent, TSelf> {
815
+ onUpdate(cb: GestureCallbackWithState<TEvent>): TSelf;
816
+ }
817
+ type AnyGesture$1 = BaseGesture<any, any>;
818
+ export declare class ComposedGesture {
819
+ readonly gestures: AnyGesture$1[];
820
+ readonly compositionType: 'simultaneous' | 'exclusive' | 'race';
821
+ constructor(gestures: AnyGesture$1[], compositionType: 'simultaneous' | 'exclusive' | 'race');
822
+ }
823
+ export declare const Gesture: {
824
+ Simultaneous(...gestures: AnyGesture$1[]): ComposedGesture;
825
+ Exclusive(...gestures: AnyGesture$1[]): ComposedGesture;
826
+ Race(...gestures: AnyGesture$1[]): ComposedGesture;
827
+ };
828
+ export declare class FlingGesture extends ContinuousGesture<FlingGestureEvent, FlingGesture> {
829
+ readonly type = GestureType.FLING;
830
+ /**
831
+ * FlingDirection is a bitmask — combine values with | for multi-direction:
832
+ * e.g. FlingDirection.LEFT | FlingDirection.RIGHT recognizes horizontal flings.
833
+ */
834
+ direction(dir: FlingDirection): this;
835
+ /**
836
+ * The gesture only recognizes when exactly `count` fingers are involved.
837
+ * Defaults to 1 if not set.
838
+ */
839
+ numberOfPointers(count: number): this;
840
+ }
841
+ type AnyGesture = BaseGesture<any, any>;
842
+ type GestureInput = AnyGesture | AnyGesture[] | ComposedGesture;
843
+ /**
844
+ * Directive that bridges Angular's gesture binding to Lynx's native gesture
845
+ * system (__SetGestureDetector / __RemoveGestureDetector). Accepts a single
846
+ * gesture, an array of gestures, or a ComposedGesture (simultaneous/exclusive).
847
+ * Each gesture is registered with the native engine via its unique numeric ID.
848
+ *
849
+ * Cross-package prerequisite (easy to miss when debugging): the native engine
850
+ * silently ignores every __SetGestureDetector call unless the compiled page
851
+ * config has `enableNewGesture: true`. @blotch/rsbuild-plugin-angular-lynx
852
+ * defaults that flag ON, so this directive works out of the box — but if
853
+ * gestures ever go dead app-wide with no error, that build flag is the first
854
+ * thing to check, not this directive.
855
+ */
856
+ export declare class LynxGestureDetector implements OnChanges, OnDestroy {
857
+ #private;
858
+ lynxGesture: GestureInput;
859
+ /**
860
+ * Full teardown + re-register on every input change. This is safe because
861
+ * gesture IDs are stable (assigned once in BaseGesture constructor), so
862
+ * inter-gesture relationships (waitFor, simultaneousWith) stay valid.
863
+ */
864
+ ngOnChanges(_changes: SimpleChanges): void;
865
+ ngOnDestroy(): void;
866
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxGestureDetector, never>;
867
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxGestureDetector, "[lynxGesture]", never, {
868
+ "lynxGesture": {
869
+ "alias": "lynxGesture";
870
+ "required": false;
871
+ };
872
+ }, {}, never, never, true, never>;
873
+ }
874
+ export declare class LongPressGesture extends BaseGesture<LongPressGestureEvent, LongPressGesture> {
875
+ readonly type = GestureType.LONGPRESS;
876
+ /**
877
+ * Seed the FULL default config on construction. Without an explicit
878
+ * `maxDistance`, calling only `minDuration()` would send a partial config and
879
+ * the native handler would read `maxDistance` back as `0` — failing the
880
+ * long-press on the tiniest finger jitter. Mirrors Lynx's own gesture-runtime
881
+ * LongPressGesture defaults. See ./const for the full explanation.
882
+ */
883
+ _config: Record<string, unknown>;
884
+ /**
885
+ * Minimum hold time in ms before the gesture is recognized.
886
+ * Shorter presses are treated as taps and ignored.
887
+ */
888
+ minDuration(ms: number): this;
889
+ /**
890
+ * If the finger drifts more than `px` pixels from the initial touch point
891
+ * during the hold, the gesture fails — allowing a scroll to take over.
892
+ */
893
+ maxDistance(px: number): this;
894
+ }
895
+ export declare class PanGesture extends ContinuousGesture<PanGestureEvent, PanGesture> {
896
+ readonly type = GestureType.PAN;
897
+ /**
898
+ * Seed the default config on construction so a complete config is always sent
899
+ * to native, keeping behavior consistent with the other gestures. Mirrors
900
+ * Lynx's own gesture-runtime PanGesture defaults. See ./const.
901
+ */
902
+ _config: Record<string, unknown>;
903
+ minDistance(distance: number): this;
904
+ /**
905
+ * activeOffset: the gesture activates once the finger moves past this
906
+ * threshold. A number means "any direction" (symmetrical); a tuple [min, max]
907
+ * means the offset must be within that range. Example: activeOffsetX(20)
908
+ * activates after 20px of horizontal movement.
909
+ */
910
+ activeOffsetX(offset: number | [number, number]): this;
911
+ activeOffsetY(offset: number | [number, number]): this;
912
+ /**
913
+ * failOffset: if the finger moves past this threshold in the perpendicular
914
+ * direction, the gesture fails (ceding to a competing gesture). Example:
915
+ * failOffsetY(10) on a horizontal pan: if the user moves >10px vertically
916
+ * before activating, the gesture fails and a vertical scroll can take over.
917
+ */
918
+ failOffsetX(offset: number | [number, number]): this;
919
+ failOffsetY(offset: number | [number, number]): this;
920
+ minPointers(count: number): this;
921
+ maxPointers(count: number): this;
922
+ }
923
+ export declare class PinchGesture extends ContinuousGesture<PinchGestureEvent, PinchGesture> {
924
+ readonly type = GestureType.PINCH;
925
+ }
926
+ export declare class RotationGesture extends ContinuousGesture<RotationGestureEvent, RotationGesture> {
927
+ readonly type = GestureType.ROTATION;
928
+ }
929
+ export declare class TapGesture extends BaseGesture<TapGestureEvent, TapGesture> {
930
+ readonly type = GestureType.TAP;
931
+ /**
932
+ * Seed the FULL default config on construction. The native iOS handler reads
933
+ * any absent config key as `0` once a config is present, so shipping a partial
934
+ * config (e.g. only `numberOfTaps`) would zero out `maxDuration`/`maxDistance`
935
+ * and make every tap fail instantly. Mirrors Lynx's own gesture-runtime
936
+ * TapGesture defaults. See ./const for the full explanation.
937
+ */
938
+ _config: Record<string, unknown>;
939
+ /**
940
+ * For double/triple tap, pair with waitFor on the single-tap gesture so
941
+ * the single-tap handler doesn't fire prematurely before the count is met.
942
+ *
943
+ * ⚠️ NOT enforced by the Lynx native runtime — no platform handler implements
944
+ * multi-tap counting (a whole-tree search of the Lynx source turns up nothing
945
+ * that reads `numberOfTaps`), so setting this is currently a no-op on-device.
946
+ * To detect a double-tap, time successive taps yourself in the callback. Kept
947
+ * for API parity with Lynx's gesture-runtime.
948
+ */
949
+ numberOfTaps(count: number): this;
950
+ /**
951
+ * Maximum time between finger-down and finger-up for a tap to register.
952
+ * Touches held longer than this are treated as a long-press.
953
+ */
954
+ maxDuration(ms: number): this;
955
+ /**
956
+ * If the finger travels more than `px` pixels before lifting, the tap fails.
957
+ * Keeps a tap distinct from a small drag.
958
+ */
959
+ maxDistance(px: number): this;
960
+ }
961
+ /**
962
+ * @Directive() is required so that ng-packagr's Angular partial compiler
963
+ * recognizes this base class as an Angular artifact. The selector is left
964
+ * empty — the class is never used directly as a directive.
965
+ *
966
+ * DESIGN NOTES — why these are directives, not components:
967
+ *
968
+ * 1. No @Component: Components have their own template (<ng-content/>). When a
969
+ * component wraps content, Angular treats that content as "projected" — the
970
+ * native parent is not yet established while Angular initializes projected
971
+ * nodes. Any directive inside the projected content that injects
972
+ * ViewContainerRef (e.g. RouterOutlet) will crash because insertAnchorNode
973
+ * calls renderer.insertBefore(null, anchor) — null being the not-yet-resolved
974
+ * native parent. Using @Directive avoids projection entirely; children are
975
+ * rendered as direct element children just like without LYNX_ELEMENTS.
976
+ *
977
+ * 2. Properties are declared as inputs so that Angular's template checker
978
+ * accepts property bindings like [src]="url" without errors. Angular
979
+ * intercepts these bindings and sets them on the directive instance. The
980
+ * ngOnChanges hook forwards every input change to the native Lynx element
981
+ * via BaseLynxElement.setAttribute(), which calls __SetAttribute — the same
982
+ * endpoint that renderer.setProperty() would reach.
983
+ *
984
+ * 3. Events (bindtap, catchtap, bindinput, bindscroll, …) are NOT declared as
985
+ * @Output() because Angular would intercept them and skip the renderer's
986
+ * listen() call, breaking native Lynx event delivery. They continue to work
987
+ * via renderer.listen() which handles all unrecognized event names.
988
+ */
989
+ declare class LynxElementBase implements OnChanges {
990
+ #private;
991
+ ngOnChanges(changes: SimpleChanges): void;
992
+ id?: string;
993
+ /**
994
+ * Named reference accessible via lynx.getElementById / findViewByName.
995
+ */
996
+ name?: string;
997
+ /**
998
+ * Whether this element is an accessibility node.
999
+ */
1000
+ 'accessibility-element'?: boolean;
1001
+ /**
1002
+ * Text read aloud by screen readers.
1003
+ */
1004
+ 'accessibility-label'?: string;
1005
+ 'accessibility-trait'?: 'none' | 'button' | 'image' | 'text';
1006
+ /**
1007
+ * Comma-separated list of child element names that are accessibility nodes.
1008
+ */
1009
+ 'accessibility-elements'?: string;
1010
+ 'accessibility-elements-hidden'?: boolean;
1011
+ /**
1012
+ * Whether this element exclusively captures accessibility focus.
1013
+ */
1014
+ 'accessibility-exclusive-focus'?: boolean;
1015
+ /**
1016
+ * Accessibility identifier (separate from name).
1017
+ */
1018
+ 'a11y-id'?: string;
1019
+ /**
1020
+ * Whether the element receives touch events (default: true).
1021
+ */
1022
+ 'user-interaction-enabled'?: boolean;
1023
+ /**
1024
+ * Whether the element receives platform-native gestures.
1025
+ */
1026
+ 'native-interaction-enabled'?: boolean;
1027
+ /**
1028
+ * Whether touch events pass through to elements below.
1029
+ */
1030
+ 'event-through'?: boolean;
1031
+ /**
1032
+ * Extends the touch target area. Object or CSS-shorthand string.
1033
+ */
1034
+ 'hit-slop'?: string | object;
1035
+ /**
1036
+ * Whether the element consumes native iOS/Android gestures.
1037
+ */
1038
+ 'block-native-event'?: boolean;
1039
+ /**
1040
+ * Whether focus events are suppressed.
1041
+ */
1042
+ 'ignore-focus'?: boolean;
1043
+ /**
1044
+ * Allow simultaneous touch recognition (iOS).
1045
+ */
1046
+ 'ios-enable-simultaneous-touch'?: boolean;
1047
+ /**
1048
+ * Unique ID used for impression/exposure analytics.
1049
+ */
1050
+ 'exposure-id'?: string;
1051
+ /**
1052
+ * Scene identifier grouping exposure events.
1053
+ */
1054
+ 'exposure-scene'?: string;
1055
+ /**
1056
+ * Percentage of the element that must be visible (0–100) to trigger exposure.
1057
+ */
1058
+ 'exposure-area'?: number;
1059
+ /**
1060
+ * Extends/shrinks the viewport detection zone (top edge, in px).
1061
+ */
1062
+ 'exposure-screen-margin-top'?: number | string;
1063
+ /**
1064
+ * Extends/shrinks the viewport detection zone (bottom edge, in px).
1065
+ */
1066
+ 'exposure-screen-margin-bottom'?: number | string;
1067
+ /**
1068
+ * Extends/shrinks the viewport detection zone (left edge, in px).
1069
+ */
1070
+ 'exposure-screen-margin-left'?: number | string;
1071
+ /**
1072
+ * Extends/shrinks the viewport detection zone (right edge, in px).
1073
+ */
1074
+ 'exposure-screen-margin-right'?: number | string;
1075
+ /**
1076
+ * Adjusts the element's own bounding rect for exposure detection (top, in px).
1077
+ */
1078
+ 'exposure-ui-margin-top'?: number | string;
1079
+ /**
1080
+ * Adjusts the element's own bounding rect for exposure detection (bottom, in px).
1081
+ */
1082
+ 'exposure-ui-margin-bottom'?: number | string;
1083
+ /**
1084
+ * Adjusts the element's own bounding rect for exposure detection (left, in px).
1085
+ */
1086
+ 'exposure-ui-margin-left'?: number | string;
1087
+ /**
1088
+ * Adjusts the element's own bounding rect for exposure detection (right, in px).
1089
+ */
1090
+ 'exposure-ui-margin-right'?: number | string;
1091
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxElementBase, never>;
1092
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxElementBase, never, never, {
1093
+ "id": {
1094
+ "alias": "id";
1095
+ "required": false;
1096
+ };
1097
+ "name": {
1098
+ "alias": "name";
1099
+ "required": false;
1100
+ };
1101
+ "accessibility-element": {
1102
+ "alias": "accessibility-element";
1103
+ "required": false;
1104
+ };
1105
+ "accessibility-label": {
1106
+ "alias": "accessibility-label";
1107
+ "required": false;
1108
+ };
1109
+ "accessibility-trait": {
1110
+ "alias": "accessibility-trait";
1111
+ "required": false;
1112
+ };
1113
+ "accessibility-elements": {
1114
+ "alias": "accessibility-elements";
1115
+ "required": false;
1116
+ };
1117
+ "accessibility-elements-hidden": {
1118
+ "alias": "accessibility-elements-hidden";
1119
+ "required": false;
1120
+ };
1121
+ "accessibility-exclusive-focus": {
1122
+ "alias": "accessibility-exclusive-focus";
1123
+ "required": false;
1124
+ };
1125
+ "a11y-id": {
1126
+ "alias": "a11y-id";
1127
+ "required": false;
1128
+ };
1129
+ "user-interaction-enabled": {
1130
+ "alias": "user-interaction-enabled";
1131
+ "required": false;
1132
+ };
1133
+ "native-interaction-enabled": {
1134
+ "alias": "native-interaction-enabled";
1135
+ "required": false;
1136
+ };
1137
+ "event-through": {
1138
+ "alias": "event-through";
1139
+ "required": false;
1140
+ };
1141
+ "hit-slop": {
1142
+ "alias": "hit-slop";
1143
+ "required": false;
1144
+ };
1145
+ "block-native-event": {
1146
+ "alias": "block-native-event";
1147
+ "required": false;
1148
+ };
1149
+ "ignore-focus": {
1150
+ "alias": "ignore-focus";
1151
+ "required": false;
1152
+ };
1153
+ "ios-enable-simultaneous-touch": {
1154
+ "alias": "ios-enable-simultaneous-touch";
1155
+ "required": false;
1156
+ };
1157
+ "exposure-id": {
1158
+ "alias": "exposure-id";
1159
+ "required": false;
1160
+ };
1161
+ "exposure-scene": {
1162
+ "alias": "exposure-scene";
1163
+ "required": false;
1164
+ };
1165
+ "exposure-area": {
1166
+ "alias": "exposure-area";
1167
+ "required": false;
1168
+ };
1169
+ "exposure-screen-margin-top": {
1170
+ "alias": "exposure-screen-margin-top";
1171
+ "required": false;
1172
+ };
1173
+ "exposure-screen-margin-bottom": {
1174
+ "alias": "exposure-screen-margin-bottom";
1175
+ "required": false;
1176
+ };
1177
+ "exposure-screen-margin-left": {
1178
+ "alias": "exposure-screen-margin-left";
1179
+ "required": false;
1180
+ };
1181
+ "exposure-screen-margin-right": {
1182
+ "alias": "exposure-screen-margin-right";
1183
+ "required": false;
1184
+ };
1185
+ "exposure-ui-margin-top": {
1186
+ "alias": "exposure-ui-margin-top";
1187
+ "required": false;
1188
+ };
1189
+ "exposure-ui-margin-bottom": {
1190
+ "alias": "exposure-ui-margin-bottom";
1191
+ "required": false;
1192
+ };
1193
+ "exposure-ui-margin-left": {
1194
+ "alias": "exposure-ui-margin-left";
1195
+ "required": false;
1196
+ };
1197
+ "exposure-ui-margin-right": {
1198
+ "alias": "exposure-ui-margin-right";
1199
+ "required": false;
1200
+ };
1201
+ }, {}, never, never, true, never>;
1202
+ }
1203
+ /**
1204
+ * Backdrop blur: blurs the content rendered behind the element, like CSS
1205
+ * `backdrop-filter: blur()`. On iOS, `blur-effect="glass"` renders the
1206
+ * Liquid Glass material.
1207
+ */
1208
+ export declare class LynxBlurView extends LynxElementBase {
1209
+ /**
1210
+ * Gaussian blur radius (Android/iOS/Harmony). @default '0px'
1211
+ */
1212
+ 'blur-radius'?: string;
1213
+ /**
1214
+ * Downsampling ratio of the blurred area. Higher is faster but softer (Android). @default 6
1215
+ */
1216
+ 'blur-sampling'?: number;
1217
+ /**
1218
+ * Whether the blur updates automatically as content behind it changes (Android). @default true
1219
+ */
1220
+ 'enable-auto-blur'?: boolean;
1221
+ /**
1222
+ * Raw id of the view to capture and blur; it must have `flatten="false"` (Android).
1223
+ */
1224
+ 'android-capture-target'?: string;
1225
+ /**
1226
+ * Switches the internal blur-buffer refresh path (Android, experimental).
1227
+ */
1228
+ 'experimental-update-blur-radius'?: boolean;
1229
+ /**
1230
+ * Blur material (iOS). `glass` renders Liquid Glass; `glass-container`
1231
+ * merges nested glass `<blur-view>`s into one combined effect. @default 'light'
1232
+ */
1233
+ 'blur-effect'?: 'light' | 'extra-light' | 'dark' | 'glass' | 'glass-container';
1234
+ /**
1235
+ * Distance at which glass elements inside a `glass-container` start to merge (iOS). @default 0
1236
+ */
1237
+ spacing?: number;
1238
+ /**
1239
+ * Whether the glass reacts to touches (iOS). @default false
1240
+ */
1241
+ 'glass-interactive'?: boolean;
1242
+ /**
1243
+ * Tint color applied to the glass (iOS). @default 'transparent'
1244
+ */
1245
+ 'glass-tint-color'?: string;
1246
+ /**
1247
+ * Glass variant (iOS). @default 'regular'
1248
+ */
1249
+ 'glass-style'?: 'regular' | 'clear';
1250
+ /**
1251
+ * Forces a light or dark appearance for the material (iOS, Lynx 4.1+).
1252
+ */
1253
+ 'ios-user-interface-style'?: 'dark' | 'light';
1254
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxBlurView, never>;
1255
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxBlurView, "blur-view", never, {
1256
+ "blur-radius": {
1257
+ "alias": "blur-radius";
1258
+ "required": false;
1259
+ };
1260
+ "blur-sampling": {
1261
+ "alias": "blur-sampling";
1262
+ "required": false;
1263
+ };
1264
+ "enable-auto-blur": {
1265
+ "alias": "enable-auto-blur";
1266
+ "required": false;
1267
+ };
1268
+ "android-capture-target": {
1269
+ "alias": "android-capture-target";
1270
+ "required": false;
1271
+ };
1272
+ "experimental-update-blur-radius": {
1273
+ "alias": "experimental-update-blur-radius";
1274
+ "required": false;
1275
+ };
1276
+ "blur-effect": {
1277
+ "alias": "blur-effect";
1278
+ "required": false;
1279
+ };
1280
+ "spacing": {
1281
+ "alias": "spacing";
1282
+ "required": false;
1283
+ };
1284
+ "glass-interactive": {
1285
+ "alias": "glass-interactive";
1286
+ "required": false;
1287
+ };
1288
+ "glass-tint-color": {
1289
+ "alias": "glass-tint-color";
1290
+ "required": false;
1291
+ };
1292
+ "glass-style": {
1293
+ "alias": "glass-style";
1294
+ "required": false;
1295
+ };
1296
+ "ios-user-interface-style": {
1297
+ "alias": "ios-user-interface-style";
1298
+ "required": false;
1299
+ };
1300
+ }, {}, never, never, true, never>;
1301
+ }
1302
+ /**
1303
+ * Renders its children above embedded native views such as `<webview>`
1304
+ * (Clay Windows/macOS only). Has no element-specific attributes.
1305
+ */
1306
+ export declare class LynxCoverView extends LynxElementBase {
1307
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxCoverView, never>;
1308
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxCoverView, "cover-view", never, {}, {}, never, never, true, never>;
1309
+ }
1310
+ /**
1311
+ * ControlValueAccessor for <input> elements. Bridges Angular's form model
1312
+ * (reactive forms, template-driven NgModel, Signal Forms [formField]) to Lynx's
1313
+ * native events (bindinput, bindblur) instead of the standard DOM input/change events.
1314
+ *
1315
+ * Activated only when a form directive is present (formControl, formControlName,
1316
+ * ngModel, or formField) — bare <input> elements continue to use LynxInput alone.
1317
+ */
1318
+ export declare class LynxInputValueAccessor implements ControlValueAccessor {
1319
+ #private;
1320
+ onInput(event: Event): void;
1321
+ onBlur(): void;
1322
+ writeValue(value: string): void;
1323
+ registerOnChange(fn: (value: string) => void): void;
1324
+ registerOnTouched(fn: () => void): void;
1325
+ setDisabledState(isDisabled: boolean): void;
1326
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxInputValueAccessor, never>;
1327
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxInputValueAccessor, "input[formControlName],input[formControl],input[ngModel],input[formField]", never, {}, {}, never, never, true, never>;
1328
+ }
1329
+ /**
1330
+ * ControlValueAccessor for <textarea> elements. Bridges Angular's form model
1331
+ * (reactive forms, template-driven NgModel, Signal Forms [formField]) to Lynx's
1332
+ * native events (bindinput, bindblur) instead of the standard DOM input/change events.
1333
+ *
1334
+ * Activated only when a form directive is present (formControl, formControlName,
1335
+ * ngModel, or formField) — bare <textarea> elements continue to use LynxTextarea alone.
1336
+ */
1337
+ export declare class LynxTextareaValueAccessor implements ControlValueAccessor {
1338
+ #private;
1339
+ onInput(event: Event): void;
1340
+ onBlur(): void;
1341
+ writeValue(value: string): void;
1342
+ registerOnChange(fn: (value: string) => void): void;
1343
+ registerOnTouched(fn: () => void): void;
1344
+ setDisabledState(isDisabled: boolean): void;
1345
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxTextareaValueAccessor, never>;
1346
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxTextareaValueAccessor, "textarea[formControlName],textarea[formControl],textarea[ngModel],textarea[formField]", never, {}, {}, never, never, true, never>;
1347
+ }
1348
+ /**
1349
+ * Both Lynx form value accessors as a single importable array.
1350
+ */
1351
+ export declare const LYNX_FORM_ACCESSORS: readonly [typeof LynxInputValueAccessor, typeof LynxTextareaValueAccessor];
1352
+ /**
1353
+ * Embeds a separate Lynx bundle as a nested page.
1354
+ */
1355
+ export declare class LynxFrame extends LynxElementBase {
1356
+ /**
1357
+ * URL of the `.lynx.bundle` file to embed.
1358
+ */
1359
+ src?: string;
1360
+ /**
1361
+ * Initial data passed into the embedded page.
1362
+ */
1363
+ data?: Record<string, unknown>;
1364
+ /**
1365
+ * Global props forwarded to the embedded page's global scope.
1366
+ */
1367
+ 'global-props'?: Record<string, unknown>;
1368
+ /**
1369
+ * Size the frame to match its content width.
1370
+ */
1371
+ 'auto-width'?: boolean;
1372
+ /**
1373
+ * Size the frame to match its content height.
1374
+ */
1375
+ 'auto-height'?: boolean;
1376
+ /**
1377
+ * Width used before the embedded page reports its content size (e.g. `'200px'`).
1378
+ */
1379
+ 'preset-width'?: string;
1380
+ /**
1381
+ * Height used before the embedded page reports its content size (e.g. `'200px'`).
1382
+ */
1383
+ 'preset-height'?: string;
1384
+ /**
1385
+ * Override the host's multi-async-thread setting for the embedded page.
1386
+ */
1387
+ 'enable-multi-async-thread'?: boolean;
1388
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxFrame, never>;
1389
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxFrame, "frame", never, {
1390
+ "src": {
1391
+ "alias": "src";
1392
+ "required": false;
1393
+ };
1394
+ "data": {
1395
+ "alias": "data";
1396
+ "required": false;
1397
+ };
1398
+ "global-props": {
1399
+ "alias": "global-props";
1400
+ "required": false;
1401
+ };
1402
+ "auto-width": {
1403
+ "alias": "auto-width";
1404
+ "required": false;
1405
+ };
1406
+ "auto-height": {
1407
+ "alias": "auto-height";
1408
+ "required": false;
1409
+ };
1410
+ "preset-width": {
1411
+ "alias": "preset-width";
1412
+ "required": false;
1413
+ };
1414
+ "preset-height": {
1415
+ "alias": "preset-height";
1416
+ "required": false;
1417
+ };
1418
+ "enable-multi-async-thread": {
1419
+ "alias": "enable-multi-async-thread";
1420
+ "required": false;
1421
+ };
1422
+ }, {}, never, never, true, never>;
1423
+ }
1424
+ /**
1425
+ * Displays raster images, base64 data URIs, and animated GIFs.
1426
+ */
1427
+ export declare class LynxImage extends LynxElementBase {
1428
+ /**
1429
+ * Remote URL, local asset path, or base64 data URI.
1430
+ */
1431
+ src?: string;
1432
+ /**
1433
+ * How the image is scaled to fit its container.
1434
+ * @default 'scaleToFill'
1435
+ */
1436
+ mode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'center';
1437
+ /**
1438
+ * Placeholder image shown while the main image loads.
1439
+ */
1440
+ placeholder?: string;
1441
+ /**
1442
+ * Gaussian blur radius applied to the image.
1443
+ */
1444
+ 'blur-radius'?: string;
1445
+ /**
1446
+ * Nine-slice cap insets for stretching images (CSS shorthand, e.g. "10px 10px 10px 10px").
1447
+ */
1448
+ 'cap-insets'?: string;
1449
+ 'cap-insets-scale'?: number;
1450
+ /**
1451
+ * Automatically size the element to the image's intrinsic dimensions.
1452
+ */
1453
+ 'auto-size'?: boolean;
1454
+ /**
1455
+ * Auto-play for animated GIF images.
1456
+ */
1457
+ autoplay?: boolean;
1458
+ /**
1459
+ * Number of times to loop the animation (0 = infinite).
1460
+ */
1461
+ 'loop-count'?: number;
1462
+ /**
1463
+ * Tint color applied over the image (CSS color string).
1464
+ */
1465
+ 'tint-color'?: string;
1466
+ /**
1467
+ * Bitmap color format hint (Android).
1468
+ */
1469
+ 'image-config'?: 'ARGB_8888' | 'RGB_565';
1470
+ /**
1471
+ * Pre-declared width for prefetch optimization.
1472
+ */
1473
+ 'prefetch-width'?: string;
1474
+ 'prefetch-height'?: string;
1475
+ /**
1476
+ * Keep showing the current image while the new src loads.
1477
+ */
1478
+ 'defer-src-invalidation'?: boolean;
1479
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxImage, never>;
1480
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxImage, "image", never, {
1481
+ "src": {
1482
+ "alias": "src";
1483
+ "required": false;
1484
+ };
1485
+ "mode": {
1486
+ "alias": "mode";
1487
+ "required": false;
1488
+ };
1489
+ "placeholder": {
1490
+ "alias": "placeholder";
1491
+ "required": false;
1492
+ };
1493
+ "blur-radius": {
1494
+ "alias": "blur-radius";
1495
+ "required": false;
1496
+ };
1497
+ "cap-insets": {
1498
+ "alias": "cap-insets";
1499
+ "required": false;
1500
+ };
1501
+ "cap-insets-scale": {
1502
+ "alias": "cap-insets-scale";
1503
+ "required": false;
1504
+ };
1505
+ "auto-size": {
1506
+ "alias": "auto-size";
1507
+ "required": false;
1508
+ };
1509
+ "autoplay": {
1510
+ "alias": "autoplay";
1511
+ "required": false;
1512
+ };
1513
+ "loop-count": {
1514
+ "alias": "loop-count";
1515
+ "required": false;
1516
+ };
1517
+ "tint-color": {
1518
+ "alias": "tint-color";
1519
+ "required": false;
1520
+ };
1521
+ "image-config": {
1522
+ "alias": "image-config";
1523
+ "required": false;
1524
+ };
1525
+ "prefetch-width": {
1526
+ "alias": "prefetch-width";
1527
+ "required": false;
1528
+ };
1529
+ "prefetch-height": {
1530
+ "alias": "prefetch-height";
1531
+ "required": false;
1532
+ };
1533
+ "defer-src-invalidation": {
1534
+ "alias": "defer-src-invalidation";
1535
+ "required": false;
1536
+ };
1537
+ }, {}, never, never, true, never>;
1538
+ }
1539
+ /**
1540
+ * Single-line text input field.
1541
+ */
1542
+ export declare class LynxInput extends LynxElementBase {
1543
+ #private;
1544
+ ngOnChanges(changes: SimpleChanges): void;
1545
+ /**
1546
+ * Keyboard type shown when this input gains focus.
1547
+ */
1548
+ type?: 'text' | 'number' | 'digit' | 'password' | 'tel' | 'email';
1549
+ /**
1550
+ * Greyed-out hint text shown when the field is empty.
1551
+ */
1552
+ placeholder?: string;
1553
+ /**
1554
+ * Current value of the field.
1555
+ */
1556
+ value?: string;
1557
+ /**
1558
+ * Maximum character count (-1 = unlimited).
1559
+ */
1560
+ maxlength?: number;
1561
+ /**
1562
+ * Whether the field is read-only.
1563
+ */
1564
+ readonly?: boolean;
1565
+ /**
1566
+ * Whether the field and keyboard are disabled.
1567
+ */
1568
+ disabled?: boolean;
1569
+ /**
1570
+ * Label for the soft-keyboard confirm button. @default 'done'
1571
+ */
1572
+ 'confirm-type'?: 'search' | 'send' | 'go' | 'done' | 'next';
1573
+ /**
1574
+ * Input character whitelist — a regular expression pattern string.
1575
+ */
1576
+ 'input-filter'?: string;
1577
+ /**
1578
+ * Whether tapping the field shows the soft keyboard. @default true
1579
+ */
1580
+ 'show-soft-input-on-focus'?: boolean;
1581
+ /**
1582
+ * Enable auto-correction on iOS.
1583
+ */
1584
+ 'ios-auto-correct'?: boolean;
1585
+ /**
1586
+ * Enable spell-checking on iOS.
1587
+ */
1588
+ 'ios-spell-check'?: boolean;
1589
+ /**
1590
+ * Enter full-screen editing mode on Android.
1591
+ */
1592
+ 'android-fullscreen-mode'?: boolean;
1593
+ /**
1594
+ * Initial content. Applied on first render only and doesn't fire `bindinput`.
1595
+ * Prefer `value` (or a form control) when the text must stay in sync.
1596
+ */
1597
+ 'default-value'?: string;
1598
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxInput, never>;
1599
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxInput, "input", never, {
1600
+ "type": {
1601
+ "alias": "type";
1602
+ "required": false;
1603
+ };
1604
+ "placeholder": {
1605
+ "alias": "placeholder";
1606
+ "required": false;
1607
+ };
1608
+ "value": {
1609
+ "alias": "value";
1610
+ "required": false;
1611
+ };
1612
+ "maxlength": {
1613
+ "alias": "maxlength";
1614
+ "required": false;
1615
+ };
1616
+ "readonly": {
1617
+ "alias": "readonly";
1618
+ "required": false;
1619
+ };
1620
+ "disabled": {
1621
+ "alias": "disabled";
1622
+ "required": false;
1623
+ };
1624
+ "confirm-type": {
1625
+ "alias": "confirm-type";
1626
+ "required": false;
1627
+ };
1628
+ "input-filter": {
1629
+ "alias": "input-filter";
1630
+ "required": false;
1631
+ };
1632
+ "show-soft-input-on-focus": {
1633
+ "alias": "show-soft-input-on-focus";
1634
+ "required": false;
1635
+ };
1636
+ "ios-auto-correct": {
1637
+ "alias": "ios-auto-correct";
1638
+ "required": false;
1639
+ };
1640
+ "ios-spell-check": {
1641
+ "alias": "ios-spell-check";
1642
+ "required": false;
1643
+ };
1644
+ "android-fullscreen-mode": {
1645
+ "alias": "android-fullscreen-mode";
1646
+ "required": false;
1647
+ };
1648
+ "default-value": {
1649
+ "alias": "default-value";
1650
+ "required": false;
1651
+ };
1652
+ }, {}, never, never, true, never>;
1653
+ }
1654
+ /**
1655
+ * Multi-line text input field.
1656
+ */
1657
+ export declare class LynxTextarea extends LynxElementBase {
1658
+ #private;
1659
+ ngOnChanges(changes: SimpleChanges): void;
1660
+ type?: 'text' | 'number' | 'digit' | 'tel' | 'email';
1661
+ placeholder?: string;
1662
+ value?: string;
1663
+ maxlength?: number;
1664
+ /**
1665
+ * Maximum number of visible lines.
1666
+ */
1667
+ maxlines?: number;
1668
+ /**
1669
+ * Extra spacing between lines in px.
1670
+ */
1671
+ 'line-spacing'?: number;
1672
+ readonly?: boolean;
1673
+ disabled?: boolean;
1674
+ 'confirm-type'?: 'search' | 'send' | 'go' | 'done' | 'next';
1675
+ 'input-filter'?: string;
1676
+ 'show-soft-input-on-focus'?: boolean;
1677
+ bounces?: boolean;
1678
+ 'enable-scroll-bar'?: boolean;
1679
+ 'ios-auto-correct'?: boolean;
1680
+ 'ios-spell-check'?: boolean;
1681
+ 'android-fullscreen-mode'?: boolean;
1682
+ /**
1683
+ * Initial content. Applied on first render only and doesn't fire `bindinput`.
1684
+ * Prefer `value` (or a form control) when the text must stay in sync.
1685
+ */
1686
+ 'default-value'?: string;
1687
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxTextarea, never>;
1688
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxTextarea, "textarea", never, {
1689
+ "type": {
1690
+ "alias": "type";
1691
+ "required": false;
1692
+ };
1693
+ "placeholder": {
1694
+ "alias": "placeholder";
1695
+ "required": false;
1696
+ };
1697
+ "value": {
1698
+ "alias": "value";
1699
+ "required": false;
1700
+ };
1701
+ "maxlength": {
1702
+ "alias": "maxlength";
1703
+ "required": false;
1704
+ };
1705
+ "maxlines": {
1706
+ "alias": "maxlines";
1707
+ "required": false;
1708
+ };
1709
+ "line-spacing": {
1710
+ "alias": "line-spacing";
1711
+ "required": false;
1712
+ };
1713
+ "readonly": {
1714
+ "alias": "readonly";
1715
+ "required": false;
1716
+ };
1717
+ "disabled": {
1718
+ "alias": "disabled";
1719
+ "required": false;
1720
+ };
1721
+ "confirm-type": {
1722
+ "alias": "confirm-type";
1723
+ "required": false;
1724
+ };
1725
+ "input-filter": {
1726
+ "alias": "input-filter";
1727
+ "required": false;
1728
+ };
1729
+ "show-soft-input-on-focus": {
1730
+ "alias": "show-soft-input-on-focus";
1731
+ "required": false;
1732
+ };
1733
+ "bounces": {
1734
+ "alias": "bounces";
1735
+ "required": false;
1736
+ };
1737
+ "enable-scroll-bar": {
1738
+ "alias": "enable-scroll-bar";
1739
+ "required": false;
1740
+ };
1741
+ "ios-auto-correct": {
1742
+ "alias": "ios-auto-correct";
1743
+ "required": false;
1744
+ };
1745
+ "ios-spell-check": {
1746
+ "alias": "ios-spell-check";
1747
+ "required": false;
1748
+ };
1749
+ "android-fullscreen-mode": {
1750
+ "alias": "android-fullscreen-mode";
1751
+ "required": false;
1752
+ };
1753
+ "default-value": {
1754
+ "alias": "default-value";
1755
+ "required": false;
1756
+ };
1757
+ }, {}, never, never, true, never>;
1758
+ }
1759
+ /**
1760
+ * High-performance virtualized list, equivalent to RecyclerView / UITableView.
1761
+ */
1762
+ export declare class LynxList extends LynxElementBase {
1763
+ /**
1764
+ * Layout algorithm.
1765
+ * - `'single'` — one item per row/column
1766
+ * - `'flow'` — fixed column count, items fill left-to-right
1767
+ * - `'waterfall'` — Pinterest-style varying-height columns
1768
+ */
1769
+ 'list-type'?: 'single' | 'flow' | 'waterfall';
1770
+ /**
1771
+ * Number of columns (flow/waterfall) or rows (horizontal single).
1772
+ */
1773
+ 'span-count'?: number;
1774
+ /**
1775
+ * Scroll axis. @default 'vertical'
1776
+ */
1777
+ 'scroll-orientation'?: 'vertical' | 'horizontal';
1778
+ 'enable-scroll'?: boolean;
1779
+ 'enable-nested-scroll'?: boolean;
1780
+ bounces?: boolean;
1781
+ sticky?: boolean;
1782
+ /**
1783
+ * Offset in px for sticky items.
1784
+ */
1785
+ 'sticky-offset'?: number;
1786
+ 'scroll-bar-enable'?: boolean;
1787
+ /**
1788
+ * Scroll to this item index on first render.
1789
+ */
1790
+ 'initial-scroll-index'?: number;
1791
+ /**
1792
+ * Number of items from the top that triggers bindscrolltoupper.
1793
+ */
1794
+ 'upper-threshold-item-count'?: number;
1795
+ /**
1796
+ * Number of items from the bottom that triggers bindscrolltolower.
1797
+ */
1798
+ 'lower-threshold-item-count'?: number;
1799
+ /**
1800
+ * Minimum interval in ms between scroll events.
1801
+ */
1802
+ 'scroll-event-throttle'?: number;
1803
+ /**
1804
+ * Include visible item info in scroll event payloads.
1805
+ */
1806
+ 'need-visible-item-info'?: boolean;
1807
+ /**
1808
+ * Include layout completion info in events.
1809
+ */
1810
+ 'need-layout-complete-info'?: boolean;
1811
+ /**
1812
+ * Number of items to preload beyond the visible area.
1813
+ */
1814
+ 'preload-buffer-count'?: number;
1815
+ /**
1816
+ * Snap behavior: `{ factor: 0–1, offset: px }`.
1817
+ */
1818
+ 'item-snap'?: {
1819
+ factor: number;
1820
+ offset: number;
1821
+ };
1822
+ /**
1823
+ * Insert/remove animation style.
1824
+ */
1825
+ 'update-animation'?: 'default' | 'none';
1826
+ /**
1827
+ * Gap between items on the main axis (CSS length).
1828
+ */
1829
+ 'list-main-axis-gap'?: string;
1830
+ /**
1831
+ * Gap between columns/rows on the cross axis (CSS length).
1832
+ */
1833
+ 'list-cross-axis-gap'?: string;
1834
+ /**
1835
+ * Required by Lynx's native list UI whenever the app uses the standard
1836
+ * dual-thread engine strategy (always true for AngularLynx) — without it
1837
+ * the native list silently never applies its data source, so
1838
+ * `componentAtIndex` is never called and no items render. The renderer
1839
+ * sets this to `true` by default at element creation; bind it explicitly
1840
+ * only to opt back into the sync (all-on-UI) engine strategy.
1841
+ * @default true
1842
+ */
1843
+ 'enable-async-list'?: boolean;
1844
+ /**
1845
+ * Insert list-item platform views via the C++ list's operations. Recommended
1846
+ * with multi-thread engine strategies. @default false
1847
+ */
1848
+ 'enable-insert-platform-view-operation'?: boolean;
1849
+ /**
1850
+ * How the list picks a reference anchor when on-screen items are removed:
1851
+ * 0 = none, 1 = toward start, 2 = toward end (experimental). @default 0
1852
+ */
1853
+ 'experimental-search-ref-anchor-strategy'?: 0 | 1 | 2;
1854
+ /**
1855
+ * Allow scrolling when the content is smaller than the list (Harmony). @default false
1856
+ */
1857
+ 'harmony-scroll-edge-effect'?: boolean;
1858
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxList, never>;
1859
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxList, "list", never, {
1860
+ "list-type": {
1861
+ "alias": "list-type";
1862
+ "required": false;
1863
+ };
1864
+ "span-count": {
1865
+ "alias": "span-count";
1866
+ "required": false;
1867
+ };
1868
+ "scroll-orientation": {
1869
+ "alias": "scroll-orientation";
1870
+ "required": false;
1871
+ };
1872
+ "enable-scroll": {
1873
+ "alias": "enable-scroll";
1874
+ "required": false;
1875
+ };
1876
+ "enable-nested-scroll": {
1877
+ "alias": "enable-nested-scroll";
1878
+ "required": false;
1879
+ };
1880
+ "bounces": {
1881
+ "alias": "bounces";
1882
+ "required": false;
1883
+ };
1884
+ "sticky": {
1885
+ "alias": "sticky";
1886
+ "required": false;
1887
+ };
1888
+ "sticky-offset": {
1889
+ "alias": "sticky-offset";
1890
+ "required": false;
1891
+ };
1892
+ "scroll-bar-enable": {
1893
+ "alias": "scroll-bar-enable";
1894
+ "required": false;
1895
+ };
1896
+ "initial-scroll-index": {
1897
+ "alias": "initial-scroll-index";
1898
+ "required": false;
1899
+ };
1900
+ "upper-threshold-item-count": {
1901
+ "alias": "upper-threshold-item-count";
1902
+ "required": false;
1903
+ };
1904
+ "lower-threshold-item-count": {
1905
+ "alias": "lower-threshold-item-count";
1906
+ "required": false;
1907
+ };
1908
+ "scroll-event-throttle": {
1909
+ "alias": "scroll-event-throttle";
1910
+ "required": false;
1911
+ };
1912
+ "need-visible-item-info": {
1913
+ "alias": "need-visible-item-info";
1914
+ "required": false;
1915
+ };
1916
+ "need-layout-complete-info": {
1917
+ "alias": "need-layout-complete-info";
1918
+ "required": false;
1919
+ };
1920
+ "preload-buffer-count": {
1921
+ "alias": "preload-buffer-count";
1922
+ "required": false;
1923
+ };
1924
+ "item-snap": {
1925
+ "alias": "item-snap";
1926
+ "required": false;
1927
+ };
1928
+ "update-animation": {
1929
+ "alias": "update-animation";
1930
+ "required": false;
1931
+ };
1932
+ "list-main-axis-gap": {
1933
+ "alias": "list-main-axis-gap";
1934
+ "required": false;
1935
+ };
1936
+ "list-cross-axis-gap": {
1937
+ "alias": "list-cross-axis-gap";
1938
+ "required": false;
1939
+ };
1940
+ "enable-async-list": {
1941
+ "alias": "enable-async-list";
1942
+ "required": false;
1943
+ };
1944
+ "enable-insert-platform-view-operation": {
1945
+ "alias": "enable-insert-platform-view-operation";
1946
+ "required": false;
1947
+ };
1948
+ "experimental-search-ref-anchor-strategy": {
1949
+ "alias": "experimental-search-ref-anchor-strategy";
1950
+ "required": false;
1951
+ };
1952
+ "harmony-scroll-edge-effect": {
1953
+ "alias": "harmony-scroll-edge-effect";
1954
+ "required": false;
1955
+ };
1956
+ }, {}, never, never, true, never>;
1957
+ }
1958
+ /**
1959
+ * Child of `<list>`; represents a single virtualized cell.
1960
+ */
1961
+ export declare class LynxListItem extends LynxElementBase {
1962
+ /**
1963
+ * Stable unique key for this item — used for diffing and recycling.
1964
+ * Must be unique within the list.
1965
+ */
1966
+ 'item-key'?: string;
1967
+ /**
1968
+ * Whether this item spans all columns (full-width in flow/waterfall).
1969
+ */
1970
+ 'full-span'?: boolean;
1971
+ /**
1972
+ * Stick this item to the top of the list while scrolling.
1973
+ */
1974
+ 'sticky-top'?: boolean;
1975
+ /**
1976
+ * Stick this item to the bottom of the list while scrolling.
1977
+ */
1978
+ 'sticky-bottom'?: boolean;
1979
+ /**
1980
+ * Whether this item's view can be recycled. @default true
1981
+ */
1982
+ recyclable?: boolean;
1983
+ /**
1984
+ * Reuse pool identifier — items with the same identifier share views.
1985
+ */
1986
+ 'reuse-identifier'?: string;
1987
+ /**
1988
+ * Estimated item size in px for layout pre-calculation.
1989
+ */
1990
+ 'estimated-main-axis-size-px'?: number;
1991
+ /**
1992
+ * Deferred rendering. Pass `true` to defer, or an object to control
1993
+ * whether the item unmounts when recycled.
1994
+ */
1995
+ defer?: boolean | {
1996
+ unmountRecycled?: boolean;
1997
+ };
1998
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxListItem, never>;
1999
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxListItem, "list-item", never, {
2000
+ "item-key": {
2001
+ "alias": "item-key";
2002
+ "required": false;
2003
+ };
2004
+ "full-span": {
2005
+ "alias": "full-span";
2006
+ "required": false;
2007
+ };
2008
+ "sticky-top": {
2009
+ "alias": "sticky-top";
2010
+ "required": false;
2011
+ };
2012
+ "sticky-bottom": {
2013
+ "alias": "sticky-bottom";
2014
+ "required": false;
2015
+ };
2016
+ "recyclable": {
2017
+ "alias": "recyclable";
2018
+ "required": false;
2019
+ };
2020
+ "reuse-identifier": {
2021
+ "alias": "reuse-identifier";
2022
+ "required": false;
2023
+ };
2024
+ "estimated-main-axis-size-px": {
2025
+ "alias": "estimated-main-axis-size-px";
2026
+ "required": false;
2027
+ };
2028
+ "defer": {
2029
+ "alias": "defer";
2030
+ "required": false;
2031
+ };
2032
+ }, {}, never, never, true, never>;
2033
+ }
2034
+ /**
2035
+ * Anonymous grouping element with no visual output.
2036
+ */
2037
+ export declare class LynxBlock extends LynxElementBase {
2038
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxBlock, never>;
2039
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxBlock, "block", never, {}, {}, never, never, true, never>;
2040
+ }
2041
+ /**
2042
+ * Lynx native conditional element.
2043
+ * Note: Angular's `@if` control flow is a separate, unrelated construct.
2044
+ */
2045
+ export declare class LynxIf extends LynxElementBase {
2046
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxIf, never>;
2047
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxIf, "if", never, {}, {}, never, never, true, never>;
2048
+ }
2049
+ /**
2050
+ * Lynx native iteration element.
2051
+ * Note: Angular's `@for` control flow is a separate, unrelated construct.
2052
+ */
2053
+ export declare class LynxFor extends LynxElementBase {
2054
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxFor, never>;
2055
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxFor, "for", never, {}, {}, never, never, true, never>;
2056
+ }
2057
+ /**
2058
+ * Floating layer rendered above the main document flow.
2059
+ */
2060
+ export declare class LynxOverlay extends LynxElementBase {
2061
+ /**
2062
+ * Whether the overlay is shown.
2063
+ */
2064
+ visible?: boolean;
2065
+ /**
2066
+ * Z-order layer (higher = above other overlays).
2067
+ * 1 = default, 2 = status bar level, 3 = keyboard level, 4 = top.
2068
+ */
2069
+ level?: 1 | 2 | 3 | 4;
2070
+ /**
2071
+ * Presentation mode on iOS (`'window'` | `'top'` | `'page'`).
2072
+ */
2073
+ mode?: string;
2074
+ /**
2075
+ * Whether the iOS swipe-back gesture dismisses the overlay.
2076
+ */
2077
+ 'ios-enable-swipe-back'?: boolean;
2078
+ /**
2079
+ * Android navigation bar background/appearance while the overlay is shown.
2080
+ * `transparent` also requires `android-adapt-edge-to-edge`. (Lynx 4.1+) @default 'auto'
2081
+ */
2082
+ 'android-navigation-bar-style'?: 'auto' | 'light' | 'dark' | 'transparent';
2083
+ /**
2084
+ * Limit the overlay to the Fragment that owns its LynxView (Android, Lynx 4.3+). @default 'global'
2085
+ */
2086
+ 'android-overlay-scope'?: 'global' | 'fragment';
2087
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxOverlay, never>;
2088
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxOverlay, "overlay", never, {
2089
+ "visible": {
2090
+ "alias": "visible";
2091
+ "required": false;
2092
+ };
2093
+ "level": {
2094
+ "alias": "level";
2095
+ "required": false;
2096
+ };
2097
+ "mode": {
2098
+ "alias": "mode";
2099
+ "required": false;
2100
+ };
2101
+ "ios-enable-swipe-back": {
2102
+ "alias": "ios-enable-swipe-back";
2103
+ "required": false;
2104
+ };
2105
+ "android-navigation-bar-style": {
2106
+ "alias": "android-navigation-bar-style";
2107
+ "required": false;
2108
+ };
2109
+ "android-overlay-scope": {
2110
+ "alias": "android-overlay-scope";
2111
+ "required": false;
2112
+ };
2113
+ }, {}, never, never, true, never>;
2114
+ }
2115
+ /**
2116
+ * Pull-to-refresh container. Accepts `<refresh-header>` and a scrollable `<view>` as direct children.
2117
+ */
2118
+ export declare class LynxRefresh extends LynxElementBase {
2119
+ /**
2120
+ * Whether dragging down or calling autoStartRefresh can trigger the startrefresh event. @default true
2121
+ */
2122
+ 'enable-refresh'?: boolean;
2123
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxRefresh, never>;
2124
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxRefresh, "refresh", never, {
2125
+ "enable-refresh": {
2126
+ "alias": "enable-refresh";
2127
+ "required": false;
2128
+ };
2129
+ }, {}, never, never, true, never>;
2130
+ }
2131
+ /**
2132
+ * Customizable header revealed during a pull-to-refresh gesture. Must be a direct child of `<refresh>`.
2133
+ */
2134
+ export declare class LynxRefreshHeader extends LynxElementBase {
2135
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxRefreshHeader, never>;
2136
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxRefreshHeader, "refresh-header", never, {}, {}, never, never, true, never>;
2137
+ }
2138
+ /**
2139
+ * Nested scroll coordination container. Synchronizes a foldable header, sticky toolbar, and scrollable content slot.
2140
+ */
2141
+ export declare class LynxScrollCoordinator extends LynxElementBase {
2142
+ /**
2143
+ * Whether the coordinator can scroll vertically. @default true
2144
+ */
2145
+ 'enable-scroll'?: boolean;
2146
+ /**
2147
+ * Enable bounce effect when scrolling past boundary (iOS/Harmony). @default true
2148
+ */
2149
+ bounces?: boolean;
2150
+ /**
2151
+ * Event response granularity for bindoffset. @default 0.01
2152
+ */
2153
+ granularity?: number;
2154
+ /**
2155
+ * Whether header appears over slot when overflowing. @default false
2156
+ */
2157
+ 'header-over-slot'?: boolean;
2158
+ /**
2159
+ * Refresh mode: 'none', 'page', or 'fold' (iOS). @default 'none'
2160
+ */
2161
+ 'refresh-mode'?: 'none' | 'page' | 'fold';
2162
+ /**
2163
+ * Show scrollbar during scrolling (iOS/Harmony). @default false
2164
+ */
2165
+ 'enable-scroll-bar'?: boolean;
2166
+ /**
2167
+ * Enable nested scroll as child in other scrolling widgets (Android). @default false
2168
+ */
2169
+ 'android-nested-scroll-as-child'?: boolean;
2170
+ /**
2171
+ * Force nested-vertical-scroll-behavior invalid (iOS). @default false
2172
+ */
2173
+ 'ios-force-scroll-detach'?: boolean;
2174
+ /**
2175
+ * Scroll to top when tapping status bar (iOS). @default false
2176
+ */
2177
+ 'ios-scrolls-to-top'?: boolean;
2178
+ /**
2179
+ * Adjust the offset when the active slot is empty or too short to scroll (Android). @default false
2180
+ */
2181
+ 'android-adapt-to-empty-slot'?: boolean;
2182
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxScrollCoordinator, never>;
2183
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxScrollCoordinator, "scroll-coordinator", never, {
2184
+ "enable-scroll": {
2185
+ "alias": "enable-scroll";
2186
+ "required": false;
2187
+ };
2188
+ "bounces": {
2189
+ "alias": "bounces";
2190
+ "required": false;
2191
+ };
2192
+ "granularity": {
2193
+ "alias": "granularity";
2194
+ "required": false;
2195
+ };
2196
+ "header-over-slot": {
2197
+ "alias": "header-over-slot";
2198
+ "required": false;
2199
+ };
2200
+ "refresh-mode": {
2201
+ "alias": "refresh-mode";
2202
+ "required": false;
2203
+ };
2204
+ "enable-scroll-bar": {
2205
+ "alias": "enable-scroll-bar";
2206
+ "required": false;
2207
+ };
2208
+ "android-nested-scroll-as-child": {
2209
+ "alias": "android-nested-scroll-as-child";
2210
+ "required": false;
2211
+ };
2212
+ "ios-force-scroll-detach": {
2213
+ "alias": "ios-force-scroll-detach";
2214
+ "required": false;
2215
+ };
2216
+ "ios-scrolls-to-top": {
2217
+ "alias": "ios-scrolls-to-top";
2218
+ "required": false;
2219
+ };
2220
+ "android-adapt-to-empty-slot": {
2221
+ "alias": "android-adapt-to-empty-slot";
2222
+ "required": false;
2223
+ };
2224
+ }, {}, never, never, true, never>;
2225
+ }
2226
+ /**
2227
+ * Header content that scrolls out of view. Must be a direct child of `<scroll-coordinator>`.
2228
+ */
2229
+ export declare class LynxScrollCoordinatorHeader extends LynxElementBase {
2230
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxScrollCoordinatorHeader, never>;
2231
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxScrollCoordinatorHeader, "scroll-coordinator-header", never, {}, {}, never, never, true, never>;
2232
+ }
2233
+ /**
2234
+ * Sticky toolbar that remains visible at the top. Must be a direct child of `<scroll-coordinator>`.
2235
+ */
2236
+ export declare class LynxScrollCoordinatorToolbar extends LynxElementBase {
2237
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxScrollCoordinatorToolbar, never>;
2238
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxScrollCoordinatorToolbar, "scroll-coordinator-toolbar", never, {}, {}, never, never, true, never>;
2239
+ }
2240
+ /**
2241
+ * Container for scrollable content (typically a `<list>`). Must be a direct child of `<scroll-coordinator>`.
2242
+ */
2243
+ export declare class LynxScrollCoordinatorSlot extends LynxElementBase {
2244
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxScrollCoordinatorSlot, never>;
2245
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxScrollCoordinatorSlot, "scroll-coordinator-slot", never, {}, {}, never, never, true, never>;
2246
+ }
2247
+ /**
2248
+ * Slot variant whose content can be dragged up/down to fold and unfold the
2249
+ * header. Must be a direct child of `<scroll-coordinator>`.
2250
+ */
2251
+ export declare class LynxScrollCoordinatorSlotDrag extends LynxElementBase {
2252
+ /**
2253
+ * Whether vertical drag gestures fold/unfold the header. @default true
2254
+ */
2255
+ 'enable-drag'?: boolean;
2256
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxScrollCoordinatorSlotDrag, never>;
2257
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxScrollCoordinatorSlotDrag, "scroll-coordinator-slot-drag", never, {
2258
+ "enable-drag": {
2259
+ "alias": "enable-drag";
2260
+ "required": false;
2261
+ };
2262
+ }, {}, never, never, true, never>;
2263
+ }
2264
+ /**
2265
+ * Scrollable single-child container.
2266
+ */
2267
+ export declare class LynxScrollView extends LynxElementBase {
2268
+ /**
2269
+ * Scroll axis. @default 'vertical'
2270
+ */
2271
+ 'scroll-orientation'?: 'vertical' | 'horizontal';
2272
+ /**
2273
+ * Whether scrolling is enabled. @default true
2274
+ */
2275
+ 'enable-scroll'?: boolean;
2276
+ /**
2277
+ * Whether the scroll view bounces past the content edge (iOS/Harmony).
2278
+ */
2279
+ bounces?: boolean;
2280
+ /**
2281
+ * Whether the platform scroll indicator is shown.
2282
+ */
2283
+ 'scroll-bar-enable'?: boolean;
2284
+ /**
2285
+ * Distance from the top/left edge that triggers bindscrolltoupper.
2286
+ */
2287
+ 'upper-threshold'?: number;
2288
+ /**
2289
+ * Distance from the bottom/right edge that triggers bindscrolltolower.
2290
+ */
2291
+ 'lower-threshold'?: number;
2292
+ /**
2293
+ * Initial scroll offset in px.
2294
+ */
2295
+ 'initial-scroll-offset'?: number;
2296
+ /**
2297
+ * Scroll to item at this index on mount.
2298
+ */
2299
+ 'initial-scroll-to-index'?: number;
2300
+ /**
2301
+ * Whether nested scrolling is enabled.
2302
+ */
2303
+ 'enable-nested-scroll'?: boolean;
2304
+ /**
2305
+ * Use the new overflow clipping implementation (Android, Lynx 4.2+, experimental). @default true
2306
+ */
2307
+ 'experimental-android-enable-new-overflow'?: boolean;
2308
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxScrollView, never>;
2309
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxScrollView, "scroll-view", never, {
2310
+ "scroll-orientation": {
2311
+ "alias": "scroll-orientation";
2312
+ "required": false;
2313
+ };
2314
+ "enable-scroll": {
2315
+ "alias": "enable-scroll";
2316
+ "required": false;
2317
+ };
2318
+ "bounces": {
2319
+ "alias": "bounces";
2320
+ "required": false;
2321
+ };
2322
+ "scroll-bar-enable": {
2323
+ "alias": "scroll-bar-enable";
2324
+ "required": false;
2325
+ };
2326
+ "upper-threshold": {
2327
+ "alias": "upper-threshold";
2328
+ "required": false;
2329
+ };
2330
+ "lower-threshold": {
2331
+ "alias": "lower-threshold";
2332
+ "required": false;
2333
+ };
2334
+ "initial-scroll-offset": {
2335
+ "alias": "initial-scroll-offset";
2336
+ "required": false;
2337
+ };
2338
+ "initial-scroll-to-index": {
2339
+ "alias": "initial-scroll-to-index";
2340
+ "required": false;
2341
+ };
2342
+ "enable-nested-scroll": {
2343
+ "alias": "enable-nested-scroll";
2344
+ "required": false;
2345
+ };
2346
+ "experimental-android-enable-new-overflow": {
2347
+ "alias": "experimental-android-enable-new-overflow";
2348
+ "required": false;
2349
+ };
2350
+ }, {}, never, never, true, never>;
2351
+ }
2352
+ /**
2353
+ * Renders SVG content from a URL or an inline XML string.
2354
+ */
2355
+ export declare class LynxSvg extends LynxElementBase {
2356
+ /**
2357
+ * URL pointing to an SVG resource.
2358
+ */
2359
+ src?: string;
2360
+ /**
2361
+ * Inline SVG XML string.
2362
+ */
2363
+ content?: string;
2364
+ /**
2365
+ * Color used for `currentColor` in the SVG. Doesn't override explicit `fill`/`stroke`.
2366
+ */
2367
+ 'current-color'?: string;
2368
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxSvg, never>;
2369
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxSvg, "svg", never, {
2370
+ "src": {
2371
+ "alias": "src";
2372
+ "required": false;
2373
+ };
2374
+ "content": {
2375
+ "alias": "content";
2376
+ "required": false;
2377
+ };
2378
+ "current-color": {
2379
+ "alias": "current-color";
2380
+ "required": false;
2381
+ };
2382
+ }, {}, never, never, true, never>;
2383
+ }
2384
+ /**
2385
+ * Displays text content. Supports inline child `<text>` elements for mixed styling.
2386
+ */
2387
+ export declare class LynxText extends LynxElementBase {
2388
+ /**
2389
+ * Maximum number of lines before truncation with ellipsis.
2390
+ */
2391
+ 'text-maxline'?: number;
2392
+ /**
2393
+ * Vertical alignment for single-line text.
2394
+ * @default 'normal'
2395
+ */
2396
+ 'text-single-line-vertical-align'?: 'normal' | 'top' | 'center' | 'bottom';
2397
+ /**
2398
+ * Whether the user can select the text.
2399
+ */
2400
+ 'text-selection'?: boolean;
2401
+ /**
2402
+ * Whether a custom context menu is shown on long-press.
2403
+ */
2404
+ 'custom-context-menu'?: boolean;
2405
+ /**
2406
+ * Add extra font padding on Android.
2407
+ */
2408
+ 'include-font-padding'?: boolean;
2409
+ 'tail-color-convert'?: boolean;
2410
+ /**
2411
+ * Synthesize bold when the font has no bold face (Android/iOS). @default false
2412
+ */
2413
+ 'text-fake-bold'?: boolean;
2414
+ /**
2415
+ * Hand selection/copy gestures to your own handlers; requires `text-selection`. @default false
2416
+ */
2417
+ 'custom-text-selection'?: boolean;
2418
+ /**
2419
+ * Render emoji with the Emoji2 compatibility library (Android; the app must include it). @default false
2420
+ */
2421
+ 'android-emoji-compat'?: boolean;
2422
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxText, never>;
2423
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxText, "text", never, {
2424
+ "text-maxline": {
2425
+ "alias": "text-maxline";
2426
+ "required": false;
2427
+ };
2428
+ "text-single-line-vertical-align": {
2429
+ "alias": "text-single-line-vertical-align";
2430
+ "required": false;
2431
+ };
2432
+ "text-selection": {
2433
+ "alias": "text-selection";
2434
+ "required": false;
2435
+ };
2436
+ "custom-context-menu": {
2437
+ "alias": "custom-context-menu";
2438
+ "required": false;
2439
+ };
2440
+ "include-font-padding": {
2441
+ "alias": "include-font-padding";
2442
+ "required": false;
2443
+ };
2444
+ "tail-color-convert": {
2445
+ "alias": "tail-color-convert";
2446
+ "required": false;
2447
+ };
2448
+ "text-fake-bold": {
2449
+ "alias": "text-fake-bold";
2450
+ "required": false;
2451
+ };
2452
+ "custom-text-selection": {
2453
+ "alias": "custom-text-selection";
2454
+ "required": false;
2455
+ };
2456
+ "android-emoji-compat": {
2457
+ "alias": "android-emoji-compat";
2458
+ "required": false;
2459
+ };
2460
+ }, {}, never, never, true, never>;
2461
+ }
2462
+ /**
2463
+ * Custom content shown at the end of a `<text>` in place of the ellipsis when
2464
+ * the text is truncated by `text-maxline`. Must be a direct child of `<text>`.
2465
+ */
2466
+ export declare class LynxInlineTruncation extends LynxElementBase {
2467
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxInlineTruncation, never>;
2468
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxInlineTruncation, "inline-truncation", never, {}, {}, never, never, true, never>;
2469
+ }
2470
+ /**
2471
+ * Draggable region of a custom window title bar, like CSS `app-region: drag`
2472
+ * (Clay Windows/macOS only).
2473
+ */
2474
+ export declare class LynxTitleBarView extends LynxElementBase {
2475
+ /**
2476
+ * Whether dragging this region moves the window. @default false
2477
+ */
2478
+ moveable?: boolean;
2479
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxTitleBarView, never>;
2480
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxTitleBarView, "title-bar-view", never, {
2481
+ "moveable": {
2482
+ "alias": "moveable";
2483
+ "required": false;
2484
+ };
2485
+ }, {}, never, never, true, never>;
2486
+ }
2487
+ /**
2488
+ * Native video player (experimental, Lynx 4.1+). Control playback with the
2489
+ * `play` / `pause` / `stop` / `seek` UI methods via SelectorQuery.
2490
+ */
2491
+ export declare class LynxVideo extends LynxElementBase {
2492
+ /**
2493
+ * Video URL. Only online network URLs are supported.
2494
+ */
2495
+ src?: string;
2496
+ /**
2497
+ * Whether playback loops. @default false
2498
+ */
2499
+ loop?: boolean;
2500
+ /**
2501
+ * Playback volume from 0 to 1. @default 1
2502
+ */
2503
+ volume?: number;
2504
+ /**
2505
+ * Whether audio is muted. @default false
2506
+ */
2507
+ muted?: boolean;
2508
+ /**
2509
+ * Playback rate from 0.1 to 2.0. @default 1
2510
+ */
2511
+ speed?: number;
2512
+ /**
2513
+ * How the video is scaled into the element box. @default 'contain'
2514
+ */
2515
+ 'object-fit'?: 'contain' | 'cover' | 'fill';
2516
+ /**
2517
+ * How queued UI method calls are executed. @default 'queue'
2518
+ */
2519
+ mode?: 'queue' | 'direct' | 'latest';
2520
+ /**
2521
+ * Minimum interval between `bindtimeupdate` events, in seconds. @default 0.33
2522
+ */
2523
+ 'timeupdate-interval'?: number;
2524
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxVideo, never>;
2525
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxVideo, "video", never, {
2526
+ "src": {
2527
+ "alias": "src";
2528
+ "required": false;
2529
+ };
2530
+ "loop": {
2531
+ "alias": "loop";
2532
+ "required": false;
2533
+ };
2534
+ "volume": {
2535
+ "alias": "volume";
2536
+ "required": false;
2537
+ };
2538
+ "muted": {
2539
+ "alias": "muted";
2540
+ "required": false;
2541
+ };
2542
+ "speed": {
2543
+ "alias": "speed";
2544
+ "required": false;
2545
+ };
2546
+ "object-fit": {
2547
+ "alias": "object-fit";
2548
+ "required": false;
2549
+ };
2550
+ "mode": {
2551
+ "alias": "mode";
2552
+ "required": false;
2553
+ };
2554
+ "timeupdate-interval": {
2555
+ "alias": "timeupdate-interval";
2556
+ "required": false;
2557
+ };
2558
+ }, {}, never, never, true, never>;
2559
+ }
2560
+ /**
2561
+ * General-purpose container element, equivalent to HTML `<div>`.
2562
+ */
2563
+ export declare class LynxView extends LynxElementBase {
2564
+ /**
2565
+ * Flatten the view into its parent's layer (Android only).
2566
+ * Improves performance for non-interactive views.
2567
+ */
2568
+ flatten?: boolean;
2569
+ /**
2570
+ * Direction of pan-gesture interception.
2571
+ * 0 = horizontal, 1 = vertical, 2 = none.
2572
+ */
2573
+ 'pan-intercept-direction'?: 0 | 1 | 2;
2574
+ 'pan-intercept-scope'?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
2575
+ 'consume-slide-event'?: [number, number][];
2576
+ 'enable-touch-pseudo-propagation'?: boolean;
2577
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxView, never>;
2578
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxView, "view", never, {
2579
+ "flatten": {
2580
+ "alias": "flatten";
2581
+ "required": false;
2582
+ };
2583
+ "pan-intercept-direction": {
2584
+ "alias": "pan-intercept-direction";
2585
+ "required": false;
2586
+ };
2587
+ "pan-intercept-scope": {
2588
+ "alias": "pan-intercept-scope";
2589
+ "required": false;
2590
+ };
2591
+ "consume-slide-event": {
2592
+ "alias": "consume-slide-event";
2593
+ "required": false;
2594
+ };
2595
+ "enable-touch-pseudo-propagation": {
2596
+ "alias": "enable-touch-pseudo-propagation";
2597
+ "required": false;
2598
+ };
2599
+ }, {}, never, never, true, never>;
2600
+ }
2601
+ /**
2602
+ * Horizontally swipeable paging container.
2603
+ */
2604
+ export declare class LynxViewPager extends LynxElementBase {
2605
+ /**
2606
+ * Page index to display on first render. @default 0
2607
+ */
2608
+ 'initial-select-index'?: number;
2609
+ /**
2610
+ * Whether horizontal scroll gesture is enabled. @default true
2611
+ */
2612
+ 'enable-scroll'?: boolean;
2613
+ /**
2614
+ * Whether the pager bounces past edge (iOS/Harmony/Clay). @default true
2615
+ */
2616
+ bounces?: boolean;
2617
+ /**
2618
+ * Enable bounce effect at edges on Android. @default false
2619
+ */
2620
+ 'android-always-overscroll'?: boolean;
2621
+ /**
2622
+ * Block gesture pass-through to parent on Android. @default false
2623
+ */
2624
+ 'android-force-can-scroll'?: boolean;
2625
+ /**
2626
+ * Allow outer container swipe at edges (iOS). @default false
2627
+ */
2628
+ 'ios-gesture-direction'?: boolean;
2629
+ /**
2630
+ * Left edge exclusion zone for swipe gesture (iOS, px). @default 0
2631
+ */
2632
+ 'ios-gesture-offset'?: number;
2633
+ /**
2634
+ * UIGestureRecognizer class name for simultaneous recognition (iOS).
2635
+ */
2636
+ 'ios-recognized-gesture-class'?: string;
2637
+ /**
2638
+ * UIView tag for simultaneous gesture recognition (iOS). @default 0
2639
+ */
2640
+ 'ios-recognized-view-tag'?: number;
2641
+ /**
2642
+ * Enable lazy load mode with early exposure. @default false
2643
+ */
2644
+ 'keep-item-view'?: boolean;
2645
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxViewPager, never>;
2646
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxViewPager, "viewpager", never, {
2647
+ "initial-select-index": {
2648
+ "alias": "initial-select-index";
2649
+ "required": false;
2650
+ };
2651
+ "enable-scroll": {
2652
+ "alias": "enable-scroll";
2653
+ "required": false;
2654
+ };
2655
+ "bounces": {
2656
+ "alias": "bounces";
2657
+ "required": false;
2658
+ };
2659
+ "android-always-overscroll": {
2660
+ "alias": "android-always-overscroll";
2661
+ "required": false;
2662
+ };
2663
+ "android-force-can-scroll": {
2664
+ "alias": "android-force-can-scroll";
2665
+ "required": false;
2666
+ };
2667
+ "ios-gesture-direction": {
2668
+ "alias": "ios-gesture-direction";
2669
+ "required": false;
2670
+ };
2671
+ "ios-gesture-offset": {
2672
+ "alias": "ios-gesture-offset";
2673
+ "required": false;
2674
+ };
2675
+ "ios-recognized-gesture-class": {
2676
+ "alias": "ios-recognized-gesture-class";
2677
+ "required": false;
2678
+ };
2679
+ "ios-recognized-view-tag": {
2680
+ "alias": "ios-recognized-view-tag";
2681
+ "required": false;
2682
+ };
2683
+ "keep-item-view": {
2684
+ "alias": "keep-item-view";
2685
+ "required": false;
2686
+ };
2687
+ }, {}, never, never, true, never>;
2688
+ }
2689
+ /**
2690
+ * Single page container inside a viewpager.
2691
+ */
2692
+ export declare class LynxViewPagerItem extends LynxElementBase {
2693
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxViewPagerItem, never>;
2694
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxViewPagerItem, "viewpager-item", never, {}, {}, never, never, true, never>;
2695
+ }
2696
+ /**
2697
+ * Native web view that loads a URL or an inline HTML string. Use `<frame>`
2698
+ * instead to embed another Lynx bundle.
2699
+ */
2700
+ export declare class LynxWebView extends LynxElementBase {
2701
+ /**
2702
+ * URL to load. Changing it reloads the page.
2703
+ */
2704
+ src?: string;
2705
+ /**
2706
+ * Inline HTML to load. Ignored when `src` is set.
2707
+ */
2708
+ html?: string;
2709
+ /**
2710
+ * Enable the bounce effect (iOS). @default false
2711
+ */
2712
+ bounces?: boolean;
2713
+ /**
2714
+ * Show the scroll bar (iOS). @default false
2715
+ */
2716
+ 'scroll-bar-enable'?: boolean;
2717
+ /**
2718
+ * Params forwarded to a custom web view implementation (Android/iOS).
2719
+ */
2720
+ params?: Record<string, unknown>;
2721
+ /**
2722
+ * Which web view implementation (injected via LynxService) to use. @default 'default'
2723
+ */
2724
+ 'webview-type'?: string;
2725
+ /**
2726
+ * Allow remote debugging (Chrome DevTools / Safari Web Inspector). @default false
2727
+ */
2728
+ 'enable-debug'?: boolean;
2729
+ /**
2730
+ * JavaScript executed when the document is ready (Clay desktop).
2731
+ */
2732
+ initjs?: string;
2733
+ /**
2734
+ * Cookies preset before loading (Clay).
2735
+ */
2736
+ cookies?: {
2737
+ name: string;
2738
+ value: string;
2739
+ domain?: string;
2740
+ path?: string;
2741
+ secure?: boolean;
2742
+ httpOnly?: boolean;
2743
+ sameSite: string;
2744
+ }[];
2745
+ /**
2746
+ * Render off-screen (Clay). @default false
2747
+ */
2748
+ 'use-osr'?: boolean;
2749
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxWebView, never>;
2750
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxWebView, "webview", never, {
2751
+ "src": {
2752
+ "alias": "src";
2753
+ "required": false;
2754
+ };
2755
+ "html": {
2756
+ "alias": "html";
2757
+ "required": false;
2758
+ };
2759
+ "bounces": {
2760
+ "alias": "bounces";
2761
+ "required": false;
2762
+ };
2763
+ "scroll-bar-enable": {
2764
+ "alias": "scroll-bar-enable";
2765
+ "required": false;
2766
+ };
2767
+ "params": {
2768
+ "alias": "params";
2769
+ "required": false;
2770
+ };
2771
+ "webview-type": {
2772
+ "alias": "webview-type";
2773
+ "required": false;
2774
+ };
2775
+ "enable-debug": {
2776
+ "alias": "enable-debug";
2777
+ "required": false;
2778
+ };
2779
+ "initjs": {
2780
+ "alias": "initjs";
2781
+ "required": false;
2782
+ };
2783
+ "cookies": {
2784
+ "alias": "cookies";
2785
+ "required": false;
2786
+ };
2787
+ "use-osr": {
2788
+ "alias": "use-osr";
2789
+ "required": false;
2790
+ };
2791
+ }, {}, never, never, true, never>;
2792
+ }
2793
+ /**
2794
+ * All Lynx native element directives as a single importable array.
2795
+ * Add to the `imports` of any component whose template uses Lynx elements.
2796
+ */
2797
+ export declare const LYNX_ELEMENTS: readonly [typeof LynxView, typeof LynxText, typeof LynxInlineTruncation, typeof LynxImage, typeof LynxScrollView, typeof LynxList, typeof LynxListItem, typeof LynxBlock, typeof LynxIf, typeof LynxFor, typeof LynxFrame, typeof LynxInput, typeof LynxTextarea, typeof import("@blotch/angular-lynx").LynxInputValueAccessor, typeof import("@blotch/angular-lynx").LynxTextareaValueAccessor, typeof LynxOverlay, typeof LynxRefresh, typeof LynxRefreshHeader, typeof LynxScrollCoordinator, typeof LynxScrollCoordinatorHeader, typeof LynxScrollCoordinatorSlot, typeof LynxScrollCoordinatorSlotDrag, typeof LynxScrollCoordinatorToolbar, typeof LynxSvg, typeof LynxViewPager, typeof LynxViewPagerItem, typeof LynxBlurView, typeof LynxVideo, typeof LynxWebView, typeof LynxCoverView, typeof LynxTitleBarView];
2798
+ export declare class LynxLogger {
2799
+ #private;
2800
+ constructor();
2801
+ log(...args: unknown[]): void;
2802
+ warn(...args: unknown[]): void;
2803
+ error(...args: unknown[]): void;
2804
+ info(...args: unknown[]): void;
2805
+ debug(...args: unknown[]): void;
2806
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxLogger, never>;
2807
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2808
+ }
2809
+ /**
2810
+ * Extensible map of custom native modules declared by the host app.
2811
+ *
2812
+ * App developers augment this interface to get type-safe access
2813
+ * via {@link LynxNativeModule.getNativeModule}:
2814
+ *
2815
+ * ```typescript
2816
+ * declare module '@blotch/angular-lynx' {
2817
+ * interface NativeModuleMap {
2818
+ * NativeLocalStorageModule: {
2819
+ * setStorageItem(key: string, value: string): void;
2820
+ * getStorageItem(key: string, callback: (value: string) => void): void;
2821
+ * clearStorage(): void;
2822
+ * };
2823
+ * }
2824
+ * }
2825
+ * ```
2826
+ */
2827
+ type NativeModuleMap = {};
2828
+ /**
2829
+ * Wraps the Lynx native module bridge and JS module registry as an Angular injectable.
2830
+ *
2831
+ * **Native modules** (`NativeModules` global) let JS code call native platform
2832
+ * functions (iOS / Android / HarmonyOS). The host app registers modules on the
2833
+ * native side; this service provides typed access from Angular.
2834
+ *
2835
+ * **JS modules** (`lynx.getJSModule` / `lynx.registerModule`) share JavaScript
2836
+ * values within a single LynxView. This is the same API used internally by
2837
+ * `LynxInitData` and `LynxGlobalData` (via `GlobalEventEmitter`).
2838
+ *
2839
+ * @usageNotes
2840
+ * ```typescript
2841
+ * const modules = inject(LynxNativeModule);
2842
+ *
2843
+ * // Call a native method (Promise-based wrapper over bridge.call)
2844
+ * const result = await modules.call<string>('getDeviceId', {});
2845
+ *
2846
+ * // Listen for native events
2847
+ * modules.on('onDeepLink', (url) => console.log(url));
2848
+ *
2849
+ * // Access a typed custom native module
2850
+ * const storage = modules.getNativeModule('NativeLocalStorageModule');
2851
+ * storage?.setStorageItem('key', 'value');
2852
+ *
2853
+ * // JS module sharing within the LynxView
2854
+ * modules.registerJSModule('mySharedState', { count: 0 });
2855
+ * const state = modules.getJSModule<{ count: number }>('mySharedState');
2856
+ * ```
2857
+ */
2858
+ export declare class LynxNativeModule {
2859
+ #private;
2860
+ /**
2861
+ * Calls a native method via `NativeModules.bridge.call()`.
2862
+ *
2863
+ * The native callback API is wrapped in a Promise for ergonomic
2864
+ * use with `async`/`await`.
2865
+ *
2866
+ * Returns `undefined` when `NativeModules` is unavailable (web preview, tests).
2867
+ */
2868
+ call<T = unknown>(name: string, params?: Record<string, unknown>): Promise<T | undefined>;
2869
+ /**
2870
+ * Subscribes to a native event via `NativeModules.bridge.on()`.
2871
+ *
2872
+ * No-op when `NativeModules` is unavailable.
2873
+ */
2874
+ on(name: string, callback: (...args: unknown[]) => void): void;
2875
+ /**
2876
+ * Retrieves a custom native module by name from the `NativeModules` global.
2877
+ *
2878
+ * Augment the {@link NativeModuleMap} interface for type-safe access:
2879
+ *
2880
+ * ```typescript
2881
+ * declare module '@blotch/angular-lynx' {
2882
+ * interface NativeModuleMap {
2883
+ * NativeLocalStorageModule: { ... };
2884
+ * }
2885
+ * }
2886
+ *
2887
+ * const storage = modules.getNativeModule('NativeLocalStorageModule');
2888
+ * ```
2889
+ *
2890
+ * Returns `undefined` when `NativeModules` is unavailable or the module
2891
+ * is not registered.
2892
+ */
2893
+ getNativeModule<K extends string>(name: K): K extends keyof NativeModuleMap ? NativeModuleMap[K] : unknown;
2894
+ /**
2895
+ * Retrieves a JS module registered within this LynxView.
2896
+ *
2897
+ * This wraps `lynx.getJSModule()` — the same API used internally
2898
+ * for `GlobalEventEmitter`.
2899
+ *
2900
+ * Returns `undefined` when `lynx` is unavailable or the module
2901
+ * is not registered.
2902
+ */
2903
+ getJSModule<T = unknown>(name: string): T | undefined;
2904
+ /**
2905
+ * Registers a JS module for sharing within this LynxView.
2906
+ *
2907
+ * Other code (including native callbacks) can retrieve it via
2908
+ * `getJSModule()` or `lynx.getJSModule()`.
2909
+ *
2910
+ * No-op when `lynx` is unavailable.
2911
+ */
2912
+ registerJSModule<T extends object>(name: string, module: T): void;
2913
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxNativeModule, never>;
2914
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2915
+ }
2916
+ /**
2917
+ * A no-op animation returned when `animate()` is called on the background
2918
+ * thread where `__ElementAnimate` is unavailable. Provides the same API
2919
+ * surface as `LynxAnimation` so callers can call `.cancel()`, `.pause()`,
2920
+ * `.play()` without crashing — the calls simply do nothing.
2921
+ *
2922
+ * Fixes: "Uncaught Error: animate() is only available on the main thread"
2923
+ * in the Go web preview (and any background-thread context).
2924
+ *
2925
+ * Why needed: In the Lynx dual-thread model, Angular runs on the background
2926
+ * thread where __ElementAnimate doesn't exist. Previously, calling
2927
+ * element.animate() from a component (e.g. the animations example's "Tap to
2928
+ * pulse" button) would throw, crashing the Go web preview on the docs site.
2929
+ *
2930
+ * Approach: Return a silent no-op instead of throwing. This matches how
2931
+ * @lynx-js/web-core itself handles __ElementAnimate on the server — it's
2932
+ * defined as `() => {}` (a no-op). We mirror that graceful degradation here.
2933
+ * Alternatives considered:
2934
+ * - Cross-thread bridge via lynx.getCoreContext().dispatchEvent() — correct
2935
+ * long-term but complex; LynxBackgroundElement doesn't hold a native ref.
2936
+ * - Removing animate() from the example — wrong because it's the primary
2937
+ * demonstration of the JS animate API.
2938
+ */
2939
+ declare class NoopLynxAnimation implements Pick<Animation, 'id' | 'cancel' | 'pause' | 'play'> {
2940
+ #private;
2941
+ readonly id: string;
2942
+ constructor();
2943
+ play(): void;
2944
+ pause(): void;
2945
+ cancel(): void;
2946
+ }
2947
+ type LynxEventType = 'bindEvent' | 'catchEvent' | 'capture-bindEvent' | 'capture-catchEvent' | 'global-bindEvent';
2948
+ declare const EVENT_PREFIXES: [string, LynxEventType][];
2949
+ type BaseLynxElement = Pick<Element, 'setAttribute'> & {
2950
+ tagName: string;
2951
+ setProperty(name: string, value: any): void;
2952
+ getAttribute(name: string): string | null;
2953
+ removeAttribute(name: string): void;
2954
+ setStyle(key: string, value: unknown): void;
2955
+ removeStyle(key: string): void;
2956
+ setInlineStyles(inlineStyle: string): void;
2957
+ insertBefore(newChild: BaseLynxElement, refChild: BaseLynxElement | null): void;
2958
+ appendChild(newChild: BaseLynxElement): void;
2959
+ addClass(name: string): void;
2960
+ removeClass(name: string): void;
2961
+ remove(): void;
2962
+ parentNode(): BaseLynxElement | null;
2963
+ nextSibling(): BaseLynxElement | null;
2964
+ querySelector(selector: string): BaseLynxElement | null;
2965
+ querySelectorAll(selector: string): BaseLynxElement[];
2966
+ addEventListener(name: string, cb: (event: any) => any): () => void;
2967
+ animate(keyframes: Record<string, string | number>[], options?: number | LynxAnimationOptions): BaseLynxAnimation;
2968
+ /**
2969
+ * Invokes a native UI method on this element (e.g. setValue, scrollTo).
2970
+ *
2971
+ * Marked optional because it only exists on the main thread: LynxElement
2972
+ * implements it via __InvokeUIMethod, while LynxBackgroundElement (used in
2973
+ * tests and the background-thread context) does not — UIMethod calls have no
2974
+ * meaning outside the native render thread. Callers should use invoke?.() so
2975
+ * they become no-ops in test/background environments rather than crashing.
2976
+ */
2977
+ invoke?(methodName: string, params?: Record<string, unknown>): void;
2978
+ };
2979
+ /**
2980
+ * Virtual element for the background thread where no native PAPI functions exist.
2981
+ * Maintains an in-memory linked-list tree (parent/child/sibling pointers) that
2982
+ * mirrors what LynxDocument builds on the main thread. Used by:
2983
+ * - Angular's change detection (reads parentNode/nextSibling for view insertion)
2984
+ * - querySelector/querySelectorAll (for testing and background-thread lookups)
2985
+ * - LynxBackgroundDocument (creates these instead of native elements)
2986
+ *
2987
+ * Props, styles, classes, and events are stored in Maps/Sets but never sent to
2988
+ * native — they exist so component code can read back what it set without
2989
+ * crashing, and so the testing library can inspect element state.
2990
+ */
2991
+ declare class LynxBackgroundElement implements BaseLynxElement {
2992
+ #private;
2993
+ isRootPageElement: boolean;
2994
+ tagName: string;
2995
+ setProperty(name: string, value: any): void;
2996
+ setAttribute(name: string, value: any): void;
2997
+ getAttribute(name: string): string | null;
2998
+ removeAttribute(name: string): void;
2999
+ setStyle(key: string, value: unknown): void;
3000
+ removeStyle(key: string): void;
3001
+ setInlineStyles(inlineStyle: string): void;
3002
+ insertBefore(newChild: LynxBackgroundElement, refChild: LynxBackgroundElement | null): void;
3003
+ appendChild(newChild: LynxBackgroundElement): void;
3004
+ addClass(name: string): void;
3005
+ removeClass(name: string): void;
3006
+ remove(): void;
3007
+ parentNode(): BaseLynxElement | null;
3008
+ nextSibling(): BaseLynxElement | null;
3009
+ querySelector(selector: string): BaseLynxElement | null;
3010
+ querySelectorAll(selector: string): BaseLynxElement[];
3011
+ /**
3012
+ * Previously threw: `throw new Error('animate() is only available on the
3013
+ * main thread')`. This crashed the Go web preview on the docs site because
3014
+ * the animations example's (bindtap) handler calls el.nativeElement.animate()
3015
+ * which lands here on the background thread. Returning a no-op is safe —
3016
+ * the animation won't visually play, but the caller's code (including
3017
+ * .cancel() / .pause() / .play() chains) continues without error.
3018
+ */
3019
+ animate(_keyframes: Record<string, string | number>[], _options?: number | LynxAnimationOptions): NoopLynxAnimation;
3020
+ addEventListener(name: string, cb: (event: any) => any): () => void;
3021
+ }
3022
+ declare class LynxElement implements BaseLynxElement {
3023
+ #private;
3024
+ get element(): ElementRef;
3025
+ tagName: string;
3026
+ /**
3027
+ * When true, this element is the root page element and must not be
3028
+ * re-parented (appendChild/insertBefore) or removed from the tree.
3029
+ * Angular calls appendChild/remove as part of normal component lifecycle,
3030
+ * but the page element is the immutable root — moving or removing it
3031
+ * would corrupt the native element tree.
3032
+ */
3033
+ isRootPageElement: boolean;
3034
+ /**
3035
+ * Virtual tree tracking — used when parent manages children outside the
3036
+ * native element tree (e.g., list manages children via componentAtIndex
3037
+ * callbacks rather than __AppendElement)
3038
+ */
3039
+ _virtualParent: LynxElement | null;
3040
+ _virtualPrev: LynxElement | null;
3041
+ _virtualNext: LynxElement | null;
3042
+ constructor(element: ElementRef);
3043
+ /**
3044
+ * Drops this wrapper's current native id from the registry. Called when the
3045
+ * native ref is swapped (recreate-on-remount) for the STALE id, and by the
3046
+ * renderer's destroyNode when Angular tears the element down, so the registry
3047
+ * doesn't retain wrappers for dead native refs.
3048
+ */
3049
+ deregisterNative(): void;
3050
+ setProperty(name: string, value: any): void;
3051
+ /**
3052
+ * Seeds the cached text for a raw-text element so #recreateSubtree() can
3053
+ * rebuild it via __CreateRawText. Called by LynxDocument right after
3054
+ * construction — raw-text bakes its text in at creation, so it never flows
3055
+ * through a cached setter.
3056
+ */
3057
+ setInitialText(text: string): void;
3058
+ setAttribute(name: string, value: any): void;
3059
+ getAttribute(name: string): string;
3060
+ removeAttribute(name: string): void;
3061
+ setStyle(key: string, value: unknown): void;
3062
+ removeStyle(key: string): void;
3063
+ setInlineStyles(inlineStyle: string): void;
3064
+ insertBefore(newChild: LynxElement, refChild: LynxElement | null): void;
3065
+ appendChild(newChild: LynxElement): void;
3066
+ addClass(name: string): void;
3067
+ /**
3068
+ * Lynx has no __RemoveClass PAPI — we must get current classes, filter,
3069
+ * and set back. This is O(n) per class removal but class lists on Lynx
3070
+ * elements are typically small (1-5 classes for scope/component styling).
3071
+ */
3072
+ removeClass(name: string): void;
3073
+ /**
3074
+ * Requests removal of this element. Two removal paths:
3075
+ * 1. Virtual parent (list) → delegate to removeVirtualChild() SYNCHRONOUSLY,
3076
+ * which updates the JS linked list and schedules an update-list-info diff.
3077
+ * Does NOT call __RemoveElement — list item removal is managed exclusively
3078
+ * through update-list-info's removeAction (calling both would double-remove
3079
+ * and crash). This is never part of an Angular move, so it is not deferred.
3080
+ * 2. Normal parent → QUEUED and committed at the end of the change-detection
3081
+ * cycle (see #pendingRemovals / commitPendingRemovals). If a re-insert
3082
+ * follows in the same cycle it is a move and gets canceled; otherwise
3083
+ * #doRemove() detaches from the native tree.
3084
+ */
3085
+ remove(): void;
3086
+ /**
3087
+ * Commits every queued genuine removal. Called by `LynxRendererFactory2.end()`
3088
+ * once per change-detection cycle, BEFORE `__FlushElementTree()`, so the
3089
+ * `__RemoveElement` calls are committed to the main thread in the same flush as
3090
+ * the cycle's other mutations (see #pendingRemovals for why the timing
3091
+ * matters). Any element that was re-inserted (a move) has already removed
3092
+ * itself from the set via #cancelPendingRemoval, so only genuine destroys
3093
+ * remain.
3094
+ */
3095
+ static commitPendingRemovals(): void;
3096
+ /**
3097
+ * Re-derives displayed whitespace for every text touched this cycle. Each dirty
3098
+ * node is resolved to the OUTERMOST enclosing <text>: a nested <text> is inline
3099
+ * — it shares one inline-formatting-context with the surrounding raw-text, like
3100
+ * an HTML <span> — so the whole subtree is trimmed as a single run of text.
3101
+ * Called by `processPendingTextNormalization()` from `end()` /
3102
+ * `scheduleSettleFlush`, after removals and before the flush.
3103
+ */
3104
+ static commitPendingTextNormalization(): void;
3105
+ /**
3106
+ * Returns the parent element. For list children, the virtual parent (the JS
3107
+ * LynxListElement) is returned instead of the native parent — this maintains
3108
+ * the illusion that list children are parented by the list even though they
3109
+ * may not be __AppendElement'd to the native list yet (lazy append in
3110
+ * componentAtIndex).
3111
+ */
3112
+ parentNode(): LynxElement | null;
3113
+ nextSibling(): LynxElement | null;
3114
+ querySelector(selector: string): LynxElement | null;
3115
+ querySelectorAll(selector: string): LynxElement[];
3116
+ /**
3117
+ * Invokes a native UI method on this element by name.
3118
+ *
3119
+ * This is needed because some Lynx native elements expose behavior only
3120
+ * through UIMethod calls and have no corresponding @LynxProp handler. The
3121
+ * most common case is input/textarea text updates: the native
3122
+ * LynxUIBaseInput class has no @LynxProp for "value", so __SetAttribute
3123
+ * is a no-op for changing the displayed text after user interaction. The
3124
+ * setValue UIMethod is the only way to programmatically update the live
3125
+ * text.
3126
+ *
3127
+ * The result callback is intentionally empty. Callers that need a result
3128
+ * (e.g. getValue, boundingClientRect) should use MainThreadElement.invoke(),
3129
+ * which returns a Promise. This method covers fire-and-forget cases like
3130
+ * setValue where only the side-effect matters.
3131
+ */
3132
+ invoke(methodName: string, params?: Record<string, unknown>): void;
3133
+ animate(keyframes: Record<string, string | number>[], options?: number | LynxAnimationOptions): LynxAnimation;
3134
+ /**
3135
+ * Angular's renderer.listen() calls this with event names like 'bindtap',
3136
+ * 'catchtouchstart', 'bindscroll', etc. We strip the Lynx event prefix
3137
+ * (bind/catch/capture-bind/capture-catch) to extract the native event name
3138
+ * and determine the event type for __AddEvent.
3139
+ * Events that don't match any prefix (e.g. DOM-style 'click') are silently
3140
+ * ignored — Lynx has no equivalent event system for arbitrary names.
3141
+ */
3142
+ addEventListener(name: string, cb: (event: any) => any): () => void;
3143
+ }
3144
+ /**
3145
+ * Commits all queued genuine element removals — a free-function wrapper over
3146
+ * `LynxElement.commitPendingRemovals()` so `LynxRendererFactory2.end()` can
3147
+ * drain them (via the lynx-element barrel) right before `__FlushElementTree()`,
3148
+ * keeping removals in the same flush as the cycle's other mutations.
3149
+ */
3150
+ declare const processPendingRemovals: () => void;
3151
+ /**
3152
+ * Re-derives positional edge whitespace for every text touched this cycle — a
3153
+ * free-function wrapper over `LynxElement.commitPendingTextNormalization()` so
3154
+ * `LynxRendererFactory2.end()` can drain it (via the lynx-element barrel) right
3155
+ * after removals and before `__FlushElementTree()`, keeping the corrected text in
3156
+ * the same flush as the cycle's other mutations. See #pendingTextNormalization.
3157
+ */
3158
+ declare const processPendingTextNormalization: () => void;
3159
+ /**
3160
+ * Safety-net flush for native mutations made OUTSIDE a begin()/end() change-
3161
+ * detection cycle. `LynxRendererFactory2.end()` calls `__FlushElementTree()`
3162
+ * once per CD tick, which is what commits (lays out + paints) the cycle's
3163
+ * element mutations. But a lazy-loaded route component is instantiated by
3164
+ * `RouterOutlet` DURING navigation — outside any such cycle — so its freshly
3165
+ * created elements land in the fiber tree yet are never flushed. On-device
3166
+ * symptom: the route's static shell renders, but its `@if`/`@for`/interpolation
3167
+ * content stays invisible until an unrelated CD (e.g. a tap) triggers the next
3168
+ * end() flush. (Bootstrap sidesteps this via native's implicit post-renderPage
3169
+ * flush.) This mirrors the `<list>` path's own guard for the exact same case —
3170
+ * see `LynxListElement.#scheduleUpdate`.
3171
+ *
3172
+ * Called from `LynxDocument`'s element creators — which only ever run on the
3173
+ * main thread (the background thread uses LynxBackgroundDocument, which does not
3174
+ * touch the native tree), so no thread guard is needed here. It schedules ONE
3175
+ * coalesced microtask (matching the list guard's `queueMicrotask`, not
3176
+ * `setTimeout` — flushing from a macrotask crashes the native engine), and is a
3177
+ * no-op while:
3178
+ * - inside a CD cycle — end() will flush;
3179
+ * - the first render is pending — native flushes after renderPage, and any
3180
+ * `<list>` defers its own first flush (see isFirstRenderPending()).
3181
+ * The near-no-op cost when nothing is layout-dirty (the core's `need_layout_`
3182
+ * gate) keeps the steady-state overhead negligible.
3183
+ */
3184
+ declare const scheduleSettleFlush: () => void;
3185
+ /**
3186
+ * Process all pending list updates. Called from LynxRendererFactory2.end()
3187
+ * before __FlushElementTree() so list updates are flushed as part of the
3188
+ * normal Angular CD cycle — never from setTimeout (which crashes native).
3189
+ */
3190
+ declare const processPendingListUpdates: () => void;
3191
+ declare class LynxListElement extends LynxElement {
3192
+ #private;
3193
+ /**
3194
+ * Store the list callbacks so _processUpdate() can re-register them via
3195
+ * __UpdateListCallbacks on every update. React Lynx does this on every
3196
+ * flush (see listUpdateInfo.ts) — the native engine (unlike the web
3197
+ * polyfill) does not invoke componentAtIndex for a fresh update-list-info
3198
+ * unless the callbacks are re-registered alongside it. Without this,
3199
+ * update-list-info is accepted with no crash but componentAtIndex is
3200
+ * silently never called and the list stays blank.
3201
+ */
3202
+ setCallbacks(componentAtIndex: (...args: any[]) => number | undefined, enqueueComponent: (...args: any[]) => void, componentAtIndexes: (...args: any[]) => void): void;
3203
+ remove(): void;
3204
+ appendChild(newChild: LynxElement): void;
3205
+ insertBefore(newChild: LynxElement, refChild: LynxElement | null): void;
3206
+ removeVirtualChild(child: LynxElement): void;
3207
+ /**
3208
+ * Returns ElementRefs of real UI children, excluding NoneElement comment
3209
+ * markers — the invisible <view>s LynxDocument.createComment() creates as
3210
+ * Angular's @for/@if insertion anchors, each tagged tagName === 'comment'.
3211
+ *
3212
+ * Filters on the wrapper's `tagName` (a plain JS string on the LynxElement
3213
+ * object), NOT a WeakSet keyed by the native ElementRef. This is the fix for
3214
+ * the crash-to-home-screen on every list add/remove. The previous
3215
+ * implementation did `#nonElements.has(child.element)`, and hashing a
3216
+ * native-backed element ref in a WeakSet/Map/Set on the main-thread Lepus
3217
+ * context aborts the process — js_map_has → map_find_record → js_strict_eq2
3218
+ * → __JS_FreeValueRT (a QuickJS refcount assertion). _processUpdate() calls
3219
+ * this on every list update, so it detonated as soon as items changed.
3220
+ * (The initial render happened to survive it — the abort is refcount-timing
3221
+ * sensitive — which is why it looked fine until the first mutation.) Reading
3222
+ * a string property off the JS wrapper touches no FFI object and no Map/Set,
3223
+ * so it can never trip it. See create-list-element.ts's componentAtIndex doc
3224
+ * for the general "never key a Set/Map on an element ref" constraint.
3225
+ */
3226
+ getUIChildren(): ElementRef[];
3227
+ /**
3228
+ * The UI children list as of the last _processUpdate() call, pre-filtered
3229
+ * and cached — for componentAtIndex/componentAtIndexes (create-list-element.ts)
3230
+ * to read via plain array indexing. See their call sites' doc comments:
3231
+ * native invokes them synchronously, reentrantly, from deep inside its own
3232
+ * list layout pass, and calling ANY WeakSet/Map method (even a single
3233
+ * `.has()`) from within that reentrant call was observed to crash the
3234
+ * Lepus QuickJS context with a refcounting assertion inside
3235
+ * __JS_FreeValueRT, every time, regardless of how shallow the surrounding
3236
+ * call stack is (confirmed via a genuinely fresh setTimeout-scheduled
3237
+ * invocation that still crashed identically) — so getUIChildren() (which
3238
+ * calls WeakSet.has() per child) must never run from that call path.
3239
+ */
3240
+ getCommittedUIChildren(): ElementRef[];
3241
+ /**
3242
+ * Appended-state is tracked as a plain property directly on the ElementRef
3243
+ * rather than a WeakSet, for the same reason as getCommittedUIChildren():
3244
+ * these are called from componentAtIndex, where WeakSet/Map methods crash.
3245
+ * A plain property get/set compiles to ordinary field access, not a call
3246
+ * into QuickJS's Map/Set native implementation.
3247
+ */
3248
+ isAppendedToNativeList(child: ElementRef): boolean;
3249
+ markAppendedToNativeList(child: ElementRef): void;
3250
+ /**
3251
+ * Compute a diff against the last committed children and send update-list-info.
3252
+ * Called from processPendingListUpdates() — NOT directly.
3253
+ * __FlushElementTree() is called afterwards by the renderer factory.
3254
+ *
3255
+ * Positions in insertAction are indices in the NEW child array.
3256
+ * Positions in removeAction are indices in the OLD (committed) child array.
3257
+ * This matches the React Lynx ListUpdateInfoRecording format.
3258
+ */
3259
+ _processUpdate(): void;
3260
+ }
3261
+ /**
3262
+ * Configuration for creating a portal overlay.
3263
+ */
3264
+ type PortalConfig = {
3265
+ /**
3266
+ * Overlay z-level (1–4). Higher levels render above lower ones.
3267
+ */
3268
+ level?: number;
3269
+ /**
3270
+ * Custom injector for the component's dependency injection context.
3271
+ */
3272
+ injector?: EnvironmentInjector;
3273
+ /**
3274
+ * Initial input values to set on the component after creation.
3275
+ */
3276
+ inputs?: Record<string, unknown>;
3277
+ };
3278
+ /**
3279
+ * Handle for managing a portal instance created by {@link LynxPortal}.
3280
+ *
3281
+ * Call {@link destroy} to tear down the overlay and its content.
3282
+ */
3283
+ export declare class PortalRef<T> {
3284
+ #private;
3285
+ /**
3286
+ * @internal
3287
+ */
3288
+ constructor(overlay: BaseLynxElement, appRef: ApplicationRef, componentRef: ComponentRef<T> | null, viewRef: EmbeddedViewRef<unknown> | null);
3289
+ /**
3290
+ * The component instance. `null` for template portals.
3291
+ */
3292
+ get instance(): T | null;
3293
+ /**
3294
+ * Sets a component input. Only works for component portals.
3295
+ */
3296
+ setInput(name: string, value: unknown): void;
3297
+ /**
3298
+ * Tears down the portal: destroys the component/template view,
3299
+ * detaches from change detection, and removes the native overlay element.
3300
+ */
3301
+ destroy(): void;
3302
+ }
3303
+ /**
3304
+ * Programmatically renders Angular components or templates inside a native
3305
+ * Lynx `<overlay>` element — the equivalent of Angular CDK's
3306
+ * `Overlay` / `DomPortalOutlet`.
3307
+ *
3308
+ * For **declarative** overlays, use `<overlay>` directly in your template.
3309
+ * This service is for **imperative** cases: modal dialogs, toast notifications,
3310
+ * or any content that needs to be created from code rather than a template.
3311
+ *
3312
+ * @usageNotes
3313
+ * ```typescript
3314
+ * const portal = inject(LynxPortal);
3315
+ *
3316
+ * // Open a component in an overlay
3317
+ * const ref = portal.open(ConfirmDialogComponent, {
3318
+ * level: 2,
3319
+ * inputs: { title: 'Delete item?' },
3320
+ * });
3321
+ *
3322
+ * // Update inputs later
3323
+ * ref.setInput('title', 'Are you sure?');
3324
+ *
3325
+ * // Tear down when done
3326
+ * ref.destroy();
3327
+ *
3328
+ * // Open a template in an overlay
3329
+ * const tplRef = portal.openTemplate(myTemplateRef, { level: 1 });
3330
+ * tplRef.destroy();
3331
+ * ```
3332
+ */
3333
+ export declare class LynxPortal {
3334
+ #private;
3335
+ /**
3336
+ * Creates a native `<overlay>` and renders the given component into it.
3337
+ *
3338
+ * The component participates in Angular change detection and is fully
3339
+ * functional (inputs, outputs, dependency injection, lifecycle hooks).
3340
+ */
3341
+ open<T>(component: Type<T>, config?: PortalConfig): PortalRef<T>;
3342
+ /**
3343
+ * * Creates a native `<overlay>` and renders the given template into it.
3344
+ * *
3345
+ * * Use this when you have a `TemplateRef` (from `@ViewChild` or a
3346
+ * * template variable) rather than a component class.
3347
+ * v8 ignore start -- reaching this path requires a real Angular component render that produces a live TemplateRef; the mocked LYNX_DOCUMENT in the spec doesn't drive one, and viewChild.required doesn't resolve without an appRef flush. Coverage is provided by the on-device examples that use openTemplate.
3348
+ */
3349
+ openTemplate<C>(template: TemplateRef<C>, config?: PortalConfig & {
3350
+ context?: C;
3351
+ }): PortalRef<null>;
3352
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxPortal, never>;
3353
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3354
+ }
3355
+ /**
3356
+ * Type definition for main-thread function handles used by {@link mainThreadFn}.
3357
+ */
3358
+ type MainThreadFnHandle<TArgs extends unknown[] = unknown[], TReturn = unknown> = {
3359
+ readonly _wkltId: string;
3360
+ readonly _workletType: 'main-thread';
3361
+ readonly __isMainThreadFn: true;
3362
+ readonly __args?: TArgs;
3363
+ readonly __return?: TReturn;
3364
+ };
3365
+ export declare const mainThreadFn: <TArgs extends unknown[], TReturn>(fn: (...args: TArgs) => TReturn) => MainThreadFnHandle<TArgs, TReturn>;
3366
+ /**
3367
+ * Reset counter on HMR — called from runtime.ts before modules re-evaluate.
3368
+ */
3369
+ declare const __resetWorkletCounter: () => void;
3370
+ /**
3371
+ * Type definition for background function handles used by {@link backgroundFn}.
3372
+ */
3373
+ type BackgroundFnHandle<TArgs extends unknown[] = unknown[], TReturn = unknown> = {
3374
+ readonly _wkltId: string;
3375
+ readonly _workletType: 'background';
3376
+ readonly __isBackgroundFn: true;
3377
+ readonly __args?: TArgs;
3378
+ readonly __return?: TReturn;
3379
+ };
3380
+ export declare const backgroundFn: <TArgs extends unknown[], TReturn>(fn: (...args: TArgs) => TReturn) => BackgroundFnHandle<TArgs, TReturn>;
3381
+ /**
3382
+ * Reset counter on HMR.
3383
+ */
3384
+ declare const __resetBgWorkletCounter: () => void;
3385
+ export declare class MainThreadRef<T> {
3386
+ #private;
3387
+ readonly _wvid: number;
3388
+ constructor(initValue: T);
3389
+ get current(): T;
3390
+ set current(value: T);
3391
+ /**
3392
+ * Serialization hook for cross-thread transfer. JSON.stringify calls this
3393
+ * when the ref is passed as a param to dispatchEvent (MTS/background RPC).
3394
+ * The receiving thread's transformParams() resolves { _wvid } back to the
3395
+ * registered MainThreadRef instance.
3396
+ */
3397
+ toJSON(): {
3398
+ _wvid: number;
3399
+ };
3400
+ }
3401
+ export declare const createMainThreadRef: <T>(initValue: T) => MainThreadRef<T>;
3402
+ /**
3403
+ * Reset counter on HMR.
3404
+ */
3405
+ declare const __resetRefCounter: () => void;
3406
+ /**
3407
+ * Wraps a native ElementRef (elementRefptr) with the @lynx-js/types
3408
+ * MainThread.Element API surface. Created by runWorklet's param transformation
3409
+ * so that main-thread event handlers can call setStyleProperty(), setAttribute(),
3410
+ * etc. on event.currentTarget.
3411
+ */
3412
+ export declare class MainThreadElement {
3413
+ #private;
3414
+ constructor(element: ElementRef);
3415
+ setAttribute(name: string, value: unknown): void;
3416
+ getAttribute(name: string): unknown;
3417
+ getAttributeNames(): string[];
3418
+ setStyleProperty(name: string, value: string): void;
3419
+ setStyleProperties(styles: Record<string, string>): void;
3420
+ querySelector(selector: string): MainThreadElement | null;
3421
+ querySelectorAll(selector: string): MainThreadElement[];
3422
+ /**
3423
+ * Invokes a native UI method on this element (e.g. scrollTo, autoPlay).
3424
+ * __InvokeUIMethod is asynchronous — the result arrives in the callback.
3425
+ * scheduleFlush() must be called AFTER __InvokeUIMethod so the method
3426
+ * invocation is included in the next native render pass.
3427
+ */
3428
+ invoke(methodName: string, params?: Record<string, unknown>): Promise<unknown>;
3429
+ animate(keyframes: Record<string, number | string>[], options?: number | LynxAnimationOptions): LynxAnimation;
3430
+ /**
3431
+ * Not part of the official @lynx-js/types Element interface, but useful for
3432
+ * touch-tracking calculations. Uses __GetComputedStyleByKey when available.
3433
+ */
3434
+ getBoundingClientRect(): {
3435
+ left: number;
3436
+ top: number;
3437
+ right: number;
3438
+ bottom: number;
3439
+ width: number;
3440
+ height: number;
3441
+ };
3442
+ }
3443
+ /**
3444
+ * Plain functions are also accepted because the worklet build plugin transforms
3445
+ * them into MainThreadFnHandle objects at compile time.
3446
+ */
3447
+ type MaybeHandle = MainThreadFnHandle | ((...args: any[]) => any) | undefined | null;
3448
+ /**
3449
+ * Bridges Angular template bindings like `(mainThreadBindtap)="handler"` to
3450
+ * Lynx's main-thread (Lepus) event dispatch.
3451
+ *
3452
+ * Why a dedicated directive and not the renderer's listen() path:
3453
+ * - Normal `(bindtap)` events are delivered to the background JS thread and
3454
+ * incur a thread hop on every dispatch — fine for one-shot taps, but too
3455
+ * slow for gesture-driven UI (scroll-tracking, drag, pinch) where the
3456
+ * handler needs to mutate styles at native frame rate.
3457
+ * - The `mainThreadBind*` / `mainThreadCatch*` family registers the handler
3458
+ * as a *worklet* with `_workletType: 'main-thread'`, so Lynx invokes it
3459
+ * directly on the Lepus thread where __AddInlineStyle / __SetAttribute are
3460
+ * synchronous. There is no thread hop and no background JS involvement.
3461
+ * - These inputs cannot be expressed as @Output() because Angular would route
3462
+ * them through its own event subscription system and the underlying
3463
+ * worklet handle would never be passed to __AddEvent.
3464
+ *
3465
+ * The worklet plugin (in rsbuild-plugin-angular-lynx) rewrites any function
3466
+ * annotated with `'main thread'` directive into a `MainThreadFnHandle`
3467
+ * carrying a stable `_wkltId`. That ID is what we hand to __AddEvent here.
3468
+ */
3469
+ export declare class LynxMainThreadEvent implements OnChanges, OnDestroy {
3470
+ #private;
3471
+ mainThreadBindtap?: MaybeHandle;
3472
+ mainThreadCatchtap?: MaybeHandle;
3473
+ mainThreadBindtouchstart?: MaybeHandle;
3474
+ mainThreadCatchtouchstart?: MaybeHandle;
3475
+ mainThreadBindtouchmove?: MaybeHandle;
3476
+ mainThreadCatchtouchmove?: MaybeHandle;
3477
+ mainThreadBindtouchend?: MaybeHandle;
3478
+ mainThreadCatchtouchend?: MaybeHandle;
3479
+ mainThreadBindlongpress?: MaybeHandle;
3480
+ mainThreadCatchlongpress?: MaybeHandle;
3481
+ mainThreadBindscroll?: MaybeHandle;
3482
+ mainThreadCatchscroll?: MaybeHandle;
3483
+ mainThreadBindanimationstart?: MaybeHandle;
3484
+ mainThreadBindanimationend?: MaybeHandle;
3485
+ mainThreadBindtransitionend?: MaybeHandle;
3486
+ mainThreadBindlayoutchange?: MaybeHandle;
3487
+ ngOnChanges(changes: SimpleChanges): void;
3488
+ ngOnDestroy(): void;
3489
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxMainThreadEvent, never>;
3490
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LynxMainThreadEvent, "[mainThreadBindtap],[mainThreadCatchtap],[mainThreadBindtouchstart],[mainThreadCatchtouchstart],[mainThreadBindtouchmove],[mainThreadCatchtouchmove],[mainThreadBindtouchend],[mainThreadCatchtouchend],[mainThreadBindlongpress],[mainThreadCatchlongpress],[mainThreadBindscroll],[mainThreadCatchscroll],[mainThreadBindanimationstart],[mainThreadBindanimationend],[mainThreadBindtransitionend],[mainThreadBindlayoutchange]", never, {
3491
+ "mainThreadBindtap": {
3492
+ "alias": "mainThreadBindtap";
3493
+ "required": false;
3494
+ };
3495
+ "mainThreadCatchtap": {
3496
+ "alias": "mainThreadCatchtap";
3497
+ "required": false;
3498
+ };
3499
+ "mainThreadBindtouchstart": {
3500
+ "alias": "mainThreadBindtouchstart";
3501
+ "required": false;
3502
+ };
3503
+ "mainThreadCatchtouchstart": {
3504
+ "alias": "mainThreadCatchtouchstart";
3505
+ "required": false;
3506
+ };
3507
+ "mainThreadBindtouchmove": {
3508
+ "alias": "mainThreadBindtouchmove";
3509
+ "required": false;
3510
+ };
3511
+ "mainThreadCatchtouchmove": {
3512
+ "alias": "mainThreadCatchtouchmove";
3513
+ "required": false;
3514
+ };
3515
+ "mainThreadBindtouchend": {
3516
+ "alias": "mainThreadBindtouchend";
3517
+ "required": false;
3518
+ };
3519
+ "mainThreadCatchtouchend": {
3520
+ "alias": "mainThreadCatchtouchend";
3521
+ "required": false;
3522
+ };
3523
+ "mainThreadBindlongpress": {
3524
+ "alias": "mainThreadBindlongpress";
3525
+ "required": false;
3526
+ };
3527
+ "mainThreadCatchlongpress": {
3528
+ "alias": "mainThreadCatchlongpress";
3529
+ "required": false;
3530
+ };
3531
+ "mainThreadBindscroll": {
3532
+ "alias": "mainThreadBindscroll";
3533
+ "required": false;
3534
+ };
3535
+ "mainThreadCatchscroll": {
3536
+ "alias": "mainThreadCatchscroll";
3537
+ "required": false;
3538
+ };
3539
+ "mainThreadBindanimationstart": {
3540
+ "alias": "mainThreadBindanimationstart";
3541
+ "required": false;
3542
+ };
3543
+ "mainThreadBindanimationend": {
3544
+ "alias": "mainThreadBindanimationend";
3545
+ "required": false;
3546
+ };
3547
+ "mainThreadBindtransitionend": {
3548
+ "alias": "mainThreadBindtransitionend";
3549
+ "required": false;
3550
+ };
3551
+ "mainThreadBindlayoutchange": {
3552
+ "alias": "mainThreadBindlayoutchange";
3553
+ "required": false;
3554
+ };
3555
+ }, {}, never, never, true, never>;
3556
+ }
3557
+ /**
3558
+ * Injectable service for calling main-thread (Lepus) functions. From the
3559
+ * background thread it uses Lynx's cross-thread RPC via JSContext events:
3560
+ *
3561
+ * background calls runOnMainThread(handle, ...args)
3562
+ * → dispatches 'Lynx.Worklet.runWorkletCtx' with { worklet, params, resolveId }
3563
+ * → main thread's listener (in runtime.ts) invokes the registered worklet fn
3564
+ * → dispatches 'Lynx.Worklet.FunctionCallRet' with { resolveId, returnValue }
3565
+ * → background thread's listener resolves the Promise
3566
+ *
3567
+ * This enables background-thread Angular code (services, effects) to trigger
3568
+ * main-thread imperative operations (animate, measure, invoke UI methods)
3569
+ * with proper async/await ergonomics.
3570
+ *
3571
+ * It is also safe to call from code already running on the main thread. The
3572
+ * renderer registers Angular `(bind*)`/`(catch*)` event handlers as main-thread
3573
+ * worklets, so a handler like `(bindtap)="flash()"` executes on the Lepus thread
3574
+ * — and any runOnMainThread() call it makes originates there too. Rather than
3575
+ * fail (there is no other thread to be "called from"), we detect that case and
3576
+ * invoke the target worklet in-place, so the same call site works regardless of
3577
+ * which thread reaches it.
3578
+ */
3579
+ export declare class LynxMainThread {
3580
+ runOnMainThread<TArgs extends unknown[], TReturn>(handle: MainThreadFnHandle<TArgs, TReturn>, ...args: TArgs): Promise<TReturn>;
3581
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxMainThread, never>;
3582
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3583
+ }
3584
+ declare namespace MainThread {
3585
+ type Element = Element;
3586
+ type TouchEvent = TouchEvent;
3587
+ type MouseEvent = MouseEvent;
3588
+ type WheelEvent = WheelEvent;
3589
+ type KeyEvent = KeyEvent;
3590
+ type AnimationEvent = AnimationEvent;
3591
+ type TransitionEvent = TransitionEvent;
3592
+ type LayoutChangeEvent = LayoutChangeEvent;
3593
+ type UIAppearanceEvent = UIAppearanceEvent;
3594
+ }
3595
+ /**
3596
+ * Resource priority hint for the native prefetch engine.
3597
+ */
3598
+ type PrefetchPriority = 'high' | 'medium' | 'low';
3599
+ /**
3600
+ * Cache destination for a prefetched resource.
3601
+ * - `'disk'` — persists across app sessions (larger resources)
3602
+ * - `'bitmap'` — decoded into memory for immediate display (images)
3603
+ */
3604
+ type PrefetchCacheTarget = 'disk' | 'bitmap';
3605
+ /**
3606
+ * Describes a single resource to prefetch.
3607
+ */
3608
+ type PrefetchRequest = {
3609
+ /**
3610
+ * URL of the resource to prefetch.
3611
+ */
3612
+ uri: string;
3613
+ /**
3614
+ * Resource type — determines the native prefetch pipeline.
3615
+ */
3616
+ type: 'image' | 'video';
3617
+ /**
3618
+ * Optional priority hint (default determined by native engine).
3619
+ */
3620
+ priority?: PrefetchPriority;
3621
+ /**
3622
+ * Where to cache the prefetched resource.
3623
+ */
3624
+ cacheTarget?: PrefetchCacheTarget;
3625
+ /**
3626
+ * Custom cache key for manual cache management.
3627
+ */
3628
+ preloadKey?: string;
3629
+ /**
3630
+ * Expected resource size in bytes (helps native allocate buffers).
3631
+ */
3632
+ size?: number;
3633
+ };
3634
+ /**
3635
+ * Per-resource result from a prefetch or cancel operation.
3636
+ */
3637
+ type PrefetchResultDetail = {
3638
+ code: number;
3639
+ msg: string;
3640
+ uri: string;
3641
+ type: 'image' | 'video';
3642
+ };
3643
+ /**
3644
+ * Wraps `lynx.requestResourcePrefetch()` and `lynx.cancelResourcePrefetch()`
3645
+ * with a Promise-based API for preloading images and videos into the native
3646
+ * cache before they're needed for display.
3647
+ *
3648
+ * Only available on the background thread — these APIs are not exposed on
3649
+ * the main thread.
3650
+ *
3651
+ * @usageNotes
3652
+ * ```typescript
3653
+ * const prefetch = inject(LynxResourcePrefetch);
3654
+ *
3655
+ * // Prefetch a single image
3656
+ * const result = await prefetch.request([
3657
+ * { uri: 'https://cdn.example.com/hero.jpg', type: 'image' },
3658
+ * ]);
3659
+ *
3660
+ * // Prefetch multiple resources with priority
3661
+ * await prefetch.request([
3662
+ * { uri: 'https://cdn.example.com/hero.jpg', type: 'image', priority: 'high' },
3663
+ * { uri: 'https://cdn.example.com/promo.mp4', type: 'video', priority: 'low' },
3664
+ * ]);
3665
+ *
3666
+ * // Cancel an in-flight prefetch
3667
+ * await prefetch.cancel([
3668
+ * { uri: 'https://cdn.example.com/promo.mp4', type: 'video' },
3669
+ * ]);
3670
+ * ```
3671
+ */
3672
+ export declare class LynxResourcePrefetch {
3673
+ #private;
3674
+ /**
3675
+ * Request prefetching of one or more resources into the native cache.
3676
+ * Resolves when the native engine acknowledges the request (not necessarily
3677
+ * when the download completes).
3678
+ */
3679
+ request(resources: PrefetchRequest[]): Promise<ResourcePrefetchResult>;
3680
+ /**
3681
+ * Cancel in-flight prefetch requests for the specified resources.
3682
+ * Useful when navigating away before prefetched content is needed.
3683
+ */
3684
+ cancel(resources: PrefetchRequest[]): Promise<ResourcePrefetchResult>;
3685
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxResourcePrefetch, never>;
3686
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3687
+ }
3688
+ /**
3689
+ * CSS `env()` value for the top safe area inset (notch / status bar).
3690
+ */
3691
+ export declare const SAFE_AREA_INSET_TOP = "env(safe-area-inset-top)";
3692
+ /**
3693
+ * CSS `env()` value for the bottom safe area inset (home indicator).
3694
+ */
3695
+ export declare const SAFE_AREA_INSET_BOTTOM = "env(safe-area-inset-bottom)";
3696
+ /**
3697
+ * CSS `env()` value for the left safe area inset.
3698
+ */
3699
+ export declare const SAFE_AREA_INSET_LEFT = "env(safe-area-inset-left)";
3700
+ /**
3701
+ * CSS `env()` value for the right safe area inset.
3702
+ */
3703
+ export declare const SAFE_AREA_INSET_RIGHT = "env(safe-area-inset-right)";
3704
+ /**
3705
+ * Provides device adaptation helpers for notch/safe-area-aware layouts.
3706
+ *
3707
+ * Safe area insets in Lynx are applied via CSS `env(safe-area-inset-*)`,
3708
+ * identical to the web platform. This service exposes the `isNotchScreen`
3709
+ * flag from the native host as a reactive signal for conditional logic.
3710
+ *
3711
+ * @usageNotes
3712
+ *
3713
+ * ### CSS approach (preferred)
3714
+ * ```css
3715
+ * .container {
3716
+ * padding-top: env(safe-area-inset-top);
3717
+ * padding-bottom: env(safe-area-inset-bottom);
3718
+ * }
3719
+ * ```
3720
+ *
3721
+ * ### Conditional logic in TypeScript
3722
+ * ```typescript
3723
+ * const safeArea = inject(LynxSafeArea);
3724
+ *
3725
+ * if (safeArea.isNotchScreen()) {
3726
+ * // Adjust layout for notch devices
3727
+ * }
3728
+ * ```
3729
+ */
3730
+ export declare class LynxSafeArea {
3731
+ #private;
3732
+ /**
3733
+ * Whether the device has a display notch or cutout. Reactive — updates when global props change.
3734
+ */
3735
+ readonly isNotchScreen: import("@angular/core").Signal<boolean>;
3736
+ /**
3737
+ * The current platform (`'iOS'`, `'Android'`, `'Harmony'`, etc.).
3738
+ */
3739
+ get platform(): import("@lynx-js/types").PlatformType;
3740
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxSafeArea, never>;
3741
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3742
+ }
3743
+ /**
3744
+ * Tracks an active session storage subscription so it can be cleaned up.
3745
+ */
3746
+ type SessionStorageSubscription = {
3747
+ readonly key: string;
3748
+ readonly listenerId: number;
3749
+ };
3750
+ /**
3751
+ * Wraps Lynx's session storage API for sharing data across multiple LynxViews.
3752
+ *
3753
+ * Session storage is a key-value store that persists for the lifetime of the
3754
+ * host app session. Unlike browser localStorage, values are objects (not strings)
3755
+ * and reads are asynchronous (callback-based in the native API, Promise-based here).
3756
+ *
3757
+ * The `setSessionStorageItem` / `getSessionStorageItem` / `subscribeSessionStorage` /
3758
+ * `unsubscribeSessionStorage` methods are not declared in `@lynx-js/types`, so we
3759
+ * access them via `any` — the APIs are stable and documented on lynxjs.org.
3760
+ *
3761
+ * The native surface differs by thread, and AngularLynx bootstraps the same
3762
+ * component tree on both (see runtime.ts), so this service must detect which
3763
+ * thread it's on rather than assume one shape everywhere:
3764
+ * - Background thread: `getSessionStorageItem(key, callback)` is async, plus
3765
+ * `subscribeSessionStorage`/`unsubscribeSessionStorage` for pub/sub.
3766
+ * - Main thread (Lepus engine, see `Utils::CreateLynx` in lynx core): only
3767
+ * `setSessionStorageItem`/`getSessionStorageItem` are registered — no
3768
+ * subscribe/unsubscribe at all — and `getSessionStorageItem` is
3769
+ * *synchronous*, taking just the key and returning the value directly.
3770
+ * Calling it with a callback (the background-thread shape) throws a native
3771
+ * "GetSessionStorageItem param size should be 1" fatal error.
3772
+ *
3773
+ * @usageNotes
3774
+ * ```typescript
3775
+ * const sessionStorage = inject(LynxSessionStorage);
3776
+ *
3777
+ * // Write
3778
+ * sessionStorage.setItem('theme', { mode: 'dark' });
3779
+ *
3780
+ * // One-shot read
3781
+ * const theme = await sessionStorage.getItem<{ mode: string }>('theme');
3782
+ *
3783
+ * // Reactive signal (auto-subscribes, auto-cleans up with injection context)
3784
+ * const theme = sessionStorage.watch<{ mode: string }>('theme');
3785
+ * // theme() updates whenever another LynxView calls setItem('theme', ...)
3786
+ * ```
3787
+ */
3788
+ export declare class LynxSessionStorage {
3789
+ #private;
3790
+ /**
3791
+ * Stores a value in session storage, shared across all LynxViews.
3792
+ * Existing subscribers for this key will be notified of the change.
3793
+ *
3794
+ * Two main-thread quirks are handled here, both discovered as on-device
3795
+ * crashes/bugs in the session-storage example:
3796
+ *
3797
+ * 1. **Values must be objects.** The main thread's native
3798
+ * setSessionStorageItem rejects primitives with a fatal
3799
+ * "SetSessionStorageItem param 1 should be Object" error, so a bare
3800
+ * `setItem('counter', 1)` would crash on Increment. We wrap primitives
3801
+ * in `{ __data }` (getItem unwraps them symmetrically).
3802
+ *
3803
+ * 2. **No native pub/sub.** The main thread registers only get/set — there
3804
+ * is no subscribeSessionStorage — so {@link watch}'s subscription falls
3805
+ * back to the local listener map (see {@link subscribe}). A native write
3806
+ * alone therefore never reaches those listeners: the counter signal stays
3807
+ * on its seed value and the UI shows "not set" no matter how many times
3808
+ * the user taps Increment. We bridge the gap by firing the local
3809
+ * listeners ourselves right after the native write.
3810
+ *
3811
+ * The background thread deliberately does NOT call #notifyLocalListeners:
3812
+ * there, watch() subscribes through native subscribeSessionStorage, and the
3813
+ * native layer already fans the change out to every LynxView (including this
3814
+ * one). Firing local listeners too would double-notify. There is no infinite
3815
+ * loop in either case — #notifyLocalListeners only invokes stored callbacks,
3816
+ * it never calls setItem back.
3817
+ */
3818
+ setItem<T = unknown>(key: string, value: T): void;
3819
+ /**
3820
+ * Reads a value from session storage. The native API is callback-based;
3821
+ * this wraps it in a Promise for ergonomic use with `async`/`await`.
3822
+ *
3823
+ * On the main thread, wrapped primitives are unwrapped here to match
3824
+ * the user's expectation that the value they stored is the value they get.
3825
+ */
3826
+ getItem<T = unknown>(key: string): Promise<T>;
3827
+ /**
3828
+ * Subscribes to changes for a session storage key. The callback fires
3829
+ * whenever any LynxView calls `setItem` with the same key.
3830
+ *
3831
+ * Returns the subscription needed for {@link unsubscribe}.
3832
+ */
3833
+ subscribe<T = unknown>(key: string, callback: (value: T) => void): SessionStorageSubscription;
3834
+ /**
3835
+ * Cancels a session storage subscription created by {@link subscribe}.
3836
+ */
3837
+ unsubscribe(subscription: SessionStorageSubscription): void;
3838
+ /**
3839
+ * Creates a reactive signal that tracks a session storage key.
3840
+ *
3841
+ * Seeds the signal with the current value via `getItem`, then subscribes
3842
+ * to future changes. The subscription is automatically cleaned up when the
3843
+ * calling component/service is destroyed.
3844
+ *
3845
+ * Must be called from an injection context (constructor, field initializer,
3846
+ * or `runInInjectionContext`) unless an explicit `injector` is provided.
3847
+ */
3848
+ watch<T = unknown>(key: string, options?: {
3849
+ injector?: Injector;
3850
+ }): ReturnType<typeof signal<T | undefined>>;
3851
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxSessionStorage, never>;
3852
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3853
+ }
3854
+ /**
3855
+ * Wraps the global `SystemInfo` object as an Angular injectable,
3856
+ * providing device and platform information from the Lynx runtime.
3857
+ *
3858
+ * `SystemInfo` is populated once when the Lynx view initializes and
3859
+ * is read-only for the lifetime of the app — the values never change.
3860
+ *
3861
+ * @usageNotes
3862
+ * ```typescript
3863
+ * const systemInfo = inject(LynxSystemInfo);
3864
+ *
3865
+ * // Device dimensions in physical pixels
3866
+ * const { pixelWidth, pixelHeight, pixelRatio } = systemInfo;
3867
+ *
3868
+ * // Logical screen dimensions (CSS pixels)
3869
+ * const cssWidth = systemInfo.screenWidth;
3870
+ * const cssHeight = systemInfo.screenHeight;
3871
+ *
3872
+ * // Platform detection
3873
+ * if (systemInfo.platform === 'iOS') {
3874
+ * // iOS-specific logic
3875
+ * }
3876
+ * ```
3877
+ */
3878
+ export declare class LynxSystemInfo {
3879
+ #private;
3880
+ constructor();
3881
+ /**
3882
+ * The platform of the current device (e.g. `'iOS'`, `'Android'`).
3883
+ */
3884
+ get platform(): PlatformType;
3885
+ /**
3886
+ * The Lynx engine version (e.g. `'3.2'`).
3887
+ */
3888
+ get engineVersion(): string;
3889
+ /**
3890
+ * The current operating system version.
3891
+ */
3892
+ get osVersion(): string;
3893
+ /**
3894
+ * Physical pixel width of the device screen.
3895
+ */
3896
+ get pixelWidth(): number;
3897
+ /**
3898
+ * Physical pixel height of the device screen.
3899
+ */
3900
+ get pixelHeight(): number;
3901
+ /**
3902
+ * Device pixel ratio (physical pixels per CSS pixel).
3903
+ */
3904
+ get pixelRatio(): number;
3905
+ /**
3906
+ * The JavaScript engine in use (`'v8'`, `'jsc'`, or `'quickjs'`). Only available on the background thread.
3907
+ */
3908
+ get runtimeType(): 'v8' | 'jsc' | 'quickjs';
3909
+ /**
3910
+ * Screen width in logical/CSS pixels (`pixelWidth / pixelRatio`).
3911
+ */
3912
+ get screenWidth(): number;
3913
+ /**
3914
+ * Screen height in logical/CSS pixels (`pixelHeight / pixelRatio`).
3915
+ */
3916
+ get screenHeight(): number;
3917
+ /**
3918
+ * The theme object, if provided by the host application.
3919
+ */
3920
+ get theme(): object | undefined;
3921
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxSystemInfo, never>;
3922
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3923
+ }
3924
+ /**
3925
+ * Wraps `lynx.getTextInfo()` for measuring text dimensions and
3926
+ * performing line-breaking calculations.
3927
+ *
3928
+ * Only works with built-in platform fonts. Custom fonts loaded via
3929
+ * `@font-face` or `LynxFont` will fall back to the default
3930
+ * system font and produce inaccurate measurements.
3931
+ *
3932
+ * @usageNotes
3933
+ * ```typescript
3934
+ * const textMeasure = inject(LynxTextMeasure);
3935
+ *
3936
+ * const { width } = textMeasure.measure('Hello', { fontSize: '16px' });
3937
+ *
3938
+ * const { content } = textMeasure.measure('Long text...', {
3939
+ * fontSize: '14px',
3940
+ * maxWidth: '200px',
3941
+ * maxLine: 3,
3942
+ * });
3943
+ * ```
3944
+ */
3945
+ export declare class LynxTextMeasure {
3946
+ measure(text: string, options: TextInfo): TextMetrics;
3947
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxTextMeasure, never>;
3948
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3949
+ }
3950
+ /**
3951
+ * Provides reactive access to the current Lynx theme ('Dark' or 'Light').
3952
+ *
3953
+ * The theme is driven by `lynx.__globalProps.theme`, which the native host
3954
+ * sets based on the OS appearance setting. It updates reactively when the
3955
+ * host calls `updateGlobalProps`.
3956
+ *
3957
+ * @usageNotes
3958
+ * ```typescript
3959
+ * const theme = inject(LynxTheme);
3960
+ *
3961
+ * // Reactive in templates
3962
+ * template: `<text [style.color]="theme.isDarkMode() ? '#fff' : '#000'">Hello</text>`
3963
+ *
3964
+ * // Or use CSS variables (preferred for styling — see docs/guide/dark-mode.mdx)
3965
+ * ```
3966
+ */
3967
+ export declare class LynxTheme {
3968
+ #private;
3969
+ /**
3970
+ * The current theme: `'Dark'` or `'Light'`. Reactive — updates when global props change.
3971
+ */
3972
+ readonly theme: import("@angular/core").Signal<"Dark" | "Light">;
3973
+ /**
3974
+ * Whether the current theme is dark mode. Reactive.
3975
+ */
3976
+ readonly isDarkMode: import("@angular/core").Signal<boolean>;
3977
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxTheme, never>;
3978
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3979
+ }
3980
+ /**
3981
+ * Animates the enter/leave of projected content using CSS `@keyframes`.
3982
+ *
3983
+ * Two classes are toggled on the host element:
3984
+ *
3985
+ * | Phase | Class applied | Plays |
3986
+ * |-------|-----------------|----------------------------------------|
3987
+ * | Enter | `{name}-enter` | on mount, until `duration` elapses |
3988
+ * | Leave | `{name}-leave` | then the element is unmounted |
3989
+ *
3990
+ * **Why keyframes, not a two-phase CSS `transition`.** The obvious Vue-style
3991
+ * approach (mount in a `-enter-from` state, then swap to `-enter-to` one frame
3992
+ * later so a `transition` interpolates) needs a real paint gap between the two
3993
+ * states. Lynx's background thread — where Angular runs — has no reliable frame
3994
+ * boundary: `requestAnimationFrame` is microtask-mapped/absent, and class
3995
+ * mutations made from an rAF/`setTimeout` callback don't go through change
3996
+ * detection so they never reliably flush to the main thread (the element tree is
3997
+ * committed once per CD cycle in `LynxRendererFactory2.end()`). A `@keyframes`
3998
+ * animation sidesteps all of it: a SINGLE class, applied inside the effect (a CD
3999
+ * pass) so it flushes in the same commit that mounts the element, and the native
4000
+ * engine plays the keyframes from 0%. This mirrors the proven single-class
4001
+ * pattern in `examples/animations`.
4002
+ *
4003
+ * Completion is timer-based (`duration`) because the background thread has no
4004
+ * `animationend` bridge — `duration` must match your CSS animation length.
4005
+ *
4006
+ * @usageNotes
4007
+ * ```html
4008
+ * <lynx-transition [show]="isVisible()" name="fade" [duration]="300">
4009
+ * <view class="panel"><text>Hello</text></view>
4010
+ * </lynx-transition>
4011
+ * ```
4012
+ *
4013
+ * ```css
4014
+ * @keyframes fade-enter { from { opacity: 0; } to { opacity: 1; } }
4015
+ * @keyframes fade-leave { from { opacity: 1; } to { opacity: 0; } }
4016
+ * .fade-enter { animation: fade-enter 300ms ease both; }
4017
+ * .fade-leave { animation: fade-leave 300ms ease both; }
4018
+ * ```
4019
+ */
4020
+ export declare class LynxTransition {
4021
+ #private;
4022
+ readonly show: import("@angular/core").InputSignal<boolean>;
4023
+ readonly name: import("@angular/core").InputSignal<string>;
4024
+ readonly duration: import("@angular/core").InputSignal<number>;
4025
+ readonly afterEnter: import("@angular/core").OutputEmitterRef<void>;
4026
+ readonly afterLeave: import("@angular/core").OutputEmitterRef<void>;
4027
+ readonly shouldRender: import("@angular/core").WritableSignal<boolean>;
4028
+ constructor();
4029
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxTransition, never>;
4030
+ static ɵcmp: i0.ɵɵComponentDeclaration<LynxTransition, "lynx-transition", never, {
4031
+ "show": {
4032
+ "alias": "show";
4033
+ "required": false;
4034
+ "isSignal": true;
4035
+ };
4036
+ "name": {
4037
+ "alias": "name";
4038
+ "required": false;
4039
+ "isSignal": true;
4040
+ };
4041
+ "duration": {
4042
+ "alias": "duration";
4043
+ "required": false;
4044
+ "isSignal": true;
4045
+ };
4046
+ }, {
4047
+ "afterEnter": "afterEnter";
4048
+ "afterLeave": "afterLeave";
4049
+ }, never, ["*"], true, never>;
4050
+ }
4051
+ /**
4052
+ * Animates enter/leave of list items using CSS `@keyframes`.
4053
+ *
4054
+ * Unlike `LynxTransition` (single element), this manages a collection. Items are
4055
+ * rendered from a user-provided `<ng-template>`, and the component diffs the list
4056
+ * on each change to animate additions and removals.
4057
+ *
4058
+ * Each item's root element gets a single class toggled: `{name}-enter` on
4059
+ * insertion, `{name}-leave` before removal. See `LynxTransition` for why a
4060
+ * single `@keyframes` class is used instead of a two-phase CSS `transition` (the
4061
+ * two-phase approach can't get a reliable paint gap on Lynx's background thread).
4062
+ *
4063
+ * @usageNotes
4064
+ * ```html
4065
+ * <lynx-transition-group [each]="items()" [trackBy]="idFn" name="list" [duration]="300">
4066
+ * <ng-template let-item>
4067
+ * <view>
4068
+ * <text>{{ item.name }}</text>
4069
+ * </view>
4070
+ * </ng-template>
4071
+ * </lynx-transition-group>
4072
+ * ```
4073
+ *
4074
+ * ```css
4075
+ * @keyframes list-enter { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
4076
+ * @keyframes list-leave { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-30px); } }
4077
+ * .list-enter { animation: list-enter 300ms ease both; }
4078
+ * .list-leave { animation: list-leave 300ms ease both; }
4079
+ * ```
4080
+ */
4081
+ export declare class LynxTransitionGroup<T> {
4082
+ #private;
4083
+ readonly each: import("@angular/core").InputSignal<T[]>;
4084
+ readonly trackBy: import("@angular/core").InputSignal<(item: T) => unknown>;
4085
+ readonly name: import("@angular/core").InputSignal<string>;
4086
+ readonly duration: import("@angular/core").InputSignal<number>;
4087
+ readonly afterEnter: import("@angular/core").OutputEmitterRef<T>;
4088
+ readonly afterLeave: import("@angular/core").OutputEmitterRef<T>;
4089
+ readonly itemTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
4090
+ protected readonly vcr: import("@angular/core").Signal<ViewContainerRef>;
4091
+ constructor();
4092
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxTransitionGroup<any>, never>;
4093
+ static ɵcmp: i0.ɵɵComponentDeclaration<LynxTransitionGroup<any>, "lynx-transition-group", never, {
4094
+ "each": {
4095
+ "alias": "each";
4096
+ "required": false;
4097
+ "isSignal": true;
4098
+ };
4099
+ "trackBy": {
4100
+ "alias": "trackBy";
4101
+ "required": false;
4102
+ "isSignal": true;
4103
+ };
4104
+ "name": {
4105
+ "alias": "name";
4106
+ "required": false;
4107
+ "isSignal": true;
4108
+ };
4109
+ "duration": {
4110
+ "alias": "duration";
4111
+ "required": false;
4112
+ "isSignal": true;
4113
+ };
4114
+ }, {
4115
+ "afterEnter": "afterEnter";
4116
+ "afterLeave": "afterLeave";
4117
+ }, ["itemTemplate"], never, true, never>;
4118
+ }
4119
+ /**
4120
+ * Central DI configuration for the Lynx renderer. Must be included in every
4121
+ * Lynx Angular app's providers (typically via app.config.ts). Sets up:
4122
+ * 1. Thread-aware document (LynxDocument vs LynxBackgroundDocument)
4123
+ * 2. DOCUMENT stub (Angular requires this token but Lynx has no DOM Document)
4124
+ * 3. APP_BASE_HREF (prevents BrowserPlatformLocation from crashing)
4125
+ * 4. Renderer factory (creates LynxRenderer / EmulatedLynxRenderer)
4126
+ * 5. Error handler (routes to _ReportError + __lynxLastError)
4127
+ */
4128
+ export declare const provideRenderer: () => EnvironmentProviders;
4129
+ /**
4130
+ * In-memory LocationStrategy for Lynx — equivalent to React Router's MemoryRouter.
4131
+ *
4132
+ * Lynx is a native mobile runtime with no browser URL or History API.
4133
+ * Angular's default PathLocationStrategy chains through PlatformLocation →
4134
+ * window.history/window.location, which breaks Lynx's background thread
4135
+ * even with mocked globals.
4136
+ *
4137
+ * This strategy keeps all routing state in memory: a history stack,
4138
+ * current index, and popstate listeners — no browser APIs touched.
4139
+ *
4140
+ * Registered via `provideRouter()` in `lynx-router.ts`.
4141
+ */
4142
+ export declare class LynxLocationStrategy extends LocationStrategy {
4143
+ #private;
4144
+ path(): string;
4145
+ prepareExternalUrl(internal: string): string;
4146
+ getBaseHref(): string;
4147
+ getState(): unknown;
4148
+ pushState(state: unknown, _title: string, url: string, queryParams: string): void;
4149
+ replaceState(state: unknown, _title: string, url: string, queryParams: string): void;
4150
+ back(): void;
4151
+ forward(): void;
4152
+ historyGo(relativePosition?: number): void;
4153
+ onPopState(fn: LocationChangeListener): VoidFunction;
4154
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxLocationStrategy, never>;
4155
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
4156
+ }
4157
+ /**
4158
+ * PlatformLocation implementation for Lynx.
4159
+ *
4160
+ * Angular's default BrowserPlatformLocation uses `new URL()`, which doesn't
4161
+ * exist in the Lynx JS runtime. This class avoids `URL` entirely by manually
4162
+ * parsing pathname, search, and hash from the URL string.
4163
+ *
4164
+ * Registered via `provideRouter()` in `lynx-router.ts`.
4165
+ *
4166
+ * The `@Injectable()` decorator is required so Angular generates a `ɵfac`
4167
+ * factory for this class. Without it, `getUndecoratedInjectableFactory()`
4168
+ * walks the prototype chain, finds PlatformLocation's factory
4169
+ * (`() => inject(BrowserPlatformLocation)`), and silently creates the wrong
4170
+ * class — which crashes in Lynx because `window.location` doesn't exist.
4171
+ */
4172
+ export declare class LynxPlatformLocation extends PlatformLocation {
4173
+ #private;
4174
+ getBaseHrefFromDOM(): string;
4175
+ get href(): string;
4176
+ get protocol(): string;
4177
+ get hostname(): string;
4178
+ get port(): string;
4179
+ get pathname(): string;
4180
+ get search(): string;
4181
+ get hash(): string;
4182
+ onPopState(fn: LocationChangeListener): VoidFunction;
4183
+ onHashChange(_fn: LocationChangeListener): VoidFunction;
4184
+ replaceState(state: unknown, title: string, url: string): void;
4185
+ pushState(state: unknown, title: string, url: string): void;
4186
+ forward(): void;
4187
+ back(): void;
4188
+ historyGo(relativePosition?: number): void;
4189
+ getState(): unknown;
4190
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxPlatformLocation, never>;
4191
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
4192
+ }
4193
+ /**
4194
+ * Route reuse strategy that keeps component views alive across navigations.
4195
+ *
4196
+ * ## Why this is required on Lynx
4197
+ *
4198
+ * Lynx's native element APIs (`__CreateView`, `__CreateText`, etc.) allocate
4199
+ * elements in a fixed-size native pool. `__RemoveElement` detaches an element
4200
+ * from the tree but does NOT free its pool slot — there is no `__ReleaseElement`
4201
+ * API in Lynx's public surface. Angular's default `RouteReuseStrategy` destroys
4202
+ * components on every navigation, creating fresh native elements each time. Those
4203
+ * freed elements accumulate in the pool until it overflows (~256 slots on device),
4204
+ * causing a hard native crash on the 9th navigation in a back-and-forth pattern.
4205
+ *
4206
+ * ## What this strategy does
4207
+ *
4208
+ * Instead of destroying a component when navigating away, Angular calls
4209
+ * `ViewContainerRef.detach()`. The component's DOM elements are removed from the
4210
+ * native tree (the slots are occupied but unused). When navigating back,
4211
+ * `ViewContainerRef.insert()` re-adds those same native elements to the tree —
4212
+ * reusing their existing pool slots with no new allocations. The pool stays bounded
4213
+ * by (initial elements) + (max elements for any single route), regardless of how
4214
+ * many times the user navigates.
4215
+ */
4216
+ export declare class LynxRouteReuseStrategy implements RouteReuseStrategy {
4217
+ #private;
4218
+ shouldDetach(_route: ActivatedRouteSnapshot): boolean;
4219
+ store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void;
4220
+ shouldAttach(route: ActivatedRouteSnapshot): boolean;
4221
+ retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;
4222
+ shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;
4223
+ static ɵfac: i0.ɵɵFactoryDeclaration<LynxRouteReuseStrategy, never>;
4224
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
4225
+ }
4226
+ /**
4227
+ * Provides Angular Router configured for the Lynx runtime.
4228
+ *
4229
+ * Uses `LynxLocationStrategy` (in-memory routing) instead of Angular's default
4230
+ * `PathLocationStrategy` which relies on browser History/Location APIs. This is
4231
+ * the Angular equivalent of React Router's `MemoryRouter` — Lynx is a native
4232
+ * mobile runtime with no browser URL or History API.
4233
+ */
4234
+ export declare const provideRouter: (routes: Routes, ...features: RouterFeatures[]) => EnvironmentProviders;
4235
+ /**
4236
+ * On-device crash diagnostics.
4237
+ *
4238
+ * There is no console on the Lynx device, so we capture the last unhandled
4239
+ * error/rejection into a global (`__lynxLastError`) that Angular components can
4240
+ * surface via a `<text>` element. LynxErrorHandler covers Angular-managed
4241
+ * errors; the global `onerror`/`onunhandledrejection` handlers registered here
4242
+ * catch crashes that escape Angular entirely — native glue code, promise
4243
+ * rejections outside zones, etc.
4244
+ *
4245
+ * Split out of runtime.ts so `reportToNative` (and the handlers) can be
4246
+ * unit-tested on their own, and so the diagnostic seed runs before any other
4247
+ * runtime side effect.
4248
+ */
4249
+ /**
4250
+ * Forward an error to the native Lynx error reporting API when it exists.
4251
+ * errorCode 1101 = ErrCode::LYNX_ERROR_CODE_LEPUS (matches React Lynx's
4252
+ * convention). No-op off-device where `_ReportError` is absent.
4253
+ */
4254
+ declare const reportToNative: (err: Error) => void;
4255
+ /**
4256
+ * Bootstrap Angular application on the Lynx runtime. Waits for the main thread to
4257
+ * signal it's ready before initializing the framework, then registers global
4258
+ * callbacks for page updates and worklet invocations.
4259
+ */
4260
+ export declare const bootstrapApplication: (rootComponent: Type<unknown>, options?: ApplicationConfig) => Promise<ApplicationRef>;
4261
+ declare global {
4262
+ /**
4263
+ * Determines if code should be placed in the background thread, used as a compile-time define macro
4264
+ */
4265
+ var __BACKGROUND__: boolean;
4266
+ /**
4267
+ * Determines if code should be placed in the main thread, used as a compile-time define macro
4268
+ */
4269
+ var __MAIN_THREAD__: boolean;
4270
+ /**
4271
+ * Whether this bundle targets the web runtime (`@lynx-js/web-core`) rather
4272
+ * than native Lynx. Compile-time define injected by the rsbuild plugin
4273
+ * (`environment.name === 'web'`). Used to branch on web-only behavior that
4274
+ * must be dead-code-eliminated from native bundles — e.g. web-core has no
4275
+ * implicit post-`renderPage` flush, so the runtime forces the first
4276
+ * `__FlushElementTree` itself (see `bootstrapApplication` in runtime.ts).
4277
+ */
4278
+ var __WEB__: boolean;
4279
+ /**
4280
+ * Determines if running in dev mode
4281
+ */
4282
+ var __DEV__: boolean;
4283
+ /**
4284
+ * Determines if running in profile mode
4285
+ */
4286
+ var __PROFILE__: boolean;
4287
+ /**
4288
+ * Whether SSR (Instant First-Frame Rendering) is enabled. When true, the
4289
+ * runtime registers `ssrEncode` and `ssrHydrate` global callbacks that
4290
+ * the Lynx engine calls to snapshot and restore the element tree.
4291
+ */
4292
+ var __ENABLE_SSR__: boolean;
4293
+ /**
4294
+ * Full URL of the dev log server (e.g. http://192.168.1.91:3001/__dev_logs).
4295
+ * Injected by the rsbuild plugin's DefinePlugin in dev builds only.
4296
+ */
4297
+ var __DEV_LOG_URL__: string;
4298
+ /**
4299
+ * The source locale from angular.json i18n config (e.g. 'en-US', 'fr').
4300
+ * Injected by the rsbuild plugin's DefinePlugin. Used by LynxLocale
4301
+ * as a fallback when lynx.__globalProps.appLocale is not set.
4302
+ */
4303
+ var __LYNX_SOURCE_LOCALE__: string;
4304
+ interface Window {
4305
+ registerWorklet: (type: string, id: string, fn: Function) => void;
4306
+ __workletRefMap: Record<number, {
4307
+ current: unknown;
4308
+ }>;
4309
+ __lynxMtsPendingResolvers: Record<number, {
4310
+ resolve: (v: unknown) => void;
4311
+ reject: (e: unknown) => void;
4312
+ }>;
4313
+ __lynxMtsNextResolveId: () => number;
4314
+ __lynxRunMainThreadWorklet: (wkltId: string, args: unknown[]) => unknown;
4315
+ }
4316
+ var registerWorklet: (type: string, id: string, fn: Function) => void;
4317
+ var __workletRefMap: Record<number, {
4318
+ current: unknown;
4319
+ }>;
4320
+ var __lynxMtsPendingResolvers: Record<number, {
4321
+ resolve: (v: unknown) => void;
4322
+ reject: (e: unknown) => void;
4323
+ }>;
4324
+ var __lynxMtsNextResolveId: () => number;
4325
+ var __lynxRunMainThreadWorklet: (wkltId: string, args: unknown[]) => unknown;
4326
+ function runOnBackground(handle: {
4327
+ _wkltId: string;
4328
+ }, ...args: unknown[]): Promise<unknown>;
4329
+ }
4330
+ declare global {
4331
+ interface HTMLElementEventMap {
4332
+ bindtap: TouchEvent$1;
4333
+ catchtap: TouchEvent$1;
4334
+ 'capture-bindtap': TouchEvent$1;
4335
+ 'capture-catchtap': TouchEvent$1;
4336
+ 'global-bindtap': TouchEvent$1;
4337
+ bindtouchstart: TouchEvent$1;
4338
+ bindtouchend: TouchEvent$1;
4339
+ bindtouchmove: TouchEvent$1;
4340
+ bindtouchcancel: TouchEvent$1;
4341
+ bindlongpress: TouchEvent$1;
4342
+ catchtouchstart: TouchEvent$1;
4343
+ catchtouchend: TouchEvent$1;
4344
+ catchtouchmove: TouchEvent$1;
4345
+ catchtouchcancel: TouchEvent$1;
4346
+ catchlongpress: TouchEvent$1;
4347
+ }
4348
+ }
4349
+ export type { BackgroundFnHandle, BaseLynxAnimation, DataProcessorDefinition, DevToolsStats, ExposureEventDetail, FlingGestureEvent, GestureCallback, GestureCallbackWithState, GestureEvent, GlobalData, GlobalExposureEvent, InitData, InitDataRaw, LongPressGestureEvent, LynxAnimationOptions, LynxFontEntry, LynxFontFaceConfig, LynxFontStatus, MainThread, MainThreadFnHandle, NativeModuleMap, ObserverFrameRateOptions, PanGestureEvent, PinchGestureEvent, PortalConfig, PrefetchCacheTarget, PrefetchPriority, PrefetchRequest, PrefetchResultDetail, RotationGestureEvent, SessionStorageSubscription, TapGestureEvent };