cineview 1.0.0 → 1.0.1

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.
Files changed (52) hide show
  1. package/README.md +87 -251
  2. package/README.zh-CN.md +87 -251
  3. package/dist/animations/presets/index.d.ts +1 -1
  4. package/dist/artifacts.json +2 -2
  5. package/dist/cineview-dev.es.mjs +1 -1
  6. package/dist/cineview-drag.umd.js +1 -1
  7. package/dist/cineview-scroll.umd.js +1 -1
  8. package/dist/cineview.es.mjs +1 -1
  9. package/dist/cineview.umd.js +1 -1
  10. package/dist/components/Animate/animateSemantics.d.ts +0 -1
  11. package/dist/components/{CineView/CineView.d.ts → Cineview/Cineview.d.ts} +3 -5
  12. package/dist/components/Cineview/CineviewDispatch.d.ts +2 -0
  13. package/dist/components/Cineview/DirectScrollCineview.d.ts +8 -0
  14. package/dist/components/{CineView → Cineview}/directScrollHelpers.d.ts +4 -2
  15. package/dist/components/Cineview/index.d.ts +5 -0
  16. package/dist/components/{CineView → Cineview}/preloadTargets.d.ts +2 -2
  17. package/dist/components/{CineView → Cineview}/regroupCallbacks.d.ts +5 -5
  18. package/dist/components/{CineView/useCineViewImperativeApi.d.ts → Cineview/useCineviewImperativeApi.d.ts} +3 -3
  19. package/dist/components/{CineView → Cineview}/useScrollZoneRegistry.d.ts +3 -2
  20. package/dist/components/Scene/sceneScrollBudget.d.ts +2 -0
  21. package/dist/components/Scene/sceneScrollRuntime.d.ts +0 -1
  22. package/dist/components/Scene/useSceneAnimationRegistry.d.ts +2 -2
  23. package/dist/components/Scene/useSceneScrollTakeover.d.ts +0 -1
  24. package/dist/components/runtime/runtimeContext.d.ts +3 -3
  25. package/dist/components/runtime/scrollSceneFrameStore.d.ts +1 -1
  26. package/dist/context/{CineViewContext.d.ts → CineviewContext.d.ts} +8 -8
  27. package/dist/dev/PerfPanel.d.ts +1 -1
  28. package/dist/dev/usePerfMonitor.d.ts +4 -4
  29. package/dist/entry-drag.d.ts +5 -5
  30. package/dist/entry-scroll.d.ts +5 -5
  31. package/dist/hooks/useFirstSceneEnter.d.ts +3 -3
  32. package/dist/hooks/usePrefersReducedMotion.d.ts +1 -1
  33. package/dist/hooks/useSceneManager.d.ts +1 -0
  34. package/dist/index.d.ts +1 -1
  35. package/dist/public-api.d.ts +1 -1
  36. package/dist/types/index.d.ts +39 -42
  37. package/dist/utils/animationHelpers.d.ts +2 -2
  38. package/dist/utils/devLog.d.ts +1 -1
  39. package/dist/utils/performanceMonitor.d.ts +1 -1
  40. package/package.json +17 -13
  41. package/dist/components/CineView/CineViewDispatch.d.ts +0 -2
  42. package/dist/components/CineView/DirectScrollCineView.d.ts +0 -5
  43. package/dist/components/CineView/index.d.ts +0 -5
  44. /package/dist/components/{CineView → Cineview}/DragSceneStack.d.ts +0 -0
  45. /package/dist/components/{CineView → Cineview}/ScrollSceneSlot.d.ts +0 -0
  46. /package/dist/components/{CineView → Cineview}/ScrollSceneStack.d.ts +0 -0
  47. /package/dist/components/{CineView → Cineview}/ScrollbarOverlay.d.ts +0 -0
  48. /package/dist/components/{CineView → Cineview}/useNativeScrollController.d.ts +0 -0
  49. /package/dist/components/{CineView → Cineview}/useScrollInputBindings.d.ts +0 -0
  50. /package/dist/components/{CineView → Cineview}/useScrollSceneLayout.d.ts +0 -0
  51. /package/dist/components/{CineView → Cineview}/useScrollSceneSnapshots.d.ts +0 -0
  52. /package/dist/components/{CineView → Cineview}/useScrollViewport.d.ts +0 -0
