From dab9243d237aa40c18deb661c1e42c9403cb96ad Mon Sep 17 00:00:00 2001 From: PhilReact Date: Sat, 12 Apr 2025 10:30:43 +0300 Subject: [PATCH] fix global types --- package-lock.json | 4 +- package.json | 7 ++- src/common/Spinners/BarSpinner/BarSpinner.tsx | 7 ++- src/{global.d.ts => global.ts} | 50 +------------------ src/index.ts | 2 + tsconfig.json | 2 +- tsup.config.ts | 2 +- 7 files changed, 17 insertions(+), 57 deletions(-) rename src/{global.d.ts => global.ts} (81%) diff --git a/package-lock.json b/package-lock.json index ec5d187..c0562d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "qapp-core", - "version": "1.0.18", + "version": "1.0.19", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "qapp-core", - "version": "1.0.18", + "version": "1.0.19", "license": "MIT", "dependencies": { "@tanstack/react-virtual": "^3.13.2", diff --git a/package.json b/package.json index f10a9f0..04c4ffc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qapp-core", - "version": "1.0.19", + "version": "1.0.20", "description": "Qortal's core React library with global state, UI components, and utilities", "main": "dist/index.js", "module": "dist/index.mjs", @@ -11,15 +11,14 @@ "require": "./dist/index.js" }, "./global": { - "types": "./dist/src/global.d.ts" + "types": "./dist/global.d.ts" } }, "files": [ "dist" ], "scripts": { - "build": "tsup && npm run copy-types", - "copy-types": "cpy src/global.d.ts dist", + "build": "tsup", "prepare": "npm run build", "clean": "rm -rf dist" }, diff --git a/src/common/Spinners/BarSpinner/BarSpinner.tsx b/src/common/Spinners/BarSpinner/BarSpinner.tsx index a51a512..5c3019d 100644 --- a/src/common/Spinners/BarSpinner/BarSpinner.tsx +++ b/src/common/Spinners/BarSpinner/BarSpinner.tsx @@ -1,6 +1,11 @@ import React from 'react' import './barSpinner.css' -export const BarSpinner = ({width = '20px', color}) => { + +interface PropsBarSpinner { + width: string + color?: string +} +export const BarSpinner = ({width = '20px', color}: PropsBarSpinner) => { return (
+ export { useResourceStatus } from './hooks/useResourceStatus'; export { Spacer } from './common/Spacer'; import './index.css' diff --git a/tsconfig.json b/tsconfig.json index 2f39ae3..abbcb06 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,6 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true }, - "include": ["src", "src/global.d.ts"] + "include": ["src"] } \ No newline at end of file diff --git a/tsup.config.ts b/tsup.config.ts index 4368e14..6df2718 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'tsup'; export default defineConfig({ - entry: ['src/index.ts'], + entry: ['src/index.ts', 'src/global.ts'], format: ['esm', 'cjs'], dts: true, external: [