cloudcommerce 0.1.4 → 0.1.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/CHANGELOG.md +25 -0
- package/ecomplus-stores/monocard/functions/core/package.json +1 -1
- package/ecomplus-stores/monocard/functions/events/package.json +2 -2
- package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
- package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +6 -9
- package/ecomplus-stores/monocard/package.json +1 -1
- package/ecomplus-stores/tia-sonia/functions/core/package.json +1 -1
- package/ecomplus-stores/tia-sonia/functions/events/package.json +2 -2
- package/ecomplus-stores/tia-sonia/functions/modules/package.json +2 -2
- package/ecomplus-stores/tia-sonia/functions/passport/package.json +2 -2
- package/ecomplus-stores/tia-sonia/functions/ssr/package.json +6 -9
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/acai-com-granola.jpg +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/cafe-com-tapioca-e-aveia.jpg +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/PitchBar.vue +65 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/TheHeader.vue +1 -1
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/Base.astro +0 -3
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/Pages.astro +20 -11
- package/ecomplus-stores/tia-sonia/functions/ssr/src/main/Home.astro +33 -14
- package/ecomplus-stores/tia-sonia/functions/ssr/tailwind.config.cjs +11 -5
- package/ecomplus-stores/tia-sonia/functions/ssr/uno.config.cjs +2 -3
- package/ecomplus-stores/tia-sonia/package.json +1 -1
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/CHANGELOG.md +1 -0
- package/packages/apps/fb-conversions/README.md +1 -0
- package/packages/apps/fb-conversions/lib/fb-conversions-events.js +145 -0
- package/packages/apps/fb-conversions/lib/fb-conversions-events.js.map +1 -0
- package/packages/apps/fb-conversions/lib/index.js +2 -0
- package/packages/apps/fb-conversions/lib/index.js.map +1 -0
- package/packages/apps/fb-conversions/package.json +33 -0
- package/packages/apps/fb-conversions/src/fb-conversions-events.ts +178 -0
- package/packages/apps/fb-conversions/src/index.ts +1 -0
- package/packages/apps/fb-conversions/tsconfig.json +3 -0
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/infinitepay/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/events/lib/firebase.js +2 -0
- package/packages/events/lib/firebase.js.map +1 -1
- package/packages/events/package.json +2 -1
- package/packages/events/src/firebase.ts +2 -0
- package/packages/firebase/lib/config.d.ts +4 -0
- package/packages/firebase/lib/config.js +7 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/config.ts +7 -0
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +3 -1
- package/packages/storefront/astro.config.mjs +3 -1
- package/packages/storefront/dist/client/{Prices.d79bd862.js → Prices.6c44a513.js} +1 -1
- package/packages/storefront/dist/client/{ProductCard.6b27d9fa.js → ProductCard.69bba7fc.js} +1 -1
- package/packages/storefront/dist/client/assets/{_...slug_.4dbd1d47.css → _...slug_.15bda576.css} +1 -1
- package/packages/storefront/dist/client/chunks/Prices.vue_vue_type_script_setup_true_lang.e4525076.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/entry.mjs +52 -166
- package/packages/storefront/package.json +3 -4
- package/packages/storefront/src/lib/components/Prices.vue +1 -1
- package/packages/storefront/tailwind.config.cjs +18 -14
- package/packages/storefront/uno.config.cjs +22 -21
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/monocard/functions/ssr/.nvmrc +0 -1
- package/ecomplus-stores/tia-sonia/functions/ssr/.nvmrc +0 -1
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/TopBar.vue +0 -133
- package/packages/storefront/.nvmrc +0 -1
- package/packages/storefront/dist/client/chunks/Prices.vue_vue_type_script_setup_true_lang.b29421b3.js +0 -1
- package/packages/storefront/dist/server/chunks/avif/avif_node_dec.wasm +0 -0
- package/packages/storefront/dist/server/chunks/avif/avif_node_enc.wasm +0 -0
- package/packages/storefront/dist/server/chunks/image-pool.abfa6f7b.mjs +0 -10794
- package/packages/storefront/dist/server/chunks/mozjpeg/mozjpeg_node_dec.wasm +0 -0
- package/packages/storefront/dist/server/chunks/mozjpeg/mozjpeg_node_enc.wasm +0 -0
- package/packages/storefront/dist/server/chunks/png/squoosh_oxipng_bg.wasm +0 -0
- package/packages/storefront/dist/server/chunks/png/squoosh_png_bg.wasm +0 -0
- package/packages/storefront/dist/server/chunks/resize/squoosh_resize_bg.wasm +0 -0
- package/packages/storefront/dist/server/chunks/rotate/rotate.wasm +0 -0
- package/packages/storefront/dist/server/chunks/webp/webp_node_dec.wasm +0 -0
- package/packages/storefront/dist/server/chunks/webp/webp_node_enc.wasm +0 -0
|
@@ -7,7 +7,7 @@ import fs from 'fs';
|
|
|
7
7
|
import mime from 'mime';
|
|
8
8
|
import { serialize as serialize$1, parse } from 'cookie';
|
|
9
9
|
import { escape } from 'html-escaper';
|
|
10
|
-
import { bold, yellow, dim, cyan, red, reset
|
|
10
|
+
import { bold, yellow, dim, cyan, red, reset } from 'kleur/colors';
|
|
11
11
|
import 'string-width';
|
|
12
12
|
import npath from 'path-browserify';
|
|
13
13
|
import { Readable } from 'stream';
|
|
@@ -19,14 +19,15 @@ import send from 'send';
|
|
|
19
19
|
import { defineComponent, computed, unref, useSSRContext, h as h$2, createSSRApp, mergeProps, createVNode as createVNode$1, resolveDynamicComponent, withCtx, createTextVNode, toDisplayString, toRefs, ref, watch, toRef, defineAsyncComponent, renderSlot as renderSlot$1, openBlock, createBlock, Fragment as Fragment$1, createCommentVNode, renderList, reactive, resolveComponent } from 'vue';
|
|
20
20
|
import { ssrRenderSlotInner, renderToString as renderToString$1, ssrRenderAttrs, ssrRenderSlot, ssrRenderVNode, ssrInterpolate, ssrRenderList, ssrRenderAttr, ssrRenderComponent, ssrRenderClass, ssrIncludeBooleanAttr } from 'vue/server-renderer';
|
|
21
21
|
import { i18n, formatMoney, img, price, onPromotion } from '@ecomplus/utils';
|
|
22
|
-
/* empty css */import
|
|
23
|
-
import fs$1 from 'node:fs/promises';
|
|
24
|
-
import { fileURLToPath as fileURLToPath$1 } from 'node:url';
|
|
22
|
+
/* empty css */import sharp$1 from 'sharp';
|
|
25
23
|
import api from '@cloudcommerce/api';
|
|
26
24
|
import config from '@cloudcommerce/config';
|
|
25
|
+
import sizeOf from 'image-size';
|
|
27
26
|
import 'http-cache-semantics';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
28
|
import 'node:os';
|
|
29
29
|
import 'node:path';
|
|
30
|
+
import 'node:url';
|
|
30
31
|
import 'magic-string';
|
|
31
32
|
import 'slash';
|
|
32
33
|
/* empty css *//* empty css */import { compile } from 'path-to-regexp';
|
|
@@ -9434,19 +9435,19 @@ function spreadAttributes(values, _name, { class: scopedClassName } = {}) {
|
|
|
9434
9435
|
return markHTMLString(output);
|
|
9435
9436
|
}
|
|
9436
9437
|
|
|
9437
|
-
const dateTimeFormat
|
|
9438
|
+
const dateTimeFormat = new Intl.DateTimeFormat([], {
|
|
9438
9439
|
hour: "2-digit",
|
|
9439
9440
|
minute: "2-digit",
|
|
9440
9441
|
second: "2-digit"
|
|
9441
9442
|
});
|
|
9442
|
-
const levels
|
|
9443
|
+
const levels = {
|
|
9443
9444
|
debug: 20,
|
|
9444
9445
|
info: 30,
|
|
9445
9446
|
warn: 40,
|
|
9446
9447
|
error: 50,
|
|
9447
9448
|
silent: 90
|
|
9448
9449
|
};
|
|
9449
|
-
function log
|
|
9450
|
+
function log(opts, level, type, message) {
|
|
9450
9451
|
const logLevel = opts.level;
|
|
9451
9452
|
const dest = opts.dest;
|
|
9452
9453
|
const event = {
|
|
@@ -9454,16 +9455,16 @@ function log$1(opts, level, type, message) {
|
|
|
9454
9455
|
level,
|
|
9455
9456
|
message
|
|
9456
9457
|
};
|
|
9457
|
-
if (levels
|
|
9458
|
+
if (levels[logLevel] > levels[level]) {
|
|
9458
9459
|
return;
|
|
9459
9460
|
}
|
|
9460
9461
|
dest.write(event);
|
|
9461
9462
|
}
|
|
9462
9463
|
function warn(opts, type, message) {
|
|
9463
|
-
return log
|
|
9464
|
+
return log(opts, "warn", type, message);
|
|
9464
9465
|
}
|
|
9465
|
-
function error
|
|
9466
|
-
return log
|
|
9466
|
+
function error(opts, type, message) {
|
|
9467
|
+
return log(opts, "error", type, message);
|
|
9467
9468
|
}
|
|
9468
9469
|
function debug(...args) {
|
|
9469
9470
|
if ("_astroGlobalDebug" in globalThis) {
|
|
@@ -10138,14 +10139,14 @@ let lastMessageCount = 1;
|
|
|
10138
10139
|
const consoleLogDestination = {
|
|
10139
10140
|
write(event) {
|
|
10140
10141
|
let dest = console.error;
|
|
10141
|
-
if (levels
|
|
10142
|
+
if (levels[event.level] < levels["error"]) {
|
|
10142
10143
|
dest = console.log;
|
|
10143
10144
|
}
|
|
10144
10145
|
function getPrefix() {
|
|
10145
10146
|
let prefix = "";
|
|
10146
10147
|
let type = event.type;
|
|
10147
10148
|
if (type) {
|
|
10148
|
-
prefix += dim(dateTimeFormat
|
|
10149
|
+
prefix += dim(dateTimeFormat.format(new Date()) + " ");
|
|
10149
10150
|
if (event.level === "info") {
|
|
10150
10151
|
type = bold(cyan(`[${type}]`));
|
|
10151
10152
|
} else if (event.level === "warn") {
|
|
@@ -10442,7 +10443,7 @@ renderPage_fn = async function(request, routeData, mod, status = 200) {
|
|
|
10442
10443
|
const response = await renderPage(mod, ctx, __privateGet(this, _env));
|
|
10443
10444
|
return response;
|
|
10444
10445
|
} catch (err) {
|
|
10445
|
-
error
|
|
10446
|
+
error(__privateGet(this, _logging), "ssr", err.stack || err.message || String(err));
|
|
10446
10447
|
return new Response(null, {
|
|
10447
10448
|
status: 500,
|
|
10448
10449
|
statusText: "Internal server error"
|
|
@@ -11063,70 +11064,12 @@ var server_default = {
|
|
|
11063
11064
|
renderToStaticMarkup
|
|
11064
11065
|
};
|
|
11065
11066
|
|
|
11066
|
-
const PREFIX = "@astrojs/image";
|
|
11067
|
-
const dateTimeFormat = new Intl.DateTimeFormat([], {
|
|
11068
|
-
hour: "2-digit",
|
|
11069
|
-
minute: "2-digit",
|
|
11070
|
-
second: "2-digit"
|
|
11071
|
-
});
|
|
11072
|
-
const levels = {
|
|
11073
|
-
debug: 20,
|
|
11074
|
-
info: 30,
|
|
11075
|
-
warn: 40,
|
|
11076
|
-
error: 50,
|
|
11077
|
-
silent: 90
|
|
11078
|
-
};
|
|
11079
|
-
function getPrefix(level, timestamp) {
|
|
11080
|
-
let prefix = "";
|
|
11081
|
-
if (timestamp) {
|
|
11082
|
-
prefix += dim(dateTimeFormat.format(new Date()) + " ");
|
|
11083
|
-
}
|
|
11084
|
-
switch (level) {
|
|
11085
|
-
case "debug":
|
|
11086
|
-
prefix += bold(green(`[${PREFIX}] `));
|
|
11087
|
-
break;
|
|
11088
|
-
case "info":
|
|
11089
|
-
prefix += bold(cyan(`[${PREFIX}] `));
|
|
11090
|
-
break;
|
|
11091
|
-
case "warn":
|
|
11092
|
-
prefix += bold(yellow(`[${PREFIX}] `));
|
|
11093
|
-
break;
|
|
11094
|
-
case "error":
|
|
11095
|
-
prefix += bold(red(`[${PREFIX}] `));
|
|
11096
|
-
break;
|
|
11097
|
-
}
|
|
11098
|
-
return prefix;
|
|
11099
|
-
}
|
|
11100
|
-
const log = (_level, dest) => ({ message, level, prefix = true, timestamp = true }) => {
|
|
11101
|
-
if (levels[_level] >= levels[level]) {
|
|
11102
|
-
dest(`${prefix ? getPrefix(level, timestamp) : ""}${message}`);
|
|
11103
|
-
}
|
|
11104
|
-
};
|
|
11105
|
-
const error = log("error", console.error);
|
|
11106
|
-
|
|
11107
|
-
async function metadata(src, data) {
|
|
11108
|
-
const file = data || await fs$1.readFile(src);
|
|
11109
|
-
const { width, height, type, orientation } = await sizeOf(file);
|
|
11110
|
-
const isPortrait = (orientation || 0) >= 5;
|
|
11111
|
-
if (!width || !height || !type) {
|
|
11112
|
-
return void 0;
|
|
11113
|
-
}
|
|
11114
|
-
return {
|
|
11115
|
-
src: fileURLToPath$1(src),
|
|
11116
|
-
width: isPortrait ? height : width,
|
|
11117
|
-
height: isPortrait ? width : height,
|
|
11118
|
-
format: type,
|
|
11119
|
-
orientation
|
|
11120
|
-
};
|
|
11121
|
-
}
|
|
11122
|
-
|
|
11123
|
-
function isRemoteImage$1(src) {
|
|
11124
|
-
return /^(https?:)?\/\//.test(src);
|
|
11125
|
-
}
|
|
11126
|
-
|
|
11127
11067
|
function isOutputFormat(value) {
|
|
11128
11068
|
return ["avif", "jpeg", "jpg", "png", "webp"].includes(value);
|
|
11129
11069
|
}
|
|
11070
|
+
function isOutputFormatSupportsAlpha(value) {
|
|
11071
|
+
return ["avif", "png", "webp"].includes(value);
|
|
11072
|
+
}
|
|
11130
11073
|
function isAspectRatioString(value) {
|
|
11131
11074
|
return /^\d*:\d*$/.test(value);
|
|
11132
11075
|
}
|
|
@@ -11223,101 +11166,40 @@ class BaseSSRService {
|
|
|
11223
11166
|
}
|
|
11224
11167
|
}
|
|
11225
11168
|
|
|
11226
|
-
|
|
11227
|
-
class SquooshService extends BaseSSRService {
|
|
11228
|
-
async processAvif(image, transform) {
|
|
11229
|
-
const encodeOptions = transform.quality ? { avif: { quality: transform.quality } } : { avif: {} };
|
|
11230
|
-
await image.encode(encodeOptions);
|
|
11231
|
-
const data = await image.encodedWith.avif;
|
|
11232
|
-
return {
|
|
11233
|
-
data: data.binary,
|
|
11234
|
-
format: "avif"
|
|
11235
|
-
};
|
|
11236
|
-
}
|
|
11237
|
-
async processJpeg(image, transform) {
|
|
11238
|
-
const encodeOptions = transform.quality ? { mozjpeg: { quality: transform.quality } } : { mozjpeg: {} };
|
|
11239
|
-
await image.encode(encodeOptions);
|
|
11240
|
-
const data = await image.encodedWith.mozjpeg;
|
|
11241
|
-
return {
|
|
11242
|
-
data: data.binary,
|
|
11243
|
-
format: "jpeg"
|
|
11244
|
-
};
|
|
11245
|
-
}
|
|
11246
|
-
async processPng(image, transform) {
|
|
11247
|
-
await image.encode({ oxipng: {} });
|
|
11248
|
-
const data = await image.encodedWith.oxipng;
|
|
11249
|
-
return {
|
|
11250
|
-
data: data.binary,
|
|
11251
|
-
format: "png"
|
|
11252
|
-
};
|
|
11253
|
-
}
|
|
11254
|
-
async processWebp(image, transform) {
|
|
11255
|
-
const encodeOptions = transform.quality ? { webp: { quality: transform.quality } } : { webp: {} };
|
|
11256
|
-
await image.encode(encodeOptions);
|
|
11257
|
-
const data = await image.encodedWith.webp;
|
|
11258
|
-
return {
|
|
11259
|
-
data: data.binary,
|
|
11260
|
-
format: "webp"
|
|
11261
|
-
};
|
|
11262
|
-
}
|
|
11263
|
-
async autorotate(transform, inputBuffer) {
|
|
11264
|
-
try {
|
|
11265
|
-
const meta = await metadata(transform.src, inputBuffer);
|
|
11266
|
-
switch (meta == null ? void 0 : meta.orientation) {
|
|
11267
|
-
case 3:
|
|
11268
|
-
case 4:
|
|
11269
|
-
return { type: "rotate", numRotations: 2 };
|
|
11270
|
-
case 5:
|
|
11271
|
-
case 6:
|
|
11272
|
-
return { type: "rotate", numRotations: 1 };
|
|
11273
|
-
case 7:
|
|
11274
|
-
case 8:
|
|
11275
|
-
return { type: "rotate", numRotations: 3 };
|
|
11276
|
-
}
|
|
11277
|
-
} catch {
|
|
11278
|
-
}
|
|
11279
|
-
}
|
|
11169
|
+
class SharpService extends BaseSSRService {
|
|
11280
11170
|
async transform(inputBuffer, transform) {
|
|
11281
|
-
const
|
|
11282
|
-
|
|
11283
|
-
const autorotate = await this.autorotate(transform, inputBuffer);
|
|
11284
|
-
if (autorotate) {
|
|
11285
|
-
operations.push(autorotate);
|
|
11286
|
-
}
|
|
11287
|
-
} else if (transform.src.startsWith("//")) {
|
|
11288
|
-
transform.src = `https:${transform.src}`;
|
|
11289
|
-
}
|
|
11171
|
+
const sharpImage = sharp$1(inputBuffer, { failOnError: false, pages: -1 });
|
|
11172
|
+
sharpImage.rotate();
|
|
11290
11173
|
if (transform.width || transform.height) {
|
|
11291
11174
|
const width = transform.width && Math.round(transform.width);
|
|
11292
11175
|
const height = transform.height && Math.round(transform.height);
|
|
11293
|
-
|
|
11294
|
-
type: "resize",
|
|
11176
|
+
sharpImage.resize({
|
|
11295
11177
|
width,
|
|
11296
|
-
height
|
|
11178
|
+
height,
|
|
11179
|
+
fit: transform.fit,
|
|
11180
|
+
position: transform.position,
|
|
11181
|
+
background: transform.background
|
|
11297
11182
|
});
|
|
11298
11183
|
}
|
|
11299
|
-
if (
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
});
|
|
11305
|
-
throw new Error(`Unknown image output: "${transform.format}" used for ${transform.src}`);
|
|
11184
|
+
if (transform.format) {
|
|
11185
|
+
sharpImage.toFormat(transform.format, { quality: transform.quality });
|
|
11186
|
+
if (transform.background && !isOutputFormatSupportsAlpha(transform.format)) {
|
|
11187
|
+
sharpImage.flatten({ background: transform.background });
|
|
11188
|
+
}
|
|
11306
11189
|
}
|
|
11307
|
-
const {
|
|
11308
|
-
const data = await processBuffer(inputBuffer, operations, transform.format, transform.quality);
|
|
11190
|
+
const { data, info } = await sharpImage.toBuffer({ resolveWithObject: true });
|
|
11309
11191
|
return {
|
|
11310
|
-
data
|
|
11311
|
-
format:
|
|
11192
|
+
data,
|
|
11193
|
+
format: info.format
|
|
11312
11194
|
};
|
|
11313
11195
|
}
|
|
11314
11196
|
}
|
|
11315
|
-
const service = new
|
|
11316
|
-
var
|
|
11197
|
+
const service = new SharpService();
|
|
11198
|
+
var sharp_default = service;
|
|
11317
11199
|
|
|
11318
|
-
const
|
|
11200
|
+
const sharp = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
11319
11201
|
__proto__: null,
|
|
11320
|
-
default:
|
|
11202
|
+
default: sharp_default
|
|
11321
11203
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
11322
11204
|
|
|
11323
11205
|
const fnv1a52 = (str) => {
|
|
@@ -11345,7 +11227,7 @@ const etag = (payload, weak = false) => {
|
|
|
11345
11227
|
return prefix + fnv1a52(payload).toString(36) + payload.length.toString(36) + '"';
|
|
11346
11228
|
};
|
|
11347
11229
|
|
|
11348
|
-
function isRemoteImage(src) {
|
|
11230
|
+
function isRemoteImage$1(src) {
|
|
11349
11231
|
return /^(https?:)?\/\//.test(src);
|
|
11350
11232
|
}
|
|
11351
11233
|
|
|
@@ -11364,14 +11246,14 @@ async function loadRemoteImage(src) {
|
|
|
11364
11246
|
const get = async ({ request }) => {
|
|
11365
11247
|
try {
|
|
11366
11248
|
const url = new URL(request.url);
|
|
11367
|
-
const transform =
|
|
11249
|
+
const transform = sharp_default.parseTransform(url.searchParams);
|
|
11368
11250
|
let inputBuffer = void 0;
|
|
11369
|
-
const sourceUrl = isRemoteImage(transform.src) ? new URL(transform.src) : new URL(transform.src, url.origin);
|
|
11251
|
+
const sourceUrl = isRemoteImage$1(transform.src) ? new URL(transform.src) : new URL(transform.src, url.origin);
|
|
11370
11252
|
inputBuffer = await loadRemoteImage(sourceUrl);
|
|
11371
11253
|
if (!inputBuffer) {
|
|
11372
11254
|
return new Response("Not Found", { status: 404 });
|
|
11373
11255
|
}
|
|
11374
|
-
const { data, format } = await
|
|
11256
|
+
const { data, format } = await sharp_default.transform(inputBuffer, transform);
|
|
11375
11257
|
return new Response(data, {
|
|
11376
11258
|
status: 200,
|
|
11377
11259
|
headers: {
|
|
@@ -11557,6 +11439,10 @@ const loadPageContext = async (Astro, {
|
|
|
11557
11439
|
};
|
|
11558
11440
|
};
|
|
11559
11441
|
|
|
11442
|
+
function isRemoteImage(src) {
|
|
11443
|
+
return /^(https?:)?\/\//.test(src);
|
|
11444
|
+
}
|
|
11445
|
+
|
|
11560
11446
|
function resolveSize(transform) {
|
|
11561
11447
|
if (transform.width && transform.height) {
|
|
11562
11448
|
return transform;
|
|
@@ -11624,7 +11510,7 @@ async function getImage$1(transform) {
|
|
|
11624
11510
|
}
|
|
11625
11511
|
let loader = (_a = globalThis.astroImage) == null ? void 0 : _a.loader;
|
|
11626
11512
|
if (!loader) {
|
|
11627
|
-
const { default: mod } = await Promise.resolve().then(() =>
|
|
11513
|
+
const { default: mod } = await Promise.resolve().then(() => sharp).catch(() => {
|
|
11628
11514
|
throw new Error(
|
|
11629
11515
|
"[@astrojs/image] Builtin image loader not found. (Did you remember to add the integration to your Astro config?)"
|
|
11630
11516
|
);
|
|
@@ -11636,7 +11522,7 @@ async function getImage$1(transform) {
|
|
|
11636
11522
|
const resolved = await resolveTransform(transform);
|
|
11637
11523
|
const attributes = await loader.getImageAttributes(resolved);
|
|
11638
11524
|
const isDev = (_b = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{SSR:true,}))) == null ? void 0 : _b.DEV;
|
|
11639
|
-
const isLocalImage = !isRemoteImage
|
|
11525
|
+
const isLocalImage = !isRemoteImage(resolved.src);
|
|
11640
11526
|
const _loader = isDev && isLocalImage ? globalThis.astroImage.defaultLoader : loader;
|
|
11641
11527
|
if (!_loader) {
|
|
11642
11528
|
throw new Error("@astrojs/image: loader not found!");
|
|
@@ -12738,7 +12624,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12738
12624
|
if (__props.hasCashback) {
|
|
12739
12625
|
_push2(`<div${ssrRenderAttr("data-sf-prices-cashback", unref(pointsCashback))}${_scopeId}><span${ssrRenderAttr("data-tooltip", "Receba $1 de volta".replace("$1", _ctx.$percentage(unref(earnPointsPercentage))))}${_scopeId}>`);
|
|
12740
12626
|
ssrRenderSlot(_ctx.$slots, "cashback-pre", {}, () => {
|
|
12741
|
-
_push2(`<i class="i-
|
|
12627
|
+
_push2(`<i class="i-cashback mr-1"${_scopeId}></i>`);
|
|
12742
12628
|
}, _push2, _parent2, _scopeId);
|
|
12743
12629
|
ssrRenderSlot(_ctx.$slots, "cashback-value", unref(prices), () => {
|
|
12744
12630
|
_push2(`<span class="font-medium"${_scopeId}>${ssrInterpolate(_ctx.$money(unref(pointsCashback)))}</span>`);
|
|
@@ -12760,7 +12646,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12760
12646
|
"data-tooltip": "Receba $1 de volta".replace("$1", _ctx.$percentage(unref(earnPointsPercentage)))
|
|
12761
12647
|
}, [
|
|
12762
12648
|
renderSlot$1(_ctx.$slots, "cashback-pre", {}, () => [
|
|
12763
|
-
createVNode$1("i", { class: "i-
|
|
12649
|
+
createVNode$1("i", { class: "i-cashback mr-1" })
|
|
12764
12650
|
]),
|
|
12765
12651
|
renderSlot$1(_ctx.$slots, "cashback-value", unref(prices), () => [
|
|
12766
12652
|
createVNode$1("span", { class: "font-medium" }, toDisplayString(_ctx.$money(unref(pointsCashback))), 1)
|
|
@@ -13236,10 +13122,10 @@ const _page5 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
13236
13122
|
url: $$url
|
|
13237
13123
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
13238
13124
|
|
|
13239
|
-
const pageMap = new Map([['../../node_modules/.pnpm/@astrojs+image@0.12.
|
|
13125
|
+
const pageMap = new Map([['../../node_modules/.pnpm/@astrojs+image@0.12.1_sharp@0.31.3/node_modules/@astrojs/image/dist/endpoint.js', _page0],['src/pages/index.astro', _page1],['src/pages/fallback.astro', _page2],['src/pages/app/index.astro', _page3],['src/pages/app/account.astro', _page4],['src/pages/[...slug].astro', _page5],]);
|
|
13240
13126
|
const renderers = [Object.assign({"name":"astro:jsx","serverEntrypoint":"astro/jsx/server.js","jsxImportSource":"astro"}, { ssr: server_default }),Object.assign({"name":"@astrojs/vue","clientEntrypoint":"@astrojs/vue/client.js","serverEntrypoint":"@astrojs/vue/server.js"}, { ssr: _renderer1 }),];
|
|
13241
13127
|
|
|
13242
|
-
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.12.1/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...slug_.4dbd1d47.css","assets/index.e6a09532.css"],"scripts":[{"type":"external","value":"hoisted.f6ee2883.js"},{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...slug_.4dbd1d47.css"],"scripts":[{"type":"external","value":"hoisted.f6ee2883.js"},{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...slug_.4dbd1d47.css"],"scripts":[{"type":"external","value":"hoisted.f6ee2883.js"},{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-002.web.app/","base":"/","markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"extendDefaultPlugins":false,"isAstroFlavoredMd":false},"pageMap":null,"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"entry.mjs","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/dist/vendor/squoosh/image-pool.js":"chunks/image-pool.abfa6f7b.mjs","@@sf/components/Prices.vue":"Prices.d79bd862.js","@@sf/components/ProductCard.vue":"ProductCard.6b27d9fa.js","@astrojs/vue/client.js":"client.2a3e5a58.js","/astro/hoisted.js?q=0":"hoisted.f6ee2883.js","astro:scripts/page.js":"page.5a6f3db5.js","@@components/header/HeaderButtons.vue":"HeaderButtons.300c19e5.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/LoginForm.vue":"chunks/LoginForm.7e7d6137.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"chunks/workbox-window.prod.es5.10f2e5ac.js","astro:scripts/before-hydration.js":""},"assets":["/assets/index.e6a09532.css","/assets/server.4d9646d8.css","/assets/_...slug_.4dbd1d47.css","/manifest.webmanifest","/registerSW.js","/HeaderButtons.300c19e5.js","/Prices.d79bd862.js","/ProductCard.6b27d9fa.js","/client.2a3e5a58.js","/hoisted.f6ee2883.js","/page.5a6f3db5.js","/robots.txt","/sw.js","/workbox-abdc68aa.js","/admin/config.json","/assets/cms-preview.css","/assets/cms.css","/assets/cvv.png","/assets/img-placeholder.png","/assets/payments.png","/assets/ssl-safe.png","/chunks/HeaderButtons.1abd5bf4.js","/chunks/LoginForm.7e7d6137.js","/chunks/Prices.vue_vue_type_script_setup_true_lang.b29421b3.js","/chunks/_plugin-vue_export-helper.fc452b02.js","/chunks/ecom-utils.b0a26608.js","/chunks/preload-helper.1de719f8.js","/chunks/price.ecf7fed4.js","/chunks/runtime-core.esm-bundler.b4556b35.js","/chunks/session-utm.2de8b604.js","/chunks/workbox-window.prod.es5.10f2e5ac.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner1.png","/img/uploads/banner2.png","/img/uploads/banner2.webp","/img/uploads/favicon.png","/img/uploads/headless.png","/img/uploads/headphone.png","/img/uploads/headphone.webp","/img/uploads/icon.png","/img/uploads/large-icon.png","/img/uploads/logo.png","/img/uploads/logo.webp","/img/uploads/og-image.png","/img/uploads/passion.png","/img/uploads/passion.webp","/img/uploads/pwa-reliable.png","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.png","/img/uploads/rect89.webp","/img/uploads/ssl-safe.png","/assets/icons/bootstrap-icons/font/storefront-icons.woff2","/assets/icons/feather-icons/font/storefront-icons.woff2","/assets/icons/font-awesome/font/storefront-icons.woff2","/assets/icons/line-awesome/font/storefront-icons.woff2","/assets/icons/tabler-icons/font/storefront-icons.woff2","/page.5a6f3db5.js","/~partytown/partytown-atomics.js","/~partytown/partytown-media.js","/~partytown/partytown-sw.js","/~partytown/partytown.js"]}), {
|
|
13128
|
+
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.12.1_sharp@0.31.3/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...slug_.15bda576.css","assets/index.e6a09532.css"],"scripts":[{"type":"external","value":"hoisted.f6ee2883.js"},{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...slug_.15bda576.css"],"scripts":[{"type":"external","value":"hoisted.f6ee2883.js"},{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...slug_.15bda576.css"],"scripts":[{"type":"external","value":"hoisted.f6ee2883.js"},{"type":"external","value":"page.5a6f3db5.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.7.3 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.7.3\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-002.web.app/","base":"/","markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"extendDefaultPlugins":false,"isAstroFlavoredMd":false},"pageMap":null,"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"entry.mjs","@@sf/components/Prices.vue":"Prices.6c44a513.js","@@sf/components/ProductCard.vue":"ProductCard.69bba7fc.js","@astrojs/vue/client.js":"client.2a3e5a58.js","/astro/hoisted.js?q=0":"hoisted.f6ee2883.js","astro:scripts/page.js":"page.5a6f3db5.js","@@components/header/HeaderButtons.vue":"HeaderButtons.300c19e5.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/LoginForm.vue":"chunks/LoginForm.7e7d6137.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"chunks/workbox-window.prod.es5.10f2e5ac.js","astro:scripts/before-hydration.js":""},"assets":["/assets/index.e6a09532.css","/assets/server.4d9646d8.css","/assets/_...slug_.15bda576.css","/manifest.webmanifest","/registerSW.js","/HeaderButtons.300c19e5.js","/Prices.6c44a513.js","/ProductCard.69bba7fc.js","/client.2a3e5a58.js","/hoisted.f6ee2883.js","/page.5a6f3db5.js","/robots.txt","/sw.js","/workbox-abdc68aa.js","/admin/config.json","/assets/cms-preview.css","/assets/cms.css","/assets/cvv.png","/assets/img-placeholder.png","/assets/payments.png","/assets/ssl-safe.png","/chunks/HeaderButtons.1abd5bf4.js","/chunks/LoginForm.7e7d6137.js","/chunks/Prices.vue_vue_type_script_setup_true_lang.e4525076.js","/chunks/_plugin-vue_export-helper.fc452b02.js","/chunks/ecom-utils.b0a26608.js","/chunks/preload-helper.1de719f8.js","/chunks/price.ecf7fed4.js","/chunks/runtime-core.esm-bundler.b4556b35.js","/chunks/session-utm.2de8b604.js","/chunks/workbox-window.prod.es5.10f2e5ac.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner1.png","/img/uploads/banner2.png","/img/uploads/banner2.webp","/img/uploads/favicon.png","/img/uploads/headless.png","/img/uploads/headphone.png","/img/uploads/headphone.webp","/img/uploads/icon.png","/img/uploads/large-icon.png","/img/uploads/logo.png","/img/uploads/logo.webp","/img/uploads/og-image.png","/img/uploads/passion.png","/img/uploads/passion.webp","/img/uploads/pwa-reliable.png","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.png","/img/uploads/rect89.webp","/img/uploads/ssl-safe.png","/assets/icons/bootstrap-icons/font/storefront-icons.woff2","/assets/icons/feather-icons/font/storefront-icons.woff2","/assets/icons/font-awesome/font/storefront-icons.woff2","/assets/icons/line-awesome/font/storefront-icons.woff2","/assets/icons/tabler-icons/font/storefront-icons.woff2","/page.5a6f3db5.js","/~partytown/partytown-atomics.js","/~partytown/partytown-media.js","/~partytown/partytown-sw.js","/~partytown/partytown.js"]}), {
|
|
13243
13129
|
pageMap: pageMap,
|
|
13244
13130
|
renderers: renderers
|
|
13245
13131
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -15,9 +15,6 @@
|
|
|
15
15
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/storefront#readme",
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": ">=16"
|
|
20
|
-
},
|
|
21
18
|
"scripts": {
|
|
22
19
|
"dev": "astro dev",
|
|
23
20
|
"start": "astro dev --host",
|
|
@@ -48,6 +45,8 @@
|
|
|
48
45
|
"dotenv": "^16.0.3",
|
|
49
46
|
"firebase": "^9.15.0",
|
|
50
47
|
"image-size": "^1.0.2",
|
|
48
|
+
"semver": "^7.3.8",
|
|
49
|
+
"sharp": "^0.31.3",
|
|
51
50
|
"tailwindcss": "^3.2.4",
|
|
52
51
|
"unocss": "^0.48.0",
|
|
53
52
|
"vite": "^3.2.5",
|
|
@@ -83,7 +83,7 @@ setTimeout(() => {
|
|
|
83
83
|
<span :data-tooltip="$t.i19get$1back
|
|
84
84
|
.replace('$1', $percentage(earnPointsPercentage))">
|
|
85
85
|
<slot name="cashback-pre">
|
|
86
|
-
<i class="i-
|
|
86
|
+
<i class="i-cashback mr-1"></i>
|
|
87
87
|
</slot>
|
|
88
88
|
<slot name="cashback-value" v-bind="prices">
|
|
89
89
|
<span class="font-medium">
|
|
@@ -37,6 +37,8 @@ let defaultThemeOptions = {
|
|
|
37
37
|
'dinersclub',
|
|
38
38
|
],
|
|
39
39
|
generalIcons: 'heroicons',
|
|
40
|
+
shoppingCartIcon: 'shopping-bag',
|
|
41
|
+
cashbackIcon: 'arrow-uturn-left',
|
|
40
42
|
};
|
|
41
43
|
if (globalThis.storefront_theme_options) {
|
|
42
44
|
defaultThemeOptions = deepmerge(defaultThemeOptions, globalThis.storefront_theme_options);
|
|
@@ -102,17 +104,20 @@ Object.keys(brandColors).forEach((colorName) => {
|
|
|
102
104
|
});
|
|
103
105
|
});
|
|
104
106
|
|
|
105
|
-
const genTailwindConfig = ({
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
const genTailwindConfig = (themeOptions = {}) => {
|
|
108
|
+
const {
|
|
109
|
+
brandIcons,
|
|
110
|
+
brandIconsShortcuts,
|
|
111
|
+
brandLogos,
|
|
112
|
+
brandLogosShortcuts,
|
|
113
|
+
generalIcons,
|
|
114
|
+
baseColor,
|
|
115
|
+
successColor,
|
|
116
|
+
warningColor,
|
|
117
|
+
dangerColor,
|
|
118
|
+
shoppingCartIcon,
|
|
119
|
+
cashbackIcon,
|
|
120
|
+
} = deepmerge(defaultThemeOptions, themeOptions);
|
|
116
121
|
const config = {
|
|
117
122
|
theme: {
|
|
118
123
|
extend: {
|
|
@@ -157,9 +162,8 @@ const genTailwindConfig = ({
|
|
|
157
162
|
if (!shortcuts) {
|
|
158
163
|
const { icons } = require(`@iconify-json/${iconset}`);
|
|
159
164
|
shortcuts = Object.keys(icons.icons);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
165
|
+
shortcuts.push(['shopping-cart', shoppingCartIcon]);
|
|
166
|
+
shortcuts.push(['cashback', cashbackIcon]);
|
|
163
167
|
}
|
|
164
168
|
shortcuts.forEach((shortcut) => {
|
|
165
169
|
if (typeof shortcut === 'string') {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const deepmerge = require('@fastify/deepmerge')();
|
|
3
2
|
const {
|
|
4
3
|
defineConfig,
|
|
5
4
|
presetUno,
|
|
@@ -8,14 +7,13 @@ const {
|
|
|
8
7
|
transformerCompileClass,
|
|
9
8
|
transformerDirectives,
|
|
10
9
|
} = require('unocss');
|
|
11
|
-
|
|
12
10
|
const {
|
|
13
11
|
genTailwindConfig,
|
|
14
12
|
defaultThemeOptions,
|
|
15
13
|
brandColors,
|
|
16
14
|
brandColorsPalletes,
|
|
17
15
|
onBrandColors,
|
|
18
|
-
} = require(
|
|
16
|
+
} = require('./tailwind.config.cjs');
|
|
19
17
|
|
|
20
18
|
const colorCSSVars = {};
|
|
21
19
|
Object.keys(brandColors).forEach((colorName) => {
|
|
@@ -41,23 +39,25 @@ Object.keys(onBrandColors).forEach((colorLabel) => {
|
|
|
41
39
|
: cssRGB.substring(4).replace(')', '');
|
|
42
40
|
});
|
|
43
41
|
|
|
44
|
-
const genUnoCSSConfig = ({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
42
|
+
const genUnoCSSConfig = (themeOptions = {}) => {
|
|
43
|
+
const {
|
|
44
|
+
brandIcons,
|
|
45
|
+
brandIconsShortcuts,
|
|
46
|
+
brandLogos,
|
|
47
|
+
brandLogosShortcuts,
|
|
48
|
+
generalIcons,
|
|
49
|
+
shoppingCartIcon,
|
|
50
|
+
cashbackIcon,
|
|
51
|
+
preflights = [{
|
|
52
|
+
getCSS: () => {
|
|
53
|
+
const strCSSVars = Object.entries(colorCSSVars)
|
|
54
|
+
.map(([varName, value]) => `--${varName}:${value};`)
|
|
55
|
+
.join(' ');
|
|
56
|
+
return `:root { ${strCSSVars} }`;
|
|
57
|
+
},
|
|
58
|
+
}],
|
|
59
|
+
} = deepmerge(defaultThemeOptions, themeOptions);
|
|
60
|
+
const tailwindConfig = genTailwindConfig(themeOptions);
|
|
61
61
|
const rules = [];
|
|
62
62
|
tailwindConfig.plugins?.forEach((plugin) => {
|
|
63
63
|
plugin({
|
|
@@ -87,6 +87,7 @@ const genUnoCSSConfig = ({
|
|
|
87
87
|
: { [`i-${brand[0]}`]: `i-${brandLogos}:${brand[1]}` };
|
|
88
88
|
}),
|
|
89
89
|
{ 'i-shopping-cart': `i-${generalIcons}:${shoppingCartIcon}` },
|
|
90
|
+
{ 'i-cashback': `i-${generalIcons}:${cashbackIcon}` },
|
|
90
91
|
[/^i-([^:]+)$/, ([, icon]) => `i-${generalIcons}:${icon}`],
|
|
91
92
|
],
|
|
92
93
|
theme: {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
16
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
16
|