cloudcommerce 0.6.3 → 0.6.5

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/action.yml +57 -1
  3. package/package.json +1 -1
  4. package/packages/api/lib/types/carts.d.ts +72 -20
  5. package/packages/api/lib/types/orders.d.ts +72 -20
  6. package/packages/api/lib/types/products.d.ts +82 -11
  7. package/packages/api/package.json +1 -1
  8. package/packages/api/src/types/carts.d.ts +72 -20
  9. package/packages/api/src/types/orders.d.ts +72 -20
  10. package/packages/api/src/types/products.d.ts +82 -11
  11. package/packages/apps/correios/package.json +1 -1
  12. package/packages/apps/custom-payment/package.json +1 -1
  13. package/packages/apps/custom-shipping/package.json +1 -1
  14. package/packages/apps/datafrete/package.json +1 -1
  15. package/packages/apps/discounts/package.json +1 -1
  16. package/packages/apps/emails/package.json +1 -1
  17. package/packages/apps/fb-conversions/package.json +1 -1
  18. package/packages/apps/frenet/package.json +1 -1
  19. package/packages/apps/galaxpay/package.json +1 -1
  20. package/packages/apps/google-analytics/package.json +1 -1
  21. package/packages/apps/infinitepay/package.json +1 -1
  22. package/packages/apps/jadlog/package.json +1 -1
  23. package/packages/apps/loyalty-points/package.json +1 -1
  24. package/packages/apps/melhor-envio/package.json +1 -1
  25. package/packages/apps/mercadopago/package.json +1 -1
  26. package/packages/apps/pagarme/package.json +1 -1
  27. package/packages/apps/paghiper/package.json +1 -1
  28. package/packages/apps/pix/package.json +1 -1
  29. package/packages/apps/tiny-erp/package.json +1 -1
  30. package/packages/apps/webhooks/package.json +1 -1
  31. package/packages/cli/lib/cli.js +1 -1
  32. package/packages/cli/package.json +1 -1
  33. package/packages/cli/src/cli.ts +1 -1
  34. package/packages/config/package.json +1 -1
  35. package/packages/emails/package.json +1 -1
  36. package/packages/events/package.json +1 -1
  37. package/packages/firebase/lib/config.d.ts +1 -1
  38. package/packages/firebase/lib/config.js +1 -1
  39. package/packages/firebase/lib/config.js.map +1 -1
  40. package/packages/firebase/package.json +1 -1
  41. package/packages/firebase/src/config.ts +1 -1
  42. package/packages/i18n/package.json +1 -1
  43. package/packages/modules/package.json +1 -1
  44. package/packages/passport/package.json +1 -1
  45. package/packages/ssr/lib/firebase/serve-storefront.js +3 -2
  46. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  47. package/packages/ssr/package.json +1 -1
  48. package/packages/ssr/src/firebase/serve-storefront.ts +3 -2
  49. package/packages/storefront/dist/client/_astro/PitchBar.96fed383.js +1 -0
  50. package/packages/storefront/dist/client/_astro/{Prices.2bd87845.js → Prices.036ad2b4.js} +1 -1
  51. package/packages/storefront/dist/client/_astro/{ProductCard.48f0f5ba.js → ProductCard.69751e12.js} +1 -1
  52. package/packages/storefront/dist/client/_astro/ShopHeader.4a8ce417.js +4 -0
  53. package/packages/storefront/dist/client/_astro/{_...slug_.a594715c.css → _...slug_.25a09a96.css} +1 -1
  54. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.be244611.js +1 -0
  55. package/packages/storefront/dist/client/_astro/client.bc16bf93.js +1 -0
  56. package/packages/storefront/dist/client/_astro/{format-money.060d67ef.js → format-money.e57ae2ab.js} +1 -1
  57. package/packages/storefront/dist/client/_astro/index.248ccd97.js +1 -0
  58. package/packages/storefront/dist/client/_astro/{modules-info.01f8d523.js → modules-info.8540ba60.js} +1 -1
  59. package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.be3a98cd.js +1 -0
  60. package/packages/storefront/dist/client/_astro/server.1bc2fa51.css +1 -0
  61. package/packages/storefront/dist/client/sw.js +1 -1
  62. package/packages/storefront/dist/server/chunks/pages/{all.f15e2c35.mjs → all.9ad006f8.mjs} +125 -59
  63. package/packages/storefront/dist/server/entry.mjs +70 -36
  64. package/packages/storefront/package.json +2 -2
  65. package/packages/storefront/src/lib/components/Carousel.vue +11 -26
  66. package/packages/storefront/src/lib/components/CarouselControl.vue +5 -1
  67. package/packages/storefront/src/lib/components/globals/AImg.vue +55 -0
  68. package/packages/storefront/src/lib/components/globals/Fade.vue +23 -18
  69. package/packages/storefront/src/lib/layouts/BaseHead.astro +3 -1
  70. package/packages/storefront/src/lib/pages/_vue.ts +2 -0
  71. package/packages/storefront/src/vue-globals.d.ts +1 -0
  72. package/packages/types/package.json +1 -1
  73. package/packages/storefront/dist/client/_astro/PitchBar.5ced676e.js +0 -1
  74. package/packages/storefront/dist/client/_astro/ShopHeader.05d64cc8.js +0 -4
  75. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.43eaff51.js +0 -1
  76. package/packages/storefront/dist/client/_astro/client.79615b8a.js +0 -1
  77. package/packages/storefront/dist/client/_astro/index.3243538d.js +0 -1
  78. package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.cb4db78a.js +0 -1
  79. package/packages/storefront/dist/client/_astro/server.60de185d.css +0 -1
  80. package/packages/storefront/dist/client/fallback/index.html +0 -79
  81. package/packages/storefront/dist/server/chunks/prerender.2527d85d.mjs +0 -2
