vatts 1.1.3 → 1.1.4-alpha.2
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/builder.js +6 -3
- package/dist/client/image/Image.js +1 -0
- package/package.json +1 -1
package/dist/builder.js
CHANGED
|
@@ -186,8 +186,9 @@ const customPostCssPlugin = (isProduction) => {
|
|
|
186
186
|
});
|
|
187
187
|
// Lógica unificada: Usa arquivo externo tanto em Dev quanto Prod.
|
|
188
188
|
// Isso libera a memória que seria usada para stringificar o CSS dentro do JS.
|
|
189
|
+
// FIX: O Rollup pode retornar um objeto URL ao invés de string. String() força a conversão.
|
|
189
190
|
return `
|
|
190
|
-
const cssUrl = import.meta.ROLLUP_FILE_URL_${referenceId};
|
|
191
|
+
const cssUrl = String(import.meta.ROLLUP_FILE_URL_${referenceId});
|
|
191
192
|
if (typeof document !== 'undefined') {
|
|
192
193
|
const link = document.createElement('link');
|
|
193
194
|
link.rel = 'stylesheet';
|
|
@@ -256,8 +257,9 @@ const smartAssetPlugin = (isProduction) => {
|
|
|
256
257
|
});
|
|
257
258
|
const content = buffer.toString('utf8');
|
|
258
259
|
buffer = null; // GC Hint
|
|
260
|
+
// FIX: O Rollup pode retornar um objeto URL. String() resolve o erro de startsWith.
|
|
259
261
|
return `
|
|
260
|
-
export default import.meta.ROLLUP_FILE_URL_${referenceId};
|
|
262
|
+
export default String(import.meta.ROLLUP_FILE_URL_${referenceId});
|
|
261
263
|
export const svgContent = ${JSON.stringify(content)};
|
|
262
264
|
`;
|
|
263
265
|
}
|
|
@@ -278,7 +280,8 @@ const smartAssetPlugin = (isProduction) => {
|
|
|
278
280
|
source: buffer
|
|
279
281
|
});
|
|
280
282
|
buffer = null; // Libera memória
|
|
281
|
-
|
|
283
|
+
// FIX: O Rollup pode retornar um objeto URL. String() resolve o erro de startsWith.
|
|
284
|
+
return `export default String(import.meta.ROLLUP_FILE_URL_${referenceId});`;
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
287
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const Image = ({ src, width, height, quality = 75, priority = false, className, style, alt = "", ...props }) => {
|
|
5
|
+
console.log("Imagem: ", src);
|
|
5
6
|
// Se a imagem for Base64 (pequena) ou externa (http), não otimizamos via backend local
|
|
6
7
|
const isOptimizable = src && !src.startsWith('data:') && !src.startsWith('http');
|
|
7
8
|
let optimizedSrc = src;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vatts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4-alpha.2",
|
|
4
4
|
"description": "Vatts.js is a high-level framework for building web applications with ease and speed. It provides a robust set of tools and features to streamline development and enhance productivity.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"author": "itsmuzin",
|