@blocklet/ui-react 3.0.3 → 3.0.5

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 (195) hide show
  1. package/lib/@types/index.d.ts +3 -0
  2. package/lib/BlockletStudio/index.d.ts +26 -0
  3. package/lib/ComponentInstaller/index.d.ts +18 -0
  4. package/lib/ComponentInstaller/installer-item.d.ts +18 -0
  5. package/lib/{types/ComponentInstaller → ComponentInstaller}/locales.d.ts +2 -2
  6. package/lib/{types/ComponentInstaller → ComponentInstaller}/use-component-installed.d.ts +2 -2
  7. package/lib/ComponentManager/components/add-component.d.ts +13 -0
  8. package/lib/ComponentManager/components/check-component.d.ts +2 -0
  9. package/lib/ComponentManager/components/publish-component.d.ts +7 -0
  10. package/lib/ComponentManager/components/resource-dialog.d.ts +11 -0
  11. package/lib/ComponentManager/index.d.ts +4 -0
  12. package/lib/ComponentManager/libs/locales.d.ts +19 -0
  13. package/lib/Dashboard/index.d.ts +27 -0
  14. package/lib/Footer/brand.d.ts +15 -0
  15. package/lib/Footer/copyright.d.ts +13 -0
  16. package/lib/{types/Footer → Footer}/index.d.ts +2 -2
  17. package/lib/Footer/internal-footer.d.ts +29 -0
  18. package/lib/Footer/layout/plain.d.ts +19 -0
  19. package/lib/Footer/layout/row.d.ts +13 -0
  20. package/lib/Footer/layout/standard.d.ts +21 -0
  21. package/lib/Footer/links.d.ts +20 -0
  22. package/lib/Footer/social-media.d.ts +14 -0
  23. package/lib/Header/index.d.ts +13 -0
  24. package/lib/Icon/index.d.ts +7 -0
  25. package/lib/Notifications/Snackbar.d.ts +8 -0
  26. package/lib/Notifications/hooks/use-title.d.ts +9 -0
  27. package/lib/Notifications/hooks/use-width.d.ts +2 -0
  28. package/lib/Notifications/utils.d.ts +10 -0
  29. package/lib/UserCenter/components/config-inviter.d.ts +4 -0
  30. package/lib/UserCenter/components/config-profile.d.ts +5 -0
  31. package/lib/UserCenter/components/danger-zone.d.ts +2 -0
  32. package/lib/UserCenter/components/editable-field.d.ts +50 -0
  33. package/lib/UserCenter/components/nft.d.ts +4 -0
  34. package/lib/UserCenter/components/notification.d.ts +5 -0
  35. package/lib/UserCenter/components/passport.d.ts +5 -0
  36. package/lib/UserCenter/components/privacy.d.ts +5 -0
  37. package/lib/UserCenter/components/settings.d.ts +8 -0
  38. package/lib/UserCenter/components/status-dialog/date-picker.d.ts +9 -0
  39. package/lib/UserCenter/components/status-dialog/index.d.ts +9 -0
  40. package/lib/UserCenter/components/status-selector/duration-menu.d.ts +7 -0
  41. package/lib/UserCenter/components/status-selector/index.d.ts +8 -0
  42. package/lib/UserCenter/components/status-selector/menu-item.d.ts +9 -0
  43. package/lib/UserCenter/components/storage/action.d.ts +7 -0
  44. package/lib/UserCenter/components/storage/connected.d.ts +4 -0
  45. package/lib/UserCenter/components/storage/delete.d.ts +5 -0
  46. package/lib/UserCenter/components/storage/disconnect.d.ts +2 -0
  47. package/lib/UserCenter/components/storage/icons/empty-spaces-nft.svg.d.ts +3 -0
  48. package/lib/UserCenter/components/storage/index.d.ts +2 -0
  49. package/lib/UserCenter/components/storage/preview-nft.d.ts +5 -0
  50. package/lib/UserCenter/components/third-party-login/index.d.ts +4 -0
  51. package/lib/UserCenter/components/third-party-login/third-party-item.d.ts +4 -0
  52. package/lib/UserCenter/components/user-center.d.ts +15 -0
  53. package/lib/UserCenter/components/user-info/address.d.ts +7 -0
  54. package/lib/UserCenter/components/user-info/index.d.ts +5 -0
  55. package/lib/UserCenter/components/user-info/link-preview-input.d.ts +6 -0
  56. package/lib/UserCenter/components/user-info/metadata.d.ts +7 -0
  57. package/lib/UserCenter/components/user-info/switch-role.d.ts +6 -0
  58. package/lib/UserCenter/components/user-info/timezone-select.d.ts +7 -0
  59. package/lib/UserCenter/components/user-info/user-basic-info.d.ts +12 -0
  60. package/lib/UserCenter/components/user-info/user-info-item.d.ts +6 -0
  61. package/lib/UserCenter/components/user-info/user-info.d.ts +6 -0
  62. package/lib/UserCenter/components/user-info/user-status.d.ts +9 -0
  63. package/lib/UserCenter/components/user-info/utils.d.ts +33 -0
  64. package/lib/UserCenter/components/webhook-item.d.ts +10 -0
  65. package/lib/UserCenter/index.d.ts +2 -0
  66. package/lib/UserCenter/libs/locales.d.ts +513 -0
  67. package/lib/UserCenter/libs/utils.d.ts +3 -0
  68. package/lib/UserSessions/components/user-session-info.d.ts +5 -0
  69. package/lib/UserSessions/components/user-sessions.d.ts +8 -0
  70. package/lib/UserSessions/index.d.ts +2 -0
  71. package/lib/UserSessions/libs/locales.d.ts +88 -0
  72. package/lib/UserSessions/libs/utils.d.ts +3 -0
  73. package/lib/blocklets.d.ts +18 -0
  74. package/lib/common/domain-warning.d.ts +12 -0
  75. package/lib/common/header-addons.d.ts +19 -0
  76. package/lib/common/link-blocker.d.ts +4 -0
  77. package/lib/common/notification-addon.d.ts +10 -0
  78. package/lib/common/overridable-theme-provider.d.ts +12 -0
  79. package/lib/common/wallet-hidden-topbar.d.ts +2 -0
  80. package/lib/common/ws.d.ts +4 -0
  81. package/lib/contexts/config-user-space.d.ts +7 -0
  82. package/lib/hooks/use-mobile.d.ts +4 -0
  83. package/lib/index.d.ts +12 -0
  84. package/lib/libs/client.d.ts +3 -0
  85. package/lib/libs/constant.d.ts +2 -0
  86. package/lib/libs/spaces.d.ts +3 -0
  87. package/lib/libs/with-hide-when-embed.d.ts +5 -0
  88. package/lib/types.d.ts +37 -0
  89. package/lib/utils.d.ts +11 -0
  90. package/package.json +7 -7
  91. package/vite.config.mjs +1 -1
  92. package/lib/types/@types/index.d.ts +0 -204
  93. package/lib/types/BlockletStudio/index.d.ts +0 -27
  94. package/lib/types/ComponentInstaller/ComponentInstaller.stories.d.ts +0 -9
  95. package/lib/types/ComponentInstaller/demo/basic.d.ts +0 -29
  96. package/lib/types/ComponentInstaller/demo/mock-optional-components.d.ts +0 -2
  97. package/lib/types/ComponentInstaller/index.d.ts +0 -18
  98. package/lib/types/ComponentInstaller/installer-item.d.ts +0 -18
  99. package/lib/types/ComponentManager/components/add-component.d.ts +0 -16
  100. package/lib/types/ComponentManager/components/check-component.d.ts +0 -2
  101. package/lib/types/ComponentManager/components/publish-component.d.ts +0 -10
  102. package/lib/types/ComponentManager/components/resource-dialog.d.ts +0 -13
  103. package/lib/types/ComponentManager/index.d.ts +0 -3
  104. package/lib/types/ComponentManager/libs/locales.d.ts +0 -14
  105. package/lib/types/Dashboard/Dashboard.stories.d.ts +0 -13
  106. package/lib/types/Dashboard/demo/basic.d.ts +0 -29
  107. package/lib/types/Dashboard/index.d.ts +0 -30
  108. package/lib/types/Footer/Footer.stories.d.ts +0 -19
  109. package/lib/types/Footer/brand.d.ts +0 -15
  110. package/lib/types/Footer/copyright.d.ts +0 -13
  111. package/lib/types/Footer/demo/arcblock-site.d.ts +0 -31
  112. package/lib/types/Footer/demo/brand.d.ts +0 -1
  113. package/lib/types/Footer/demo/copyright.d.ts +0 -1
  114. package/lib/types/Footer/demo/footer.d.ts +0 -10
  115. package/lib/types/Footer/demo/links.d.ts +0 -1
  116. package/lib/types/Footer/demo/social-media-icons.d.ts +0 -1
  117. package/lib/types/Footer/internal-footer.d.ts +0 -32
  118. package/lib/types/Footer/layout/plain.d.ts +0 -22
  119. package/lib/types/Footer/layout/row.d.ts +0 -13
  120. package/lib/types/Footer/layout/standard.d.ts +0 -24
  121. package/lib/types/Footer/links.d.ts +0 -23
  122. package/lib/types/Footer/social-media.d.ts +0 -14
  123. package/lib/types/Header/Header.stories.d.ts +0 -26
  124. package/lib/types/Header/demo/addons-customization.d.ts +0 -11
  125. package/lib/types/Header/demo/basic.d.ts +0 -1
  126. package/lib/types/Header/demo/fixtures/index.d.ts +0 -49
  127. package/lib/types/Header/demo/with-enable-connect-enable-locale.d.ts +0 -1
  128. package/lib/types/Header/index.d.ts +0 -23
  129. package/lib/types/Icon/Icon.stories.d.ts +0 -12
  130. package/lib/types/Icon/demo/basic.d.ts +0 -1
  131. package/lib/types/Icon/index.d.ts +0 -9
  132. package/lib/types/Notifications/Snackbar.d.ts +0 -16
  133. package/lib/types/Notifications/hooks/use-title.d.ts +0 -48
  134. package/lib/types/Notifications/hooks/use-width.d.ts +0 -2
  135. package/lib/types/Notifications/utils.d.ts +0 -70
  136. package/lib/types/UserCenter/components/config-inviter.d.ts +0 -4
  137. package/lib/types/UserCenter/components/config-profile.d.ts +0 -5
  138. package/lib/types/UserCenter/components/danger-zone.d.ts +0 -1
  139. package/lib/types/UserCenter/components/editable-field.d.ts +0 -54
  140. package/lib/types/UserCenter/components/nft.d.ts +0 -4
  141. package/lib/types/UserCenter/components/notification.d.ts +0 -5
  142. package/lib/types/UserCenter/components/passport.d.ts +0 -5
  143. package/lib/types/UserCenter/components/privacy.d.ts +0 -11
  144. package/lib/types/UserCenter/components/settings.d.ts +0 -10
  145. package/lib/types/UserCenter/components/status-dialog/date-picker.d.ts +0 -10
  146. package/lib/types/UserCenter/components/status-dialog/index.d.ts +0 -12
  147. package/lib/types/UserCenter/components/status-selector/duration-menu.d.ts +0 -7
  148. package/lib/types/UserCenter/components/status-selector/index.d.ts +0 -9
  149. package/lib/types/UserCenter/components/status-selector/menu-item.d.ts +0 -24
  150. package/lib/types/UserCenter/components/storage/action.d.ts +0 -9
  151. package/lib/types/UserCenter/components/storage/connected.d.ts +0 -5
  152. package/lib/types/UserCenter/components/storage/delete.d.ts +0 -6
  153. package/lib/types/UserCenter/components/storage/disconnect.d.ts +0 -2
  154. package/lib/types/UserCenter/components/storage/index.d.ts +0 -2
  155. package/lib/types/UserCenter/components/storage/preview-nft.d.ts +0 -5
  156. package/lib/types/UserCenter/components/third-party-login/index.d.ts +0 -4
  157. package/lib/types/UserCenter/components/third-party-login/third-party-item.d.ts +0 -13
  158. package/lib/types/UserCenter/components/user-center.d.ts +0 -16
  159. package/lib/types/UserCenter/components/user-info/address.d.ts +0 -16
  160. package/lib/types/UserCenter/components/user-info/index.d.ts +0 -4
  161. package/lib/types/UserCenter/components/user-info/link-preview-input.d.ts +0 -5
  162. package/lib/types/UserCenter/components/user-info/metadata.d.ts +0 -10
  163. package/lib/types/UserCenter/components/user-info/switch-role.d.ts +0 -7
  164. package/lib/types/UserCenter/components/user-info/timezone-select.d.ts +0 -8
  165. package/lib/types/UserCenter/components/user-info/user-basic-info.d.ts +0 -13
  166. package/lib/types/UserCenter/components/user-info/user-info-item.d.ts +0 -11
  167. package/lib/types/UserCenter/components/user-info/user-info.d.ts +0 -6
  168. package/lib/types/UserCenter/components/user-info/user-status.d.ts +0 -9
  169. package/lib/types/UserCenter/components/user-info/utils.d.ts +0 -51
  170. package/lib/types/UserCenter/components/webhook-item.d.ts +0 -2
  171. package/lib/types/UserCenter/index.d.ts +0 -1
  172. package/lib/types/UserCenter/libs/locales.d.ts +0 -345
  173. package/lib/types/UserCenter/libs/utils.d.ts +0 -4
  174. package/lib/types/UserSessions/components/user-session-info.d.ts +0 -5
  175. package/lib/types/UserSessions/components/user-sessions.d.ts +0 -20
  176. package/lib/types/UserSessions/index.d.ts +0 -1
  177. package/lib/types/UserSessions/libs/locales.d.ts +0 -60
  178. package/lib/types/UserSessions/libs/utils.d.ts +0 -2
  179. package/lib/types/blocklets.d.ts +0 -17
  180. package/lib/types/common/domain-warning.d.ts +0 -12
  181. package/lib/types/common/header-addons.d.ts +0 -19
  182. package/lib/types/common/link-blocker.d.ts +0 -7
  183. package/lib/types/common/notification-addon.d.ts +0 -10
  184. package/lib/types/common/overridable-theme-provider.d.ts +0 -15
  185. package/lib/types/common/wallet-hidden-topbar.d.ts +0 -1
  186. package/lib/types/common/ws.d.ts +0 -3
  187. package/lib/types/contexts/config-user-space.d.ts +0 -27
  188. package/lib/types/hooks/use-mobile.d.ts +0 -4
  189. package/lib/types/index.d.ts +0 -10
  190. package/lib/types/libs/client.d.ts +0 -2
  191. package/lib/types/libs/constant.d.ts +0 -1
  192. package/lib/types/libs/spaces.d.ts +0 -2
  193. package/lib/types/libs/with-hide-when-embed.d.ts +0 -4
  194. package/lib/types/types.d.ts +0 -36
  195. package/lib/types/utils.d.ts +0 -10
