diff --git a/bun.lockb b/bun.lockb index 2463912..e545c60 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index f1de5e7..77cbd82 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,16 @@ "main": "dist/index.js", "module": "src/index.ts", "scripts": { - "barrels": "barrelsby --config ./barrels.json", + "barrels": "bunx barrelsby --config ./barrels.json", "build": "rm -rf ./dist/* && bun build src/index.tsx --outdir ./dist", "lint": "bunx eslint src -- --fix", "pretty": "bunx prettier --write 'src/**/*.(ts|tsx)'", "upgrade:deps": "bunx ncu -u && bun install" }, + "peerDependencies": { + "react": "18.x", + "react-dom": "18.x" + }, "devDependencies": { "@types/react": "18.2.7", "@types/react-dom": "18.2.4", @@ -20,13 +24,15 @@ "@typescript-eslint/eslint-plugin": "5.59.7", "@typescript-eslint/parser": "5.59.7", "barrels": "^1.6.6", - "bun-types": "0.6.3", + "bun-types": "0.6.4", "eslint": "8.41.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.32.2", "npm-check-updates": "^16.10.12", "prettier": "^2.8.8", + "react": "^18.2.0", + "react-dom": "^18.2.0", "typescript": "beta" }, "files": [ diff --git a/src/FPContext.tsx b/src/FPContext.tsx index aa16d1b..ea4319c 100644 --- a/src/FPContext.tsx +++ b/src/FPContext.tsx @@ -1,12 +1,12 @@ -import { createContext, type RefObject } from "react"; +import { createContext } from "react"; import { FPItemRef } from "."; const observeFn = (el) => el; export const FPContext = createContext({ getIndex: (el: any) => 0 as number, - ReactFPRef: null as RefObject, - slides: [] as RefObject[], + ReactFPRef: null as FPItemRef, + slides: [] as FPItemRef[], subscribe: observeFn, unsubscribe: observeFn, }); diff --git a/src/index.ts b/src/index.ts index d97d449..0d8cadb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,9 +2,9 @@ * @file Automatically generated by barrelsby. */ -export * from "./FSButton"; export * from "./FPContainer"; export * from "./FPContext"; export * from "./FPItem"; export * from "./FPTypes"; +export * from "./FSButton"; export * from "./ReactFP";