vatts 2.2.6 → 2.3.0-canary.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.
- package/LICENSE +12 -12
- package/README.md +65 -65
- package/dist/builder.js +79 -42
- package/dist/frameworks/FrontCore.d.ts +34 -0
- package/dist/frameworks/FrontCore.js +128 -0
- package/dist/{vue → frameworks/builds}/vue.build.js +1 -1
- package/dist/frameworks/react/client.d.ts +8 -0
- package/dist/{react → frameworks/react}/client.js +14 -14
- package/dist/{react → frameworks/react/components}/Link.js +2 -2
- package/dist/frameworks/react/entry.client.d.ts +14 -0
- package/dist/frameworks/react/entry.client.js +211 -0
- package/dist/frameworks/react/react-elements.d.ts +10 -0
- package/dist/{react → frameworks/renderers}/renderer-react.d.ts +2 -2
- package/dist/{react → frameworks/renderers}/renderer-react.js +53 -86
- package/dist/{vue → frameworks/renderers}/renderer.vue.d.ts +2 -2
- package/dist/frameworks/renderers/renderer.vue.js +193 -0
- package/dist/frameworks/themes/BuildingPage.d.ts +1 -0
- package/dist/frameworks/themes/BuildingPage.js +312 -0
- package/dist/frameworks/themes/DefaultNotFound.d.ts +1 -0
- package/dist/frameworks/themes/DefaultNotFound.js +330 -0
- package/dist/frameworks/themes/ErrorModal.d.ts +1 -0
- package/dist/frameworks/themes/ErrorModal.js +345 -0
- package/dist/frameworks/themes/ServerError.d.ts +1 -0
- package/dist/frameworks/themes/ServerError.js +401 -0
- package/dist/frameworks/themes/VattsDevBadge.d.ts +1 -0
- package/dist/frameworks/themes/VattsDevBadge.js +232 -0
- package/dist/frameworks/vue/App.vue +149 -0
- package/dist/frameworks/vue/client.d.ts +9 -0
- package/dist/{vue → frameworks/vue}/client.js +13 -11
- package/dist/{vue → frameworks/vue/components}/Link.vue +38 -38
- package/dist/{vue → frameworks/vue/components}/image/Image.vue +128 -128
- package/dist/frameworks/vue/entry.client.js +75 -0
- package/dist/global/global.d.ts +179 -180
- package/dist/hotReload.js +77 -77
- package/dist/index.js +12 -1
- package/dist/loaders.js +15 -15
- package/dist/renderer.js +2 -2
- package/dist/renderers/common.js +3 -3
- package/dist/utils/core-go.js +2 -2
- package/dist/utils/utils.js +5 -5
- package/package.json +10 -26
- package/dist/react/BuildingPage.d.ts +0 -2
- package/dist/react/BuildingPage.js +0 -270
- package/dist/react/DefaultNotFound.d.ts +0 -2
- package/dist/react/DefaultNotFound.js +0 -248
- package/dist/react/DevIndicator.d.ts +0 -5
- package/dist/react/DevIndicator.js +0 -203
- package/dist/react/ErrorModal.d.ts +0 -20
- package/dist/react/ErrorModal.js +0 -266
- package/dist/react/client.d.ts +0 -8
- package/dist/react/entry.client.d.ts +0 -6
- package/dist/react/entry.client.js +0 -325
- package/dist/react/server-error.d.ts +0 -8
- package/dist/react/server-error.js +0 -346
- package/dist/vue/App.vue +0 -199
- package/dist/vue/BuildingPage.vue +0 -281
- package/dist/vue/DefaultNotFound.vue +0 -329
- package/dist/vue/DevIndicator.vue +0 -226
- package/dist/vue/ErrorModal.vue +0 -317
- package/dist/vue/client.d.ts +0 -9
- package/dist/vue/entry.client.js +0 -110
- package/dist/vue/renderer.vue.js +0 -387
- package/dist/vue/server-error.vue +0 -351
- /package/dist/{react → frameworks/builds}/react.build.d.ts +0 -0
- /package/dist/{react → frameworks/builds}/react.build.js +0 -0
- /package/dist/{vue → frameworks/builds}/vue.build.d.ts +0 -0
- /package/dist/{react → frameworks/react/components}/Link.d.ts +0 -0
- /package/dist/{react → frameworks/react/components}/image/Image.d.ts +0 -0
- /package/dist/{react → frameworks/react/components}/image/Image.js +0 -0
- /package/dist/{vue → frameworks/vue}/entry.client.d.ts +0 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.renderVue = renderVue;
|
|
40
|
+
const router_ts_1 = require("../../router.js");
|
|
41
|
+
const fs_1 = __importDefault(require("fs"));
|
|
42
|
+
const path_1 = __importDefault(require("path"));
|
|
43
|
+
const common_ts_1 = require("../../renderers/common.js");
|
|
44
|
+
const vue = __importStar(require("vue"));
|
|
45
|
+
const vueServerRenderer = __importStar(require("@vue/server-renderer"));
|
|
46
|
+
// Importa os geradores de HTML Vanilla
|
|
47
|
+
const BuildingPage_1 = require("../themes/BuildingPage");
|
|
48
|
+
const ServerError_1 = require("../themes/ServerError");
|
|
49
|
+
function buildVueShellDocument(options) {
|
|
50
|
+
const { lang, title, metaTagsHtml, scriptPreloadsHtml, componentPreloadsHtml, stylesHtml, obfuscatedData, scriptsHtml, hotReloadScript, bodyInnerHtml, } = options;
|
|
51
|
+
return `<!DOCTYPE html>
|
|
52
|
+
<html lang="${lang}">
|
|
53
|
+
<head>
|
|
54
|
+
<meta charset="utf-8" />
|
|
55
|
+
<title>${title}</title>
|
|
56
|
+
${metaTagsHtml}
|
|
57
|
+
${scriptPreloadsHtml}
|
|
58
|
+
${componentPreloadsHtml}
|
|
59
|
+
${stylesHtml}
|
|
60
|
+
</head>
|
|
61
|
+
<body>
|
|
62
|
+
<script id="__vatts_data__" type="text/plain" data-h="${obfuscatedData}"></script>
|
|
63
|
+
<div id="root">${bodyInnerHtml || ''}</div>
|
|
64
|
+
${scriptsHtml}
|
|
65
|
+
${hotReloadScript ? `<div style="display:none">${hotReloadScript}</div>` : ''}
|
|
66
|
+
</body>
|
|
67
|
+
</html>`;
|
|
68
|
+
}
|
|
69
|
+
function ensureVueComponent(existingComponent, componentPath) {
|
|
70
|
+
let component = existingComponent;
|
|
71
|
+
if (!component && componentPath) {
|
|
72
|
+
try {
|
|
73
|
+
const module = require(componentPath);
|
|
74
|
+
component = module.default || module;
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (!component)
|
|
81
|
+
return null;
|
|
82
|
+
if (typeof component === 'object' && !component.render && !component.ssrRender && componentPath && componentPath.endsWith('.vue')) {
|
|
83
|
+
try {
|
|
84
|
+
const sfc = require('vue/compiler-sfc');
|
|
85
|
+
const esbuild = require('esbuild');
|
|
86
|
+
const source = fs_1.default.readFileSync(componentPath, 'utf8');
|
|
87
|
+
const { descriptor } = sfc.parse(source, { filename: componentPath });
|
|
88
|
+
if (descriptor.template) {
|
|
89
|
+
const templateResult = sfc.compileTemplate({
|
|
90
|
+
source: descriptor.template.content,
|
|
91
|
+
filename: componentPath,
|
|
92
|
+
id: componentPath,
|
|
93
|
+
ssr: true
|
|
94
|
+
});
|
|
95
|
+
if (templateResult.code) {
|
|
96
|
+
const transformed = esbuild.transformSync(templateResult.code, { loader: 'js', format: 'cjs', target: 'node16' });
|
|
97
|
+
const mod = { exports: {} };
|
|
98
|
+
const runModule = new Function('module', 'exports', 'require', transformed.code);
|
|
99
|
+
runModule(mod, mod.exports, require);
|
|
100
|
+
if (mod.exports.ssrRender)
|
|
101
|
+
component.ssrRender = mod.exports.ssrRender;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (e) {
|
|
106
|
+
console.warn(`Failed to compile ${componentPath}:`, e);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return component;
|
|
110
|
+
}
|
|
111
|
+
async function renderVue({ req, res, route, params, allRoutes }) {
|
|
112
|
+
(0, common_ts_1.polyfillBrowserEnv)();
|
|
113
|
+
const { createSSRApp, h } = vue;
|
|
114
|
+
const { renderToString } = vueServerRenderer;
|
|
115
|
+
const { generateMetadata } = route;
|
|
116
|
+
const isProduction = !req.hwebDev;
|
|
117
|
+
const hotReloadManager = req.hotReloadManager;
|
|
118
|
+
let assets = null;
|
|
119
|
+
let metadata = { title: 'Vatts App' };
|
|
120
|
+
let layoutInfo = null;
|
|
121
|
+
try {
|
|
122
|
+
assets = (0, common_ts_1.getBuildAssets)();
|
|
123
|
+
// 1. Loading Screen (Vanilla)
|
|
124
|
+
if (!assets || assets.scripts.length === 0) {
|
|
125
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
126
|
+
res.end((0, BuildingPage_1.getBuildingScreenHtml)());
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
// 2. Setup (Layout/Metadata)
|
|
130
|
+
layoutInfo = (0, router_ts_1.getLayout)();
|
|
131
|
+
let LayoutComponent = null;
|
|
132
|
+
if (layoutInfo) {
|
|
133
|
+
LayoutComponent = ensureVueComponent(null, path_1.default.resolve(process.cwd(), layoutInfo.componentPath));
|
|
134
|
+
}
|
|
135
|
+
if (layoutInfo?.metadata)
|
|
136
|
+
metadata = { ...metadata, ...layoutInfo.metadata };
|
|
137
|
+
if (generateMetadata) {
|
|
138
|
+
const routeMetadata = await Promise.resolve(generateMetadata(params, req));
|
|
139
|
+
metadata = { ...metadata, ...routeMetadata };
|
|
140
|
+
}
|
|
141
|
+
const results = await Promise.all(allRoutes.map(async (r) => {
|
|
142
|
+
let routeMeta = r.generateMetadata ? await Promise.resolve(r.generateMetadata(params, req)) : {};
|
|
143
|
+
return { pattern: r.pattern, componentPath: r.componentPath, metadata: { ...routeMeta, title: routeMeta.title || layoutInfo?.metadata.title || 'Vatts App' } };
|
|
144
|
+
}));
|
|
145
|
+
const obfuscatedData = (0, common_ts_1.obfuscateData)({ routes: results, initialComponentPath: route.componentPath, initialParams: params });
|
|
146
|
+
const hotReloadScript = !isProduction && hotReloadManager ? hotReloadManager.getClientScript() : '';
|
|
147
|
+
const metaTagsHtml = (0, common_ts_1.generateMetaTags)(metadata);
|
|
148
|
+
const htmlLang = metadata.language || 'pt-BR';
|
|
149
|
+
const stylesHtml = assets.styles.map(s => `<link rel="stylesheet" href="${s}">`).join('\n');
|
|
150
|
+
const scriptsHtml = assets.scripts.map(s => `<script type="module" src="${s}"></script>`).join('\n');
|
|
151
|
+
let PageComponent = ensureVueComponent(route.component, route.componentPath ? path_1.default.resolve(process.cwd(), route.componentPath) : '');
|
|
152
|
+
const RootComponent = {
|
|
153
|
+
setup() {
|
|
154
|
+
return () => {
|
|
155
|
+
const pageNode = PageComponent ? h(PageComponent, { params }) : h('div', 'Page not found');
|
|
156
|
+
return LayoutComponent ? h(LayoutComponent, null, { default: () => pageNode }) : pageNode;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
const app = createSSRApp(RootComponent);
|
|
161
|
+
const bodyInnerHtml = await renderToString(app);
|
|
162
|
+
res.statusCode = 200;
|
|
163
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
164
|
+
res.end(buildVueShellDocument({
|
|
165
|
+
lang: htmlLang,
|
|
166
|
+
title: metadata.title || 'Vatts.js',
|
|
167
|
+
metaTagsHtml,
|
|
168
|
+
scriptPreloadsHtml: assets.scripts.map(s => `<link rel="modulepreload" href="${s}">`).join('\n'),
|
|
169
|
+
componentPreloadsHtml: (0, common_ts_1.extractComponentPreloads)(route.componentPath ? path_1.default.resolve(process.cwd(), route.componentPath) : '').join('\n'),
|
|
170
|
+
stylesHtml,
|
|
171
|
+
obfuscatedData,
|
|
172
|
+
scriptsHtml,
|
|
173
|
+
hotReloadScript,
|
|
174
|
+
bodyInnerHtml,
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
catch (err) {
|
|
178
|
+
if (!isProduction)
|
|
179
|
+
console.error("Critical Vue Render Error:", err);
|
|
180
|
+
// Fallback para o ServerError Vanilla
|
|
181
|
+
res.statusCode = 500;
|
|
182
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
183
|
+
let errorHtml = (0, ServerError_1.getServerErrorHtml)({
|
|
184
|
+
error: err,
|
|
185
|
+
title: 'Critical SSR Render Error',
|
|
186
|
+
requestUrl: (0, common_ts_1.getRequestUrl)(req)
|
|
187
|
+
});
|
|
188
|
+
if (!isProduction && hotReloadManager) {
|
|
189
|
+
errorHtml = errorHtml.replace('</body>', `<div style="display:none">${hotReloadManager.getClientScript()}</div></body>`);
|
|
190
|
+
}
|
|
191
|
+
res.end(errorHtml);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getBuildingScreenHtml(): string;
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This file is part of the Vatts.js Project.
|
|
4
|
+
* Copyright (c) 2026 mfraz
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
const fs = require('fs');
|
|
19
|
+
const path = require('path');
|
|
20
|
+
function getBuildingScreenHtml() {
|
|
21
|
+
let version = "1.0.0";
|
|
22
|
+
try {
|
|
23
|
+
// 1. Acha o arquivo principal do pacote (ex: dist/index.js)
|
|
24
|
+
const mainFilePath = require.resolve('vatts');
|
|
25
|
+
let packageRoot = path.dirname(mainFilePath);
|
|
26
|
+
// 2. Sobe as pastas até encontrar o diretório que realmente contém o package.json
|
|
27
|
+
while (packageRoot && !fs.existsSync(path.join(packageRoot, 'package.json'))) {
|
|
28
|
+
const parentDir = path.dirname(packageRoot);
|
|
29
|
+
if (parentDir === packageRoot)
|
|
30
|
+
break; // Evita loop infinito na raiz do sistema
|
|
31
|
+
packageRoot = parentDir;
|
|
32
|
+
}
|
|
33
|
+
// 3. Monta o caminho correto e lê a versão
|
|
34
|
+
const pkgPath = path.join(packageRoot, 'package.json');
|
|
35
|
+
version = JSON.parse(fs.readFileSync(pkgPath, 'utf8')).version;
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.error(e);
|
|
39
|
+
}
|
|
40
|
+
return `
|
|
41
|
+
<!DOCTYPE html>
|
|
42
|
+
<html lang="en">
|
|
43
|
+
<head>
|
|
44
|
+
<meta charset="UTF-8" />
|
|
45
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
46
|
+
<title>Vatts.js | Building...</title>
|
|
47
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
48
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
49
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800;900&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
50
|
+
<style>
|
|
51
|
+
:root {
|
|
52
|
+
--bg-base-start: #050507;
|
|
53
|
+
--bg-base-end: #09090b;
|
|
54
|
+
|
|
55
|
+
--bg-card: #0a0a0c;
|
|
56
|
+
--bg-terminal: #050505;
|
|
57
|
+
|
|
58
|
+
--text-main: #ffffff;
|
|
59
|
+
--text-dim: #71717a;
|
|
60
|
+
|
|
61
|
+
--color-terciary: #6366f1;
|
|
62
|
+
--color-secondary: #0ea5e9;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
body {
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0;
|
|
68
|
+
width: 100vw;
|
|
69
|
+
height: 100vh;
|
|
70
|
+
background-color: var(--bg-base-start);
|
|
71
|
+
background-image: linear-gradient(135deg, var(--bg-base-start), var(--bg-base-end));
|
|
72
|
+
font-family: 'Inter', system-ui, sans-serif;
|
|
73
|
+
color: var(--text-main);
|
|
74
|
+
display: flex;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
align-items: center;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.container {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
align-items: center;
|
|
84
|
+
width: 100%;
|
|
85
|
+
z-index: 2;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* LAYOUT DEITADO COM A BORDA FAKE DE 3PX */
|
|
89
|
+
.card-wrapper {
|
|
90
|
+
width: min(90%, 540px);
|
|
91
|
+
padding: 3px;
|
|
92
|
+
border-radius: 16px;
|
|
93
|
+
background: linear-gradient(135deg, rgb(24, 24, 27), rgb(39, 39, 42), transparent);
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.card {
|
|
98
|
+
background-color: var(--bg-card);
|
|
99
|
+
border-radius: 13px;
|
|
100
|
+
padding: 32px 40px;
|
|
101
|
+
width: 100%;
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
gap: 24px;
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
border: none;
|
|
107
|
+
box-shadow: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.content {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
gap: 32px;
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.left-side {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: 12px;
|
|
123
|
+
min-width: 120px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.left-side img {
|
|
127
|
+
width: 56px;
|
|
128
|
+
height: 56px;
|
|
129
|
+
object-fit: contain;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.title-wrap {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
align-items: center;
|
|
136
|
+
gap: 2px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
h1 {
|
|
140
|
+
margin: 0;
|
|
141
|
+
font-size: 1.6rem;
|
|
142
|
+
font-weight: 800;
|
|
143
|
+
letter-spacing: -0.04em;
|
|
144
|
+
background: linear-gradient(to right, #fff, var(--text-dim));
|
|
145
|
+
-webkit-background-clip: text;
|
|
146
|
+
-webkit-text-fill-color: transparent;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.version {
|
|
150
|
+
color: var(--text-dim);
|
|
151
|
+
font-size: 0.8rem;
|
|
152
|
+
font-weight: 500;
|
|
153
|
+
letter-spacing: 0.05em;
|
|
154
|
+
font-family: 'JetBrains Mono', monospace;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.right-side {
|
|
158
|
+
flex: 1;
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.terminal {
|
|
164
|
+
background-color: var(--bg-terminal);
|
|
165
|
+
border-radius: 8px;
|
|
166
|
+
padding: 20px;
|
|
167
|
+
display: flex;
|
|
168
|
+
flex-direction: column;
|
|
169
|
+
gap: 12px;
|
|
170
|
+
font-family: 'JetBrains Mono', monospace;
|
|
171
|
+
font-size: 0.8rem;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.term-line {
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: 12px;
|
|
179
|
+
color: var(--text-dim);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.term-line.active {
|
|
183
|
+
color: var(--text-main);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.spinner {
|
|
187
|
+
width: 12px;
|
|
188
|
+
height: 12px;
|
|
189
|
+
border: 2px solid var(--text-dim);
|
|
190
|
+
border-top-color: var(--color-secondary);
|
|
191
|
+
border-radius: 50%;
|
|
192
|
+
animation: spin 0.8s linear infinite;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.check {
|
|
196
|
+
color: var(--color-secondary);
|
|
197
|
+
font-size: 13px;
|
|
198
|
+
margin-left: 1px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.file-name {
|
|
202
|
+
color: var(--color-terciary);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.footer {
|
|
206
|
+
display: flex;
|
|
207
|
+
justify-content: space-between;
|
|
208
|
+
align-items: center;
|
|
209
|
+
font-size: 0.75rem;
|
|
210
|
+
color: var(--text-dim);
|
|
211
|
+
font-weight: 500;
|
|
212
|
+
width: 100%;
|
|
213
|
+
border-top: 1px solid rgba(255, 255, 255, 0.02);
|
|
214
|
+
padding-top: 16px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.pulse-wrap {
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
gap: 8px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.pulse-dot {
|
|
224
|
+
width: 6px;
|
|
225
|
+
height: 6px;
|
|
226
|
+
background-color: var(--color-secondary);
|
|
227
|
+
border-radius: 50%;
|
|
228
|
+
animation: pulse 2s infinite;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@keyframes spin {
|
|
232
|
+
to { transform: rotate(360deg); }
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@keyframes pulse {
|
|
236
|
+
0% { opacity: 1; transform: scale(1); }
|
|
237
|
+
50% { opacity: 0.4; transform: scale(0.8); }
|
|
238
|
+
100% { opacity: 1; transform: scale(1); }
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.brand-link {
|
|
242
|
+
margin-top: 40px;
|
|
243
|
+
display: flex;
|
|
244
|
+
align-items: center;
|
|
245
|
+
gap: 10px;
|
|
246
|
+
opacity: 0.5;
|
|
247
|
+
transition: opacity 0.3s ease;
|
|
248
|
+
text-decoration: none;
|
|
249
|
+
color: var(--text-main);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.brand-link:hover {
|
|
253
|
+
opacity: 1;
|
|
254
|
+
}
|
|
255
|
+
</style>
|
|
256
|
+
</head>
|
|
257
|
+
<body>
|
|
258
|
+
<div class="container">
|
|
259
|
+
<div class="card-wrapper">
|
|
260
|
+
<div class="card">
|
|
261
|
+
<div class="content">
|
|
262
|
+
<div class="left-side">
|
|
263
|
+
<img src="https://raw.githubusercontent.com/murillo-frazao-cunha/vatts-docs/master/public/logo.png" alt="Vatts.js Logo" />
|
|
264
|
+
<div class="title-wrap">
|
|
265
|
+
<h1>Vatts.js</h1>
|
|
266
|
+
<span class="version">v${version}</span>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<div class="right-side">
|
|
271
|
+
<div class="terminal">
|
|
272
|
+
<div class="term-line">
|
|
273
|
+
<span class="check">✓</span>
|
|
274
|
+
<span>Initializing environment</span>
|
|
275
|
+
</div>
|
|
276
|
+
<div class="term-line active">
|
|
277
|
+
<div class="spinner"></div>
|
|
278
|
+
<span>Compiling <span class="file-name">src/vatts.ts</span></span>
|
|
279
|
+
</div>
|
|
280
|
+
<div class="term-line" style="opacity: 0.4;">
|
|
281
|
+
<span style="width: 12px; text-align: center;">-</span>
|
|
282
|
+
<span>Optimizing assets</span>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<div class="footer">
|
|
289
|
+
<div class="pulse-wrap">
|
|
290
|
+
<div class="pulse-dot"></div>
|
|
291
|
+
<span>Building your application...</span>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
|
|
297
|
+
<a href="https://npmjs.com/package/vatts" target="_blank" rel="noopener noreferrer" class="brand-link">
|
|
298
|
+
<img src="https://raw.githubusercontent.com/murillo-frazao-cunha/vatts-docs/master/public/logo.png" alt="Vatts Logo" style="width: 24px; height: 24px;" />
|
|
299
|
+
<span style="font-size: 14px; font-weight: 600; letter-spacing: 0.02em;">Vatts.js</span>
|
|
300
|
+
</a>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<script>
|
|
304
|
+
setTimeout(() => {
|
|
305
|
+
window.location.reload();
|
|
306
|
+
}, 2500);
|
|
307
|
+
</script>
|
|
308
|
+
</body>
|
|
309
|
+
</html>
|
|
310
|
+
`;
|
|
311
|
+
}
|
|
312
|
+
module.exports = { getBuildingScreenHtml };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getDefaultNotFound(): string;
|