@@ -1,10 +0,0 @@
1
- import { ReactElement } from 'react';
2
- export default function PublishComponent({ componentDid, grantedRoles, onClose, render, }: {
3
- componentDid: string;
4
- grantedRoles?: string[];
5
- onClose: () => void;
6
- render?: ({ onClick, loading }: {
7
- onClick: () => void;
8
- loading: boolean;
9
- }) => ReactElement<any>;
10
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- declare const _default: import('react').ForwardRefExoticComponent<{
2
- src: string;
3
- componentDid: string;
4
- open?: boolean;
5
- loading?: boolean;
6
- storeUrl?: string;
7
- onLoad?: () => void;
8
- onClose?: () => void;
9
- onComplete?: () => void;
10
- } & import('react').RefAttributes<{
11
- selectBlocklet: (blockletMeta: any) => void;
12
- }>>;
13
- export default _default;
@@ -1,3 +0,0 @@
1
- export { default as PublishComponent } from './components/publish-component';
2
- export { default as AddComponent } from './components/add-component';
3
- export { default as CheckComponent } from './components/check-component';
@@ -1,14 +0,0 @@
1
- export declare const translations: {
2
- zh: {
3
- importResource: string;
4
- exportResource: string;
5
- noPermission: string;
6
- needLogin: string;
7
- };
8
- en: {
9
- importResource: string;
10
- exportResource: string;
11
- noPermission: string;
12
- needLogin: string;
13
- };
14
- };
@@ -1,13 +0,0 @@
1
- import { default as Basic } from './demo/basic';
2
- declare namespace _default {
3
- let title: string;
4
- namespace parameters {
5
- let layout: string;
6
- namespace design {
7
- let type: string;
8
- let url: string;
9
- }
10
- }
11
- }
12
- export default _default;
13
- export { Basic };
@@ -1,29 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- import { default as noop } from 'lodash/noop';
3
- declare function Demo({ userRole }: {
4
- userRole: any;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- declare namespace Demo {
7
- namespace propTypes {
8
- let userRole: PropTypes.Validator<string>;
9
- }
10
- }
11
- export default Demo;
12
- export namespace mockSession {
13
- export { noop as login };
14
- export { noop as logout };
15
- export { noop as switch };
16
- export { noop as switchDid };
17
- export { noop as switchProfile };
18
- export { noop as switchPassport };
19
- export function useDid(): {
20
- walletDid: string;
21
- };
22
- export function useOAuth(): {
23
- logoutOAuth: (...args: any[]) => void;
24
- bindOAuth: (...args: any[]) => void;
25
- configs: {};
26
- switchOAuthPassport: (...args: any[]) => void;
27
- };
28
- export function getUserSessions(): never[];
29
- }
@@ -1,30 +0,0 @@
1
- import { BlockletMetaProps, SessionManagerProps } from '../types';
2
- import { default as PropTypes } from 'prop-types';
3
- export default Dashboard;
4
- /**
5
- * 专门用于 (composable) blocklet 的 Dashboard 组件, 解析 blocklet meta 中 section 为 dashboard 的 navigation 数据, 渲染一个 UX Dashboard
6
- */
7
- declare function Dashboard({ meta, fallbackUrl, invalidPathFallback, headerAddons, sessionManagerProps, links, showDomainWarningDialog, ...rest }: {
8
- [x: string]: any;
9
- meta?: {} | undefined;
10
- fallbackUrl?: any;
11
- invalidPathFallback?: null | undefined;
12
- headerAddons?: undefined;
13
- sessionManagerProps?: {
14
- showRole: boolean;
15
- onLogout: () => void;
16
- } | undefined;
17
- links?: any[] | undefined;
18
- showDomainWarningDialog?: boolean | undefined;
19
- }): import("react/jsx-runtime").JSX.Element | null;
20
- declare namespace Dashboard {
21
- namespace propTypes {
22
- export { BlockletMetaProps as meta };
23
- export let fallbackUrl: PropTypes.Requireable<string>;
24
- export let invalidPathFallback: PropTypes.Requireable<(...args: any[]) => any>;
25
- export let headerAddons: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactNodeLike>>;
26
- export { SessionManagerProps as sessionManagerProps };
27
- export let links: PropTypes.Requireable<NonNullable<any[] | ((...args: any[]) => any) | null | undefined>>;
28
- export let showDomainWarningDialog: PropTypes.Requireable<boolean>;
29
- }
30
- }
@@ -1,19 +0,0 @@
1
- import { default as Brand } from './demo/brand';
2
- import { default as Links } from './demo/links';
3
- import { default as SocialMediaIcons } from './demo/social-media-icons';
4
- import { default as Copyright } from './demo/copyright';
5
- import { default as Footer } from './demo/footer';
6
- import { default as ArcblockSite } from './demo/arcblock-site';
7
- declare namespace _default {
8
- let title: string;
9
- namespace parameters {
10
- let layout: string;
11
- namespace docs {
12
- namespace description {
13
- let component: string;
14
- }
15
- }
16
- }
17
- }
18
- export default _default;
19
- export { Brand, Links, SocialMediaIcons, Copyright, Footer, ArcblockSite };
@@ -1,15 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- declare function Brand({ name, logo, description, ...rest }: {
3
- [x: string]: any;
4
- name?: string | undefined;
5
- logo?: string | undefined;
6
- description?: string | undefined;
7
- }): import("react/jsx-runtime").JSX.Element | null;
8
- declare namespace Brand {
9
- namespace propTypes {
10
- let name: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
- let logo: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- let description: PropTypes.Requireable<string>;
13
- }
14
- }
15
- export default Brand;
@@ -1,13 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- declare function Copyright({ owner, year, ...rest }: {
3
- [x: string]: any;
4
- owner?: string | undefined;
5
- year?: string | undefined;
6
- }): import("react/jsx-runtime").JSX.Element;
7
- declare namespace Copyright {
8
- namespace propTypes {
9
- let owner: PropTypes.Requireable<string>;
10
- let year: PropTypes.Requireable<string>;
11
- }
12
- }
13
- export default Copyright;
@@ -1,31 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- import { default as noop } from 'lodash/noop';
3
- declare function Demo({ emptyNavData, overrideTheme, ...rest }: {
4
- [x: string]: any;
5
- emptyNavData?: boolean | undefined;
6
- overrideTheme?: boolean | undefined;
7
- }): import("react/jsx-runtime").JSX.Element;
8
- declare namespace Demo {
9
- namespace propTypes {
10
- let emptyNavData: PropTypes.Requireable<boolean>;
11
- let overrideTheme: PropTypes.Requireable<boolean>;
12
- }
13
- }
14
- export default Demo;
15
- export namespace mockSessionContextValue {
16
- namespace session {
17
- export { noop as login };
18
- export { noop as logout };
19
- export { noop as switch };
20
- export { noop as switchDid };
21
- export { noop as switchProfile };
22
- export { noop as switchPassport };
23
- export function useOAuth(): {
24
- logoutOAuth: (...args: any[]) => void;
25
- bindOAuth: (...args: any[]) => void;
26
- configs: {};
27
- switchOAuthPassport: (...args: any[]) => void;
28
- };
29
- export function getUserSessions(): never[];
30
- }
31
- }
@@ -1 +0,0 @@
1
- export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- declare function Demo({ locale }: {
3
- locale?: string | undefined;
4
- }): import("react/jsx-runtime").JSX.Element;
5
- declare namespace Demo {
6
- namespace propTypes {
7
- let locale: PropTypes.Requireable<string>;
8
- }
9
- }
10
- export default Demo;
@@ -1 +0,0 @@
1
- export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -1,32 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- export default InternalFooter;
3
- /**
4
- * 通用的内部 footer 组件, 定义并渲染常见的几种 footer 元素: brand/navigation/social medial 等
5
- */
6
- declare function InternalFooter(props: any): import("react/jsx-runtime").JSX.Element;
7
- declare namespace InternalFooter {
8
- namespace propTypes {
9
- let brand: PropTypes.Requireable<PropTypes.InferProps<{
10
- name: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
- description: PropTypes.Requireable<string>;
12
- logo: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
- }>>;
14
- let navigation: PropTypes.Requireable<(PropTypes.InferProps<{
15
- label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
16
- link: PropTypes.Requireable<string>;
17
- }> | null | undefined)[]>;
18
- let socialMedia: PropTypes.Requireable<(PropTypes.InferProps<{
19
- icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
20
- link: PropTypes.Requireable<string>;
21
- }> | null | undefined)[]>;
22
- let copyright: PropTypes.Requireable<PropTypes.InferProps<{
23
- owner: PropTypes.Requireable<string>;
24
- year: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
25
- }>>;
26
- let links: PropTypes.Requireable<(PropTypes.InferProps<{
27
- label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
28
- link: PropTypes.Requireable<string>;
29
- }> | null | undefined)[]>;
30
- let layout: PropTypes.Requireable<string>;
31
- }
32
- }
@@ -1,22 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- export default PlainLayout;
3
- /**
4
- * footer plain layout
5
- */
6
- declare function PlainLayout({ elements, data, ...rest }: {
7
- [x: string]: any;
8
- elements: any;
9
- data: any;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- declare namespace PlainLayout {
12
- namespace propTypes {
13
- let elements: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
14
- brand: PropTypes.Requireable<PropTypes.ReactElementLike>;
15
- navigation: PropTypes.Requireable<PropTypes.ReactElementLike>;
16
- socialMedia: PropTypes.Requireable<PropTypes.ReactElementLike>;
17
- copyright: PropTypes.Requireable<PropTypes.ReactElementLike>;
18
- links: PropTypes.Requireable<PropTypes.ReactElementLike>;
19
- }>>>;
20
- let data: PropTypes.Validator<object>;
21
- }
22
- }
@@ -1,13 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- declare function Row({ children, autoCenter, ...rest }: {
3
- [x: string]: any;
4
- children?: null | undefined;
5
- autoCenter?: boolean | undefined;
6
- }): import("react/jsx-runtime").JSX.Element | null;
7
- declare namespace Row {
8
- namespace propTypes {
9
- let children: PropTypes.Requireable<any>;
10
- let autoCenter: PropTypes.Requireable<boolean>;
11
- }
12
- }
13
- export default Row;
@@ -1,24 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- export default StandardLayout;
3
- /**
4
- * footer standard layout
5
- */
6
- declare function StandardLayout({ elements, data, className, ...rest }: {
7
- [x: string]: any;
8
- elements: any;
9
- data: any;
10
- className: any;
11
- }): import("react/jsx-runtime").JSX.Element;
12
- declare namespace StandardLayout {
13
- namespace propTypes {
14
- let elements: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
15
- brand: PropTypes.Requireable<PropTypes.ReactElementLike>;
16
- navigation: PropTypes.Requireable<PropTypes.ReactElementLike>;
17
- socialMedia: PropTypes.Requireable<PropTypes.ReactElementLike>;
18
- copyright: PropTypes.Requireable<PropTypes.ReactElementLike>;
19
- links: PropTypes.Requireable<PropTypes.ReactElementLike>;
20
- }>>>;
21
- let data: PropTypes.Validator<object>;
22
- let className: PropTypes.Requireable<string>;
23
- }
24
- }
@@ -1,23 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- /**
3
- * footer 中的 links (支持分组, 最多支持 2 级)
4
- */
5
- declare function Links({ links, flowLayout, columns, ...rest }: {
6
- [x: string]: any;
7
- links?: any[] | undefined;
8
- flowLayout?: boolean | undefined;
9
- columns: any;
10
- }): import("react/jsx-runtime").JSX.Element | null;
11
- declare namespace Links {
12
- namespace propTypes {
13
- let links: PropTypes.Requireable<(PropTypes.InferProps<{
14
- label: PropTypes.Requireable<string>;
15
- link: PropTypes.Requireable<string>;
16
- render: PropTypes.Requireable<(...args: any[]) => any>;
17
- props: PropTypes.Requireable<object>;
18
- }> | null | undefined)[]>;
19
- let flowLayout: PropTypes.Requireable<boolean>;
20
- let columns: PropTypes.Requireable<number>;
21
- }
22
- }
23
- export default Links;
@@ -1,14 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- declare function SocialMedia({ items, ...rest }: {
3
- [x: string]: any;
4
- items?: null | undefined;
5
- }): import("react/jsx-runtime").JSX.Element | null;
6
- declare namespace SocialMedia {
7
- namespace propTypes {
8
- let items: PropTypes.Requireable<(PropTypes.InferProps<{
9
- icon: PropTypes.Requireable<string>;
10
- link: PropTypes.Requireable<string>;
11
- }> | null | undefined)[]>;
12
- }
13
- }
14
- export default SocialMedia;
@@ -1,26 +0,0 @@
1
- import { default as Basic } from './demo/basic';
2
- import { default as WithEnableConnectEnableLocale } from './demo/with-enable-connect-enable-locale';
3
- import { default as AddonsCustomization } from './demo/addons-customization';
4
- declare namespace _default {
5
- let title: string;
6
- namespace parameters {
7
- let layout: string;
8
- namespace docs {
9
- namespace description {
10
- let component: string;
11
- }
12
- }
13
- namespace design {
14
- let type: string;
15
- let url: string;
16
- }
17
- }
18
- namespace argTypes {
19
- namespace maxWidth {
20
- let control: string;
21
- let options: (string | boolean)[];
22
- }
23
- }
24
- }
25
- export default _default;
26
- export { Basic, WithEnableConnectEnableLocale, AddonsCustomization };
@@ -1,11 +0,0 @@
1
- import { default as PropTypes } from 'prop-types';
2
- declare function Demo({ overrideTheme, ...rest }: {
3
- [x: string]: any;
4
- overrideTheme?: boolean | undefined;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- declare namespace Demo {
7
- namespace propTypes {
8
- let overrideTheme: PropTypes.Requireable<boolean>;
9
- }
10
- }
11
- export default Demo;
@@ -1 +0,0 @@
1
- export default function Demo(props: any): import("react/jsx-runtime").JSX.Element;
@@ -1,49 +0,0 @@
1
- import { default as noop } from 'lodash/noop';
2
- export namespace mockSessionContextValue {
3
- namespace session {
4
- export { noop as login };
5
- export { noop as logout };
6
- export { noop as switch };
7
- export { noop as switchDid };
8
- export { noop as switchProfile };
9
- export { noop as switchPassport };
10
- export function useOAuth(): {
11
- logoutOAuth: (...args: any[]) => void;
12
- bindOAuth: (...args: any[]) => void;
13
- configs: {};
14
- switchOAuthPassport: (...args: any[]) => void;
15
- };
16
- export function getUserSessions(): never[];
17
- }
18
- }
19
- export namespace mockBlockletMeta {
20
- let appId: string;
21
- let appName: string;
22
- let appLogoRect: string;
23
- let appLogo: string;
24
- let navigation: ({
25
- title: {
26
- en: string;
27
- zh: string;
28
- };
29
- link: string;
30
- icon: string;
31
- items?: undefined;
32
- } | {
33
- title: string;
34
- link: {
35
- en: string;
36
- zh: string;
37
- };
38
- icon: string;
39
- items?: undefined;
40
- } | {
41
- title: string;
42
- icon: string;
43
- items: {
44
- title: string;
45
- link: string;
46
- }[];
47
- link?: undefined;
48
- })[];
49
- }
@@ -1 +0,0 @@
1
- export default function Demo(props: any): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +0,0 @@
1
- import { JSX } from 'react';
2
- import { BoxProps, Breakpoint } from '@mui/material';
3
- import { BlockletMetaProps, SessionManagerProps } from '../@types';
4
- type HeaderProps = {
5
- meta?: BlockletMetaProps;
6
- addons?: Function | React.ReactNode;
7
- sessionManagerProps?: SessionManagerProps;
8
- homeLink?: string | ((brandContent: React.ReactNode) => JSX.Element | null);
9
- theme?: object;
10
- hideNavMenu?: boolean;
11
- bordered?: boolean;
12
- logo?: React.ReactNode;
13
- brand?: React.ReactNode;
14
- brandAddon?: React.ReactNode;
15
- description?: React.ReactNode;
16
- children?: React.ReactNode;
17
- prepend?: React.ReactNode;
18
- align?: 'left' | 'right';
19
- maxWidth?: false | Breakpoint;
20
- showDomainWarningDialog?: boolean;
21
- };
22
- declare const _default: import('react').ComponentType<HeaderProps & Omit<BoxProps, keyof HeaderProps>>;
23
- export default _default;
@@ -1,12 +0,0 @@
1
- export { default as Icon } from './demo/basic';
2
- declare namespace _default {
3
- let title: string;
4
- namespace parameters {
5
- namespace docs {
6
- namespace description {
7
- let component: string;
8
- }
9
- }
10
- }
11
- }
12
- export default _default;
@@ -1 +0,0 @@
1
- export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { AvatarProps, BoxProps } from '@mui/material';
2
- /**
3
- * Icon 组件, 基于 mui Avatar 组件扩展对 iconify 的支持
4
- */
5
- export default function Icon({ icon, size, sx, ...rest }: {
6
- icon: string;
7
- size?: number;
8
- sx?: BoxProps['sx'];
9
- } & AvatarProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,16 +0,0 @@
1
- interface NotificationComponentProps {
2
- viewAllUrl: string;
3
- keyId: number;
4
- notification: {
5
- severity?: string;
6
- title?: string;
7
- description?: string;
8
- activity?: any;
9
- actorInfo?: any;
10
- };
11
- content?: React.ReactNode;
12
- }
13
- export default function NotificationComponent({ ref, keyId: key, notification, viewAllUrl, content, }: NotificationComponentProps & {
14
- ref?: React.Ref<unknown>;
15
- }): import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,48 +0,0 @@
1
- /**
2
- * Activity types enum for type safety
3
- * @readonly
4
- * @enum {string}
5
- */
6
- declare const ACTIVITY_TYPES: {
7
- readonly COMMENT: "comment";
8
- readonly LIKE: "like";
9
- readonly FOLLOW: "follow";
10
- readonly TIPS: "tips";
11
- readonly MENTION: "mention";
12
- readonly ASSIGN: "assign";
13
- };
14
- type ActivityTypeValues = (typeof ACTIVITY_TYPES)[keyof typeof ACTIVITY_TYPES];
15
- interface UserData {
16
- did: string;
17
- fullName: string;
18
- }
19
- interface ActivityTarget {
20
- type: string;
21
- name: string;
22
- }
23
- interface Activity {
24
- type: ActivityTypeValues;
25
- target: ActivityTarget;
26
- }
27
- interface ExtraParams {
28
- linkColor?: string;
29
- [key: string]: any;
30
- }
31
- interface ActivityTitleProps {
32
- activity: Activity;
33
- users: UserData[];
34
- actors: string[];
35
- extra?: ExtraParams;
36
- mountPoint?: string;
37
- }
38
- /**
39
- * A hook that returns a formatted activity title with linked usernames
40
- * @param {Object} params - The parameters object
41
- * @param {keyof typeof ACTIVITY_TYPES} params.type - The activity type
42
- * @param {Object} params.target - The target object
43
- * @param {Array<{did: string, fullName: string}>} params.users - Array of user objects
44
- * @param {Object} params.extra - Extra parameters
45
- * @returns {React.ReactNode} Formatted title with linked usernames
46
- */
47
- export default function useActivityTitle({ activity, users, actors, extra, mountPoint }: ActivityTitleProps): import("react/jsx-runtime").JSX.Element | null;
48
- export {};
@@ -1,2 +0,0 @@
1
- declare function useWidth(): string;
2
- export default useWidth;
@@ -1,70 +0,0 @@
1
- /**
2
- * 通知对象的活动目标接口
3
- */
4
- interface ActivityTarget {
5
- type?: string;
6
- id?: string;
7
- }
8
- /**
9
- * 通知对象的活动元数据接口
10
- */
11
- interface ActivityMeta {
12
- id?: string;
13
- }
14
- /**
15
- * 活动对象接口
16
- */
17
- interface Activity {
18
- type?: string;
19
- actor?: string;
20
- target?: ActivityTarget;
21
- meta?: ActivityMeta;
22
- }
23
- /**
24
- * 通知对象接口
25
- */
26
- interface Notification {
27
- activity?: Activity;
28
- actorInfo?: any;
29
- severity?: string;
30
- title?: string;
31
- description?: string;
32
- items?: Notification[];
33
- }
34
- /**
35
- * 合并相邻的通知数据
36
- * 合并条件:
37
- * 1. 数据必须是相邻的
38
- * 2. activity.type 必须相同且不为 null 或 undefined
39
- * 3. 如果存在target对象,activity.target.type和activity.target.id都必须相同
40
- * 4. 如果相邻数据的 activity.type 相同但没有 activity.target 对象,则需要合并
41
- *
42
- * @param {Notification[]} notifications - 需要处理的通知数据
43
- * @returns {Notification[]} - 合并后的通知数组
44
- */
45
- export declare const mergeAdjacentNotifications: (notifications: Notification[]) => Notification[];
46
- /**
47
- * 判断通知是否包含activity
48
- * @param {Notification} notification - 通知对象
49
- * @returns {boolean} - 是否包含activity
50
- */
51
- export declare const isIncludeActivity: (notification: Notification) => boolean;
52
- /**
53
- * 是否可以自动已读
54
- */
55
- export declare const canAutoRead: (notification: Notification | null | undefined) => boolean;
56
- /**
57
- * 获取 activity 的链接
58
- * 链接的来源有两种
59
- * 1. activity.meta.id
60
- * 2. activity.target.id
61
- * @param {Activity} activity - 活动对象
62
- * @returns {Object | null} - 活动的链接
63
- */
64
- export declare const getActivityLink: (activity: Activity | null | undefined) => {
65
- metaLink?: string | null;
66
- targetLink?: string | null;
67
- } | null;
68
- export declare const toClickableSpan: (str: string, locale: string, isHighLight?: boolean) => Promise<string>;
69
- export declare const sanitize: (innerHtml: string) => string;
70
- export {};
@@ -1,4 +0,0 @@
1
- import { User } from '../../@types';
2
- export default function ConfigInviter({ user }: {
3
- user: User;
4
- }): import("react/jsx-runtime").JSX.Element | "-";