@openlv/modal 0.0.1-beta.10

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 (94) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +1 -0
  3. package/dist/ar-CyZSQ56p.js +25 -0
  4. package/dist/ar-CyZSQ56p.js.map +1 -0
  5. package/dist/ar-xpXGBcxc.cjs +3 -0
  6. package/dist/ar-xpXGBcxc.cjs.map +1 -0
  7. package/dist/assets/logo.d.ts +5 -0
  8. package/dist/components/Header.d.ts +9 -0
  9. package/dist/components/ModalRoot.d.ts +9 -0
  10. package/dist/components/UnknownState.d.ts +4 -0
  11. package/dist/components/footer/Footer.d.ts +1 -0
  12. package/dist/components/footer/StatusIndicator.d.ts +1 -0
  13. package/dist/components/settings/a11y/index.d.ts +1 -0
  14. package/dist/components/settings/a11y/theme.d.ts +2 -0
  15. package/dist/components/settings/connection/index.d.ts +4 -0
  16. package/dist/components/settings/connection/signaling.d.ts +1 -0
  17. package/dist/components/settings/connection/transport.d.ts +1 -0
  18. package/dist/components/settings/index.d.ts +11 -0
  19. package/dist/context.d.ts +11 -0
  20. package/dist/element.d.ts +23 -0
  21. package/dist/es-B9xaw9fo.cjs +3 -0
  22. package/dist/es-B9xaw9fo.cjs.map +1 -0
  23. package/dist/es-C2sG0TfH.js +25 -0
  24. package/dist/es-C2sG0TfH.js.map +1 -0
  25. package/dist/fa-DCpZYzOX.cjs +3 -0
  26. package/dist/fa-DCpZYzOX.cjs.map +1 -0
  27. package/dist/fa-_bXJQdwj.js +25 -0
  28. package/dist/fa-_bXJQdwj.js.map +1 -0
  29. package/dist/flow/ConnectionFlow.d.ts +6 -0
  30. package/dist/flow/HandshakeOpen.d.ts +4 -0
  31. package/dist/flow/InfoScreen.d.ts +1 -0
  32. package/dist/flow/disconnected/ConnectionGraphic.d.ts +1 -0
  33. package/dist/flow/disconnected/Disconnected.d.ts +4 -0
  34. package/dist/fr-BRQDr1rj.js +25 -0
  35. package/dist/fr-BRQDr1rj.js.map +1 -0
  36. package/dist/fr-D54ESMxz.cjs +3 -0
  37. package/dist/fr-D54ESMxz.cjs.map +1 -0
  38. package/dist/he-BWZyf3Uy.cjs +3 -0
  39. package/dist/he-BWZyf3Uy.cjs.map +1 -0
  40. package/dist/he-NFIsHMZP.js +25 -0
  41. package/dist/he-NFIsHMZP.js.map +1 -0
  42. package/dist/hooks/useClipboard.d.ts +1 -0
  43. package/dist/hooks/useConnectionState.d.ts +7 -0
  44. package/dist/hooks/useEventEmitter.d.ts +2 -0
  45. package/dist/hooks/useNavigationStack.d.ts +12 -0
  46. package/dist/hooks/useProvider.d.ts +5 -0
  47. package/dist/hooks/usePunchTransition.d.ts +8 -0
  48. package/dist/hooks/useSession.d.ts +8 -0
  49. package/dist/hooks/useSettings.d.ts +45 -0
  50. package/dist/hooks/useThemeConfig.d.ts +8 -0
  51. package/dist/index.cjs.js +8 -0
  52. package/dist/index.cjs.js.map +1 -0
  53. package/dist/index.d.ts +13 -0
  54. package/dist/index.es.js +2633 -0
  55. package/dist/index.es.js.map +1 -0
  56. package/dist/modal.css +1 -0
  57. package/dist/nl-BRV9i3nM.js +24 -0
  58. package/dist/nl-BRV9i3nM.js.map +1 -0
  59. package/dist/nl-bCeoO8RU.cjs +2 -0
  60. package/dist/nl-bCeoO8RU.cjs.map +1 -0
  61. package/dist/openlv-CH8lb3Oi.js +98 -0
  62. package/dist/openlv-CH8lb3Oi.js.map +1 -0
  63. package/dist/openlv-SMG3Trx9.cjs +2 -0
  64. package/dist/openlv-SMG3Trx9.cjs.map +1 -0
  65. package/dist/simple-CAAgvkQC.js +114 -0
  66. package/dist/simple-CAAgvkQC.js.map +1 -0
  67. package/dist/simple-DDht1UVo.cjs +2 -0
  68. package/dist/simple-DDht1UVo.cjs.map +1 -0
  69. package/dist/styles/index.d.ts +5 -0
  70. package/dist/sv-BHh_RkLw.cjs +2 -0
  71. package/dist/sv-BHh_RkLw.cjs.map +1 -0
  72. package/dist/sv-CEyo-XBk.js +24 -0
  73. package/dist/sv-CEyo-XBk.js.map +1 -0
  74. package/dist/theme/index.d.ts +8 -0
  75. package/dist/theme/openlv.d.ts +141 -0
  76. package/dist/theme/simple.d.ts +137 -0
  77. package/dist/theme/types.d.ts +98 -0
  78. package/dist/types/connection.d.ts +13 -0
  79. package/dist/ui/Button.d.ts +62 -0
  80. package/dist/ui/InfoTooltip.d.ts +78 -0
  81. package/dist/ui/Input.d.ts +22 -0
  82. package/dist/ui/Select.d.ts +8 -0
  83. package/dist/ui/Toggle.d.ts +7 -0
  84. package/dist/ui/TransitionContainer.d.ts +9 -0
  85. package/dist/ui/menu/MenuGroup.d.ts +6 -0
  86. package/dist/ui/menu/MenuItem.d.ts +5 -0
  87. package/dist/ui/menu/MenuLink.d.ts +7 -0
  88. package/dist/utils/i18n.d.ts +34 -0
  89. package/dist/utils/log.d.ts +1 -0
  90. package/dist/zh-cn-Bqo3eRaE.cjs +3 -0
  91. package/dist/zh-cn-Bqo3eRaE.cjs.map +1 -0
  92. package/dist/zh-cn-DJpfZdjA.js +25 -0
  93. package/dist/zh-cn-DJpfZdjA.js.map +1 -0
  94. package/package.json +76 -0
