@devvmichael/create-stacks-app 0.1.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/dist/commands/add.d.ts +8 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +215 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/create.d.ts +3 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +63 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/deploy.d.ts +7 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +159 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/project.d.ts +4 -0
- package/dist/prompts/project.d.ts.map +1 -0
- package/dist/prompts/project.js +124 -0
- package/dist/prompts/project.js.map +1 -0
- package/dist/templates/installer.d.ts +4 -0
- package/dist/templates/installer.d.ts.map +1 -0
- package/dist/templates/installer.js +91 -0
- package/dist/templates/installer.js.map +1 -0
- package/dist/types/index.d.ts +40 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/clarinet.d.ts +5 -0
- package/dist/utils/clarinet.d.ts.map +1 -0
- package/dist/utils/clarinet.js +72 -0
- package/dist/utils/clarinet.js.map +1 -0
- package/dist/utils/filesystem.d.ts +4 -0
- package/dist/utils/filesystem.d.ts.map +1 -0
- package/dist/utils/filesystem.js +158 -0
- package/dist/utils/filesystem.js.map +1 -0
- package/dist/utils/git.d.ts +2 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +21 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +45 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/package-manager.d.ts +5 -0
- package/dist/utils/package-manager.d.ts.map +1 -0
- package/dist/utils/package-manager.js +65 -0
- package/dist/utils/package-manager.js.map +1 -0
- package/dist/utils/validation.d.ts +5 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +41 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +52 -0
- package/templates/base/editorconfig +12 -0
- package/templates/base/gitignore +13 -0
- package/templates/base/prettierrc +7 -0
- package/templates/contracts/counter/counter.clar +43 -0
- package/templates/contracts/counter/counter.test.ts +127 -0
- package/templates/contracts/defi/sip010-trait.clar +11 -0
- package/templates/contracts/defi/staking-pool.clar +20 -0
- package/templates/contracts/marketplace/nft-marketplace.clar +44 -0
- package/templates/contracts/marketplace/nft-trait.clar +8 -0
- package/templates/contracts/marketplace/sip009-nft.clar +25 -0
- package/templates/contracts/nft/nft.clar +111 -0
- package/templates/contracts/nft/nft.test.ts +204 -0
- package/templates/contracts/token/token.clar +67 -0
- package/templates/contracts/token/token.test.ts +139 -0
- package/templates/frontends/nextjs/template/.env.example +2 -0
- package/templates/frontends/nextjs/template/app/globals.css +40 -0
- package/templates/frontends/nextjs/template/app/layout.tsx +36 -0
- package/templates/frontends/nextjs/template/app/page.tsx +42 -0
- package/templates/frontends/nextjs/template/app/providers.tsx +31 -0
- package/templates/frontends/nextjs/template/components/contracts/counter-interaction.tsx +80 -0
- package/templates/frontends/nextjs/template/components/header.tsx +24 -0
- package/templates/frontends/nextjs/template/components/wallet/connect-button.tsx +44 -0
- package/templates/frontends/nextjs/template/hooks/use-contract-call.ts +52 -0
- package/templates/frontends/nextjs/template/hooks/use-contract-read.ts +49 -0
- package/templates/frontends/nextjs/template/hooks/use-stacks.ts +26 -0
- package/templates/frontends/nextjs/template/lib/contracts.ts +29 -0
- package/templates/frontends/nextjs/template/lib/stacks.ts +18 -0
- package/templates/frontends/nextjs/template/next.config.js +6 -0
- package/templates/frontends/nextjs/template/package.json +29 -0
- package/templates/frontends/nextjs/template/postcss.config.js +6 -0
- package/templates/frontends/nextjs/template/public/logo.svg +3 -0
- package/templates/frontends/nextjs/template/tailwind.config.js +18 -0
- package/templates/frontends/nextjs/template/tsconfig.json +26 -0
- package/templates/frontends/react/template/.env.example +2 -0
- package/templates/frontends/react/template/index.html +13 -0
- package/templates/frontends/react/template/package.json +29 -0
- package/templates/frontends/react/template/postcss.config.js +6 -0
- package/templates/frontends/react/template/public/logo.svg +3 -0
- package/templates/frontends/react/template/src/App.tsx +100 -0
- package/templates/frontends/react/template/src/components/CounterInteraction.tsx +121 -0
- package/templates/frontends/react/template/src/components/Header.tsx +39 -0
- package/templates/frontends/react/template/src/index.css +33 -0
- package/templates/frontends/react/template/src/main.tsx +10 -0
- package/templates/frontends/react/template/tailwind.config.js +15 -0
- package/templates/frontends/react/template/tsconfig.json +25 -0
- package/templates/frontends/react/template/tsconfig.node.json +10 -0
- package/templates/frontends/react/template/vite.config.ts +12 -0
- package/templates/frontends/vue/template/.env.example +2 -0
- package/templates/frontends/vue/template/index.html +13 -0
- package/templates/frontends/vue/template/package.json +27 -0
- package/templates/frontends/vue/template/postcss.config.js +6 -0
- package/templates/frontends/vue/template/public/logo.svg +3 -0
- package/templates/frontends/vue/template/src/App.vue +98 -0
- package/templates/frontends/vue/template/src/components/AppHeader.vue +39 -0
- package/templates/frontends/vue/template/src/components/CounterInteraction.vue +120 -0
- package/templates/frontends/vue/template/src/env.d.ts +16 -0
- package/templates/frontends/vue/template/src/main.ts +5 -0
- package/templates/frontends/vue/template/src/style.css +33 -0
- package/templates/frontends/vue/template/tailwind.config.js +15 -0
- package/templates/frontends/vue/template/tsconfig.json +25 -0
- package/templates/frontends/vue/template/tsconfig.node.json +10 -0
- package/templates/frontends/vue/template/vite.config.ts +12 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
colors: {
|
|
7
|
+
stacks: {
|
|
8
|
+
purple: '#5546FF',
|
|
9
|
+
'purple-dark': '#3D2DB8',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
plugins: [],
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"baseUrl": ".",
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": ["src/*"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"include": ["src"],
|
|
24
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Stacks App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stacks-app-frontend",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vue-tsc && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@stacks/connect": "^7.8.2",
|
|
14
|
+
"@stacks/network": "^6.13.0",
|
|
15
|
+
"@stacks/transactions": "^6.13.1",
|
|
16
|
+
"vue": "^3.4.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@vitejs/plugin-vue": "^4.5.2",
|
|
20
|
+
"autoprefixer": "^10.4.16",
|
|
21
|
+
"postcss": "^8.4.32",
|
|
22
|
+
"tailwindcss": "^3.3.6",
|
|
23
|
+
"typescript": "^5.3.3",
|
|
24
|
+
"vite": "^5.0.10",
|
|
25
|
+
"vue-tsc": "^1.8.25"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, onMounted } from 'vue';
|
|
3
|
+
import { AppConfig, UserSession, showConnect } from '@stacks/connect';
|
|
4
|
+
import { StacksTestnet, StacksMainnet } from '@stacks/network';
|
|
5
|
+
import AppHeader from './components/AppHeader.vue';
|
|
6
|
+
import CounterInteraction from './components/CounterInteraction.vue';
|
|
7
|
+
|
|
8
|
+
const appConfig = new AppConfig(['store_write', 'publish_data']);
|
|
9
|
+
const userSession = new UserSession({ appConfig });
|
|
10
|
+
|
|
11
|
+
const network =
|
|
12
|
+
import.meta.env.VITE_NETWORK === 'mainnet'
|
|
13
|
+
? new StacksMainnet()
|
|
14
|
+
: new StacksTestnet();
|
|
15
|
+
|
|
16
|
+
const address = ref<string | null>(null);
|
|
17
|
+
|
|
18
|
+
onMounted(() => {
|
|
19
|
+
if (userSession.isUserSignedIn()) {
|
|
20
|
+
const userData = userSession.loadUserData();
|
|
21
|
+
const networkKey = import.meta.env.VITE_NETWORK === 'mainnet' ? 'mainnet' : 'testnet';
|
|
22
|
+
address.value = userData.profile.stxAddress[networkKey];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
function handleConnect() {
|
|
27
|
+
showConnect({
|
|
28
|
+
appDetails: {
|
|
29
|
+
name: 'Stacks App',
|
|
30
|
+
icon: window.location.origin + '/logo.svg',
|
|
31
|
+
},
|
|
32
|
+
redirectTo: '/',
|
|
33
|
+
onFinish: () => {
|
|
34
|
+
window.location.reload();
|
|
35
|
+
},
|
|
36
|
+
userSession,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function handleDisconnect() {
|
|
41
|
+
userSession.signUserOut('/');
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div class="min-h-screen flex flex-col">
|
|
47
|
+
<AppHeader
|
|
48
|
+
:address="address"
|
|
49
|
+
@connect="handleConnect"
|
|
50
|
+
@disconnect="handleDisconnect"
|
|
51
|
+
/>
|
|
52
|
+
|
|
53
|
+
<main class="flex-1 container mx-auto px-4 py-8">
|
|
54
|
+
<div class="mb-8 text-center">
|
|
55
|
+
<h1 class="mb-4 text-4xl font-bold">Welcome to Your Stacks App</h1>
|
|
56
|
+
<p class="text-lg text-gray-400">
|
|
57
|
+
A full-stack Stacks blockchain application
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
|
|
62
|
+
<CounterInteraction
|
|
63
|
+
:network="network"
|
|
64
|
+
:is-connected="!!address"
|
|
65
|
+
:sender-address="address"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div class="mt-12 text-center">
|
|
70
|
+
<h2 class="mb-4 text-2xl font-bold">Get Started</h2>
|
|
71
|
+
<div class="grid gap-4 md:grid-cols-3 max-w-3xl mx-auto">
|
|
72
|
+
<div class="card">
|
|
73
|
+
<h3 class="font-semibold mb-2">📝 Edit Contracts</h3>
|
|
74
|
+
<p class="text-sm text-gray-400">
|
|
75
|
+
Modify contracts in <code class="bg-gray-800 px-1 rounded">contracts/</code>
|
|
76
|
+
</p>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="card">
|
|
79
|
+
<h3 class="font-semibold mb-2">🧪 Run Tests</h3>
|
|
80
|
+
<p class="text-sm text-gray-400">
|
|
81
|
+
Run <code class="bg-gray-800 px-1 rounded">npm run test</code>
|
|
82
|
+
</p>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="card">
|
|
85
|
+
<h3 class="font-semibold mb-2">🚀 Deploy</h3>
|
|
86
|
+
<p class="text-sm text-gray-400">
|
|
87
|
+
Run <code class="bg-gray-800 px-1 rounded">npm run deploy:testnet</code>
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</main>
|
|
93
|
+
|
|
94
|
+
<footer class="border-t border-gray-800 py-6 text-center text-sm text-gray-500">
|
|
95
|
+
Built with Create Stacks App
|
|
96
|
+
</footer>
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{
|
|
3
|
+
address: string | null;
|
|
4
|
+
}>();
|
|
5
|
+
|
|
6
|
+
const emit = defineEmits<{
|
|
7
|
+
connect: [];
|
|
8
|
+
disconnect: [];
|
|
9
|
+
}>();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<header class="border-b border-gray-800">
|
|
14
|
+
<div class="container mx-auto px-4 py-4 flex items-center justify-between">
|
|
15
|
+
<a href="/" class="flex items-center gap-2">
|
|
16
|
+
<svg
|
|
17
|
+
class="w-8 h-8 text-stacks-purple"
|
|
18
|
+
viewBox="0 0 32 32"
|
|
19
|
+
fill="currentColor"
|
|
20
|
+
>
|
|
21
|
+
<path d="M16 0L3 8v16l13 8 13-8V8L16 0zm0 4l9 5.5v11L16 26l-9-5.5v-11L16 4z" />
|
|
22
|
+
</svg>
|
|
23
|
+
<span class="font-bold text-xl">Stacks App</span>
|
|
24
|
+
</a>
|
|
25
|
+
|
|
26
|
+
<div v-if="address" class="flex items-center gap-3">
|
|
27
|
+
<span class="text-sm bg-gray-800 px-3 py-1 rounded-full">
|
|
28
|
+
{{ address.slice(0, 6) }}...{{ address.slice(-4) }}
|
|
29
|
+
</span>
|
|
30
|
+
<button @click="emit('disconnect')" class="btn-secondary text-sm">
|
|
31
|
+
Disconnect
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
<button v-else @click="emit('connect')" class="btn-primary">
|
|
35
|
+
Connect Wallet
|
|
36
|
+
</button>
|
|
37
|
+
</div>
|
|
38
|
+
</header>
|
|
39
|
+
</template>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, onMounted } from 'vue';
|
|
3
|
+
import { openContractCall } from '@stacks/connect';
|
|
4
|
+
import { callReadOnlyFunction, cvToValue } from '@stacks/transactions';
|
|
5
|
+
import type { StacksNetwork } from '@stacks/network';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
network: StacksNetwork;
|
|
9
|
+
isConnected: boolean;
|
|
10
|
+
senderAddress: string | null;
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const contractAddress = import.meta.env.VITE_CONTRACT_ADDRESS || 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM';
|
|
14
|
+
const contractName = 'counter';
|
|
15
|
+
|
|
16
|
+
const counter = ref<number | null>(null);
|
|
17
|
+
const isLoading = ref(true);
|
|
18
|
+
const isIncrementing = ref(false);
|
|
19
|
+
const isDecrementing = ref(false);
|
|
20
|
+
|
|
21
|
+
async function fetchCounter() {
|
|
22
|
+
try {
|
|
23
|
+
const result = await callReadOnlyFunction({
|
|
24
|
+
contractAddress,
|
|
25
|
+
contractName,
|
|
26
|
+
functionName: 'get-counter',
|
|
27
|
+
functionArgs: [],
|
|
28
|
+
network: props.network,
|
|
29
|
+
senderAddress: contractAddress,
|
|
30
|
+
});
|
|
31
|
+
const value = cvToValue(result);
|
|
32
|
+
counter.value = value?.value ?? 0;
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error('Failed to fetch counter:', error);
|
|
35
|
+
} finally {
|
|
36
|
+
isLoading.value = false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
onMounted(() => {
|
|
41
|
+
fetchCounter();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
async function handleIncrement() {
|
|
45
|
+
if (!props.senderAddress) return;
|
|
46
|
+
isIncrementing.value = true;
|
|
47
|
+
try {
|
|
48
|
+
await openContractCall({
|
|
49
|
+
contractAddress,
|
|
50
|
+
contractName,
|
|
51
|
+
functionName: 'increment',
|
|
52
|
+
functionArgs: [],
|
|
53
|
+
network: props.network,
|
|
54
|
+
onFinish: () => {
|
|
55
|
+
setTimeout(fetchCounter, 2000);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error('Increment failed:', error);
|
|
60
|
+
} finally {
|
|
61
|
+
isIncrementing.value = false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function handleDecrement() {
|
|
66
|
+
if (!props.senderAddress) return;
|
|
67
|
+
isDecrementing.value = true;
|
|
68
|
+
try {
|
|
69
|
+
await openContractCall({
|
|
70
|
+
contractAddress,
|
|
71
|
+
contractName,
|
|
72
|
+
functionName: 'decrement',
|
|
73
|
+
functionArgs: [],
|
|
74
|
+
network: props.network,
|
|
75
|
+
onFinish: () => {
|
|
76
|
+
setTimeout(fetchCounter, 2000);
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
} catch (error) {
|
|
80
|
+
console.error('Decrement failed:', error);
|
|
81
|
+
} finally {
|
|
82
|
+
isDecrementing.value = false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<template>
|
|
88
|
+
<div class="card">
|
|
89
|
+
<h2 class="text-2xl font-bold mb-4">Counter Contract</h2>
|
|
90
|
+
|
|
91
|
+
<div class="mb-6 text-center">
|
|
92
|
+
<div class="text-6xl font-bold text-stacks-purple">
|
|
93
|
+
{{ isLoading ? '...' : counter }}
|
|
94
|
+
</div>
|
|
95
|
+
<p class="text-sm text-gray-500 mt-2">Current count</p>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<template v-if="isConnected">
|
|
99
|
+
<div class="flex gap-2">
|
|
100
|
+
<button
|
|
101
|
+
@click="handleDecrement"
|
|
102
|
+
:disabled="isDecrementing || counter === 0"
|
|
103
|
+
class="btn-secondary flex-1 disabled:opacity-50"
|
|
104
|
+
>
|
|
105
|
+
{{ isDecrementing ? 'Processing...' : '− Decrement' }}
|
|
106
|
+
</button>
|
|
107
|
+
<button
|
|
108
|
+
@click="handleIncrement"
|
|
109
|
+
:disabled="isIncrementing"
|
|
110
|
+
class="btn-primary flex-1 disabled:opacity-50"
|
|
111
|
+
>
|
|
112
|
+
{{ isIncrementing ? 'Processing...' : '+ Increment' }}
|
|
113
|
+
</button>
|
|
114
|
+
</div>
|
|
115
|
+
</template>
|
|
116
|
+
<p v-else class="text-center text-gray-500">
|
|
117
|
+
Connect your wallet to interact with the contract
|
|
118
|
+
</p>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import type { DefineComponent } from 'vue';
|
|
5
|
+
const component: DefineComponent<{}, {}, any>;
|
|
6
|
+
export default component;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface ImportMetaEnv {
|
|
10
|
+
readonly VITE_NETWORK: string;
|
|
11
|
+
readonly VITE_CONTRACT_ADDRESS: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ImportMeta {
|
|
15
|
+
readonly env: ImportMetaEnv;
|
|
16
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
7
|
+
line-height: 1.5;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
color-scheme: light dark;
|
|
10
|
+
color: rgba(255, 255, 255, 0.87);
|
|
11
|
+
background-color: #242424;
|
|
12
|
+
font-synthesis: none;
|
|
13
|
+
text-rendering: optimizeLegibility;
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
-moz-osx-font-smoothing: grayscale;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
body {
|
|
19
|
+
margin: 0;
|
|
20
|
+
min-height: 100vh;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.btn-primary {
|
|
24
|
+
@apply bg-stacks-purple hover:bg-stacks-purple-dark text-white font-semibold py-2 px-4 rounded-lg transition-colors cursor-pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.btn-secondary {
|
|
28
|
+
@apply border border-gray-600 hover:bg-gray-800 font-semibold py-2 px-4 rounded-lg transition-colors cursor-pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.card {
|
|
32
|
+
@apply bg-gray-900 rounded-xl shadow-lg p-6 border border-gray-700;
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
colors: {
|
|
7
|
+
stacks: {
|
|
8
|
+
purple: '#5546FF',
|
|
9
|
+
'purple-dark': '#3D2DB8',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
plugins: [],
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "preserve",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"baseUrl": ".",
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": ["src/*"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
24
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
25
|
+
}
|