@unseenco/theatre-core 0.5.0 → 0.6.0
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 +10 -4
- package/dist/index-lite.d.ts +1927 -0
- package/dist/index-lite.js +7582 -0
- package/dist/index-lite.js.map +7 -0
- package/dist/index-lite.mjs +7584 -0
- package/dist/index-lite.mjs.map +7 -0
- package/dist/index.d.ts +53 -53
- package/dist/index.js +1757 -1628
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1695 -1566
- package/dist/index.mjs.map +4 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1788,64 +1788,13 @@ declare function setCoreRafDriver(driver: IRafDriver): void;
|
|
|
1788
1788
|
*/
|
|
1789
1789
|
declare function isRemoteEditorWindow(): boolean;
|
|
1790
1790
|
|
|
1791
|
-
/**
|
|
1792
|
-
* Drives registered GSAP animations from the sheet sequence playhead.
|
|
1793
|
-
*
|
|
1794
|
-
* @returns Disposer — call to detach the bridge.
|
|
1795
|
-
*/
|
|
1796
|
-
declare function attachGsapSequenceBridge(sheet: ISheet): () => void;
|
|
1797
|
-
|
|
1798
|
-
/** `null` = native document scroll (window / documentElement). */
|
|
1799
|
-
type PageScrollScroller = Window | Element | null;
|
|
1800
|
-
type PageScrollAxis = 'vertical' | 'horizontal';
|
|
1801
|
-
type PageScrollContext = {
|
|
1802
|
-
scroller: PageScrollScroller;
|
|
1803
|
-
/** Scroll axis for page mode and ScrollTrigger registration (default vertical). */
|
|
1804
|
-
axis?: PageScrollAxis;
|
|
1805
|
-
};
|
|
1806
|
-
declare const defaultPageScrollContext: PageScrollContext;
|
|
1807
|
-
declare function setActivePageScrollContext(context: PageScrollContext): void;
|
|
1808
|
-
declare function getActivePageScrollContext(): PageScrollContext;
|
|
1809
|
-
declare function resolvePageScrollAxis(context?: PageScrollContext): PageScrollAxis;
|
|
1810
|
-
declare function resolvePageScrollScroller(st: unknown, defaultsScroller?: PageScrollScroller): PageScrollScroller;
|
|
1811
|
-
declare function isNativeDocumentScroller(scroller: PageScrollScroller): boolean;
|
|
1812
|
-
/** Same scroller target for page-mode scroll registration (reference equality or both native doc). */
|
|
1813
|
-
declare function pageScrollScrollersMatch(a: PageScrollScroller, b: PageScrollScroller): boolean;
|
|
1814
|
-
/**
|
|
1815
|
-
* True when ST scroller and horizontal flag match the configured page scroll context.
|
|
1816
|
-
*/
|
|
1817
|
-
declare function isPageScrollTrigger(st: unknown, context?: PageScrollContext): boolean;
|
|
1818
|
-
declare function isVerticalPageScrollTrigger(st: unknown, context?: PageScrollContext): boolean;
|
|
1819
|
-
|
|
1820
|
-
type TheatrePageScrollConfig = {
|
|
1821
|
-
/** Default scroller for page-mode layout helpers; `null` = native document. */
|
|
1822
|
-
scroller?: PageScrollScroller;
|
|
1823
|
-
/** Scroll axis (default vertical). */
|
|
1824
|
-
axis?: PageScrollAxis;
|
|
1825
|
-
};
|
|
1826
|
-
declare function configureTheatrePageScroll(config: TheatrePageScrollConfig): {
|
|
1827
|
-
reset: () => void;
|
|
1828
|
-
};
|
|
1829
|
-
declare function getTheatrePageScrollConfig(): TheatrePageScrollConfig;
|
|
1830
|
-
/** Active page scroll context from {@link configureTheatrePageScroll}. */
|
|
1831
|
-
declare function getTheatrePageScrollContext(): PageScrollContext;
|
|
1832
|
-
declare function createDefaultPageScrollDriver(scroller?: PageScrollScroller, axis?: PageScrollAxis): ScrollDriver;
|
|
1833
|
-
type AttachTheatrePageScrollOptions = {
|
|
1834
|
-
driver?: ScrollDriver;
|
|
1835
|
-
};
|
|
1836
|
-
/**
|
|
1837
|
-
* Wires page-mode scroll → sequence sync using {@link configureTheatrePageScroll}
|
|
1838
|
-
* or an explicit driver (Lenis, overflow containers, etc.).
|
|
1839
|
-
*/
|
|
1840
|
-
declare function attachTheatrePageScroll(sheet: ISheet, options?: AttachTheatrePageScrollOptions): () => void;
|
|
1841
|
-
|
|
1842
1791
|
/**
|
|
1843
1792
|
* Returns a project of the given id, or creates one if it doesn't already exist.
|
|
1844
1793
|
*
|
|
1845
1794
|
* @remarks
|
|
1846
1795
|
* If \@unseenco/theatre-studio is also loaded, then the state of the project will be managed by the studio.
|
|
1847
1796
|
*
|
|
1848
|
-
* [Learn more about exporting](https://
|
|
1797
|
+
* [Learn more about exporting](https://www.theatrejs.com/docs/latest/manual/projects#state)
|
|
1849
1798
|
*
|
|
1850
1799
|
* @example
|
|
1851
1800
|
* Usage:
|
|
@@ -1870,7 +1819,7 @@ declare function getProject(id: string, config?: IProjectConfig): IProject;
|
|
|
1870
1819
|
*
|
|
1871
1820
|
* @param pointer - A Pointer (like `object.props.x`)
|
|
1872
1821
|
* @param callback - The callback is called every time the value of pointer changes
|
|
1873
|
-
* @param rafDriver - (optional) The `rafDriver` to use. Learn how to use `rafDriver`s [from the docs](https://
|
|
1822
|
+
* @param rafDriver - (optional) The `rafDriver` to use. Learn how to use `rafDriver`s [from the docs](https://www.theatrejs.com/docs/latest/manual/advanced#rafdrivers).
|
|
1874
1823
|
* @returns An unsubscribe function
|
|
1875
1824
|
*
|
|
1876
1825
|
* @example
|
|
@@ -1907,6 +1856,57 @@ declare function onChange<P extends PointerType<$IntentionalAny> | Prism<$Intent
|
|
|
1907
1856
|
*/
|
|
1908
1857
|
declare function val<T>(pointer: PointerType<T>): T;
|
|
1909
1858
|
|
|
1859
|
+
/**
|
|
1860
|
+
* Drives registered GSAP animations from the sheet sequence playhead.
|
|
1861
|
+
*
|
|
1862
|
+
* @returns Disposer — call to detach the bridge.
|
|
1863
|
+
*/
|
|
1864
|
+
declare function attachGsapSequenceBridge(sheet: ISheet): () => void;
|
|
1865
|
+
|
|
1866
|
+
/** `null` = native document scroll (window / documentElement). */
|
|
1867
|
+
type PageScrollScroller = Window | Element | null;
|
|
1868
|
+
type PageScrollAxis = 'vertical' | 'horizontal';
|
|
1869
|
+
type PageScrollContext = {
|
|
1870
|
+
scroller: PageScrollScroller;
|
|
1871
|
+
/** Scroll axis for page mode and ScrollTrigger registration (default vertical). */
|
|
1872
|
+
axis?: PageScrollAxis;
|
|
1873
|
+
};
|
|
1874
|
+
declare const defaultPageScrollContext: PageScrollContext;
|
|
1875
|
+
declare function setActivePageScrollContext(context: PageScrollContext): void;
|
|
1876
|
+
declare function getActivePageScrollContext(): PageScrollContext;
|
|
1877
|
+
declare function resolvePageScrollAxis(context?: PageScrollContext): PageScrollAxis;
|
|
1878
|
+
declare function resolvePageScrollScroller(st: unknown, defaultsScroller?: PageScrollScroller): PageScrollScroller;
|
|
1879
|
+
declare function isNativeDocumentScroller(scroller: PageScrollScroller): boolean;
|
|
1880
|
+
/** Same scroller target for page-mode scroll registration (reference equality or both native doc). */
|
|
1881
|
+
declare function pageScrollScrollersMatch(a: PageScrollScroller, b: PageScrollScroller): boolean;
|
|
1882
|
+
/**
|
|
1883
|
+
* True when ST scroller and horizontal flag match the configured page scroll context.
|
|
1884
|
+
*/
|
|
1885
|
+
declare function isPageScrollTrigger(st: unknown, context?: PageScrollContext): boolean;
|
|
1886
|
+
declare function isVerticalPageScrollTrigger(st: unknown, context?: PageScrollContext): boolean;
|
|
1887
|
+
|
|
1888
|
+
type TheatrePageScrollConfig = {
|
|
1889
|
+
/** Default scroller for page-mode layout helpers; `null` = native document. */
|
|
1890
|
+
scroller?: PageScrollScroller;
|
|
1891
|
+
/** Scroll axis (default vertical). */
|
|
1892
|
+
axis?: PageScrollAxis;
|
|
1893
|
+
};
|
|
1894
|
+
declare function configureTheatrePageScroll(config: TheatrePageScrollConfig): {
|
|
1895
|
+
reset: () => void;
|
|
1896
|
+
};
|
|
1897
|
+
declare function getTheatrePageScrollConfig(): TheatrePageScrollConfig;
|
|
1898
|
+
/** Active page scroll context from {@link configureTheatrePageScroll}. */
|
|
1899
|
+
declare function getTheatrePageScrollContext(): PageScrollContext;
|
|
1900
|
+
declare function createDefaultPageScrollDriver(scroller?: PageScrollScroller, axis?: PageScrollAxis): ScrollDriver;
|
|
1901
|
+
type AttachTheatrePageScrollOptions = {
|
|
1902
|
+
driver?: ScrollDriver;
|
|
1903
|
+
};
|
|
1904
|
+
/**
|
|
1905
|
+
* Wires page-mode scroll → sequence sync using {@link configureTheatrePageScroll}
|
|
1906
|
+
* or an explicit driver (Lenis, overflow containers, etc.).
|
|
1907
|
+
*/
|
|
1908
|
+
declare function attachTheatrePageScroll(sheet: ISheet, options?: AttachTheatrePageScrollOptions): () => void;
|
|
1909
|
+
|
|
1910
1910
|
/**
|
|
1911
1911
|
* The library providing the runtime functionality of Theatre.js.
|
|
1912
1912
|
*
|