nexa-init 0.3.4 → 0.3.6
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/index.d.ts.map +1 -1
- package/dist/index.js +169 -16
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAsOA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAejE"}
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import { join } from 'path';
|
|
|
4
4
|
const FILES = {
|
|
5
5
|
'package.json': (name) => JSON.stringify({
|
|
6
6
|
name,
|
|
7
|
-
version: '0.0
|
|
7
|
+
version: '0.1.0',
|
|
8
8
|
private: true,
|
|
9
9
|
type: 'module',
|
|
10
10
|
scripts: { dev: 'vite', build: 'vite build', preview: 'vite preview' },
|
|
11
|
-
dependencies: { 'nexa-framework': '
|
|
12
|
-
devDependencies: { vite: '^6.0.0', 'nexa-vite-plugin': '
|
|
11
|
+
dependencies: { 'nexa-framework': '^0.2.0' },
|
|
12
|
+
devDependencies: { vite: '^6.0.0', 'nexa-vite-plugin': '^0.2.0' },
|
|
13
13
|
}, null, 2),
|
|
14
14
|
'index.html': (name) => `<!DOCTYPE html>
|
|
15
15
|
<html lang="en">
|
|
@@ -17,6 +17,14 @@ const FILES = {
|
|
|
17
17
|
<meta charset="UTF-8" />
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
19
|
<title>${name}</title>
|
|
20
|
+
<style>
|
|
21
|
+
body {
|
|
22
|
+
margin: 0;
|
|
23
|
+
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
24
|
+
background-color: #0f172a;
|
|
25
|
+
color: #f8fafc;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
20
28
|
</head>
|
|
21
29
|
<body>
|
|
22
30
|
<div id="app"></div>
|
|
@@ -29,41 +37,186 @@ import { nexaPlugin } from 'nexa-vite-plugin'
|
|
|
29
37
|
export default defineConfig({
|
|
30
38
|
plugins: [nexaPlugin()],
|
|
31
39
|
})`,
|
|
32
|
-
'src/main.ts': () => `import { mount
|
|
40
|
+
'src/main.ts': () => `import { mount } from 'nexa-framework'
|
|
33
41
|
import App from './App.nexa'
|
|
34
42
|
|
|
35
43
|
const root = document.getElementById('app')
|
|
36
44
|
if (root) {
|
|
37
|
-
mount(
|
|
45
|
+
mount(App, root)
|
|
38
46
|
}
|
|
39
47
|
`,
|
|
40
|
-
'src/
|
|
48
|
+
'src/App.nexa': () => `<script setup>
|
|
41
49
|
import { signal } from 'nexa-framework'
|
|
50
|
+
import Counter from './components/Counter.nexa'
|
|
42
51
|
|
|
43
|
-
const
|
|
52
|
+
const show = signal(true)
|
|
44
53
|
</script>
|
|
45
54
|
|
|
46
55
|
<template>
|
|
47
|
-
<div>
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
56
|
+
<div class="container">
|
|
57
|
+
<header>
|
|
58
|
+
<div class="logo">Nexa</div>
|
|
59
|
+
<nav>
|
|
60
|
+
<a href="https://github.com/nexabase/nexa-framework" target="_blank">GitHub</a>
|
|
61
|
+
</nav>
|
|
62
|
+
</header>
|
|
63
|
+
|
|
64
|
+
<main>
|
|
65
|
+
<h1>Build something <span>amazing</span>.</h1>
|
|
66
|
+
<p class="subtitle">Vue-like simplicity meets Signals performance.</p>
|
|
67
|
+
|
|
68
|
+
<div class="demo">
|
|
69
|
+
<Transition name="fade" mode="out-in">
|
|
70
|
+
<Counter v-if="show.value" />
|
|
71
|
+
</Transition>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<button class="btn-toggle" @click="show.value = !show.value">
|
|
75
|
+
{{ show.value ? 'Destroy Counter' : 'Restore Counter' }}
|
|
76
|
+
</button>
|
|
77
|
+
</main>
|
|
51
78
|
</div>
|
|
52
79
|
</template>
|
|
53
80
|
|
|
54
81
|
<style scoped>
|
|
55
|
-
|
|
82
|
+
.container {
|
|
83
|
+
max-width: 1200px;
|
|
84
|
+
margin: 0 auto;
|
|
85
|
+
padding: 0 2rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
header {
|
|
89
|
+
display: flex;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
align-items: center;
|
|
92
|
+
padding: 2rem 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.logo {
|
|
96
|
+
font-size: 1.5rem;
|
|
97
|
+
font-weight: 800;
|
|
98
|
+
letter-spacing: -0.025em;
|
|
99
|
+
background: linear-gradient(to right, #60a5fa, #a855f7);
|
|
100
|
+
-webkit-background-clip: text;
|
|
101
|
+
-webkit-text-fill-color: transparent;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
nav a {
|
|
105
|
+
color: #94a3b8;
|
|
106
|
+
text-decoration: none;
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
transition: color 0.2s;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
nav a:hover {
|
|
112
|
+
color: #f8fafc;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
main {
|
|
56
116
|
text-align: center;
|
|
117
|
+
padding: 4rem 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
h1 {
|
|
121
|
+
font-size: 4rem;
|
|
122
|
+
font-weight: 900;
|
|
123
|
+
letter-spacing: -0.05em;
|
|
124
|
+
margin-bottom: 1rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
h1 span {
|
|
128
|
+
color: #3b82f6;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.subtitle {
|
|
132
|
+
font-size: 1.25rem;
|
|
133
|
+
color: #94a3b8;
|
|
134
|
+
margin-bottom: 3rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.demo {
|
|
138
|
+
margin-bottom: 2rem;
|
|
139
|
+
min-height: 150px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.btn-toggle {
|
|
143
|
+
background: transparent;
|
|
144
|
+
color: #64748b;
|
|
145
|
+
border: 1px solid #334155;
|
|
146
|
+
padding: 8px 16px;
|
|
147
|
+
border-radius: 8px;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
font-size: 0.875rem;
|
|
150
|
+
transition: all 0.2s;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.btn-toggle:hover {
|
|
154
|
+
border-color: #475569;
|
|
155
|
+
color: #f8fafc;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Transitions */
|
|
159
|
+
.fade-enter-active, .fade-leave-active {
|
|
160
|
+
transition: opacity 0.3s ease;
|
|
161
|
+
}
|
|
162
|
+
.fade-enter-from, .fade-leave-to {
|
|
163
|
+
opacity: 0;
|
|
164
|
+
}
|
|
165
|
+
</style>`,
|
|
166
|
+
'src/components/Counter.nexa': () => `<script setup>
|
|
167
|
+
import { signal } from 'nexa-framework'
|
|
168
|
+
const count = signal(0)
|
|
169
|
+
</script>
|
|
170
|
+
|
|
171
|
+
<template>
|
|
172
|
+
<div class="counter-card">
|
|
173
|
+
<div class="count-value">{{ count.value }}</div>
|
|
174
|
+
<div class="controls">
|
|
175
|
+
<button @click="count.value--">-</button>
|
|
176
|
+
<button @click="count.value++" class="primary">+</button>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</template>
|
|
180
|
+
|
|
181
|
+
<style scoped>
|
|
182
|
+
.counter-card {
|
|
183
|
+
background: #1e293b;
|
|
184
|
+
border: 1px solid #334155;
|
|
57
185
|
padding: 2rem;
|
|
58
|
-
|
|
186
|
+
border-radius: 1rem;
|
|
187
|
+
display: inline-block;
|
|
188
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.count-value {
|
|
192
|
+
font-size: 3rem;
|
|
193
|
+
font-weight: 700;
|
|
194
|
+
margin-bottom: 1rem;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.controls {
|
|
198
|
+
display: flex;
|
|
199
|
+
gap: 1rem;
|
|
59
200
|
}
|
|
201
|
+
|
|
60
202
|
button {
|
|
61
|
-
background: #
|
|
203
|
+
background: #334155;
|
|
62
204
|
color: white;
|
|
63
205
|
border: none;
|
|
64
|
-
|
|
65
|
-
|
|
206
|
+
width: 48px;
|
|
207
|
+
height: 48px;
|
|
208
|
+
border-radius: 50%;
|
|
209
|
+
font-size: 1.5rem;
|
|
66
210
|
cursor: pointer;
|
|
211
|
+
transition: transform 0.1s;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
button:active {
|
|
215
|
+
transform: scale(0.9);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
button.primary {
|
|
219
|
+
background: #3b82f6;
|
|
67
220
|
}
|
|
68
221
|
</style>`,
|
|
69
222
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,MAAM,KAAK,GAA6C;IACtD,cAAc,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;QAC/C,IAAI;QACJ,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE;QACtE,YAAY,EAAE,EAAE,gBAAgB,E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AE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAuD9B;CACR,CAAA;AAED,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,OAAe;IACzD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAEtC,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,cAAc,IAAI,mBAAmB,CAAC,CAAA;IACxD,CAAC;IAED,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAE1C,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;QAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QACzD,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAA;IACjD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexa-init",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/node": "^25.8.0"
|
|
15
15
|
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
16
19
|
"scripts": {
|
|
17
20
|
"build": "tsc",
|
|
18
21
|
"clean": "rm -rf dist"
|