onchain-uikit 0.0.3 → 0.0.7

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.
Files changed (72) hide show
  1. package/lib/instance.cjs.mjs +366 -0
  2. package/lib/instance.es.mjs +29301 -0
  3. package/lib/instance.umd.mjs +366 -0
  4. package/lib/src/App.d.ts +5 -0
  5. package/lib/src/components/PlmMosaic/index.d.ts +5 -0
  6. package/lib/src/index.d.ts +4 -0
  7. package/lib/src/main.d.ts +0 -0
  8. package/lib/src/stories/Button.d.ts +14 -0
  9. package/lib/src/stories/Button.stories.d.ts +23 -0
  10. package/lib/src/stories/Header.d.ts +11 -0
  11. package/lib/src/stories/Header.stories.d.ts +18 -0
  12. package/lib/src/stories/OnChainProvider.d.ts +12 -0
  13. package/lib/src/stories/Page.d.ts +2 -0
  14. package/lib/src/stories/Page.stories.d.ts +12 -0
  15. package/lib/src/stories/PlmMosaic.stories.d.ts +14 -0
  16. package/lib/src/stories/PlmSelect/PlmSelect.stories.d.ts +21 -0
  17. package/lib/src/stories/PlmSelect/index.d.ts +20 -0
  18. package/lib/src/stories/XsButton.d.ts +22 -0
  19. package/lib/src/stories/XsButton.stories.d.ts +14 -0
  20. package/lib/src/typings.d.ts +623 -0
  21. package/lib/src/utils/authority/basicsAuthority.d.ts +22 -0
  22. package/lib/src/utils/authority/index.d.ts +10 -0
  23. package/lib/typings.d.ts +130 -0
  24. package/lib/vite.config.d.ts +2 -0
  25. package/package.json +25 -5
  26. package/.storybook/main.ts +0 -16
  27. package/.storybook/preview.ts +0 -14
  28. package/dist/index.es.js +0 -634
  29. package/dist/index.umd.js +0 -30
  30. package/eslint.config.js +0 -28
  31. package/index.html +0 -13
  32. package/public/vite.svg +0 -1
  33. package/src/App.css +0 -42
  34. package/src/App.tsx +0 -35
  35. package/src/assets/react.svg +0 -1
  36. package/src/index.css +0 -68
  37. package/src/index.ts +0 -4
  38. package/src/main.tsx +0 -10
  39. package/src/stories/Button.stories.ts +0 -53
  40. package/src/stories/Button.tsx +0 -37
  41. package/src/stories/Configure.mdx +0 -364
  42. package/src/stories/Header.stories.ts +0 -33
  43. package/src/stories/Header.tsx +0 -56
  44. package/src/stories/Page.stories.ts +0 -32
  45. package/src/stories/Page.tsx +0 -73
  46. package/src/stories/XsButton.tsx +0 -7
  47. package/src/stories/assets/accessibility.png +0 -0
  48. package/src/stories/assets/accessibility.svg +0 -1
  49. package/src/stories/assets/addon-library.png +0 -0
  50. package/src/stories/assets/assets.png +0 -0
  51. package/src/stories/assets/avif-test-image.avif +0 -0
  52. package/src/stories/assets/context.png +0 -0
  53. package/src/stories/assets/discord.svg +0 -1
  54. package/src/stories/assets/docs.png +0 -0
  55. package/src/stories/assets/figma-plugin.png +0 -0
  56. package/src/stories/assets/github.svg +0 -1
  57. package/src/stories/assets/share.png +0 -0
  58. package/src/stories/assets/styling.png +0 -0
  59. package/src/stories/assets/testing.png +0 -0
  60. package/src/stories/assets/theming.png +0 -0
  61. package/src/stories/assets/tutorials.svg +0 -1
  62. package/src/stories/assets/youtube.svg +0 -1
  63. package/src/stories/button.css +0 -30
  64. package/src/stories/header.css +0 -32
  65. package/src/stories/page.css +0 -68
  66. package/tsconfig.app.json +0 -26
  67. package/tsconfig.json +0 -7
  68. package/tsconfig.node.json +0 -94
  69. package/tsconfig.tsbuildinfo +0 -1
  70. package/vite.config.ts +0 -33
  71. /package/{src → lib/src}/vite-env.d.ts +0 -0
  72. /package/{dist → lib}/vite.svg +0 -0