@@ -0,0 +1,137 @@
1
+ export declare const simpleTheme: {
2
+ light: {
3
+ font: {
4
+ family: string;
5
+ };
6
+ body: {
7
+ color: string;
8
+ background: string;
9
+ };
10
+ border: {
11
+ radius: string;
12
+ };
13
+ overlay: {
14
+ background: string;
15
+ backdrop: {
16
+ filter: string;
17
+ };
18
+ };
19
+ modal: {
20
+ shadow: string;
21
+ };
22
+ control: {
23
+ input: {
24
+ background: string;
25
+ border: string;
26
+ text: string;
27
+ };
28
+ button: {
29
+ primary: {
30
+ background: string;
31
+ color: string;
32
+ padding: string;
33
+ hoverBackground: string;
34
+ activeBackground: string;
35
+ disabledBackground: string;
36
+ disabledColor: string;
37
+ border: string;
38
+ };
39
+ secondary: {
40
+ background: string;
41
+ color: string;
42
+ hoverBackground: string;
43
+ activeBackground: string;
44
+ disabledBackground: string;
45
+ disabledColor: string;
46
+ border: string;
47
+ selectedBackground: string;
48
+ selectedColor: string;
49
+ };
50
+ tertiary: {
51
+ color: string;
52
+ hoverBackground: string;
53
+ activeBackground: string;
54
+ disabledColor: string;
55
+ };
56
+ };
57
+ };
58
+ qr: {
59
+ background: string;
60
+ color: string;
61
+ };
62
+ card: {
63
+ background: string;
64
+ };
65
+ text: {
66
+ primary: string;
67
+ secondary: string;
68
+ muted: string;
69
+ heading: string;
70
+ body: string;
71
+ };
72
+ };
73
+ dark: {
74
+ body: {
75
+ color: string;
76
+ background: string;
77
+ };
78
+ border: {
79
+ color: string;
80
+ width: string;
81
+ };
82
+ overlay: {
83
+ background: string;
84
+ backdrop: {
85
+ filter: string;
86
+ };
87
+ };
88
+ modal: {
89
+ shadow: string;
90
+ };
91
+ control: {
92
+ input: {
93
+ background: string;
94
+ border: string;
95
+ text: string;
96
+ };
97
+ button: {
98
+ primary: {
99
+ background: string;
100
+ color: string;
101
+ hoverBackground: string;
102
+ activeBackground: string;
103
+ disabledBackground: string;
104
+ disabledColor: string;
105
+ border: string;
106
+ };
107
+ secondary: {
108
+ background: string;
109
+ color: string;
110
+ hoverBackground: string;
111
+ activeBackground: string;
112
+ disabledBackground: string;
113
+ disabledColor: string;
114
+ border: string;
115
+ };
116
+ tertiary: {
117
+ color: string;
118
+ hoverBackground: string;
119
+ activeBackground: string;
120
+ disabledColor: string;
121
+ };
122
+ };
123
+ };
124
+ qr: {
125
+ background: string;
126
+ color: string;
127
+ };
128
+ card: {
129
+ background: string;
130
+ };
131
+ text: {
132
+ primary: string;
133
+ secondary: string;
134
+ muted: string;
135
+ };
136
+ };
137
+ };
@@ -0,0 +1,98 @@
1
+ import { UserThemePreference } from '@openlv/provider/storage';
2
+ /** Developer-controlled theme mode */
3
+ export type ThemeMode = "auto" | "light" | "dark";
4
+ /** User's theme preference (only used when ThemeMode is "auto") */
5
+ export type { UserThemePreference };
6
+ type DeepPartial<T> = {
7
+ [K in keyof T]?: DeepPartial<T[K]>;
8
+ };
9
+ type OpenLVThemeShape = {
10
+ font: {
11
+ family: string;
12
+ };
13
+ body: {
14
+ color: string;
15
+ /** Background color of the main modal */
16
+ background: string;
17
+ };
18
+ border: {
19
+ radius: string;
20
+ width?: string;
21
+ color?: string;
22
+ };
23
+ overlay: {
24
+ background: string;
25
+ backdrop: {
26
+ filter: string;
27
+ };
28
+ };
29
+ modal: {
30
+ shadow: string;
31
+ };
32
+ control: {
33
+ input: {
34
+ background: string;
35
+ border: string;
36
+ text: string;
37
+ };
38
+ button: {
39
+ primary: {
40
+ background: string;
41
+ color: string;
42
+ padding: string;
43
+ hoverBackground?: string;
44
+ activeBackground?: string;
45
+ disabledBackground?: string;
46
+ disabledColor?: string;
47
+ border?: string;
48
+ };
49
+ secondary: {
50
+ background: string;
51
+ color: string;
52
+ hoverBackground?: string;
53
+ activeBackground?: string;
54
+ disabledBackground?: string;
55
+ disabledColor?: string;
56
+ border?: string;
57
+ selectedBackground?: string;
58
+ selectedColor?: string;
59
+ };
60
+ tertiary?: {
61
+ color: string;
62
+ hoverBackground?: string;
63
+ activeBackground?: string;
64
+ disabledColor?: string;
65
+ };
66
+ };
67
+ };
68
+ qr: {
69
+ background: string;
70
+ color: string;
71
+ };
72
+ card: {
73
+ background: string;
74
+ };
75
+ text: {
76
+ primary?: string;
77
+ secondary?: string;
78
+ muted?: string;
79
+ heading?: string;
80
+ body?: string;
81
+ };
82
+ };
83
+ export type OpenLVTheme = DeepPartial<OpenLVThemeShape>;
84
+ export type ThemeTokensMap = {
85
+ common?: OpenLVTheme;
86
+ light?: OpenLVTheme;
87
+ dark?: OpenLVTheme;
88
+ } & ({
89
+ light: OpenLVTheme;
90
+ } | {
91
+ dark: OpenLVTheme;
92
+ });
93
+ export type PredefinedThemeName = "simple" | "openlv";
94
+ export type ThemeConfig<T extends ThemeTokensMap = ThemeTokensMap> = {
95
+ theme: T | PredefinedThemeName;
96
+ /** Theme mode. Defaults to "auto" if not specified. */
97
+ mode?: ThemeMode;
98
+ };
@@ -0,0 +1,13 @@
1
+ export type ConnectionState = "idle" | "initializing" | "connecting" | "qr-ready" | "connected" | "error" | "disconnected";
2
+ export interface ConnectionInfo {
3
+ state: ConnectionState;
4
+ uri?: string;
5
+ error?: string;
6
+ connectedAccount?: string;
7
+ chainId?: number;
8
+ }
9
+ export interface ModalConnectionInterface {
10
+ showModal: () => void;
11
+ hideModal: () => void;
12
+ onClose?: () => void;
13
+ }
@@ -0,0 +1,62 @@
1
+ import { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'preact';
2
+ import { PropsWithChildren } from 'preact/compat';
3
+ import { VariantProps } from 'tailwind-variants/lite';
4
+ declare const styles: import('tailwind-variants/lite').TVReturnType<{
5
+ $variant: {
6
+ primary: string;
7
+ secondary: string;
8
+ tertiary: string;
9
+ };
10
+ $size: {
11
+ sm: string;
12
+ md: string;
13
+ lg: string;
14
+ };
15
+ $aspect: {
16
+ square: string;
17
+ auto: string;
18
+ };
19
+ }, undefined, string, {
20
+ $variant: {
21
+ primary: string;
22
+ secondary: string;
23
+ tertiary: string;
24
+ };
25
+ $size: {
26
+ sm: string;
27
+ md: string;
28
+ lg: string;
29
+ };
30
+ $aspect: {
31
+ square: string;
32
+ auto: string;
33
+ };
34
+ }, undefined, import('tailwind-variants/lite').TVReturnType<{
35
+ $variant: {
36
+ primary: string;
37
+ secondary: string;
38
+ tertiary: string;
39
+ };
40
+ $size: {
41
+ sm: string;
42
+ md: string;
43
+ lg: string;
44
+ };
45
+ $aspect: {
46
+ square: string;
47
+ auto: string;
48
+ };
49
+ }, undefined, string, unknown, unknown, undefined>>;
50
+ export type ButtonButtonProps = {
51
+ onClick: () => void;
52
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
53
+ export type ButtonLinkProps = {
54
+ href: string;
55
+ } & AnchorHTMLAttributes<HTMLAnchorElement>;
56
+ export type ButtonProps = PropsWithChildren<VariantProps<typeof styles> & (({
57
+ href: string;
58
+ } & ButtonLinkProps) | ({
59
+ onClick: () => void;
60
+ } & ButtonButtonProps))>;
61
+ export declare function Button(rawProps: ButtonProps): import('preact').VNode<import('preact').ClassAttributes<HTMLElement> & Record<string, unknown>>;
62
+ export {};
@@ -0,0 +1,78 @@
1
+ import { FC, PropsWithChildren } from 'preact/compat';
2
+ import { VariantProps } from 'tailwind-variants/lite';
3
+ declare const styles: import('tailwind-variants/lite').TVReturnType<{
4
+ size: {
5
+ sm: {
6
+ box: string;
7
+ icon: string;
8
+ };
9
+ md: {
10
+ box: string;
11
+ icon: string;
12
+ };
13
+ lg: {
14
+ box: string;
15
+ icon: string;
16
+ };
17
+ };
18
+ variant: {
19
+ icon: string;
20
+ text: string;
21
+ };
22
+ }, {
23
+ root: string;
24
+ box: string;
25
+ popover: string;
26
+ icon: string;
27
+ }, undefined, {
28
+ size: {
29
+ sm: {
30
+ box: string;
31
+ icon: string;
32
+ };
33
+ md: {
34
+ box: string;
35
+ icon: string;
36
+ };
37
+ lg: {
38
+ box: string;
39
+ icon: string;
40
+ };
41
+ };
42
+ variant: {
43
+ icon: string;
44
+ text: string;
45
+ };
46
+ }, {
47
+ root: string;
48
+ box: string;
49
+ popover: string;
50
+ icon: string;
51
+ }, import('tailwind-variants/lite').TVReturnType<{
52
+ size: {
53
+ sm: {
54
+ box: string;
55
+ icon: string;
56
+ };
57
+ md: {
58
+ box: string;
59
+ icon: string;
60
+ };
61
+ lg: {
62
+ box: string;
63
+ icon: string;
64
+ };
65
+ };
66
+ variant: {
67
+ icon: string;
68
+ text: string;
69
+ };
70
+ }, {
71
+ root: string;
72
+ box: string;
73
+ popover: string;
74
+ icon: string;
75
+ }, undefined, unknown, unknown, undefined>>;
76
+ export type InfoTooltipProps = VariantProps<typeof styles>;
77
+ export declare const InfoTooltip: FC<PropsWithChildren<InfoTooltipProps>>;
78
+ export {};
@@ -0,0 +1,22 @@
1
+ type LabelProps = {
2
+ htmlFor?: string;
3
+ children: string;
4
+ };
5
+ export declare const Label: ({ htmlFor, children }: LabelProps) => import("preact").JSX.Element;
6
+ type InputProps = {
7
+ id?: string;
8
+ value: string;
9
+ placeholder?: string;
10
+ ariaLabel?: string;
11
+ readOnly?: boolean;
12
+ onChange?: (value: string) => void;
13
+ };
14
+ export declare const Input: ({ id, value, placeholder, ariaLabel, readOnly, onChange, }: InputProps) => import("preact").JSX.Element;
15
+ type InputGroupProps = {
16
+ label: string;
17
+ values: readonly string[];
18
+ placeholder?: string;
19
+ inputIdPrefix?: string;
20
+ };
21
+ export declare const InputGroup: ({ label, values, placeholder, inputIdPrefix, }: InputGroupProps) => import("preact").JSX.Element;
22
+ export {};
@@ -0,0 +1,8 @@
1
+ import { FC } from 'preact/compat';
2
+ export type SelectProps = {
3
+ options: string[][];
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ dropdownThreshold?: number;
7
+ };
8
+ export declare const Select: FC<SelectProps>;
@@ -0,0 +1,7 @@
1
+ import { FC, ReactNode } from 'preact/compat';
2
+ export type ToggleProps = {
3
+ label: ReactNode;
4
+ value: boolean;
5
+ onChange: (value: boolean) => void;
6
+ };
7
+ export declare const Toggle: FC<ToggleProps>;
@@ -0,0 +1,9 @@
1
+ import { ComponentChildren } from 'preact';
2
+ export type TransitionContainerProps<T> = {
3
+ current: T;
4
+ previous: T | null;
5
+ isTransitioning: boolean;
6
+ render: (value: T) => ComponentChildren;
7
+ className?: string;
8
+ };
9
+ export declare const TransitionContainer: <T>({ current, previous, isTransitioning, render, className, }: TransitionContainerProps<T>) => import("preact").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { FC, PropsWithChildren, ReactNode } from 'preact/compat';
2
+ export type MenuGroupProps = PropsWithChildren<{
3
+ title: ReactNode;
4
+ right?: ReactNode;
5
+ }>;
6
+ export declare const MenuGroup: FC<MenuGroupProps>;
@@ -0,0 +1,5 @@
1
+ import { FC, PropsWithChildren, ReactNode } from 'preact/compat';
2
+ export type MenuItemProps = PropsWithChildren<{
3
+ label: ReactNode;
4
+ }>;
5
+ export declare const MenuItem: FC<MenuItemProps>;
@@ -0,0 +1,7 @@
1
+ import { FC, ReactNode } from 'preact/compat';
2
+ export type MenuLinkProps = {
3
+ label: ReactNode;
4
+ value?: ReactNode;
5
+ onClick: () => void;
6
+ };
7
+ export declare const MenuLink: FC<MenuLinkProps>;
@@ -0,0 +1,34 @@
1
+ import { FC, ReactNode } from 'preact/compat';
2
+ export type LanguageTag = "en" | "nl" | "fr" | "es" | "sv" | "zh-cn" | "ar" | "he" | "fa";
3
+ export type LanguageInfo = {
4
+ tag: LanguageTag;
5
+ name: string;
6
+ nativeName: string;
7
+ rtl?: boolean;
8
+ };
9
+ export declare const LANGUAGES: LanguageInfo[];
10
+ export declare const isRtlLanguage: (tag: LanguageTag) => boolean;
11
+ export declare const detectBrowserLanguage: () => LanguageTag;
12
+ export declare const getLanguageScore: (tag: string) => number;
13
+ export type Translate = (key: string, params?: Readonly<Record<string, string | number>>) => string | ReactNode;
14
+ export type Translations = Record<string, unknown>;
15
+ export declare const resolveTranslation: (parameters: {
16
+ primary: Translations | null;
17
+ fallback: Translations;
18
+ key: string;
19
+ params?: Readonly<Record<string, string | number>>;
20
+ }) => string;
21
+ export type TranslationContextValue = {
22
+ languageTag: LanguageTag;
23
+ setLanguageTag: (languageTag: LanguageTag) => void;
24
+ isLoadingLanguagePack: boolean;
25
+ isRtl: boolean;
26
+ t: Translate;
27
+ };
28
+ export declare const TranslationContext: import('preact').Context<TranslationContextValue | null>;
29
+ export type TranslationProviderProps = {
30
+ children: preact.ComponentChildren;
31
+ initialLanguageTag?: LanguageTag;
32
+ };
33
+ export declare const TranslationProvider: FC<TranslationProviderProps>;
34
+ export declare const useTranslation: () => TranslationContextValue;
@@ -0,0 +1 @@
1
+ export declare const log: (...x: Parameters<typeof console.log>) => void;
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={close:"关闭",yes:"是",no:"否",protocol:"协议"},n={connectedSuccessfully:"连接成功!",connecting:"连接中",ready:"就绪",handshakeClosed:"握手已关闭",handshakePartial:"握手部分完成",encrypted:"已加密",signalError:"信号错误",disconnected:"已断开连接"},t={title:"设置",language:"语言",theme:{title:"外观",mode:"主题",light:"浅色",dark:"深色",system:"跟随系统"},connectionPreferences:{title:"连接偏好设置",retainSessionHistory:"保留会话历史",autoReconnect:"自动重连"},signaling:{title:"信令",description:"信令是用于建立连接的握手协议。",server:"服务器",serverUrl:"服务器地址"},transport:{title:"传输",description:"这是维持连接的方式。",webrtc:"WebRTC",iceServers:{title:"ICE 服务器",stun:"STUN 服务器",turn:"TURN 服务器",addStun:"添加 STUN 服务器",addTurn:"添加 TURN 服务器",username:"用户名",credential:"密码"}}},o={title:"连接钱包"},c={title:"什么是 openlv?",scanQrCode:"扫描二维码",approveOnDevice:"在设备上确认",youreConnected:"您已连接!"},s={prompt:"点击下方按钮开始连接",generateQr:"生成二维码",connectionSettings:"连接设置"},i={preparingConnection:"正在准备连接",generatingKeys:"正在生成密钥...",connecting:"连接中",waitingForNetwork:"等待网络连接...",establishingConnection:"正在建立连接...",mayTakeFewSeconds:"这可能需要几秒钟...",connectedSuccessfully:"连接成功!",walletConnectedReady:"您的钱包已连接并可以使用。",disconnected:"已断开连接",connectionClosed:"连接已关闭。"},r={clickToCopyUrl:"点击复制连接链接",copyConnectionUrl:"复制连接链接",scanCodeInstruction:`使用您的移动钱包扫描上方的二维码。
2
+ 或复制链接并粘贴到您的钱包中。`},a={urlCopied:"连接链接已复制到剪贴板!",backToQr:"返回二维码",closeModal:"关闭弹窗"},l={common:e,status:n,settings:t,start:o,info:c,disconnected:s,connectionFlow:i,handshake:r,modal:a};exports.common=e;exports.connectionFlow=i;exports.default=l;exports.disconnected=s;exports.handshake=r;exports.info=c;exports.modal=a;exports.settings=t;exports.start=o;exports.status=n;
3
+ //# sourceMappingURL=zh-cn-Bqo3eRaE.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-cn-Bqo3eRaE.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,25 @@
1
+ const e = { close: "关闭", yes: "是", no: "否", protocol: "协议" }, n = { connectedSuccessfully: "连接成功!", connecting: "连接中", ready: "就绪", handshakeClosed: "握手已关闭", handshakePartial: "握手部分完成", encrypted: "已加密", signalError: "信号错误", disconnected: "已断开连接" }, t = { title: "设置", language: "语言", theme: { title: "外观", mode: "主题", light: "浅色", dark: "深色", system: "跟随系统" }, connectionPreferences: { title: "连接偏好设置", retainSessionHistory: "保留会话历史", autoReconnect: "自动重连" }, signaling: { title: "信令", description: "信令是用于建立连接的握手协议。", server: "服务器", serverUrl: "服务器地址" }, transport: { title: "传输", description: "这是维持连接的方式。", webrtc: "WebRTC", iceServers: { title: "ICE 服务器", stun: "STUN 服务器", turn: "TURN 服务器", addStun: "添加 STUN 服务器", addTurn: "添加 TURN 服务器", username: "用户名", credential: "密码" } } }, o = { title: "连接钱包" }, c = { title: "什么是 openlv?", scanQrCode: "扫描二维码", approveOnDevice: "在设备上确认", youreConnected: "您已连接!" }, s = { prompt: "点击下方按钮开始连接", generateQr: "生成二维码", connectionSettings: "连接设置" }, i = { preparingConnection: "正在准备连接", generatingKeys: "正在生成密钥...", connecting: "连接中", waitingForNetwork: "等待网络连接...", establishingConnection: "正在建立连接...", mayTakeFewSeconds: "这可能需要几秒钟...", connectedSuccessfully: "连接成功!", walletConnectedReady: "您的钱包已连接并可以使用。", disconnected: "已断开连接", connectionClosed: "连接已关闭。" }, r = { clickToCopyUrl: "点击复制连接链接", copyConnectionUrl: "复制连接链接", scanCodeInstruction: `使用您的移动钱包扫描上方的二维码。
2
+ 或复制链接并粘贴到您的钱包中。` }, a = { urlCopied: "连接链接已复制到剪贴板!", backToQr: "返回二维码", closeModal: "关闭弹窗" }, l = {
3
+ common: e,
4
+ status: n,
5
+ settings: t,
6
+ start: o,
7
+ info: c,
8
+ disconnected: s,
9
+ connectionFlow: i,
10
+ handshake: r,
11
+ modal: a
12
+ };
13
+ export {
14
+ e as common,
15
+ i as connectionFlow,
16
+ l as default,
17
+ s as disconnected,
18
+ r as handshake,
19
+ c as info,
20
+ a as modal,
21
+ t as settings,
22
+ o as start,
23
+ n as status
24
+ };
25
+ //# sourceMappingURL=zh-cn-DJpfZdjA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-cn-DJpfZdjA.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@openlv/modal",
3
+ "version": "0.0.1-beta.10",
4
+ "description": "Preact-based modal custom element for Open Lavatory",
5
+ "keywords": [
6
+ "open-lavatory",
7
+ "modal",
8
+ "preact",
9
+ "web-component"
10
+ ],
11
+ "homepage": "https://github.com/v3xlabs/open-lavatory",
12
+ "bugs": {
13
+ "url": "https://github.com/v3xlabs/open-lavatory/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/v3xlabs/open-lavatory.git",
18
+ "directory": "packages/modal"
19
+ },
20
+ "license": "LGPL-3.0-only",
21
+ "author": {
22
+ "name": "Open-Lavatory",
23
+ "url": "https://github.com/v3xlabs/open-lavatory"
24
+ },
25
+ "sideEffects": false,
26
+ "type": "module",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.es.js",
31
+ "require": "./dist/index.cjs.js",
32
+ "default": "./dist/index.es.js"
33
+ }
34
+ },
35
+ "main": "./dist/index.cjs.js",
36
+ "module": "./dist/index.es.js",
37
+ "types": "./dist/index.d.ts",
38
+ "files": [
39
+ "dist",
40
+ "README.md"
41
+ ],
42
+ "dependencies": {
43
+ "classnames": "^2.5.1",
44
+ "eventemitter3": "^5.0.1",
45
+ "ox": "^0.9.14",
46
+ "qrcode-generator": "^1.5.0",
47
+ "tailwind-variants": "^3.1.1",
48
+ "@openlv/core": "0.0.1-beta.8",
49
+ "@openlv/provider": "0.0.1-beta.10",
50
+ "@openlv/session": "0.0.1-beta.10",
51
+ "@openlv/signaling": "0.0.1-beta.7"
52
+ },
53
+ "devDependencies": {
54
+ "@preact/preset-vite": "^2.10.2",
55
+ "@tailwindcss/vite": "^4.1.17",
56
+ "preact": "^10.27.3",
57
+ "preact-custom-element": "^4.4.3",
58
+ "react-icons": "^5.5.0",
59
+ "tailwindcss": "^4",
60
+ "ts-pattern": "^5",
61
+ "typescript": "^5",
62
+ "vite": "^7",
63
+ "vite-plugin-dts": "^4.5.4"
64
+ },
65
+ "publishConfig": {
66
+ "access": "public",
67
+ "tag": "beta"
68
+ },
69
+ "scripts": {
70
+ "build": "vite build",
71
+ "dev": "vite build --watch",
72
+ "lint": "pnpx eslint .",
73
+ "lint:fix": "pnpx eslint . --fix",
74
+ "preview": "vite preview"
75
+ }
76
+ }