react-joyride
Advanced tools
Comparing version 2.6.2 to 2.7.0
@@ -1,2 +0,1 @@ | ||
import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
import * as React from 'react'; | ||
@@ -63,6 +62,2 @@ import { ReactNode, CSSProperties, ElementType, MouseEventHandler, RefCallback } from 'react'; | ||
type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'; | ||
interface ScopeOptions { | ||
code?: string; | ||
selector: string | null; | ||
} | ||
interface Styles { | ||
@@ -76,3 +71,3 @@ beacon: CSSProperties; | ||
buttonSkip: CSSProperties; | ||
options: StylesOptions; | ||
options: Partial<StylesOptions>; | ||
overlay: CSSProperties; | ||
@@ -298,6 +293,6 @@ overlayLegacy: CSSProperties; | ||
scrollToStep(previousState: State): void; | ||
render(): react_jsx_runtime.JSX.Element | null; | ||
render(): React.JSX.Element | null; | ||
} | ||
export { ACTIONS, Actions, AnyObject, BaseProps, BeaconProps, BeaconRenderProps, CallBackProps, Callback, EVENTS, Events, LIFECYCLE, Lifecycle, Locale, OverlayProps, Placement, Props, STATUS, ScopeOptions, State, Status, Step, StepMerged, StepProps, StoreHelpers, StoreOptions, Styles, StylesOptions, TooltipProps, TooltipRenderProps, Joyride as default }; | ||
export { ACTIONS, Actions, AnyObject, BaseProps, BeaconProps, BeaconRenderProps, CallBackProps, Callback, EVENTS, Events, LIFECYCLE, Lifecycle, Locale, OverlayProps, Placement, Props, STATUS, State, Status, Step, StepMerged, StepProps, StoreHelpers, StoreOptions, Styles, StylesOptions, TooltipProps, TooltipRenderProps, Joyride as default }; | ||
export = Joyride |
{ | ||
"name": "react-joyride", | ||
"version": "2.6.2", | ||
"version": "2.7.0", | ||
"description": "Create guided tours for your apps", | ||
@@ -41,3 +41,3 @@ "author": "Gil Barbara <gilbarbara@gmail.com>", | ||
"@gilbarbara/deep-equal": "^0.3.1", | ||
"@gilbarbara/helpers": "^0.8.7", | ||
"@gilbarbara/helpers": "^0.9.0", | ||
"deep-diff": "^1.0.2", | ||
@@ -51,25 +51,25 @@ "deepmerge": "^4.3.1", | ||
"scrollparent": "^2.1.0", | ||
"tree-changes": "^0.11.0", | ||
"type-fest": "^4.5.0" | ||
"tree-changes": "^0.11.1", | ||
"type-fest": "^4.7.1" | ||
}, | ||
"devDependencies": { | ||
"@gilbarbara/eslint-config": "^0.5.4", | ||
"@gilbarbara/eslint-config": "^0.7.1", | ||
"@gilbarbara/prettier-config": "^1.0.0", | ||
"@gilbarbara/tsconfig": "^0.2.3", | ||
"@playwright/experimental-ct-react": "^1.39.0", | ||
"@size-limit/preset-big-lib": "^10.0.1", | ||
"@swc/core": "^1.3.94", | ||
"@size-limit/preset-big-lib": "^10.0.2", | ||
"@swc/core": "^1.3.96", | ||
"@swc/jest": "^0.2.29", | ||
"@testing-library/dom": "^9.3.3", | ||
"@testing-library/jest-dom": "^6.1.4", | ||
"@testing-library/react": "^14.0.0", | ||
"@testing-library/react": "^14.1.0", | ||
"@total-typescript/shoehorn": "^0.1.1", | ||
"@types/exenv": "^1.2.1", | ||
"@types/jest": "^29.5.6", | ||
"@types/node": "^20.8.7", | ||
"@types/react": "^18.2.31", | ||
"@types/react-dom": "^18.2.14", | ||
"@types/scroll": "^3.0.2", | ||
"@types/scrollparent": "^2.0.2", | ||
"caniuse-lite": "^1.0.30001553", | ||
"@types/exenv": "^1.2.2", | ||
"@types/jest": "^29.5.8", | ||
"@types/node": "^20.9.0", | ||
"@types/react": "^18.2.37", | ||
"@types/react-dom": "^18.2.15", | ||
"@types/scroll": "^3.0.3", | ||
"@types/scrollparent": "^2.0.3", | ||
"caniuse-lite": "^1.0.30001561", | ||
"cross-env": "^7.0.3", | ||
@@ -89,3 +89,3 @@ "csstype": "^3.1.2", | ||
"repo-tools": "^0.3.1", | ||
"size-limit": "^10.0.1", | ||
"size-limit": "^10.0.2", | ||
"ts-jest": "^29.1.1", | ||
@@ -122,2 +122,3 @@ "ts-node": "^10.9.1", | ||
], | ||
"target": "es2018", | ||
"sourcemap": true, | ||
@@ -128,3 +129,5 @@ "splitting": false | ||
"extends": [ | ||
"@gilbarbara/eslint-config" | ||
"@gilbarbara/eslint-config", | ||
"@gilbarbara/eslint-config/jest", | ||
"@gilbarbara/eslint-config/testing-library" | ||
], | ||
@@ -153,4 +156,3 @@ "overrides": [ | ||
"eslint --fix", | ||
"jest --findRelatedTests --passWithNoTests", | ||
"npm run e2e" | ||
"jest --findRelatedTests --passWithNoTests" | ||
], | ||
@@ -157,0 +159,0 @@ "*.(css|graphql|js|json|jsx|less|md|mdx|scss|ts|tsx|yaml|yml)": [ |
# React Joyride | ||
[![](https://badge.fury.io/js/react-joyride.svg)](https://www.npmjs.com/package/react-joyride) [![CI](https://github.com/gilbarbara/react-joyride/actions/workflows/main.yml/badge.svg)](https://github.com/gilbarbara/react-joyride/actions/workflows/main.yml) [![](https://api.codeclimate.com/v1/badges/43ecb5536910133429bd/maintainability)](https://codeclimate.com/github/gilbarbara/react-joyride/maintainability) [![](https://api.codeclimate.com/v1/badges/43ecb5536910133429bd/test_coverage)](https://codeclimate.com/github/gilbarbara/react-joyride/test_coverage) | ||
[![](https://badge.fury.io/js/react-joyride.svg)](https://www.npmjs.com/package/react-joyride) [![CI](https://github.com/gilbarbara/react-joyride/actions/workflows/main.yml/badge.svg)](https://github.com/gilbarbara/react-joyride/actions/workflows/main.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara_react-joyride&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gilbarbara_react-joyride) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara_react-joyride&metric=coverage)](https://sonarcloud.io/summary/new_code?id=gilbarbara_react-joyride) | ||
@@ -5,0 +5,0 @@ [![Joyride example image](http://gilbarbara.com/files/react-joyride.png)](https://react-joyride.com/) |
@@ -199,3 +199,3 @@ import scroll from 'scroll'; | ||
*/ | ||
export function getScrollTo(element: HTMLElement, offset: number, skipFix: boolean): number { | ||
export function getScrollTo(element: HTMLElement | null, offset: number, skipFix: boolean): number { | ||
if (!element) { | ||
@@ -202,0 +202,0 @@ return 0; |
@@ -28,3 +28,3 @@ import { isValidElement, ReactNode } from 'react'; | ||
step: Step; | ||
target: HTMLElement; | ||
target: HTMLElement | null; | ||
} | ||
@@ -31,0 +31,0 @@ |
@@ -1,2 +0,5 @@ | ||
import { ScopeOptions } from '~/types'; | ||
interface ScopeOptions { | ||
code?: string; | ||
selector: string | null; | ||
} | ||
@@ -131,9 +134,9 @@ export default class Scope { | ||
const target = this.element.querySelector(selector) as HTMLElement; | ||
const target = this.element.querySelector(selector); | ||
/* istanbul ignore else */ | ||
if (target) { | ||
window.requestAnimationFrame(() => this.checkFocus(target)); | ||
window.requestAnimationFrame(() => this.checkFocus(target as HTMLElement)); | ||
} | ||
}; | ||
} |
@@ -36,7 +36,2 @@ import { CSSProperties, ReactNode } from 'react'; | ||
export interface ScopeOptions { | ||
code?: string; | ||
selector: string | null; | ||
} | ||
export interface Styles { | ||
@@ -50,3 +45,3 @@ beacon: CSSProperties; | ||
buttonSkip: CSSProperties; | ||
options: StylesOptions; | ||
options: Partial<StylesOptions>; | ||
overlay: CSSProperties; | ||
@@ -53,0 +48,0 @@ overlayLegacy: CSSProperties; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31
443554
6868
+ Added@gilbarbara/helpers@0.9.4(transitive)
- Removed@gilbarbara/helpers@0.8.7(transitive)
- Removedis-lite@0.9.3(transitive)
Updated@gilbarbara/helpers@^0.9.0
Updatedtree-changes@^0.11.1
Updatedtype-fest@^4.7.1