@@ -0,0 +1,130 @@
1
+ declare module "*.css";
2
+ declare module "*.less";
3
+ // declare module '*.module.less' {
4
+ // const classes: { [key: string]: string };
5
+ // const classes: CSSModuleClasses
6
+ // export default classes
7
+ // }
8
+ declare module "*.webp";
9
+ declare module "*.png";
10
+ declare module "*classnames";
11
+ declare module "*.svg" {
12
+ export function ReactComponent(
13
+ props: React.SVGProps<SVGSVGElement>
14
+ ): React.ReactElement;
15
+ const url: string;
16
+ export default url;
17
+ }
18
+ declare module "@multiavatar/multiavatar";
19
+
20
+ /**
21
+ * 可更改所有属性
22
+ */
23
+ declare type Writeable<T> = {
24
+ -readonly [P in keyof T]: T[P];
25
+ };
26
+
27
+ type PageRouteConfig = {
28
+ path: string;
29
+ component?: string | (() => any);
30
+ wrappers?: (string | (() => any))[];
31
+ redirect?: string;
32
+ exact?: boolean;
33
+ routes?: PageRouteConfig[];
34
+ [k: string]: any;
35
+ };
36
+
37
+ declare interface BasicsFn<Result, Params = any> {
38
+ (...params: Params[]): Result;
39
+ }
40
+
41
+ declare interface CacheFn<Result, Value = Result, Params = any>
42
+ extends BasicsFn<Result, Params> {
43
+ (...params: Params[]): Result;
44
+ _value?: Value | null;
45
+ clearCache?: () => void;
46
+ }
47
+
48
+ declare const ICONFONT_URL: string;
49
+
50
+ declare const FULLSCREEN_PATH: string;
51
+
52
+ declare const PRODUCT_PATHNAME: string;
53
+
54
+ declare const FOLDER_PATHNAME: string;
55
+
56
+ declare const STOREHOUSE_PATHNAME: string;
57
+
58
+ declare const INSTANCE_PATHNAME: string;
59
+
60
+ declare const ES_API_PREFIX: string;
61
+
62
+ declare const TRANSMIT_API_PREFIX: string;
63
+
64
+ declare const CHAT_API_PREFIX: string;
65
+ /** 全部用户 */
66
+ declare const ALL_USER: string;
67
+ /** 全部产品清单 */
68
+ declare const ALL_PRODUCT: string;
69
+ /** 产品内全部用户 */
70
+ declare const ALL_IN_PRODUCT_USER: string;
71
+
72
+ declare const FIX_INS_TAbTABLE_COLUMNMAP: Record<string, string>;
73
+
74
+ declare const PREFERENCE: string;
75
+
76
+ declare const PREFERENCE_TAB: Record<string, string>;
77
+
78
+ // declare const FAV_LIST: Record<string, any>[];
79
+
80
+ declare const USER_PATHNAME: string;
81
+
82
+ declare const CHANGE_ITEMCODE: Number[];
83
+
84
+ declare const RECYCLE_BIN: string;
85
+
86
+ declare const WORKFLOW_ERROR_PATHNAME: string;
87
+
88
+ // declare const WORKFLOW_ACTION: Record<string, any>[];
89
+
90
+ declare const CHAT_PATHNAME: string;
91
+
92
+ declare const ALL_USERGROUP: string;
93
+
94
+ declare const ROUTES: Record<string, any>[];
95
+
96
+ declare const WORKFLOW_API_PREFIX: string;
97
+
98
+ declare const EXT_PATHNAME: string;
99
+ declare const isDevelopment: boolean;
100
+
101
+ interface Window {
102
+ moudleQiankunAppLifeCycles: any;
103
+ proxy: any;
104
+ }
105
+
106
+ interface ImportMetaEnv {
107
+ [key: string]: any;
108
+ BASE_URL: string;
109
+ MODE: string;
110
+ DEV: boolean;
111
+ PROD: boolean;
112
+ SSR: boolean;
113
+ }
114
+
115
+ // interface ImportMeta {
116
+ // url: string;
117
+
118
+ // readonly hot?: import('vite/types/hot').ViteHotContext;
119
+
120
+ // readonly env: ImportMetaEnv;
121
+
122
+ // glob: import('vite/types/importGlob').ImportGlobFunction;
123
+ // }
124
+
125
+ declare const GLOBAL_TABLE_TOP_CLASS: string;
126
+ declare const GLOBAL_ATTR_TITLE: string;
127
+
128
+ declare const DEPLOY_VERSION: string;
129
+
130
+ interface Window {}
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vite').UserConfig;
2
+ export default _default;
package/package.json CHANGED
@@ -1,17 +1,29 @@
1
1
  {
2
2
  "name": "onchain-uikit",
3
3
  "private": false,
4
- "version": "0.0.3",
4
+ "version": "0.0.7",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vite build",
8
+ "yalc:push": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite --mode production --config vite.config.ts build && yalc push",
8
9
  "lint": "eslint .",
9
10
  "preview": "vite preview",
10
11
  "storybook": "storybook dev -p 6006",
11
12
  "build-storybook": "storybook build"
12
13
  },
