@mysten/dapp-kit-core 1.3.0 → 1.3.2

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 (34) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/docs/actions/connect-wallet.md +6 -5
  3. package/docs/actions/disconnect-wallet.md +12 -10
  4. package/docs/actions/sign-and-execute-transaction.md +16 -15
  5. package/docs/actions/sign-personal-message.md +10 -9
  6. package/docs/actions/sign-transaction.md +9 -8
  7. package/docs/actions/switch-account.md +8 -7
  8. package/docs/actions/switch-network.md +7 -6
  9. package/docs/dapp-kit-instance.md +22 -22
  10. package/docs/getting-started/create-dapp.md +13 -13
  11. package/docs/getting-started/next-js.md +14 -13
  12. package/docs/getting-started/react.md +29 -27
  13. package/docs/getting-started/vue.md +20 -15
  14. package/docs/index.md +10 -10
  15. package/docs/llms-index.md +30 -31
  16. package/docs/react/components/connect-button.md +4 -4
  17. package/docs/react/components/connect-modal.md +4 -4
  18. package/docs/react/components/index.md +3 -3
  19. package/docs/react/dapp-kit-provider.md +7 -7
  20. package/docs/react/hooks/index.md +5 -4
  21. package/docs/react/hooks/use-current-account.md +4 -4
  22. package/docs/react/hooks/use-current-client.md +7 -7
  23. package/docs/react/hooks/use-current-network.md +4 -4
  24. package/docs/react/hooks/use-current-wallet.md +4 -4
  25. package/docs/react/hooks/use-dapp-kit.md +6 -6
  26. package/docs/react/hooks/use-wallet-connection.md +4 -4
  27. package/docs/react/hooks/use-wallets.md +4 -4
  28. package/docs/state.md +18 -17
  29. package/docs/theming.md +32 -32
  30. package/docs/web-components/connect-button.md +13 -11
  31. package/docs/web-components/connect-modal.md +18 -17
  32. package/package.json +8 -9
  33. package/src/web/dapp-kit-connect-button.stories.ts +0 -107
  34. package/src/web/dapp-kit-connect-modal.stories.ts +0 -62
@@ -1,62 +0,0 @@
1
- // Copyright (c) Mysten Labs, Inc.
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import type { Meta, StoryObj } from '@storybook/web-components';
5
- import { html } from 'lit';
6
- import type { DAppKitConnectModal } from './dapp-kit-connect-modal.js';
7
- import { createDAppKit } from '../core/index.js';
8
- import { SuiGrpcClient } from '@mysten/sui/grpc';
9
-
10
- const GRPC_URLS = {
11
- testnet: 'https://fullnode.testnet.sui.io:443',
12
- };
13
-
14
- const dAppKit = createDAppKit({
15
- networks: ['testnet'],
16
- createClient(network) {
17
- return new SuiGrpcClient({ network, baseUrl: GRPC_URLS[network] });
18
- },
19
- });
20
-
21
- const meta = {
22
- title: 'Connect Modal',
23
- component: 'mysten-dapp-kit-connect-modal',
24
- render: (args) => html`
25
- <mysten-dapp-kit-connect-modal
26
- ?open="${args['open']}"
27
- .sortFn=${args['sortFn']}
28
- .filterFn=${args['filterFn']}
29
- .instance=${dAppKit}
30
- ></mysten-dapp-kit-connect-modal>
31
- `,
32
- tags: ['autodocs'],
33
- } satisfies Meta;
34
-
35
- export default meta;
36
-
37
- export const Default: StoryObj<DAppKitConnectModal> = {
38
- args: {
39
- open: true,
40
- },
41
- };
42
-
43
- export const WithRandomSort: StoryObj<DAppKitConnectModal> = {
44
- args: {
45
- open: true,
46
- sortFn: () => 0.5 - Math.random(),
47
- },
48
- };
49
-
50
- export const WithRandomFilter: StoryObj<DAppKitConnectModal> = {
51
- args: {
52
- open: true,
53
- filterFn: () => Math.random() > 0.5,
54
- },
55
- };
56
-
57
- export const NoDetectedWallets: StoryObj<DAppKitConnectModal> = {
58
- args: {
59
- open: true,
60
- filterFn: () => false,
61
- },
62
- };