@particle-network/ui-react 0.4.0-beta.1 → 0.4.0-beta.2

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.
@@ -1,6 +1,5 @@
1
1
  export * from './theme-data';
2
2
  export * from './theme-switch';
3
3
  export * from './use-color-scheme';
4
- export * from './use-quote-color';
5
4
  export * from './use-theme';
6
5
  export * from './use-theme-color';
@@ -1,6 +1,5 @@
1
1
  export * from "./theme-data.js";
2
2
  export * from "./theme-switch.js";
3
3
  export * from "./use-color-scheme.js";
4
- export * from "./use-quote-color.js";
5
4
  export * from "./use-theme.js";
6
5
  export * from "./use-theme-color.js";
@@ -1,9 +1,10 @@
1
1
  export type ThemeId = 'ux-purple-gold-dark' | 'ux-purple-gold-light' | 'ux-green-red-dark' | 'ux-green-red-light' | 'ux-green-red-soft-dark' | 'ux-green-red-soft-light' | 'gmgn-dark' | 'axiom-dark' | 'hyperliquid-dark' | 'phantom-dark' | 'binance-dark' | 'bullx-dark';
2
+ export type ColorScheme = 'dark' | 'light';
2
3
  export interface ThemeItemType {
3
4
  id: ThemeId;
4
5
  zhName: string;
5
6
  enName: string;
6
- colorScheme: 'dark' | 'light';
7
+ colorScheme: ColorScheme;
7
8
  colorVariables: {
8
9
  foreground: string;
9
10
  secondary: string;
@@ -1 +1,5 @@
1
- export declare const useColorScheme: () => "dark" | "light";
1
+ export declare const useColorScheme: () => {
2
+ colorScheme: import("./theme-data").ColorScheme;
3
+ isDark: boolean;
4
+ isLight: boolean;
5
+ };
@@ -1,6 +1,11 @@
1
1
  import { useThemeStore } from "./use-theme-store.js";
2
2
  const useColorScheme = ()=>{
3
3
  const { selectedTheme } = useThemeStore();
4
- return selectedTheme.colorScheme;
4
+ const { colorScheme } = selectedTheme;
5
+ return {
6
+ colorScheme,
7
+ isDark: 'dark' === colorScheme,
8
+ isLight: 'light' === colorScheme
9
+ };
5
10
  };
6
11
  export { useColorScheme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.4.0-beta.1",
3
+ "version": "0.4.0-beta.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -39,8 +39,8 @@
39
39
  "@types/react": "^19.1.10",
40
40
  "react": "^19.1.0",
41
41
  "typescript": "^5.8.3",
42
- "@particle-network/eslint-config": "0.3.0",
43
- "@particle-network/lintstaged-config": "0.1.0"
42
+ "@particle-network/lintstaged-config": "0.1.0",
43
+ "@particle-network/eslint-config": "0.3.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=16.9.0",
@@ -1,6 +0,0 @@
1
- export declare const useQuoteColor: () => {
2
- bullish: string;
3
- bearish: string;
4
- upColor: string;
5
- downColor: string;
6
- };
@@ -1,12 +0,0 @@
1
- import { useThemeStore } from "./use-theme-store.js";
2
- const useQuoteColor = ()=>{
3
- const { selectedTheme } = useThemeStore();
4
- const { bullish, bearish } = selectedTheme.colorVariables;
5
- return {
6
- bullish,
7
- bearish,
8
- upColor: bullish,
9
- downColor: bearish
10
- };
11
- };
12
- export { useQuoteColor };