13
- "main": "dist/index.cjs.js",
14
- "module": "dist/index.es.js",
14
+ "lint-staged": {
15
+ "*.{js,jsx,less,md,json}": [
16
+ "prettier --write"
17
+ ],
18
+ "*.ts?(x)": [
19
+ "prettier --parser=typescript --write"
20
+ ]
21
+ },
22
+ "files": [
23
+ "lib"
24
+ ],
25
+ "main": "lib/instance.es.mjs",
26
+ "types": "lib/src/index.d.ts",
15
27
  "publishConfig": {
16
28
  "access": "public"
17
29
  },
@@ -21,7 +33,9 @@
21
33
  "dependencies": {
22
34
  "antd": "5.1.4",
23
35
  "react": "^18.3.1",
24
- "react-dom": "^18.3.1"
36
+ "react-dom": "^18.3.1",
37
+ "react-highlight-words": "^0.21.0",
38
+ "vite-plugin-dts": "^4.5.0"
25
39
  },
26
40
  "devDependencies": {
27
41
  "@chromatic-com/storybook": "^3.2.3",
@@ -33,18 +47,24 @@
33
47
  "@storybook/react": "^8.5.0",
34
48
  "@storybook/react-vite": "^8.5.0",
35
49
  "@storybook/test": "^8.5.0",
50
+ "@types/less": "^3.0.7",
51
+ "@types/node": "^22.13.1",
36
52
  "@types/react": "^18.3.18",
37
53
  "@types/react-dom": "^18.3.5",
38
54
  "@vitejs/plugin-react": "^4.3.4",
55
+ "babel-plugin-import": "^1.13.8",
39
56
  "eslint": "^9.17.0",
40
57
  "eslint-plugin-react-hooks": "^5.0.0",
41
58
  "eslint-plugin-react-refresh": "^0.4.16",
42
59
  "eslint-plugin-storybook": "^0.11.2",
43
60
  "globals": "^15.14.0",
61
+ "less": "^4.2.2",
62
+ "less-loader": "^12.2.0",
44
63
  "storybook": "^8.5.0",
45
64
  "typescript": "~5.6.2",
46
65
  "typescript-eslint": "^8.18.2",
47
- "vite": "^6.0.5"
66
+ "vite": "^6.0.5",
67
+ "vite-plugin-dts": "^4.5.0"
48
68
  },
49
69
  "eslintConfig": {
50
70
  "extends": [
@@ -1,16 +0,0 @@
1
- import type { StorybookConfig } from "@storybook/react-vite";
2
-
3
- const config: StorybookConfig = {
4
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5
- addons: [
6
- "@storybook/addon-onboarding",
7
- "@storybook/addon-essentials",
8
- "@chromatic-com/storybook",
9
- "@storybook/addon-interactions",
10
- ],
11
- framework: {
12
- name: "@storybook/react-vite",
13
- options: {},
14
- },
15
- };
16
- export default config;
@@ -1,14 +0,0 @@
1
- import type { Preview } from "@storybook/react";
2
-
3
- const preview: Preview = {
4
- parameters: {
5
- controls: {
6
- matchers: {
7
- color: /(background|color)$/i,
8
- date: /Date$/i,
9
- },
10
- },
11
- },
12
- };
13
-
14
- export default preview;