@blotch/angular-lynx 22.2.8 → 22.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/fesm2022/blotch-angular-lynx.mjs +5727 -971
- package/fesm2022/blotch-angular-lynx.mjs.map +1 -1
- package/package.json +1 -1
- package/types/blotch-angular-lynx.d.ts +2614 -340
|
@@ -3,8 +3,8 @@ import { ApplicationConfig, ApplicationRef, ComponentRef, EmbeddedViewRef, Envir
|
|
|
3
3
|
import { Animation, AnimationOptions, Element as Element$1 } from "@lynx-js/types/main-thread";
|
|
4
4
|
import { AnyObject } from "@lynx-js/types/common";
|
|
5
5
|
import { ControlValueAccessor } from "@angular/forms";
|
|
6
|
+
import { AnimationEvent, MouseEvent, ResourcePrefetchData, ResourcePrefetchResult, TextInfo, TextMetrics, TouchEvent, TransitionEvent } from "@lynx-js/types";
|
|
6
7
|
import { BaseAnimationEvent, BaseKeyEvent, BaseMouseEvent, BaseTouchEvent, BaseTransitionEvent, BaseWheelEvent, LayoutChangeDetailEvent, UIAppearanceDetailEvent } from "@lynx-js/types/events";
|
|
7
|
-
import { MouseEvent, PlatformType, ResourcePrefetchData, ResourcePrefetchResult, TextInfo, TextMetrics, TouchEvent } from "@lynx-js/types";
|
|
8
8
|
import { LocationChangeListener, LocationStrategy, PlatformLocation } from "@angular/common";
|
|
9
9
|
import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy, RouterFeatures, Routes } from "@angular/router";
|
|
10
10
|
import { Subject } from "rxjs";
|
|
@@ -1252,9 +1252,12 @@ type ExposureMargin = `${number}px` | `${number}rpx`;
|
|
|
1252
1252
|
* endpoint that renderer.setProperty() would reach.
|
|
1253
1253
|
*
|
|
1254
1254
|
* 3. Events (bindtap, catchtap, bindinput, bindscroll, …) are NOT declared as
|
|
1255
|
-
*
|
|
1256
|
-
* listen()
|
|
1257
|
-
*
|
|
1255
|
+
* outputs. Angular would still add the native listener with
|
|
1256
|
+
* renderer.listen(), but it would also subscribe the handler to the output,
|
|
1257
|
+
* so DebugElement.triggerEventHandler() would run it twice, and every
|
|
1258
|
+
* binding would hold a subscription to an output that never emits. Their
|
|
1259
|
+
* `$event` types come from each tag's element type instead (see
|
|
1260
|
+
* types/element-events.ts), which Angular's template checker reads.
|
|
1258
1261
|
*/
|
|
1259
1262
|
declare class LynxElementBase implements OnChanges {
|
|
1260
1263
|
#private;
|
|
@@ -1692,6 +1695,546 @@ export declare class LynxCoverView extends LynxElementBase {
|
|
|
1692
1695
|
static ɵfac: i0.ɵɵFactoryDeclaration<LynxCoverView, never>;
|
|
1693
1696
|
static ɵdir: i0.ɵɵDirectiveDeclaration<LynxCoverView, "cover-view", never, {}, {}, never, never, true, never>;
|
|
1694
1697
|
}
|
|
1698
|
+
/**
|
|
1699
|
+
* The element an event started on (`target`), or the one whose handler is
|
|
1700
|
+
* running (`currentTarget`). Lynx sends plain data, not the element, so it
|
|
1701
|
+
* has no methods. To call an element method, use a template reference.
|
|
1702
|
+
*/
|
|
1703
|
+
type LynxEventTarget = {
|
|
1704
|
+
/** The element's `id` attribute. */
|
|
1705
|
+
readonly id: string;
|
|
1706
|
+
/** Lynx's internal number for the element. */
|
|
1707
|
+
readonly uid: number;
|
|
1708
|
+
/**
|
|
1709
|
+
* The element's `data-*` attributes, keyed without the `data-` prefix.
|
|
1710
|
+
* Values aren't always strings: a property binding such as
|
|
1711
|
+
* `[data-item]="item"` keeps its value as it is.
|
|
1712
|
+
*/
|
|
1713
|
+
readonly dataset: Readonly<Record<string, unknown>>;
|
|
1714
|
+
};
|
|
1715
|
+
/**
|
|
1716
|
+
* The object a Lynx element event hands its handler, as `$event`. Every
|
|
1717
|
+
* element event has this shape; `Detail` is the event's own data, such as
|
|
1718
|
+
* `ImageLoadDetail` for an `<image>`'s `bindload`.
|
|
1719
|
+
*
|
|
1720
|
+
* Angular types `$event` from the element and the event, so a template
|
|
1721
|
+
* handler needs no annotation. Write the type out for a handler declared
|
|
1722
|
+
* apart from the template:
|
|
1723
|
+
*
|
|
1724
|
+
* ```ts
|
|
1725
|
+
* template: `<image [src]="url" (bindload)="loaded($event)" />`,
|
|
1726
|
+
*
|
|
1727
|
+
* protected loaded({ detail }: LynxEvent<ImageLoadDetail>): void {
|
|
1728
|
+
* this.#size.set(detail);
|
|
1729
|
+
* }
|
|
1730
|
+
* ```
|
|
1731
|
+
*
|
|
1732
|
+
* It isn't a DOM `Event`: Lynx's event has none of the DOM's other fields
|
|
1733
|
+
* (`timeStamp`, `bubbles`, `composedPath()`…), so they don't type-check.
|
|
1734
|
+
* Tap, long-press and touch events are Lynx's `TouchEvent`, which has this
|
|
1735
|
+
* shape plus `touches` and `changedTouches`.
|
|
1736
|
+
*/
|
|
1737
|
+
type LynxEvent<Detail = unknown> = {
|
|
1738
|
+
/** The event's name without its prefix, such as `'load'` for `bindload`. */
|
|
1739
|
+
readonly type: string;
|
|
1740
|
+
/** When the event fired, in milliseconds. */
|
|
1741
|
+
readonly timestamp: number;
|
|
1742
|
+
/** The element the event started on. */
|
|
1743
|
+
readonly target: LynxEventTarget;
|
|
1744
|
+
/** The element whose handler is running. */
|
|
1745
|
+
readonly currentTarget: LynxEventTarget;
|
|
1746
|
+
/** The event's own data. */
|
|
1747
|
+
readonly detail: Detail;
|
|
1748
|
+
/**
|
|
1749
|
+
* Does nothing to native events: the `catch` prefix (`catchtap`) stops an
|
|
1750
|
+
* event. AngularLynx adds it where Lynx doesn't, so web-style code runs.
|
|
1751
|
+
*/
|
|
1752
|
+
stopPropagation(): void;
|
|
1753
|
+
/**
|
|
1754
|
+
* There's no default action to prevent. AngularLynx adds it where Lynx
|
|
1755
|
+
* doesn't, as Angular calls it when a handler returns `false`.
|
|
1756
|
+
*/
|
|
1757
|
+
preventDefault(): void;
|
|
1758
|
+
};
|
|
1759
|
+
/** `bindlayoutchange`'s detail: the element's new size and position. */
|
|
1760
|
+
type LayoutChangeDetail = {
|
|
1761
|
+
/** The element's `id` attribute. */
|
|
1762
|
+
readonly id: string;
|
|
1763
|
+
readonly width: number;
|
|
1764
|
+
readonly height: number;
|
|
1765
|
+
/** Positions are relative to the Lynx view, in px. */
|
|
1766
|
+
readonly top: number;
|
|
1767
|
+
readonly right: number;
|
|
1768
|
+
readonly bottom: number;
|
|
1769
|
+
readonly left: number;
|
|
1770
|
+
/** The element's `data-*` attributes (see `LynxEventTarget.dataset`). */
|
|
1771
|
+
readonly dataset: Readonly<Record<string, unknown>>;
|
|
1772
|
+
};
|
|
1773
|
+
/**
|
|
1774
|
+
* `binduiappear` and `binduidisappear`'s detail: which element came on or
|
|
1775
|
+
* went off the screen.
|
|
1776
|
+
*/
|
|
1777
|
+
type UIAppearanceDetail = {
|
|
1778
|
+
readonly 'exposure-id': string;
|
|
1779
|
+
readonly 'exposure-scene': string;
|
|
1780
|
+
/**
|
|
1781
|
+
* Identifies the native element. iOS and Android send a string; the web
|
|
1782
|
+
* sends the element's numeric unique ID.
|
|
1783
|
+
*/
|
|
1784
|
+
readonly 'unique-id': string | number;
|
|
1785
|
+
/** The element's `data-*` attributes (see `LynxEventTarget.dataset`). */
|
|
1786
|
+
readonly dataset: Readonly<Record<string, unknown>>;
|
|
1787
|
+
};
|
|
1788
|
+
/**
|
|
1789
|
+
* `bindaccessibilityaction`'s detail: the custom action, from the element's
|
|
1790
|
+
* `accessibility-actions`, that a screen reader user picked.
|
|
1791
|
+
*/
|
|
1792
|
+
type AccessibilityActionDetail = {
|
|
1793
|
+
readonly name: string;
|
|
1794
|
+
};
|
|
1795
|
+
/**
|
|
1796
|
+
* Names each event, keyed by its `bind` name as the docs write it, under
|
|
1797
|
+
* every prefix Lynx binds it with, all of which hand the handler the same
|
|
1798
|
+
* event: `bind` lets it bubble, `catch` stops it, the `capture-` forms run on
|
|
1799
|
+
* the way down, and `global-bind` runs for the event on any element. Only
|
|
1800
|
+
* touch events bubble, so for the others `catch` and the `capture-` forms
|
|
1801
|
+
* change nothing. `{ bindtap: E }` gives `bindtap`, `catchtap`…
|
|
1802
|
+
*/
|
|
1803
|
+
type WithPrefixes<Events> = { [Name in keyof Events & string as Name extends `bind${infer Event}` ? `bind${Event}` | `catch${Event}` | `capture-bind${Event}` | `capture-catch${Event}` | `global-bind${Event}` : never]: Events[Name]; };
|
|
1804
|
+
/**
|
|
1805
|
+
* The events every element fires, with the type of each one's `$event`. The
|
|
1806
|
+
* events only some elements fire are in element-events.ts.
|
|
1807
|
+
*/
|
|
1808
|
+
type LynxCommonEventMap = WithPrefixes<{
|
|
1809
|
+
bindtap: TouchEvent;
|
|
1810
|
+
bindlongpress: TouchEvent;
|
|
1811
|
+
bindtouchstart: TouchEvent;
|
|
1812
|
+
bindtouchmove: TouchEvent;
|
|
1813
|
+
bindtouchend: TouchEvent;
|
|
1814
|
+
bindtouchcancel: TouchEvent;
|
|
1815
|
+
bindmousedown: MouseEvent;
|
|
1816
|
+
bindmouseup: MouseEvent;
|
|
1817
|
+
bindmousemove: MouseEvent;
|
|
1818
|
+
bindmouseenter: MouseEvent;
|
|
1819
|
+
bindmouseleave: MouseEvent;
|
|
1820
|
+
bindlayoutchange: LynxEvent<LayoutChangeDetail>;
|
|
1821
|
+
binduiappear: LynxEvent<UIAppearanceDetail>;
|
|
1822
|
+
binduidisappear: LynxEvent<UIAppearanceDetail>;
|
|
1823
|
+
bindanimationstart: AnimationEvent;
|
|
1824
|
+
bindanimationiteration: AnimationEvent;
|
|
1825
|
+
bindanimationend: AnimationEvent;
|
|
1826
|
+
bindanimationcancel: AnimationEvent;
|
|
1827
|
+
bindtransitionstart: TransitionEvent;
|
|
1828
|
+
bindtransitionend: TransitionEvent;
|
|
1829
|
+
bindtransitioncancel: TransitionEvent;
|
|
1830
|
+
bindaccessibilityaction: LynxEvent<AccessibilityActionDetail>;
|
|
1831
|
+
}>;
|
|
1832
|
+
declare global {
|
|
1833
|
+
/**
|
|
1834
|
+
* Angular types `$event` on an element's event from the element's
|
|
1835
|
+
* `addEventListener`: its type-check code calls
|
|
1836
|
+
* `document.createElement(tag).addEventListener(event, handler)`. An
|
|
1837
|
+
* element with no type of its own is an `HTMLElement`, which looks the
|
|
1838
|
+
* event up here, so these entries type the events every element fires.
|
|
1839
|
+
* Without them `$event` is a DOM `Event`, with no `detail`.
|
|
1840
|
+
*/
|
|
1841
|
+
interface HTMLElementEventMap extends LynxCommonEventMap {}
|
|
1842
|
+
}
|
|
1843
|
+
/** `<image>` and `<svg>`'s `bindload` detail: the image's own size, in px. */
|
|
1844
|
+
type ImageLoadDetail = {
|
|
1845
|
+
readonly width: number;
|
|
1846
|
+
readonly height: number;
|
|
1847
|
+
};
|
|
1848
|
+
/** `<image>`'s `binderror` detail. */
|
|
1849
|
+
type ImageErrorDetail = {
|
|
1850
|
+
readonly errMsg: string;
|
|
1851
|
+
readonly error_code: number;
|
|
1852
|
+
readonly lynx_categorized_code: number;
|
|
1853
|
+
};
|
|
1854
|
+
type LynxImageEventMap = WithPrefixes<{
|
|
1855
|
+
bindload: LynxEvent<ImageLoadDetail>;
|
|
1856
|
+
binderror: LynxEvent<ImageErrorDetail>;
|
|
1857
|
+
bindstartplay: LynxEvent;
|
|
1858
|
+
bindcurrentloopcomplete: LynxEvent;
|
|
1859
|
+
bindfinalloopcomplete: LynxEvent;
|
|
1860
|
+
}>;
|
|
1861
|
+
type LynxSvgEventMap = WithPrefixes<{
|
|
1862
|
+
bindload: LynxEvent<ImageLoadDetail>;
|
|
1863
|
+
}>;
|
|
1864
|
+
/** `<text>`'s `bindlayout` detail. */
|
|
1865
|
+
type TextLayoutDetail = {
|
|
1866
|
+
readonly lineCount: number;
|
|
1867
|
+
/** A line with `ellipsisCount` above 0 was truncated. */
|
|
1868
|
+
readonly lines: readonly {
|
|
1869
|
+
readonly start: number;
|
|
1870
|
+
readonly end: number;
|
|
1871
|
+
readonly ellipsisCount: number;
|
|
1872
|
+
}[];
|
|
1873
|
+
readonly size: {
|
|
1874
|
+
readonly width: number;
|
|
1875
|
+
readonly height: number;
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
/** `<text>`'s `bindselectionchange` detail (iOS and Android). */
|
|
1879
|
+
type TextSelectionChangeDetail = {
|
|
1880
|
+
readonly start: number;
|
|
1881
|
+
readonly end: number;
|
|
1882
|
+
readonly direction: 'forward' | 'backward';
|
|
1883
|
+
};
|
|
1884
|
+
type LynxTextEventMap = WithPrefixes<{
|
|
1885
|
+
bindlayout: LynxEvent<TextLayoutDetail>;
|
|
1886
|
+
bindselectionchange: LynxEvent<TextSelectionChangeDetail>;
|
|
1887
|
+
}>;
|
|
1888
|
+
/** `<input>` and `<textarea>`'s `bindinput` detail. */
|
|
1889
|
+
type InputDetail = {
|
|
1890
|
+
readonly value: string;
|
|
1891
|
+
readonly selectionStart: number;
|
|
1892
|
+
readonly selectionEnd: number;
|
|
1893
|
+
/**
|
|
1894
|
+
* `true` while a keyboard that builds characters from several keystrokes,
|
|
1895
|
+
* such as a Chinese or Japanese one, is mid-character.
|
|
1896
|
+
*/
|
|
1897
|
+
readonly isComposing?: boolean;
|
|
1898
|
+
};
|
|
1899
|
+
/**
|
|
1900
|
+
* `<input>` and `<textarea>`'s `bindfocus`, `bindblur` and `bindconfirm`
|
|
1901
|
+
* detail: the field's text.
|
|
1902
|
+
*/
|
|
1903
|
+
type InputValueDetail = {
|
|
1904
|
+
readonly value: string;
|
|
1905
|
+
};
|
|
1906
|
+
/** `<input>` and `<textarea>`'s `bindselection` detail. */
|
|
1907
|
+
type InputSelectionDetail = {
|
|
1908
|
+
readonly selectionStart: number;
|
|
1909
|
+
readonly selectionEnd: number;
|
|
1910
|
+
};
|
|
1911
|
+
/**
|
|
1912
|
+
* `<input>` and `<textarea>`'s `bindbeforeinput` detail (iOS): an edit about
|
|
1913
|
+
* to be applied, which replaces `length` characters from `cursor` with
|
|
1914
|
+
* `replace`.
|
|
1915
|
+
*/
|
|
1916
|
+
type BeforeInputDetail = {
|
|
1917
|
+
/** The text before the edit. */
|
|
1918
|
+
readonly value: string;
|
|
1919
|
+
readonly cursor: number;
|
|
1920
|
+
readonly length: number;
|
|
1921
|
+
readonly replace: string;
|
|
1922
|
+
readonly isComposing?: boolean;
|
|
1923
|
+
};
|
|
1924
|
+
/**
|
|
1925
|
+
* `<input>` and `<textarea>`'s `bindkeyboardheightchange` detail, sent while
|
|
1926
|
+
* the field has focus: as the keyboard shows, when it changes size, and with
|
|
1927
|
+
* `0` as it hides.
|
|
1928
|
+
*/
|
|
1929
|
+
type KeyboardHeightDetail = {
|
|
1930
|
+
/**
|
|
1931
|
+
* iOS sends points, measured up from the bottom of the window. Android
|
|
1932
|
+
* sends physical pixels, measured up from the bottom of the Lynx view.
|
|
1933
|
+
*/
|
|
1934
|
+
readonly height: number;
|
|
1935
|
+
};
|
|
1936
|
+
/** `<input>` and `<textarea>`'s `bindkeyboard` detail (iOS). */
|
|
1937
|
+
type KeyboardDetail = {
|
|
1938
|
+
/** Whether the keyboard is showing or hiding. */
|
|
1939
|
+
readonly show: boolean;
|
|
1940
|
+
/** As it shows, its height, in points. */
|
|
1941
|
+
readonly keyboardHeight?: number;
|
|
1942
|
+
/** As it shows, the window's bottom safe-area inset, in points. */
|
|
1943
|
+
readonly safeAreaBottom?: number;
|
|
1944
|
+
};
|
|
1945
|
+
type LynxInputEventMap = WithPrefixes<{
|
|
1946
|
+
bindinput: LynxEvent<InputDetail>;
|
|
1947
|
+
bindfocus: LynxEvent<InputValueDetail>;
|
|
1948
|
+
bindblur: LynxEvent<InputValueDetail>;
|
|
1949
|
+
bindconfirm: LynxEvent<InputValueDetail>;
|
|
1950
|
+
bindselection: LynxEvent<InputSelectionDetail>;
|
|
1951
|
+
bindbeforeinput: LynxEvent<BeforeInputDetail>;
|
|
1952
|
+
bindkeyboardheightchange: LynxEvent<KeyboardHeightDetail>;
|
|
1953
|
+
bindkeyboard: LynxEvent<KeyboardDetail>;
|
|
1954
|
+
}>;
|
|
1955
|
+
/** `<textarea>`'s `bindline` detail. */
|
|
1956
|
+
type TextareaLineDetail = {
|
|
1957
|
+
/**
|
|
1958
|
+
* The number of lines. On iOS and Android, `-1` means an edit would have
|
|
1959
|
+
* gone over `maxlines`.
|
|
1960
|
+
*/
|
|
1961
|
+
readonly line: number;
|
|
1962
|
+
};
|
|
1963
|
+
type LynxTextareaEventMap = LynxInputEventMap & WithPrefixes<{
|
|
1964
|
+
bindline: LynxEvent<TextareaLineDetail>;
|
|
1965
|
+
}>;
|
|
1966
|
+
/** `<scroll-view>`'s scroll events' detail, in px. */
|
|
1967
|
+
type ScrollDetail = {
|
|
1968
|
+
readonly scrollTop: number;
|
|
1969
|
+
readonly scrollLeft: number;
|
|
1970
|
+
readonly scrollHeight: number;
|
|
1971
|
+
readonly scrollWidth: number;
|
|
1972
|
+
/** The change since the last event. */
|
|
1973
|
+
readonly deltaX: number;
|
|
1974
|
+
readonly deltaY: number;
|
|
1975
|
+
};
|
|
1976
|
+
type LynxScrollViewEventMap = WithPrefixes<{
|
|
1977
|
+
bindscroll: LynxEvent<ScrollDetail>;
|
|
1978
|
+
bindscrollend: LynxEvent<ScrollDetail>;
|
|
1979
|
+
bindscrolltoupper: LynxEvent<ScrollDetail>;
|
|
1980
|
+
bindscrolltolower: LynxEvent<ScrollDetail>;
|
|
1981
|
+
bindscrolltoupperedge: LynxEvent<ScrollDetail>;
|
|
1982
|
+
bindscrolltoloweredge: LynxEvent<ScrollDetail>;
|
|
1983
|
+
bindscrolltonormalstate: LynxEvent<ScrollDetail>;
|
|
1984
|
+
bindcontentsizechanged: LynxEvent<ScrollDetail>;
|
|
1985
|
+
}>;
|
|
1986
|
+
/** A rendered `<list-item>`'s position, relative to the list, in px. */
|
|
1987
|
+
type ListAttachedCell = {
|
|
1988
|
+
readonly id: number;
|
|
1989
|
+
readonly itemKey: string;
|
|
1990
|
+
readonly index: number;
|
|
1991
|
+
readonly left: number;
|
|
1992
|
+
readonly top: number;
|
|
1993
|
+
readonly right: number;
|
|
1994
|
+
readonly bottom: number;
|
|
1995
|
+
};
|
|
1996
|
+
/** `<list>`'s `bindscroll`, `bindscrolltoupper` and `bindscrolltolower` detail. */
|
|
1997
|
+
type ListScrollDetail = ScrollDetail & {
|
|
1998
|
+
readonly listWidth: number;
|
|
1999
|
+
readonly listHeight: number;
|
|
2000
|
+
/** What scrolled the list: `0` a data update, `1` layout, `2` scrolling. */
|
|
2001
|
+
readonly eventSource: 0 | 1 | 2;
|
|
2002
|
+
/** The rendered items. Only with `need-visible-item-info`. */
|
|
2003
|
+
readonly attachedCells?: readonly ListAttachedCell[];
|
|
2004
|
+
};
|
|
2005
|
+
/** `<list>`'s `bindscrollstatechange` detail (iOS and Android). */
|
|
2006
|
+
type ListScrollStateChangeDetail = {
|
|
2007
|
+
/** `1` stopped, `2` dragging, `3` slowing down, `4` animating. */
|
|
2008
|
+
readonly state: 1 | 2 | 3 | 4;
|
|
2009
|
+
};
|
|
2010
|
+
/** An item in `<list>`'s `bindlayoutcomplete` detail. */
|
|
2011
|
+
type ListItemInfo = {
|
|
2012
|
+
readonly width: number;
|
|
2013
|
+
readonly height: number;
|
|
2014
|
+
readonly itemKey: string;
|
|
2015
|
+
/** Whether the item is rendered. */
|
|
2016
|
+
readonly isBinding: boolean;
|
|
2017
|
+
/** The item's position in the whole scroll area, in px. */
|
|
2018
|
+
readonly originX: number;
|
|
2019
|
+
readonly originY: number;
|
|
2020
|
+
readonly updated: boolean;
|
|
2021
|
+
};
|
|
2022
|
+
/**
|
|
2023
|
+
* `<list>`'s `bindlayoutcomplete` detail. Every field but `layout-id` needs
|
|
2024
|
+
* `need-layout-complete-info`.
|
|
2025
|
+
*/
|
|
2026
|
+
type ListLayoutCompleteDetail = {
|
|
2027
|
+
/** The list's `layout-id` attribute, or `-1`. */
|
|
2028
|
+
readonly 'layout-id': number;
|
|
2029
|
+
readonly scrollInfo?: ListScrollDetail;
|
|
2030
|
+
/** The indexes the data update inserted, moved, removed and updated. */
|
|
2031
|
+
readonly diffResult?: {
|
|
2032
|
+
readonly insertions: readonly number[];
|
|
2033
|
+
readonly move_from: readonly number[];
|
|
2034
|
+
readonly move_to: readonly number[];
|
|
2035
|
+
readonly removals: readonly number[];
|
|
2036
|
+
readonly update_from: readonly number[];
|
|
2037
|
+
readonly update_to: readonly number[];
|
|
2038
|
+
};
|
|
2039
|
+
readonly visibleItemBeforeUpdate?: readonly ListItemInfo[];
|
|
2040
|
+
readonly visibleItemAfterUpdate?: readonly ListItemInfo[];
|
|
2041
|
+
};
|
|
2042
|
+
/** `<list>`'s `bindsnap` detail, with `item-snap`: where it's about to snap. */
|
|
2043
|
+
type ListSnapDetail = {
|
|
2044
|
+
/** The index of the item it snaps to. */
|
|
2045
|
+
readonly position: number;
|
|
2046
|
+
readonly currentScrollTop: number;
|
|
2047
|
+
readonly currentScrollLeft: number;
|
|
2048
|
+
readonly targetScrollTop: number;
|
|
2049
|
+
readonly targetScrollLeft: number;
|
|
2050
|
+
};
|
|
2051
|
+
type LynxListEventMap = WithPrefixes<{
|
|
2052
|
+
bindscroll: LynxEvent<ListScrollDetail>;
|
|
2053
|
+
bindscrolltoupper: LynxEvent<ListScrollDetail>;
|
|
2054
|
+
bindscrolltolower: LynxEvent<ListScrollDetail>;
|
|
2055
|
+
bindscrollstatechange: LynxEvent<ListScrollStateChangeDetail>;
|
|
2056
|
+
bindlayoutcomplete: LynxEvent<ListLayoutCompleteDetail>;
|
|
2057
|
+
bindsnap: LynxEvent<ListSnapDetail>;
|
|
2058
|
+
}>;
|
|
2059
|
+
/** `<frame>`'s `bindload` detail: how loading the embedded bundle went. */
|
|
2060
|
+
type FrameLoadDetail = {
|
|
2061
|
+
readonly url: string;
|
|
2062
|
+
readonly statusCode: number;
|
|
2063
|
+
readonly statusMessage: string;
|
|
2064
|
+
};
|
|
2065
|
+
/**
|
|
2066
|
+
* `<frame>`'s `bindloadmetrics` detail: load timings the embedded page
|
|
2067
|
+
* reports (iOS and Android, Lynx 3.9 and later).
|
|
2068
|
+
*/
|
|
2069
|
+
type FrameLoadMetricsDetail = {
|
|
2070
|
+
readonly url: string;
|
|
2071
|
+
readonly mode: string;
|
|
2072
|
+
readonly entry: Readonly<Record<string, unknown>>;
|
|
2073
|
+
};
|
|
2074
|
+
type LynxFrameEventMap = WithPrefixes<{
|
|
2075
|
+
bindload: LynxEvent<FrameLoadDetail>;
|
|
2076
|
+
bindloadmetrics: LynxEvent<FrameLoadMetricsDetail>;
|
|
2077
|
+
}>;
|
|
2078
|
+
/** `<overlay>`'s `bindoverlaytouch` detail (iOS and Android). */
|
|
2079
|
+
type OverlayTouchDetail = {
|
|
2080
|
+
/** Relative to the window. */
|
|
2081
|
+
readonly x: number;
|
|
2082
|
+
readonly y: number;
|
|
2083
|
+
/** `0` down, `1` move, `2` up, `3` cancel. */
|
|
2084
|
+
readonly state: 0 | 1 | 2 | 3;
|
|
2085
|
+
};
|
|
2086
|
+
/** `<overlay>`'s `binderror` detail (Android). */
|
|
2087
|
+
type OverlayErrorDetail = {
|
|
2088
|
+
readonly errorCode: string;
|
|
2089
|
+
readonly errorMsg: string;
|
|
2090
|
+
};
|
|
2091
|
+
type LynxOverlayEventMap = WithPrefixes<{
|
|
2092
|
+
bindshowoverlay: LynxEvent;
|
|
2093
|
+
binddismissoverlay: LynxEvent;
|
|
2094
|
+
bindrequestclose: LynxEvent;
|
|
2095
|
+
bindoverlaytouch: LynxEvent<OverlayTouchDetail>;
|
|
2096
|
+
binderror: LynxEvent<OverlayErrorDetail>;
|
|
2097
|
+
}>;
|
|
2098
|
+
/** `<refresh>`'s `bindstartrefresh` detail. */
|
|
2099
|
+
type RefreshStartDetail = {
|
|
2100
|
+
/** `true` when the user pulled. */
|
|
2101
|
+
readonly isManual: boolean;
|
|
2102
|
+
};
|
|
2103
|
+
/** `<refresh>`'s `bindheaderoffset` detail. */
|
|
2104
|
+
type RefreshHeaderOffsetDetail = {
|
|
2105
|
+
readonly isDragging: boolean;
|
|
2106
|
+
/** The pull distance divided by the header's height. */
|
|
2107
|
+
readonly offsetPercent: number;
|
|
2108
|
+
};
|
|
2109
|
+
/** `<refresh>`'s `bindrefreshstatechange` detail. */
|
|
2110
|
+
type RefreshStateChangeDetail = {
|
|
2111
|
+
/** `0` idle, `1` pulled far enough to release, `2` refreshing. */
|
|
2112
|
+
readonly state: 0 | 1 | 2;
|
|
2113
|
+
};
|
|
2114
|
+
type LynxRefreshEventMap = WithPrefixes<{
|
|
2115
|
+
bindstartrefresh: LynxEvent<RefreshStartDetail>;
|
|
2116
|
+
bindheaderoffset: LynxEvent<RefreshHeaderOffsetDetail>;
|
|
2117
|
+
bindrefreshstatechange: LynxEvent<RefreshStateChangeDetail>;
|
|
2118
|
+
}>;
|
|
2119
|
+
/** `<scroll-coordinator>`'s `bindoffset` detail, in px. */
|
|
2120
|
+
type ScrollCoordinatorOffsetDetail = {
|
|
2121
|
+
/** How far the header has folded. */
|
|
2122
|
+
readonly offset: number;
|
|
2123
|
+
/** How far it can fold: the header's height minus the toolbar's. */
|
|
2124
|
+
readonly height: number;
|
|
2125
|
+
};
|
|
2126
|
+
type LynxScrollCoordinatorEventMap = WithPrefixes<{
|
|
2127
|
+
bindoffset: LynxEvent<ScrollCoordinatorOffsetDetail>;
|
|
2128
|
+
}>;
|
|
2129
|
+
/** `<video>`'s `bindfirstframe` detail. */
|
|
2130
|
+
type VideoFirstFrameDetail = {
|
|
2131
|
+
/** In seconds. */
|
|
2132
|
+
readonly duration: number;
|
|
2133
|
+
};
|
|
2134
|
+
/** `<video>`'s `bindtimeupdate` detail, in seconds. */
|
|
2135
|
+
type VideoTimeUpdateDetail = {
|
|
2136
|
+
readonly current: number;
|
|
2137
|
+
readonly duration: number;
|
|
2138
|
+
};
|
|
2139
|
+
/** `<video>`'s `bindbuffering` detail. */
|
|
2140
|
+
type VideoBufferingDetail = {
|
|
2141
|
+
/** How far the video has loaded, in seconds. */
|
|
2142
|
+
readonly buffering: number;
|
|
2143
|
+
};
|
|
2144
|
+
/** `<video>`'s `binderror` detail. */
|
|
2145
|
+
type VideoErrorDetail = {
|
|
2146
|
+
readonly errorCode: number;
|
|
2147
|
+
readonly errorMsg: string;
|
|
2148
|
+
};
|
|
2149
|
+
type LynxVideoEventMap = WithPrefixes<{
|
|
2150
|
+
bindfirstframe: LynxEvent<VideoFirstFrameDetail>;
|
|
2151
|
+
bindtimeupdate: LynxEvent<VideoTimeUpdateDetail>;
|
|
2152
|
+
bindbuffering: LynxEvent<VideoBufferingDetail>;
|
|
2153
|
+
binderror: LynxEvent<VideoErrorDetail>;
|
|
2154
|
+
bindplaying: LynxEvent;
|
|
2155
|
+
bindpaused: LynxEvent;
|
|
2156
|
+
bindstopped: LynxEvent;
|
|
2157
|
+
bindended: LynxEvent;
|
|
2158
|
+
bindlooped: LynxEvent;
|
|
2159
|
+
}>;
|
|
2160
|
+
/** `<viewpager>`'s `bindchange` and `bindwillchange` detail. */
|
|
2161
|
+
type ViewPagerChangeDetail = {
|
|
2162
|
+
readonly index: number;
|
|
2163
|
+
/** `true` when the user swiped there. */
|
|
2164
|
+
readonly isDragged: boolean;
|
|
2165
|
+
};
|
|
2166
|
+
/** `<viewpager>`'s `bindoffsetchange` detail. */
|
|
2167
|
+
type ViewPagerOffsetChangeDetail = {
|
|
2168
|
+
/** The position in pages: `0.5` is halfway between pages 0 and 1. */
|
|
2169
|
+
readonly offset: number;
|
|
2170
|
+
};
|
|
2171
|
+
type LynxViewPagerEventMap = WithPrefixes<{
|
|
2172
|
+
bindchange: LynxEvent<ViewPagerChangeDetail>;
|
|
2173
|
+
bindwillchange: LynxEvent<ViewPagerChangeDetail>;
|
|
2174
|
+
bindoffsetchange: LynxEvent<ViewPagerOffsetChangeDetail>;
|
|
2175
|
+
}>;
|
|
2176
|
+
/** `<webview>`'s `binderror` detail. */
|
|
2177
|
+
type WebViewErrorDetail = {
|
|
2178
|
+
readonly errorCode: number;
|
|
2179
|
+
readonly errorMsg: string;
|
|
2180
|
+
};
|
|
2181
|
+
/** `<webview>`'s `bindmessage` detail: what the page sent. */
|
|
2182
|
+
type WebViewMessageDetail = {
|
|
2183
|
+
readonly msg: string;
|
|
2184
|
+
};
|
|
2185
|
+
/** `<webview>`'s `bindopenwindow` and `bindlocationchange` detail (Clay). */
|
|
2186
|
+
type WebViewUrlDetail = {
|
|
2187
|
+
readonly url: string;
|
|
2188
|
+
};
|
|
2189
|
+
type LynxWebViewEventMap = WithPrefixes<{
|
|
2190
|
+
bindload: LynxEvent;
|
|
2191
|
+
binderror: LynxEvent<WebViewErrorDetail>;
|
|
2192
|
+
bindmessage: LynxEvent<WebViewMessageDetail>;
|
|
2193
|
+
bindopenwindow: LynxEvent<WebViewUrlDetail>;
|
|
2194
|
+
bindlocationchange: LynxEvent<WebViewUrlDetail>;
|
|
2195
|
+
}>;
|
|
2196
|
+
/**
|
|
2197
|
+
* A Lynx-only tag, such as `image`, as Angular's template checker sees it:
|
|
2198
|
+
* an `HTMLElement` whose listeners also know the tag's own events. It's an
|
|
2199
|
+
* interface so that these overloads come before `HTMLElement`'s, whose
|
|
2200
|
+
* `string` overload would otherwise match first and type `$event` as `Event`.
|
|
2201
|
+
*/
|
|
2202
|
+
interface LynxTagElement<Events> extends HTMLElement {
|
|
2203
|
+
addEventListener<Name extends keyof (Events & HTMLElementEventMap)>(type: Name, listener: (this: LynxTagElement<Events>, event: (Events & HTMLElementEventMap)[Name]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
2204
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2205
|
+
removeEventListener<Name extends keyof (Events & HTMLElementEventMap)>(type: Name, listener: (this: LynxTagElement<Events>, event: (Events & HTMLElementEventMap)[Name]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
2206
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2207
|
+
}
|
|
2208
|
+
declare global {
|
|
2209
|
+
interface HTMLElementTagNameMap {
|
|
2210
|
+
image: LynxTagElement<LynxImageEventMap>;
|
|
2211
|
+
text: LynxTagElement<LynxTextEventMap>;
|
|
2212
|
+
'scroll-view': LynxTagElement<LynxScrollViewEventMap>;
|
|
2213
|
+
list: LynxTagElement<LynxListEventMap>;
|
|
2214
|
+
overlay: LynxTagElement<LynxOverlayEventMap>;
|
|
2215
|
+
refresh: LynxTagElement<LynxRefreshEventMap>;
|
|
2216
|
+
'scroll-coordinator': LynxTagElement<LynxScrollCoordinatorEventMap>;
|
|
2217
|
+
viewpager: LynxTagElement<LynxViewPagerEventMap>;
|
|
2218
|
+
webview: LynxTagElement<LynxWebViewEventMap>;
|
|
2219
|
+
':svg:svg': LynxTagElement<LynxSvgEventMap>;
|
|
2220
|
+
}
|
|
2221
|
+
interface HTMLInputElement {
|
|
2222
|
+
addEventListener<Name extends keyof LynxInputEventMap>(type: Name, listener: (this: HTMLInputElement, event: LynxInputEventMap[Name]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
2223
|
+
removeEventListener<Name extends keyof LynxInputEventMap>(type: Name, listener: (this: HTMLInputElement, event: LynxInputEventMap[Name]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
2224
|
+
}
|
|
2225
|
+
interface HTMLTextAreaElement {
|
|
2226
|
+
addEventListener<Name extends keyof LynxTextareaEventMap>(type: Name, listener: (this: HTMLTextAreaElement, event: LynxTextareaEventMap[Name]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
2227
|
+
removeEventListener<Name extends keyof LynxTextareaEventMap>(type: Name, listener: (this: HTMLTextAreaElement, event: LynxTextareaEventMap[Name]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
2228
|
+
}
|
|
2229
|
+
interface HTMLVideoElement {
|
|
2230
|
+
addEventListener<Name extends keyof LynxVideoEventMap>(type: Name, listener: (this: HTMLVideoElement, event: LynxVideoEventMap[Name]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
2231
|
+
removeEventListener<Name extends keyof LynxVideoEventMap>(type: Name, listener: (this: HTMLVideoElement, event: LynxVideoEventMap[Name]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
2232
|
+
}
|
|
2233
|
+
interface HTMLFrameElement {
|
|
2234
|
+
addEventListener<Name extends keyof LynxFrameEventMap>(type: Name, listener: (this: HTMLFrameElement, event: LynxFrameEventMap[Name]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
2235
|
+
removeEventListener<Name extends keyof LynxFrameEventMap>(type: Name, listener: (this: HTMLFrameElement, event: LynxFrameEventMap[Name]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
1695
2238
|
/**
|
|
1696
2239
|
* ControlValueAccessor for <input> elements. Bridges Angular's form model
|
|
1697
2240
|
* (reactive forms, template-driven NgModel, Signal Forms [formField]) to Lynx's
|
|
@@ -1702,7 +2245,7 @@ export declare class LynxCoverView extends LynxElementBase {
|
|
|
1702
2245
|
*/
|
|
1703
2246
|
export declare class LynxInputValueAccessor implements ControlValueAccessor {
|
|
1704
2247
|
#private;
|
|
1705
|
-
onInput(event:
|
|
2248
|
+
onInput(event: LynxEvent<InputDetail>): void;
|
|
1706
2249
|
onBlur(): void;
|
|
1707
2250
|
writeValue(value: string): void;
|
|
1708
2251
|
registerOnChange(fn: (value: string) => void): void;
|
|
@@ -1721,7 +2264,7 @@ export declare class LynxInputValueAccessor implements ControlValueAccessor {
|
|
|
1721
2264
|
*/
|
|
1722
2265
|
export declare class LynxTextareaValueAccessor implements ControlValueAccessor {
|
|
1723
2266
|
#private;
|
|
1724
|
-
onInput(event:
|
|
2267
|
+
onInput(event: LynxEvent<InputDetail>): void;
|
|
1725
2268
|
onBlur(): void;
|
|
1726
2269
|
writeValue(value: string): void;
|
|
1727
2270
|
registerOnChange(fn: (value: string) => void): void;
|
|
@@ -3236,186 +3779,425 @@ type BaseLynxElement = Pick<Element$1, 'setAttribute'> & {
|
|
|
3236
3779
|
*/
|
|
3237
3780
|
invoke(methodName: string, params?: Record<string, unknown>): void;
|
|
3238
3781
|
};
|
|
3239
|
-
export declare class LynxLogger {
|
|
3240
|
-
#private;
|
|
3241
|
-
log(...args: unknown[]): void;
|
|
3242
|
-
warn(...args: unknown[]): void;
|
|
3243
|
-
error(...args: unknown[]): void;
|
|
3244
|
-
info(...args: unknown[]): void;
|
|
3245
|
-
debug(...args: unknown[]): void;
|
|
3246
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LynxLogger, never>;
|
|
3247
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
3248
|
-
}
|
|
3249
3782
|
/**
|
|
3250
|
-
*
|
|
3251
|
-
*
|
|
3252
|
-
*
|
|
3253
|
-
*
|
|
3254
|
-
*
|
|
3255
|
-
*
|
|
3256
|
-
*
|
|
3257
|
-
*
|
|
3258
|
-
*
|
|
3259
|
-
*
|
|
3260
|
-
*
|
|
3261
|
-
*
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3783
|
+
* The listener registry behind the `document` and `window` stand-ins (see
|
|
3784
|
+
* global-events.ts): `addEventListener()`, `removeEventListener()` and
|
|
3785
|
+
* `dispatchEvent()` as a DOM EventTarget has them, for Lynx's main thread,
|
|
3786
|
+
* which has no EventTarget.
|
|
3787
|
+
*
|
|
3788
|
+
* Code written for the browser listens on these two objects without checking
|
|
3789
|
+
* they can be listened on: Angular's `document:`/`window:` host listeners,
|
|
3790
|
+
* RxJS's `fromEvent(document, …)`, and libraries that close a menu on a
|
|
3791
|
+
* `click` anywhere. So the registry keeps the DOM's rules, which such code
|
|
3792
|
+
* relies on: a listener added twice runs once, `once` and `signal` remove
|
|
3793
|
+
* it, an object's `handleEvent()` is called, a listener removed by an
|
|
3794
|
+
* earlier one doesn't run, and one that throws doesn't stop the others.
|
|
3795
|
+
*/
|
|
3796
|
+
/** A listener, as addEventListener takes it. */
|
|
3797
|
+
type EventListenerLike = ((event: any) => unknown) | {
|
|
3798
|
+
handleEvent(event: any): unknown;
|
|
3799
|
+
};
|
|
3800
|
+
/** The third argument of addEventListener and removeEventListener. */
|
|
3801
|
+
type ListenerOptionsLike = boolean | {
|
|
3802
|
+
capture?: boolean;
|
|
3803
|
+
once?: boolean;
|
|
3804
|
+
passive?: boolean;
|
|
3805
|
+
signal?: AbortSignalLike;
|
|
3806
|
+
};
|
|
3807
|
+
type AbortSignalLike = {
|
|
3808
|
+
readonly aborted: boolean;
|
|
3809
|
+
addEventListener(type: 'abort', listener: () => void): void;
|
|
3810
|
+
removeEventListener?(type: 'abort', listener: () => void): void;
|
|
3811
|
+
};
|
|
3812
|
+
/** `Event.eventPhase`'s values. */
|
|
3813
|
+
declare const CAPTURING_PHASE = 1;
|
|
3814
|
+
declare const AT_TARGET = 2;
|
|
3815
|
+
declare const BUBBLING_PHASE = 3;
|
|
3816
|
+
/**
|
|
3817
|
+
* What the listeners of one dispatch did to it, across the targets it goes
|
|
3818
|
+
* through.
|
|
3272
3819
|
*/
|
|
3273
|
-
|
|
3820
|
+
type PropagationState = {
|
|
3821
|
+
stopped: boolean;
|
|
3822
|
+
stoppedImmediately: boolean;
|
|
3823
|
+
};
|
|
3274
3824
|
/**
|
|
3275
|
-
*
|
|
3276
|
-
*
|
|
3277
|
-
*
|
|
3278
|
-
* Native modules exist only on the background thread, so each method call is
|
|
3279
|
-
* relayed there: the method returns a promise of its result (copied as JSON),
|
|
3280
|
-
* and function arguments are called back on the main thread. Only methods
|
|
3281
|
-
* cross; other properties of the module aren't reachable.
|
|
3825
|
+
* Sets a property of an event object, whatever kind it is: a DOM Event's
|
|
3826
|
+
* `target` and `currentTarget` are getters on its prototype, which an own
|
|
3827
|
+
* property shadows.
|
|
3282
3828
|
*/
|
|
3283
|
-
|
|
3829
|
+
declare const setEventProperty: (event: object, name: string, value: unknown) => void;
|
|
3284
3830
|
/**
|
|
3285
|
-
*
|
|
3286
|
-
*
|
|
3287
|
-
*
|
|
3288
|
-
* functions (iOS / Android / HarmonyOS). The host app registers modules on the
|
|
3289
|
-
* native side; this service provides typed access from Angular.
|
|
3290
|
-
*
|
|
3291
|
-
* **JS modules** (`lynx.getJSModule` / `lynx.registerModule`) share JavaScript
|
|
3292
|
-
* values within a single LynxView. This is the same API used internally by
|
|
3293
|
-
* `LynxInitData` and `LynxGlobalData` (via `GlobalEventEmitter`).
|
|
3294
|
-
*
|
|
3295
|
-
* Lynx provides both only on the background thread, while Angular runs on the
|
|
3296
|
-
* main thread. So on the main thread every method goes through the background
|
|
3297
|
-
* call relay (background-call.ts): calls run on the background thread, their
|
|
3298
|
-
* results and callbacks come back as JSON, and a module is a proxy whose
|
|
3299
|
-
* methods return promises.
|
|
3300
|
-
*
|
|
3301
|
-
* @usageNotes
|
|
3302
|
-
* ```typescript
|
|
3303
|
-
* const modules = inject(LynxNativeModule);
|
|
3304
|
-
*
|
|
3305
|
-
* // Call a native method (Promise-based wrapper over bridge.call)
|
|
3306
|
-
* const result = await modules.call<string>('getDeviceId', {});
|
|
3307
|
-
*
|
|
3308
|
-
* // Listen for native events
|
|
3309
|
-
* modules.on('onDeepLink', (url) => console.log(url));
|
|
3310
|
-
*
|
|
3311
|
-
* // Access a typed custom native module
|
|
3312
|
-
* const storage = modules.getNativeModule('NativeLocalStorageModule');
|
|
3313
|
-
* storage?.setStorageItem('key', 'value');
|
|
3314
|
-
*
|
|
3315
|
-
* // JS module sharing within the LynxView
|
|
3316
|
-
* modules.registerJSModule('mySharedState', { count: 0 });
|
|
3317
|
-
* const state = modules.getJSModule<{ count: number }>('mySharedState');
|
|
3318
|
-
* ```
|
|
3831
|
+
* One object's listeners. `owner` is the object they're added to, which
|
|
3832
|
+
* listeners see as the event's `currentTarget`: the document stand-in is its
|
|
3833
|
+
* own, and the window's is `globalThis`.
|
|
3319
3834
|
*/
|
|
3320
|
-
|
|
3835
|
+
declare class GlobalEventTarget {
|
|
3321
3836
|
#private;
|
|
3837
|
+
constructor(owner?: object);
|
|
3322
3838
|
/**
|
|
3323
|
-
*
|
|
3324
|
-
*
|
|
3325
|
-
* The native callback API is wrapped in a Promise for ergonomic
|
|
3326
|
-
* use with `async`/`await`.
|
|
3327
|
-
*
|
|
3328
|
-
* Resolves `undefined` when there is no bridge (web preview, tests).
|
|
3839
|
+
* @internal Called whenever the set of types with listeners changes, so
|
|
3840
|
+
* the events for them can be listened for (see global-events.ts).
|
|
3329
3841
|
*/
|
|
3330
|
-
|
|
3842
|
+
set onTypesChange(callback: () => void);
|
|
3843
|
+
addEventListener(type: string, callback: EventListenerLike | null | undefined, options?: ListenerOptionsLike): void;
|
|
3844
|
+
removeEventListener(type: string, callback: EventListenerLike | null | undefined, options?: ListenerOptionsLike): void;
|
|
3331
3845
|
/**
|
|
3332
|
-
*
|
|
3333
|
-
*
|
|
3334
|
-
*
|
|
3335
|
-
* No-op when there is no bridge.
|
|
3846
|
+
* Dispatches `event` to this object's own listeners, as the DOM does for
|
|
3847
|
+
* an object with no parent. The document stand-in overrides it, since the
|
|
3848
|
+
* window is its parent.
|
|
3336
3849
|
*/
|
|
3337
|
-
|
|
3850
|
+
dispatchEvent(event: any): boolean;
|
|
3338
3851
|
/**
|
|
3339
|
-
*
|
|
3340
|
-
*
|
|
3341
|
-
* Augment the {@link NativeModuleMap} interface for type-safe access:
|
|
3342
|
-
*
|
|
3343
|
-
* ```typescript
|
|
3344
|
-
* export {};
|
|
3345
|
-
*
|
|
3346
|
-
* declare module '@blotch/angular-lynx' {
|
|
3347
|
-
* interface NativeModuleMap {
|
|
3348
|
-
* NativeLocalStorageModule: { ... };
|
|
3349
|
-
* }
|
|
3350
|
-
* }
|
|
3351
|
-
*
|
|
3352
|
-
* const storage = modules.getNativeModule('NativeLocalStorageModule');
|
|
3353
|
-
* ```
|
|
3354
|
-
*
|
|
3355
|
-
* On the main thread, which can't reach native modules, it returns a proxy:
|
|
3356
|
-
* each method call runs on the background thread and returns a promise of
|
|
3357
|
-
* its result, and a call to a module or method the host doesn't have
|
|
3358
|
-
* rejects. The return type says so: a module in {@link NativeModuleMap}
|
|
3359
|
-
* comes back as a {@link NativeModuleProxy} of it, and any other name as
|
|
3360
|
-
* `unknown`.
|
|
3361
|
-
*
|
|
3362
|
-
* Returns `undefined` outside Lynx, or on the background thread when the
|
|
3363
|
-
* module is not registered.
|
|
3852
|
+
* The types that have a listener.
|
|
3364
3853
|
*/
|
|
3365
|
-
|
|
3854
|
+
get types(): string[];
|
|
3855
|
+
hasListeners(type: string): boolean;
|
|
3366
3856
|
/**
|
|
3367
|
-
*
|
|
3368
|
-
*
|
|
3369
|
-
* This wraps `lynx.getJSModule()` — the same API used internally
|
|
3370
|
-
* for `GlobalEventEmitter`. On the main thread it returns a proxy, as
|
|
3371
|
-
* getNativeModule() does.
|
|
3372
|
-
*
|
|
3373
|
-
* Returns `undefined` when `lynx` is unavailable or, on the background
|
|
3374
|
-
* thread, when the module is not registered.
|
|
3857
|
+
* The object listeners are added to, which they see as currentTarget.
|
|
3375
3858
|
*/
|
|
3376
|
-
|
|
3859
|
+
get owner(): object;
|
|
3377
3860
|
/**
|
|
3378
|
-
*
|
|
3379
|
-
*
|
|
3380
|
-
*
|
|
3381
|
-
* `
|
|
3382
|
-
*
|
|
3383
|
-
* their arguments copied as JSON and their return values dropped.
|
|
3384
|
-
*
|
|
3385
|
-
* No-op when `lynx` is unavailable.
|
|
3861
|
+
* @internal Runs this object's listeners for `type` in `phase`: the
|
|
3862
|
+
* capturing ones in the capturing phase, the others in the bubbling one,
|
|
3863
|
+
* and both at the target, capturing first, as Chrome and Firefox do.
|
|
3864
|
+
* `type` is passed apart from the event, since a Lynx `tap` reaches the
|
|
3865
|
+
* listeners for `click`.
|
|
3386
3866
|
*/
|
|
3387
|
-
|
|
3388
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LynxNativeModule, never>;
|
|
3389
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
3867
|
+
invoke(type: string, event: any, phase: number, state: PropagationState): void;
|
|
3390
3868
|
}
|
|
3391
|
-
|
|
3869
|
+
/**
|
|
3870
|
+
* One event's dispatch at `target` through `path`, the listening objects
|
|
3871
|
+
* from the target's side out (document, then window): capturing listeners
|
|
3872
|
+
* from the outside in, then the others from the inside out, if the event
|
|
3873
|
+
* bubbles. When the target is the first object of the path, as for
|
|
3874
|
+
* `dispatchEvent()`, its listeners run at the target, in the bubbling half.
|
|
3875
|
+
*
|
|
3876
|
+
* Otherwise the target is an element, and the event a screen event (see
|
|
3877
|
+
* global-events.ts), whose two halves run apart: the capturing one before
|
|
3878
|
+
* the elements' own listeners, and the bubbling one after them, as a
|
|
3879
|
+
* browser runs a document's listeners.
|
|
3880
|
+
*
|
|
3881
|
+
* `type` is the listeners' type, which defaults to the event's own.
|
|
3882
|
+
*/
|
|
3883
|
+
declare class PathDispatch {
|
|
3392
3884
|
#private;
|
|
3393
|
-
|
|
3394
|
-
tagName: string;
|
|
3885
|
+
constructor(event: any, target: object, path: GlobalEventTarget[], type?: string);
|
|
3395
3886
|
/**
|
|
3396
|
-
*
|
|
3397
|
-
* re-parented (appendChild/insertBefore) or removed from the tree.
|
|
3398
|
-
* Angular calls appendChild/remove as part of normal component lifecycle,
|
|
3399
|
-
* but the page element is the immutable root — moving or removing it
|
|
3400
|
-
* would corrupt the native element tree.
|
|
3887
|
+
* Runs the capturing listeners of the objects around the target.
|
|
3401
3888
|
*/
|
|
3402
|
-
|
|
3889
|
+
capture(): void;
|
|
3403
3890
|
/**
|
|
3404
|
-
*
|
|
3405
|
-
*
|
|
3406
|
-
*
|
|
3891
|
+
* Runs the target's listeners, if it's in the path, then the bubbling
|
|
3892
|
+
* listeners around it. Returns false if a listener canceled the event, as
|
|
3893
|
+
* dispatchEvent does.
|
|
3407
3894
|
*/
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3895
|
+
bubble(): boolean;
|
|
3896
|
+
}
|
|
3897
|
+
/**
|
|
3898
|
+
* Dispatches `event` at `target` through `path` at once (see PathDispatch).
|
|
3899
|
+
*/
|
|
3900
|
+
declare const dispatchThrough: (event: any, target: object, path: GlobalEventTarget[]) => boolean;
|
|
3901
|
+
/**
|
|
3902
|
+
* `document` and `window` as event targets, for Lynx's main thread.
|
|
3903
|
+
*
|
|
3904
|
+
* Angular resolves a `document:` or `body:` host listener's target from the
|
|
3905
|
+
* host element's `ownerDocument`, and a `window:` one from its
|
|
3906
|
+
* `ownerDocument.defaultView`. Lynx elements had no `ownerDocument`, so a
|
|
3907
|
+
* component with a global listener threw "not a function" as it was created.
|
|
3908
|
+
* Now a LynxElement's `ownerDocument` is the LynxGlobalDocument below, which
|
|
3909
|
+
* is also the `DOCUMENT` token's value and, on iOS and Android, the
|
|
3910
|
+
* `document` global. Its `defaultView` is `globalThis`, the `window` global
|
|
3911
|
+
* on Lynx, whose listeners are this hub's `window` (see window.ts).
|
|
3912
|
+
*
|
|
3913
|
+
* Both hear what a browser's document and window do: the events of a touch
|
|
3914
|
+
* anywhere on screen (see native-source.ts, and web-source.ts for Lynx for
|
|
3915
|
+
* Web), and on the window, `resize` when the LynxView changes size.
|
|
3916
|
+
*
|
|
3917
|
+
* A browser runs a document's capturing listeners before the touched
|
|
3918
|
+
* element's, and its other listeners after them. Lynx runs a `global-bind`
|
|
3919
|
+
* listener, which hears a touch wherever it lands, before every other
|
|
3920
|
+
* (see "A popover that leaves the screen usable" in
|
|
3921
|
+
* investigations/lynx-vs-web-differences.md). So a screen event's dispatch
|
|
3922
|
+
* runs in two halves (see PathDispatch): `early()` runs the capturing
|
|
3923
|
+
* listeners when the event begins, and `late()` the others when it reaches
|
|
3924
|
+
* the page element, the last of the elements it goes through, after the
|
|
3925
|
+
* page's own listeners. An event an
|
|
3926
|
+
* element's `catch` listener stopped never reaches the page, so its second
|
|
3927
|
+
* half runs on the next timer, after every listener of that event.
|
|
3928
|
+
*/
|
|
3929
|
+
/** What the hub needs of the page element: its LynxElement. */
|
|
3930
|
+
type GlobalEventsPage = {
|
|
3931
|
+
/** The native element: a DOM element on Lynx for Web. */
|
|
3932
|
+
readonly element: unknown;
|
|
3933
|
+
addEventListener(name: string, listener: (event: any) => unknown): () => void;
|
|
3934
|
+
/** Adds a listener that runs after the page's others for the event. */
|
|
3935
|
+
addTrailingEventListener(name: string, listener: (event: any) => unknown): () => void;
|
|
3936
|
+
};
|
|
3937
|
+
/** The element wrapper with a unique id, for a screen event's target. */
|
|
3938
|
+
type ElementLookup = (uniqueId: number) => object | undefined;
|
|
3939
|
+
type ViewportSize = {
|
|
3940
|
+
readonly width: number;
|
|
3941
|
+
readonly height: number;
|
|
3942
|
+
};
|
|
3943
|
+
/** An event to dispatch through the document and window. */
|
|
3944
|
+
type Delivery = {
|
|
3945
|
+
/** The listeners' type: a Lynx `tap` reaches the ones for `click`. */
|
|
3946
|
+
readonly type: string;
|
|
3947
|
+
readonly event: any;
|
|
3948
|
+
/** The element the event happened on. */
|
|
3949
|
+
readonly target: object;
|
|
3950
|
+
};
|
|
3951
|
+
/** Where a platform's screen events come from. */
|
|
3952
|
+
type ScreenSource = {
|
|
3953
|
+
/**
|
|
3954
|
+
* Listens on `page` for the events of `types`, and stops listening for
|
|
3955
|
+
* the others, or on a page that's gone.
|
|
3956
|
+
*/
|
|
3957
|
+
sync(page: GlobalEventsPage | null, types: ReadonlySet<string>): void;
|
|
3958
|
+
/**
|
|
3959
|
+
* The LynxView's size now, where it can be read at any time (the web
|
|
3960
|
+
* preview). Otherwise it's the last `resized()` one.
|
|
3961
|
+
*/
|
|
3962
|
+
viewport?(): ViewportSize | null;
|
|
3963
|
+
};
|
|
3964
|
+
/**
|
|
3965
|
+
* The `document` stand-in. Only what code written for the browser reaches
|
|
3966
|
+
* for on a document it can't do without: listening, `defaultView`, `body`,
|
|
3967
|
+
* and the queries Angular makes of it, which find nothing, as Lynx's
|
|
3968
|
+
* elements come from templates.
|
|
3969
|
+
*/
|
|
3970
|
+
declare class LynxGlobalDocument extends GlobalEventTarget {
|
|
3971
|
+
#private;
|
|
3972
|
+
constructor(events: GlobalEvents);
|
|
3973
|
+
/**
|
|
3974
|
+
* The window, as a document's is: `globalThis` on Lynx.
|
|
3975
|
+
*/
|
|
3976
|
+
get defaultView(): any;
|
|
3977
|
+
/**
|
|
3978
|
+
* The page element, which every element is in, as a browser's body is, so
|
|
3979
|
+
* a `body:` listener hears the events that bubble up to it. Null until
|
|
3980
|
+
* the app's root element is made, as `document.body` is before a page's
|
|
3981
|
+
* body is parsed.
|
|
3982
|
+
*/
|
|
3983
|
+
get body(): GlobalEventsPage | null;
|
|
3984
|
+
/**
|
|
3985
|
+
* TransferState's root factory calls
|
|
3986
|
+
* `inject(DOCUMENT).getElementById(APP_ID + '-state')` to restore the
|
|
3987
|
+
* `<script>` Angular SSR inlines. `resource()` and `httpResource()` inject
|
|
3988
|
+
* TransferState on construction. Lynx never has that script (AngularLynx
|
|
3989
|
+
* SSR hydrates from its own element snapshot), so `null`, "no transferred
|
|
3990
|
+
* state", is the right answer, not just a stub.
|
|
3991
|
+
*/
|
|
3992
|
+
getElementById(_id: string): null;
|
|
3993
|
+
/**
|
|
3994
|
+
* Angular's getBaseHrefFromDOM() calls `document.querySelector('base')`.
|
|
3995
|
+
* Null makes it fall back to APP_BASE_HREF (see provideRenderer).
|
|
3996
|
+
*/
|
|
3997
|
+
querySelector(_selector: string): null;
|
|
3998
|
+
querySelectorAll(_selector: string): never[];
|
|
3999
|
+
/**
|
|
4000
|
+
* A document's event bubbles to its window, as in the DOM.
|
|
4001
|
+
*/
|
|
4002
|
+
dispatchEvent(event: any): boolean;
|
|
4003
|
+
}
|
|
4004
|
+
/**
|
|
4005
|
+
* The screen's size in CSS pixels, from SystemInfo's physical pixels: what
|
|
4006
|
+
* `innerWidth` and `innerHeight` are until the LynxView's first layout
|
|
4007
|
+
* reports its own.
|
|
4008
|
+
*/
|
|
4009
|
+
declare const screenViewport: () => ViewportSize;
|
|
4010
|
+
declare class GlobalEvents {
|
|
4011
|
+
#private;
|
|
4012
|
+
readonly window: GlobalEventTarget;
|
|
4013
|
+
readonly document: LynxGlobalDocument;
|
|
4014
|
+
/**
|
|
4015
|
+
* @param windowObject The window, which listeners see as currentTarget:
|
|
4016
|
+
* `globalThis`.
|
|
4017
|
+
* @param createSource Makes the platform's ScreenSource.
|
|
4018
|
+
*/
|
|
4019
|
+
constructor(windowObject: object, createSource: (events: GlobalEvents) => ScreenSource);
|
|
4020
|
+
/**
|
|
4021
|
+
* Makes `page` the one screen events come from: the root element of the
|
|
4022
|
+
* app that was bootstrapped last (see LynxDocument.createRootElement).
|
|
4023
|
+
* `lookup` finds the element a touch landed on.
|
|
4024
|
+
*/
|
|
4025
|
+
attach(page: GlobalEventsPage, lookup: ElementLookup): void;
|
|
4026
|
+
get page(): GlobalEventsPage | null;
|
|
4027
|
+
/**
|
|
4028
|
+
* The LynxView's size, for `innerWidth` and `innerHeight`.
|
|
4029
|
+
*/
|
|
4030
|
+
get viewport(): ViewportSize | null;
|
|
4031
|
+
/**
|
|
4032
|
+
* Whether the document or the window has a listener for `type`.
|
|
4033
|
+
*/
|
|
4034
|
+
hasListeners(type: string): boolean;
|
|
4035
|
+
/**
|
|
4036
|
+
* The wrapper of the element with this unique id: a screen event's
|
|
4037
|
+
* target. Every touch is on the page, so it's the page when the element
|
|
4038
|
+
* has no wrapper, and the document only before there's a page.
|
|
4039
|
+
*/
|
|
4040
|
+
targetFor(uniqueId: number | undefined): object;
|
|
4041
|
+
/**
|
|
4042
|
+
* A screen event begins: runs the capturing listeners of each delivery,
|
|
4043
|
+
* and keeps the others for late(), or the next timer. `key` names the
|
|
4044
|
+
* event for late(): its name natively, where each event has its own
|
|
4045
|
+
* objects per listener, and the DOM event on the web.
|
|
4046
|
+
*/
|
|
4047
|
+
early(key: unknown, deliveries: Delivery[]): void;
|
|
4048
|
+
/**
|
|
4049
|
+
* The screen event `key` reached the page: runs its other listeners.
|
|
4050
|
+
*/
|
|
4051
|
+
late(key: unknown): void;
|
|
4052
|
+
/**
|
|
4053
|
+
* Runs the second halves of the screen events still pending. Natively,
|
|
4054
|
+
* one event's listeners all run before the next event begins, so one still
|
|
4055
|
+
* pending when the next begins was stopped on its way to the page, and its
|
|
4056
|
+
* listeners run before the next one's, in the order the events happened.
|
|
4057
|
+
*/
|
|
4058
|
+
finishPending(): void;
|
|
4059
|
+
/**
|
|
4060
|
+
* The LynxView changed size: fires `resize` on the window. Lynx also
|
|
4061
|
+
* reports the size after the first layout, which a browser has no event
|
|
4062
|
+
* for, so the size `innerWidth` and `innerHeight` already said, the
|
|
4063
|
+
* screen's until then, fires nothing.
|
|
4064
|
+
*/
|
|
4065
|
+
resized(size: ViewportSize): void;
|
|
4066
|
+
}
|
|
4067
|
+
/**
|
|
4068
|
+
* The window's half of global-events.ts, on `globalThis`, which is the
|
|
4069
|
+
* window on Lynx's main thread: the polyfills make `window` point to it, and
|
|
4070
|
+
* the document's `defaultView` is it.
|
|
4071
|
+
*
|
|
4072
|
+
* On iOS and Android it has no `addEventListener` of its own (only the
|
|
4073
|
+
* polyfills' no-op), so all its listeners are the hub's. Where it's a
|
|
4074
|
+
* browser's window, which it is in the web preview (a hidden iframe's) and
|
|
4075
|
+
* in jsdom tests, the hub takes the screen's events (SCREEN_EVENTS) and the
|
|
4076
|
+
* window keeps the others, such as `message`.
|
|
4077
|
+
*
|
|
4078
|
+
* `innerWidth` and `innerHeight` are the LynxView's size (see
|
|
4079
|
+
* GlobalEvents.viewport): before the first layout reports it, the screen's,
|
|
4080
|
+
* from SystemInfo. jsdom keeps its own.
|
|
4081
|
+
*/
|
|
4082
|
+
/** The events of the screen, which the hub's window hears. */
|
|
4083
|
+
declare const SCREEN_EVENTS: ReadonlySet<string>;
|
|
4084
|
+
/**
|
|
4085
|
+
* Makes `events.window` the window's listeners on `target` (`globalThis`),
|
|
4086
|
+
* and its `innerWidth` and `innerHeight` the LynxView's.
|
|
4087
|
+
*/
|
|
4088
|
+
declare const installGlobalWindow: (target: Record<string | symbol, any>, events: GlobalEvents) => void;
|
|
4089
|
+
/**
|
|
4090
|
+
* Makes `events.document` the `document` global where there isn't a DOM
|
|
4091
|
+
* one: on iOS and Android, where the polyfills give it a placeholder. In
|
|
4092
|
+
* the web preview and in jsdom tests, `document` stays the browser's, and
|
|
4093
|
+
* only `ownerDocument` and `DOCUMENT` are the hub's.
|
|
4094
|
+
*/
|
|
4095
|
+
declare const installGlobalDocument: (target: Record<string, any>, events: GlobalEvents) => void;
|
|
4096
|
+
/**
|
|
4097
|
+
* The app's `document` and `window` events (see global-events.ts).
|
|
4098
|
+
*/
|
|
4099
|
+
declare const globalEvents: () => GlobalEvents;
|
|
4100
|
+
/**
|
|
4101
|
+
* An element's layout, kept from its `layoutchange` events, so code written
|
|
4102
|
+
* for the DOM can read it synchronously: `getBoundingClientRect()`,
|
|
4103
|
+
* `clientWidth` and friends, and `ResizeObserver`.
|
|
4104
|
+
*
|
|
4105
|
+
* Lynx lays elements out on its own and has no synchronous layout read on
|
|
4106
|
+
* the main thread: the `boundingClientRect` UI method answers later. What it
|
|
4107
|
+
* does have is `layoutchange`, which an element with a listener for it fires
|
|
4108
|
+
* after each layout that moved or resized it, with its box relative to the
|
|
4109
|
+
* LynxView. An element starts listening when something first needs its
|
|
4110
|
+
* layout; until the first event arrives (or the UI method answers), the box
|
|
4111
|
+
* is empty, as a DOM element's is before it's rendered.
|
|
4112
|
+
*/
|
|
4113
|
+
/** An element's box, relative to the LynxView, in px. */
|
|
4114
|
+
type LayoutRect = {
|
|
4115
|
+
left: number;
|
|
4116
|
+
top: number;
|
|
4117
|
+
width: number;
|
|
4118
|
+
height: number;
|
|
4119
|
+
};
|
|
4120
|
+
/** The DOMRect `getBoundingClientRect()` returns. */
|
|
4121
|
+
type LynxDOMRect = {
|
|
4122
|
+
readonly x: number;
|
|
4123
|
+
readonly y: number;
|
|
4124
|
+
readonly width: number;
|
|
4125
|
+
readonly height: number;
|
|
4126
|
+
readonly top: number;
|
|
4127
|
+
readonly right: number;
|
|
4128
|
+
readonly bottom: number;
|
|
4129
|
+
readonly left: number;
|
|
4130
|
+
toJSON(): Omit<LynxDOMRect, 'toJSON'>;
|
|
4131
|
+
};
|
|
4132
|
+
declare const toDOMRect: (rect: LayoutRect | null) => LynxDOMRect;
|
|
4133
|
+
/**
|
|
4134
|
+
* Asks native for a native element's box now, relative to the LynxView: the
|
|
4135
|
+
* `boundingClientRect` UI method. It answers later, with null if the element
|
|
4136
|
+
* has no UI to measure (it was never flushed, or it's gone).
|
|
4137
|
+
*/
|
|
4138
|
+
declare const measureLayout: (element: unknown, callback: (rect: LayoutRect | null) => void) => void;
|
|
4139
|
+
/** What the tracker needs from its element. */
|
|
4140
|
+
type LayoutHost = {
|
|
4141
|
+
/** Adds a listener for one of the element's Lynx events (`bindlayoutchange`). */
|
|
4142
|
+
listen(name: string, listener: (event: any) => void): () => void;
|
|
4143
|
+
/** Asks native for the element's box now (the `boundingClientRect` UI method). */
|
|
4144
|
+
measure(callback: (rect: LayoutRect | null) => void): void;
|
|
4145
|
+
};
|
|
4146
|
+
declare class LayoutTracker {
|
|
4147
|
+
#private;
|
|
4148
|
+
rect: LayoutRect | null;
|
|
4149
|
+
constructor(host: LayoutHost);
|
|
4150
|
+
/**
|
|
4151
|
+
* Listens for the element's layouts from now on. An element already laid
|
|
4152
|
+
* out before this won't fire `layoutchange` again until it changes, so the
|
|
4153
|
+
* box it has now is asked for too.
|
|
4154
|
+
*/
|
|
4155
|
+
start(): void;
|
|
4156
|
+
/**
|
|
4157
|
+
* Calls `observer` with each new box, from the next layout on.
|
|
4158
|
+
*/
|
|
4159
|
+
observe(observer: (rect: LayoutRect) => void): () => void;
|
|
4160
|
+
}
|
|
4161
|
+
declare class LynxElement implements BaseLynxElement {
|
|
4162
|
+
#private;
|
|
4163
|
+
get element(): ElementRef;
|
|
4164
|
+
tagName: string;
|
|
4165
|
+
/**
|
|
4166
|
+
* When true, this element is the root page element and must not be
|
|
4167
|
+
* re-parented (appendChild/insertBefore) or removed from the tree.
|
|
4168
|
+
* Angular calls appendChild/remove as part of normal component lifecycle,
|
|
4169
|
+
* but the page element is the immutable root — moving or removing it
|
|
4170
|
+
* would corrupt the native element tree.
|
|
4171
|
+
*/
|
|
4172
|
+
isRootPageElement: boolean;
|
|
4173
|
+
/**
|
|
4174
|
+
* Virtual tree tracking — used when parent manages children outside the
|
|
4175
|
+
* native element tree (e.g., list manages children via componentAtIndex
|
|
4176
|
+
* callbacks rather than __AppendElement)
|
|
4177
|
+
*/
|
|
4178
|
+
_virtualParent: LynxElement | null;
|
|
4179
|
+
_virtualPrev: LynxElement | null;
|
|
4180
|
+
_virtualNext: LynxElement | null;
|
|
4181
|
+
/**
|
|
4182
|
+
* @internal The canonical wrapper of the element with this unique id, if
|
|
4183
|
+
* it has one: the target of a touch the document heard (see
|
|
4184
|
+
* global-events/native-source.ts), which names the element by its id.
|
|
4185
|
+
*/
|
|
4186
|
+
static byUniqueId(uniqueId: number): LynxElement | undefined;
|
|
4187
|
+
constructor(element: ElementRef);
|
|
4188
|
+
/**
|
|
4189
|
+
* Drops this wrapper's current native id from the registry. Called when the
|
|
3414
4190
|
* native ref is swapped (recreate-on-remount) for the STALE id, and by the
|
|
3415
4191
|
* renderer's destroyNode when Angular tears the element down, so the registry
|
|
3416
4192
|
* doesn't retain wrappers for dead native refs.
|
|
3417
4193
|
*/
|
|
3418
4194
|
deregisterNative(): void;
|
|
4195
|
+
/**
|
|
4196
|
+
* The document stand-in (see global-events), as a DOM element's is its
|
|
4197
|
+
* document. Angular resolves a `document:` or `body:` host listener's
|
|
4198
|
+
* target from it, and a `window:` one from its `defaultView`.
|
|
4199
|
+
*/
|
|
4200
|
+
get ownerDocument(): LynxGlobalDocument;
|
|
3419
4201
|
setProperty(name: string, value: any): void;
|
|
3420
4202
|
/**
|
|
3421
4203
|
* Seeds the cached text for a raw-text element so #recreateSubtree() can
|
|
@@ -3521,79 +4303,1583 @@ declare class LynxElement implements BaseLynxElement {
|
|
|
3521
4303
|
invoke(methodName: string, params?: Record<string, unknown>): void;
|
|
3522
4304
|
animate(keyframes: Record<string, string | number>[], options?: number | LynxAnimationOptions): LynxAnimation;
|
|
3523
4305
|
/**
|
|
3524
|
-
* Angular's renderer.listen() calls this with event names like 'bindtap',
|
|
3525
|
-
* 'catchtouchstart', 'bindscroll', etc. We strip the Lynx event prefix
|
|
3526
|
-
* (bind/catch/capture-bind/capture-catch) to extract the native event name
|
|
3527
|
-
* and determine the event type for __AddEvent. A DOM name Lynx calls
|
|
3528
|
-
* something else (see DOM_EVENT_ALIASES) listens for the Lynx event, so
|
|
3529
|
-
* `(click)`, and Angular's RouterLink with it, runs on a tap.
|
|
3530
|
-
* Other names (e.g. `mouseover`) are ignored: Lynx has no event for them.
|
|
4306
|
+
* Angular's renderer.listen() calls this with event names like 'bindtap',
|
|
4307
|
+
* 'catchtouchstart', 'bindscroll', etc. We strip the Lynx event prefix
|
|
4308
|
+
* (bind/catch/capture-bind/capture-catch) to extract the native event name
|
|
4309
|
+
* and determine the event type for __AddEvent. A DOM name Lynx calls
|
|
4310
|
+
* something else (see DOM_EVENT_ALIASES) listens for the Lynx event, so
|
|
4311
|
+
* `(click)`, and Angular's RouterLink with it, runs on a tap.
|
|
4312
|
+
* Other names (e.g. `mouseover`) are ignored: Lynx has no event for them.
|
|
4313
|
+
*
|
|
4314
|
+
* An element can have any number of listeners for one event, as on the
|
|
4315
|
+
* web: a template's `(bindtap)` next to a directive's host listener for
|
|
4316
|
+
* `click`, say. Native Lynx keeps one handler per event name, so each name
|
|
4317
|
+
* gets one native handler that runs all of them (see #syncNativeHandler).
|
|
4318
|
+
*/
|
|
4319
|
+
addEventListener(name: string, cb: (event: any) => any): () => void;
|
|
4320
|
+
/**
|
|
4321
|
+
* @internal Adds a listener for a Lynx event name (`bindtap`, …) that runs
|
|
4322
|
+
* after the element's other listeners for the event, whenever they were
|
|
4323
|
+
* added. The document's listeners hear the end of a touch from the page
|
|
4324
|
+
* element this way (see global-events/native-source.ts), so they run after
|
|
4325
|
+
* the page's own, the root component's host listeners and `body:` ones,
|
|
4326
|
+
* as a browser runs a document's listeners after its body's.
|
|
4327
|
+
*/
|
|
4328
|
+
addTrailingEventListener(name: string, cb: (event: any) => any): () => void;
|
|
4329
|
+
/**
|
|
4330
|
+
* Removes a listener added with addEventListener, as the DOM method does,
|
|
4331
|
+
* for code that pairs the two on the element itself rather than going
|
|
4332
|
+
* through the renderer's cleanup function. Angular's `@defer` interaction
|
|
4333
|
+
* and hover triggers do, for their `click`, `keydown` and `mouseenter`
|
|
4334
|
+
* listeners; without it, their cleanup would throw. A name Lynx has no
|
|
4335
|
+
* event for was never added, so removing it does nothing.
|
|
4336
|
+
*/
|
|
4337
|
+
removeEventListener(name: string, cb: (event: any) => any): void;
|
|
4338
|
+
/**
|
|
4339
|
+
* Makes `pointerId`'s events this element's until it lifts, as a DOM
|
|
4340
|
+
* element's method does. A Lynx touch always goes to the element it
|
|
4341
|
+
* started on, so this changes only `hasPointerCapture()` and fires
|
|
4342
|
+
* `gotpointercapture` (see pointer-events.ts).
|
|
4343
|
+
*/
|
|
4344
|
+
setPointerCapture(pointerId: number): void;
|
|
4345
|
+
releasePointerCapture(pointerId: number): void;
|
|
4346
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
4347
|
+
/**
|
|
4348
|
+
* The element's box relative to the LynxView, now, as a DOM element's
|
|
4349
|
+
* method answers. Lynx has no synchronous layout read, so this is the box
|
|
4350
|
+
* from the element's last `layoutchange` (see layout.ts): the first call
|
|
4351
|
+
* starts listening, and the box is empty until the element's next layout.
|
|
4352
|
+
* Code that needs it from the start can call `observeLayout()`, or use
|
|
4353
|
+
* `ResizeObserver`. On Lynx for Web it's the DOM element's own.
|
|
4354
|
+
*/
|
|
4355
|
+
getBoundingClientRect(): LynxDOMRect;
|
|
4356
|
+
/**
|
|
4357
|
+
* The element's width, from its last layout (see getBoundingClientRect).
|
|
4358
|
+
*/
|
|
4359
|
+
get clientWidth(): number;
|
|
4360
|
+
get clientHeight(): number;
|
|
4361
|
+
get offsetWidth(): number;
|
|
4362
|
+
get offsetHeight(): number;
|
|
4363
|
+
/**
|
|
4364
|
+
* Calls `observer` with the element's box after each layout that moves or
|
|
4365
|
+
* resizes it, from the next one on. What `ResizeObserver` is built on.
|
|
4366
|
+
* Returns a function that stops it.
|
|
4367
|
+
*/
|
|
4368
|
+
observeLayout(observer: (rect: LayoutRect) => void): () => void;
|
|
4369
|
+
/**
|
|
4370
|
+
* The box from the element's last layout, or null before the first.
|
|
4371
|
+
*/
|
|
4372
|
+
get layoutRect(): LayoutRect | null;
|
|
4373
|
+
}
|
|
4374
|
+
/**
|
|
4375
|
+
* Commits all queued genuine element removals — a free-function wrapper over
|
|
4376
|
+
* `LynxElement.commitPendingRemovals()` so `LynxRendererFactory2.end()` can
|
|
4377
|
+
* drain them (via the lynx-element barrel) right before `__FlushElementTree()`,
|
|
4378
|
+
* keeping removals in the same flush as the cycle's other mutations.
|
|
4379
|
+
*/
|
|
4380
|
+
declare const processPendingRemovals: () => void;
|
|
4381
|
+
/**
|
|
4382
|
+
* Commits this cycle's attribute removals (see LynxElement's
|
|
4383
|
+
* `#removedAttributes`). A free-function wrapper over
|
|
4384
|
+
* `LynxElement.commitPendingAttributeRemovals()` so
|
|
4385
|
+
* `LynxRendererFactory2.end()` can drain them (via the lynx-element barrel)
|
|
4386
|
+
* right after element removals and before `__FlushElementTree()`.
|
|
4387
|
+
*/
|
|
4388
|
+
declare const processPendingAttributeRemovals: () => void;
|
|
4389
|
+
/**
|
|
4390
|
+
* Re-derives positional edge whitespace for every text touched this cycle — a
|
|
4391
|
+
* free-function wrapper over `LynxElement.commitPendingTextNormalization()` so
|
|
4392
|
+
* `LynxRendererFactory2.end()` can drain it (via the lynx-element barrel) right
|
|
4393
|
+
* after removals and before `__FlushElementTree()`, keeping the corrected text in
|
|
4394
|
+
* the same flush as the cycle's other mutations. See #pendingTextNormalization.
|
|
4395
|
+
*/
|
|
4396
|
+
declare const processPendingTextNormalization: () => void;
|
|
4397
|
+
/**
|
|
4398
|
+
* Safety-net flush for native mutations made OUTSIDE a begin()/end() change-
|
|
4399
|
+
* detection cycle. `LynxRendererFactory2.end()` calls `__FlushElementTree()`
|
|
4400
|
+
* once per CD tick, which is what commits (lays out + paints) the cycle's
|
|
4401
|
+
* element mutations. But a lazy-loaded route component is instantiated by
|
|
4402
|
+
* `RouterOutlet` DURING navigation — outside any such cycle — so its freshly
|
|
4403
|
+
* created elements land in the fiber tree yet are never flushed. On-device
|
|
4404
|
+
* symptom: the route's static shell renders, but its `@if`/`@for`/interpolation
|
|
4405
|
+
* content stays invisible until an unrelated CD (e.g. a tap) triggers the next
|
|
4406
|
+
* end() flush. (Bootstrap sidesteps this via native's implicit post-renderPage
|
|
4407
|
+
* flush.) This mirrors the `<list>` path's own guard for the exact same case —
|
|
4408
|
+
* see `LynxListElement.#scheduleUpdate`.
|
|
4409
|
+
*
|
|
4410
|
+
* Called from `LynxDocument`'s element creators, which only run on the main
|
|
4411
|
+
* thread (Angular doesn't run on the background thread), so no thread guard is
|
|
4412
|
+
* needed here. It schedules ONE
|
|
4413
|
+
* coalesced microtask (matching the list guard's `queueMicrotask`, not
|
|
4414
|
+
* `setTimeout` — flushing from a macrotask crashes the native engine), and is a
|
|
4415
|
+
* no-op while:
|
|
4416
|
+
* - inside a CD cycle — end() will flush;
|
|
4417
|
+
* - the first render is pending — native flushes after renderPage, and any
|
|
4418
|
+
* `<list>` defers its own first flush (see isFirstRenderPending()).
|
|
4419
|
+
* The near-no-op cost when nothing is layout-dirty (the core's `need_layout_`
|
|
4420
|
+
* gate) keeps the steady-state overhead negligible.
|
|
4421
|
+
*/
|
|
4422
|
+
declare const scheduleSettleFlush: () => void;
|
|
4423
|
+
/**
|
|
4424
|
+
* Bytes as Lynx's native-module bridge carries them, which has no binary
|
|
4425
|
+
* type: an `ArrayBuffer` arrives as an empty map, a returned `NSData` crashes
|
|
4426
|
+
* the main thread's PrimJS, and a string ends at its first NUL (measured on
|
|
4427
|
+
* Lynx 4.1). So bytes cross as an array of their 32-bit little-endian words,
|
|
4428
|
+
* zero-padded, with the byte count last: `Array.from(new Uint32Array(...))`
|
|
4429
|
+
* builds it at C speed, and every device Lynx runs on is little-endian, so the
|
|
4430
|
+
* words land in memory as the bytes were. The WebGL bridge
|
|
4431
|
+
* (canvas/webgl-bridge.ts) and the bundled-asset reader (bundled-asset.ts)
|
|
4432
|
+
* use it, and the shells' modules read and write it.
|
|
4433
|
+
*/
|
|
4434
|
+
/** Bytes to send. The count goes last because appending is O(1). */
|
|
4435
|
+
declare const toWords: (bytes: Uint8Array) => number[];
|
|
4436
|
+
/**
|
|
4437
|
+
* A list a native module returned, as a plain array of numbers. On iOS, Lynx
|
|
4438
|
+
* hands native arrays back as array-likes that `.map()` reads but a typed
|
|
4439
|
+
* array's constructor sees as empty.
|
|
4440
|
+
*/
|
|
4441
|
+
declare const numbersFrom: (value: unknown) => number[];
|
|
4442
|
+
/** Bytes back from words. */
|
|
4443
|
+
declare const fromWords: (words: unknown) => Uint8Array;
|
|
4444
|
+
/**
|
|
4445
|
+
* The native side of `<canvas>`'s WebGL2 context: the `AngularLynxWebGL`
|
|
4446
|
+
* module that the iOS and Android shells register (`AngularLynxWebGL.m`,
|
|
4447
|
+
* `WebGLModule.kt`), which runs the calls on OpenGL ES 3.0.
|
|
4448
|
+
*
|
|
4449
|
+
* Angular runs on Lynx's main thread, and WebGL is synchronous: a program's
|
|
4450
|
+
* link status, a uniform's location and the like are return values. Lynx's
|
|
4451
|
+
* background-thread `NativeModules` can't answer those, and the relay to them
|
|
4452
|
+
* (background-call.ts) is asynchronous. So the shells turn on Lynx's
|
|
4453
|
+
* main-thread modules (`enableMTSModule`), which main-thread code calls as
|
|
4454
|
+
* `lynx.module(name).invoke(method, ...args)`, synchronously, on the UI
|
|
4455
|
+
* thread, where GL runs.
|
|
4456
|
+
*
|
|
4457
|
+
* A call costs a few microseconds on Android and about 80 on iOS, where Lynx
|
|
4458
|
+
* logs every module call. So the context doesn't make one per GL call: it
|
|
4459
|
+
* records the calls into an array of commands and sends them in one `run`,
|
|
4460
|
+
* once a frame or when a call needs an answer (see LynxWebGL2RenderingContext).
|
|
4461
|
+
*
|
|
4462
|
+
* What crosses the bridge, as measured on Lynx 4.1: numbers, strings, arrays
|
|
4463
|
+
* and plain objects. An `ArrayBuffer` or typed array arrives as an empty map,
|
|
4464
|
+
* a returned `NSData` crashes the main thread's PrimJS, and a string ends at
|
|
4465
|
+
* its first NUL. So bytes (buffer data, pixels, image files) cross as arrays
|
|
4466
|
+
* of 32-bit words, which `Array.from(new Uint32Array(buffer))` builds at C
|
|
4467
|
+
* speed and the native side reads back into memory (see toWords()).
|
|
4468
|
+
*/
|
|
4469
|
+
/** The module's name in both shells. */
|
|
4470
|
+
declare const WEBGL_MODULE_NAME = "AngularLynxWebGL";
|
|
4471
|
+
/** What `create` returns: the drawing buffer the shell made, or why not. */
|
|
4472
|
+
type WebGLCreateResult = {
|
|
4473
|
+
/** The GL context was made: OpenGL ES 3.0 is available. */
|
|
4474
|
+
ok: boolean;
|
|
4475
|
+
/** Why it wasn't, when `ok` is false. */
|
|
4476
|
+
error?: string;
|
|
4477
|
+
};
|
|
4478
|
+
/** What `decodeImage` returns. */
|
|
4479
|
+
type DecodedImage = {
|
|
4480
|
+
width: number;
|
|
4481
|
+
height: number;
|
|
4482
|
+
/** Set instead of the size when the bytes aren't an image the OS decodes. */
|
|
4483
|
+
error?: string;
|
|
4484
|
+
};
|
|
4485
|
+
/**
|
|
4486
|
+
* The module's methods. `run` returns one result per query command in the
|
|
4487
|
+
* batch, in order; void commands return nothing.
|
|
4488
|
+
*/
|
|
4489
|
+
type WebGLBridge = {
|
|
4490
|
+
create(contextId: number, canvasId: string, attributes: Record<string, unknown>): WebGLCreateResult;
|
|
4491
|
+
run(contextId: number, commands: unknown[]): unknown[];
|
|
4492
|
+
destroy(contextId: number): void;
|
|
4493
|
+
decodeImage(imageId: number, bytes: number[], options: Record<string, unknown>): DecodedImage;
|
|
4494
|
+
releaseImage(imageId: number): void;
|
|
4495
|
+
};
|
|
4496
|
+
/**
|
|
4497
|
+
* Replaces the native bridge, for tests: a fake GL that records commands.
|
|
4498
|
+
* `undefined` restores the real one.
|
|
4499
|
+
*/
|
|
4500
|
+
declare const setWebGLBridgeForTesting: (bridge: WebGLBridge | null | undefined) => void;
|
|
4501
|
+
/**
|
|
4502
|
+
* The bridge, or null where there's no WebGL: a host without the module (Lynx
|
|
4503
|
+
* Explorer, an app built before this shell), the web preview (which draws in
|
|
4504
|
+
* the browser's own canvas), and tests.
|
|
4505
|
+
*/
|
|
4506
|
+
declare const getWebGLBridge: () => WebGLBridge | null;
|
|
4507
|
+
/** The bytes a typed array or buffer views, as a Uint8Array over them. */
|
|
4508
|
+
declare const bytesOf: (data: ArrayBufferView | ArrayBuffer, elementOffset?: number, elementLength?: number) => Uint8Array;
|
|
4509
|
+
/**
|
|
4510
|
+
* The WebGL 1 and 2 constants, as WebGL2RenderingContext has them: on the
|
|
4511
|
+
* context, its prototype and the constructor. Taken from TypeScript's
|
|
4512
|
+
* lib.dom.d.ts (WebGLRenderingContextBase and WebGL2RenderingContextBase), the
|
|
4513
|
+
* spec's IDL; regenerate it from there rather than editing by hand.
|
|
4514
|
+
*/
|
|
4515
|
+
declare const WEBGL2_CONSTANTS: {
|
|
4516
|
+
readonly DEPTH_BUFFER_BIT: 256;
|
|
4517
|
+
readonly STENCIL_BUFFER_BIT: 1024;
|
|
4518
|
+
readonly COLOR_BUFFER_BIT: 16384;
|
|
4519
|
+
readonly POINTS: 0;
|
|
4520
|
+
readonly LINES: 1;
|
|
4521
|
+
readonly LINE_LOOP: 2;
|
|
4522
|
+
readonly LINE_STRIP: 3;
|
|
4523
|
+
readonly TRIANGLES: 4;
|
|
4524
|
+
readonly TRIANGLE_STRIP: 5;
|
|
4525
|
+
readonly TRIANGLE_FAN: 6;
|
|
4526
|
+
readonly ZERO: 0;
|
|
4527
|
+
readonly ONE: 1;
|
|
4528
|
+
readonly SRC_COLOR: 768;
|
|
4529
|
+
readonly ONE_MINUS_SRC_COLOR: 769;
|
|
4530
|
+
readonly SRC_ALPHA: 770;
|
|
4531
|
+
readonly ONE_MINUS_SRC_ALPHA: 771;
|
|
4532
|
+
readonly DST_ALPHA: 772;
|
|
4533
|
+
readonly ONE_MINUS_DST_ALPHA: 773;
|
|
4534
|
+
readonly DST_COLOR: 774;
|
|
4535
|
+
readonly ONE_MINUS_DST_COLOR: 775;
|
|
4536
|
+
readonly SRC_ALPHA_SATURATE: 776;
|
|
4537
|
+
readonly FUNC_ADD: 32774;
|
|
4538
|
+
readonly BLEND_EQUATION: 32777;
|
|
4539
|
+
readonly BLEND_EQUATION_RGB: 32777;
|
|
4540
|
+
readonly BLEND_EQUATION_ALPHA: 34877;
|
|
4541
|
+
readonly FUNC_SUBTRACT: 32778;
|
|
4542
|
+
readonly FUNC_REVERSE_SUBTRACT: 32779;
|
|
4543
|
+
readonly BLEND_DST_RGB: 32968;
|
|
4544
|
+
readonly BLEND_SRC_RGB: 32969;
|
|
4545
|
+
readonly BLEND_DST_ALPHA: 32970;
|
|
4546
|
+
readonly BLEND_SRC_ALPHA: 32971;
|
|
4547
|
+
readonly CONSTANT_COLOR: 32769;
|
|
4548
|
+
readonly ONE_MINUS_CONSTANT_COLOR: 32770;
|
|
4549
|
+
readonly CONSTANT_ALPHA: 32771;
|
|
4550
|
+
readonly ONE_MINUS_CONSTANT_ALPHA: 32772;
|
|
4551
|
+
readonly BLEND_COLOR: 32773;
|
|
4552
|
+
readonly ARRAY_BUFFER: 34962;
|
|
4553
|
+
readonly ELEMENT_ARRAY_BUFFER: 34963;
|
|
4554
|
+
readonly ARRAY_BUFFER_BINDING: 34964;
|
|
4555
|
+
readonly ELEMENT_ARRAY_BUFFER_BINDING: 34965;
|
|
4556
|
+
readonly STREAM_DRAW: 35040;
|
|
4557
|
+
readonly STATIC_DRAW: 35044;
|
|
4558
|
+
readonly DYNAMIC_DRAW: 35048;
|
|
4559
|
+
readonly BUFFER_SIZE: 34660;
|
|
4560
|
+
readonly BUFFER_USAGE: 34661;
|
|
4561
|
+
readonly CURRENT_VERTEX_ATTRIB: 34342;
|
|
4562
|
+
readonly FRONT: 1028;
|
|
4563
|
+
readonly BACK: 1029;
|
|
4564
|
+
readonly FRONT_AND_BACK: 1032;
|
|
4565
|
+
readonly CULL_FACE: 2884;
|
|
4566
|
+
readonly BLEND: 3042;
|
|
4567
|
+
readonly DITHER: 3024;
|
|
4568
|
+
readonly STENCIL_TEST: 2960;
|
|
4569
|
+
readonly DEPTH_TEST: 2929;
|
|
4570
|
+
readonly SCISSOR_TEST: 3089;
|
|
4571
|
+
readonly POLYGON_OFFSET_FILL: 32823;
|
|
4572
|
+
readonly SAMPLE_ALPHA_TO_COVERAGE: 32926;
|
|
4573
|
+
readonly SAMPLE_COVERAGE: 32928;
|
|
4574
|
+
readonly NO_ERROR: 0;
|
|
4575
|
+
readonly INVALID_ENUM: 1280;
|
|
4576
|
+
readonly INVALID_VALUE: 1281;
|
|
4577
|
+
readonly INVALID_OPERATION: 1282;
|
|
4578
|
+
readonly OUT_OF_MEMORY: 1285;
|
|
4579
|
+
readonly CW: 2304;
|
|
4580
|
+
readonly CCW: 2305;
|
|
4581
|
+
readonly LINE_WIDTH: 2849;
|
|
4582
|
+
readonly ALIASED_POINT_SIZE_RANGE: 33901;
|
|
4583
|
+
readonly ALIASED_LINE_WIDTH_RANGE: 33902;
|
|
4584
|
+
readonly CULL_FACE_MODE: 2885;
|
|
4585
|
+
readonly FRONT_FACE: 2886;
|
|
4586
|
+
readonly DEPTH_RANGE: 2928;
|
|
4587
|
+
readonly DEPTH_WRITEMASK: 2930;
|
|
4588
|
+
readonly DEPTH_CLEAR_VALUE: 2931;
|
|
4589
|
+
readonly DEPTH_FUNC: 2932;
|
|
4590
|
+
readonly STENCIL_CLEAR_VALUE: 2961;
|
|
4591
|
+
readonly STENCIL_FUNC: 2962;
|
|
4592
|
+
readonly STENCIL_FAIL: 2964;
|
|
4593
|
+
readonly STENCIL_PASS_DEPTH_FAIL: 2965;
|
|
4594
|
+
readonly STENCIL_PASS_DEPTH_PASS: 2966;
|
|
4595
|
+
readonly STENCIL_REF: 2967;
|
|
4596
|
+
readonly STENCIL_VALUE_MASK: 2963;
|
|
4597
|
+
readonly STENCIL_WRITEMASK: 2968;
|
|
4598
|
+
readonly STENCIL_BACK_FUNC: 34816;
|
|
4599
|
+
readonly STENCIL_BACK_FAIL: 34817;
|
|
4600
|
+
readonly STENCIL_BACK_PASS_DEPTH_FAIL: 34818;
|
|
4601
|
+
readonly STENCIL_BACK_PASS_DEPTH_PASS: 34819;
|
|
4602
|
+
readonly STENCIL_BACK_REF: 36003;
|
|
4603
|
+
readonly STENCIL_BACK_VALUE_MASK: 36004;
|
|
4604
|
+
readonly STENCIL_BACK_WRITEMASK: 36005;
|
|
4605
|
+
readonly VIEWPORT: 2978;
|
|
4606
|
+
readonly SCISSOR_BOX: 3088;
|
|
4607
|
+
readonly COLOR_CLEAR_VALUE: 3106;
|
|
4608
|
+
readonly COLOR_WRITEMASK: 3107;
|
|
4609
|
+
readonly UNPACK_ALIGNMENT: 3317;
|
|
4610
|
+
readonly PACK_ALIGNMENT: 3333;
|
|
4611
|
+
readonly MAX_TEXTURE_SIZE: 3379;
|
|
4612
|
+
readonly MAX_VIEWPORT_DIMS: 3386;
|
|
4613
|
+
readonly SUBPIXEL_BITS: 3408;
|
|
4614
|
+
readonly RED_BITS: 3410;
|
|
4615
|
+
readonly GREEN_BITS: 3411;
|
|
4616
|
+
readonly BLUE_BITS: 3412;
|
|
4617
|
+
readonly ALPHA_BITS: 3413;
|
|
4618
|
+
readonly DEPTH_BITS: 3414;
|
|
4619
|
+
readonly STENCIL_BITS: 3415;
|
|
4620
|
+
readonly POLYGON_OFFSET_UNITS: 10752;
|
|
4621
|
+
readonly POLYGON_OFFSET_FACTOR: 32824;
|
|
4622
|
+
readonly TEXTURE_BINDING_2D: 32873;
|
|
4623
|
+
readonly SAMPLE_BUFFERS: 32936;
|
|
4624
|
+
readonly SAMPLES: 32937;
|
|
4625
|
+
readonly SAMPLE_COVERAGE_VALUE: 32938;
|
|
4626
|
+
readonly SAMPLE_COVERAGE_INVERT: 32939;
|
|
4627
|
+
readonly COMPRESSED_TEXTURE_FORMATS: 34467;
|
|
4628
|
+
readonly DONT_CARE: 4352;
|
|
4629
|
+
readonly FASTEST: 4353;
|
|
4630
|
+
readonly NICEST: 4354;
|
|
4631
|
+
readonly GENERATE_MIPMAP_HINT: 33170;
|
|
4632
|
+
readonly BYTE: 5120;
|
|
4633
|
+
readonly UNSIGNED_BYTE: 5121;
|
|
4634
|
+
readonly SHORT: 5122;
|
|
4635
|
+
readonly UNSIGNED_SHORT: 5123;
|
|
4636
|
+
readonly INT: 5124;
|
|
4637
|
+
readonly UNSIGNED_INT: 5125;
|
|
4638
|
+
readonly FLOAT: 5126;
|
|
4639
|
+
readonly DEPTH_COMPONENT: 6402;
|
|
4640
|
+
readonly ALPHA: 6406;
|
|
4641
|
+
readonly RGB: 6407;
|
|
4642
|
+
readonly RGBA: 6408;
|
|
4643
|
+
readonly LUMINANCE: 6409;
|
|
4644
|
+
readonly LUMINANCE_ALPHA: 6410;
|
|
4645
|
+
readonly UNSIGNED_SHORT_4_4_4_4: 32819;
|
|
4646
|
+
readonly UNSIGNED_SHORT_5_5_5_1: 32820;
|
|
4647
|
+
readonly UNSIGNED_SHORT_5_6_5: 33635;
|
|
4648
|
+
readonly FRAGMENT_SHADER: 35632;
|
|
4649
|
+
readonly VERTEX_SHADER: 35633;
|
|
4650
|
+
readonly MAX_VERTEX_ATTRIBS: 34921;
|
|
4651
|
+
readonly MAX_VERTEX_UNIFORM_VECTORS: 36347;
|
|
4652
|
+
readonly MAX_VARYING_VECTORS: 36348;
|
|
4653
|
+
readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: 35661;
|
|
4654
|
+
readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: 35660;
|
|
4655
|
+
readonly MAX_TEXTURE_IMAGE_UNITS: 34930;
|
|
4656
|
+
readonly MAX_FRAGMENT_UNIFORM_VECTORS: 36349;
|
|
4657
|
+
readonly SHADER_TYPE: 35663;
|
|
4658
|
+
readonly DELETE_STATUS: 35712;
|
|
4659
|
+
readonly LINK_STATUS: 35714;
|
|
4660
|
+
readonly VALIDATE_STATUS: 35715;
|
|
4661
|
+
readonly ATTACHED_SHADERS: 35717;
|
|
4662
|
+
readonly ACTIVE_UNIFORMS: 35718;
|
|
4663
|
+
readonly ACTIVE_ATTRIBUTES: 35721;
|
|
4664
|
+
readonly SHADING_LANGUAGE_VERSION: 35724;
|
|
4665
|
+
readonly CURRENT_PROGRAM: 35725;
|
|
4666
|
+
readonly NEVER: 512;
|
|
4667
|
+
readonly LESS: 513;
|
|
4668
|
+
readonly EQUAL: 514;
|
|
4669
|
+
readonly LEQUAL: 515;
|
|
4670
|
+
readonly GREATER: 516;
|
|
4671
|
+
readonly NOTEQUAL: 517;
|
|
4672
|
+
readonly GEQUAL: 518;
|
|
4673
|
+
readonly ALWAYS: 519;
|
|
4674
|
+
readonly KEEP: 7680;
|
|
4675
|
+
readonly REPLACE: 7681;
|
|
4676
|
+
readonly INCR: 7682;
|
|
4677
|
+
readonly DECR: 7683;
|
|
4678
|
+
readonly INVERT: 5386;
|
|
4679
|
+
readonly INCR_WRAP: 34055;
|
|
4680
|
+
readonly DECR_WRAP: 34056;
|
|
4681
|
+
readonly VENDOR: 7936;
|
|
4682
|
+
readonly RENDERER: 7937;
|
|
4683
|
+
readonly VERSION: 7938;
|
|
4684
|
+
readonly NEAREST: 9728;
|
|
4685
|
+
readonly LINEAR: 9729;
|
|
4686
|
+
readonly NEAREST_MIPMAP_NEAREST: 9984;
|
|
4687
|
+
readonly LINEAR_MIPMAP_NEAREST: 9985;
|
|
4688
|
+
readonly NEAREST_MIPMAP_LINEAR: 9986;
|
|
4689
|
+
readonly LINEAR_MIPMAP_LINEAR: 9987;
|
|
4690
|
+
readonly TEXTURE_MAG_FILTER: 10240;
|
|
4691
|
+
readonly TEXTURE_MIN_FILTER: 10241;
|
|
4692
|
+
readonly TEXTURE_WRAP_S: 10242;
|
|
4693
|
+
readonly TEXTURE_WRAP_T: 10243;
|
|
4694
|
+
readonly TEXTURE_2D: 3553;
|
|
4695
|
+
readonly TEXTURE: 5890;
|
|
4696
|
+
readonly TEXTURE_CUBE_MAP: 34067;
|
|
4697
|
+
readonly TEXTURE_BINDING_CUBE_MAP: 34068;
|
|
4698
|
+
readonly TEXTURE_CUBE_MAP_POSITIVE_X: 34069;
|
|
4699
|
+
readonly TEXTURE_CUBE_MAP_NEGATIVE_X: 34070;
|
|
4700
|
+
readonly TEXTURE_CUBE_MAP_POSITIVE_Y: 34071;
|
|
4701
|
+
readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072;
|
|
4702
|
+
readonly TEXTURE_CUBE_MAP_POSITIVE_Z: 34073;
|
|
4703
|
+
readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074;
|
|
4704
|
+
readonly MAX_CUBE_MAP_TEXTURE_SIZE: 34076;
|
|
4705
|
+
readonly TEXTURE0: 33984;
|
|
4706
|
+
readonly TEXTURE1: 33985;
|
|
4707
|
+
readonly TEXTURE2: 33986;
|
|
4708
|
+
readonly TEXTURE3: 33987;
|
|
4709
|
+
readonly TEXTURE4: 33988;
|
|
4710
|
+
readonly TEXTURE5: 33989;
|
|
4711
|
+
readonly TEXTURE6: 33990;
|
|
4712
|
+
readonly TEXTURE7: 33991;
|
|
4713
|
+
readonly TEXTURE8: 33992;
|
|
4714
|
+
readonly TEXTURE9: 33993;
|
|
4715
|
+
readonly TEXTURE10: 33994;
|
|
4716
|
+
readonly TEXTURE11: 33995;
|
|
4717
|
+
readonly TEXTURE12: 33996;
|
|
4718
|
+
readonly TEXTURE13: 33997;
|
|
4719
|
+
readonly TEXTURE14: 33998;
|
|
4720
|
+
readonly TEXTURE15: 33999;
|
|
4721
|
+
readonly TEXTURE16: 34000;
|
|
4722
|
+
readonly TEXTURE17: 34001;
|
|
4723
|
+
readonly TEXTURE18: 34002;
|
|
4724
|
+
readonly TEXTURE19: 34003;
|
|
4725
|
+
readonly TEXTURE20: 34004;
|
|
4726
|
+
readonly TEXTURE21: 34005;
|
|
4727
|
+
readonly TEXTURE22: 34006;
|
|
4728
|
+
readonly TEXTURE23: 34007;
|
|
4729
|
+
readonly TEXTURE24: 34008;
|
|
4730
|
+
readonly TEXTURE25: 34009;
|
|
4731
|
+
readonly TEXTURE26: 34010;
|
|
4732
|
+
readonly TEXTURE27: 34011;
|
|
4733
|
+
readonly TEXTURE28: 34012;
|
|
4734
|
+
readonly TEXTURE29: 34013;
|
|
4735
|
+
readonly TEXTURE30: 34014;
|
|
4736
|
+
readonly TEXTURE31: 34015;
|
|
4737
|
+
readonly ACTIVE_TEXTURE: 34016;
|
|
4738
|
+
readonly REPEAT: 10497;
|
|
4739
|
+
readonly CLAMP_TO_EDGE: 33071;
|
|
4740
|
+
readonly MIRRORED_REPEAT: 33648;
|
|
4741
|
+
readonly FLOAT_VEC2: 35664;
|
|
4742
|
+
readonly FLOAT_VEC3: 35665;
|
|
4743
|
+
readonly FLOAT_VEC4: 35666;
|
|
4744
|
+
readonly INT_VEC2: 35667;
|
|
4745
|
+
readonly INT_VEC3: 35668;
|
|
4746
|
+
readonly INT_VEC4: 35669;
|
|
4747
|
+
readonly BOOL: 35670;
|
|
4748
|
+
readonly BOOL_VEC2: 35671;
|
|
4749
|
+
readonly BOOL_VEC3: 35672;
|
|
4750
|
+
readonly BOOL_VEC4: 35673;
|
|
4751
|
+
readonly FLOAT_MAT2: 35674;
|
|
4752
|
+
readonly FLOAT_MAT3: 35675;
|
|
4753
|
+
readonly FLOAT_MAT4: 35676;
|
|
4754
|
+
readonly SAMPLER_2D: 35678;
|
|
4755
|
+
readonly SAMPLER_CUBE: 35680;
|
|
4756
|
+
readonly VERTEX_ATTRIB_ARRAY_ENABLED: 34338;
|
|
4757
|
+
readonly VERTEX_ATTRIB_ARRAY_SIZE: 34339;
|
|
4758
|
+
readonly VERTEX_ATTRIB_ARRAY_STRIDE: 34340;
|
|
4759
|
+
readonly VERTEX_ATTRIB_ARRAY_TYPE: 34341;
|
|
4760
|
+
readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: 34922;
|
|
4761
|
+
readonly VERTEX_ATTRIB_ARRAY_POINTER: 34373;
|
|
4762
|
+
readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 34975;
|
|
4763
|
+
readonly IMPLEMENTATION_COLOR_READ_TYPE: 35738;
|
|
4764
|
+
readonly IMPLEMENTATION_COLOR_READ_FORMAT: 35739;
|
|
4765
|
+
readonly COMPILE_STATUS: 35713;
|
|
4766
|
+
readonly LOW_FLOAT: 36336;
|
|
4767
|
+
readonly MEDIUM_FLOAT: 36337;
|
|
4768
|
+
readonly HIGH_FLOAT: 36338;
|
|
4769
|
+
readonly LOW_INT: 36339;
|
|
4770
|
+
readonly MEDIUM_INT: 36340;
|
|
4771
|
+
readonly HIGH_INT: 36341;
|
|
4772
|
+
readonly FRAMEBUFFER: 36160;
|
|
4773
|
+
readonly RENDERBUFFER: 36161;
|
|
4774
|
+
readonly RGBA4: 32854;
|
|
4775
|
+
readonly RGB5_A1: 32855;
|
|
4776
|
+
readonly RGBA8: 32856;
|
|
4777
|
+
readonly RGB565: 36194;
|
|
4778
|
+
readonly DEPTH_COMPONENT16: 33189;
|
|
4779
|
+
readonly STENCIL_INDEX8: 36168;
|
|
4780
|
+
readonly DEPTH_STENCIL: 34041;
|
|
4781
|
+
readonly RENDERBUFFER_WIDTH: 36162;
|
|
4782
|
+
readonly RENDERBUFFER_HEIGHT: 36163;
|
|
4783
|
+
readonly RENDERBUFFER_INTERNAL_FORMAT: 36164;
|
|
4784
|
+
readonly RENDERBUFFER_RED_SIZE: 36176;
|
|
4785
|
+
readonly RENDERBUFFER_GREEN_SIZE: 36177;
|
|
4786
|
+
readonly RENDERBUFFER_BLUE_SIZE: 36178;
|
|
4787
|
+
readonly RENDERBUFFER_ALPHA_SIZE: 36179;
|
|
4788
|
+
readonly RENDERBUFFER_DEPTH_SIZE: 36180;
|
|
4789
|
+
readonly RENDERBUFFER_STENCIL_SIZE: 36181;
|
|
4790
|
+
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 36048;
|
|
4791
|
+
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 36049;
|
|
4792
|
+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 36050;
|
|
4793
|
+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 36051;
|
|
4794
|
+
readonly COLOR_ATTACHMENT0: 36064;
|
|
4795
|
+
readonly DEPTH_ATTACHMENT: 36096;
|
|
4796
|
+
readonly STENCIL_ATTACHMENT: 36128;
|
|
4797
|
+
readonly DEPTH_STENCIL_ATTACHMENT: 33306;
|
|
4798
|
+
readonly NONE: 0;
|
|
4799
|
+
readonly FRAMEBUFFER_COMPLETE: 36053;
|
|
4800
|
+
readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 36054;
|
|
4801
|
+
readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 36055;
|
|
4802
|
+
readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 36057;
|
|
4803
|
+
readonly FRAMEBUFFER_UNSUPPORTED: 36061;
|
|
4804
|
+
readonly FRAMEBUFFER_BINDING: 36006;
|
|
4805
|
+
readonly RENDERBUFFER_BINDING: 36007;
|
|
4806
|
+
readonly MAX_RENDERBUFFER_SIZE: 34024;
|
|
4807
|
+
readonly INVALID_FRAMEBUFFER_OPERATION: 1286;
|
|
4808
|
+
readonly UNPACK_FLIP_Y_WEBGL: 37440;
|
|
4809
|
+
readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: 37441;
|
|
4810
|
+
readonly CONTEXT_LOST_WEBGL: 37442;
|
|
4811
|
+
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: 37443;
|
|
4812
|
+
readonly BROWSER_DEFAULT_WEBGL: 37444;
|
|
4813
|
+
readonly READ_BUFFER: 3074;
|
|
4814
|
+
readonly UNPACK_ROW_LENGTH: 3314;
|
|
4815
|
+
readonly UNPACK_SKIP_ROWS: 3315;
|
|
4816
|
+
readonly UNPACK_SKIP_PIXELS: 3316;
|
|
4817
|
+
readonly PACK_ROW_LENGTH: 3330;
|
|
4818
|
+
readonly PACK_SKIP_ROWS: 3331;
|
|
4819
|
+
readonly PACK_SKIP_PIXELS: 3332;
|
|
4820
|
+
readonly COLOR: 6144;
|
|
4821
|
+
readonly DEPTH: 6145;
|
|
4822
|
+
readonly STENCIL: 6146;
|
|
4823
|
+
readonly RED: 6403;
|
|
4824
|
+
readonly RGB8: 32849;
|
|
4825
|
+
readonly RGB10_A2: 32857;
|
|
4826
|
+
readonly TEXTURE_BINDING_3D: 32874;
|
|
4827
|
+
readonly UNPACK_SKIP_IMAGES: 32877;
|
|
4828
|
+
readonly UNPACK_IMAGE_HEIGHT: 32878;
|
|
4829
|
+
readonly TEXTURE_3D: 32879;
|
|
4830
|
+
readonly TEXTURE_WRAP_R: 32882;
|
|
4831
|
+
readonly MAX_3D_TEXTURE_SIZE: 32883;
|
|
4832
|
+
readonly UNSIGNED_INT_2_10_10_10_REV: 33640;
|
|
4833
|
+
readonly MAX_ELEMENTS_VERTICES: 33000;
|
|
4834
|
+
readonly MAX_ELEMENTS_INDICES: 33001;
|
|
4835
|
+
readonly TEXTURE_MIN_LOD: 33082;
|
|
4836
|
+
readonly TEXTURE_MAX_LOD: 33083;
|
|
4837
|
+
readonly TEXTURE_BASE_LEVEL: 33084;
|
|
4838
|
+
readonly TEXTURE_MAX_LEVEL: 33085;
|
|
4839
|
+
readonly MIN: 32775;
|
|
4840
|
+
readonly MAX: 32776;
|
|
4841
|
+
readonly DEPTH_COMPONENT24: 33190;
|
|
4842
|
+
readonly MAX_TEXTURE_LOD_BIAS: 34045;
|
|
4843
|
+
readonly TEXTURE_COMPARE_MODE: 34892;
|
|
4844
|
+
readonly TEXTURE_COMPARE_FUNC: 34893;
|
|
4845
|
+
readonly CURRENT_QUERY: 34917;
|
|
4846
|
+
readonly QUERY_RESULT: 34918;
|
|
4847
|
+
readonly QUERY_RESULT_AVAILABLE: 34919;
|
|
4848
|
+
readonly STREAM_READ: 35041;
|
|
4849
|
+
readonly STREAM_COPY: 35042;
|
|
4850
|
+
readonly STATIC_READ: 35045;
|
|
4851
|
+
readonly STATIC_COPY: 35046;
|
|
4852
|
+
readonly DYNAMIC_READ: 35049;
|
|
4853
|
+
readonly DYNAMIC_COPY: 35050;
|
|
4854
|
+
readonly MAX_DRAW_BUFFERS: 34852;
|
|
4855
|
+
readonly DRAW_BUFFER0: 34853;
|
|
4856
|
+
readonly DRAW_BUFFER1: 34854;
|
|
4857
|
+
readonly DRAW_BUFFER2: 34855;
|
|
4858
|
+
readonly DRAW_BUFFER3: 34856;
|
|
4859
|
+
readonly DRAW_BUFFER4: 34857;
|
|
4860
|
+
readonly DRAW_BUFFER5: 34858;
|
|
4861
|
+
readonly DRAW_BUFFER6: 34859;
|
|
4862
|
+
readonly DRAW_BUFFER7: 34860;
|
|
4863
|
+
readonly DRAW_BUFFER8: 34861;
|
|
4864
|
+
readonly DRAW_BUFFER9: 34862;
|
|
4865
|
+
readonly DRAW_BUFFER10: 34863;
|
|
4866
|
+
readonly DRAW_BUFFER11: 34864;
|
|
4867
|
+
readonly DRAW_BUFFER12: 34865;
|
|
4868
|
+
readonly DRAW_BUFFER13: 34866;
|
|
4869
|
+
readonly DRAW_BUFFER14: 34867;
|
|
4870
|
+
readonly DRAW_BUFFER15: 34868;
|
|
4871
|
+
readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: 35657;
|
|
4872
|
+
readonly MAX_VERTEX_UNIFORM_COMPONENTS: 35658;
|
|
4873
|
+
readonly SAMPLER_3D: 35679;
|
|
4874
|
+
readonly SAMPLER_2D_SHADOW: 35682;
|
|
4875
|
+
readonly FRAGMENT_SHADER_DERIVATIVE_HINT: 35723;
|
|
4876
|
+
readonly PIXEL_PACK_BUFFER: 35051;
|
|
4877
|
+
readonly PIXEL_UNPACK_BUFFER: 35052;
|
|
4878
|
+
readonly PIXEL_PACK_BUFFER_BINDING: 35053;
|
|
4879
|
+
readonly PIXEL_UNPACK_BUFFER_BINDING: 35055;
|
|
4880
|
+
readonly SRGB: 35904;
|
|
4881
|
+
readonly SRGB8: 35905;
|
|
4882
|
+
readonly SRGB8_ALPHA8: 35907;
|
|
4883
|
+
readonly COMPARE_REF_TO_TEXTURE: 34894;
|
|
4884
|
+
readonly RGBA32F: 34836;
|
|
4885
|
+
readonly RGB32F: 34837;
|
|
4886
|
+
readonly RGBA16F: 34842;
|
|
4887
|
+
readonly RGB16F: 34843;
|
|
4888
|
+
readonly VERTEX_ATTRIB_ARRAY_INTEGER: 35069;
|
|
4889
|
+
readonly MAX_ARRAY_TEXTURE_LAYERS: 35071;
|
|
4890
|
+
readonly MIN_PROGRAM_TEXEL_OFFSET: 35076;
|
|
4891
|
+
readonly MAX_PROGRAM_TEXEL_OFFSET: 35077;
|
|
4892
|
+
readonly MAX_VARYING_COMPONENTS: 35659;
|
|
4893
|
+
readonly TEXTURE_2D_ARRAY: 35866;
|
|
4894
|
+
readonly TEXTURE_BINDING_2D_ARRAY: 35869;
|
|
4895
|
+
readonly R11F_G11F_B10F: 35898;
|
|
4896
|
+
readonly UNSIGNED_INT_10F_11F_11F_REV: 35899;
|
|
4897
|
+
readonly RGB9_E5: 35901;
|
|
4898
|
+
readonly UNSIGNED_INT_5_9_9_9_REV: 35902;
|
|
4899
|
+
readonly TRANSFORM_FEEDBACK_BUFFER_MODE: 35967;
|
|
4900
|
+
readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 35968;
|
|
4901
|
+
readonly TRANSFORM_FEEDBACK_VARYINGS: 35971;
|
|
4902
|
+
readonly TRANSFORM_FEEDBACK_BUFFER_START: 35972;
|
|
4903
|
+
readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: 35973;
|
|
4904
|
+
readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 35976;
|
|
4905
|
+
readonly RASTERIZER_DISCARD: 35977;
|
|
4906
|
+
readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 35978;
|
|
4907
|
+
readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 35979;
|
|
4908
|
+
readonly INTERLEAVED_ATTRIBS: 35980;
|
|
4909
|
+
readonly SEPARATE_ATTRIBS: 35981;
|
|
4910
|
+
readonly TRANSFORM_FEEDBACK_BUFFER: 35982;
|
|
4911
|
+
readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: 35983;
|
|
4912
|
+
readonly RGBA32UI: 36208;
|
|
4913
|
+
readonly RGB32UI: 36209;
|
|
4914
|
+
readonly RGBA16UI: 36214;
|
|
4915
|
+
readonly RGB16UI: 36215;
|
|
4916
|
+
readonly RGBA8UI: 36220;
|
|
4917
|
+
readonly RGB8UI: 36221;
|
|
4918
|
+
readonly RGBA32I: 36226;
|
|
4919
|
+
readonly RGB32I: 36227;
|
|
4920
|
+
readonly RGBA16I: 36232;
|
|
4921
|
+
readonly RGB16I: 36233;
|
|
4922
|
+
readonly RGBA8I: 36238;
|
|
4923
|
+
readonly RGB8I: 36239;
|
|
4924
|
+
readonly RED_INTEGER: 36244;
|
|
4925
|
+
readonly RGB_INTEGER: 36248;
|
|
4926
|
+
readonly RGBA_INTEGER: 36249;
|
|
4927
|
+
readonly SAMPLER_2D_ARRAY: 36289;
|
|
4928
|
+
readonly SAMPLER_2D_ARRAY_SHADOW: 36292;
|
|
4929
|
+
readonly SAMPLER_CUBE_SHADOW: 36293;
|
|
4930
|
+
readonly UNSIGNED_INT_VEC2: 36294;
|
|
4931
|
+
readonly UNSIGNED_INT_VEC3: 36295;
|
|
4932
|
+
readonly UNSIGNED_INT_VEC4: 36296;
|
|
4933
|
+
readonly INT_SAMPLER_2D: 36298;
|
|
4934
|
+
readonly INT_SAMPLER_3D: 36299;
|
|
4935
|
+
readonly INT_SAMPLER_CUBE: 36300;
|
|
4936
|
+
readonly INT_SAMPLER_2D_ARRAY: 36303;
|
|
4937
|
+
readonly UNSIGNED_INT_SAMPLER_2D: 36306;
|
|
4938
|
+
readonly UNSIGNED_INT_SAMPLER_3D: 36307;
|
|
4939
|
+
readonly UNSIGNED_INT_SAMPLER_CUBE: 36308;
|
|
4940
|
+
readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: 36311;
|
|
4941
|
+
readonly DEPTH_COMPONENT32F: 36012;
|
|
4942
|
+
readonly DEPTH32F_STENCIL8: 36013;
|
|
4943
|
+
readonly FLOAT_32_UNSIGNED_INT_24_8_REV: 36269;
|
|
4944
|
+
readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 33296;
|
|
4945
|
+
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 33297;
|
|
4946
|
+
readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: 33298;
|
|
4947
|
+
readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 33299;
|
|
4948
|
+
readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 33300;
|
|
4949
|
+
readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 33301;
|
|
4950
|
+
readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 33302;
|
|
4951
|
+
readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 33303;
|
|
4952
|
+
readonly FRAMEBUFFER_DEFAULT: 33304;
|
|
4953
|
+
readonly UNSIGNED_INT_24_8: 34042;
|
|
4954
|
+
readonly DEPTH24_STENCIL8: 35056;
|
|
4955
|
+
readonly UNSIGNED_NORMALIZED: 35863;
|
|
4956
|
+
readonly DRAW_FRAMEBUFFER_BINDING: 36006;
|
|
4957
|
+
readonly READ_FRAMEBUFFER: 36008;
|
|
4958
|
+
readonly DRAW_FRAMEBUFFER: 36009;
|
|
4959
|
+
readonly READ_FRAMEBUFFER_BINDING: 36010;
|
|
4960
|
+
readonly RENDERBUFFER_SAMPLES: 36011;
|
|
4961
|
+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 36052;
|
|
4962
|
+
readonly MAX_COLOR_ATTACHMENTS: 36063;
|
|
4963
|
+
readonly COLOR_ATTACHMENT1: 36065;
|
|
4964
|
+
readonly COLOR_ATTACHMENT2: 36066;
|
|
4965
|
+
readonly COLOR_ATTACHMENT3: 36067;
|
|
4966
|
+
readonly COLOR_ATTACHMENT4: 36068;
|
|
4967
|
+
readonly COLOR_ATTACHMENT5: 36069;
|
|
4968
|
+
readonly COLOR_ATTACHMENT6: 36070;
|
|
4969
|
+
readonly COLOR_ATTACHMENT7: 36071;
|
|
4970
|
+
readonly COLOR_ATTACHMENT8: 36072;
|
|
4971
|
+
readonly COLOR_ATTACHMENT9: 36073;
|
|
4972
|
+
readonly COLOR_ATTACHMENT10: 36074;
|
|
4973
|
+
readonly COLOR_ATTACHMENT11: 36075;
|
|
4974
|
+
readonly COLOR_ATTACHMENT12: 36076;
|
|
4975
|
+
readonly COLOR_ATTACHMENT13: 36077;
|
|
4976
|
+
readonly COLOR_ATTACHMENT14: 36078;
|
|
4977
|
+
readonly COLOR_ATTACHMENT15: 36079;
|
|
4978
|
+
readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 36182;
|
|
4979
|
+
readonly MAX_SAMPLES: 36183;
|
|
4980
|
+
readonly HALF_FLOAT: 5131;
|
|
4981
|
+
readonly RG: 33319;
|
|
4982
|
+
readonly RG_INTEGER: 33320;
|
|
4983
|
+
readonly R8: 33321;
|
|
4984
|
+
readonly RG8: 33323;
|
|
4985
|
+
readonly R16F: 33325;
|
|
4986
|
+
readonly R32F: 33326;
|
|
4987
|
+
readonly RG16F: 33327;
|
|
4988
|
+
readonly RG32F: 33328;
|
|
4989
|
+
readonly R8I: 33329;
|
|
4990
|
+
readonly R8UI: 33330;
|
|
4991
|
+
readonly R16I: 33331;
|
|
4992
|
+
readonly R16UI: 33332;
|
|
4993
|
+
readonly R32I: 33333;
|
|
4994
|
+
readonly R32UI: 33334;
|
|
4995
|
+
readonly RG8I: 33335;
|
|
4996
|
+
readonly RG8UI: 33336;
|
|
4997
|
+
readonly RG16I: 33337;
|
|
4998
|
+
readonly RG16UI: 33338;
|
|
4999
|
+
readonly RG32I: 33339;
|
|
5000
|
+
readonly RG32UI: 33340;
|
|
5001
|
+
readonly VERTEX_ARRAY_BINDING: 34229;
|
|
5002
|
+
readonly R8_SNORM: 36756;
|
|
5003
|
+
readonly RG8_SNORM: 36757;
|
|
5004
|
+
readonly RGB8_SNORM: 36758;
|
|
5005
|
+
readonly RGBA8_SNORM: 36759;
|
|
5006
|
+
readonly SIGNED_NORMALIZED: 36764;
|
|
5007
|
+
readonly COPY_READ_BUFFER: 36662;
|
|
5008
|
+
readonly COPY_WRITE_BUFFER: 36663;
|
|
5009
|
+
readonly COPY_READ_BUFFER_BINDING: 36662;
|
|
5010
|
+
readonly COPY_WRITE_BUFFER_BINDING: 36663;
|
|
5011
|
+
readonly UNIFORM_BUFFER: 35345;
|
|
5012
|
+
readonly UNIFORM_BUFFER_BINDING: 35368;
|
|
5013
|
+
readonly UNIFORM_BUFFER_START: 35369;
|
|
5014
|
+
readonly UNIFORM_BUFFER_SIZE: 35370;
|
|
5015
|
+
readonly MAX_VERTEX_UNIFORM_BLOCKS: 35371;
|
|
5016
|
+
readonly MAX_FRAGMENT_UNIFORM_BLOCKS: 35373;
|
|
5017
|
+
readonly MAX_COMBINED_UNIFORM_BLOCKS: 35374;
|
|
5018
|
+
readonly MAX_UNIFORM_BUFFER_BINDINGS: 35375;
|
|
5019
|
+
readonly MAX_UNIFORM_BLOCK_SIZE: 35376;
|
|
5020
|
+
readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 35377;
|
|
5021
|
+
readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 35379;
|
|
5022
|
+
readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: 35380;
|
|
5023
|
+
readonly ACTIVE_UNIFORM_BLOCKS: 35382;
|
|
5024
|
+
readonly UNIFORM_TYPE: 35383;
|
|
5025
|
+
readonly UNIFORM_SIZE: 35384;
|
|
5026
|
+
readonly UNIFORM_BLOCK_INDEX: 35386;
|
|
5027
|
+
readonly UNIFORM_OFFSET: 35387;
|
|
5028
|
+
readonly UNIFORM_ARRAY_STRIDE: 35388;
|
|
5029
|
+
readonly UNIFORM_MATRIX_STRIDE: 35389;
|
|
5030
|
+
readonly UNIFORM_IS_ROW_MAJOR: 35390;
|
|
5031
|
+
readonly UNIFORM_BLOCK_BINDING: 35391;
|
|
5032
|
+
readonly UNIFORM_BLOCK_DATA_SIZE: 35392;
|
|
5033
|
+
readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: 35394;
|
|
5034
|
+
readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 35395;
|
|
5035
|
+
readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 35396;
|
|
5036
|
+
readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 35398;
|
|
5037
|
+
readonly INVALID_INDEX: 4294967295;
|
|
5038
|
+
readonly MAX_VERTEX_OUTPUT_COMPONENTS: 37154;
|
|
5039
|
+
readonly MAX_FRAGMENT_INPUT_COMPONENTS: 37157;
|
|
5040
|
+
readonly MAX_SERVER_WAIT_TIMEOUT: 37137;
|
|
5041
|
+
readonly OBJECT_TYPE: 37138;
|
|
5042
|
+
readonly SYNC_CONDITION: 37139;
|
|
5043
|
+
readonly SYNC_STATUS: 37140;
|
|
5044
|
+
readonly SYNC_FLAGS: 37141;
|
|
5045
|
+
readonly SYNC_FENCE: 37142;
|
|
5046
|
+
readonly SYNC_GPU_COMMANDS_COMPLETE: 37143;
|
|
5047
|
+
readonly UNSIGNALED: 37144;
|
|
5048
|
+
readonly SIGNALED: 37145;
|
|
5049
|
+
readonly ALREADY_SIGNALED: 37146;
|
|
5050
|
+
readonly TIMEOUT_EXPIRED: 37147;
|
|
5051
|
+
readonly CONDITION_SATISFIED: 37148;
|
|
5052
|
+
readonly WAIT_FAILED: 37149;
|
|
5053
|
+
readonly SYNC_FLUSH_COMMANDS_BIT: 1;
|
|
5054
|
+
readonly VERTEX_ATTRIB_ARRAY_DIVISOR: 35070;
|
|
5055
|
+
readonly ANY_SAMPLES_PASSED: 35887;
|
|
5056
|
+
readonly ANY_SAMPLES_PASSED_CONSERVATIVE: 36202;
|
|
5057
|
+
readonly SAMPLER_BINDING: 35097;
|
|
5058
|
+
readonly RGB10_A2UI: 36975;
|
|
5059
|
+
readonly INT_2_10_10_10_REV: 36255;
|
|
5060
|
+
readonly TRANSFORM_FEEDBACK: 36386;
|
|
5061
|
+
readonly TRANSFORM_FEEDBACK_PAUSED: 36387;
|
|
5062
|
+
readonly TRANSFORM_FEEDBACK_ACTIVE: 36388;
|
|
5063
|
+
readonly TRANSFORM_FEEDBACK_BINDING: 36389;
|
|
5064
|
+
readonly TEXTURE_IMMUTABLE_FORMAT: 37167;
|
|
5065
|
+
readonly MAX_ELEMENT_INDEX: 36203;
|
|
5066
|
+
readonly TEXTURE_IMMUTABLE_LEVELS: 33503;
|
|
5067
|
+
readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 37447;
|
|
5068
|
+
};
|
|
5069
|
+
/**
|
|
5070
|
+
* WebGL's object types, as the native context hands them out. Each is a
|
|
5071
|
+
* handle: an id the JavaScript side picks when the object is created, which
|
|
5072
|
+
* the shell maps to the GL name it made. Picking ids here means `createBuffer()`
|
|
5073
|
+
* and friends return at once, with no round trip to native.
|
|
5074
|
+
*
|
|
5075
|
+
* Ids are unique across every kind of object in a context, and never reused,
|
|
5076
|
+
* so a stale handle can't reach a newer object.
|
|
5077
|
+
*/
|
|
5078
|
+
declare class WebGLObjectHandle {
|
|
5079
|
+
/** @internal */ readonly id: number;
|
|
5080
|
+
/** @internal The context that made it, which alone may use it. */
|
|
5081
|
+
readonly owner: object;
|
|
5082
|
+
/** Set by delete*(): WebGL ignores a deleted object, and is*() is false. */
|
|
5083
|
+
deleted: boolean;
|
|
5084
|
+
constructor( /** @internal */ id: number,
|
|
5085
|
+
/** @internal The context that made it, which alone may use it. */
|
|
5086
|
+
owner: object);
|
|
5087
|
+
}
|
|
5088
|
+
declare class LynxWebGLBuffer extends WebGLObjectHandle {}
|
|
5089
|
+
declare class LynxWebGLFramebuffer extends WebGLObjectHandle {}
|
|
5090
|
+
declare class LynxWebGLRenderbuffer extends WebGLObjectHandle {}
|
|
5091
|
+
declare class LynxWebGLTexture extends WebGLObjectHandle {}
|
|
5092
|
+
declare class LynxWebGLVertexArrayObject extends WebGLObjectHandle {
|
|
5093
|
+
/**
|
|
5094
|
+
* The ELEMENT_ARRAY_BUFFER binding is part of a vertex array, so
|
|
5095
|
+
* `getParameter(ELEMENT_ARRAY_BUFFER_BINDING)` answers from the bound one.
|
|
5096
|
+
*/
|
|
5097
|
+
elementArrayBuffer: LynxWebGLBuffer | null;
|
|
5098
|
+
}
|
|
5099
|
+
declare class LynxWebGLQuery extends WebGLObjectHandle {}
|
|
5100
|
+
declare class LynxWebGLSampler extends WebGLObjectHandle {}
|
|
5101
|
+
declare class LynxWebGLSync extends WebGLObjectHandle {}
|
|
5102
|
+
declare class LynxWebGLTransformFeedback extends WebGLObjectHandle {}
|
|
5103
|
+
declare class LynxWebGLShader extends WebGLObjectHandle {
|
|
5104
|
+
readonly type: number;
|
|
5105
|
+
source: string;
|
|
5106
|
+
/**
|
|
5107
|
+
* The compile status and log, fetched from native once after each
|
|
5108
|
+
* `compileShader` (see LynxWebGL2RenderingContext.#shaderInfo).
|
|
5109
|
+
*/
|
|
5110
|
+
info: {
|
|
5111
|
+
compiled: boolean;
|
|
5112
|
+
log: string;
|
|
5113
|
+
} | null;
|
|
5114
|
+
constructor(id: number, owner: object, type: number);
|
|
5115
|
+
}
|
|
5116
|
+
/** One of `getProgramInfo`'s active uniforms or attributes. */
|
|
5117
|
+
type ActiveVariable = [name: string, size: number, type: number, location: number];
|
|
5118
|
+
/**
|
|
5119
|
+
* A program's link results and reflection, fetched in one call after each
|
|
5120
|
+
* `linkProgram` instead of one call per `getActiveUniform` and
|
|
5121
|
+
* `getUniformLocation`: three.js asks for every uniform of every program.
|
|
5122
|
+
*/
|
|
5123
|
+
type ProgramInfo = {
|
|
5124
|
+
linked: boolean;
|
|
5125
|
+
log: string;
|
|
5126
|
+
uniforms: ActiveVariable[];
|
|
5127
|
+
attributes: ActiveVariable[];
|
|
5128
|
+
uniformBlocks: number;
|
|
5129
|
+
transformFeedbackVaryings: number;
|
|
5130
|
+
};
|
|
5131
|
+
declare class LynxWebGLProgram extends WebGLObjectHandle {
|
|
5132
|
+
shaders: LynxWebGLShader[];
|
|
5133
|
+
info: ProgramInfo | null;
|
|
5134
|
+
/** Validation's result, which only validateProgram() updates. */
|
|
5135
|
+
validated: boolean;
|
|
5136
|
+
/** Uniform locations by name, for names reflection didn't list. */
|
|
5137
|
+
locations: Map<string, LynxWebGLUniformLocation | null>;
|
|
5138
|
+
/** Bumped by each link, which invalidates the old locations. */
|
|
5139
|
+
linkCount: number;
|
|
5140
|
+
}
|
|
5141
|
+
/** A uniform's location: opaque to the app, the GL location to native. */
|
|
5142
|
+
declare class LynxWebGLUniformLocation {
|
|
5143
|
+
/** @internal */ readonly program: LynxWebGLProgram;
|
|
5144
|
+
/** @internal */ readonly location: number;
|
|
5145
|
+
/** @internal */ readonly linkCount: number;
|
|
5146
|
+
constructor( /** @internal */ program: LynxWebGLProgram, /** @internal */ location: number, /** @internal */ linkCount: number);
|
|
5147
|
+
}
|
|
5148
|
+
declare class LynxWebGLActiveInfo {
|
|
5149
|
+
readonly name: string;
|
|
5150
|
+
readonly size: number;
|
|
5151
|
+
readonly type: number;
|
|
5152
|
+
constructor(name: string, size: number, type: number);
|
|
5153
|
+
}
|
|
5154
|
+
declare class LynxWebGLShaderPrecisionFormat {
|
|
5155
|
+
readonly rangeMin: number;
|
|
5156
|
+
readonly rangeMax: number;
|
|
5157
|
+
readonly precision: number;
|
|
5158
|
+
constructor(rangeMin: number, rangeMax: number, precision: number);
|
|
5159
|
+
}
|
|
5160
|
+
/** The `<canvas>` a context draws into, as the context needs it. */
|
|
5161
|
+
type WebGLCanvasHost = {
|
|
5162
|
+
readonly width: number;
|
|
5163
|
+
readonly height: number;
|
|
5164
|
+
/** Fires `webglcontextlost` and the like, which three.js listens for. */
|
|
5165
|
+
dispatchContextEvent(type: string): boolean;
|
|
5166
|
+
};
|
|
5167
|
+
/** WebGLContextAttributes, with WebGL's defaults filled in. */
|
|
5168
|
+
type LynxWebGLContextAttributes = {
|
|
5169
|
+
alpha: boolean;
|
|
5170
|
+
antialias: boolean;
|
|
5171
|
+
depth: boolean;
|
|
5172
|
+
desynchronized: boolean;
|
|
5173
|
+
failIfMajorPerformanceCaveat: boolean;
|
|
5174
|
+
powerPreference: 'default' | 'high-performance' | 'low-power';
|
|
5175
|
+
premultipliedAlpha: boolean;
|
|
5176
|
+
preserveDrawingBuffer: boolean;
|
|
5177
|
+
stencil: boolean;
|
|
5178
|
+
};
|
|
5179
|
+
declare const contextAttributesFrom: (requested: Partial<LynxWebGLContextAttributes> | undefined) => LynxWebGLContextAttributes;
|
|
5180
|
+
type NumberList = ArrayLike<number> & {
|
|
5181
|
+
slice?: unknown;
|
|
5182
|
+
subarray?: unknown;
|
|
5183
|
+
};
|
|
5184
|
+
/** Bytes per pixel of a format and type. */
|
|
5185
|
+
declare const pixelSize: (format: number, type: number) => number;
|
|
5186
|
+
/**
|
|
5187
|
+
* `<canvas>`'s `getContext('webgl2')` on Lynx: the WebGL2RenderingContext API
|
|
5188
|
+
* three.js and other WebGL libraries draw with, run on the shell's OpenGL ES
|
|
5189
|
+
* 3.0 through the `AngularLynxWebGL` module (see webgl-bridge.ts).
|
|
5190
|
+
*
|
|
5191
|
+
* Calls that return nothing are recorded, not sent: `run` sends them all at
|
|
5192
|
+
* once at the end of the task (a microtask), when a call needs an answer from
|
|
5193
|
+
* the driver, or when many have piled up. So a frame of three.js, a few
|
|
5194
|
+
* hundred calls, costs one bridge call. Calls that need an answer send the
|
|
5195
|
+
* recorded ones first, so the driver sees everything in order.
|
|
5196
|
+
*
|
|
5197
|
+
* Most answers don't need the driver at all:
|
|
5198
|
+
* - The limits (every `MAX_*` parameter and the like), the shader precisions
|
|
5199
|
+
* and the extensions are fetched in one call when the context is made.
|
|
5200
|
+
* - Bindings (`getParameter(ARRAY_BUFFER_BINDING)` and the rest) are kept
|
|
5201
|
+
* here, as the objects the app passed, which the driver can't give back.
|
|
5202
|
+
* - A program's link status, log, active uniforms and attributes and their
|
|
5203
|
+
* locations come in one call after each link (`programInfo`): three.js asks
|
|
5204
|
+
* for each of them for every program it builds.
|
|
5205
|
+
*
|
|
5206
|
+
* What WebGL adds to GLES, the context or the shell adds:
|
|
5207
|
+
* - The default framebuffer (`bindFramebuffer(FRAMEBUFFER, null)`) is an
|
|
5208
|
+
* offscreen framebuffer the shell made at the canvas's `width` and
|
|
5209
|
+
* `height`, which it copies to the screen after each frame that drew to it
|
|
5210
|
+
* (the `present` command, sent when a task drew to it).
|
|
5211
|
+
* - UNPACK_FLIP_Y_WEBGL and UNPACK_PREMULTIPLY_ALPHA_WEBGL: the shell flips
|
|
5212
|
+
* and premultiplies an image's pixels as it uploads them, and the context
|
|
5213
|
+
* does it to typed-array data before sending it.
|
|
5214
|
+
* - Images: `texImage2D` with an ImageBitmap or an `<img>` uploads pixels the
|
|
5215
|
+
* shell decoded and kept (see image.ts), by id.
|
|
5216
|
+
*
|
|
5217
|
+
* Not there: context loss and restore (only `WEBGL_lose_context`'s loss,
|
|
5218
|
+
* which three.js calls on dispose), a `<canvas>` or video as a texture
|
|
5219
|
+
* source, and object answers from `getVertexAttrib` and `getIndexedParameter`
|
|
5220
|
+
* (they return null).
|
|
5221
|
+
*/
|
|
5222
|
+
declare class LynxWebGL2RenderingContext {
|
|
5223
|
+
#private;
|
|
5224
|
+
readonly canvas: WebGLCanvasHost;
|
|
5225
|
+
/** three.js sets these from `outputColorSpace`; the shell draws in sRGB. */
|
|
5226
|
+
drawingBufferColorSpace: string;
|
|
5227
|
+
unpackColorSpace: string;
|
|
5228
|
+
constructor(bridge: WebGLBridge, contextId: number, canvas: WebGLCanvasHost, attributes: LynxWebGLContextAttributes);
|
|
5229
|
+
/**
|
|
5230
|
+
* --- The context ---------------------------------------------------------
|
|
5231
|
+
*/
|
|
5232
|
+
get drawingBufferWidth(): number;
|
|
5233
|
+
get drawingBufferHeight(): number;
|
|
5234
|
+
/**
|
|
5235
|
+
* @internal The canvas's width or height changed.
|
|
5236
|
+
*/
|
|
5237
|
+
resize(width: number, height: number): void;
|
|
5238
|
+
/**
|
|
5239
|
+
* @internal The canvas left the page for good: free the GL context.
|
|
5240
|
+
*/
|
|
5241
|
+
destroy(): void;
|
|
5242
|
+
getContextAttributes(): LynxWebGLContextAttributes | null;
|
|
5243
|
+
isContextLost(): boolean;
|
|
5244
|
+
makeXRCompatible(): Promise<void>;
|
|
5245
|
+
getSupportedExtensions(): string[] | null;
|
|
5246
|
+
getExtension(name: string): object | null;
|
|
5247
|
+
getError(): number;
|
|
5248
|
+
/**
|
|
5249
|
+
* --- State ---------------------------------------------------------------
|
|
5250
|
+
*/
|
|
5251
|
+
getParameter(pname: number): unknown;
|
|
5252
|
+
isEnabled(cap: number): boolean;
|
|
5253
|
+
enable(cap: number): void;
|
|
5254
|
+
disable(cap: number): void;
|
|
5255
|
+
activeTexture(texture: number): void;
|
|
5256
|
+
blendColor(red: number, green: number, blue: number, alpha: number): void;
|
|
5257
|
+
blendEquation(mode: number): void;
|
|
5258
|
+
blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
|
|
5259
|
+
blendFunc(sfactor: number, dfactor: number): void;
|
|
5260
|
+
blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
|
|
5261
|
+
clearColor(red: number, green: number, blue: number, alpha: number): void;
|
|
5262
|
+
clearDepth(depth: number): void;
|
|
5263
|
+
clearStencil(s: number): void;
|
|
5264
|
+
colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
|
|
5265
|
+
cullFace(mode: number): void;
|
|
5266
|
+
depthFunc(func: number): void;
|
|
5267
|
+
depthMask(flag: boolean): void;
|
|
5268
|
+
depthRange(zNear: number, zFar: number): void;
|
|
5269
|
+
frontFace(mode: number): void;
|
|
5270
|
+
hint(target: number, mode: number): void;
|
|
5271
|
+
lineWidth(width: number): void;
|
|
5272
|
+
pixelStorei(pname: number, param: number | boolean): void;
|
|
5273
|
+
polygonOffset(factor: number, units: number): void;
|
|
5274
|
+
sampleCoverage(value: number, invert: boolean): void;
|
|
5275
|
+
scissor(x: number, y: number, width: number, height: number): void;
|
|
5276
|
+
stencilFunc(func: number, ref: number, mask: number): void;
|
|
5277
|
+
stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
|
|
5278
|
+
stencilMask(mask: number): void;
|
|
5279
|
+
stencilMaskSeparate(face: number, mask: number): void;
|
|
5280
|
+
stencilOp(fail: number, zfail: number, zpass: number): void;
|
|
5281
|
+
stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
|
|
5282
|
+
viewport(x: number, y: number, width: number, height: number): void;
|
|
5283
|
+
getShaderPrecisionFormat(shadertype: number, precisiontype: number): LynxWebGLShaderPrecisionFormat | null;
|
|
5284
|
+
/**
|
|
5285
|
+
* --- Buffers -------------------------------------------------------------
|
|
5286
|
+
*/
|
|
5287
|
+
createBuffer(): LynxWebGLBuffer;
|
|
5288
|
+
deleteBuffer(buffer: LynxWebGLBuffer | null): void;
|
|
5289
|
+
isBuffer(buffer: LynxWebGLBuffer | null): boolean;
|
|
5290
|
+
bindBuffer(target: number, buffer: LynxWebGLBuffer | null): void;
|
|
5291
|
+
bindBufferBase(target: number, index: number, buffer: LynxWebGLBuffer | null): void;
|
|
5292
|
+
bindBufferRange(target: number, index: number, buffer: LynxWebGLBuffer | null, offset: number, size: number): void;
|
|
5293
|
+
bufferData(target: number, sizeOrData: number | ArrayBufferView | ArrayBuffer | null, usage: number, srcOffset?: number, length?: number): void;
|
|
5294
|
+
bufferSubData(target: number, dstByteOffset: number, srcData: ArrayBufferView | ArrayBuffer, srcOffset?: number, length?: number): void;
|
|
5295
|
+
copyBufferSubData(readTarget: number, writeTarget: number, readOffset: number, writeOffset: number, size: number): void;
|
|
5296
|
+
getBufferParameter(target: number, pname: number): unknown;
|
|
5297
|
+
getBufferSubData(target: number, srcByteOffset: number, dstBuffer: ArrayBufferView, dstOffset?: number, length?: number): void;
|
|
5298
|
+
/**
|
|
5299
|
+
* --- Vertex arrays and attributes ---------------------------------------
|
|
5300
|
+
*/
|
|
5301
|
+
createVertexArray(): LynxWebGLVertexArrayObject;
|
|
5302
|
+
deleteVertexArray(vertexArray: LynxWebGLVertexArrayObject | null): void;
|
|
5303
|
+
isVertexArray(vertexArray: LynxWebGLVertexArrayObject | null): boolean;
|
|
5304
|
+
bindVertexArray(vertexArray: LynxWebGLVertexArrayObject | null): void;
|
|
5305
|
+
enableVertexAttribArray(index: number): void;
|
|
5306
|
+
disableVertexAttribArray(index: number): void;
|
|
5307
|
+
vertexAttribPointer(index: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
|
|
5308
|
+
vertexAttribIPointer(index: number, size: number, type: number, stride: number, offset: number): void;
|
|
5309
|
+
vertexAttribDivisor(index: number, divisor: number): void;
|
|
5310
|
+
vertexAttrib1f(index: number, x: number): void;
|
|
5311
|
+
vertexAttrib2f(index: number, x: number, y: number): void;
|
|
5312
|
+
vertexAttrib3f(index: number, x: number, y: number, z: number): void;
|
|
5313
|
+
vertexAttrib4f(index: number, x: number, y: number, z: number, w: number): void;
|
|
5314
|
+
vertexAttrib1fv(index: number, values: ArrayLike<number>): void;
|
|
5315
|
+
vertexAttrib2fv(index: number, values: ArrayLike<number>): void;
|
|
5316
|
+
vertexAttrib3fv(index: number, values: ArrayLike<number>): void;
|
|
5317
|
+
vertexAttrib4fv(index: number, values: ArrayLike<number>): void;
|
|
5318
|
+
vertexAttribI4i(index: number, x: number, y: number, z: number, w: number): void;
|
|
5319
|
+
vertexAttribI4iv(index: number, values: ArrayLike<number>): void;
|
|
5320
|
+
vertexAttribI4ui(index: number, x: number, y: number, z: number, w: number): void;
|
|
5321
|
+
vertexAttribI4uiv(index: number, values: ArrayLike<number>): void;
|
|
5322
|
+
getVertexAttrib(index: number, pname: number): unknown;
|
|
5323
|
+
getVertexAttribOffset(index: number, pname: number): number;
|
|
5324
|
+
/**
|
|
5325
|
+
* --- Drawing -------------------------------------------------------------
|
|
5326
|
+
*/
|
|
5327
|
+
clear(mask: number): void;
|
|
5328
|
+
clearBufferfv(buffer: number, drawbuffer: number, values: NumberList, srcOffset?: number): void;
|
|
5329
|
+
clearBufferiv(buffer: number, drawbuffer: number, values: NumberList, srcOffset?: number): void;
|
|
5330
|
+
clearBufferuiv(buffer: number, drawbuffer: number, values: NumberList, srcOffset?: number): void;
|
|
5331
|
+
clearBufferfi(buffer: number, drawbuffer: number, depth: number, stencil: number): void;
|
|
5332
|
+
drawArrays(mode: number, first: number, count: number): void;
|
|
5333
|
+
drawArraysInstanced(mode: number, first: number, count: number, instanceCount: number): void;
|
|
5334
|
+
drawElements(mode: number, count: number, type: number, offset: number): void;
|
|
5335
|
+
drawElementsInstanced(mode: number, count: number, type: number, offset: number, instanceCount: number): void;
|
|
5336
|
+
drawRangeElements(mode: number, start: number, end: number, count: number, type: number, offset: number): void;
|
|
5337
|
+
drawBuffers(buffers: ArrayLike<number>): void;
|
|
5338
|
+
readBuffer(src: number): void;
|
|
5339
|
+
finish(): void;
|
|
5340
|
+
flush(): void;
|
|
5341
|
+
/**
|
|
5342
|
+
* --- Framebuffers and renderbuffers -------------------------------------
|
|
5343
|
+
*/
|
|
5344
|
+
createFramebuffer(): LynxWebGLFramebuffer;
|
|
5345
|
+
deleteFramebuffer(framebuffer: LynxWebGLFramebuffer | null): void;
|
|
5346
|
+
isFramebuffer(framebuffer: LynxWebGLFramebuffer | null): boolean;
|
|
5347
|
+
bindFramebuffer(target: number, framebuffer: LynxWebGLFramebuffer | null): void;
|
|
5348
|
+
framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: LynxWebGLRenderbuffer | null): void;
|
|
5349
|
+
framebufferTexture2D(target: number, attachment: number, textarget: number, texture: LynxWebGLTexture | null, level: number): void;
|
|
5350
|
+
framebufferTextureLayer(target: number, attachment: number, texture: LynxWebGLTexture | null, level: number, layer: number): void;
|
|
5351
|
+
checkFramebufferStatus(target: number): number;
|
|
5352
|
+
getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): unknown;
|
|
5353
|
+
blitFramebuffer(srcX0: number, srcY0: number, srcX1: number, srcY1: number, dstX0: number, dstY0: number, dstX1: number, dstY1: number, mask: number, filter: number): void;
|
|
5354
|
+
invalidateFramebuffer(target: number, attachments: ArrayLike<number>): void;
|
|
5355
|
+
invalidateSubFramebuffer(target: number, attachments: ArrayLike<number>, x: number, y: number, width: number, height: number): void;
|
|
5356
|
+
createRenderbuffer(): LynxWebGLRenderbuffer;
|
|
5357
|
+
deleteRenderbuffer(renderbuffer: LynxWebGLRenderbuffer | null): void;
|
|
5358
|
+
isRenderbuffer(renderbuffer: LynxWebGLRenderbuffer | null): boolean;
|
|
5359
|
+
bindRenderbuffer(target: number, renderbuffer: LynxWebGLRenderbuffer | null): void;
|
|
5360
|
+
renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
|
|
5361
|
+
renderbufferStorageMultisample(target: number, samples: number, internalformat: number, width: number, height: number): void;
|
|
5362
|
+
getRenderbufferParameter(target: number, pname: number): unknown;
|
|
5363
|
+
getInternalformatParameter(target: number, internalformat: number, pname: number): Int32Array | null;
|
|
5364
|
+
readPixels(x: number, y: number, width: number, height: number, format: number, type: number, destination: ArrayBufferView | number | null, dstOffset?: number): void;
|
|
5365
|
+
/**
|
|
5366
|
+
* --- Textures and samplers ----------------------------------------------
|
|
5367
|
+
*/
|
|
5368
|
+
createTexture(): LynxWebGLTexture;
|
|
5369
|
+
deleteTexture(texture: LynxWebGLTexture | null): void;
|
|
5370
|
+
isTexture(texture: LynxWebGLTexture | null): boolean;
|
|
5371
|
+
bindTexture(target: number, texture: LynxWebGLTexture | null): void;
|
|
5372
|
+
texParameterf(target: number, pname: number, param: number): void;
|
|
5373
|
+
texParameteri(target: number, pname: number, param: number): void;
|
|
5374
|
+
getTexParameter(target: number, pname: number): unknown;
|
|
5375
|
+
texStorage2D(target: number, levels: number, internalformat: number, width: number, height: number): void;
|
|
5376
|
+
texStorage3D(target: number, levels: number, internalformat: number, width: number, height: number, depth: number): void;
|
|
5377
|
+
generateMipmap(target: number): void;
|
|
5378
|
+
/**
|
|
5379
|
+
* WebGL2's texImage2D overloads:
|
|
5380
|
+
* (target, level, internalformat, format, type, source)
|
|
5381
|
+
* (target, level, internalformat, width, height, border, format, type,
|
|
5382
|
+
* pixels | pboOffset | source [, srcOffset])
|
|
5383
|
+
*/
|
|
5384
|
+
texImage2D(...args: unknown[]): void;
|
|
5385
|
+
/**
|
|
5386
|
+
* (target, level, xoffset, yoffset, format, type, source)
|
|
5387
|
+
* (target, level, xoffset, yoffset, width, height, format, type,
|
|
5388
|
+
* pixels | pboOffset | source [, srcOffset])
|
|
5389
|
+
*/
|
|
5390
|
+
texSubImage2D(...args: unknown[]): void;
|
|
5391
|
+
texImage3D(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: unknown, srcOffset?: number): void;
|
|
5392
|
+
texSubImage3D(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, width: number, height: number, depth: number, format: number, type: number, source: unknown, srcOffset?: number): void;
|
|
5393
|
+
/**
|
|
5394
|
+
* (…, border, imageSize, pboOffset) with a PIXEL_UNPACK_BUFFER bound, else
|
|
5395
|
+
* (…, border, srcData [, srcOffset [, srcLengthOverride]]).
|
|
5396
|
+
*/
|
|
5397
|
+
compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, ...rest: unknown[]): void;
|
|
5398
|
+
compressedTexImage3D(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, ...rest: unknown[]): void;
|
|
5399
|
+
compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, ...rest: unknown[]): void;
|
|
5400
|
+
compressedTexSubImage3D(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, width: number, height: number, depth: number, format: number, ...rest: unknown[]): void;
|
|
5401
|
+
copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
|
|
5402
|
+
copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
|
|
5403
|
+
copyTexSubImage3D(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, x: number, y: number, width: number, height: number): void;
|
|
5404
|
+
createSampler(): LynxWebGLSampler;
|
|
5405
|
+
deleteSampler(sampler: LynxWebGLSampler | null): void;
|
|
5406
|
+
isSampler(sampler: LynxWebGLSampler | null): boolean;
|
|
5407
|
+
bindSampler(unit: number, sampler: LynxWebGLSampler | null): void;
|
|
5408
|
+
samplerParameteri(sampler: LynxWebGLSampler, pname: number, param: number): void;
|
|
5409
|
+
samplerParameterf(sampler: LynxWebGLSampler, pname: number, param: number): void;
|
|
5410
|
+
getSamplerParameter(sampler: LynxWebGLSampler, pname: number): unknown;
|
|
5411
|
+
/**
|
|
5412
|
+
* --- Shaders and programs -----------------------------------------------
|
|
5413
|
+
*/
|
|
5414
|
+
createShader(type: number): LynxWebGLShader | null;
|
|
5415
|
+
deleteShader(shader: LynxWebGLShader | null): void;
|
|
5416
|
+
isShader(shader: LynxWebGLShader | null): boolean;
|
|
5417
|
+
shaderSource(shader: LynxWebGLShader, source: string): void;
|
|
5418
|
+
getShaderSource(shader: LynxWebGLShader): string | null;
|
|
5419
|
+
compileShader(shader: LynxWebGLShader): void;
|
|
5420
|
+
getShaderParameter(shader: LynxWebGLShader, pname: number): unknown;
|
|
5421
|
+
getShaderInfoLog(shader: LynxWebGLShader): string | null;
|
|
5422
|
+
createProgram(): LynxWebGLProgram;
|
|
5423
|
+
deleteProgram(program: LynxWebGLProgram | null): void;
|
|
5424
|
+
isProgram(program: LynxWebGLProgram | null): boolean;
|
|
5425
|
+
attachShader(program: LynxWebGLProgram, shader: LynxWebGLShader): void;
|
|
5426
|
+
detachShader(program: LynxWebGLProgram, shader: LynxWebGLShader): void;
|
|
5427
|
+
getAttachedShaders(program: LynxWebGLProgram): LynxWebGLShader[] | null;
|
|
5428
|
+
bindAttribLocation(program: LynxWebGLProgram, index: number, name: string): void;
|
|
5429
|
+
linkProgram(program: LynxWebGLProgram): void;
|
|
5430
|
+
validateProgram(program: LynxWebGLProgram): void;
|
|
5431
|
+
useProgram(program: LynxWebGLProgram | null): void;
|
|
5432
|
+
getProgramParameter(program: LynxWebGLProgram, pname: number): unknown;
|
|
5433
|
+
getProgramInfoLog(program: LynxWebGLProgram): string | null;
|
|
5434
|
+
getActiveUniform(program: LynxWebGLProgram, index: number): LynxWebGLActiveInfo | null;
|
|
5435
|
+
getActiveAttrib(program: LynxWebGLProgram, index: number): LynxWebGLActiveInfo | null;
|
|
5436
|
+
getUniformLocation(program: LynxWebGLProgram, name: string): LynxWebGLUniformLocation | null;
|
|
5437
|
+
getAttribLocation(program: LynxWebGLProgram, name: string): number;
|
|
5438
|
+
getFragDataLocation(program: LynxWebGLProgram, name: string): number;
|
|
5439
|
+
getUniform(program: LynxWebGLProgram, location: LynxWebGLUniformLocation): unknown;
|
|
5440
|
+
getUniformBlockIndex(program: LynxWebGLProgram, uniformBlockName: string): number;
|
|
5441
|
+
uniformBlockBinding(program: LynxWebGLProgram, uniformBlockIndex: number, uniformBlockBinding: number): void;
|
|
5442
|
+
getActiveUniformBlockName(program: LynxWebGLProgram, uniformBlockIndex: number): string | null;
|
|
5443
|
+
getActiveUniformBlockParameter(program: LynxWebGLProgram, uniformBlockIndex: number, pname: number): unknown;
|
|
5444
|
+
getActiveUniforms(program: LynxWebGLProgram, uniformIndices: ArrayLike<number>, pname: number): unknown;
|
|
5445
|
+
getUniformIndices(program: LynxWebGLProgram, uniformNames: string[]): number[] | null;
|
|
5446
|
+
transformFeedbackVaryings(program: LynxWebGLProgram, varyings: string[], bufferMode: number): void;
|
|
5447
|
+
getTransformFeedbackVarying(program: LynxWebGLProgram, index: number): LynxWebGLActiveInfo | null;
|
|
5448
|
+
uniform1f(location: LynxWebGLUniformLocation | null, x: number): void;
|
|
5449
|
+
uniform2f(location: LynxWebGLUniformLocation | null, x: number, y: number): void;
|
|
5450
|
+
uniform3f(location: LynxWebGLUniformLocation | null, x: number, y: number, z: number): void;
|
|
5451
|
+
uniform4f(location: LynxWebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
|
|
5452
|
+
uniform1i(location: LynxWebGLUniformLocation | null, x: number): void;
|
|
5453
|
+
uniform2i(location: LynxWebGLUniformLocation | null, x: number, y: number): void;
|
|
5454
|
+
uniform3i(location: LynxWebGLUniformLocation | null, x: number, y: number, z: number): void;
|
|
5455
|
+
uniform4i(location: LynxWebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
|
|
5456
|
+
uniform1ui(location: LynxWebGLUniformLocation | null, x: number): void;
|
|
5457
|
+
uniform2ui(location: LynxWebGLUniformLocation | null, x: number, y: number): void;
|
|
5458
|
+
uniform3ui(location: LynxWebGLUniformLocation | null, x: number, y: number, z: number): void;
|
|
5459
|
+
uniform4ui(location: LynxWebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
|
|
5460
|
+
uniform1fv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5461
|
+
uniform2fv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5462
|
+
uniform3fv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5463
|
+
uniform4fv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5464
|
+
uniform1iv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5465
|
+
uniform2iv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5466
|
+
uniform3iv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5467
|
+
uniform4iv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5468
|
+
uniform1uiv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5469
|
+
uniform2uiv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5470
|
+
uniform3uiv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5471
|
+
uniform4uiv(location: LynxWebGLUniformLocation | null, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5472
|
+
uniformMatrix2fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5473
|
+
uniformMatrix3fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5474
|
+
uniformMatrix4fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5475
|
+
uniformMatrix2x3fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5476
|
+
uniformMatrix3x2fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5477
|
+
uniformMatrix2x4fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5478
|
+
uniformMatrix4x2fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5479
|
+
uniformMatrix3x4fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5480
|
+
uniformMatrix4x3fv(location: LynxWebGLUniformLocation | null, transpose: boolean, data: NumberList, srcOffset?: number, srcLength?: number): void;
|
|
5481
|
+
/**
|
|
5482
|
+
* --- Queries, syncs and transform feedback ------------------------------
|
|
5483
|
+
*/
|
|
5484
|
+
createQuery(): LynxWebGLQuery;
|
|
5485
|
+
deleteQuery(query: LynxWebGLQuery | null): void;
|
|
5486
|
+
isQuery(query: LynxWebGLQuery | null): boolean;
|
|
5487
|
+
beginQuery(target: number, query: LynxWebGLQuery): void;
|
|
5488
|
+
endQuery(target: number): void;
|
|
5489
|
+
getQuery(target: number, pname: number): LynxWebGLQuery | null;
|
|
5490
|
+
getQueryParameter(query: LynxWebGLQuery, pname: number): unknown;
|
|
5491
|
+
fenceSync(condition: number, flags: number): LynxWebGLSync;
|
|
5492
|
+
deleteSync(sync: LynxWebGLSync | null): void;
|
|
5493
|
+
isSync(sync: LynxWebGLSync | null): boolean;
|
|
5494
|
+
clientWaitSync(sync: LynxWebGLSync, flags: number, timeout: number): number;
|
|
5495
|
+
waitSync(sync: LynxWebGLSync, flags: number, timeout: number): void;
|
|
5496
|
+
getSyncParameter(sync: LynxWebGLSync, pname: number): unknown;
|
|
5497
|
+
createTransformFeedback(): LynxWebGLTransformFeedback;
|
|
5498
|
+
deleteTransformFeedback(transformFeedback: LynxWebGLTransformFeedback | null): void;
|
|
5499
|
+
isTransformFeedback(transformFeedback: LynxWebGLTransformFeedback | null): boolean;
|
|
5500
|
+
bindTransformFeedback(target: number, transformFeedback: LynxWebGLTransformFeedback | null): void;
|
|
5501
|
+
beginTransformFeedback(primitiveMode: number): void;
|
|
5502
|
+
endTransformFeedback(): void;
|
|
5503
|
+
pauseTransformFeedback(): void;
|
|
5504
|
+
resumeTransformFeedback(): void;
|
|
5505
|
+
getIndexedParameter(target: number, index: number): unknown;
|
|
5506
|
+
}
|
|
5507
|
+
interface LynxWebGL2RenderingContext extends Readonly<typeof WEBGL2_CONSTANTS> {}
|
|
5508
|
+
/**
|
|
5509
|
+
* `<canvas>`: a drawing surface with a WebGL2 context, as HTMLCanvasElement
|
|
5510
|
+
* has, for three.js and other WebGL libraries.
|
|
5511
|
+
*
|
|
5512
|
+
* - `width` and `height` are the drawing buffer's size in pixels (300 by 150
|
|
5513
|
+
* to start, as on the web); the element's CSS size is how big it's shown.
|
|
5514
|
+
* - `getContext('webgl2')` returns a WebGL2RenderingContext: on iOS and
|
|
5515
|
+
* Android, the runtime's (see webgl2-context.ts), drawing with the shell's
|
|
5516
|
+
* OpenGL ES 3.0; on Lynx for Web, the browser's own, since the element is a
|
|
5517
|
+
* real `<canvas>` there. It returns null where there's no WebGL: a host
|
|
5518
|
+
* without the shell's `AngularLynxWebGL` module, such as Lynx Explorer.
|
|
5519
|
+
* There's no `'2d'` context, and `'webgl'` (WebGL 1) is null too.
|
|
5520
|
+
* - Pointer events (see pointer-events.ts) and `getBoundingClientRect()`
|
|
5521
|
+
* (see layout.ts) work on every element; a canvas keeps its layout from
|
|
5522
|
+
* the start, so `clientWidth` and `clientHeight` are right after its first
|
|
5523
|
+
* layout.
|
|
5524
|
+
* - `webglcontextlost` fires when `WEBGL_lose_context` loses the context,
|
|
5525
|
+
* which three.js does when it's disposed.
|
|
5526
|
+
*/
|
|
5527
|
+
declare class LynxCanvasElement extends LynxElement {
|
|
5528
|
+
#private;
|
|
5529
|
+
readonly style: Record<string, string>;
|
|
5530
|
+
constructor(element: ElementRef);
|
|
5531
|
+
get width(): number;
|
|
5532
|
+
set width(value: number);
|
|
5533
|
+
get height(): number;
|
|
5534
|
+
set height(value: number);
|
|
5535
|
+
/**
|
|
5536
|
+
* `width="600"` in a template, or a `[width]` binding, sizes the drawing
|
|
5537
|
+
* buffer, as on an HTML canvas; it's not an attribute Lynx knows.
|
|
5538
|
+
*/
|
|
5539
|
+
setAttribute(name: string, value: any): void;
|
|
5540
|
+
setProperty(name: string, value: any): void;
|
|
5541
|
+
/**
|
|
5542
|
+
* The id that pairs this canvas with its native view and GL context.
|
|
5543
|
+
*/
|
|
5544
|
+
get canvasId(): string;
|
|
5545
|
+
getContext(type: string, attributes?: Partial<LynxWebGLContextAttributes>): unknown;
|
|
5546
|
+
addEventListener(name: string, cb: (event: any) => any): () => void;
|
|
5547
|
+
removeEventListener(name: string, cb: (event: any) => any): void;
|
|
5548
|
+
/**
|
|
5549
|
+
* @internal Fires one of the context's events; false if one prevented it.
|
|
5550
|
+
*/
|
|
5551
|
+
dispatchContextEvent(type: string): boolean;
|
|
5552
|
+
/**
|
|
5553
|
+
* @internal Angular destroyed the element: the GL context goes with it.
|
|
5554
|
+
*/
|
|
5555
|
+
releaseContext(): void;
|
|
5556
|
+
toDataURL(): string;
|
|
5557
|
+
toBlob(): void;
|
|
5558
|
+
}
|
|
5559
|
+
/**
|
|
5560
|
+
* Pointer events on Lynx elements.
|
|
5561
|
+
*
|
|
5562
|
+
* Lynx sends touch events (touchstart, touchmove, touchend, touchcancel), and
|
|
5563
|
+
* no pointer events. Libraries written for the web listen for pointer events
|
|
5564
|
+
* instead: angular-three's event system (pointerdown, pointermove, pointerup,
|
|
5565
|
+
* pointercancel, pointerleave, lostpointercapture), gesture libraries, and
|
|
5566
|
+
* any template's `(pointerdown)`. So an element with a pointer listener
|
|
5567
|
+
* listens for its touches, and turns each into the pointer events a browser
|
|
5568
|
+
* fires for a touch, in a browser's order:
|
|
5569
|
+
*
|
|
5570
|
+
* - touchstart: pointerover, pointerenter, pointerdown
|
|
5571
|
+
* - touchmove: pointermove
|
|
5572
|
+
* - touchend: pointerup, then lostpointercapture if the pointer was captured,
|
|
5573
|
+
* then pointerout and pointerleave (a touch leaves when it lifts)
|
|
5574
|
+
* - touchcancel: pointercancel, lostpointercapture, pointerout, pointerleave
|
|
5575
|
+
*
|
|
5576
|
+
* Each finger is a pointer, whose `pointerId` stays the same until it lifts
|
|
5577
|
+
* (see pointerIdOf), and `isPrimary` marks the first one down. `offsetX`/`offsetY` are relative to
|
|
5578
|
+
* the element, from the touch's `x`/`y` when the element itself was touched
|
|
5579
|
+
* and from its last layout otherwise; `clientX`/`clientY` and
|
|
5580
|
+
* `pageX`/`pageY` are in the LynxView's coordinates.
|
|
5581
|
+
*
|
|
5582
|
+
* A touch's events go to the element it started on wherever the finger
|
|
5583
|
+
* moves, as if every pointer were captured: Lynx targets touchmove and
|
|
5584
|
+
* touchend at touchstart's target. So `setPointerCapture()` changes nothing
|
|
5585
|
+
* but `hasPointerCapture()` and the capture events.
|
|
5586
|
+
*
|
|
5587
|
+
* On Lynx for Web the element is a DOM element with real pointer events
|
|
5588
|
+
* (and a mouse's), so the listeners go straight to it.
|
|
5589
|
+
*/
|
|
5590
|
+
/** The pointer events an element can listen for. */
|
|
5591
|
+
declare const POINTER_EVENT_NAMES: ReadonlySet<string>;
|
|
5592
|
+
/** A Lynx touch, as its touch events carry it. */
|
|
5593
|
+
type LynxTouch = {
|
|
5594
|
+
identifier: number;
|
|
5595
|
+
x?: number;
|
|
5596
|
+
y?: number;
|
|
5597
|
+
pageX?: number;
|
|
5598
|
+
pageY?: number;
|
|
5599
|
+
clientX?: number;
|
|
5600
|
+
clientY?: number;
|
|
5601
|
+
};
|
|
5602
|
+
type LynxTouchEvent = {
|
|
5603
|
+
type?: string;
|
|
5604
|
+
timestamp?: number;
|
|
5605
|
+
target?: {
|
|
5606
|
+
uid?: number;
|
|
5607
|
+
};
|
|
5608
|
+
touches?: LynxTouch[];
|
|
5609
|
+
changedTouches?: LynxTouch[];
|
|
5610
|
+
};
|
|
5611
|
+
/**
|
|
5612
|
+
* A touch's pointerId, the same in each of its events, at an element and at
|
|
5613
|
+
* the document.
|
|
5614
|
+
*
|
|
5615
|
+
* With multi-touch on, Lynx numbers each finger from 0 and keeps its number
|
|
5616
|
+
* until it lifts (`touches_map_` in iOS's LynxTouchHandler.mm, and Android's
|
|
5617
|
+
* `MotionEvent.getPointerId()`). With it off, which is the LynxView's
|
|
5618
|
+
* default, there's one touch at a time, and its `identifier` is the address
|
|
5619
|
+
* of the dictionary Lynx builds the touch in (`reinterpret_cast<int64_t>(&touch)`
|
|
5620
|
+
* in TouchEventHandler::GetTouchEventParam), which changes from one event to
|
|
5621
|
+
* the next: on the iOS 27 Simulator, a drag's touchmove events had one and its
|
|
5622
|
+
* touchend another. So a touch with such an identifier is the one touch, and
|
|
5623
|
+
* gets the number multi-touch gives the first finger.
|
|
5624
|
+
*/
|
|
5625
|
+
declare const pointerIdOf: (touch: LynxTouch) => number;
|
|
5626
|
+
/** What the source needs from its element. */
|
|
5627
|
+
type PointerEventHost = {
|
|
5628
|
+
/** The element's unique id, which a touch event's `target.uid` names. */
|
|
5629
|
+
readonly uid: number;
|
|
5630
|
+
/** The element's last layout, relative to the LynxView. */
|
|
5631
|
+
layoutOrigin(): {
|
|
5632
|
+
left: number;
|
|
5633
|
+
top: number;
|
|
5634
|
+
} | null;
|
|
5635
|
+
/** Adds a touch listener to the element itself (`bindtouchstart`, …). */
|
|
5636
|
+
listen(name: string, listener: (event: LynxTouchEvent) => void): () => void;
|
|
5637
|
+
/** The object to set as the events' `target` and `currentTarget`. */
|
|
5638
|
+
readonly eventTarget: object;
|
|
5639
|
+
};
|
|
5640
|
+
type PointerListener = (event: LynxPointerEvent) => unknown;
|
|
5641
|
+
/**
|
|
5642
|
+
* A pointer event made from a touch: the PointerEvent fields a library reads,
|
|
5643
|
+
* with `preventDefault()` and the propagation methods (which change nothing,
|
|
5644
|
+
* as Lynx decides a touch's propagation when it's bound).
|
|
5645
|
+
*/
|
|
5646
|
+
declare class LynxPointerEvent {
|
|
5647
|
+
#private;
|
|
5648
|
+
readonly type: string;
|
|
5649
|
+
readonly pointerId: number;
|
|
5650
|
+
readonly isPrimary: boolean;
|
|
5651
|
+
readonly clientX: number;
|
|
5652
|
+
readonly clientY: number;
|
|
5653
|
+
readonly pageX: number;
|
|
5654
|
+
readonly pageY: number;
|
|
5655
|
+
readonly offsetX: number;
|
|
5656
|
+
readonly offsetY: number;
|
|
5657
|
+
readonly button: number;
|
|
5658
|
+
readonly buttons: number;
|
|
5659
|
+
readonly pressure: number;
|
|
5660
|
+
readonly timeStamp: number;
|
|
5661
|
+
readonly bubbles: boolean;
|
|
5662
|
+
readonly cancelable: boolean;
|
|
5663
|
+
readonly composed = true;
|
|
5664
|
+
readonly pointerType = "touch";
|
|
5665
|
+
readonly width = 1;
|
|
5666
|
+
readonly height = 1;
|
|
5667
|
+
readonly tiltX = 0;
|
|
5668
|
+
readonly tiltY = 0;
|
|
5669
|
+
readonly twist = 0;
|
|
5670
|
+
readonly tangentialPressure = 0;
|
|
5671
|
+
readonly altKey = false;
|
|
5672
|
+
readonly ctrlKey = false;
|
|
5673
|
+
readonly metaKey = false;
|
|
5674
|
+
readonly shiftKey = false;
|
|
5675
|
+
readonly detail = 0;
|
|
5676
|
+
readonly eventPhase = 2;
|
|
5677
|
+
readonly isTrusted = true;
|
|
5678
|
+
readonly target: object;
|
|
5679
|
+
readonly currentTarget: object;
|
|
5680
|
+
readonly srcElement: object;
|
|
5681
|
+
readonly relatedTarget: null;
|
|
5682
|
+
readonly x: number;
|
|
5683
|
+
readonly y: number;
|
|
5684
|
+
readonly screenX: number;
|
|
5685
|
+
readonly screenY: number;
|
|
5686
|
+
readonly movementX = 0;
|
|
5687
|
+
readonly movementY = 0;
|
|
5688
|
+
defaultPrevented: boolean;
|
|
5689
|
+
constructor(type: string, pointerId: number, isPrimary: boolean, clientX: number, clientY: number, pageX: number, pageY: number, offsetX: number, offsetY: number, button: number, buttons: number, pressure: number, timeStamp: number, target: object);
|
|
5690
|
+
preventDefault(): void;
|
|
5691
|
+
stopPropagation(): void;
|
|
5692
|
+
stopImmediatePropagation(): void;
|
|
5693
|
+
/**
|
|
5694
|
+
* @internal Whether a listener stopped the others.
|
|
5695
|
+
*/
|
|
5696
|
+
get immediatePropagationStopped(): boolean;
|
|
5697
|
+
getCoalescedEvents(): LynxPointerEvent[];
|
|
5698
|
+
getPredictedEvents(): LynxPointerEvent[];
|
|
5699
|
+
}
|
|
5700
|
+
/**
|
|
5701
|
+
* One element's pointer events: its listeners, by event name, and the touch
|
|
5702
|
+
* listeners it adds to the element while it has any.
|
|
5703
|
+
*/
|
|
5704
|
+
declare class PointerEventSource {
|
|
5705
|
+
#private;
|
|
5706
|
+
/** Where the last pointer was on the element, for the click that follows. */
|
|
5707
|
+
lastOffset: {
|
|
5708
|
+
offsetX: number;
|
|
5709
|
+
offsetY: number;
|
|
5710
|
+
} | null;
|
|
5711
|
+
constructor(host: PointerEventHost);
|
|
5712
|
+
add(type: string, listener: PointerListener): () => void;
|
|
5713
|
+
remove(type: string, listener: PointerListener): void;
|
|
5714
|
+
setPointerCapture(pointerId: number): void;
|
|
5715
|
+
releasePointerCapture(pointerId: number): void;
|
|
5716
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
5717
|
+
}
|
|
5718
|
+
/**
|
|
5719
|
+
* The pointer event a browser fires for `touch`: the one an element makes
|
|
5720
|
+
* (see PointerEventSource), and the one the document gets for a touch
|
|
5721
|
+
* anywhere (see global-events/native-source.ts). `pointer` says which finger
|
|
5722
|
+
* it is and where it is on the target; a capture event, which no touch
|
|
5723
|
+
* causes, has no `touch`.
|
|
5724
|
+
*/
|
|
5725
|
+
declare const pointerEventFor: (type: string, pointer: {
|
|
5726
|
+
pointerId: number;
|
|
5727
|
+
isPrimary: boolean;
|
|
5728
|
+
offsetX: number;
|
|
5729
|
+
offsetY: number;
|
|
5730
|
+
}, touch: LynxTouch | null, timeStamp: number | undefined, target: object) => LynxPointerEvent;
|
|
5731
|
+
export declare class LynxLogger {
|
|
5732
|
+
#private;
|
|
5733
|
+
log(...args: unknown[]): void;
|
|
5734
|
+
warn(...args: unknown[]): void;
|
|
5735
|
+
error(...args: unknown[]): void;
|
|
5736
|
+
info(...args: unknown[]): void;
|
|
5737
|
+
debug(...args: unknown[]): void;
|
|
5738
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LynxLogger, never>;
|
|
5739
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
5740
|
+
}
|
|
5741
|
+
/**
|
|
5742
|
+
* Extensible map of custom native modules declared by the host app.
|
|
5743
|
+
*
|
|
5744
|
+
* App developers augment this interface to get type-safe access
|
|
5745
|
+
* via {@link LynxNativeModule.getNativeModule}. Describe each module's
|
|
5746
|
+
* methods as the host implements them; `getNativeModule()` turns their
|
|
5747
|
+
* return values into promises (see {@link NativeModuleProxy}):
|
|
5748
|
+
*
|
|
5749
|
+
* ```typescript
|
|
5750
|
+
* // This export makes the file a module, so the block below adds to
|
|
5751
|
+
* // @blotch/angular-lynx's types instead of replacing them.
|
|
5752
|
+
* export {};
|
|
5753
|
+
*
|
|
5754
|
+
* declare module '@blotch/angular-lynx' {
|
|
5755
|
+
* interface NativeModuleMap {
|
|
5756
|
+
* NativeLocalStorageModule: {
|
|
5757
|
+
* setStorageItem(key: string, value: string): void;
|
|
5758
|
+
* getStorageItem(key: string, callback: (value: string) => void): void;
|
|
5759
|
+
* clearStorage(): void;
|
|
5760
|
+
* };
|
|
5761
|
+
* }
|
|
5762
|
+
* }
|
|
5763
|
+
* ```
|
|
5764
|
+
*/
|
|
5765
|
+
interface NativeModuleMap {}
|
|
5766
|
+
/**
|
|
5767
|
+
* A native module as {@link LynxNativeModule.getNativeModule} returns it on
|
|
5768
|
+
* the main thread, where Angular runs.
|
|
5769
|
+
*
|
|
5770
|
+
* Native modules exist only on the background thread, so each method call is
|
|
5771
|
+
* relayed there: the method returns a promise of its result (copied as JSON),
|
|
5772
|
+
* and function arguments are called back on the main thread. Only methods
|
|
5773
|
+
* cross; other properties of the module aren't reachable.
|
|
5774
|
+
*/
|
|
5775
|
+
type NativeModuleProxy<T> = { [K in keyof T as T[K] extends ((...args: any[]) => unknown) ? K : never]: T[K] extends ((...args: infer A) => infer R) ? (...args: A) => Promise<Awaited<R>> : never; };
|
|
5776
|
+
/**
|
|
5777
|
+
* Wraps the Lynx native module bridge and JS module registry as an Angular injectable.
|
|
5778
|
+
*
|
|
5779
|
+
* **Native modules** (`NativeModules` global) let JS code call native platform
|
|
5780
|
+
* functions (iOS / Android / HarmonyOS). The host app registers modules on the
|
|
5781
|
+
* native side; this service provides typed access from Angular.
|
|
5782
|
+
*
|
|
5783
|
+
* **JS modules** (`lynx.getJSModule` / `lynx.registerModule`) share JavaScript
|
|
5784
|
+
* values within a single LynxView. This is the same API used internally by
|
|
5785
|
+
* `LynxInitData` and `LynxGlobalData` (via `GlobalEventEmitter`).
|
|
5786
|
+
*
|
|
5787
|
+
* Lynx provides both only on the background thread, while Angular runs on the
|
|
5788
|
+
* main thread. So on the main thread every method goes through the background
|
|
5789
|
+
* call relay (background-call.ts): calls run on the background thread, their
|
|
5790
|
+
* results and callbacks come back as JSON, and a module is a proxy whose
|
|
5791
|
+
* methods return promises.
|
|
5792
|
+
*
|
|
5793
|
+
* @usageNotes
|
|
5794
|
+
* ```typescript
|
|
5795
|
+
* const modules = inject(LynxNativeModule);
|
|
5796
|
+
*
|
|
5797
|
+
* // Call a native method (Promise-based wrapper over bridge.call)
|
|
5798
|
+
* const result = await modules.call<string>('getDeviceId', {});
|
|
5799
|
+
*
|
|
5800
|
+
* // Listen for native events
|
|
5801
|
+
* modules.on('onDeepLink', (url) => console.log(url));
|
|
5802
|
+
*
|
|
5803
|
+
* // Access a typed custom native module
|
|
5804
|
+
* const storage = modules.getNativeModule('NativeLocalStorageModule');
|
|
5805
|
+
* storage?.setStorageItem('key', 'value');
|
|
5806
|
+
*
|
|
5807
|
+
* // JS module sharing within the LynxView
|
|
5808
|
+
* modules.registerJSModule('mySharedState', { count: 0 });
|
|
5809
|
+
* const state = modules.getJSModule<{ count: number }>('mySharedState');
|
|
5810
|
+
* ```
|
|
5811
|
+
*/
|
|
5812
|
+
export declare class LynxNativeModule {
|
|
5813
|
+
#private;
|
|
5814
|
+
/**
|
|
5815
|
+
* Calls a native method via `NativeModules.bridge.call()`.
|
|
5816
|
+
*
|
|
5817
|
+
* The native callback API is wrapped in a Promise for ergonomic
|
|
5818
|
+
* use with `async`/`await`.
|
|
5819
|
+
*
|
|
5820
|
+
* Resolves `undefined` when there is no bridge (web preview, tests).
|
|
5821
|
+
*/
|
|
5822
|
+
call<T = unknown>(name: string, params?: Record<string, unknown>): Promise<T | undefined>;
|
|
5823
|
+
/**
|
|
5824
|
+
* Subscribes to a native event via `NativeModules.bridge.on()`. From the
|
|
5825
|
+
* main thread, the callback gets the event's arguments copied as JSON.
|
|
5826
|
+
*
|
|
5827
|
+
* No-op when there is no bridge.
|
|
5828
|
+
*/
|
|
5829
|
+
on(name: string, callback: (...args: unknown[]) => void): void;
|
|
5830
|
+
/**
|
|
5831
|
+
* Retrieves a custom native module by name from the `NativeModules` global.
|
|
5832
|
+
*
|
|
5833
|
+
* Augment the {@link NativeModuleMap} interface for type-safe access:
|
|
5834
|
+
*
|
|
5835
|
+
* ```typescript
|
|
5836
|
+
* export {};
|
|
5837
|
+
*
|
|
5838
|
+
* declare module '@blotch/angular-lynx' {
|
|
5839
|
+
* interface NativeModuleMap {
|
|
5840
|
+
* NativeLocalStorageModule: { ... };
|
|
5841
|
+
* }
|
|
5842
|
+
* }
|
|
5843
|
+
*
|
|
5844
|
+
* const storage = modules.getNativeModule('NativeLocalStorageModule');
|
|
5845
|
+
* ```
|
|
5846
|
+
*
|
|
5847
|
+
* On the main thread, which can't reach native modules, it returns a proxy:
|
|
5848
|
+
* each method call runs on the background thread and returns a promise of
|
|
5849
|
+
* its result, and a call to a module or method the host doesn't have
|
|
5850
|
+
* rejects. The return type says so: a module in {@link NativeModuleMap}
|
|
5851
|
+
* comes back as a {@link NativeModuleProxy} of it, and any other name as
|
|
5852
|
+
* `unknown`.
|
|
5853
|
+
*
|
|
5854
|
+
* Returns `undefined` outside Lynx, or on the background thread when the
|
|
5855
|
+
* module is not registered.
|
|
5856
|
+
*/
|
|
5857
|
+
getNativeModule<K extends string>(name: K): K extends keyof NativeModuleMap ? NativeModuleProxy<NativeModuleMap[K]> | undefined : unknown;
|
|
5858
|
+
/**
|
|
5859
|
+
* Retrieves a JS module registered within this LynxView.
|
|
3531
5860
|
*
|
|
3532
|
-
*
|
|
3533
|
-
*
|
|
3534
|
-
*
|
|
3535
|
-
*
|
|
5861
|
+
* This wraps `lynx.getJSModule()` — the same API used internally
|
|
5862
|
+
* for `GlobalEventEmitter`. On the main thread it returns a proxy, as
|
|
5863
|
+
* getNativeModule() does.
|
|
5864
|
+
*
|
|
5865
|
+
* Returns `undefined` when `lynx` is unavailable or, on the background
|
|
5866
|
+
* thread, when the module is not registered.
|
|
3536
5867
|
*/
|
|
3537
|
-
|
|
5868
|
+
getJSModule<T = unknown>(name: string): T | undefined;
|
|
3538
5869
|
/**
|
|
3539
|
-
*
|
|
3540
|
-
*
|
|
3541
|
-
*
|
|
3542
|
-
*
|
|
3543
|
-
*
|
|
3544
|
-
*
|
|
5870
|
+
* Registers a JS module for sharing within this LynxView.
|
|
5871
|
+
*
|
|
5872
|
+
* Other code (including native callbacks) can retrieve it via
|
|
5873
|
+
* `getJSModule()` or `lynx.getJSModule()`. From the main thread, the
|
|
5874
|
+
* background thread registers a copy whose methods call this module's, with
|
|
5875
|
+
* their arguments copied as JSON and their return values dropped.
|
|
5876
|
+
*
|
|
5877
|
+
* No-op when `lynx` is unavailable.
|
|
3545
5878
|
*/
|
|
3546
|
-
|
|
5879
|
+
registerJSModule<T extends object>(name: string, module: T): void;
|
|
5880
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LynxNativeModule, never>;
|
|
5881
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
3547
5882
|
}
|
|
3548
|
-
/**
|
|
3549
|
-
* Commits all queued genuine element removals — a free-function wrapper over
|
|
3550
|
-
* `LynxElement.commitPendingRemovals()` so `LynxRendererFactory2.end()` can
|
|
3551
|
-
* drain them (via the lynx-element barrel) right before `__FlushElementTree()`,
|
|
3552
|
-
* keeping removals in the same flush as the cycle's other mutations.
|
|
3553
|
-
*/
|
|
3554
|
-
declare const processPendingRemovals: () => void;
|
|
3555
|
-
/**
|
|
3556
|
-
* Commits this cycle's attribute removals (see LynxElement's
|
|
3557
|
-
* `#removedAttributes`). A free-function wrapper over
|
|
3558
|
-
* `LynxElement.commitPendingAttributeRemovals()` so
|
|
3559
|
-
* `LynxRendererFactory2.end()` can drain them (via the lynx-element barrel)
|
|
3560
|
-
* right after element removals and before `__FlushElementTree()`.
|
|
3561
|
-
*/
|
|
3562
|
-
declare const processPendingAttributeRemovals: () => void;
|
|
3563
|
-
/**
|
|
3564
|
-
* Re-derives positional edge whitespace for every text touched this cycle — a
|
|
3565
|
-
* free-function wrapper over `LynxElement.commitPendingTextNormalization()` so
|
|
3566
|
-
* `LynxRendererFactory2.end()` can drain it (via the lynx-element barrel) right
|
|
3567
|
-
* after removals and before `__FlushElementTree()`, keeping the corrected text in
|
|
3568
|
-
* the same flush as the cycle's other mutations. See #pendingTextNormalization.
|
|
3569
|
-
*/
|
|
3570
|
-
declare const processPendingTextNormalization: () => void;
|
|
3571
|
-
/**
|
|
3572
|
-
* Safety-net flush for native mutations made OUTSIDE a begin()/end() change-
|
|
3573
|
-
* detection cycle. `LynxRendererFactory2.end()` calls `__FlushElementTree()`
|
|
3574
|
-
* once per CD tick, which is what commits (lays out + paints) the cycle's
|
|
3575
|
-
* element mutations. But a lazy-loaded route component is instantiated by
|
|
3576
|
-
* `RouterOutlet` DURING navigation — outside any such cycle — so its freshly
|
|
3577
|
-
* created elements land in the fiber tree yet are never flushed. On-device
|
|
3578
|
-
* symptom: the route's static shell renders, but its `@if`/`@for`/interpolation
|
|
3579
|
-
* content stays invisible until an unrelated CD (e.g. a tap) triggers the next
|
|
3580
|
-
* end() flush. (Bootstrap sidesteps this via native's implicit post-renderPage
|
|
3581
|
-
* flush.) This mirrors the `<list>` path's own guard for the exact same case —
|
|
3582
|
-
* see `LynxListElement.#scheduleUpdate`.
|
|
3583
|
-
*
|
|
3584
|
-
* Called from `LynxDocument`'s element creators, which only run on the main
|
|
3585
|
-
* thread (Angular doesn't run on the background thread), so no thread guard is
|
|
3586
|
-
* needed here. It schedules ONE
|
|
3587
|
-
* coalesced microtask (matching the list guard's `queueMicrotask`, not
|
|
3588
|
-
* `setTimeout` — flushing from a macrotask crashes the native engine), and is a
|
|
3589
|
-
* no-op while:
|
|
3590
|
-
* - inside a CD cycle — end() will flush;
|
|
3591
|
-
* - the first render is pending — native flushes after renderPage, and any
|
|
3592
|
-
* `<list>` defers its own first flush (see isFirstRenderPending()).
|
|
3593
|
-
* The near-no-op cost when nothing is layout-dirty (the core's `need_layout_`
|
|
3594
|
-
* gate) keeps the steady-state overhead negligible.
|
|
3595
|
-
*/
|
|
3596
|
-
declare const scheduleSettleFlush: () => void;
|
|
3597
5883
|
/**
|
|
3598
5884
|
* Process all pending list updates. Called from LynxRendererFactory2.end()
|
|
3599
5885
|
* before __FlushElementTree() so list updates are flushed as part of the
|
|
@@ -4156,6 +6442,103 @@ export declare class LynxResourcePrefetch {
|
|
|
4156
6442
|
static ɵfac: i0.ɵɵFactoryDeclaration<LynxResourcePrefetch, never>;
|
|
4157
6443
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
4158
6444
|
}
|
|
6445
|
+
/**
|
|
6446
|
+
* The platform the app runs on, spelled exactly as Lynx reports it. Compare
|
|
6447
|
+
* with these strings as written: `'iOS'`, not `'ios'`.
|
|
6448
|
+
*
|
|
6449
|
+
* The casing is uneven because each platform's Lynx code names itself (Lynx
|
|
6450
|
+
* core's desktop code returns `'windows'` but `'macOS'`), so it can't be
|
|
6451
|
+
* normalized without breaking comparisons against what Lynx reports.
|
|
6452
|
+
*
|
|
6453
|
+
* It differs from `@lynx-js/types`' `PlatformType` in two places:
|
|
6454
|
+
* - It adds `'web'`, which web-core (Lynx for Web, the docs' live previews)
|
|
6455
|
+
* reports. Without it, code that checks for the web needs a cast.
|
|
6456
|
+
* - It drops `'pc'`, the name desktop Lynx used before 3.3, which no Lynx
|
|
6457
|
+
* that AngularLynx supports reports.
|
|
6458
|
+
*/
|
|
6459
|
+
type PlatformType = 'Android' | 'iOS' | 'Harmony' | 'windows' | 'macOS' | 'web';
|
|
6460
|
+
/**
|
|
6461
|
+
* Wraps the global `SystemInfo` object as an Angular injectable,
|
|
6462
|
+
* providing device and platform information from the Lynx runtime.
|
|
6463
|
+
*
|
|
6464
|
+
* `SystemInfo` is populated once when the Lynx view initializes and
|
|
6465
|
+
* is read-only for the lifetime of the app — the values never change.
|
|
6466
|
+
*
|
|
6467
|
+
* On iOS and Android (Lynx 4.1), the main thread has no global `SystemInfo`,
|
|
6468
|
+
* only `lynx.SystemInfo`, so that's read first. The background thread and the
|
|
6469
|
+
* web have the global. The main thread's copy has no `osVersion` either: see
|
|
6470
|
+
* {@link LynxSystemInfo.osVersion} for where that comes from instead.
|
|
6471
|
+
*
|
|
6472
|
+
* @usageNotes
|
|
6473
|
+
* ```typescript
|
|
6474
|
+
* const systemInfo = inject(LynxSystemInfo);
|
|
6475
|
+
*
|
|
6476
|
+
* // Device dimensions in physical pixels
|
|
6477
|
+
* const { pixelWidth, pixelHeight, pixelRatio } = systemInfo;
|
|
6478
|
+
*
|
|
6479
|
+
* // Logical screen dimensions (CSS pixels)
|
|
6480
|
+
* const cssWidth = systemInfo.screenWidth;
|
|
6481
|
+
* const cssHeight = systemInfo.screenHeight;
|
|
6482
|
+
*
|
|
6483
|
+
* // Platform detection
|
|
6484
|
+
* if (systemInfo.platform === 'iOS') {
|
|
6485
|
+
* // iOS-specific logic
|
|
6486
|
+
* }
|
|
6487
|
+
* ```
|
|
6488
|
+
*/
|
|
6489
|
+
export declare class LynxSystemInfo {
|
|
6490
|
+
#private;
|
|
6491
|
+
constructor();
|
|
6492
|
+
/**
|
|
6493
|
+
* The platform of the current device (e.g. `'iOS'`, `'Android'`, or
|
|
6494
|
+
* `'web'` in Lynx for Web). See {@link PlatformType}.
|
|
6495
|
+
*/
|
|
6496
|
+
get platform(): PlatformType;
|
|
6497
|
+
/**
|
|
6498
|
+
* The Lynx engine version (e.g. `'3.2'`).
|
|
6499
|
+
*/
|
|
6500
|
+
get engineVersion(): string;
|
|
6501
|
+
/**
|
|
6502
|
+
* The current operating system version, such as `'26.1'` on iOS or `'15'`
|
|
6503
|
+
* on Android. Empty while it isn't known.
|
|
6504
|
+
*
|
|
6505
|
+
* The native main thread's SystemInfo lacks it, so there it comes from the
|
|
6506
|
+
* host app's `osVersion` global prop, or else from the background thread,
|
|
6507
|
+
* which answers shortly after the first frame. It reads a signal, so a
|
|
6508
|
+
* `computed()` that reads it updates when the answer arrives.
|
|
6509
|
+
*/
|
|
6510
|
+
get osVersion(): string;
|
|
6511
|
+
/**
|
|
6512
|
+
* Physical pixel width of the device screen.
|
|
6513
|
+
*/
|
|
6514
|
+
get pixelWidth(): number;
|
|
6515
|
+
/**
|
|
6516
|
+
* Physical pixel height of the device screen.
|
|
6517
|
+
*/
|
|
6518
|
+
get pixelHeight(): number;
|
|
6519
|
+
/**
|
|
6520
|
+
* Device pixel ratio (physical pixels per CSS pixel).
|
|
6521
|
+
*/
|
|
6522
|
+
get pixelRatio(): number;
|
|
6523
|
+
/**
|
|
6524
|
+
* The JavaScript engine in use (`'v8'`, `'jsc'`, or `'quickjs'`). Only available on the background thread.
|
|
6525
|
+
*/
|
|
6526
|
+
get runtimeType(): 'v8' | 'jsc' | 'quickjs';
|
|
6527
|
+
/**
|
|
6528
|
+
* Screen width in logical/CSS pixels (`pixelWidth / pixelRatio`).
|
|
6529
|
+
*/
|
|
6530
|
+
get screenWidth(): number;
|
|
6531
|
+
/**
|
|
6532
|
+
* Screen height in logical/CSS pixels (`pixelHeight / pixelRatio`).
|
|
6533
|
+
*/
|
|
6534
|
+
get screenHeight(): number;
|
|
6535
|
+
/**
|
|
6536
|
+
* The theme object, if provided by the host application.
|
|
6537
|
+
*/
|
|
6538
|
+
get theme(): object | undefined;
|
|
6539
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LynxSystemInfo, never>;
|
|
6540
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
6541
|
+
}
|
|
4159
6542
|
/**
|
|
4160
6543
|
* CSS `env()` value for the top safe area inset (notch / status bar).
|
|
4161
6544
|
*/
|
|
@@ -4205,9 +6588,10 @@ export declare class LynxSafeArea {
|
|
|
4205
6588
|
*/
|
|
4206
6589
|
readonly isNotchScreen: import("@angular/core").Signal<boolean>;
|
|
4207
6590
|
/**
|
|
4208
|
-
* The current platform (`'iOS'`, `'Android'`, `'
|
|
6591
|
+
* The current platform (`'iOS'`, `'Android'`, `'web'`, etc.). Same as
|
|
6592
|
+
* {@link LynxSystemInfo.platform}.
|
|
4209
6593
|
*/
|
|
4210
|
-
get platform():
|
|
6594
|
+
get platform(): PlatformType;
|
|
4211
6595
|
static ɵfac: i0.ɵɵFactoryDeclaration<LynxSafeArea, never>;
|
|
4212
6596
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
4213
6597
|
}
|
|
@@ -4417,87 +6801,6 @@ export declare class LynxSecureStorage extends PersistentStorage {
|
|
|
4417
6801
|
static ɵfac: i0.ɵɵFactoryDeclaration<LynxSecureStorage, never>;
|
|
4418
6802
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
4419
6803
|
}
|
|
4420
|
-
/**
|
|
4421
|
-
* Wraps the global `SystemInfo` object as an Angular injectable,
|
|
4422
|
-
* providing device and platform information from the Lynx runtime.
|
|
4423
|
-
*
|
|
4424
|
-
* `SystemInfo` is populated once when the Lynx view initializes and
|
|
4425
|
-
* is read-only for the lifetime of the app — the values never change.
|
|
4426
|
-
*
|
|
4427
|
-
* On iOS and Android (Lynx 4.1), the main thread has no global `SystemInfo`,
|
|
4428
|
-
* only `lynx.SystemInfo`, so that's read first. The background thread and the
|
|
4429
|
-
* web have the global. The main thread's copy has no `osVersion` either: see
|
|
4430
|
-
* {@link LynxSystemInfo.osVersion} for where that comes from instead.
|
|
4431
|
-
*
|
|
4432
|
-
* @usageNotes
|
|
4433
|
-
* ```typescript
|
|
4434
|
-
* const systemInfo = inject(LynxSystemInfo);
|
|
4435
|
-
*
|
|
4436
|
-
* // Device dimensions in physical pixels
|
|
4437
|
-
* const { pixelWidth, pixelHeight, pixelRatio } = systemInfo;
|
|
4438
|
-
*
|
|
4439
|
-
* // Logical screen dimensions (CSS pixels)
|
|
4440
|
-
* const cssWidth = systemInfo.screenWidth;
|
|
4441
|
-
* const cssHeight = systemInfo.screenHeight;
|
|
4442
|
-
*
|
|
4443
|
-
* // Platform detection
|
|
4444
|
-
* if (systemInfo.platform === 'iOS') {
|
|
4445
|
-
* // iOS-specific logic
|
|
4446
|
-
* }
|
|
4447
|
-
* ```
|
|
4448
|
-
*/
|
|
4449
|
-
export declare class LynxSystemInfo {
|
|
4450
|
-
#private;
|
|
4451
|
-
constructor();
|
|
4452
|
-
/**
|
|
4453
|
-
* The platform of the current device (e.g. `'iOS'`, `'Android'`).
|
|
4454
|
-
*/
|
|
4455
|
-
get platform(): PlatformType;
|
|
4456
|
-
/**
|
|
4457
|
-
* The Lynx engine version (e.g. `'3.2'`).
|
|
4458
|
-
*/
|
|
4459
|
-
get engineVersion(): string;
|
|
4460
|
-
/**
|
|
4461
|
-
* The current operating system version, such as `'26.1'` on iOS or `'15'`
|
|
4462
|
-
* on Android. Empty while it isn't known.
|
|
4463
|
-
*
|
|
4464
|
-
* The native main thread's SystemInfo lacks it, so there it comes from the
|
|
4465
|
-
* host app's `osVersion` global prop, or else from the background thread,
|
|
4466
|
-
* which answers shortly after the first frame. It reads a signal, so a
|
|
4467
|
-
* `computed()` that reads it updates when the answer arrives.
|
|
4468
|
-
*/
|
|
4469
|
-
get osVersion(): string;
|
|
4470
|
-
/**
|
|
4471
|
-
* Physical pixel width of the device screen.
|
|
4472
|
-
*/
|
|
4473
|
-
get pixelWidth(): number;
|
|
4474
|
-
/**
|
|
4475
|
-
* Physical pixel height of the device screen.
|
|
4476
|
-
*/
|
|
4477
|
-
get pixelHeight(): number;
|
|
4478
|
-
/**
|
|
4479
|
-
* Device pixel ratio (physical pixels per CSS pixel).
|
|
4480
|
-
*/
|
|
4481
|
-
get pixelRatio(): number;
|
|
4482
|
-
/**
|
|
4483
|
-
* The JavaScript engine in use (`'v8'`, `'jsc'`, or `'quickjs'`). Only available on the background thread.
|
|
4484
|
-
*/
|
|
4485
|
-
get runtimeType(): 'v8' | 'jsc' | 'quickjs';
|
|
4486
|
-
/**
|
|
4487
|
-
* Screen width in logical/CSS pixels (`pixelWidth / pixelRatio`).
|
|
4488
|
-
*/
|
|
4489
|
-
get screenWidth(): number;
|
|
4490
|
-
/**
|
|
4491
|
-
* Screen height in logical/CSS pixels (`pixelHeight / pixelRatio`).
|
|
4492
|
-
*/
|
|
4493
|
-
get screenHeight(): number;
|
|
4494
|
-
/**
|
|
4495
|
-
* The theme object, if provided by the host application.
|
|
4496
|
-
*/
|
|
4497
|
-
get theme(): object | undefined;
|
|
4498
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LynxSystemInfo, never>;
|
|
4499
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
4500
|
-
}
|
|
4501
6804
|
/**
|
|
4502
6805
|
* Wraps `lynx.getTextInfo()` for measuring text dimensions and
|
|
4503
6806
|
* performing line-breaking calculations.
|
|
@@ -4798,7 +7101,7 @@ export declare class LynxWebAuthSession {
|
|
|
4798
7101
|
* Central DI configuration for the Lynx renderer. Must be included in every
|
|
4799
7102
|
* Lynx Angular app's providers (typically via app.config.ts). Sets up:
|
|
4800
7103
|
* 1. The document (LynxDocument, or LynxHydrateDocument for SSR)
|
|
4801
|
-
* 2. DOCUMENT
|
|
7104
|
+
* 2. DOCUMENT: the document stand-in elements' ownerDocument is (global-events)
|
|
4802
7105
|
* 3. APP_BASE_HREF (prevents BrowserPlatformLocation from crashing)
|
|
4803
7106
|
* 4. Renderer factory (creates LynxRenderer / EmulatedLynxRenderer)
|
|
4804
7107
|
* 5. Error handler (routes to _ReportError + __lynxLastError)
|
|
@@ -5250,33 +7553,4 @@ declare global {
|
|
|
5250
7553
|
_wkltId: string;
|
|
5251
7554
|
}, ...args: unknown[]): Promise<unknown>;
|
|
5252
7555
|
}
|
|
5253
|
-
|
|
5254
|
-
interface HTMLElementEventMap {
|
|
5255
|
-
bindtap: TouchEvent;
|
|
5256
|
-
catchtap: TouchEvent;
|
|
5257
|
-
'capture-bindtap': TouchEvent;
|
|
5258
|
-
'capture-catchtap': TouchEvent;
|
|
5259
|
-
'global-bindtap': TouchEvent;
|
|
5260
|
-
bindtouchstart: TouchEvent;
|
|
5261
|
-
bindtouchend: TouchEvent;
|
|
5262
|
-
bindtouchmove: TouchEvent;
|
|
5263
|
-
bindtouchcancel: TouchEvent;
|
|
5264
|
-
bindlongpress: TouchEvent;
|
|
5265
|
-
catchtouchstart: TouchEvent;
|
|
5266
|
-
catchtouchend: TouchEvent;
|
|
5267
|
-
catchtouchmove: TouchEvent;
|
|
5268
|
-
catchtouchcancel: TouchEvent;
|
|
5269
|
-
catchlongpress: TouchEvent;
|
|
5270
|
-
bindmousedown: MouseEvent;
|
|
5271
|
-
bindmouseup: MouseEvent;
|
|
5272
|
-
bindmousemove: MouseEvent;
|
|
5273
|
-
bindmouseenter: MouseEvent;
|
|
5274
|
-
bindmouseleave: MouseEvent;
|
|
5275
|
-
catchmousedown: MouseEvent;
|
|
5276
|
-
catchmouseup: MouseEvent;
|
|
5277
|
-
catchmousemove: MouseEvent;
|
|
5278
|
-
catchmouseenter: MouseEvent;
|
|
5279
|
-
catchmouseleave: MouseEvent;
|
|
5280
|
-
}
|
|
5281
|
-
}
|
|
5282
|
-
export type { AccessibilityTrait, AccessibilityTraitStates, BackgroundFnHandle, BaseLynxAnimation, BaseLynxElement, DataProcessorDefinition, DevToolsStats, DynamicColorRole, DynamicColorScheme, DynamicColors, ExposureEventDetail, FlingGestureEvent, GestureCallback, GestureCallbackWithState, GestureEvent, GlobalData, GlobalExposureEvent, HostElementTag, InitData, InitDataRaw, LongPressGestureEvent, LynxAnimationOptions, LynxFontEntry, LynxFontFaceConfig, LynxFontStatus, LynxTraceOptions, MainThread, MainThreadFnHandle, NativeModuleMap, NativeModuleProxy, ObserverFrameRateOptions, PanGestureEvent, PinchGestureEvent, PortalConfig, PrefetchCacheTarget, PrefetchPriority, PrefetchRequest, PrefetchResultDetail, ResourcePrefetchData, ResourcePrefetchResult, RotationGestureEvent, SessionStorageSubscription, TapGestureEvent, WebAuthSessionErrorCode, WebAuthSessionOptions };
|
|
7556
|
+
export type { AccessibilityActionDetail, AccessibilityTrait, AccessibilityTraitStates, BackgroundFnHandle, BaseLynxAnimation, BaseLynxElement, DataProcessorDefinition, DevToolsStats, DynamicColorRole, DynamicColorScheme, DynamicColors, ExposureEventDetail, FlingGestureEvent, FrameLoadDetail, FrameLoadMetricsDetail, GestureCallback, GestureCallbackWithState, GestureEvent, GlobalData, GlobalExposureEvent, HostElementTag, ImageErrorDetail, ImageLoadDetail, InitData, InitDataRaw, InputDetail, InputSelectionDetail, InputValueDetail, LayoutChangeDetail, ListAttachedCell, ListItemInfo, ListLayoutCompleteDetail, ListScrollDetail, ListScrollStateChangeDetail, ListSnapDetail, LongPressGestureEvent, LynxAnimationOptions, LynxCanvasElement, LynxDOMRect, LynxEvent, LynxEventTarget, LynxFontEntry, LynxFontFaceConfig, LynxFontStatus, LynxPointerEvent, LynxTraceOptions, LynxWebGL2RenderingContext, MainThread, MainThreadFnHandle, NativeModuleMap, NativeModuleProxy, ObserverFrameRateOptions, OverlayErrorDetail, OverlayTouchDetail, PanGestureEvent, PinchGestureEvent, PlatformType, PortalConfig, PrefetchCacheTarget, PrefetchPriority, PrefetchRequest, PrefetchResultDetail, RefreshHeaderOffsetDetail, RefreshStartDetail, RefreshStateChangeDetail, ResourcePrefetchData, ResourcePrefetchResult, RotationGestureEvent, ScrollCoordinatorOffsetDetail, ScrollDetail, SessionStorageSubscription, TapGestureEvent, TextLayoutDetail, TextSelectionChangeDetail, UIAppearanceDetail, VideoBufferingDetail, VideoErrorDetail, VideoFirstFrameDetail, VideoTimeUpdateDetail, ViewPagerChangeDetail, ViewPagerOffsetChangeDetail, WebAuthSessionErrorCode, WebAuthSessionOptions, WebViewErrorDetail, WebViewMessageDetail, WebViewUrlDetail };
|