@@ -11,11 +11,10 @@ import fs from 'fs';
11
11
  import http from 'http';
12
12
  import send from 'send';
13
13
  import enableDestroy from 'server-destroy';
14
- import { defineComponent, useCssVars, unref, computed, useSSRContext, mergeProps, h as h$2, createSSRApp } from 'vue';
14
+ import { defineComponent, computed, useSSRContext, mergeProps, h as h$2, createSSRApp } from 'vue';
15
15
  import { ssrRenderSlotInner, ssrRenderAttrs, ssrRenderSlot, renderToString } from 'vue/server-renderer';
16
- import { i18n, formatMoney } from '@ecomplus/utils';
17
- /* empty css */import { _ as _export_sfc, a as _page0, b as _page1, c as _page3, d as _page4, e as _page5 } from './chunks/pages/all.f15e2c35.mjs';
18
- import { _ as _page2 } from './chunks/prerender.2527d85d.mjs';
16
+ import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
17
+ /* empty css */import { _ as _export_sfc, a as _page0, b as _page1, c as _page2, d as _page3, e as _page4, f as _page5 } from './chunks/pages/all.9ad006f8.mjs';
19
18
  import 'path-to-regexp';
20
19
  import 'tls';
21
20
  import 'mime';
@@ -3126,7 +3125,7 @@ const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
3126
3125
  start
3127
3126
  }, Symbol.toStringTag, { value: 'Module' }));
3128
3127
 
