@vis3/kit 1.3.0 → 1.4.0

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,11 +1,14 @@
1
1
  import React from 'react';
2
2
  import tokens from './tokens';
3
+ export type ThemeMode = 'light' | 'dark';
3
4
  export interface ThemeContextType {
4
5
  tokens: typeof tokens;
6
+ mode: ThemeMode;
5
7
  }
6
8
  export declare const ThemeContext: React.Context<ThemeContextType>;
7
9
  export interface ThemeProviderProps {
8
10
  children: React.ReactNode;
11
+ mode?: ThemeMode;
9
12
  }
10
13
  export declare const ThemeProvider: React.FC<ThemeProviderProps>;
11
14
  export declare const useTheme: () => ThemeContextType;
package/dist/utils.d.ts CHANGED
@@ -23,6 +23,10 @@ export declare function gid(): string;
23
23
  * get(obj, 'a.b["c.d"].e'); // 带点的属性名访问
24
24
  */
25
25
  export declare function get<T = any>(obj: any, path: string | (string | number)[], defaultValue?: T): T;
26
+ /**
27
+ * 解析lodash风格的路径字符串为路径数组
28
+ */
29
+ export declare function parsePath(path: string): (string | number)[];
26
30
  export declare function parseCsv(content: string): {
27
31
  headers: string[];
28
32
  data: Record<string, string | number>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vis3/kit",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "scripts": {
5
5
  "build": "vite build && tsc -d --emitDeclarationOnly",
6
6
  "clean": "rimraf ./node_modules",
@@ -48,6 +48,7 @@
48
48
  "@semantic-release/exec": "^7.1.0",
49
49
  "@semantic-release/git": "^10.0.1",
50
50
  "@semantic-release/gitlab": "^13.2.5",
51
+ "@semantic-release/npm": "^13.2.0",
51
52
  "@semantic-release/release-notes-generator": "^14.0.3",
52
53
  "@types/react": "^18.3.1",
53
54
  "@types/react-dom": "^18.3.1",
@@ -57,7 +58,7 @@
57
58
  "i18next-browser-languagedetector": "^8.0.2",
58
59
  "react-i18next": "15.2.0",
59
60
  "rollup-plugin-peer-deps-external": "^2.2.4",
60
- "semantic-release": "^24.2.5",
61
+ "semantic-release": "^25.0.5",
61
62
  "ts-node": "^10.9.2",
62
63
  "typescript": "^5.8.3",
63
64
  "vite": "^6.3.5",
@@ -74,6 +75,7 @@
74
75
  "license": "Apache-2.0",
75
76
  "repository": {
76
77
  "type": "git",
77
- "url": "git+https://github.com/opendatalab/vis3.git"
78
+ "url": "git+https://github.com/opendatalab/Vis3.git",
79
+ "directory": "web/packages/vis3-kit"
78
80
  }
79
81
  }