@@ -13,7 +13,6 @@ export interface NormalizedAnimateTimeline {
13
13
  driver: 'scene' | 'clock';
14
14
  delay: number;
15
15
  after?: string;
16
- zoneId?: string;
17
16
  phase?: {
18
17
  start?: number;
19
18
  end?: number;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { AnimationType, CineViewRef, DragModeConfig, SceneProps, ScrollMode } from '../../types';
2
+ import { AnimationType, CineviewRef, DragModeConfig, SceneProps, ScrollMode } from '../../types';
3
3
  type SceneAuthoringCompatProps = SceneProps & {
4
4
  mode?: ScrollMode;
5
5
  slideDirection?: 'x' | 'y';
@@ -23,16 +23,14 @@ export declare function resolveRootSceneStackMode(sceneProps: Pick<SceneAuthorin
23
23
  * script-tag consumers using only drag shouldn't carry it).
24
24
  * Not re-exported from barrel: public API remains only `CineView` + `mode` prop.
25
25
  */
26
- export declare const CineViewDragEngine: React.ForwardRefExoticComponent<import('../..').CineViewBaseProps & DragModeConfig & {
26
+ export declare const CineviewDragEngine: React.ForwardRefExoticComponent<import('../..').CineviewBaseProps & DragModeConfig & {
27
27
  mode?: "drag";
28
28
  callbacks?: import('../..').DragModeCallbacks;
29
29
  } & {
30
- zoneTrigger?: undefined;
31
30
  sceneSizing?: undefined;
32
31
  enterMargin?: undefined;
33
32
  exitMargin?: undefined;
34
- debug?: undefined;
35
- } & React.RefAttributes<CineViewRef>>;
33
+ } & React.RefAttributes<CineviewRef>>;
36
34
  export {};
37
35
  /**
38
36
  * ⚠️ Mode dispatcher is NOT in this file, see `CineViewDispatch.tsx`.
@@ -0,0 +1,2 @@
1
+ import { CineviewProps, CineviewRef } from '../../types';
2
+ export declare const Cineview: import('react').ForwardRefExoticComponent<CineviewProps & import('react').RefAttributes<CineviewRef>>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { CineviewRef, CineviewScrollModeProps } from '../../types';
3
+ export declare const DirectScrollCineView: React.ForwardRefExoticComponent<Omit<CineviewScrollModeProps, "mode"> & {
4
+ mode?: "scroll";
5
+ } & React.RefAttributes<CineviewRef>>;
6
+ export declare const DirectScrollCineview: React.ForwardRefExoticComponent<Omit<CineviewScrollModeProps, "mode"> & {
7
+ mode?: "scroll";
8
+ } & React.RefAttributes<CineviewRef>>;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { AnimationType, CineViewBaseProps, ScrollTimelineState, SceneProps } from '../../types';
2
+ import { AnimationType, CineviewBaseProps, ScrollTimelineState, SceneProps } from '../../types';
3
3
  export type SceneAuthoringCompatProps = SceneProps & {
4
4
  sceneId?: string;
5
5
  sceneHeight?: number | string;
@@ -34,6 +34,8 @@ export declare const TAKEOVER_PROGRESS_SNAP_EPSILON_PX = 0.01;
34
34
  export declare const CENTER_LOCK_BOUNDARY_EPSILON_PX = 0.5;
35
35
  export declare function isScrollDebugEnabled(explicit?: boolean): boolean;
36
36
  export declare function clamp(value: number, min: number, max: number): number;
37
+ /** Keep authored Scene identity independent of its current position in the list. */
38
+ export declare function getSceneIdentity(scene: React.ReactElement, index: number): string;
37
39
  export declare function normalizeWheelDeltaPx(delta: number, deltaMode: number, viewportSpan: number): number;
38
40
  export declare function normalizeTouchDeltaPx(delta: number): number;
39
41
  export declare function shouldDeferToNestedScrollable(target: EventTarget | null, root: HTMLElement, direction: 'x' | 'y', deltaPx: number): boolean;
@@ -56,7 +58,7 @@ export declare function isEditableOrInteractiveScrollKeyTarget(target: EventTarg
56
58
  export declare function shouldIgnoreGlobalScrollKey(event: KeyboardEvent): boolean;
57
59
  export declare function isSceneElement(node: React.ReactNode): node is React.ReactElement<SceneAuthoringCompatProps>;
58
60
  export declare function isLegacyDisplayNameSceneElement(node: React.ReactNode): boolean;
59
- export declare function resolveDesignDimensions(designWidth: CineViewBaseProps['designWidth'] | undefined): {
61
+ export declare function resolveDesignDimensions(designWidth: CineviewBaseProps['designWidth'] | undefined): {
60
62
  designSize: number;
61
63
  };
62
64
  export declare function getSceneTransitionConfig(sceneProps: SceneAuthoringCompatProps): {
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Cineview component exports
3
+ */
4
+ export { Cineview } from './CineviewDispatch';
5
+ export type { CineviewPreloadTarget, CineviewProps, CineviewRef } from '../../types';
@@ -1,4 +1,4 @@
1
- import { CineViewPreloadTarget } from '../../types';
1
+ import { CineviewPreloadTarget } from '../../types';
2
2
  interface ScenePreloadTargetProps {
3
3
  sceneId?: string;
4
4
  scroll?: {
@@ -12,7 +12,7 @@ interface ScenePreloadSceneLike {
12
12
  props: ScenePreloadTargetProps;
13
13
  }
14
14
  export declare function getScenePreloadImages(sceneProps: ScenePreloadTargetProps): string[];
15
- export declare function resolveScenePreloadTargetImages(scenes: ScenePreloadSceneLike[], targets?: CineViewPreloadTarget[], options?: {
15
+ export declare function resolveScenePreloadTargetImages(scenes: ScenePreloadSceneLike[], targets?: CineviewPreloadTarget[], options?: {
16
16
  includeZoneIds?: boolean;
17
17
  }): string[];
18
18
  export {};
@@ -1,10 +1,10 @@
1
- import { CineViewCommonCallbacks, CineViewDragCallbacks, CineViewScrollCallbacks } from '../../types';
1
+ import { CineviewCommonCallbacks, CineviewDragCallbacks, CineviewScrollCallbacks } from '../../types';
2
2
  /** Superset of every flat callback key a consumer might pass (any mode). */
3
- export type FlatCallbacks = CineViewCommonCallbacks & CineViewDragCallbacks & CineViewScrollCallbacks;
3
+ export type FlatCallbacks = CineviewCommonCallbacks & CineviewDragCallbacks & CineviewScrollCallbacks;
4
4
  /** Internal grouped shape the runtime reads from. */
5
5
  export interface GroupedCallbacks {
6
- common?: CineViewCommonCallbacks;
7
- drag?: CineViewDragCallbacks;
8
- scroll?: CineViewScrollCallbacks;
6
+ common?: CineviewCommonCallbacks;
7
+ drag?: CineviewDragCallbacks;
8
+ scroll?: CineviewScrollCallbacks;
9
9
  }
10
10
  export declare function regroupCallbacks(flat: FlatCallbacks | undefined): GroupedCallbacks;
@@ -1,5 +1,5 @@
1
1
  import { ForwardedRef, MutableRefObject } from 'react';
2
- import { CineViewRef } from '../../types';
2
+ import { CineviewRef } from '../../types';
3
3
  import { GroupedCallbacks } from './regroupCallbacks';
4
4
  interface SceneActionsPort {
5
5
  goToScene: (index: number, animated?: boolean) => void;
@@ -9,7 +9,7 @@ interface PreloadActionsPort {
9
9
  startPreload: () => Promise<void>;
10
10
  }
11
11
  interface UseCineViewImperativeApiParams {
12
- ref: ForwardedRef<CineViewRef>;
12
+ ref: ForwardedRef<CineviewRef>;
13
13
  currentSceneRef: MutableRefObject<number>;
14
14
  scenesRef: MutableRefObject<React.ReactElement[]>;
15
15
  sceneActionsRef: MutableRefObject<SceneActionsPort>;
@@ -17,5 +17,5 @@ interface UseCineViewImperativeApiParams {
17
17
  measureViewportRef: MutableRefObject<(() => void) | null>;
18
18
  resolvedCallbacksRef: MutableRefObject<GroupedCallbacks>;
19
19
  }
20
- export declare function useCineViewImperativeApi({ ref, currentSceneRef, scenesRef, sceneActionsRef, preloadActionsRef, measureViewportRef, resolvedCallbacksRef, }: UseCineViewImperativeApiParams): CineViewRef;
20
+ export declare function useCineviewImperativeApi({ ref, currentSceneRef, scenesRef, sceneActionsRef, preloadActionsRef, measureViewportRef, resolvedCallbacksRef, }: UseCineViewImperativeApiParams): CineviewRef;
21
21
  export {};
@@ -1,9 +1,9 @@
1
1
  import { MutableRefObject } from 'react';
2
2
  import { SceneScrollRuntimeContextValue, SceneScrollTimelineState, SceneScrollTimelineStore } from '../Scene/sceneScrollRuntime';
3
3
  import { SceneScrollAnimationRegistration } from '../Scene/sceneScrollBudget';
4
+ import { CineviewErrorDetail } from '../../types';
4
5
  export interface ScrollZoneRegistration {
5
6
  sceneIndex: number;
6
- trigger: 'center-lock';
7
7
  element: HTMLElement | null;
8
8
  }
9
9
  export type ScrollZoneRegistryRef = MutableRefObject<Map<string, ScrollZoneRegistration>>;
@@ -14,6 +14,7 @@ interface UseScrollZoneRegistryParams {
14
14
  scrollOffsetRef: MutableRefObject<number>;
15
15
  measureSceneLayoutsRef: MutableRefObject<(() => void) | null>;
16
16
  updateSceneRenderSnapshotsRef: MutableRefObject<(nativeOffset: number) => void>;
17
+ onError?: (detail: CineviewErrorDetail) => void;
17
18
  }
18
19
  export interface ScrollZoneRegistryPort {
19
20
  zoneRegistryRef: ScrollZoneRegistryRef;
@@ -30,5 +31,5 @@ export interface ScrollZoneRegistryPort {
30
31
  store: ScrollTimelineStore;
31
32
  };
32
33
  }
33
- export declare function useScrollZoneRegistry({ scrollOffsetRef, measureSceneLayoutsRef, updateSceneRenderSnapshotsRef, }: UseScrollZoneRegistryParams): ScrollZoneRegistryPort;
34
+ export declare function useScrollZoneRegistry({ scrollOffsetRef, measureSceneLayoutsRef, updateSceneRenderSnapshotsRef, onError, }: UseScrollZoneRegistryParams): ScrollZoneRegistryPort;
34
35
  export {};
@@ -31,6 +31,8 @@ export interface ResolvedSceneScrollSequence {
31
31
  budgets: Record<string, SceneScrollAnimationBudget>;
32
32
  totalDurationMs: number;
33
33
  totalBudgetPx: number;
34
+ /** Phase declarations ignored because their dependency timing has no finite solution. */
35
+ invalidPhaseIds?: string[];
34
36
  }
35
37
  export declare function resolveSceneScrollAnimationBudgets(registrations: Map<string, SceneScrollAnimationRegistration>): ResolvedSceneScrollSequence;
36
38
  export declare function areResolvedSceneScrollSequencesEqual(left: ResolvedSceneScrollSequence, right: ResolvedSceneScrollSequence): boolean;
@@ -33,7 +33,6 @@ export interface SceneScrollTimelineState {
33
33
  export interface SceneScrollRuntimeContextValue {
34
34
  registerZone: (zoneId: string, config: {
35
35
  sceneIndex: number;
36
- trigger: 'center-lock';
37
36
  }) => void;
38
37
  unregisterZone: (zoneId: string, sceneIndex: number) => void;
39
38
  setZoneElement: (zoneId: string, sceneIndex: number, element: HTMLElement | null) => void;
@@ -1,10 +1,10 @@
1
1
  import { AnimateRegistrationInfo, AnimateTimelineLane, FrozenAnimationRegistrySnapshot } from '../../animations/registry';
2
2
  import { ParsedAnimationVariant } from '../../types';
3
- import { CineViewRuntimeContextValue } from '../runtime/runtimeContext';
3
+ import { CineviewRuntimeContextValue } from '../runtime/runtimeContext';
4
4
  interface UseSceneAnimationRegistryParams {
5
5
  sceneIndex: number;
6
6
  baseDuration: number;
7
- reportError?: CineViewRuntimeContextValue['reportError'];
7
+ reportError?: CineviewRuntimeContextValue['reportError'];
8
8
  onStableSnapshot?: (snapshot: FrozenAnimationRegistrySnapshot, revision: number, enterVariantsByAnimateId: ReadonlyMap<string, ParsedAnimationVariant>) => void;
9
9
  }
10
10
  export interface ScenePreparationLease {
@@ -6,7 +6,6 @@ interface SceneScrollTakeoverConfig {
6
6
  mode: ScrollMode;
7
7
  scroll?: {
8
8
  zoneId?: string;
9
- trigger?: 'center-lock';
10
9
  };
11
10
  elementRef: RefObject<HTMLElement | null>;
12
11
  }
@@ -1,5 +1,5 @@
1
1
  import { ScrollMode } from '../../types';
2
- export interface CineViewRuntimeContextValue {
2
+ export interface CineviewRuntimeContextValue {
3
3
  mode: ScrollMode;
4
4
  reportError?: (detail: {
5
5
  code: string;
@@ -10,5 +10,5 @@ export interface CineViewRuntimeContextValue {
10
10
  scrollExitMargin?: number;
11
11
  prefersReducedMotion?: boolean;
12
12
  }
13
- export declare const CineViewRuntimeContext: import('react').Context<CineViewRuntimeContextValue | null>;
14
- export declare function useCineViewRuntimeContext(): CineViewRuntimeContextValue | null;
13
+ export declare const CineviewRuntimeContext: import('react').Context<CineviewRuntimeContextValue | null>;
14
+ export declare function useCineviewRuntimeContext(): CineviewRuntimeContextValue | null;
@@ -1,5 +1,5 @@
1
1
  import { ScrollTimelineState } from '../../types';
2
- import { ScrollInputDirection } from '../CineView/directScrollHelpers';
2
+ import { ScrollInputDirection } from '../Cineview/directScrollHelpers';
3
3
  /**
4
4
  * Continuous values for one scroll Scene. This channel is deliberately
5
5
  * separate from the React render snapshot: the native scroll controller is the
@@ -1,25 +1,25 @@
1
1
  import { default as React } from 'react';
2
- export interface CineViewContextValue {
2
+ export interface CineviewContextValue {
3
3
  /** px2vw single-ruler ratio: `viewportWidth / size`. Only useAnimateScroll gate margin conversion reads this. */
4
4
  scale: number;
5
5
  /** px2vw single-ruler conversion: design px → physical px (`size * scale`). Shared by all length values. */
6
6
  convert: (size: number) => number;
7
7
  }
8
- declare const CineViewContext: React.Context<CineViewContextValue | null>;
9
- export { CineViewContext };
10
- export interface CineViewProviderProps {
8
+ declare const CineviewContext: React.Context<CineviewContextValue | null>;
9
+ export { CineviewContext };
10
+ export interface CineviewProviderProps {
11
11
  /** Design spec size baseline (design px). Single conversion ruler site-wide: `scale = viewportWidth / designSize`. */
12
12
  designSize?: number;
13
13
  children: React.ReactNode;
14
14
  }
15
- export declare const CineViewProvider: React.FC<CineViewProviderProps>;
15
+ export declare const CineviewProvider: React.FC<CineviewProviderProps>;
16
16
  /**
17
- * Use CineView context
17
+ * Use Cineview context
18
18
  */
19
- export declare const useCineViewContext: () => CineViewContextValue | null;
19
+ export declare const useCineviewContext: () => CineviewContextValue | null;
20
20
  /**
21
21
  * Use size conversion function
22
22
  * Convenience hook for directly obtaining the convert function (px2vw single ruler) in components.
23
- * Returns stable identity function (no conversion) when used outside CineView, with one-time dev warning.
23
+ * Returns stable identity function (no conversion) when used outside Cineview, with one-time dev warning.
24
24
  */
25
25
  export declare const useConvertSize: () => ((size: number) => number);
@@ -4,7 +4,7 @@ export interface PerfPanelProps {
4
4
  position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
5
5
  /** 是否默认展开 */
6
6
  defaultExpanded?: boolean;
7
- /** Public CineView ref (usually captured from callbacks.onReady). */
7
+ /** Public Cineview ref (usually captured from callbacks.onReady). */
8
8
  source?: PerformanceSource | null;
9
9
  /** Disable polling while the panel is hidden. */
10
10
  enabled?: boolean;
@@ -1,9 +1,9 @@
1
- import { CineViewRef, PerformanceMetrics } from '../types';
2
- /** Public CineView ref methods consumed by development tools. */
3
- export type PerformanceSource = Pick<CineViewRef, 'getPerformanceMetrics'>;
1
+ import { CineviewRef, PerformanceMetrics } from '../types';
2
+ /** Public Cineview ref methods consumed by development tools. */
3
+ export type PerformanceSource = Pick<CineviewRef, 'getPerformanceMetrics'>;
4
4
  export interface PerfStats {
5
5
  current: PerformanceMetrics;
6
6
  history: readonly PerformanceMetrics[];
7
7
  }
8
- /** Subscribe to shared, 500ms snapshots from a CineView ref with `monitor` enabled. */
8
+ /** Subscribe to shared, 500ms snapshots from a Cineview ref with `monitor` enabled. */
9
9
  export declare function usePerfMonitor(source: PerformanceSource | null | undefined, enabled?: boolean): PerfStats | null;
@@ -1,14 +1,14 @@
1
1
  // 由 scripts/build-all.mjs 生成,请勿手改。
2
- // 拖拽专用入口的类型面:与全量入口的唯一差异是 `CineView` 不接受 `mode`
2
+ // 拖拽专用入口的类型面:与全量入口的唯一差异是 `Cineview` 不接受 `mode`
3
3
  // (本产物只含拖拽引擎;需要另一种模式请用 "cineview/scroll",
4
4
  // 需要运行时按 mode 切换请用 "cineview")。
5
5
  import type { ForwardRefExoticComponent, RefAttributes } from 'react';
6
- import type { CineViewProps, CineViewRef } from './index';
6
+ import type { CineviewProps, CineviewRef } from './index';
7
7
 
8
8
  export * from './index';
9
9
 
10
- export declare type CineViewDragProps = Omit<Extract<CineViewProps, { mode?: 'drag' }>, 'mode'>;
10
+ export declare type CineviewDragProps = Omit<Extract<CineviewProps, { mode?: 'drag' }>, 'mode'>;
11
11
 
12
- export declare const CineView: ForwardRefExoticComponent<
13
- CineViewDragProps & RefAttributes<CineViewRef>
12
+ export declare const Cineview: ForwardRefExoticComponent<
13
+ CineviewDragProps & RefAttributes<CineviewRef>
14
14
  >;
@@ -1,14 +1,14 @@
1
1
  // 由 scripts/build-all.mjs 生成,请勿手改。
2
- // 滚动专用入口的类型面:与全量入口的唯一差异是 `CineView` 不接受 `mode`
2
+ // 滚动专用入口的类型面:与全量入口的唯一差异是 `Cineview` 不接受 `mode`
3
3
  // (本产物只含滚动引擎;需要另一种模式请用 "cineview/drag",
4
4
  // 需要运行时按 mode 切换请用 "cineview")。
5
5
  import type { ForwardRefExoticComponent, RefAttributes } from 'react';
6
- import type { CineViewProps, CineViewRef } from './index';
6
+ import type { CineviewProps, CineviewRef } from './index';
7
7
 
8
8
  export * from './index';
9
9
 
10
- export declare type CineViewScrollProps = Omit<Extract<CineViewProps, { mode: 'scroll' }>, 'mode'>;
10
+ export declare type CineviewScrollProps = Omit<Extract<CineviewProps, { mode: 'scroll' }>, 'mode'>;
11
11
 
12
- export declare const CineView: ForwardRefExoticComponent<
13
- CineViewScrollProps & RefAttributes<CineViewRef>
12
+ export declare const Cineview: ForwardRefExoticComponent<
13
+ CineviewScrollProps & RefAttributes<CineviewRef>
14
14
  >;
@@ -1,9 +1,9 @@
1
- import { CineViewErrorCode } from '../types';
1
+ import { CineviewErrorCode } from '../types';
2
2
  /**
3
3
  * Global first-screen cold-start gate. Mode-agnostic: owns the two decoupled
4
4
  * booleans that govern when the first mounted scene is allowed to play its
5
5
  * one-shot enter pass, plus the priority-asset / timeout / preventDefault /
6
- * static-reveal coordination that used to live inline in CineView.
6
+ * static-reveal coordination that used to live inline in Cineview.
7
7
  *
8
8
  * Two-boolean model (intentionally NOT a 3-state enum — see project memory):
9
9
  * - `firstSceneEnterActive` — the WINDOW flag. While true, the first scene is
@@ -41,7 +41,7 @@ export interface UseFirstSceneEnterParams {
41
41
  * the consumer handled it (preventDefault) — in which case the scene is left
42
42
  * at its initial visual for consumer-driven recovery instead of static reveal.
43
43
  */
44
- emitRecoverableError: (code: CineViewErrorCode, message: string, context?: Record<string, unknown>) => boolean;
44
+ emitRecoverableError: (code: CineviewErrorCode, message: string, context?: Record<string, unknown>) => boolean;
45
45
  /** Lazily read preload counts for the timeout error context. */
46
46
  getPreloadCounts: () => {
47
47
  loadedCount: number;
@@ -6,7 +6,7 @@
6
6
  * `false`: SSR has no media query, and rendering the reduced variant into HTML that
7
7
  * a full-motion client then hydrates would be the wrong default.
8
8
  *
9
- * Read this once at the CineView root and pass it down the runtime context — one
9
+ * Read this once at the Cineview root and pass it down the runtime context — one
10
10
  * matchMedia subscription per root, not one per Animate.
11
11
  */
12
12
  export declare function usePrefersReducedMotion(): boolean;
@@ -45,6 +45,7 @@ export interface SceneManagerState {
45
45
  scrollTransitionSnapshot: ScrollTransitionSnapshot | null;
46
46
  }
47
47
  export interface SceneManagerActions {
48
+ reconcileSceneList: (index: number) => void;
48
49
  goToScene: (index: number, animated?: boolean) => void;
49
50
  nextScene: () => void;
50
51
  prevScene: () => void;
package/dist/index.d.ts CHANGED
@@ -14,4 +14,4 @@
14
14
  * See `src/entry-drag.ts` / `src/entry-scroll.ts`.
15
15
  */
16
16
  export * from './public-api';
17
- export { CineView } from './components/CineView';
17
+ export { Cineview } from './components/Cineview';
@@ -9,4 +9,4 @@ export type { AnimateVideoProps } from './components/Animate/AnimateVideo';
9
9
  export declare const Animate: (props: AnimateProps) => ReactNode;
10
10
  export declare const Position: ForwardRefExoticComponent<PositionProps & RefAttributes<HTMLDivElement>>;
11
11
  export declare const Scene: ForwardRefExoticComponent<SceneProps & RefAttributes<HTMLDivElement>>;
12
- export type { SlideDirection, ScrollMode, SceneAnchor, SceneStackMode, DragThresholdConfig, DragTimelineUnit, SceneDragConfig, DragModeConfig, ScrollModeConfig, ScrollbarConfig, A11yConfig, SceneChangeDetail, CineViewErrorCode, CineViewErrorDetail, DragDetail, DragStartDetail, DragBlockedDetail, DragEndDetail, ZoneDetail, ZoneProgressDetail, SceneVisibilityDetail, CineViewCommonCallbacks, CineViewDragCallbacks, CineViewScrollCallbacks, DragModeCallbacks, ScrollModeCallbacks, CineViewCallbacks, PresetAnimation, CustomAnimation, ComposedAnimation, AnimationType, CineViewBaseProps, CineViewDragModeProps, CineViewScrollModeProps, CineViewProps, PerformanceMetrics, CineViewRef, CineViewScrollRef, CineViewPreloadTarget, AnimateProps, AnimateStaggerConfig, AnimateRenderState, AnimatePhase, AnimateTimelineLane, AnimateTimelineSource, AnimateTimelineFrame, AnimateTimeline, PositionProps, ContainerProps, SceneProps, } from './types';
12
+ export type { SlideDirection, ScrollMode, SceneAnchor, SceneStackMode, DragThresholdConfig, DragTimelineUnit, SceneDragConfig, DragModeConfig, ScrollModeConfig, ScrollbarConfig, A11yConfig, SceneChangeDetail, CineviewErrorCode, CineviewErrorDetail, DragDetail, DragStartDetail, DragBlockedDetail, DragEndDetail, ZoneDetail, ZoneProgressDetail, SceneVisibilityDetail, CineviewCommonCallbacks, CineviewDragCallbacks, CineviewScrollCallbacks, DragModeCallbacks, ScrollModeCallbacks, CineviewCallbacks, PresetAnimation, CustomAnimation, ComposedAnimation, AnimationType, CineviewBaseProps, CineviewDragModeProps, CineviewScrollModeProps, CineviewProps, PerformanceMetrics, CineviewRef, CineviewScrollRef, CineviewPreloadTarget, AnimateProps, AnimateStaggerConfig, AnimateRenderState, AnimatePhase, AnimateTimelineLane, AnimateTimelineSource, AnimateTimelineFrame, AnimateTimeline, PositionProps, ContainerProps, SceneProps, } from './types';