@player-ui/auto-scroll-manager-plugin-react 0.3.0-next.3 → 0.3.0-next.4

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/dist/index.cjs.js CHANGED
@@ -123,8 +123,8 @@ class AutoScrollManagerPlugin {
123
123
  });
124
124
  });
125
125
  }
126
- applyWeb(webPlayer) {
127
- webPlayer.hooks.webComponent.tap(this.name, (Comp) => {
126
+ applyReact(reactPlayer) {
127
+ reactPlayer.hooks.webComponent.tap(this.name, (Comp) => {
128
128
  return () => {
129
129
  const { scrollFn } = this;
130
130
  return /* @__PURE__ */ React__default["default"].createElement(AutoScrollProvider, {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { WebPlayerPlugin, WebPlayer } from '@player-ui/react';
2
+ import { ReactPlayerPlugin, ReactPlayer } from '@player-ui/react';
3
3
  import { Player } from '@player-ui/player';
4
4
 
5
5
  interface AutoScrollProviderProps {
@@ -34,7 +34,7 @@ interface AutoScrollManagerConfig {
34
34
  autoFocusOnErrorField?: boolean;
35
35
  }
36
36
  /** A plugin to manage scrolling behavior */
37
- declare class AutoScrollManagerPlugin implements WebPlayerPlugin {
37
+ declare class AutoScrollManagerPlugin implements ReactPlayerPlugin {
38
38
  name: string;
39
39
  /** Toggles if we should auto scroll to to the first failed validation on page load */
40
40
  private autoScrollOnLoad;
@@ -51,7 +51,7 @@ declare class AutoScrollManagerPlugin implements WebPlayerPlugin {
51
51
  getFirstScrollableElement(idList: Set<string>, type: ScrollType): string;
52
52
  calculateScroll(scrollableElements: Map<ScrollType, Set<string>>): string;
53
53
  apply(player: Player): void;
54
- applyWeb(webPlayer: WebPlayer): void;
54
+ applyReact(reactPlayer: ReactPlayer): void;
55
55
  }
56
56
 
57
57
  export { AutoScrollManagerConfig, AutoScrollManagerContext, AutoScrollManagerPlugin, AutoScrollProvider, AutoScrollProviderProps, RegisterData, ScrollFunction, ScrollType, useRegisterAsScrollable };
package/dist/index.esm.js CHANGED
@@ -114,8 +114,8 @@ class AutoScrollManagerPlugin {
114
114
  });
115
115
  });
116
116
  }
117
- applyWeb(webPlayer) {
118
- webPlayer.hooks.webComponent.tap(this.name, (Comp) => {
117
+ applyReact(reactPlayer) {
118
+ reactPlayer.hooks.webComponent.tap(this.name, (Comp) => {
119
119
  return () => {
120
120
  const { scrollFn } = this;
121
121
  return /* @__PURE__ */ React.createElement(AutoScrollProvider, {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@player-ui/auto-scroll-manager-plugin-react",
3
- "version": "0.3.0-next.3",
3
+ "version": "0.3.0-next.4",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"
7
7
  },
8
8
  "peerDependencies": {
9
- "@player-ui/react": "0.3.0-next.3"
9
+ "@player-ui/react": "0.3.0-next.4"
10
10
  },
11
11
  "dependencies": {
12
12
  "smooth-scroll-into-view-if-needed": "1.1.32",
package/src/plugin.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import type { WebPlayer, WebPlayerPlugin } from '@player-ui/react';
1
+ import type { ReactPlayer, ReactPlayerPlugin } from '@player-ui/react';
2
2
  import type { Player } from '@player-ui/player';
3
3
  import React from 'react';
4
4
  import { AutoScrollProvider } from './hooks';
@@ -17,7 +17,7 @@ export interface AutoScrollManagerConfig {
17
17
  }
18
18
 
19
19
  /** A plugin to manage scrolling behavior */
20
- export class AutoScrollManagerPlugin implements WebPlayerPlugin {
20
+ export class AutoScrollManagerPlugin implements ReactPlayerPlugin {
21
21
  name = 'auto-scroll-manager';
22
22
 
23
23
  /** Toggles if we should auto scroll to to the first failed validation on page load */
@@ -137,8 +137,8 @@ export class AutoScrollManagerPlugin implements WebPlayerPlugin {
137
137
  });
138
138
  }
139
139
 
140
- applyWeb(webPlayer: WebPlayer) {
141
- webPlayer.hooks.webComponent.tap(this.name, (Comp) => {
140
+ applyReact(reactPlayer: ReactPlayer) {
141
+ reactPlayer.hooks.webComponent.tap(this.name, (Comp) => {
142
142
  return () => {
143
143
  const { scrollFn } = this;
144
144