@goodwidget/ai-credits-widget 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ import {
2
+ AiCreditsWidget
3
+ } from "./chunk-5ABKU4SW.js";
4
+
5
+ // src/element.ts
6
+ import { createMiniAppElement } from "@goodwidget/embed";
7
+ var AiCreditsWidgetElementBase = createMiniAppElement(
8
+ AiCreditsWidget,
9
+ {
10
+ shadow: true,
11
+ defaultTheme: "dark",
12
+ props: {
13
+ backendUrl: "property",
14
+ fundingVaultAddress: "property"
15
+ },
16
+ events: ["pay-success", "pay-error"]
17
+ }
18
+ );
19
+ var AiCreditsWidgetElement = class extends AiCreditsWidgetElementBase {
20
+ };
21
+ export {
22
+ AiCreditsWidgetElement
23
+ };
24
+ //# sourceMappingURL=element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/element.ts"],"sourcesContent":["import { createMiniAppElement } from '@goodwidget/embed'\nimport { AiCreditsWidget } from './AiCreditsWidget'\nimport type React from 'react'\n\n/**\n * A Custom Element class wrapping the AiCreditsWidget React component.\n *\n * Register it with any tag name:\n * customElements.define('ai-credits-widget', AiCreditsWidgetElement)\n *\n * Then use in HTML:\n * <ai-credits-widget></ai-credits-widget>\n *\n * Set the wallet provider and theme overrides via JS properties:\n * const el = document.querySelector('ai-credits-widget')\n * el.provider = window.ethereum\n * el.backendUrl = 'https://api.antseed.xyz'\n * el.fundingVaultAddress = '0xYourVaultAddress'\n * el.themeOverrides = { tokens: { color: { primary: '#00AFFE' } } }\n */\nconst AiCreditsWidgetElementBase = createMiniAppElement(\n AiCreditsWidget as React.ComponentType<Record<string, unknown>>,\n {\n shadow: true,\n defaultTheme: 'dark',\n props: {\n backendUrl: 'property',\n fundingVaultAddress: 'property',\n },\n events: ['pay-success', 'pay-error'],\n },\n)\n\nexport class AiCreditsWidgetElement extends AiCreditsWidgetElementBase {\n declare backendUrl: string | undefined\n declare fundingVaultAddress: string | undefined\n}\n"],"mappings":";;;;;AAAA,SAAS,4BAA4B;AAoBrC,IAAM,6BAA6B;AAAA,EACjC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,OAAO;AAAA,MACL,YAAY;AAAA,MACZ,qBAAqB;AAAA,IACvB;AAAA,IACA,QAAQ,CAAC,eAAe,WAAW;AAAA,EACrC;AACF;AAEO,IAAM,yBAAN,cAAqC,2BAA2B;AAGvE;","names":[]}