@naculus/connect-appkit-vue 0.1.9 → 0.2.0
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.
- package/README.md +4 -4
- package/dist/index.cjs +121 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +135 -0
- package/dist/index.d.ts +135 -0
- package/dist/index.js +124 -1
- package/dist/index.js.map +1 -1
- package/package.json +24 -7
- package/src/index.ts +0 -30
- package/src/wc-generated/proxies.ts +0 -242
- package/tsup.config.ts +0 -11
package/README.md
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
| Framework | Package | Version |
|
|
8
8
|
|-----------|---------|---------|
|
|
9
|
-
| Web Components (base) | `@naculus/connect-appkit-wc` | `0.
|
|
10
|
-
| React | `@naculus/connect-appkit-react` | `0.
|
|
11
|
-
| **Vue** | `@naculus/connect-appkit-vue` | `0.
|
|
12
|
-
| UI (shared styles) | `@naculus/connect-appkit-ui` | `0.
|
|
9
|
+
| Web Components (base) | `@naculus/connect-appkit-wc` | `0.2.x` |
|
|
10
|
+
| React | `@naculus/connect-appkit-react` | `0.2.x` |
|
|
11
|
+
| **Vue** | `@naculus/connect-appkit-vue` | `0.2.x` |
|
|
12
|
+
| UI (shared styles) | `@naculus/connect-appkit-ui` | `0.2.x` |
|
|
13
13
|
|
|
14
14
|
## Install
|
|
15
15
|
|
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,11 @@ __export(index_exports, {
|
|
|
47
47
|
AppkitSwitch: () => AppkitSwitch,
|
|
48
48
|
AppkitTabs: () => AppkitTabs,
|
|
49
49
|
AppkitToggleGroup: () => AppkitToggleGroup,
|
|
50
|
-
AppkitTooltip: () => AppkitTooltip
|
|
50
|
+
AppkitTooltip: () => AppkitTooltip,
|
|
51
|
+
useAccounts: () => useAccounts,
|
|
52
|
+
useChain: () => useChain,
|
|
53
|
+
usePassphraseGate: () => usePassphraseGate,
|
|
54
|
+
useSolanaBalance: () => useSolanaBalance
|
|
51
55
|
});
|
|
52
56
|
module.exports = __toCommonJS(index_exports);
|
|
53
57
|
|
|
@@ -128,6 +132,9 @@ var AppkitConnectButton = /* @__PURE__ */ (0, import_runtime.defineContainer)("a
|
|
|
128
132
|
"isBalanceLoading",
|
|
129
133
|
"tokenBalancesJson",
|
|
130
134
|
"explorerUrl",
|
|
135
|
+
"explorerLabel",
|
|
136
|
+
"isMobile",
|
|
137
|
+
"mobileWalletName",
|
|
131
138
|
"walletsJson",
|
|
132
139
|
"qrUri",
|
|
133
140
|
"qrLoading",
|
|
@@ -136,6 +143,7 @@ var AppkitConnectButton = /* @__PURE__ */ (0, import_runtime.defineContainer)("a
|
|
|
136
143
|
"appkitDisconnect",
|
|
137
144
|
"appkitStartPairing",
|
|
138
145
|
"appkitRetry",
|
|
146
|
+
"appkitCancelPairing",
|
|
139
147
|
"appkitMobileDeepLink",
|
|
140
148
|
"appkitCopyAddress"
|
|
141
149
|
], [
|
|
@@ -143,6 +151,7 @@ var AppkitConnectButton = /* @__PURE__ */ (0, import_runtime.defineContainer)("a
|
|
|
143
151
|
"appkitDisconnect",
|
|
144
152
|
"appkitStartPairing",
|
|
145
153
|
"appkitRetry",
|
|
154
|
+
"appkitCancelPairing",
|
|
146
155
|
"appkitMobileDeepLink",
|
|
147
156
|
"appkitCopyAddress"
|
|
148
157
|
]);
|
|
@@ -228,6 +237,112 @@ var AppkitTooltip = /* @__PURE__ */ (0, import_runtime.defineContainer)("appkit-
|
|
|
228
237
|
"content",
|
|
229
238
|
"placement"
|
|
230
239
|
]);
|
|
240
|
+
|
|
241
|
+
// src/useAccounts.ts
|
|
242
|
+
var import_connect_core = require("@naculus/connect-core");
|
|
243
|
+
var import_vue = require("vue");
|
|
244
|
+
function useAccounts(accounts) {
|
|
245
|
+
const parsed = (0, import_vue.computed)(
|
|
246
|
+
() => ((0, import_vue.toValue)(accounts) ?? []).map((address) => {
|
|
247
|
+
const caip10 = (0, import_connect_core.parseCaip10)(address);
|
|
248
|
+
if (caip10) {
|
|
249
|
+
return {
|
|
250
|
+
address,
|
|
251
|
+
namespace: caip10.namespace,
|
|
252
|
+
isEVM: caip10.namespace === "eip155" && (0, import_connect_core.isEvmAddress)(caip10.address)
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
return { address, namespace: null, isEVM: (0, import_connect_core.isEvmAddress)(address) };
|
|
256
|
+
})
|
|
257
|
+
);
|
|
258
|
+
return {
|
|
259
|
+
accounts: parsed,
|
|
260
|
+
evmAccount: (0, import_vue.computed)(
|
|
261
|
+
() => parsed.value.find((a) => a.isEVM)?.address ?? null
|
|
262
|
+
),
|
|
263
|
+
solanaAccount: (0, import_vue.computed)(
|
|
264
|
+
() => parsed.value.find((a) => a.namespace === "solana")?.address ?? null
|
|
265
|
+
)
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// src/useChain.ts
|
|
270
|
+
var import_connect_appkit_core = require("@naculus/connect-appkit-core");
|
|
271
|
+
var import_vue2 = require("vue");
|
|
272
|
+
function useChain(chains, chainId) {
|
|
273
|
+
const list = (0, import_vue2.computed)(() => (0, import_vue2.toValue)(chains) ?? []);
|
|
274
|
+
const id = (0, import_vue2.computed)(() => (0, import_vue2.toValue)(chainId) ?? null);
|
|
275
|
+
const currentChain = (0, import_vue2.computed)(() => (0, import_connect_appkit_core.resolveChain)(list.value, id.value));
|
|
276
|
+
return {
|
|
277
|
+
currentChain,
|
|
278
|
+
chainInfo: (0, import_vue2.computed)(() => (0, import_connect_appkit_core.describeChain)(list.value, id.value)),
|
|
279
|
+
availableChains: (0, import_vue2.computed)(() => (0, import_connect_appkit_core.chainsForNamespace)(list.value, id.value)),
|
|
280
|
+
currentChainNumber: (0, import_vue2.computed)(
|
|
281
|
+
() => currentChain.value ? (0, import_connect_appkit_core.chainNumber)(currentChain.value) : null
|
|
282
|
+
),
|
|
283
|
+
namespace: (0, import_vue2.computed)(
|
|
284
|
+
() => currentChain.value ? (0, import_connect_appkit_core.chainNamespace)(currentChain.value) : null
|
|
285
|
+
)
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// src/usePassphraseGate.ts
|
|
290
|
+
var import_vue3 = require("vue");
|
|
291
|
+
function usePassphraseGate(gate) {
|
|
292
|
+
const request = (0, import_vue3.shallowRef)(gate.getSnapshot());
|
|
293
|
+
const unsubscribe = gate.subscribe(() => {
|
|
294
|
+
request.value = gate.getSnapshot();
|
|
295
|
+
});
|
|
296
|
+
(0, import_vue3.onScopeDispose)(unsubscribe);
|
|
297
|
+
return {
|
|
298
|
+
request: (0, import_vue3.readonly)(request),
|
|
299
|
+
submit: (passphrase) => gate.submit(passphrase),
|
|
300
|
+
cancel: (reason) => gate.cancel(reason),
|
|
301
|
+
forget: (reason) => gate.forget(reason)
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// src/useSolanaBalance.ts
|
|
306
|
+
var import_connect_core2 = require("@naculus/connect-core");
|
|
307
|
+
var import_vue4 = require("vue");
|
|
308
|
+
function useSolanaBalance(address, rpcUrl) {
|
|
309
|
+
const balance = (0, import_vue4.shallowRef)(null);
|
|
310
|
+
const isFetching = (0, import_vue4.ref)(false);
|
|
311
|
+
const error = (0, import_vue4.shallowRef)(null);
|
|
312
|
+
let generation = 0;
|
|
313
|
+
let disposed = false;
|
|
314
|
+
const refetch = async () => {
|
|
315
|
+
const addr = (0, import_vue4.toValue)(address);
|
|
316
|
+
const url = (0, import_vue4.toValue)(rpcUrl);
|
|
317
|
+
if (!addr || !url) {
|
|
318
|
+
balance.value = null;
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
const own = ++generation;
|
|
322
|
+
isFetching.value = true;
|
|
323
|
+
error.value = null;
|
|
324
|
+
try {
|
|
325
|
+
const next = await (0, import_connect_core2.getSolanaBalance)(url, addr);
|
|
326
|
+
if (disposed || own !== generation) return;
|
|
327
|
+
balance.value = next;
|
|
328
|
+
} catch (err) {
|
|
329
|
+
if (disposed || own !== generation) return;
|
|
330
|
+
balance.value = null;
|
|
331
|
+
error.value = err instanceof Error ? err : new Error("Balance read failed");
|
|
332
|
+
} finally {
|
|
333
|
+
if (!disposed && own === generation) isFetching.value = false;
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
(0, import_vue4.watchEffect)(() => {
|
|
337
|
+
(0, import_vue4.toValue)(address);
|
|
338
|
+
(0, import_vue4.toValue)(rpcUrl);
|
|
339
|
+
void refetch();
|
|
340
|
+
});
|
|
341
|
+
(0, import_vue4.onScopeDispose)(() => {
|
|
342
|
+
disposed = true;
|
|
343
|
+
});
|
|
344
|
+
return { balance, isFetching, error, refetch };
|
|
345
|
+
}
|
|
231
346
|
// Annotate the CommonJS export names for ESM import in node:
|
|
232
347
|
0 && (module.exports = {
|
|
233
348
|
AppkitAccordion,
|
|
@@ -257,6 +372,10 @@ var AppkitTooltip = /* @__PURE__ */ (0, import_runtime.defineContainer)("appkit-
|
|
|
257
372
|
AppkitSwitch,
|
|
258
373
|
AppkitTabs,
|
|
259
374
|
AppkitToggleGroup,
|
|
260
|
-
AppkitTooltip
|
|
375
|
+
AppkitTooltip,
|
|
376
|
+
useAccounts,
|
|
377
|
+
useChain,
|
|
378
|
+
usePassphraseGate,
|
|
379
|
+
useSolanaBalance
|
|
261
380
|
});
|
|
262
381
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/wc-generated/proxies.ts"],"sourcesContent":["export {\n AppkitAccordion,\n AppkitAccountButton,\n AppkitAlertDialog,\n AppkitAvatar,\n AppkitBadge,\n AppkitButton,\n AppkitCard,\n AppkitCardContent,\n AppkitCardDescription,\n AppkitCardFooter,\n AppkitCardHeader,\n AppkitCardTitle,\n AppkitCheckbox,\n AppkitCollapsible,\n AppkitConnectButton,\n AppkitDialog,\n AppkitDropdownMenu,\n AppkitInput,\n AppkitPopover,\n AppkitProgress,\n AppkitScrollArea,\n AppkitSelect,\n AppkitSeparator,\n AppkitSkeleton,\n AppkitSwitch,\n AppkitTabs,\n AppkitToggleGroup,\n AppkitTooltip,\n} from \"./wc-generated/proxies\"\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated vue proxies */\nimport { defineContainer, type StencilVueComponent } from '@stencil/vue-output-target/runtime';\n\nimport type { JSX } from '@naculus/connect-appkit-wc';\n\n\n\n\n\nexport const AppkitAccordion: StencilVueComponent<JSX.AppkitAccordion> = /*@__PURE__*/ defineContainer<JSX.AppkitAccordion>('appkit-accordion', undefined, [\n 'label',\n 'open',\n 'disabled',\n 'appkitToggle'\n], [\n 'appkitToggle'\n]);\n\n\nexport const AppkitAccountButton: StencilVueComponent<JSX.AppkitAccountButton> = /*@__PURE__*/ defineContainer<JSX.AppkitAccountButton>('appkit-account-button', undefined, [\n 'address',\n 'balance',\n 'balanceSymbol',\n 'showAddress',\n 'showBalance',\n 'disabled'\n]);\n\n\nexport const AppkitAlertDialog: StencilVueComponent<JSX.AppkitAlertDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitAlertDialog>('appkit-alert-dialog', undefined, [\n 'open',\n 'heading',\n 'description',\n 'appkitClose',\n 'appkitOpenChange'\n], [\n 'appkitClose',\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitAvatar: StencilVueComponent<JSX.AppkitAvatar> = /*@__PURE__*/ defineContainer<JSX.AppkitAvatar>('appkit-avatar', undefined, [\n 'size',\n 'src',\n 'alt',\n 'fallback'\n]);\n\n\nexport const AppkitBadge: StencilVueComponent<JSX.AppkitBadge> = /*@__PURE__*/ defineContainer<JSX.AppkitBadge>('appkit-badge', undefined, [\n 'variant'\n]);\n\n\nexport const AppkitButton: StencilVueComponent<JSX.AppkitButton> = /*@__PURE__*/ defineContainer<JSX.AppkitButton>('appkit-button', undefined, [\n 'variant',\n 'size',\n 'disabled',\n 'type',\n 'locale',\n 'ariaLabel',\n 'eventName'\n]);\n\n\nexport const AppkitCard: StencilVueComponent<JSX.AppkitCard> = /*@__PURE__*/ defineContainer<JSX.AppkitCard>('appkit-card', undefined);\n\n\nexport const AppkitCardContent: StencilVueComponent<JSX.AppkitCardContent> = /*@__PURE__*/ defineContainer<JSX.AppkitCardContent>('appkit-card-content', undefined);\n\n\nexport const AppkitCardDescription: StencilVueComponent<JSX.AppkitCardDescription> = /*@__PURE__*/ defineContainer<JSX.AppkitCardDescription>('appkit-card-description', undefined);\n\n\nexport const AppkitCardFooter: StencilVueComponent<JSX.AppkitCardFooter> = /*@__PURE__*/ defineContainer<JSX.AppkitCardFooter>('appkit-card-footer', undefined);\n\n\nexport const AppkitCardHeader: StencilVueComponent<JSX.AppkitCardHeader> = /*@__PURE__*/ defineContainer<JSX.AppkitCardHeader>('appkit-card-header', undefined);\n\n\nexport const AppkitCardTitle: StencilVueComponent<JSX.AppkitCardTitle> = /*@__PURE__*/ defineContainer<JSX.AppkitCardTitle>('appkit-card-title', undefined);\n\n\nexport const AppkitCheckbox: StencilVueComponent<JSX.AppkitCheckbox> = /*@__PURE__*/ defineContainer<JSX.AppkitCheckbox>('appkit-checkbox', undefined, [\n 'checked',\n 'disabled',\n 'label',\n 'name',\n 'value',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitCollapsible: StencilVueComponent<JSX.AppkitCollapsible> = /*@__PURE__*/ defineContainer<JSX.AppkitCollapsible>('appkit-collapsible', undefined, [\n 'open',\n 'appkitToggle'\n], [\n 'appkitToggle'\n]);\n\n\nexport const AppkitConnectButton: StencilVueComponent<JSX.AppkitConnectButton> = /*@__PURE__*/ defineContainer<JSX.AppkitConnectButton>('appkit-connect-button', undefined, [\n 'connected',\n 'connecting',\n 'address',\n 'balance',\n 'balanceSymbol',\n 'isBalanceLoading',\n 'tokenBalancesJson',\n 'explorerUrl',\n 'walletsJson',\n 'qrUri',\n 'qrLoading',\n 'qrError',\n 'appkitConnect',\n 'appkitDisconnect',\n 'appkitStartPairing',\n 'appkitRetry',\n 'appkitMobileDeepLink',\n 'appkitCopyAddress'\n], [\n 'appkitConnect',\n 'appkitDisconnect',\n 'appkitStartPairing',\n 'appkitRetry',\n 'appkitMobileDeepLink',\n 'appkitCopyAddress'\n]);\n\n\nexport const AppkitDialog: StencilVueComponent<JSX.AppkitDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitDialog>('appkit-dialog', undefined, [\n 'open',\n 'heading',\n 'appkitClose',\n 'appkitOpenChange'\n], [\n 'appkitClose',\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitDropdownMenu: StencilVueComponent<JSX.AppkitDropdownMenu> = /*@__PURE__*/ defineContainer<JSX.AppkitDropdownMenu>('appkit-dropdown-menu', undefined, [\n 'itemsJson',\n 'appkitSelect'\n], [\n 'appkitSelect'\n]);\n\n\nexport const AppkitInput: StencilVueComponent<JSX.AppkitInput> = /*@__PURE__*/ defineContainer<JSX.AppkitInput>('appkit-input', undefined, [\n 'type',\n 'placeholder',\n 'value',\n 'disabled',\n 'invalid',\n 'name',\n 'autocomplete',\n 'maxLength',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitPopover: StencilVueComponent<JSX.AppkitPopover> = /*@__PURE__*/ defineContainer<JSX.AppkitPopover>('appkit-popover', undefined, [\n 'open',\n 'placement',\n 'appkitOpenChange'\n], [\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitProgress: StencilVueComponent<JSX.AppkitProgress> = /*@__PURE__*/ defineContainer<JSX.AppkitProgress>('appkit-progress', undefined, [\n 'value',\n 'max',\n 'label'\n]);\n\n\nexport const AppkitScrollArea: StencilVueComponent<JSX.AppkitScrollArea> = /*@__PURE__*/ defineContainer<JSX.AppkitScrollArea>('appkit-scroll-area', undefined);\n\n\nexport const AppkitSelect: StencilVueComponent<JSX.AppkitSelect> = /*@__PURE__*/ defineContainer<JSX.AppkitSelect>('appkit-select', undefined, [\n 'optionsJson',\n 'value',\n 'placeholder',\n 'disabled',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitSeparator: StencilVueComponent<JSX.AppkitSeparator> = /*@__PURE__*/ defineContainer<JSX.AppkitSeparator>('appkit-separator', undefined, [\n 'orientation',\n 'decorative'\n]);\n\n\nexport const AppkitSkeleton: StencilVueComponent<JSX.AppkitSkeleton> = /*@__PURE__*/ defineContainer<JSX.AppkitSkeleton>('appkit-skeleton', undefined);\n\n\nexport const AppkitSwitch: StencilVueComponent<JSX.AppkitSwitch> = /*@__PURE__*/ defineContainer<JSX.AppkitSwitch>('appkit-switch', undefined, [\n 'checked',\n 'disabled',\n 'label',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitTabs: StencilVueComponent<JSX.AppkitTabs> = /*@__PURE__*/ defineContainer<JSX.AppkitTabs>('appkit-tabs', undefined, [\n 'tabsJson',\n 'selected',\n 'appkitTabChange'\n], [\n 'appkitTabChange'\n]);\n\n\nexport const AppkitToggleGroup: StencilVueComponent<JSX.AppkitToggleGroup> = /*@__PURE__*/ defineContainer<JSX.AppkitToggleGroup>('appkit-toggle-group', undefined, [\n 'itemsJson',\n 'selected',\n 'multiple',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitTooltip: StencilVueComponent<JSX.AppkitTooltip> = /*@__PURE__*/ defineContainer<JSX.AppkitTooltip>('appkit-tooltip', undefined, [\n 'content',\n 'placement'\n]);\n\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGA,qBAA0D;AAQnD,IAAM,kBAA0E,oDAAqC,oBAAoB,QAAW;AAAA,EACzJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AACF,CAAC;AA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I;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AACF,CAAC;AAGM,IAAM,oBAA8E,oDAAuC,uBAAuB,QAAW;AAAA,EAClK;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AACF,CAAC;AAGM,IAAM,gBAAsE,oDAAmC,kBAAkB,QAAW;AAAA,EACjJ;AAAA,EACA;AACF,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/wc-generated/proxies.ts","../src/useAccounts.ts","../src/useChain.ts","../src/usePassphraseGate.ts","../src/useSolanaBalance.ts"],"sourcesContent":["export {\n AppkitAccordion,\n AppkitAccountButton,\n AppkitAlertDialog,\n AppkitAvatar,\n AppkitBadge,\n AppkitButton,\n AppkitCard,\n AppkitCardContent,\n AppkitCardDescription,\n AppkitCardFooter,\n AppkitCardHeader,\n AppkitCardTitle,\n AppkitCheckbox,\n AppkitCollapsible,\n AppkitConnectButton,\n AppkitDialog,\n AppkitDropdownMenu,\n AppkitInput,\n AppkitPopover,\n AppkitProgress,\n AppkitScrollArea,\n AppkitSelect,\n AppkitSeparator,\n AppkitSkeleton,\n AppkitSwitch,\n AppkitTabs,\n AppkitToggleGroup,\n AppkitTooltip,\n} from \"./wc-generated/proxies\"\n\n// ── Composables ───────────────────────────────────────────────────\nexport { useAccounts } from \"./useAccounts\";\nexport { useChain } from \"./useChain\";\nexport type { UseChainReturn } from \"./useChain\";\nexport type { AccountEntry, UseAccountsReturn } from \"./useAccounts\";\nexport { usePassphraseGate } from \"./usePassphraseGate\";\nexport { useSolanaBalance } from \"./useSolanaBalance\";\nexport type { UseSolanaBalanceReturn as UseSolanaBalanceVueReturn } from \"./useSolanaBalance\";\nexport type { UsePassphraseGateReturn } from \"./usePassphraseGate\";\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated vue proxies */\nimport { defineContainer, type StencilVueComponent } from '@stencil/vue-output-target/runtime';\n\nimport type { JSX } from '@naculus/connect-appkit-wc';\n\n\n\n\n\nexport const AppkitAccordion: StencilVueComponent<JSX.AppkitAccordion> = /*@__PURE__*/ defineContainer<JSX.AppkitAccordion>('appkit-accordion', undefined, [\n 'label',\n 'open',\n 'disabled',\n 'appkitToggle'\n], [\n 'appkitToggle'\n]);\n\n\nexport const AppkitAccountButton: StencilVueComponent<JSX.AppkitAccountButton> = /*@__PURE__*/ defineContainer<JSX.AppkitAccountButton>('appkit-account-button', undefined, [\n 'address',\n 'balance',\n 'balanceSymbol',\n 'showAddress',\n 'showBalance',\n 'disabled'\n]);\n\n\nexport const AppkitAlertDialog: StencilVueComponent<JSX.AppkitAlertDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitAlertDialog>('appkit-alert-dialog', undefined, [\n 'open',\n 'heading',\n 'description',\n 'appkitClose',\n 'appkitOpenChange'\n], [\n 'appkitClose',\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitAvatar: StencilVueComponent<JSX.AppkitAvatar> = /*@__PURE__*/ defineContainer<JSX.AppkitAvatar>('appkit-avatar', undefined, [\n 'size',\n 'src',\n 'alt',\n 'fallback'\n]);\n\n\nexport const AppkitBadge: StencilVueComponent<JSX.AppkitBadge> = /*@__PURE__*/ defineContainer<JSX.AppkitBadge>('appkit-badge', undefined, [\n 'variant'\n]);\n\n\nexport const AppkitButton: StencilVueComponent<JSX.AppkitButton> = /*@__PURE__*/ defineContainer<JSX.AppkitButton>('appkit-button', undefined, [\n 'variant',\n 'size',\n 'disabled',\n 'type',\n 'locale',\n 'ariaLabel',\n 'eventName'\n]);\n\n\nexport const AppkitCard: StencilVueComponent<JSX.AppkitCard> = /*@__PURE__*/ defineContainer<JSX.AppkitCard>('appkit-card', undefined);\n\n\nexport const AppkitCardContent: StencilVueComponent<JSX.AppkitCardContent> = /*@__PURE__*/ defineContainer<JSX.AppkitCardContent>('appkit-card-content', undefined);\n\n\nexport const AppkitCardDescription: StencilVueComponent<JSX.AppkitCardDescription> = /*@__PURE__*/ defineContainer<JSX.AppkitCardDescription>('appkit-card-description', undefined);\n\n\nexport const AppkitCardFooter: StencilVueComponent<JSX.AppkitCardFooter> = /*@__PURE__*/ defineContainer<JSX.AppkitCardFooter>('appkit-card-footer', undefined);\n\n\nexport const AppkitCardHeader: StencilVueComponent<JSX.AppkitCardHeader> = /*@__PURE__*/ defineContainer<JSX.AppkitCardHeader>('appkit-card-header', undefined);\n\n\nexport const AppkitCardTitle: StencilVueComponent<JSX.AppkitCardTitle> = /*@__PURE__*/ defineContainer<JSX.AppkitCardTitle>('appkit-card-title', undefined);\n\n\nexport const AppkitCheckbox: StencilVueComponent<JSX.AppkitCheckbox> = /*@__PURE__*/ defineContainer<JSX.AppkitCheckbox>('appkit-checkbox', undefined, [\n 'checked',\n 'disabled',\n 'label',\n 'name',\n 'value',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitCollapsible: StencilVueComponent<JSX.AppkitCollapsible> = /*@__PURE__*/ defineContainer<JSX.AppkitCollapsible>('appkit-collapsible', undefined, [\n 'open',\n 'appkitToggle'\n], [\n 'appkitToggle'\n]);\n\n\nexport const AppkitConnectButton: StencilVueComponent<JSX.AppkitConnectButton> = /*@__PURE__*/ defineContainer<JSX.AppkitConnectButton>('appkit-connect-button', undefined, [\n 'connected',\n 'connecting',\n 'address',\n 'balance',\n 'balanceSymbol',\n 'isBalanceLoading',\n 'tokenBalancesJson',\n 'explorerUrl',\n 'explorerLabel',\n 'isMobile',\n 'mobileWalletName',\n 'walletsJson',\n 'qrUri',\n 'qrLoading',\n 'qrError',\n 'appkitConnect',\n 'appkitDisconnect',\n 'appkitStartPairing',\n 'appkitRetry',\n 'appkitCancelPairing',\n 'appkitMobileDeepLink',\n 'appkitCopyAddress'\n], [\n 'appkitConnect',\n 'appkitDisconnect',\n 'appkitStartPairing',\n 'appkitRetry',\n 'appkitCancelPairing',\n 'appkitMobileDeepLink',\n 'appkitCopyAddress'\n]);\n\n\nexport const AppkitDialog: StencilVueComponent<JSX.AppkitDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitDialog>('appkit-dialog', undefined, [\n 'open',\n 'heading',\n 'appkitClose',\n 'appkitOpenChange'\n], [\n 'appkitClose',\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitDropdownMenu: StencilVueComponent<JSX.AppkitDropdownMenu> = /*@__PURE__*/ defineContainer<JSX.AppkitDropdownMenu>('appkit-dropdown-menu', undefined, [\n 'itemsJson',\n 'appkitSelect'\n], [\n 'appkitSelect'\n]);\n\n\nexport const AppkitInput: StencilVueComponent<JSX.AppkitInput> = /*@__PURE__*/ defineContainer<JSX.AppkitInput>('appkit-input', undefined, [\n 'type',\n 'placeholder',\n 'value',\n 'disabled',\n 'invalid',\n 'name',\n 'autocomplete',\n 'maxLength',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitPopover: StencilVueComponent<JSX.AppkitPopover> = /*@__PURE__*/ defineContainer<JSX.AppkitPopover>('appkit-popover', undefined, [\n 'open',\n 'placement',\n 'appkitOpenChange'\n], [\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitProgress: StencilVueComponent<JSX.AppkitProgress> = /*@__PURE__*/ defineContainer<JSX.AppkitProgress>('appkit-progress', undefined, [\n 'value',\n 'max',\n 'label'\n]);\n\n\nexport const AppkitScrollArea: StencilVueComponent<JSX.AppkitScrollArea> = /*@__PURE__*/ defineContainer<JSX.AppkitScrollArea>('appkit-scroll-area', undefined);\n\n\nexport const AppkitSelect: StencilVueComponent<JSX.AppkitSelect> = /*@__PURE__*/ defineContainer<JSX.AppkitSelect>('appkit-select', undefined, [\n 'optionsJson',\n 'value',\n 'placeholder',\n 'disabled',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitSeparator: StencilVueComponent<JSX.AppkitSeparator> = /*@__PURE__*/ defineContainer<JSX.AppkitSeparator>('appkit-separator', undefined, [\n 'orientation',\n 'decorative'\n]);\n\n\nexport const AppkitSkeleton: StencilVueComponent<JSX.AppkitSkeleton> = /*@__PURE__*/ defineContainer<JSX.AppkitSkeleton>('appkit-skeleton', undefined);\n\n\nexport const AppkitSwitch: StencilVueComponent<JSX.AppkitSwitch> = /*@__PURE__*/ defineContainer<JSX.AppkitSwitch>('appkit-switch', undefined, [\n 'checked',\n 'disabled',\n 'label',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitTabs: StencilVueComponent<JSX.AppkitTabs> = /*@__PURE__*/ defineContainer<JSX.AppkitTabs>('appkit-tabs', undefined, [\n 'tabsJson',\n 'selected',\n 'appkitTabChange'\n], [\n 'appkitTabChange'\n]);\n\n\nexport const AppkitToggleGroup: StencilVueComponent<JSX.AppkitToggleGroup> = /*@__PURE__*/ defineContainer<JSX.AppkitToggleGroup>('appkit-toggle-group', undefined, [\n 'itemsJson',\n 'selected',\n 'multiple',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitTooltip: StencilVueComponent<JSX.AppkitTooltip> = /*@__PURE__*/ defineContainer<JSX.AppkitTooltip>('appkit-tooltip', undefined, [\n 'content',\n 'placement'\n]);\n\n\n","import { isEvmAddress, parseCaip10 } from \"@naculus/connect-core\";\nimport { computed, toValue } from \"vue\";\nimport type { ComputedRef, MaybeRefOrGetter } from \"vue\";\n\nexport interface AccountEntry {\n /** As the session reports it: CAIP-10 for most wallets, bare hex for some. */\n address: string;\n /** The namespace, when the entry was CAIP-10. Null for a bare address. */\n namespace: string | null;\n isEVM: boolean;\n}\n\nexport interface UseAccountsReturn {\n accounts: ComputedRef<AccountEntry[]>;\n evmAccount: ComputedRef<string | null>;\n solanaAccount: ComputedRef<string | null>;\n}\n\n/**\n * Split a session's account list by what each entry actually is.\n *\n * The same reading as the React `useAccount`, because it is the same reading:\n * `parseCaip10` and `isEvmAddress` come from `@naculus/connect-core` and hold\n * every rule about which strings mean what. What differs between the two\n * bindings is `computed` versus `useMemo`, and nothing else.\n */\nexport function useAccounts(\n accounts: MaybeRefOrGetter<string[] | null | undefined>,\n): UseAccountsReturn {\n const parsed = computed<AccountEntry[]>(() =>\n (toValue(accounts) ?? []).map((address) => {\n const caip10 = parseCaip10(address);\n if (caip10) {\n return {\n address,\n namespace: caip10.namespace,\n isEVM:\n caip10.namespace === \"eip155\" && isEvmAddress(caip10.address),\n };\n }\n // A bare 0x-40-hex value is unambiguously EVM. A bare base58 string is\n // not unambiguously anything, so nothing is claimed about it.\n return { address, namespace: null, isEVM: isEvmAddress(address) };\n }),\n );\n\n return {\n accounts: parsed,\n evmAccount: computed(\n () => parsed.value.find((a) => a.isEVM)?.address ?? null,\n ),\n solanaAccount: computed(\n () => parsed.value.find((a) => a.namespace === \"solana\")?.address ?? null,\n ),\n };\n}\n","import {\n chainNamespace,\n chainNumber,\n chainsForNamespace,\n describeChain,\n resolveChain,\n type ChainInfo,\n type WalletChain,\n} from \"@naculus/connect-appkit-core\";\nimport { computed, toValue } from \"vue\";\nimport type { ComputedRef, MaybeRefOrGetter } from \"vue\";\n\nexport interface UseChainReturn {\n /** The configured chain matching the connected CAIP-2 id, or null. */\n currentChain: ComputedRef<WalletChain | null>;\n /** A description of the connected chain, for any namespace. */\n chainInfo: ComputedRef<ChainInfo | null>;\n /** Only the chains the connected wallet could actually switch to. */\n availableChains: ComputedRef<WalletChain[]>;\n /** The EIP-155 number, or null when the connected chain has none. */\n currentChainNumber: ComputedRef<number | null>;\n namespace: ComputedRef<string | null>;\n}\n\n/**\n * The connected chain, and the chains it is possible to switch to.\n *\n * Identical in substance to the React `useChain`, because it is the same five\n * functions from `@naculus/connect-appkit-core`. This file contains no\n * decision at all — which is the point: `availableChains` filtering to the\n * connected namespace, `chainInfo` describing non-EVM chains, and\n * `currentChainNumber` refusing to invent a number for Solana are all\n * properties of the shared core, so both bindings get them or neither does.\n *\n * Takes its chain list and connected id as arguments; Vue has no equivalent of\n * the React provider here.\n */\nexport function useChain(\n chains: MaybeRefOrGetter<WalletChain[] | null | undefined>,\n chainId: MaybeRefOrGetter<string | null | undefined>,\n): UseChainReturn {\n const list = computed(() => toValue(chains) ?? []);\n const id = computed(() => toValue(chainId) ?? null);\n\n const currentChain = computed(() => resolveChain(list.value, id.value));\n\n return {\n currentChain,\n chainInfo: computed(() => describeChain(list.value, id.value)),\n availableChains: computed(() => chainsForNamespace(list.value, id.value)),\n currentChainNumber: computed(() =>\n currentChain.value ? chainNumber(currentChain.value) : null,\n ),\n namespace: computed(() =>\n currentChain.value ? chainNamespace(currentChain.value) : null,\n ),\n };\n}\n","import type { PassphraseGate, PassphraseRequest } from \"@naculus/connect-core\";\nimport { onScopeDispose, readonly, shallowRef } from \"vue\";\n\nexport interface UsePassphraseGateReturn {\n /** The open request, or null when nothing is being asked. */\n request: Readonly<ReturnType<typeof shallowRef<PassphraseRequest | null>>>;\n /** Answer the open request. */\n submit: (passphrase: string) => void;\n /** Abandon it, failing the load or save that asked. */\n cancel: (reason?: string) => void;\n /** Drop the held passphrase, so the next operation asks again. */\n forget: (reason?: string) => void;\n}\n\n/**\n * Bind a `PassphraseGate` into Vue reactivity.\n *\n * The gate itself lives in `@naculus/connect-core` rather than in either\n * framework package, because the thing it bridges — an encrypted storage\n * adapter asking for a passphrase from inside code that has never heard of a\n * component — is the same problem in React and in Vue. One implementation,\n * two thin bindings.\n *\n * ```ts\n * const gate = new PassphraseGate()\n * const wallet = new PocketWallet({ encryptionPassphrase: gate.request })\n * const { request, submit, cancel } = usePassphraseGate(gate)\n * ```\n *\n * `shallowRef`, not `ref`: the request is a small immutable snapshot the gate\n * replaces wholesale, and deep reactivity over it would proxy an object that\n * never mutates in place.\n */\nexport function usePassphraseGate(\n gate: PassphraseGate,\n): UsePassphraseGateReturn {\n const request = shallowRef<PassphraseRequest | null>(gate.getSnapshot());\n const unsubscribe = gate.subscribe(() => {\n request.value = gate.getSnapshot();\n });\n // Without this the gate keeps a reference to a listener belonging to a\n // component that is gone, and every later prompt writes into a dead ref.\n onScopeDispose(unsubscribe);\n\n return {\n request: readonly(request) as UsePassphraseGateReturn[\"request\"],\n submit: (passphrase: string) => gate.submit(passphrase),\n cancel: (reason?: string) => gate.cancel(reason),\n forget: (reason?: string) => gate.forget(reason),\n };\n}\n","import {\n getSolanaBalance,\n type SolanaBalance,\n} from \"@naculus/connect-core\";\nimport { onScopeDispose, ref, shallowRef, toValue, watchEffect } from \"vue\";\nimport type { MaybeRefOrGetter } from \"vue\";\n\nexport interface UseSolanaBalanceReturn {\n balance: ReturnType<typeof shallowRef<SolanaBalance | null>>;\n isFetching: ReturnType<typeof ref<boolean>>;\n error: ReturnType<typeof shallowRef<Error | null>>;\n refetch: () => Promise<void>;\n}\n\n/**\n * The SOL balance of an address.\n *\n * The whole of this file is Vue plumbing. Every decision that took thought —\n * exact lamport arithmetic, distinguishing an unfunded account from an emptied\n * one, refusing to invent a zero — is in `@naculus/connect-core`, shared with\n * the React hook. That is what makes \"author in React, ship to Vue\" true for\n * the logic: what does not translate is only the reactivity.\n *\n * Takes its address and endpoint as arguments because Vue has no equivalent of\n * the React provider here. Refs and getters both work.\n */\nexport function useSolanaBalance(\n address: MaybeRefOrGetter<string | null | undefined>,\n rpcUrl: MaybeRefOrGetter<string | null | undefined>,\n): UseSolanaBalanceReturn {\n const balance = shallowRef<SolanaBalance | null>(null);\n const isFetching = ref(false);\n const error = shallowRef<Error | null>(null);\n // Guards against a slow response for a previous address overwriting the\n // balance of the one now on screen.\n let generation = 0;\n let disposed = false;\n\n const refetch = async () => {\n const addr = toValue(address);\n const url = toValue(rpcUrl);\n if (!addr || !url) {\n balance.value = null;\n return;\n }\n const own = ++generation;\n isFetching.value = true;\n error.value = null;\n try {\n const next = await getSolanaBalance(url, addr);\n if (disposed || own !== generation) return;\n balance.value = next;\n } catch (err) {\n if (disposed || own !== generation) return;\n // Cleared rather than left stale: a balance shown next to an error\n // reads as the current balance, and it is not.\n balance.value = null;\n error.value =\n err instanceof Error ? err : new Error(\"Balance read failed\");\n } finally {\n if (!disposed && own === generation) isFetching.value = false;\n }\n };\n\n watchEffect(() => {\n // Touch both so the effect re-runs when either changes.\n toValue(address);\n toValue(rpcUrl);\n void refetch();\n });\n\n onScopeDispose(() => {\n disposed = true;\n });\n\n return { balance, isFetching, error, refetch };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGA,qBAA0D;AAQnD,IAAM,kBAA0E,oDAAqC,oBAAoB,QAAW;AAAA,EACzJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AACF,CAAC;AAGM,IAAM,sBAAkF,oDAAyC,yBAAyB,QAAW;AAAA,EAC1K;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,IAAM,oBAA8E,oDAAuC,uBAAuB,QAAW;AAAA,EAClK;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AAAA,EACA;AACF,CAAC;AAGM,IAAM,eAAoE,oDAAkC,iBAAiB,QAAW;AAAA,EAC7I;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,IAAM,cAAkE,oDAAiC,gBAAgB,QAAW;AAAA,EACzI;AACF,CAAC;AAGM,IAAM,eAAoE,oDAAkC,iBAAiB,QAAW;AAAA,EAC7I;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,IAAM,aAAgE,oDAAgC,eAAe,MAAS;AAG9H,IAAM,oBAA8E,oDAAuC,uBAAuB,MAAS;AAG3J,IAAM,wBAAsF,oDAA2C,2BAA2B,MAAS;AAG3K,IAAM,mBAA4E,oDAAsC,sBAAsB,MAAS;AAGvJ,IAAM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OAAO,MAAM;AAAA,EACjD;AACF;;;AClDA,IAAAC,uBAGO;AACP,IAAAC,cAAsE;AAsB/D,SAAS,iBACd,SACA,QACwB;AACxB,QAAM,cAAU,wBAAiC,IAAI;AACrD,QAAM,iBAAa,iBAAI,KAAK;AAC5B,QAAM,YAAQ,wBAAyB,IAAI;AAG3C,MAAI,aAAa;AACjB,MAAI,WAAW;AAEf,QAAM,UAAU,YAAY;AAC1B,UAAM,WAAO,qBAAQ,OAAO;AAC5B,UAAM,UAAM,qBAAQ,MAAM;AAC1B,QAAI,CAAC,QAAQ,CAAC,KAAK;AACjB,cAAQ,QAAQ;AAChB;AAAA,IACF;AACA,UAAM,MAAM,EAAE;AACd,eAAW,QAAQ;AACnB,UAAM,QAAQ;AACd,QAAI;AACF,YAAM,OAAO,UAAM,uCAAiB,KAAK,IAAI;AAC7C,UAAI,YAAY,QAAQ,WAAY;AACpC,cAAQ,QAAQ;AAAA,IAClB,SAAS,KAAK;AACZ,UAAI,YAAY,QAAQ,WAAY;AAGpC,cAAQ,QAAQ;AAChB,YAAM,QACJ,eAAe,QAAQ,MAAM,IAAI,MAAM,qBAAqB;AAAA,IAChE,UAAE;AACA,UAAI,CAAC,YAAY,QAAQ,WAAY,YAAW,QAAQ;AAAA,IAC1D;AAAA,EACF;AAEA,+BAAY,MAAM;AAEhB,6BAAQ,OAAO;AACf,6BAAQ,MAAM;AACd,SAAK,QAAQ;AAAA,EACf,CAAC;AAED,kCAAe,MAAM;AACnB,eAAW;AAAA,EACb,CAAC;AAED,SAAO,EAAE,SAAS,YAAY,OAAO,QAAQ;AAC/C;","names":["import_vue","import_vue","import_connect_core","import_vue"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { StencilVueComponent } from '@stencil/vue-output-target/runtime';
|
|
2
|
+
import { JSX } from '@naculus/connect-appkit-wc';
|
|
3
|
+
import { ComputedRef, MaybeRefOrGetter, shallowRef, ref } from 'vue';
|
|
4
|
+
import { WalletChain, ChainInfo } from '@naculus/connect-appkit-core';
|
|
5
|
+
import { PassphraseGate } from '@naculus/connect-core';
|
|
6
|
+
|
|
7
|
+
declare const AppkitAccordion: StencilVueComponent<JSX.AppkitAccordion>;
|
|
8
|
+
declare const AppkitAccountButton: StencilVueComponent<JSX.AppkitAccountButton>;
|
|
9
|
+
declare const AppkitAlertDialog: StencilVueComponent<JSX.AppkitAlertDialog>;
|
|
10
|
+
declare const AppkitAvatar: StencilVueComponent<JSX.AppkitAvatar>;
|
|
11
|
+
declare const AppkitBadge: StencilVueComponent<JSX.AppkitBadge>;
|
|
12
|
+
declare const AppkitButton: StencilVueComponent<JSX.AppkitButton>;
|
|
13
|
+
declare const AppkitCard: StencilVueComponent<JSX.AppkitCard>;
|
|
14
|
+
declare const AppkitCardContent: StencilVueComponent<JSX.AppkitCardContent>;
|
|
15
|
+
declare const AppkitCardDescription: StencilVueComponent<JSX.AppkitCardDescription>;
|
|
16
|
+
declare const AppkitCardFooter: StencilVueComponent<JSX.AppkitCardFooter>;
|
|
17
|
+
declare const AppkitCardHeader: StencilVueComponent<JSX.AppkitCardHeader>;
|
|
18
|
+
declare const AppkitCardTitle: StencilVueComponent<JSX.AppkitCardTitle>;
|
|
19
|
+
declare const AppkitCheckbox: StencilVueComponent<JSX.AppkitCheckbox>;
|
|
20
|
+
declare const AppkitCollapsible: StencilVueComponent<JSX.AppkitCollapsible>;
|
|
21
|
+
declare const AppkitConnectButton: StencilVueComponent<JSX.AppkitConnectButton>;
|
|
22
|
+
declare const AppkitDialog: StencilVueComponent<JSX.AppkitDialog>;
|
|
23
|
+
declare const AppkitDropdownMenu: StencilVueComponent<JSX.AppkitDropdownMenu>;
|
|
24
|
+
declare const AppkitInput: StencilVueComponent<JSX.AppkitInput>;
|
|
25
|
+
declare const AppkitPopover: StencilVueComponent<JSX.AppkitPopover>;
|
|
26
|
+
declare const AppkitProgress: StencilVueComponent<JSX.AppkitProgress>;
|
|
27
|
+
declare const AppkitScrollArea: StencilVueComponent<JSX.AppkitScrollArea>;
|
|
28
|
+
declare const AppkitSelect: StencilVueComponent<JSX.AppkitSelect>;
|
|
29
|
+
declare const AppkitSeparator: StencilVueComponent<JSX.AppkitSeparator>;
|
|
30
|
+
declare const AppkitSkeleton: StencilVueComponent<JSX.AppkitSkeleton>;
|
|
31
|
+
declare const AppkitSwitch: StencilVueComponent<JSX.AppkitSwitch>;
|
|
32
|
+
declare const AppkitTabs: StencilVueComponent<JSX.AppkitTabs>;
|
|
33
|
+
declare const AppkitToggleGroup: StencilVueComponent<JSX.AppkitToggleGroup>;
|
|
34
|
+
declare const AppkitTooltip: StencilVueComponent<JSX.AppkitTooltip>;
|
|
35
|
+
|
|
36
|
+
interface AccountEntry {
|
|
37
|
+
/** As the session reports it: CAIP-10 for most wallets, bare hex for some. */
|
|
38
|
+
address: string;
|
|
39
|
+
/** The namespace, when the entry was CAIP-10. Null for a bare address. */
|
|
40
|
+
namespace: string | null;
|
|
41
|
+
isEVM: boolean;
|
|
42
|
+
}
|
|
43
|
+
interface UseAccountsReturn {
|
|
44
|
+
accounts: ComputedRef<AccountEntry[]>;
|
|
45
|
+
evmAccount: ComputedRef<string | null>;
|
|
46
|
+
solanaAccount: ComputedRef<string | null>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Split a session's account list by what each entry actually is.
|
|
50
|
+
*
|
|
51
|
+
* The same reading as the React `useAccount`, because it is the same reading:
|
|
52
|
+
* `parseCaip10` and `isEvmAddress` come from `@naculus/connect-core` and hold
|
|
53
|
+
* every rule about which strings mean what. What differs between the two
|
|
54
|
+
* bindings is `computed` versus `useMemo`, and nothing else.
|
|
55
|
+
*/
|
|
56
|
+
declare function useAccounts(accounts: MaybeRefOrGetter<string[] | null | undefined>): UseAccountsReturn;
|
|
57
|
+
|
|
58
|
+
interface UseChainReturn {
|
|
59
|
+
/** The configured chain matching the connected CAIP-2 id, or null. */
|
|
60
|
+
currentChain: ComputedRef<WalletChain | null>;
|
|
61
|
+
/** A description of the connected chain, for any namespace. */
|
|
62
|
+
chainInfo: ComputedRef<ChainInfo | null>;
|
|
63
|
+
/** Only the chains the connected wallet could actually switch to. */
|
|
64
|
+
availableChains: ComputedRef<WalletChain[]>;
|
|
65
|
+
/** The EIP-155 number, or null when the connected chain has none. */
|
|
66
|
+
currentChainNumber: ComputedRef<number | null>;
|
|
67
|
+
namespace: ComputedRef<string | null>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The connected chain, and the chains it is possible to switch to.
|
|
71
|
+
*
|
|
72
|
+
* Identical in substance to the React `useChain`, because it is the same five
|
|
73
|
+
* functions from `@naculus/connect-appkit-core`. This file contains no
|
|
74
|
+
* decision at all — which is the point: `availableChains` filtering to the
|
|
75
|
+
* connected namespace, `chainInfo` describing non-EVM chains, and
|
|
76
|
+
* `currentChainNumber` refusing to invent a number for Solana are all
|
|
77
|
+
* properties of the shared core, so both bindings get them or neither does.
|
|
78
|
+
*
|
|
79
|
+
* Takes its chain list and connected id as arguments; Vue has no equivalent of
|
|
80
|
+
* the React provider here.
|
|
81
|
+
*/
|
|
82
|
+
declare function useChain(chains: MaybeRefOrGetter<WalletChain[] | null | undefined>, chainId: MaybeRefOrGetter<string | null | undefined>): UseChainReturn;
|
|
83
|
+
|
|
84
|
+
interface UsePassphraseGateReturn {
|
|
85
|
+
/** The open request, or null when nothing is being asked. */
|
|
86
|
+
request: Readonly<ReturnType<typeof shallowRef<PassphraseRequest | null>>>;
|
|
87
|
+
/** Answer the open request. */
|
|
88
|
+
submit: (passphrase: string) => void;
|
|
89
|
+
/** Abandon it, failing the load or save that asked. */
|
|
90
|
+
cancel: (reason?: string) => void;
|
|
91
|
+
/** Drop the held passphrase, so the next operation asks again. */
|
|
92
|
+
forget: (reason?: string) => void;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Bind a `PassphraseGate` into Vue reactivity.
|
|
96
|
+
*
|
|
97
|
+
* The gate itself lives in `@naculus/connect-core` rather than in either
|
|
98
|
+
* framework package, because the thing it bridges — an encrypted storage
|
|
99
|
+
* adapter asking for a passphrase from inside code that has never heard of a
|
|
100
|
+
* component — is the same problem in React and in Vue. One implementation,
|
|
101
|
+
* two thin bindings.
|
|
102
|
+
*
|
|
103
|
+
* ```ts
|
|
104
|
+
* const gate = new PassphraseGate()
|
|
105
|
+
* const wallet = new PocketWallet({ encryptionPassphrase: gate.request })
|
|
106
|
+
* const { request, submit, cancel } = usePassphraseGate(gate)
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* `shallowRef`, not `ref`: the request is a small immutable snapshot the gate
|
|
110
|
+
* replaces wholesale, and deep reactivity over it would proxy an object that
|
|
111
|
+
* never mutates in place.
|
|
112
|
+
*/
|
|
113
|
+
declare function usePassphraseGate(gate: PassphraseGate): UsePassphraseGateReturn;
|
|
114
|
+
|
|
115
|
+
interface UseSolanaBalanceReturn {
|
|
116
|
+
balance: ReturnType<typeof shallowRef<SolanaBalance | null>>;
|
|
117
|
+
isFetching: ReturnType<typeof ref<boolean>>;
|
|
118
|
+
error: ReturnType<typeof shallowRef<Error | null>>;
|
|
119
|
+
refetch: () => Promise<void>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The SOL balance of an address.
|
|
123
|
+
*
|
|
124
|
+
* The whole of this file is Vue plumbing. Every decision that took thought —
|
|
125
|
+
* exact lamport arithmetic, distinguishing an unfunded account from an emptied
|
|
126
|
+
* one, refusing to invent a zero — is in `@naculus/connect-core`, shared with
|
|
127
|
+
* the React hook. That is what makes "author in React, ship to Vue" true for
|
|
128
|
+
* the logic: what does not translate is only the reactivity.
|
|
129
|
+
*
|
|
130
|
+
* Takes its address and endpoint as arguments because Vue has no equivalent of
|
|
131
|
+
* the React provider here. Refs and getters both work.
|
|
132
|
+
*/
|
|
133
|
+
declare function useSolanaBalance(address: MaybeRefOrGetter<string | null | undefined>, rpcUrl: MaybeRefOrGetter<string | null | undefined>): UseSolanaBalanceReturn;
|
|
134
|
+
|
|
135
|
+
export { type AccountEntry, AppkitAccordion, AppkitAccountButton, AppkitAlertDialog, AppkitAvatar, AppkitBadge, AppkitButton, AppkitCard, AppkitCardContent, AppkitCardDescription, AppkitCardFooter, AppkitCardHeader, AppkitCardTitle, AppkitCheckbox, AppkitCollapsible, AppkitConnectButton, AppkitDialog, AppkitDropdownMenu, AppkitInput, AppkitPopover, AppkitProgress, AppkitScrollArea, AppkitSelect, AppkitSeparator, AppkitSkeleton, AppkitSwitch, AppkitTabs, AppkitToggleGroup, AppkitTooltip, type UseAccountsReturn, type UseChainReturn, type UsePassphraseGateReturn, type UseSolanaBalanceReturn as UseSolanaBalanceVueReturn, useAccounts, useChain, usePassphraseGate, useSolanaBalance };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { StencilVueComponent } from '@stencil/vue-output-target/runtime';
|
|
2
|
+
import { JSX } from '@naculus/connect-appkit-wc';
|
|
3
|
+
import { ComputedRef, MaybeRefOrGetter, shallowRef, ref } from 'vue';
|
|
4
|
+
import { WalletChain, ChainInfo } from '@naculus/connect-appkit-core';
|
|
5
|
+
import { PassphraseGate } from '@naculus/connect-core';
|
|
6
|
+
|
|
7
|
+
declare const AppkitAccordion: StencilVueComponent<JSX.AppkitAccordion>;
|
|
8
|
+
declare const AppkitAccountButton: StencilVueComponent<JSX.AppkitAccountButton>;
|
|
9
|
+
declare const AppkitAlertDialog: StencilVueComponent<JSX.AppkitAlertDialog>;
|
|
10
|
+
declare const AppkitAvatar: StencilVueComponent<JSX.AppkitAvatar>;
|
|
11
|
+
declare const AppkitBadge: StencilVueComponent<JSX.AppkitBadge>;
|
|
12
|
+
declare const AppkitButton: StencilVueComponent<JSX.AppkitButton>;
|
|
13
|
+
declare const AppkitCard: StencilVueComponent<JSX.AppkitCard>;
|
|
14
|
+
declare const AppkitCardContent: StencilVueComponent<JSX.AppkitCardContent>;
|
|
15
|
+
declare const AppkitCardDescription: StencilVueComponent<JSX.AppkitCardDescription>;
|
|
16
|
+
declare const AppkitCardFooter: StencilVueComponent<JSX.AppkitCardFooter>;
|
|
17
|
+
declare const AppkitCardHeader: StencilVueComponent<JSX.AppkitCardHeader>;
|
|
18
|
+
declare const AppkitCardTitle: StencilVueComponent<JSX.AppkitCardTitle>;
|
|
19
|
+
declare const AppkitCheckbox: StencilVueComponent<JSX.AppkitCheckbox>;
|
|
20
|
+
declare const AppkitCollapsible: StencilVueComponent<JSX.AppkitCollapsible>;
|
|
21
|
+
declare const AppkitConnectButton: StencilVueComponent<JSX.AppkitConnectButton>;
|
|
22
|
+
declare const AppkitDialog: StencilVueComponent<JSX.AppkitDialog>;
|
|
23
|
+
declare const AppkitDropdownMenu: StencilVueComponent<JSX.AppkitDropdownMenu>;
|
|
24
|
+
declare const AppkitInput: StencilVueComponent<JSX.AppkitInput>;
|
|
25
|
+
declare const AppkitPopover: StencilVueComponent<JSX.AppkitPopover>;
|
|
26
|
+
declare const AppkitProgress: StencilVueComponent<JSX.AppkitProgress>;
|
|
27
|
+
declare const AppkitScrollArea: StencilVueComponent<JSX.AppkitScrollArea>;
|
|
28
|
+
declare const AppkitSelect: StencilVueComponent<JSX.AppkitSelect>;
|
|
29
|
+
declare const AppkitSeparator: StencilVueComponent<JSX.AppkitSeparator>;
|
|
30
|
+
declare const AppkitSkeleton: StencilVueComponent<JSX.AppkitSkeleton>;
|
|
31
|
+
declare const AppkitSwitch: StencilVueComponent<JSX.AppkitSwitch>;
|
|
32
|
+
declare const AppkitTabs: StencilVueComponent<JSX.AppkitTabs>;
|
|
33
|
+
declare const AppkitToggleGroup: StencilVueComponent<JSX.AppkitToggleGroup>;
|
|
34
|
+
declare const AppkitTooltip: StencilVueComponent<JSX.AppkitTooltip>;
|
|
35
|
+
|
|
36
|
+
interface AccountEntry {
|
|
37
|
+
/** As the session reports it: CAIP-10 for most wallets, bare hex for some. */
|
|
38
|
+
address: string;
|
|
39
|
+
/** The namespace, when the entry was CAIP-10. Null for a bare address. */
|
|
40
|
+
namespace: string | null;
|
|
41
|
+
isEVM: boolean;
|
|
42
|
+
}
|
|
43
|
+
interface UseAccountsReturn {
|
|
44
|
+
accounts: ComputedRef<AccountEntry[]>;
|
|
45
|
+
evmAccount: ComputedRef<string | null>;
|
|
46
|
+
solanaAccount: ComputedRef<string | null>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Split a session's account list by what each entry actually is.
|
|
50
|
+
*
|
|
51
|
+
* The same reading as the React `useAccount`, because it is the same reading:
|
|
52
|
+
* `parseCaip10` and `isEvmAddress` come from `@naculus/connect-core` and hold
|
|
53
|
+
* every rule about which strings mean what. What differs between the two
|
|
54
|
+
* bindings is `computed` versus `useMemo`, and nothing else.
|
|
55
|
+
*/
|
|
56
|
+
declare function useAccounts(accounts: MaybeRefOrGetter<string[] | null | undefined>): UseAccountsReturn;
|
|
57
|
+
|
|
58
|
+
interface UseChainReturn {
|
|
59
|
+
/** The configured chain matching the connected CAIP-2 id, or null. */
|
|
60
|
+
currentChain: ComputedRef<WalletChain | null>;
|
|
61
|
+
/** A description of the connected chain, for any namespace. */
|
|
62
|
+
chainInfo: ComputedRef<ChainInfo | null>;
|
|
63
|
+
/** Only the chains the connected wallet could actually switch to. */
|
|
64
|
+
availableChains: ComputedRef<WalletChain[]>;
|
|
65
|
+
/** The EIP-155 number, or null when the connected chain has none. */
|
|
66
|
+
currentChainNumber: ComputedRef<number | null>;
|
|
67
|
+
namespace: ComputedRef<string | null>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The connected chain, and the chains it is possible to switch to.
|
|
71
|
+
*
|
|
72
|
+
* Identical in substance to the React `useChain`, because it is the same five
|
|
73
|
+
* functions from `@naculus/connect-appkit-core`. This file contains no
|
|
74
|
+
* decision at all — which is the point: `availableChains` filtering to the
|
|
75
|
+
* connected namespace, `chainInfo` describing non-EVM chains, and
|
|
76
|
+
* `currentChainNumber` refusing to invent a number for Solana are all
|
|
77
|
+
* properties of the shared core, so both bindings get them or neither does.
|
|
78
|
+
*
|
|
79
|
+
* Takes its chain list and connected id as arguments; Vue has no equivalent of
|
|
80
|
+
* the React provider here.
|
|
81
|
+
*/
|
|
82
|
+
declare function useChain(chains: MaybeRefOrGetter<WalletChain[] | null | undefined>, chainId: MaybeRefOrGetter<string | null | undefined>): UseChainReturn;
|
|
83
|
+
|
|
84
|
+
interface UsePassphraseGateReturn {
|
|
85
|
+
/** The open request, or null when nothing is being asked. */
|
|
86
|
+
request: Readonly<ReturnType<typeof shallowRef<PassphraseRequest | null>>>;
|
|
87
|
+
/** Answer the open request. */
|
|
88
|
+
submit: (passphrase: string) => void;
|
|
89
|
+
/** Abandon it, failing the load or save that asked. */
|
|
90
|
+
cancel: (reason?: string) => void;
|
|
91
|
+
/** Drop the held passphrase, so the next operation asks again. */
|
|
92
|
+
forget: (reason?: string) => void;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Bind a `PassphraseGate` into Vue reactivity.
|
|
96
|
+
*
|
|
97
|
+
* The gate itself lives in `@naculus/connect-core` rather than in either
|
|
98
|
+
* framework package, because the thing it bridges — an encrypted storage
|
|
99
|
+
* adapter asking for a passphrase from inside code that has never heard of a
|
|
100
|
+
* component — is the same problem in React and in Vue. One implementation,
|
|
101
|
+
* two thin bindings.
|
|
102
|
+
*
|
|
103
|
+
* ```ts
|
|
104
|
+
* const gate = new PassphraseGate()
|
|
105
|
+
* const wallet = new PocketWallet({ encryptionPassphrase: gate.request })
|
|
106
|
+
* const { request, submit, cancel } = usePassphraseGate(gate)
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* `shallowRef`, not `ref`: the request is a small immutable snapshot the gate
|
|
110
|
+
* replaces wholesale, and deep reactivity over it would proxy an object that
|
|
111
|
+
* never mutates in place.
|
|
112
|
+
*/
|
|
113
|
+
declare function usePassphraseGate(gate: PassphraseGate): UsePassphraseGateReturn;
|
|
114
|
+
|
|
115
|
+
interface UseSolanaBalanceReturn {
|
|
116
|
+
balance: ReturnType<typeof shallowRef<SolanaBalance | null>>;
|
|
117
|
+
isFetching: ReturnType<typeof ref<boolean>>;
|
|
118
|
+
error: ReturnType<typeof shallowRef<Error | null>>;
|
|
119
|
+
refetch: () => Promise<void>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The SOL balance of an address.
|
|
123
|
+
*
|
|
124
|
+
* The whole of this file is Vue plumbing. Every decision that took thought —
|
|
125
|
+
* exact lamport arithmetic, distinguishing an unfunded account from an emptied
|
|
126
|
+
* one, refusing to invent a zero — is in `@naculus/connect-core`, shared with
|
|
127
|
+
* the React hook. That is what makes "author in React, ship to Vue" true for
|
|
128
|
+
* the logic: what does not translate is only the reactivity.
|
|
129
|
+
*
|
|
130
|
+
* Takes its address and endpoint as arguments because Vue has no equivalent of
|
|
131
|
+
* the React provider here. Refs and getters both work.
|
|
132
|
+
*/
|
|
133
|
+
declare function useSolanaBalance(address: MaybeRefOrGetter<string | null | undefined>, rpcUrl: MaybeRefOrGetter<string | null | undefined>): UseSolanaBalanceReturn;
|
|
134
|
+
|
|
135
|
+
export { type AccountEntry, AppkitAccordion, AppkitAccountButton, AppkitAlertDialog, AppkitAvatar, AppkitBadge, AppkitButton, AppkitCard, AppkitCardContent, AppkitCardDescription, AppkitCardFooter, AppkitCardHeader, AppkitCardTitle, AppkitCheckbox, AppkitCollapsible, AppkitConnectButton, AppkitDialog, AppkitDropdownMenu, AppkitInput, AppkitPopover, AppkitProgress, AppkitScrollArea, AppkitSelect, AppkitSeparator, AppkitSkeleton, AppkitSwitch, AppkitTabs, AppkitToggleGroup, AppkitTooltip, type UseAccountsReturn, type UseChainReturn, type UsePassphraseGateReturn, type UseSolanaBalanceReturn as UseSolanaBalanceVueReturn, useAccounts, useChain, usePassphraseGate, useSolanaBalance };
|
package/dist/index.js
CHANGED
|
@@ -75,6 +75,9 @@ var AppkitConnectButton = /* @__PURE__ */ defineContainer("appkit-connect-button
|
|
|
75
75
|
"isBalanceLoading",
|
|
76
76
|
"tokenBalancesJson",
|
|
77
77
|
"explorerUrl",
|
|
78
|
+
"explorerLabel",
|
|
79
|
+
"isMobile",
|
|
80
|
+
"mobileWalletName",
|
|
78
81
|
"walletsJson",
|
|
79
82
|
"qrUri",
|
|
80
83
|
"qrLoading",
|
|
@@ -83,6 +86,7 @@ var AppkitConnectButton = /* @__PURE__ */ defineContainer("appkit-connect-button
|
|
|
83
86
|
"appkitDisconnect",
|
|
84
87
|
"appkitStartPairing",
|
|
85
88
|
"appkitRetry",
|
|
89
|
+
"appkitCancelPairing",
|
|
86
90
|
"appkitMobileDeepLink",
|
|
87
91
|
"appkitCopyAddress"
|
|
88
92
|
], [
|
|
@@ -90,6 +94,7 @@ var AppkitConnectButton = /* @__PURE__ */ defineContainer("appkit-connect-button
|
|
|
90
94
|
"appkitDisconnect",
|
|
91
95
|
"appkitStartPairing",
|
|
92
96
|
"appkitRetry",
|
|
97
|
+
"appkitCancelPairing",
|
|
93
98
|
"appkitMobileDeepLink",
|
|
94
99
|
"appkitCopyAddress"
|
|
95
100
|
]);
|
|
@@ -175,6 +180,120 @@ var AppkitTooltip = /* @__PURE__ */ defineContainer("appkit-tooltip", void 0, [
|
|
|
175
180
|
"content",
|
|
176
181
|
"placement"
|
|
177
182
|
]);
|
|
183
|
+
|
|
184
|
+
// src/useAccounts.ts
|
|
185
|
+
import { isEvmAddress, parseCaip10 } from "@naculus/connect-core";
|
|
186
|
+
import { computed, toValue } from "vue";
|
|
187
|
+
function useAccounts(accounts) {
|
|
188
|
+
const parsed = computed(
|
|
189
|
+
() => (toValue(accounts) ?? []).map((address) => {
|
|
190
|
+
const caip10 = parseCaip10(address);
|
|
191
|
+
if (caip10) {
|
|
192
|
+
return {
|
|
193
|
+
address,
|
|
194
|
+
namespace: caip10.namespace,
|
|
195
|
+
isEVM: caip10.namespace === "eip155" && isEvmAddress(caip10.address)
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return { address, namespace: null, isEVM: isEvmAddress(address) };
|
|
199
|
+
})
|
|
200
|
+
);
|
|
201
|
+
return {
|
|
202
|
+
accounts: parsed,
|
|
203
|
+
evmAccount: computed(
|
|
204
|
+
() => parsed.value.find((a) => a.isEVM)?.address ?? null
|
|
205
|
+
),
|
|
206
|
+
solanaAccount: computed(
|
|
207
|
+
() => parsed.value.find((a) => a.namespace === "solana")?.address ?? null
|
|
208
|
+
)
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// src/useChain.ts
|
|
213
|
+
import {
|
|
214
|
+
chainNamespace,
|
|
215
|
+
chainNumber,
|
|
216
|
+
chainsForNamespace,
|
|
217
|
+
describeChain,
|
|
218
|
+
resolveChain
|
|
219
|
+
} from "@naculus/connect-appkit-core";
|
|
220
|
+
import { computed as computed2, toValue as toValue2 } from "vue";
|
|
221
|
+
function useChain(chains, chainId) {
|
|
222
|
+
const list = computed2(() => toValue2(chains) ?? []);
|
|
223
|
+
const id = computed2(() => toValue2(chainId) ?? null);
|
|
224
|
+
const currentChain = computed2(() => resolveChain(list.value, id.value));
|
|
225
|
+
return {
|
|
226
|
+
currentChain,
|
|
227
|
+
chainInfo: computed2(() => describeChain(list.value, id.value)),
|
|
228
|
+
availableChains: computed2(() => chainsForNamespace(list.value, id.value)),
|
|
229
|
+
currentChainNumber: computed2(
|
|
230
|
+
() => currentChain.value ? chainNumber(currentChain.value) : null
|
|
231
|
+
),
|
|
232
|
+
namespace: computed2(
|
|
233
|
+
() => currentChain.value ? chainNamespace(currentChain.value) : null
|
|
234
|
+
)
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/usePassphraseGate.ts
|
|
239
|
+
import { onScopeDispose, readonly, shallowRef } from "vue";
|
|
240
|
+
function usePassphraseGate(gate) {
|
|
241
|
+
const request = shallowRef(gate.getSnapshot());
|
|
242
|
+
const unsubscribe = gate.subscribe(() => {
|
|
243
|
+
request.value = gate.getSnapshot();
|
|
244
|
+
});
|
|
245
|
+
onScopeDispose(unsubscribe);
|
|
246
|
+
return {
|
|
247
|
+
request: readonly(request),
|
|
248
|
+
submit: (passphrase) => gate.submit(passphrase),
|
|
249
|
+
cancel: (reason) => gate.cancel(reason),
|
|
250
|
+
forget: (reason) => gate.forget(reason)
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// src/useSolanaBalance.ts
|
|
255
|
+
import {
|
|
256
|
+
getSolanaBalance
|
|
257
|
+
} from "@naculus/connect-core";
|
|
258
|
+
import { onScopeDispose as onScopeDispose2, ref, shallowRef as shallowRef2, toValue as toValue3, watchEffect } from "vue";
|
|
259
|
+
function useSolanaBalance(address, rpcUrl) {
|
|
260
|
+
const balance = shallowRef2(null);
|
|
261
|
+
const isFetching = ref(false);
|
|
262
|
+
const error = shallowRef2(null);
|
|
263
|
+
let generation = 0;
|
|
264
|
+
let disposed = false;
|
|
265
|
+
const refetch = async () => {
|
|
266
|
+
const addr = toValue3(address);
|
|
267
|
+
const url = toValue3(rpcUrl);
|
|
268
|
+
if (!addr || !url) {
|
|
269
|
+
balance.value = null;
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
const own = ++generation;
|
|
273
|
+
isFetching.value = true;
|
|
274
|
+
error.value = null;
|
|
275
|
+
try {
|
|
276
|
+
const next = await getSolanaBalance(url, addr);
|
|
277
|
+
if (disposed || own !== generation) return;
|
|
278
|
+
balance.value = next;
|
|
279
|
+
} catch (err) {
|
|
280
|
+
if (disposed || own !== generation) return;
|
|
281
|
+
balance.value = null;
|
|
282
|
+
error.value = err instanceof Error ? err : new Error("Balance read failed");
|
|
283
|
+
} finally {
|
|
284
|
+
if (!disposed && own === generation) isFetching.value = false;
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
watchEffect(() => {
|
|
288
|
+
toValue3(address);
|
|
289
|
+
toValue3(rpcUrl);
|
|
290
|
+
void refetch();
|
|
291
|
+
});
|
|
292
|
+
onScopeDispose2(() => {
|
|
293
|
+
disposed = true;
|
|
294
|
+
});
|
|
295
|
+
return { balance, isFetching, error, refetch };
|
|
296
|
+
}
|
|
178
297
|
export {
|
|
179
298
|
AppkitAccordion,
|
|
180
299
|
AppkitAccountButton,
|
|
@@ -203,6 +322,10 @@ export {
|
|
|
203
322
|
AppkitSwitch,
|
|
204
323
|
AppkitTabs,
|
|
205
324
|
AppkitToggleGroup,
|
|
206
|
-
AppkitTooltip
|
|
325
|
+
AppkitTooltip,
|
|
326
|
+
useAccounts,
|
|
327
|
+
useChain,
|
|
328
|
+
usePassphraseGate,
|
|
329
|
+
useSolanaBalance
|
|
207
330
|
};
|
|
208
331
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/wc-generated/proxies.ts"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\n/* auto-generated vue proxies */\nimport { defineContainer, type StencilVueComponent } from '@stencil/vue-output-target/runtime';\n\nimport type { JSX } from '@naculus/connect-appkit-wc';\n\n\n\n\n\nexport const AppkitAccordion: StencilVueComponent<JSX.AppkitAccordion> = /*@__PURE__*/ defineContainer<JSX.AppkitAccordion>('appkit-accordion', undefined, [\n 'label',\n 'open',\n 'disabled',\n 'appkitToggle'\n], [\n 'appkitToggle'\n]);\n\n\nexport const AppkitAccountButton: StencilVueComponent<JSX.AppkitAccountButton> = /*@__PURE__*/ defineContainer<JSX.AppkitAccountButton>('appkit-account-button', undefined, [\n 'address',\n 'balance',\n 'balanceSymbol',\n 'showAddress',\n 'showBalance',\n 'disabled'\n]);\n\n\nexport const AppkitAlertDialog: StencilVueComponent<JSX.AppkitAlertDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitAlertDialog>('appkit-alert-dialog', undefined, [\n 'open',\n 'heading',\n 'description',\n 'appkitClose',\n 'appkitOpenChange'\n], [\n 'appkitClose',\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitAvatar: StencilVueComponent<JSX.AppkitAvatar> = /*@__PURE__*/ defineContainer<JSX.AppkitAvatar>('appkit-avatar', undefined, [\n 'size',\n 'src',\n 'alt',\n 'fallback'\n]);\n\n\nexport const AppkitBadge: StencilVueComponent<JSX.AppkitBadge> = /*@__PURE__*/ defineContainer<JSX.AppkitBadge>('appkit-badge', undefined, [\n 'variant'\n]);\n\n\nexport const AppkitButton: StencilVueComponent<JSX.AppkitButton> = /*@__PURE__*/ defineContainer<JSX.AppkitButton>('appkit-button', undefined, [\n 'variant',\n 'size',\n 'disabled',\n 'type',\n 'locale',\n 'ariaLabel',\n 'eventName'\n]);\n\n\nexport const AppkitCard: StencilVueComponent<JSX.AppkitCard> = /*@__PURE__*/ defineContainer<JSX.AppkitCard>('appkit-card', undefined);\n\n\nexport const AppkitCardContent: StencilVueComponent<JSX.AppkitCardContent> = /*@__PURE__*/ defineContainer<JSX.AppkitCardContent>('appkit-card-content', undefined);\n\n\nexport const AppkitCardDescription: StencilVueComponent<JSX.AppkitCardDescription> = /*@__PURE__*/ defineContainer<JSX.AppkitCardDescription>('appkit-card-description', undefined);\n\n\nexport const AppkitCardFooter: StencilVueComponent<JSX.AppkitCardFooter> = /*@__PURE__*/ defineContainer<JSX.AppkitCardFooter>('appkit-card-footer', undefined);\n\n\nexport const AppkitCardHeader: StencilVueComponent<JSX.AppkitCardHeader> = /*@__PURE__*/ defineContainer<JSX.AppkitCardHeader>('appkit-card-header', undefined);\n\n\nexport const AppkitCardTitle: StencilVueComponent<JSX.AppkitCardTitle> = /*@__PURE__*/ defineContainer<JSX.AppkitCardTitle>('appkit-card-title', undefined);\n\n\nexport const AppkitCheckbox: StencilVueComponent<JSX.AppkitCheckbox> = /*@__PURE__*/ defineContainer<JSX.AppkitCheckbox>('appkit-checkbox', undefined, [\n 'checked',\n 'disabled',\n 'label',\n 'name',\n 'value',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitCollapsible: StencilVueComponent<JSX.AppkitCollapsible> = /*@__PURE__*/ defineContainer<JSX.AppkitCollapsible>('appkit-collapsible', undefined, [\n 'open',\n 'appkitToggle'\n], [\n 'appkitToggle'\n]);\n\n\nexport const AppkitConnectButton: StencilVueComponent<JSX.AppkitConnectButton> = /*@__PURE__*/ defineContainer<JSX.AppkitConnectButton>('appkit-connect-button', undefined, [\n 'connected',\n 'connecting',\n 'address',\n 'balance',\n 'balanceSymbol',\n 'isBalanceLoading',\n 'tokenBalancesJson',\n 'explorerUrl',\n 'walletsJson',\n 'qrUri',\n 'qrLoading',\n 'qrError',\n 'appkitConnect',\n 'appkitDisconnect',\n 'appkitStartPairing',\n 'appkitRetry',\n 'appkitMobileDeepLink',\n 'appkitCopyAddress'\n], [\n 'appkitConnect',\n 'appkitDisconnect',\n 'appkitStartPairing',\n 'appkitRetry',\n 'appkitMobileDeepLink',\n 'appkitCopyAddress'\n]);\n\n\nexport const AppkitDialog: StencilVueComponent<JSX.AppkitDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitDialog>('appkit-dialog', undefined, [\n 'open',\n 'heading',\n 'appkitClose',\n 'appkitOpenChange'\n], [\n 'appkitClose',\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitDropdownMenu: StencilVueComponent<JSX.AppkitDropdownMenu> = /*@__PURE__*/ defineContainer<JSX.AppkitDropdownMenu>('appkit-dropdown-menu', undefined, [\n 'itemsJson',\n 'appkitSelect'\n], [\n 'appkitSelect'\n]);\n\n\nexport const AppkitInput: StencilVueComponent<JSX.AppkitInput> = /*@__PURE__*/ defineContainer<JSX.AppkitInput>('appkit-input', undefined, [\n 'type',\n 'placeholder',\n 'value',\n 'disabled',\n 'invalid',\n 'name',\n 'autocomplete',\n 'maxLength',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitPopover: StencilVueComponent<JSX.AppkitPopover> = /*@__PURE__*/ defineContainer<JSX.AppkitPopover>('appkit-popover', undefined, [\n 'open',\n 'placement',\n 'appkitOpenChange'\n], [\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitProgress: StencilVueComponent<JSX.AppkitProgress> = /*@__PURE__*/ defineContainer<JSX.AppkitProgress>('appkit-progress', undefined, [\n 'value',\n 'max',\n 'label'\n]);\n\n\nexport const AppkitScrollArea: StencilVueComponent<JSX.AppkitScrollArea> = /*@__PURE__*/ defineContainer<JSX.AppkitScrollArea>('appkit-scroll-area', undefined);\n\n\nexport const AppkitSelect: StencilVueComponent<JSX.AppkitSelect> = /*@__PURE__*/ defineContainer<JSX.AppkitSelect>('appkit-select', undefined, [\n 'optionsJson',\n 'value',\n 'placeholder',\n 'disabled',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitSeparator: StencilVueComponent<JSX.AppkitSeparator> = /*@__PURE__*/ defineContainer<JSX.AppkitSeparator>('appkit-separator', undefined, [\n 'orientation',\n 'decorative'\n]);\n\n\nexport const AppkitSkeleton: StencilVueComponent<JSX.AppkitSkeleton> = /*@__PURE__*/ defineContainer<JSX.AppkitSkeleton>('appkit-skeleton', undefined);\n\n\nexport const AppkitSwitch: StencilVueComponent<JSX.AppkitSwitch> = /*@__PURE__*/ defineContainer<JSX.AppkitSwitch>('appkit-switch', undefined, [\n 'checked',\n 'disabled',\n 'label',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitTabs: StencilVueComponent<JSX.AppkitTabs> = /*@__PURE__*/ defineContainer<JSX.AppkitTabs>('appkit-tabs', undefined, [\n 'tabsJson',\n 'selected',\n 'appkitTabChange'\n], [\n 'appkitTabChange'\n]);\n\n\nexport const AppkitToggleGroup: StencilVueComponent<JSX.AppkitToggleGroup> = /*@__PURE__*/ defineContainer<JSX.AppkitToggleGroup>('appkit-toggle-group', undefined, [\n 'itemsJson',\n 'selected',\n 'multiple',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitTooltip: StencilVueComponent<JSX.AppkitTooltip> = /*@__PURE__*/ defineContainer<JSX.AppkitTooltip>('appkit-tooltip', undefined, [\n 'content',\n 'placement'\n]);\n\n\n"],"mappings":";AAGA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BAAiB,QAAW;AAAA,EAC7I;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AACF,CAAC;AAGM,IAAM,aAAgE,gCAAgC,eAAe,QAAW;AAAA,EACrI;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AACF,CAAC;AAGM,IAAM,oBAA8E,gCAAuC,uBAAuB,QAAW;AAAA,EAClK;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AACF,CAAC;AAGM,IAAM,gBAAsE,gCAAmC,kBAAkB,QAAW;AAAA,EACjJ;AAAA,EACA;AACF,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/wc-generated/proxies.ts","../src/useAccounts.ts","../src/useChain.ts","../src/usePassphraseGate.ts","../src/useSolanaBalance.ts"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\n/* auto-generated vue proxies */\nimport { defineContainer, type StencilVueComponent } from '@stencil/vue-output-target/runtime';\n\nimport type { JSX } from '@naculus/connect-appkit-wc';\n\n\n\n\n\nexport const AppkitAccordion: StencilVueComponent<JSX.AppkitAccordion> = /*@__PURE__*/ defineContainer<JSX.AppkitAccordion>('appkit-accordion', undefined, [\n 'label',\n 'open',\n 'disabled',\n 'appkitToggle'\n], [\n 'appkitToggle'\n]);\n\n\nexport const AppkitAccountButton: StencilVueComponent<JSX.AppkitAccountButton> = /*@__PURE__*/ defineContainer<JSX.AppkitAccountButton>('appkit-account-button', undefined, [\n 'address',\n 'balance',\n 'balanceSymbol',\n 'showAddress',\n 'showBalance',\n 'disabled'\n]);\n\n\nexport const AppkitAlertDialog: StencilVueComponent<JSX.AppkitAlertDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitAlertDialog>('appkit-alert-dialog', undefined, [\n 'open',\n 'heading',\n 'description',\n 'appkitClose',\n 'appkitOpenChange'\n], [\n 'appkitClose',\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitAvatar: StencilVueComponent<JSX.AppkitAvatar> = /*@__PURE__*/ defineContainer<JSX.AppkitAvatar>('appkit-avatar', undefined, [\n 'size',\n 'src',\n 'alt',\n 'fallback'\n]);\n\n\nexport const AppkitBadge: StencilVueComponent<JSX.AppkitBadge> = /*@__PURE__*/ defineContainer<JSX.AppkitBadge>('appkit-badge', undefined, [\n 'variant'\n]);\n\n\nexport const AppkitButton: StencilVueComponent<JSX.AppkitButton> = /*@__PURE__*/ defineContainer<JSX.AppkitButton>('appkit-button', undefined, [\n 'variant',\n 'size',\n 'disabled',\n 'type',\n 'locale',\n 'ariaLabel',\n 'eventName'\n]);\n\n\nexport const AppkitCard: StencilVueComponent<JSX.AppkitCard> = /*@__PURE__*/ defineContainer<JSX.AppkitCard>('appkit-card', undefined);\n\n\nexport const AppkitCardContent: StencilVueComponent<JSX.AppkitCardContent> = /*@__PURE__*/ defineContainer<JSX.AppkitCardContent>('appkit-card-content', undefined);\n\n\nexport const AppkitCardDescription: StencilVueComponent<JSX.AppkitCardDescription> = /*@__PURE__*/ defineContainer<JSX.AppkitCardDescription>('appkit-card-description', undefined);\n\n\nexport const AppkitCardFooter: StencilVueComponent<JSX.AppkitCardFooter> = /*@__PURE__*/ defineContainer<JSX.AppkitCardFooter>('appkit-card-footer', undefined);\n\n\nexport const AppkitCardHeader: StencilVueComponent<JSX.AppkitCardHeader> = /*@__PURE__*/ defineContainer<JSX.AppkitCardHeader>('appkit-card-header', undefined);\n\n\nexport const AppkitCardTitle: StencilVueComponent<JSX.AppkitCardTitle> = /*@__PURE__*/ defineContainer<JSX.AppkitCardTitle>('appkit-card-title', undefined);\n\n\nexport const AppkitCheckbox: StencilVueComponent<JSX.AppkitCheckbox> = /*@__PURE__*/ defineContainer<JSX.AppkitCheckbox>('appkit-checkbox', undefined, [\n 'checked',\n 'disabled',\n 'label',\n 'name',\n 'value',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitCollapsible: StencilVueComponent<JSX.AppkitCollapsible> = /*@__PURE__*/ defineContainer<JSX.AppkitCollapsible>('appkit-collapsible', undefined, [\n 'open',\n 'appkitToggle'\n], [\n 'appkitToggle'\n]);\n\n\nexport const AppkitConnectButton: StencilVueComponent<JSX.AppkitConnectButton> = /*@__PURE__*/ defineContainer<JSX.AppkitConnectButton>('appkit-connect-button', undefined, [\n 'connected',\n 'connecting',\n 'address',\n 'balance',\n 'balanceSymbol',\n 'isBalanceLoading',\n 'tokenBalancesJson',\n 'explorerUrl',\n 'explorerLabel',\n 'isMobile',\n 'mobileWalletName',\n 'walletsJson',\n 'qrUri',\n 'qrLoading',\n 'qrError',\n 'appkitConnect',\n 'appkitDisconnect',\n 'appkitStartPairing',\n 'appkitRetry',\n 'appkitCancelPairing',\n 'appkitMobileDeepLink',\n 'appkitCopyAddress'\n], [\n 'appkitConnect',\n 'appkitDisconnect',\n 'appkitStartPairing',\n 'appkitRetry',\n 'appkitCancelPairing',\n 'appkitMobileDeepLink',\n 'appkitCopyAddress'\n]);\n\n\nexport const AppkitDialog: StencilVueComponent<JSX.AppkitDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitDialog>('appkit-dialog', undefined, [\n 'open',\n 'heading',\n 'appkitClose',\n 'appkitOpenChange'\n], [\n 'appkitClose',\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitDropdownMenu: StencilVueComponent<JSX.AppkitDropdownMenu> = /*@__PURE__*/ defineContainer<JSX.AppkitDropdownMenu>('appkit-dropdown-menu', undefined, [\n 'itemsJson',\n 'appkitSelect'\n], [\n 'appkitSelect'\n]);\n\n\nexport const AppkitInput: StencilVueComponent<JSX.AppkitInput> = /*@__PURE__*/ defineContainer<JSX.AppkitInput>('appkit-input', undefined, [\n 'type',\n 'placeholder',\n 'value',\n 'disabled',\n 'invalid',\n 'name',\n 'autocomplete',\n 'maxLength',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitPopover: StencilVueComponent<JSX.AppkitPopover> = /*@__PURE__*/ defineContainer<JSX.AppkitPopover>('appkit-popover', undefined, [\n 'open',\n 'placement',\n 'appkitOpenChange'\n], [\n 'appkitOpenChange'\n]);\n\n\nexport const AppkitProgress: StencilVueComponent<JSX.AppkitProgress> = /*@__PURE__*/ defineContainer<JSX.AppkitProgress>('appkit-progress', undefined, [\n 'value',\n 'max',\n 'label'\n]);\n\n\nexport const AppkitScrollArea: StencilVueComponent<JSX.AppkitScrollArea> = /*@__PURE__*/ defineContainer<JSX.AppkitScrollArea>('appkit-scroll-area', undefined);\n\n\nexport const AppkitSelect: StencilVueComponent<JSX.AppkitSelect> = /*@__PURE__*/ defineContainer<JSX.AppkitSelect>('appkit-select', undefined, [\n 'optionsJson',\n 'value',\n 'placeholder',\n 'disabled',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitSeparator: StencilVueComponent<JSX.AppkitSeparator> = /*@__PURE__*/ defineContainer<JSX.AppkitSeparator>('appkit-separator', undefined, [\n 'orientation',\n 'decorative'\n]);\n\n\nexport const AppkitSkeleton: StencilVueComponent<JSX.AppkitSkeleton> = /*@__PURE__*/ defineContainer<JSX.AppkitSkeleton>('appkit-skeleton', undefined);\n\n\nexport const AppkitSwitch: StencilVueComponent<JSX.AppkitSwitch> = /*@__PURE__*/ defineContainer<JSX.AppkitSwitch>('appkit-switch', undefined, [\n 'checked',\n 'disabled',\n 'label',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitTabs: StencilVueComponent<JSX.AppkitTabs> = /*@__PURE__*/ defineContainer<JSX.AppkitTabs>('appkit-tabs', undefined, [\n 'tabsJson',\n 'selected',\n 'appkitTabChange'\n], [\n 'appkitTabChange'\n]);\n\n\nexport const AppkitToggleGroup: StencilVueComponent<JSX.AppkitToggleGroup> = /*@__PURE__*/ defineContainer<JSX.AppkitToggleGroup>('appkit-toggle-group', undefined, [\n 'itemsJson',\n 'selected',\n 'multiple',\n 'appkitChange'\n], [\n 'appkitChange'\n]);\n\n\nexport const AppkitTooltip: StencilVueComponent<JSX.AppkitTooltip> = /*@__PURE__*/ defineContainer<JSX.AppkitTooltip>('appkit-tooltip', undefined, [\n 'content',\n 'placement'\n]);\n\n\n","import { isEvmAddress, parseCaip10 } from \"@naculus/connect-core\";\nimport { computed, toValue } from \"vue\";\nimport type { ComputedRef, MaybeRefOrGetter } from \"vue\";\n\nexport interface AccountEntry {\n /** As the session reports it: CAIP-10 for most wallets, bare hex for some. */\n address: string;\n /** The namespace, when the entry was CAIP-10. Null for a bare address. */\n namespace: string | null;\n isEVM: boolean;\n}\n\nexport interface UseAccountsReturn {\n accounts: ComputedRef<AccountEntry[]>;\n evmAccount: ComputedRef<string | null>;\n solanaAccount: ComputedRef<string | null>;\n}\n\n/**\n * Split a session's account list by what each entry actually is.\n *\n * The same reading as the React `useAccount`, because it is the same reading:\n * `parseCaip10` and `isEvmAddress` come from `@naculus/connect-core` and hold\n * every rule about which strings mean what. What differs between the two\n * bindings is `computed` versus `useMemo`, and nothing else.\n */\nexport function useAccounts(\n accounts: MaybeRefOrGetter<string[] | null | undefined>,\n): UseAccountsReturn {\n const parsed = computed<AccountEntry[]>(() =>\n (toValue(accounts) ?? []).map((address) => {\n const caip10 = parseCaip10(address);\n if (caip10) {\n return {\n address,\n namespace: caip10.namespace,\n isEVM:\n caip10.namespace === \"eip155\" && isEvmAddress(caip10.address),\n };\n }\n // A bare 0x-40-hex value is unambiguously EVM. A bare base58 string is\n // not unambiguously anything, so nothing is claimed about it.\n return { address, namespace: null, isEVM: isEvmAddress(address) };\n }),\n );\n\n return {\n accounts: parsed,\n evmAccount: computed(\n () => parsed.value.find((a) => a.isEVM)?.address ?? null,\n ),\n solanaAccount: computed(\n () => parsed.value.find((a) => a.namespace === \"solana\")?.address ?? null,\n ),\n };\n}\n","import {\n chainNamespace,\n chainNumber,\n chainsForNamespace,\n describeChain,\n resolveChain,\n type ChainInfo,\n type WalletChain,\n} from \"@naculus/connect-appkit-core\";\nimport { computed, toValue } from \"vue\";\nimport type { ComputedRef, MaybeRefOrGetter } from \"vue\";\n\nexport interface UseChainReturn {\n /** The configured chain matching the connected CAIP-2 id, or null. */\n currentChain: ComputedRef<WalletChain | null>;\n /** A description of the connected chain, for any namespace. */\n chainInfo: ComputedRef<ChainInfo | null>;\n /** Only the chains the connected wallet could actually switch to. */\n availableChains: ComputedRef<WalletChain[]>;\n /** The EIP-155 number, or null when the connected chain has none. */\n currentChainNumber: ComputedRef<number | null>;\n namespace: ComputedRef<string | null>;\n}\n\n/**\n * The connected chain, and the chains it is possible to switch to.\n *\n * Identical in substance to the React `useChain`, because it is the same five\n * functions from `@naculus/connect-appkit-core`. This file contains no\n * decision at all — which is the point: `availableChains` filtering to the\n * connected namespace, `chainInfo` describing non-EVM chains, and\n * `currentChainNumber` refusing to invent a number for Solana are all\n * properties of the shared core, so both bindings get them or neither does.\n *\n * Takes its chain list and connected id as arguments; Vue has no equivalent of\n * the React provider here.\n */\nexport function useChain(\n chains: MaybeRefOrGetter<WalletChain[] | null | undefined>,\n chainId: MaybeRefOrGetter<string | null | undefined>,\n): UseChainReturn {\n const list = computed(() => toValue(chains) ?? []);\n const id = computed(() => toValue(chainId) ?? null);\n\n const currentChain = computed(() => resolveChain(list.value, id.value));\n\n return {\n currentChain,\n chainInfo: computed(() => describeChain(list.value, id.value)),\n availableChains: computed(() => chainsForNamespace(list.value, id.value)),\n currentChainNumber: computed(() =>\n currentChain.value ? chainNumber(currentChain.value) : null,\n ),\n namespace: computed(() =>\n currentChain.value ? chainNamespace(currentChain.value) : null,\n ),\n };\n}\n","import type { PassphraseGate, PassphraseRequest } from \"@naculus/connect-core\";\nimport { onScopeDispose, readonly, shallowRef } from \"vue\";\n\nexport interface UsePassphraseGateReturn {\n /** The open request, or null when nothing is being asked. */\n request: Readonly<ReturnType<typeof shallowRef<PassphraseRequest | null>>>;\n /** Answer the open request. */\n submit: (passphrase: string) => void;\n /** Abandon it, failing the load or save that asked. */\n cancel: (reason?: string) => void;\n /** Drop the held passphrase, so the next operation asks again. */\n forget: (reason?: string) => void;\n}\n\n/**\n * Bind a `PassphraseGate` into Vue reactivity.\n *\n * The gate itself lives in `@naculus/connect-core` rather than in either\n * framework package, because the thing it bridges — an encrypted storage\n * adapter asking for a passphrase from inside code that has never heard of a\n * component — is the same problem in React and in Vue. One implementation,\n * two thin bindings.\n *\n * ```ts\n * const gate = new PassphraseGate()\n * const wallet = new PocketWallet({ encryptionPassphrase: gate.request })\n * const { request, submit, cancel } = usePassphraseGate(gate)\n * ```\n *\n * `shallowRef`, not `ref`: the request is a small immutable snapshot the gate\n * replaces wholesale, and deep reactivity over it would proxy an object that\n * never mutates in place.\n */\nexport function usePassphraseGate(\n gate: PassphraseGate,\n): UsePassphraseGateReturn {\n const request = shallowRef<PassphraseRequest | null>(gate.getSnapshot());\n const unsubscribe = gate.subscribe(() => {\n request.value = gate.getSnapshot();\n });\n // Without this the gate keeps a reference to a listener belonging to a\n // component that is gone, and every later prompt writes into a dead ref.\n onScopeDispose(unsubscribe);\n\n return {\n request: readonly(request) as UsePassphraseGateReturn[\"request\"],\n submit: (passphrase: string) => gate.submit(passphrase),\n cancel: (reason?: string) => gate.cancel(reason),\n forget: (reason?: string) => gate.forget(reason),\n };\n}\n","import {\n getSolanaBalance,\n type SolanaBalance,\n} from \"@naculus/connect-core\";\nimport { onScopeDispose, ref, shallowRef, toValue, watchEffect } from \"vue\";\nimport type { MaybeRefOrGetter } from \"vue\";\n\nexport interface UseSolanaBalanceReturn {\n balance: ReturnType<typeof shallowRef<SolanaBalance | null>>;\n isFetching: ReturnType<typeof ref<boolean>>;\n error: ReturnType<typeof shallowRef<Error | null>>;\n refetch: () => Promise<void>;\n}\n\n/**\n * The SOL balance of an address.\n *\n * The whole of this file is Vue plumbing. Every decision that took thought —\n * exact lamport arithmetic, distinguishing an unfunded account from an emptied\n * one, refusing to invent a zero — is in `@naculus/connect-core`, shared with\n * the React hook. That is what makes \"author in React, ship to Vue\" true for\n * the logic: what does not translate is only the reactivity.\n *\n * Takes its address and endpoint as arguments because Vue has no equivalent of\n * the React provider here. Refs and getters both work.\n */\nexport function useSolanaBalance(\n address: MaybeRefOrGetter<string | null | undefined>,\n rpcUrl: MaybeRefOrGetter<string | null | undefined>,\n): UseSolanaBalanceReturn {\n const balance = shallowRef<SolanaBalance | null>(null);\n const isFetching = ref(false);\n const error = shallowRef<Error | null>(null);\n // Guards against a slow response for a previous address overwriting the\n // balance of the one now on screen.\n let generation = 0;\n let disposed = false;\n\n const refetch = async () => {\n const addr = toValue(address);\n const url = toValue(rpcUrl);\n if (!addr || !url) {\n balance.value = null;\n return;\n }\n const own = ++generation;\n isFetching.value = true;\n error.value = null;\n try {\n const next = await getSolanaBalance(url, addr);\n if (disposed || own !== generation) return;\n balance.value = next;\n } catch (err) {\n if (disposed || own !== generation) return;\n // Cleared rather than left stale: a balance shown next to an error\n // reads as the current balance, and it is not.\n balance.value = null;\n error.value =\n err instanceof Error ? err : new Error(\"Balance read failed\");\n } finally {\n if (!disposed && own === generation) isFetching.value = false;\n }\n };\n\n watchEffect(() => {\n // Touch both so the effect re-runs when either changes.\n toValue(address);\n toValue(rpcUrl);\n void refetch();\n });\n\n onScopeDispose(() => {\n disposed = true;\n });\n\n return { balance, isFetching, error, refetch };\n}\n"],"mappings":";AAGA,SAAS,uBAAiD;AAQnD,IAAM,kBAA0E,gCAAqC,oBAAoB,QAAW;AAAA,EACzJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AACF,CAAC;AAGM,IAAM,sBAAkF,gCAAyC,yBAAyB,QAAW;AAAA,EAC1K;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,IAAM,oBAA8E,gCAAuC,uBAAuB,QAAW;AAAA,EAClK;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AAAA,EACD;AAAA,EACA;AACF,CAAC;AAGM,IAAM,eAAoE,gCAAkC,iBAAiB,QAAW;AAAA,EAC7I;AAAA,EACA;AAAA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,eAAe,QAAQ,MAAM,IAAI,MAAM,qBAAqB;AAAA,IAChE,UAAE;AACA,UAAI,CAAC,YAAY,QAAQ,WAAY,YAAW,QAAQ;AAAA,IAC1D;AAAA,EACF;AAEA,cAAY,MAAM;AAEhB,IAAAA,SAAQ,OAAO;AACf,IAAAA,SAAQ,MAAM;AACd,SAAK,QAAQ;AAAA,EACf,CAAC;AAED,EAAAF,gBAAe,MAAM;AACnB,eAAW;AAAA,EACb,CAAC;AAED,SAAO,EAAE,SAAS,YAAY,OAAO,QAAQ;AAC/C;","names":["computed","toValue","onScopeDispose","shallowRef","toValue"]}
|
package/package.json
CHANGED
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naculus/connect-appkit-vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "./dist/index.
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
6
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist/",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
7
19
|
"dependencies": {
|
|
8
20
|
"@stencil/vue-output-target": "^0.14.1",
|
|
9
|
-
"@naculus/connect-appkit-wc": "0.
|
|
21
|
+
"@naculus/connect-appkit-wc": "0.2.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"vue": "^3.5.0",
|
|
25
|
+
"@naculus/connect-core": "^0.2.0",
|
|
26
|
+
"@naculus/connect-appkit-core": "^0.2.0"
|
|
10
27
|
},
|
|
11
28
|
"publishConfig": {
|
|
12
29
|
"access": "public"
|
|
13
30
|
},
|
|
14
31
|
"devDependencies": {
|
|
15
|
-
"vue": "^3.5.40"
|
|
32
|
+
"vue": "^3.5.40",
|
|
33
|
+
"@naculus/connect-core": "^0.2.0",
|
|
34
|
+
"vitest": "^4.0.0",
|
|
35
|
+
"@naculus/connect-appkit-core": "0.2.0"
|
|
16
36
|
},
|
|
17
37
|
"repository": {
|
|
18
38
|
"type": "git",
|
|
@@ -30,9 +50,6 @@
|
|
|
30
50
|
"components",
|
|
31
51
|
"vue"
|
|
32
52
|
],
|
|
33
|
-
"optionalDependencies": {
|
|
34
|
-
"@naculus/connect-appkit-ui": "0.1.9"
|
|
35
|
-
},
|
|
36
53
|
"scripts": {
|
|
37
54
|
"build": "tsup",
|
|
38
55
|
"test": "vitest run"
|
package/src/index.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
AppkitAccordion,
|
|
3
|
-
AppkitAccountButton,
|
|
4
|
-
AppkitAlertDialog,
|
|
5
|
-
AppkitAvatar,
|
|
6
|
-
AppkitBadge,
|
|
7
|
-
AppkitButton,
|
|
8
|
-
AppkitCard,
|
|
9
|
-
AppkitCardContent,
|
|
10
|
-
AppkitCardDescription,
|
|
11
|
-
AppkitCardFooter,
|
|
12
|
-
AppkitCardHeader,
|
|
13
|
-
AppkitCardTitle,
|
|
14
|
-
AppkitCheckbox,
|
|
15
|
-
AppkitCollapsible,
|
|
16
|
-
AppkitConnectButton,
|
|
17
|
-
AppkitDialog,
|
|
18
|
-
AppkitDropdownMenu,
|
|
19
|
-
AppkitInput,
|
|
20
|
-
AppkitPopover,
|
|
21
|
-
AppkitProgress,
|
|
22
|
-
AppkitScrollArea,
|
|
23
|
-
AppkitSelect,
|
|
24
|
-
AppkitSeparator,
|
|
25
|
-
AppkitSkeleton,
|
|
26
|
-
AppkitSwitch,
|
|
27
|
-
AppkitTabs,
|
|
28
|
-
AppkitToggleGroup,
|
|
29
|
-
AppkitTooltip,
|
|
30
|
-
} from "./wc-generated/proxies"
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* auto-generated vue proxies */
|
|
4
|
-
import { defineContainer, type StencilVueComponent } from '@stencil/vue-output-target/runtime';
|
|
5
|
-
|
|
6
|
-
import type { JSX } from '@naculus/connect-appkit-wc';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const AppkitAccordion: StencilVueComponent<JSX.AppkitAccordion> = /*@__PURE__*/ defineContainer<JSX.AppkitAccordion>('appkit-accordion', undefined, [
|
|
13
|
-
'label',
|
|
14
|
-
'open',
|
|
15
|
-
'disabled',
|
|
16
|
-
'appkitToggle'
|
|
17
|
-
], [
|
|
18
|
-
'appkitToggle'
|
|
19
|
-
]);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export const AppkitAccountButton: StencilVueComponent<JSX.AppkitAccountButton> = /*@__PURE__*/ defineContainer<JSX.AppkitAccountButton>('appkit-account-button', undefined, [
|
|
23
|
-
'address',
|
|
24
|
-
'balance',
|
|
25
|
-
'balanceSymbol',
|
|
26
|
-
'showAddress',
|
|
27
|
-
'showBalance',
|
|
28
|
-
'disabled'
|
|
29
|
-
]);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export const AppkitAlertDialog: StencilVueComponent<JSX.AppkitAlertDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitAlertDialog>('appkit-alert-dialog', undefined, [
|
|
33
|
-
'open',
|
|
34
|
-
'heading',
|
|
35
|
-
'description',
|
|
36
|
-
'appkitClose',
|
|
37
|
-
'appkitOpenChange'
|
|
38
|
-
], [
|
|
39
|
-
'appkitClose',
|
|
40
|
-
'appkitOpenChange'
|
|
41
|
-
]);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export const AppkitAvatar: StencilVueComponent<JSX.AppkitAvatar> = /*@__PURE__*/ defineContainer<JSX.AppkitAvatar>('appkit-avatar', undefined, [
|
|
45
|
-
'size',
|
|
46
|
-
'src',
|
|
47
|
-
'alt',
|
|
48
|
-
'fallback'
|
|
49
|
-
]);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export const AppkitBadge: StencilVueComponent<JSX.AppkitBadge> = /*@__PURE__*/ defineContainer<JSX.AppkitBadge>('appkit-badge', undefined, [
|
|
53
|
-
'variant'
|
|
54
|
-
]);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export const AppkitButton: StencilVueComponent<JSX.AppkitButton> = /*@__PURE__*/ defineContainer<JSX.AppkitButton>('appkit-button', undefined, [
|
|
58
|
-
'variant',
|
|
59
|
-
'size',
|
|
60
|
-
'disabled',
|
|
61
|
-
'type',
|
|
62
|
-
'locale',
|
|
63
|
-
'ariaLabel',
|
|
64
|
-
'eventName'
|
|
65
|
-
]);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
export const AppkitCard: StencilVueComponent<JSX.AppkitCard> = /*@__PURE__*/ defineContainer<JSX.AppkitCard>('appkit-card', undefined);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export const AppkitCardContent: StencilVueComponent<JSX.AppkitCardContent> = /*@__PURE__*/ defineContainer<JSX.AppkitCardContent>('appkit-card-content', undefined);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
export const AppkitCardDescription: StencilVueComponent<JSX.AppkitCardDescription> = /*@__PURE__*/ defineContainer<JSX.AppkitCardDescription>('appkit-card-description', undefined);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
export const AppkitCardFooter: StencilVueComponent<JSX.AppkitCardFooter> = /*@__PURE__*/ defineContainer<JSX.AppkitCardFooter>('appkit-card-footer', undefined);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
export const AppkitCardHeader: StencilVueComponent<JSX.AppkitCardHeader> = /*@__PURE__*/ defineContainer<JSX.AppkitCardHeader>('appkit-card-header', undefined);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
export const AppkitCardTitle: StencilVueComponent<JSX.AppkitCardTitle> = /*@__PURE__*/ defineContainer<JSX.AppkitCardTitle>('appkit-card-title', undefined);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
export const AppkitCheckbox: StencilVueComponent<JSX.AppkitCheckbox> = /*@__PURE__*/ defineContainer<JSX.AppkitCheckbox>('appkit-checkbox', undefined, [
|
|
87
|
-
'checked',
|
|
88
|
-
'disabled',
|
|
89
|
-
'label',
|
|
90
|
-
'name',
|
|
91
|
-
'value',
|
|
92
|
-
'appkitChange'
|
|
93
|
-
], [
|
|
94
|
-
'appkitChange'
|
|
95
|
-
]);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
export const AppkitCollapsible: StencilVueComponent<JSX.AppkitCollapsible> = /*@__PURE__*/ defineContainer<JSX.AppkitCollapsible>('appkit-collapsible', undefined, [
|
|
99
|
-
'open',
|
|
100
|
-
'appkitToggle'
|
|
101
|
-
], [
|
|
102
|
-
'appkitToggle'
|
|
103
|
-
]);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
export const AppkitConnectButton: StencilVueComponent<JSX.AppkitConnectButton> = /*@__PURE__*/ defineContainer<JSX.AppkitConnectButton>('appkit-connect-button', undefined, [
|
|
107
|
-
'connected',
|
|
108
|
-
'connecting',
|
|
109
|
-
'address',
|
|
110
|
-
'balance',
|
|
111
|
-
'balanceSymbol',
|
|
112
|
-
'isBalanceLoading',
|
|
113
|
-
'tokenBalancesJson',
|
|
114
|
-
'explorerUrl',
|
|
115
|
-
'walletsJson',
|
|
116
|
-
'qrUri',
|
|
117
|
-
'qrLoading',
|
|
118
|
-
'qrError',
|
|
119
|
-
'appkitConnect',
|
|
120
|
-
'appkitDisconnect',
|
|
121
|
-
'appkitStartPairing',
|
|
122
|
-
'appkitRetry',
|
|
123
|
-
'appkitMobileDeepLink',
|
|
124
|
-
'appkitCopyAddress'
|
|
125
|
-
], [
|
|
126
|
-
'appkitConnect',
|
|
127
|
-
'appkitDisconnect',
|
|
128
|
-
'appkitStartPairing',
|
|
129
|
-
'appkitRetry',
|
|
130
|
-
'appkitMobileDeepLink',
|
|
131
|
-
'appkitCopyAddress'
|
|
132
|
-
]);
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
export const AppkitDialog: StencilVueComponent<JSX.AppkitDialog> = /*@__PURE__*/ defineContainer<JSX.AppkitDialog>('appkit-dialog', undefined, [
|
|
136
|
-
'open',
|
|
137
|
-
'heading',
|
|
138
|
-
'appkitClose',
|
|
139
|
-
'appkitOpenChange'
|
|
140
|
-
], [
|
|
141
|
-
'appkitClose',
|
|
142
|
-
'appkitOpenChange'
|
|
143
|
-
]);
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
export const AppkitDropdownMenu: StencilVueComponent<JSX.AppkitDropdownMenu> = /*@__PURE__*/ defineContainer<JSX.AppkitDropdownMenu>('appkit-dropdown-menu', undefined, [
|
|
147
|
-
'itemsJson',
|
|
148
|
-
'appkitSelect'
|
|
149
|
-
], [
|
|
150
|
-
'appkitSelect'
|
|
151
|
-
]);
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
export const AppkitInput: StencilVueComponent<JSX.AppkitInput> = /*@__PURE__*/ defineContainer<JSX.AppkitInput>('appkit-input', undefined, [
|
|
155
|
-
'type',
|
|
156
|
-
'placeholder',
|
|
157
|
-
'value',
|
|
158
|
-
'disabled',
|
|
159
|
-
'invalid',
|
|
160
|
-
'name',
|
|
161
|
-
'autocomplete',
|
|
162
|
-
'maxLength',
|
|
163
|
-
'appkitChange'
|
|
164
|
-
], [
|
|
165
|
-
'appkitChange'
|
|
166
|
-
]);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
export const AppkitPopover: StencilVueComponent<JSX.AppkitPopover> = /*@__PURE__*/ defineContainer<JSX.AppkitPopover>('appkit-popover', undefined, [
|
|
170
|
-
'open',
|
|
171
|
-
'placement',
|
|
172
|
-
'appkitOpenChange'
|
|
173
|
-
], [
|
|
174
|
-
'appkitOpenChange'
|
|
175
|
-
]);
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
export const AppkitProgress: StencilVueComponent<JSX.AppkitProgress> = /*@__PURE__*/ defineContainer<JSX.AppkitProgress>('appkit-progress', undefined, [
|
|
179
|
-
'value',
|
|
180
|
-
'max',
|
|
181
|
-
'label'
|
|
182
|
-
]);
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
export const AppkitScrollArea: StencilVueComponent<JSX.AppkitScrollArea> = /*@__PURE__*/ defineContainer<JSX.AppkitScrollArea>('appkit-scroll-area', undefined);
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
export const AppkitSelect: StencilVueComponent<JSX.AppkitSelect> = /*@__PURE__*/ defineContainer<JSX.AppkitSelect>('appkit-select', undefined, [
|
|
189
|
-
'optionsJson',
|
|
190
|
-
'value',
|
|
191
|
-
'placeholder',
|
|
192
|
-
'disabled',
|
|
193
|
-
'appkitChange'
|
|
194
|
-
], [
|
|
195
|
-
'appkitChange'
|
|
196
|
-
]);
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
export const AppkitSeparator: StencilVueComponent<JSX.AppkitSeparator> = /*@__PURE__*/ defineContainer<JSX.AppkitSeparator>('appkit-separator', undefined, [
|
|
200
|
-
'orientation',
|
|
201
|
-
'decorative'
|
|
202
|
-
]);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
export const AppkitSkeleton: StencilVueComponent<JSX.AppkitSkeleton> = /*@__PURE__*/ defineContainer<JSX.AppkitSkeleton>('appkit-skeleton', undefined);
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
export const AppkitSwitch: StencilVueComponent<JSX.AppkitSwitch> = /*@__PURE__*/ defineContainer<JSX.AppkitSwitch>('appkit-switch', undefined, [
|
|
209
|
-
'checked',
|
|
210
|
-
'disabled',
|
|
211
|
-
'label',
|
|
212
|
-
'appkitChange'
|
|
213
|
-
], [
|
|
214
|
-
'appkitChange'
|
|
215
|
-
]);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
export const AppkitTabs: StencilVueComponent<JSX.AppkitTabs> = /*@__PURE__*/ defineContainer<JSX.AppkitTabs>('appkit-tabs', undefined, [
|
|
219
|
-
'tabsJson',
|
|
220
|
-
'selected',
|
|
221
|
-
'appkitTabChange'
|
|
222
|
-
], [
|
|
223
|
-
'appkitTabChange'
|
|
224
|
-
]);
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
export const AppkitToggleGroup: StencilVueComponent<JSX.AppkitToggleGroup> = /*@__PURE__*/ defineContainer<JSX.AppkitToggleGroup>('appkit-toggle-group', undefined, [
|
|
228
|
-
'itemsJson',
|
|
229
|
-
'selected',
|
|
230
|
-
'multiple',
|
|
231
|
-
'appkitChange'
|
|
232
|
-
], [
|
|
233
|
-
'appkitChange'
|
|
234
|
-
]);
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
export const AppkitTooltip: StencilVueComponent<JSX.AppkitTooltip> = /*@__PURE__*/ defineContainer<JSX.AppkitTooltip>('appkit-tooltip', undefined, [
|
|
238
|
-
'content',
|
|
239
|
-
'placement'
|
|
240
|
-
]);
|
|
241
|
-
|
|
242
|
-
|
package/tsup.config.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "tsup";
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
entry: ["src/index.ts"],
|
|
5
|
-
format: ["esm", "cjs"],
|
|
6
|
-
dts: false,
|
|
7
|
-
splitting: false,
|
|
8
|
-
sourcemap: true,
|
|
9
|
-
clean: true,
|
|
10
|
-
external: [/^@naculus\//, /^@stencil\//, "react", "vue"],
|
|
11
|
-
});
|