@pluralsight/react-utils
Advanced tools
Comparing version 0.7.1-next-8c3af4 to 0.7.1-next-8cf3b9
177
package.json
{ | ||
"name": "@pluralsight/react-utils", | ||
"version": "0.7.1-next-8c3af4", | ||
"description": "A set of React custom hooks for Pando.", | ||
"browserslist": "> 0.25%, not dead", | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "src/index.ts", | ||
"module": "src/index.ts", | ||
"publishConfig": { | ||
"access": "public", | ||
"types": "build/legacy/index.d.ts", | ||
"main": "build/legacy/index.cjs", | ||
"module": "build/legacy/index.js", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"types": "./build/modern/index.d.ts", | ||
"default": "./build/modern/index.js" | ||
}, | ||
"require": { | ||
"types": "./build/modern/index.d.cts", | ||
"default": "./build/modern/index.cjs" | ||
} | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
".": [ | ||
"npm/types/src/types.d.ts" | ||
] | ||
} | ||
} | ||
}, | ||
"files": [ | ||
"build/**/*", | ||
"src/**/*" | ||
], | ||
"scripts": { | ||
"build": "tsup --experimental-dts", | ||
"clean": "rm -rf ./build", | ||
"lint:js": "eslint --max-warnings 0 \"./**/*.@(ts|tsx)\"", | ||
"lint:ts": "tsc --project tsconfig.lint.json --noEmit", | ||
"test": "jest --passWithNoTests" | ||
}, | ||
"dependencies": { | ||
"tslib": "latest" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/runtime": "^7.20.13", | ||
"@microsoft/api-extractor": "^7.38.3", | ||
"@pando/configs": "workspace:*", | ||
"@types/react": "latest", | ||
"@types/react-dom": "latest", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"tsup": "^8.0.1" | ||
}, | ||
"peerDependencies": { | ||
"react": "*", | ||
"react-dom": "*" | ||
}, | ||
"keywords": [ | ||
"pluralsight", | ||
"pluralsight design", | ||
"pluralsight react utils", | ||
"react", | ||
"utils", | ||
"react-utils", | ||
"custom hooks", | ||
"hooks", | ||
"react hooks" | ||
], | ||
"author": "Design System Team", | ||
"bugs": { | ||
"url": "https://github.com/pluralsight/pando/issues" | ||
}, | ||
"homepage": "https://design.pluralsight.com/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pluralsight/pando.git", | ||
"directory": "packages/react-utils" | ||
}, | ||
"license": "Apache 2.0", | ||
"packageManager": "bun@1.0.14" | ||
} | ||
"name": "@pluralsight/react-utils", | ||
"version": "0.7.1-next-8cf3b9", | ||
"description": "A set of React custom hooks for Pando.", | ||
"browserslist": "> 0.25%, not dead", | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "build/legacy/index.cjs", | ||
"module": "build/legacy/index.js", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"build/**/*", | ||
"src/**/*" | ||
], | ||
"dependencies": { | ||
"tslib": "latest" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/runtime": "^7.20.13", | ||
"@microsoft/api-extractor": "^7.38.3", | ||
"@types/react": "latest", | ||
"@types/react-dom": "latest", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"tsup": "^8.0.1", | ||
"@pando/configs": "0.0.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "*", | ||
"react-dom": "*" | ||
}, | ||
"keywords": [ | ||
"pluralsight", | ||
"pluralsight design", | ||
"pluralsight react utils", | ||
"react", | ||
"utils", | ||
"react-utils", | ||
"custom hooks", | ||
"hooks", | ||
"react hooks" | ||
], | ||
"author": "Design System Team", | ||
"bugs": { | ||
"url": "https://github.com/pluralsight/pando/issues" | ||
}, | ||
"homepage": "https://design.pluralsight.com/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pluralsight/pando.git", | ||
"directory": "packages/react-utils" | ||
}, | ||
"license": "Apache 2.0", | ||
"scripts": { | ||
"build": "tsup --experimental-dts", | ||
"clean": "rm -rf ./build", | ||
"lint:js": "eslint --max-warnings 0 \"./**/*.@(ts|tsx)\"", | ||
"lint:ts": "tsc --project tsconfig.lint.json --noEmit", | ||
"test": "jest --passWithNoTests" | ||
}, | ||
"types": "build/legacy/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"types": "./build/modern/index.d.ts", | ||
"default": "./build/modern/index.js" | ||
}, | ||
"require": { | ||
"types": "./build/modern/index.d.cts", | ||
"default": "./build/modern/index.cjs" | ||
} | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
".": [ | ||
"npm/types/src/types.d.ts" | ||
] | ||
} | ||
} | ||
} |
@@ -30,7 +30,7 @@ # React utils | ||
This project uses bun so there are no setup commands needed. If you get any errors, you may need to run an initial `bun install` or ensure you are using Node >= 18. | ||
This project uses pnPm so there are no setup commands needed. If you get any errors, you may need to run an initial `pnpm install` or ensure you are using Node >= 18. | ||
## Development | ||
There is no development sandbox for this specific project, but most of the time, we import the hooks into the [Headless Styles sandbox](https://github.com/pluralsight/pando/tree/main/packages/headless-styles/sandbox) which is [just as easy](https://github.com/pluralsight/pando/blob/main/packages/headless-styles/sandbox/src/components/Tabs.jsx#L2-L8). | ||
There is no development sandbox for this specific project, but most of the time, we import the hooks into the [Headless Styles sandbox](https://github.com/ps-dev/pando/tree/main/packages/headless-styles/sandbox) which is [just as easy](https://github.com/ps-dev/pando/blob/main/packages/headless-styles/sandbox/src/components/Tabs.jsx#L2-L8). | ||
@@ -40,3 +40,3 @@ From the **root directory of the project**, run: | ||
```bash | ||
bun run start:sandbox | ||
pnpm run start:sandbox | ||
``` | ||
@@ -49,3 +49,3 @@ | ||
```bash | ||
bun test packages/react-utils/tests | ||
pnpm test packages/react-utils/tests | ||
``` | ||
@@ -55,2 +55,2 @@ | ||
If you plan on contributing to this project, please take time to read our [CONTRIBUTING.md](https://github.com/pluralsight/pando/blob/main/CONTRIBUTING.md). Pull requests that do not adhere to the requirements in this doc will automatically be flagged and closed. | ||
If you plan on contributing to this project, please take time to read our [CONTRIBUTING.md](https://github.com/ps-dev/pando/blob/main/CONTRIBUTING.md). Pull requests that do not adhere to the requirements in this doc will automatically be flagged and closed. |
@@ -1,2 +0,2 @@ | ||
import { loadImage, preloadImgResource } from './loaders.ts' | ||
import { loadImage, preloadImgResource } from './loaders' | ||
import type { ImgProps } from './types' | ||
@@ -24,6 +24,6 @@ | ||
switch (status) { | ||
case 'pending': | ||
case 'error': | ||
throw result | ||
case 'pending': | ||
case 'success': | ||
@@ -30,0 +30,0 @@ return result |
@@ -7,3 +7,3 @@ 'use client' | ||
createPreloadedImgResource, | ||
} from '../helpers/createResource.ts' | ||
} from '../helpers/createResource' | ||
import type { ImgProps, ImgResource } from '../helpers/types' | ||
@@ -10,0 +10,0 @@ |
@@ -1,9 +0,9 @@ | ||
export { getCachedTheme, setCachedTheme } from './helpers/themeHelpers.ts' | ||
export { getCachedTheme, setCachedTheme } from './helpers/themeHelpers' | ||
// hooks | ||
export { useAutoFormatDate } from './hooks/useAutoFormatDate.ts' | ||
export { useEscToClose } from './hooks/useEscToClose.ts' | ||
export { useFocusTrap } from './hooks/useFocusTrap.ts' | ||
export { useIsIndeterminate } from './hooks/useIsIndeterminate.ts' | ||
export { usePreloadedImg } from './hooks/usePreloadedImg.ts' | ||
export { useAutoFormatDate } from './hooks/useAutoFormatDate' | ||
export { useEscToClose } from './hooks/useEscToClose' | ||
export { useFocusTrap } from './hooks/useFocusTrap' | ||
export { useIsIndeterminate } from './hooks/useIsIndeterminate' | ||
export { usePreloadedImg } from './hooks/usePreloadedImg' |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
247828
163
3435