@arcblock/ux 3.0.5 → 3.0.6

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.
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ButtonProps } from '@mui/material';
3
+
4
+ export interface OpenConfirmProps {
5
+ title: ReactNode;
6
+ content: ReactNode;
7
+ onConfirm?: (close: () => void) => void;
8
+ onCancel?: () => void;
9
+ showCancelButton?: true | false;
10
+ confirmButtonText?: string;
11
+ cancelButtonText?: string;
12
+ confirmButtonProps?: ButtonProps;
13
+ cancelButtonProps?: ButtonProps;
14
+ }
15
+
16
+ export type UpdateConfirmProps = Partial<Pick<OpenConfirmProps, 'title' | 'content'>>;
17
+
18
+ export type OpenConfirm = (params: OpenConfirmProps) => void;
19
+ export type CloseConfirm = () => void;
20
+ export type UpdateConfirm = (params: UpdateConfirmProps) => void;
@@ -0,0 +1,28 @@
1
+ declare module '@arcblock/did-motif';
2
+ declare module 'd3-geo';
3
+ declare module 'topojson-client';
4
+ declare module 'versor';
5
+ declare module 'axios/*';
6
+
7
+ // ux svg 由 babel-plugin-inline-react-svg 处理
8
+ declare module '*.svg?react' {
9
+ import React from 'react';
10
+ const SVG: React.FC<React.SVGProps<SVGSVGElement>>;
11
+ export default SVG;
12
+ }
13
+
14
+ declare module '*.png' {
15
+ export default string;
16
+ }
17
+
18
+ type Blocklet = import('./type').Blocklet;
19
+
20
+ interface Window {
21
+ blocklet?: Blocklet;
22
+ env?: Blocklet;
23
+ }
24
+
25
+ declare module globalThis {
26
+ var blocklet: Blocklet;
27
+ var env: Blocklet;
28
+ }
package/lib/type.d.ts ADDED
@@ -0,0 +1,44 @@
1
+ import type { Theme } from '@mui/material';
2
+ import type { LiteralUnion } from 'type-fest';
3
+
4
+ export type $TSFixMe = any;
5
+ export type Translations = Record<string, Record<string, any>>;
6
+ export type Locale = LiteralUnion<'en' | 'zh', string>;
7
+
8
+ // TODO: 以下为 blocklet 应用专属的全局对象类型,可以更加具体
9
+ export type User = Record<string, any>;
10
+ export type Session = Record<string, any>;
11
+ export type Passport = Record<string, any>;
12
+ export type Blocklet = {
13
+ appId: string;
14
+ appIds: string[];
15
+ appPid: string;
16
+ appName: string;
17
+ appDescription: string;
18
+ appLogo: string;
19
+ appLogoRect: string;
20
+ appUrl: string;
21
+ isComponent: boolean;
22
+ prefix: string;
23
+ groupPrefix: string;
24
+ pageGroup: string;
25
+ version: string;
26
+ mode: string;
27
+ tenantMode: 'single' | 'multiple';
28
+ theme: {
29
+ prefer?: 'light' | 'dark' | 'system';
30
+ light: Theme;
31
+ dark: Theme;
32
+ };
33
+ navigation: $TSFixMe[];
34
+ preferences: Record<string, any>;
35
+ languages: {
36
+ code: string;
37
+ name: string;
38
+ }[];
39
+ passportColor: string;
40
+ componentMountPoints: $TSFixMe[];
41
+ alsoKnownAs: string[];
42
+ trustedFactories: string[];
43
+ [x: string]: any;
44
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -60,16 +60,16 @@
60
60
  "react": ">=19.0.0",
61
61
  "react-router-dom": ">=6.22.3"
62
62
  },
63
- "gitHead": "1a7bd7691bda12a5d117eb57fe63e8a6486105d6",
63
+ "gitHead": "b985886f6650c3df0f48665c71d7a8ce0d9bdb93",
64
64
  "dependencies": {
65
- "@arcblock/bridge": "3.0.5",
65
+ "@arcblock/bridge": "3.0.6",
66
66
  "@arcblock/did": "^1.20.15",
67
67
  "@arcblock/did-motif": "^1.1.13",
68
- "@arcblock/icons": "3.0.5",
69
- "@arcblock/nft-display": "3.0.5",
70
- "@arcblock/react-hooks": "3.0.5",
68
+ "@arcblock/icons": "3.0.6",
69
+ "@arcblock/nft-display": "3.0.6",
70
+ "@arcblock/react-hooks": "3.0.6",
71
71
  "@blocklet/js-sdk": "^1.16.44",
72
- "@blocklet/theme": "3.0.5",
72
+ "@blocklet/theme": "3.0.6",
73
73
  "@fontsource/roboto": "~5.1.1",
74
74
  "@fontsource/ubuntu-mono": "^5.2.6",
75
75
  "@iconify-icons/logos": "^1.2.36",
package/vite.config.mjs CHANGED
@@ -14,7 +14,7 @@ export default defineConfig({
14
14
  dts(),
15
15
  noBundlePlugin({
16
16
  root: 'src',
17
- copy: ['**/*.png', '**/*.gif', '**/*.jpg', '**/*.jpeg'],
17
+ copy: ['**/*.png', '**/*.gif', '**/*.jpg', '**/*.jpeg', '**/*.d.ts'],
18
18
  }),
19
19
  ],
20
20
  build: {