3129
- const _sfc_main$1 = defineComponent({
3128
+ const _sfc_main$2 = defineComponent({
3130
3129
  __name: "Fade",
3131
3130
  props: {
3132
3131
  speed: { default: "default" },
@@ -3138,16 +3137,6 @@ const _sfc_main$1 = defineComponent({
3138
3137
  setup(__props, { expose }) {
3139
3138
  expose();
3140
3139
  const props = __props;
3141
- useCssVars((_ctx) => ({
3142
- "68e3b484": unref(willChange),
3143
- "17a22876": unref(duration),
3144
- "bc2eb02a": unref(enterFromOpacity),
3145
- "da7ab968": unref(enterFromTransform),
3146
- "43026547": unref(enterFromHeight),
3147
- "6e5955a6": unref(enterFromWidth),
3148
- "6f10697b": unref(leaveToOpacity),
3149
- "95ff7e48": unref(leaveToTransform)
3150
- }));
3151
3140
  const duration = computed(() => {
3152
3141
  if (props.speed === "default")
3153
3142
  return "var(--transition, .2s linear)";
@@ -3211,6 +3200,16 @@ const _sfc_main$1 = defineComponent({
3211
3200
  properties += ", width";
3212
3201
  return properties;
3213
3202
  });
3203
+ const setInitialStyles = (el) => {
3204
+ el.style.setProperty("--fade-will-change", willChange.value);
3205
+ el.style.setProperty("--fade-duration", duration.value);
3206
+ el.style.setProperty("--fade-enter-opacity", String(enterFromOpacity.value));
3207
+ el.style.setProperty("--fade-enter-transform", String(enterFromTransform.value));
3208
+ el.style.setProperty("--fade-enter-height", String(enterFromHeight.value));
3209
+ el.style.setProperty("--fade-enter-width", String(enterFromWidth.value));
3210
+ el.style.setProperty("--fade-leave-opacity", String(leaveToOpacity.value));
3211
+ el.style.setProperty("--fade-leave-transform", String(leaveToTransform.value));
3212
+ };
3214
3213
  const onEnter = (el) => {
3215
3214
  if (props.slide && !props.isFloating && props.isEnterFrom) {
3216
3215
  if (isSlideY.value) {
@@ -3256,33 +3255,23 @@ const _sfc_main$1 = defineComponent({
3256
3255
  });
3257
3256
  }
3258
3257
  };
3259
- const __returned__ = { props, duration, transform, opacity, enterFromOpacity, leaveToOpacity, enterFromTransform, leaveToTransform, isSlideY, height, width, enterFromHeight, enterFromWidth, willChange, onEnter, onAfterEnter, onLeave };
3258
+ const __returned__ = { props, duration, transform, opacity, enterFromOpacity, leaveToOpacity, enterFromTransform, leaveToTransform, isSlideY, height, width, enterFromHeight, enterFromWidth, willChange, setInitialStyles, onEnter, onAfterEnter, onLeave };
3260
3259
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
3261
3260
  return __returned__;
3262
3261
  }
3263
3262
  });
3264
- function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3265
- ({ style: {
3266
- "--68e3b484": $setup.willChange,
3267
- "--17a22876": $setup.duration,
3268
- "--bc2eb02a": $setup.enterFromOpacity,
3269
- "--da7ab968": $setup.enterFromTransform,
3270
- "--43026547": $setup.enterFromHeight,
3271
- "--6e5955a6": $setup.enterFromWidth,
3272
- "--6f10697b": $setup.leaveToOpacity,
3273
- "--95ff7e48": $setup.leaveToTransform
3274
- } });
3263
+ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3275
3264
  ssrRenderSlotInner(_ctx.$slots, "default", {}, null, _push, _parent, null, true);
3276
3265
  }
3277
- const _sfc_setup$1 = _sfc_main$1.setup;
3278
- _sfc_main$1.setup = (props, ctx) => {
3266
+ const _sfc_setup$2 = _sfc_main$2.setup;
3267
+ _sfc_main$2.setup = (props, ctx) => {
3279
3268
  const ssrContext = useSSRContext();
3280
3269
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Fade.vue");
3281
- return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
3270
+ return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
3282
3271
  };
3283
- const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1], ["__scopeId", "data-v-d3912920"]]);
3272
+ const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
3284
3273
 
3285
- const _sfc_main = /* @__PURE__ */ defineComponent({
3274
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3286
3275
  __name: "ALink",
3287
3276
  props: {
3288
3277
  href: null,
@@ -3306,7 +3295,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3306
3295
  return __returned__;
3307
3296
  }
3308
3297
  });
3309
- function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3298
+ function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3310
3299
  _push(`<a${ssrRenderAttrs(mergeProps({
3311
3300
  href: $props.href,
3312
3301
  target: $setup.linkTarget,
@@ -3315,13 +3304,57 @@ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $op
3315
3304
  ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
3316
3305
  _push(`</a>`);
3317
3306
  }
3307
+ const _sfc_setup$1 = _sfc_main$1.setup;
3308
+ _sfc_main$1.setup = (props, ctx) => {
3309
+ const ssrContext = useSSRContext();
3310
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/ALink.vue");
3311
+ return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
3312
+ };
3313
+ const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);
3314
+
3315
+ const _sfc_main = defineComponent({
3316
+ __name: "AImg",
3317
+ props: {
3318
+ picture: null,
3319
+ loading: { default: "lazy" },
3320
+ decoding: null
3321
+ },
3322
+ setup(__props, { expose }) {
3323
+ expose();
3324
+ const props = __props;
3325
+ const image = computed(() => {
3326
+ if (props.picture.url) {
3327
+ return props.picture;
3328
+ }
3329
+ return img(props.picture);
3330
+ });
3331
+ const dimensions = computed(() => {
3332
+ return imgSizes(image.value);
3333
+ });
3334
+ const attrs = computed(() => ({
3335
+ ...props,
3336
+ src: image.value.url,
3337
+ alt: image.value.alt,
3338
+ width: dimensions.value.width || null,
3339
+ height: dimensions.value.height || null,
3340
+ decoding: props.decoding || (dimensions.value.height ? "async" : null),
3341
+ picture: null
3342
+ }));
3343
+ const __returned__ = { props, image, dimensions, attrs };
3344
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
3345
+ return __returned__;
3346
+ }
3347
+ });
3348
+ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3349
+ _push(`<img${ssrRenderAttrs(mergeProps($setup.attrs, _attrs))}>`);
3350
+ }
3318
3351
  const _sfc_setup = _sfc_main.setup;
3319
3352
  _sfc_main.setup = (props, ctx) => {
3320
3353
  const ssrContext = useSSRContext();
3321
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/ALink.vue");
3354
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/AImg.vue");
3322
3355
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
3323
3356
  };
3324
- const ALink = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
3357
+ const AImg = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
3325
3358
 
3326
3359
  const formatPercentage = (value, digits = 1) => {
3327
3360
  return Number.isInteger(value) ? `${value}%` : `${value.toFixed(digits)}%`;
@@ -3339,6 +3372,7 @@ const createApp = (app) => {
3339
3372
  });
3340
3373
  app.component("Fade", Fade);
3341
3374
  app.component("ALink", ALink);
3375
+ app.component("AImg", AImg);
3342
3376
  };
3343
3377
 
3344
3378
  /**
@@ -3381,7 +3415,7 @@ const _renderer1 = {
3381
3415
  const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.15.0_astro@2.0.14+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],]);
3382
3416
  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 }),];
3383
3417
 
3384
- const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"fallback/index.html","links":[],"scripts":[],"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":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.15.0_astro@2.0.14+sharp@0.31.3/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.a594715c.css","_astro/index.0c833781.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"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":[],"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":["_astro/_...slug_.a594715c.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"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":{},"gfm":true,"smartypants":true,"contentDir":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/content/"},"pageMap":null,"propagation":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseStateJson.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Image.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Picture.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/ssr/Picture.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/PagesHeader.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Pages.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/account.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Wildcard.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Fallback.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro","in-tree"]],"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","~/components/Prices.vue":"_astro/Prices.2bd87845.js","/astro/hoisted.js?q=0":"_astro/hoisted.721ad75d.js","~/components/PitchBar.vue":"_astro/PitchBar.5ced676e.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.295a6886.js","@@sf/components/ProductCard.vue":"_astro/ProductCard.48f0f5ba.js","@astrojs/vue/client.js":"_astro/client.79615b8a.js","~/components/ShopHeader.vue":"_astro/ShopHeader.05d64cc8.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.7ce2ebb1.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/index.0c833781.css","/_astro/server.60de185d.css","/_astro/_...slug_.a594715c.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-e2ee76b5.js","/_astro/PitchBar.5ced676e.js","/_astro/Prices.2bd87845.js","/_astro/ProductCard.48f0f5ba.js","/_astro/ShopHeader.05d64cc8.js","/_astro/_plugin-vue_export-helper.43eaff51.js","/_astro/client.79615b8a.js","/_astro/firebase-app.7ce2ebb1.js","/_astro/format-money.060d67ef.js","/_astro/hoisted.721ad75d.js","/_astro/idle-callback.889bf0ea.js","/_astro/index.3243538d.js","/_astro/modules-info.01f8d523.js","/_astro/preload-helper.101896b7.js","/_astro/runtime-dom.esm-bundler.cb4db78a.js","/_astro/session-utm.72684b84.js","/_astro/workbox-window.prod.es5.295a6886.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","/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","/fallback/index.html"]}), {
3418
+ const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.15.0_astro@2.0.14+sharp@0.31.3/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.25a09a96.css","_astro/index.0c833781.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.25a09a96.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"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":[],"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":[],"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":["_astro/_...slug_.25a09a96.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"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":{},"gfm":true,"smartypants":true,"contentDir":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/content/"},"pageMap":null,"propagation":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseStateJson.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Image.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Picture.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/ssr/Picture.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/PagesHeader.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Pages.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Fallback.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/account.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Wildcard.astro","in-tree"],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro","in-tree"]],"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","~/components/Prices.vue":"_astro/Prices.036ad2b4.js","@@sf/components/ProductCard.vue":"_astro/ProductCard.69751e12.js","~/components/PitchBar.vue":"_astro/PitchBar.96fed383.js","/astro/hoisted.js?q=0":"_astro/hoisted.721ad75d.js","@astrojs/vue/client.js":"_astro/client.bc16bf93.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.295a6886.js","~/components/ShopHeader.vue":"_astro/ShopHeader.4a8ce417.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.7ce2ebb1.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/index.0c833781.css","/_astro/server.1bc2fa51.css","/_astro/_...slug_.25a09a96.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-e2ee76b5.js","/_astro/PitchBar.96fed383.js","/_astro/Prices.036ad2b4.js","/_astro/ProductCard.69751e12.js","/_astro/ShopHeader.4a8ce417.js","/_astro/_plugin-vue_export-helper.be244611.js","/_astro/client.bc16bf93.js","/_astro/firebase-app.7ce2ebb1.js","/_astro/format-money.e57ae2ab.js","/_astro/hoisted.721ad75d.js","/_astro/idle-callback.889bf0ea.js","/_astro/index.248ccd97.js","/_astro/modules-info.8540ba60.js","/_astro/preload-helper.101896b7.js","/_astro/runtime-dom.esm-bundler.be3a98cd.js","/_astro/session-utm.72684b84.js","/_astro/workbox-window.prod.es5.295a6886.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","/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"]}), {
3385
3419
  pageMap: pageMap,
3386
3420
  renderers: renderers
3387
3421
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.6.3",
4
+ "version": "0.6.5",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "main": "src/index.js",
7
7
  "repository": {
@@ -49,7 +49,7 @@
49
49
  "semver": "^7.3.8",
50
50
  "sharp": "^0.31.3",
51
51
  "tailwindcss": "^3.2.7",
52
- "unocss": "^0.49.7",
52
+ "unocss": "^0.50.0",
53
53
  "vite": "^4.1.3",
54
54
  "vite-plugin-pwa": "^0.14.4",
55
55
  "vue": "^3.2.47"
@@ -133,7 +133,10 @@ const calcOnInit = () => {
133
133
  calcCurrentIndex();
134
134
  calcIndexCount();
135
135
  };
136
- const onResize = useDebounceFn(calcOnInit, 400);
136
+ const onResize = useDebounceFn(() => {
137
+ wrapper.value.scrollLeft = 0;
138
+ calcOnInit();
139
+ }, 400);
137
140
  onMounted(() => {
138
141
  calcOnInit();
139
142
  if (!import.meta.env.SSR) {
@@ -161,8 +164,13 @@ provide(carouselKey, {
161
164
  </script>
162
165
 
163
166
  <template>
164
- <div ref="carousel" data-carousel>
165
- <component :is="as" ref="wrapper" data-carousel-wrapper>
167
+ <div ref="carousel" class="relative" data-carousel>
168
+ <component
169
+ :is="as"
170
+ ref="wrapper"
171
+ class="flex overflow-x-scroll overflow-y-hidden list-none m-0 p-0"
172
+ data-carousel-wrapper
173
+ >
166
174
  <slot />
167
175
  </component>
168
176
  <!-- @slot Slot for Arrows -->
@@ -187,44 +195,21 @@ provide(carouselKey, {
187
195
  </template>
188
196
 
189
197
  <style>
190
- [data-carousel] {
191
- position: relative;
192
- }
193
198
  [data-carousel-wrapper] {
194
- display: flex;
195
- overflow-x: scroll;
196
- overflow-y: hidden;
197
199
  scroll-snap-type: x mandatory;
198
200
  scroll-behavior: smooth;
199
201
  scrollbar-width: none;
200
202
  -webkit-overflow-scrolling: touch;
201
203
  -ms-overflow-style: none;
202
- list-style: none;
203
- margin: 0;
204
- padding: 0;
205
204
  }
206
205
  [data-carousel-wrapper]::-webkit-scrollbar {
207
206
  display: none;
208
207
  }
209
208
  [data-carousel-wrapper] > * {
210
- flex: 0 0 100%;
211
- height: 100%;
212
209
  scroll-snap-align: start;
213
- display: flex;
214
- justify-content: center;
215
- align-items: center;
216
210
  outline: none;
217
211
  }
218
212
  [data-carousel-control] {
219
- position: absolute;
220
- top: 0;
221
- bottom: 0;
222
213
  z-index: 1;
223
214
  }
224
- [data-carousel-control=previous] {
225
- left: 0;
226
- }
227
- [data-carousel-control=next] {
228
- right: 0;
229
- }
230
215
  </style>
@@ -17,12 +17,16 @@ const { changeSlide } = inject(carouselKey);
17
17
  type="button"
18
18
  :aria-label="direction > 0 ? $t.i19next : $t.i19previous"
19
19
  @click="changeSlide(direction)"
20
+ class="group absolute top-0"
21
+ :class="direction > 0 ? 'right-0' : 'left-0'"
20
22
  :data-carousel-control="direction > 0 ? 'next' : 'previous'"
21
23
  >
22
24
  <slot>
23
25
  <i
24
26
  class="m-0"
25
- :class="direction > 0 ? 'i-chevron-right' : 'i-chevron-left'"
27
+ :class="direction > 0
28
+ ? 'i-chevron-right group-active:translate-x-1'
29
+ : 'i-chevron-left group-active:-translate-x-1'"
26
30
  ></i>
27
31
  </slot>
28
32
  </button>
@@ -0,0 +1,55 @@
1
+ <script setup lang="ts">
2
+ import { type ImgHTMLAttributes, computed } from 'vue';
3
+ import {
4
+ img as getImg,
5
+ imgSizes as getImgSizes,
6
+ } from '@ecomplus/utils';
7
+
8
+ export interface PictureSize {
9
+ url: string;
10
+ alt?: string;
11
+ size?: string;
12
+ }
13
+
14
+ export interface Props {
15
+ picture: {
16
+ url: string;
17
+ alt?: string;
18
+ size?: string;
19
+ normal?: PictureSize;
20
+ big?: PictureSize;
21
+ zoom?: PictureSize;
22
+ small?: PictureSize;
23
+ _id?: string;
24
+ tag?: string;
25
+ };
26
+ loading?: 'lazy' | 'eager';
27
+ decoding?: 'async' | 'sync' | 'auto';
28
+ }
29
+
30
+ const props = withDefaults(defineProps<Props>(), {
31
+ loading: 'lazy',
32
+ });
33
+ const image = computed(() => {
34
+ if ((props.picture as PictureSize).url) {
35
+ return props.picture;
36
+ }
37
+ return getImg(props.picture) as PictureSize;
38
+ });
39
+ const dimensions = computed(() => {
40
+ return getImgSizes(image.value) as { width: number, height: number };
41
+ });
42
+ const attrs = computed<ImgHTMLAttributes>(() => ({
43
+ ...props,
44
+ src: image.value.url,
45
+ alt: image.value.alt,
46
+ width: dimensions.value.width || null,
47
+ height: dimensions.value.height || null,
48
+ decoding: props.decoding || (dimensions.value.height ? 'async' : null),
49
+ picture: null,
50
+ }));
51
+ </script>
52
+
53
+ <template>
54
+ <img v-bind="attrs" />
55
+ </template>
@@ -72,6 +72,16 @@ const willChange = computed(() => {
72
72
  if (width.value === 0) properties += ', width';
73
73
  return properties;
74
74
  });
75
+ const setInitialStyles = (el: HTMLElement) => {
76
+ el.style.setProperty('--fade-will-change', willChange.value);
77
+ el.style.setProperty('--fade-duration', duration.value);
78
+ el.style.setProperty('--fade-enter-opacity', String(enterFromOpacity.value));
79
+ el.style.setProperty('--fade-enter-transform', String(enterFromTransform.value));
80
+ el.style.setProperty('--fade-enter-height', String(enterFromHeight.value));
81
+ el.style.setProperty('--fade-enter-width', String(enterFromWidth.value));
82
+ el.style.setProperty('--fade-leave-opacity', String(leaveToOpacity.value));
83
+ el.style.setProperty('--fade-leave-transform', String(leaveToTransform.value));
84
+ };
75
85
  const onEnter = (el: HTMLElement) => {
76
86
  if (props.slide && !props.isFloating && props.isEnterFrom) {
77
87
  if (isSlideY.value) {
@@ -126,7 +136,9 @@ const onLeave = (el: HTMLElement) => {
126
136
  <template>
127
137
  <Transition
128
138
  name="sf-fade"
139
+ @before-enter="setInitialStyles"
129
140
  @enter="onEnter"
141
+ @before-leave="setInitialStyles"
130
142
  @after-enter="onAfterEnter"
131
143
  @leave="onLeave"
132
144
  >
@@ -135,33 +147,26 @@ const onLeave = (el: HTMLElement) => {
135
147
  </template>
136
148
 
137
149
  <style>
138
- .sf-fade-enter-active,
139
- .sf-fade-leave-active {
140
- transition: opacity var(--duration), transform var(--duration),
141
- height var(--duration), width var(--duration);
142
- overflow: hidden;
143
- }
144
- </style>
145
-
146
- <style scoped>
147
- * {
148
- will-change: v-bind(willChange);
150
+ [class*="sf-fade-"] {
151
+ will-change: var(--fade-will-change);
149
152
  transform: translateZ(0);
150
153
  backface-visibility: hidden;
151
154
  perspective: 1000px;
152
155
  }
153
156
  .sf-fade-enter-active,
154
157
  .sf-fade-leave-active {
155
- --duration: v-bind(duration);
158
+ transition: opacity var(--fade-duration), transform var(--fade-duration),
159
+ height var(--fade-duration), width var(--fade-duration);
160
+ overflow: hidden;
156
161
  }
157
162
  .sf-fade-enter-from {
158
- opacity: v-bind(enterFromOpacity);
159
- transform: v-bind(enterFromTransform);
160
- height: v-bind(enterFromHeight);
161
- width: v-bind(enterFromWidth);
163
+ opacity: var(--fade-enter-opacity);
164
+ transform: var(--fade-enter-transform);
165
+ height: var(--fade-enter-height);
166
+ width: var(--fade-enter-width);
162
167
  }
163
168
  .sf-fade-leave-to {
164
- opacity: v-bind(leaveToOpacity);
165
- transform: v-bind(leaveToTransform);
169
+ opacity: var(--fade-leave-opacity);
170
+ transform: var(--fade-leave-transform);
166
171
  }
167
172
  </style>
@@ -73,8 +73,10 @@ if (!ogImage) {
73
73
  {cmsMetatags?.twitter_username &&
74
74
  <meta name="twitter:site" content={cmsMetatags.twitter_username} />}
75
75
  <meta name="ecom-store-id" content={String(storeId)}>
76
- {pwaInfo && <Fragment set:html={pwaInfo.webManifest.linkTag} />}
77
76
  <script>
78
77
  import { registerSW } from 'virtual:pwa-register';
79
78
  registerSW({ immediate: true });
80
79
  </script>
80
+ {pwaInfo && <Fragment set:html={pwaInfo.webManifest.linkTag} />}
81
+ {(!pwaInfo && !import.meta.env.DEV) &&
82
+ <link rel="manifest" href="/manifest.webmanifest" />}
@@ -2,6 +2,7 @@ import type { App } from 'vue';
2
2
  import { i18n, formatMoney } from '@ecomplus/utils';
3
3
  import Fade from '@@sf/components/globals/Fade.vue';
4
4
  import ALink from '@@sf/components/globals/ALink.vue';
5
+ import AImg from '@@sf/components/globals/AImg.vue';
5
6
 
6
7
  const formatPercentage = (value: number, digits = 1) => {
7
8
  return Number.isInteger(value) ? `${value}%` : `${value.toFixed(digits)}%`;
@@ -22,6 +23,7 @@ export default (app: App) => {
22
23
  });
23
24
  app.component('Fade', Fade);
24
25
  app.component('ALink', ALink);
26
+ app.component('AImg', AImg);
25
27
  };
26
28
 
27
29
  export type FormatPercentage = typeof formatPercentage;
@@ -23,6 +23,7 @@ declare module '@vue/runtime-core' {
23
23
  export interface GlobalComponents {
24
24
  Fade: typeof import('@@sf/components/globals/Fade.vue')['default'];
25
25
  ALink: typeof import('@@sf/components/globals/ALink.vue')['default'];
26
+ AImg: typeof import('@@sf/components/globals/AImg.vue')['default'];
26
27
  }
27
28
  }
28
29
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "0.6.3",
4
+ "version": "0.6.5",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {
@@ -1 +0,0 @@
1
- import{v as G}from"./runtime-dom.esm-bundler.cb4db78a.js";import{p as J}from"./modules-info.01f8d523.js";import{c as g,d as z,_ as R,m as Q,o as u,a as p,p as x,e as I,n as D,j as d,q as b,s as O,u as X,v as Y,x as Z,y as ee,k as $,w as m,l as q,g as C,z as te,A as ae,B as oe,F as ne,C as re,b as se}from"./_plugin-vue_export-helper.43eaff51.js";import{u as le,a as ie,b as ue}from"./index.3243538d.js";/* empty css */import"./session-utm.72684b84.js";import"./idle-callback.889bf0ea.js";import"./format-money.060d67ef.js";const ce=o=>{const r=g(()=>o.slides.map(({html:e})=>J(e).value)),a=g(()=>r.value.filter(e=>e).length);return{parsedContents:r,countValidSlides:a}},K=Symbol("carousel"),de=z({__name:"CarouselControl",props:{direction:{default:1}},setup(o,{expose:r}){r();const{changeSlide:a}=Q(K),e={changeSlide:a};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}}),fe=["aria-label","data-carousel-control"];function pe(o,r,a,e,s,n){return u(),p("button",{type:"button","aria-label":a.direction>0?"Próximo":"Anterior",onClick:r[0]||(r[0]=i=>e.changeSlide(a.direction)),"data-carousel-control":a.direction>0?"next":"previous"},[x(o.$slots,"default",{},()=>[I("i",{class:D(["m-0",a.direction>0?"i-chevron-right":"i-chevron-left"])},null,2)])],8,fe)}const U=R(de,[["render",pe]]),me=z({__name:"Carousel",props:{as:{default:"ul"},modelValue:{default:1},autoplay:null},emits:["update:modelValue"],setup(o,{expose:r,emit:a}){r();const e=o,s=d(e.modelValue-1);b(O(e,"modelValue"),t=>{s.value=t-1}),b(s,(t,l)=>{t!==l&&a("update:modelValue",t+1)});const n=d(null),{x:i,isScrolling:f,arrivedState:S}=le(n),y=g(()=>S.left),w=g(()=>S.right),h=d([]),B=d(0),P=d(0),V=d(0),j=()=>{B.value=n.value.scrollWidth,P.value=n.value.offsetWidth},A=()=>{const t=[...n.value.children];h.value=t.map(l=>({offsetLeft:l.offsetLeft,width:l.offsetWidth}))},E=t=>{const l=t>0?s.value:s.value+t,M=h.value[l]?.width||0;return M?M*t:0},L=()=>{const t=h.value.findIndex(l=>Math.abs(l.offsetLeft-i.value)<=5);t>-1&&(s.value=t||0)},T=()=>{const t=B.value-P.value;V.value=h.value.findIndex(({offsetLeft:l})=>l>=t-5)};let c=null;const v=()=>{e.autoplay&&(clearTimeout(c),c=setTimeout(()=>{_(1)},e.autoplay))},_=t=>{if(t<0){if(y.value){T(),s.value=V.value-1,_(1);return}}else if(w.value){s.value=1,_(-1);return}const l=E(t);l&&(n.value.scrollBy({left:l,behavior:"smooth"}),v())};b(f,t=>{t?clearTimeout(c):(L(),v())});const N=d(null),F=ie(N);b(F,t=>{t?clearTimeout(c):v()});const W=()=>{n.value&&(j(),A(),L(),T())},k=ue(W,400);X(()=>{W(),Y(()=>{[...n.value.children].forEach(t=>{t.setAttribute("tabindex","0")})}),v(),window.addEventListener("resize",k)}),Z(()=>{window.removeEventListener("resize",k),clearTimeout(c)}),ee(K,{autoplay:O(e,"autoplay"),changeSlide:_,isBoundLeft:y,isBoundRight:w});const H={props:e,emit:a,currentIndex:s,wrapper:n,currentPos:i,isScrolling:f,arrivedState:S,isBoundLeft:y,isBoundRight:w,slidesWidth:h,wrapperScrollWidth:B,wrapperVisibleWidth:P,indexCount:V,calcWrapperWidth:j,calcSlidesWidth:A,calcNextWidth:E,calcCurrentIndex:L,calcIndexCount:T,get autoplayTimer(){return c},set autoplayTimer(t){c=t},restartAutoplay:v,changeSlide:_,carousel:N,isHovered:F,calcOnInit:W,onResize:k,CarouselControl:U};return Object.defineProperty(H,"__isScriptSetup",{enumerable:!1,value:!0}),H}}),he={ref:"carousel","data-carousel":""};function ve(o,r,a,e,s,n){return u(),p("div",he,[(u(),$(q(a.as),{ref:"wrapper","data-carousel-wrapper":""},{default:m(()=>[x(o.$slots,"default")]),_:3},512)),x(o.$slots,"controls",te(ae({changeSlide:e.changeSlide,isBoundLeft:e.isBoundLeft,isBoundRight:e.isBoundRight,currentPage:e.currentIndex+1,pageCount:e.indexCount+1})),()=>[C(e.CarouselControl,{direction:-1},{default:m(()=>[x(o.$slots,"previous")]),_:3}),C(e.CarouselControl,null,{default:m(()=>[x(o.$slots,"next")]),_:3})])],512)}const _e=R(me,[["render",ve]]),xe=z({__name:"PitchBar",props:{slides:null},setup(o,{expose:r}){r();const a=o,{parsedContents:e,countValidSlides:s}=ce(a),n={props:a,parsedContents:e,countValidSlides:s,Carousel:_e,CarouselControl:U};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),Ce={class:"bg-base-100 relative z-1"},be={class:"container md:w-2/3 mx-auto px-3 py-1"},ge=["innerHTML"],Se={class:"text-xl leading-none text-base-400"};function ye(o,r,a,e,s,n){return u(),p("div",Ce,[I("div",be,[C(e.Carousel,{autoplay:e.countValidSlides>1?7e3:null},{controls:m(()=>[oe(I("div",Se,[C(e.CarouselControl,{direction:-1,class:"pr-2 bg-base-100 hover:text-base-700"}),C(e.CarouselControl,{class:"pl-2 bg-base-100 hover:text-base-700"})],512),[[G,e.countValidSlides>1]])]),default:m(()=>[(u(!0),p(ne,null,re(a.slides,(i,f)=>(u(),p("li",{key:f},[(u(),$(q(i.href?"ALink":"span"),{href:i.href,target:i.target,class:D(["inline-block px-8",i.href?"hover:underline":null])},{default:m(()=>[e.parsedContents[f]?(u(),p("span",{key:0,innerHTML:e.parsedContents[f],class:"prose text-sm text-base-800"},null,8,ge)):se("",!0)]),_:2},1032,["href","target","class"]))]))),128))]),_:1},8,["autoplay"])])])}const Ie=R(xe,[["render",ye]]);export{Ie as default};