cloudcommerce 2.0.4 → 2.0.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.
Files changed (186) hide show
  1. package/.github/workflows/test-apps.yml +2 -2
  2. package/CHANGELOG.md +18 -0
  3. package/README.md +1 -1
  4. package/action.yml +4 -4
  5. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  6. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  7. package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +2 -2
  8. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +1 -1
  9. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  10. package/ecomplus-stores/barra-doce/package.json +2 -2
  11. package/package.json +2 -2
  12. package/packages/api/lib/api.d.ts +8 -2
  13. package/packages/api/lib/api.js +8 -6
  14. package/packages/api/lib/api.js.map +1 -1
  15. package/packages/api/package.json +3 -2
  16. package/packages/api/src/api.ts +12 -6
  17. package/packages/api/tests/index.test.ts +9 -0
  18. package/packages/api/types.d.ts +35 -26
  19. package/packages/apps/affiliate-program/package.json +1 -1
  20. package/packages/apps/correios/package.json +1 -1
  21. package/packages/apps/custom-payment/package.json +1 -1
  22. package/packages/apps/custom-shipping/package.json +1 -1
  23. package/packages/apps/datafrete/package.json +1 -1
  24. package/packages/apps/discounts/package.json +1 -1
  25. package/packages/apps/emails/package.json +1 -1
  26. package/packages/apps/fb-conversions/package.json +1 -1
  27. package/packages/apps/flash-courier/package.json +1 -1
  28. package/packages/apps/frenet/package.json +1 -1
  29. package/packages/apps/galaxpay/package.json +1 -1
  30. package/packages/apps/google-analytics/package.json +1 -1
  31. package/packages/apps/jadlog/package.json +1 -1
  32. package/packages/apps/loyalty-points/package.json +1 -1
  33. package/packages/apps/mandae/package.json +1 -1
  34. package/packages/apps/melhor-envio/package.json +1 -1
  35. package/packages/apps/mercadopago/package.json +1 -1
  36. package/packages/apps/pagarme/package.json +1 -1
  37. package/packages/apps/pagarme-v5/package.json +1 -1
  38. package/packages/apps/paghiper/package.json +1 -1
  39. package/packages/apps/pix/package.json +1 -1
  40. package/packages/apps/tiny-erp/package.json +1 -1
  41. package/packages/apps/webhooks/package.json +1 -1
  42. package/packages/cli/package.json +1 -1
  43. package/packages/config/package.json +1 -1
  44. package/packages/emails/package.json +1 -1
  45. package/packages/eslint/package.json +1 -1
  46. package/packages/events/package.json +1 -1
  47. package/packages/feeds/package.json +1 -1
  48. package/packages/firebase/package.json +1 -1
  49. package/packages/i18n/package.json +1 -1
  50. package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -1
  51. package/packages/modules/package.json +1 -1
  52. package/packages/modules/src/firebase/functions-checkout/handle-order-transaction.ts +1 -1
  53. package/packages/passport/package.json +1 -1
  54. package/packages/ssr/lib/lib/cron-ssr-save-views.js +8 -4
  55. package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
  56. package/packages/ssr/package.json +2 -2
  57. package/packages/ssr/src/lib/cron-ssr-save-views.ts +8 -4
  58. package/packages/storefront/config/storefront.tailwind.cjs +10 -1
  59. package/packages/storefront/config/storefront.unocss.cjs +1 -1
  60. package/packages/storefront/dist/client/_astro/AccountPage.oxrx8xO0.js +1 -0
  61. package/packages/storefront/dist/client/_astro/CartSidebar.ShqcM66P.js +1 -0
  62. package/packages/storefront/dist/client/_astro/HeroSlider.OYdereCn.js +1 -0
  63. package/packages/storefront/dist/client/_astro/PitchBar.RVEArMQA.js +1 -0
  64. package/packages/storefront/dist/client/_astro/Prices.Bsod-tLh.js +1 -0
  65. package/packages/storefront/dist/client/_astro/ProductDetails.TQM36pzk.js +7 -0
  66. package/packages/storefront/dist/client/_astro/ProductShelf.HX1P9sTW.js +1 -0
  67. package/packages/storefront/dist/client/_astro/ProductShelf._0iHMZBO.js +1 -0
  68. package/packages/storefront/dist/client/_astro/QuantitySelector.SEAsIOhe.js +1 -0
  69. package/packages/storefront/dist/client/_astro/SearchModal.JVuqMQFe.js +1 -0
  70. package/packages/storefront/dist/client/_astro/SearchShowcase.zwEq0xsL.js +1 -0
  71. package/packages/storefront/dist/client/_astro/ShopHeader.BoPmUmjI.js +7 -0
  72. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.40kDRyEO.js +1 -0
  73. package/packages/storefront/dist/client/_astro/{_slug_.cfRx-rdA.css → _slug_.PTG68eA8.css} +1 -1
  74. package/packages/storefront/dist/client/_astro/client.nPN_zw-c.js +1 -0
  75. package/packages/storefront/dist/client/_astro/customer-session.yn5lG3w3.js +7 -0
  76. package/packages/storefront/dist/client/_astro/format-money.ykh8O7d2.js +1 -0
  77. package/packages/storefront/dist/client/_astro/grid-title.z5ui_5pL.js +1 -0
  78. package/packages/storefront/dist/client/_astro/hoisted.FcmEawNA.js +1 -0
  79. package/packages/storefront/dist/client/_astro/hoisted.daSrX1-i.js +1 -0
  80. package/packages/storefront/dist/client/_astro/hoisted.hpPOAcMM.js +1 -0
  81. package/packages/storefront/dist/client/_astro/i18n.MycOopxQ.js +1 -0
  82. package/packages/storefront/dist/client/_astro/img.c2KI4eO6.js +1 -0
  83. package/packages/storefront/dist/client/_astro/index.8acAQSHW.js +1 -0
  84. package/packages/storefront/dist/client/_astro/index.NRzvVgQf.js +1 -0
  85. package/packages/storefront/dist/client/_astro/modules-info.dHD0h8Nc.js +1 -0
  86. package/packages/storefront/dist/client/_astro/name.itYHl42A.js +1 -0
  87. package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.Pr2hdd7G.js +1 -0
  88. package/packages/storefront/dist/client/_astro/shopping-cart.MgpVRgys.js +1 -0
  89. package/packages/storefront/dist/client/_astro/use-analytics.D9xd-k7D.js +1 -0
  90. package/packages/storefront/dist/client/_astro/use-product-card.gKh9czSW.js +1 -0
  91. package/packages/storefront/dist/client/_astro/use-text-value.ZIz7zsXT.js +4 -0
  92. package/packages/storefront/dist/server/chunks/{CartSidebar_gCUGFy65.mjs → CartSidebar_8VAKl-jR.mjs} +1 -1
  93. package/packages/storefront/dist/server/chunks/{SearchModal_2uYZ9tHy.mjs → SearchModal_7debttOi.mjs} +5 -5
  94. package/packages/storefront/dist/server/chunks/{_.._FnNLvTNv.mjs → _.._D6rq0cLa.mjs} +1 -1
  95. package/packages/storefront/dist/server/chunks/{account_iZ2QmK5E.mjs → _page__WXDIwV7g.mjs} +1 -1
  96. package/packages/storefront/dist/server/chunks/{~fallback_wxuqpDXG.mjs → account_DOT2RzND.mjs} +1 -1
  97. package/packages/storefront/dist/server/chunks/astro/{assets-service_TpUb271h.mjs → assets-service_gJYJeEDH.mjs} +9 -5
  98. package/packages/storefront/dist/server/chunks/{astro_PpArQAsY.mjs → astro_H-6uiAAG.mjs} +36 -30
  99. package/packages/storefront/dist/server/chunks/index_eXlHIU83.mjs +6 -0
  100. package/packages/storefront/dist/server/chunks/{node_wOa5hJmt.mjs → node_-eQO2yOn.mjs} +1 -1
  101. package/packages/storefront/dist/server/chunks/pages/{__cEcxuEWe.mjs → __fI3NeWvy.mjs} +1750 -730
  102. package/packages/storefront/dist/server/chunks/pages/_page__Piz8geXW.mjs +165 -0
  103. package/packages/storefront/dist/server/chunks/pages/{account_WliDuQOB.mjs → account_6pD7OYw-.mjs} +6 -3
  104. package/packages/storefront/dist/server/chunks/pages/index_2F5yi6YO.mjs +128 -0
  105. package/packages/storefront/dist/server/chunks/pages/{node_ZaY4t9qW.mjs → node_-Buhxl8v.mjs} +3 -3
  106. package/packages/storefront/dist/server/chunks/pages/{~fallback_TL5hPXF_.mjs → ~fallback_okEL1qQ3.mjs} +25 -8
  107. package/packages/storefront/dist/server/chunks/~fallback_M-xiy2GE.mjs +6 -0
  108. package/packages/storefront/dist/server/entry.mjs +34 -29
  109. package/packages/storefront/dist/server/manifest_oV2meNKS.mjs +196 -0
  110. package/packages/storefront/dist/server/renderers.mjs +5 -612
  111. package/packages/storefront/package.json +3 -3
  112. package/packages/storefront/src/lib/components/globals/ALink.vue +1 -0
  113. package/packages/test-base/package.json +1 -1
  114. package/packages/types/package.json +1 -1
  115. package/packages/storefront/dist/client/_astro/AccountPage.Osc6ffV0.js +0 -1
  116. package/packages/storefront/dist/client/_astro/CartSidebar.LrfpXG2B.js +0 -1
  117. package/packages/storefront/dist/client/_astro/HeroSlider.Zf6kCaqD.js +0 -1
  118. package/packages/storefront/dist/client/_astro/PitchBar.N4d9fV8H.js +0 -1
  119. package/packages/storefront/dist/client/_astro/Prices.eQ9Vd255.js +0 -1
  120. package/packages/storefront/dist/client/_astro/ProductDetails.Ln_jf57U.js +0 -7
  121. package/packages/storefront/dist/client/_astro/ProductShelf.X389bv9S.js +0 -1
  122. package/packages/storefront/dist/client/_astro/ProductShelf.vj6lVDCr.js +0 -1
  123. package/packages/storefront/dist/client/_astro/QuantitySelector.qSJQlvTe.js +0 -1
  124. package/packages/storefront/dist/client/_astro/SearchModal.BrVoDBvg.js +0 -1
  125. package/packages/storefront/dist/client/_astro/SearchShowcase.KAz3nwco.js +0 -1
  126. package/packages/storefront/dist/client/_astro/ShopHeader.mFKGzhIu.js +0 -7
  127. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper._suIQ7WC.js +0 -1
  128. package/packages/storefront/dist/client/_astro/client.PdegUP6S.js +0 -1
  129. package/packages/storefront/dist/client/_astro/customer-session.KkTHFOXl.js +0 -7
  130. package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
  131. package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
  132. package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
  133. package/packages/storefront/dist/client/_astro/ecom-utils.Ld2zf-Ve.js +0 -1
  134. package/packages/storefront/dist/client/_astro/format-money.Axn0YFLJ.js +0 -1
  135. package/packages/storefront/dist/client/_astro/grid-title.GntHOijE.js +0 -1
  136. package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
  137. package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
  138. package/packages/storefront/dist/client/_astro/hoisted.3ec9NcvP.js +0 -1
  139. package/packages/storefront/dist/client/_astro/hoisted.UnTlypMd.js +0 -1
  140. package/packages/storefront/dist/client/_astro/i18n.3-NUtxYq.js +0 -1
  141. package/packages/storefront/dist/client/_astro/img.pozlYdd3.js +0 -1
  142. package/packages/storefront/dist/client/_astro/index.TkCbiY_p.js +0 -1
  143. package/packages/storefront/dist/client/_astro/index.m6fK0JXC.js +0 -1
  144. package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
  145. package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
  146. package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
  147. package/packages/storefront/dist/client/_astro/modules-info.mmwB1qIJ.js +0 -1
  148. package/packages/storefront/dist/client/_astro/name.49dZlpDx.js +0 -1
  149. package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
  150. package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
  151. package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
  152. package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
  153. package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
  154. package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
  155. package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
  156. package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
  157. package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
  158. package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
  159. package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
  160. package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
  161. package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
  162. package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
  163. package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
  164. package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
  165. package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
  166. package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
  167. package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
  168. package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
  169. package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
  170. package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
  171. package/packages/storefront/dist/client/_astro/shopping-cart.Ean2uW2R.js +0 -1
  172. package/packages/storefront/dist/client/_astro/use-analytics.Y7amTmnr.js +0 -1
  173. package/packages/storefront/dist/client/_astro/use-product-card.zB4z32bC.js +0 -1
  174. package/packages/storefront/dist/client/_astro/use-text-value.f9pDzruv.js +0 -4
  175. package/packages/storefront/dist/client/app/account/index.html +0 -56
  176. package/packages/storefront/dist/client/app/index.html +0 -96
  177. package/packages/storefront/dist/client/headset-gamer-corsair-hs40-raptor-ca-9011122-naap-vinho/index.html +0 -107
  178. package/packages/storefront/dist/client/index.html +0 -120
  179. package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +0 -107
  180. package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +0 -107
  181. package/packages/storefront/dist/client/teclado-gamer-fortrek-mecanico-k5-rgb-outemu-blue-preto/index.html +0 -107
  182. package/packages/storefront/dist/client/~fallback/index.html +0 -74
  183. package/packages/storefront/dist/server/chunks/index_1q5IpD39.mjs +0 -6
  184. package/packages/storefront/dist/server/chunks/index_JEU6B2DI.mjs +0 -6
  185. package/packages/storefront/dist/server/chunks/pages/index_2bQLkQf-.mjs +0 -317
  186. package/packages/storefront/dist/server/manifest_YgAgEwvF.mjs +0 -196
@@ -1,617 +1,10 @@
1
- import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, inject, ref, watch, toRef, onMounted, onBeforeUnmount, provide, h, createSSRApp } from 'vue';
2
- import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, renderToString } from 'vue/server-renderer';
3
- import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
4
- import { _ as _export_sfc } from './chunks/pages/__cEcxuEWe.mjs';
5
- import { useScroll, useElementHover, useDebounceFn } from '@vueuse/core';
1
+ import { defineComponent, h, createSSRApp } from 'vue';
2
+ import { renderToString } from 'vue/server-renderer';
3
+ import { o as mod, p as createApp } from './chunks/pages/__fI3NeWvy.mjs';
6
4
 
7
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
8
- __name: "Fade",
9
- props: {
10
- speed: { default: "default" },
11
- slide: {},
12
- isFloating: { type: Boolean, default: false },
13
- isLeaveTo: { type: Boolean, default: true },
14
- isEnterFrom: { type: Boolean, default: true }
15
- },
16
- setup(__props, { expose: __expose }) {
17
- __expose();
18
- const props = __props;
19
- const duration = computed(() => {
20
- if (props.speed === "default")
21
- return "var(--transition, .2s linear)";
22
- return `var(--transition-${props.speed}, .4s linear)`;
23
- });
24
- const transform = computed(() => {
25
- switch (props.slide) {
26
- case "down":
27
- return "translate3d(0, -100%, 0)";
28
- case "left":
29
- return "translate3d(-100%, 0, 0)";
30
- case "right":
31
- return "translate3d(100%, 0, 0)";
32
- case "up":
33
- return "translate3d(0, 100%, 0)";
34
- default:
35
- return "none";
36
- }
37
- });
38
- const opacity = computed(() => {
39
- return transform.value !== "none" ? 0.1 : 0;
40
- });
41
- const enterFromOpacity = computed(() => {
42
- return props.isEnterFrom ? opacity.value : 1;
43
- });
44
- const leaveToOpacity = computed(() => {
45
- return props.isLeaveTo ? opacity.value : 1;
46
- });
47
- const enterFromTransform = computed(() => {
48
- return props.isEnterFrom ? transform.value : "none";
49
- });
50
- const leaveToTransform = computed(() => {
51
- return props.isLeaveTo ? transform.value : "none";
52
- });
53
- const isSlideY = computed(() => {
54
- return props.slide === "down" || props.slide === "up";
55
- });
56
- const height = computed(() => {
57
- if (props.isFloating)
58
- return null;
59
- return isSlideY.value ? 0 : "auto";
60
- });
61
- const width = computed(() => {
62
- if (props.isFloating)
63
- return null;
64
- return props.slide && !isSlideY.value ? 0 : "auto";
65
- });
66
- const enterFromHeight = computed(() => {
67
- return props.isEnterFrom ? height.value : "auto";
68
- });
69
- const enterFromWidth = computed(() => {
70
- return props.isEnterFrom ? width.value : "auto";
71
- });
72
- const willChange = computed(() => {
73
- let properties = "opacity";
74
- if (transform.value !== "none")
75
- properties += ", transform";
76
- if (height.value === 0)
77
- properties += ", height";
78
- if (width.value === 0)
79
- properties += ", width";
80
- return properties;
81
- });
82
- const setInitialStyles = (el) => {
83
- el.style.setProperty("--fade-will-change", willChange.value);
84
- el.style.setProperty("--fade-duration", duration.value);
85
- el.style.setProperty("--fade-enter-opacity", String(enterFromOpacity.value));
86
- el.style.setProperty("--fade-enter-transform", String(enterFromTransform.value));
87
- el.style.setProperty("--fade-enter-height", String(enterFromHeight.value));
88
- el.style.setProperty("--fade-enter-width", String(enterFromWidth.value));
89
- el.style.setProperty("--fade-leave-opacity", String(leaveToOpacity.value));
90
- el.style.setProperty("--fade-leave-transform", String(leaveToTransform.value));
91
- };
92
- const onEnter = (el) => {
93
- if (props.slide && !props.isFloating && props.isEnterFrom) {
94
- if (isSlideY.value) {
95
- el.style.width = getComputedStyle(el).width;
96
- el.style.height = "auto";
97
- } else {
98
- el.style.width = "auto";
99
- el.style.height = getComputedStyle(el).height;
100
- }
101
- el.style.position = "absolute";
102
- el.style.visibility = "hidden";
103
- const { width: width2, height: height2 } = getComputedStyle(el);
104
- el.style.width = isSlideY.value ? "" : "0";
105
- el.style.height = isSlideY.value ? "0" : "";
106
- el.style.position = "";
107
- el.style.visibility = "";
108
- getComputedStyle(el)[isSlideY.value ? "height" : "width"];
109
- requestAnimationFrame(() => {
110
- if (isSlideY.value) {
111
- el.style.height = height2;
112
- } else {
113
- el.style.width = width2;
114
- }
115
- });
116
- }
117
- };
118
- const onAfterEnter = (el) => {
119
- if (props.slide && !props.isFloating && props.isEnterFrom) {
120
- el.style[isSlideY.value ? "height" : "width"] = "";
121
- }
122
- };
123
- const onLeave = (el) => {
124
- if (props.slide && !props.isFloating && props.isLeaveTo) {
125
- if (isSlideY.value) {
126
- el.style.height = getComputedStyle(el).height;
127
- } else {
128
- el.style.width = getComputedStyle(el).width;
129
- }
130
- const sizeProp = isSlideY.value ? "height" : "width";
131
- getComputedStyle(el)[sizeProp];
132
- requestAnimationFrame(() => {
133
- el.style[sizeProp] = "0";
134
- });
135
- }
136
- };
137
- const __returned__ = { props, duration, transform, opacity, enterFromOpacity, leaveToOpacity, enterFromTransform, leaveToTransform, isSlideY, height, width, enterFromHeight, enterFromWidth, willChange, setInitialStyles, onEnter, onAfterEnter, onLeave };
138
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
139
- return __returned__;
140
- }
141
- });
142
- function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
143
- ssrRenderSlotInner(_ctx.$slots, "default", {}, null, _push, _parent, null, true);
144
- }
145
- const _sfc_setup$5 = _sfc_main$5.setup;
146
- _sfc_main$5.setup = (props, ctx) => {
147
- const ssrContext = useSSRContext();
148
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Fade.vue");
149
- return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
150
- };
151
- const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["ssrRender", _sfc_ssrRender$5]]);
152
-
153
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
154
- __name: "ALink",
155
- props: {
156
- href: {},
157
- target: {}
158
- },
159
- setup(__props, { expose: __expose }) {
160
- __expose();
161
- const props = __props;
162
- const linkTarget = computed(() => {
163
- if (!props.href)
164
- return void 0;
165
- if (props.target)
166
- return props.target;
167
- if (props.href.startsWith("http")) {
168
- const domain = globalThis.$storefront.settings.domain || window.location.host;
169
- if (props.href.startsWith(`https://${domain}`))
170
- return void 0;
171
- }
172
- return void 0;
173
- });
174
- const __returned__ = { props, linkTarget };
175
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
176
- return __returned__;
177
- }
178
- });
179
- function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
180
- ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.href ? "a" : "span"), mergeProps({
181
- href: $props.href,
182
- target: $setup.linkTarget,
183
- rel: $setup.linkTarget === "_blank" ? "noopener" : void 0
184
- }, _attrs), {
185
- default: withCtx((_, _push2, _parent2, _scopeId) => {
186
- if (_push2) {
187
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
188
- } else {
189
- return [
190
- renderSlot(_ctx.$slots, "default")
191
- ];
192
- }
193
- }),
194
- _: 3
195
- }), _parent);
196
- }
197
- const _sfc_setup$4 = _sfc_main$4.setup;
198
- _sfc_main$4.setup = (props, ctx) => {
199
- const ssrContext = useSSRContext();
200
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/ALink.vue");
201
- return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
202
- };
203
- const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["ssrRender", _sfc_ssrRender$4]]);
204
-
205
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
206
- __name: "AImg",
207
- props: {
208
- picture: {},
209
- loading: { default: "lazy" },
210
- decoding: {},
211
- alt: {},
212
- preferredSize: {}
213
- },
214
- setup(__props, { expose: __expose }) {
215
- __expose();
216
- const props = __props;
217
- const image = computed(() => {
218
- if (props.picture.url) {
219
- return props.picture;
220
- }
221
- return img(props.picture, void 0, props.preferredSize) || {};
222
- });
223
- const dimensions = computed(() => {
224
- return imgSizes(image.value);
225
- });
226
- const attrs = computed(() => ({
227
- src: image.value.url,
228
- alt: image.value.alt || props.alt,
229
- width: dimensions.value.width || void 0,
230
- height: dimensions.value.height || void 0,
231
- loading: props.loading,
232
- decoding: props.decoding || (dimensions.value.height ? "async" : void 0)
233
- }));
234
- const __returned__ = { props, image, dimensions, attrs };
235
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
236
- return __returned__;
237
- }
238
- });
239
- function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
240
- _push(`<img${ssrRenderAttrs(mergeProps($setup.attrs, _attrs))}>`);
241
- }
242
- const _sfc_setup$3 = _sfc_main$3.setup;
243
- _sfc_main$3.setup = (props, ctx) => {
244
- const ssrContext = useSSRContext();
245
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/AImg.vue");
246
- return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
247
- };
248
- const AImg = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender$3]]);
249
-
250
- const rowClassName = "bg-gray-200 rounded-md dark:bg-gray-700";
251
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
252
- __name: "Skeleton",
253
- props: {
254
- isBold: { type: Boolean },
255
- isLarge: { type: Boolean }
256
- },
257
- setup(__props, { expose: __expose }) {
258
- __expose();
259
- const props = __props;
260
- const firstRowClassName = computed(() => {
261
- return `${rowClassName} ${props.isBold ? "h-8 mb-6" : "h-2.5 mb-4"}`;
262
- });
263
- const nextRowsClassName = computed(() => {
264
- return `${rowClassName} ${props.isBold ? "h-5 mb-4" : "h-2 mb-2.5"}`;
265
- });
266
- const __returned__ = { props, rowClassName, firstRowClassName, nextRowsClassName };
267
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
268
- return __returned__;
269
- }
270
- });
271
- function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
272
- _push(`<div${ssrRenderAttrs(mergeProps({
273
- role: "status",
274
- class: ["animate-pulse", $props.isLarge ? "max-w-4xl" : "max-w-sm"]
275
- }, _attrs))}><div class="${ssrRenderClass([$setup.firstRowClassName, $props.isLarge ? "w-96" : "w-48"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[680px]" : "max-w-[340px]"])}"></div><div class="${ssrRenderClass($setup.nextRowsClassName)}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[660px]" : "max-w-[330px]"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[600px]" : "max-w-[300px]"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[720px]" : "max-w-[360px]"])}"></div><span class="sr-only">Loading...</span></div>`);
276
- }
277
- const _sfc_setup$2 = _sfc_main$2.setup;
278
- _sfc_main$2.setup = (props, ctx) => {
279
- const ssrContext = useSSRContext();
280
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Skeleton.vue");
281
- return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
282
- };
283
- const Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
284
-
285
- const formatPercentage = (value, digits = 1) => {
286
- return Number.isInteger(value) ? `${value}%` : `${value.toFixed(digits)}%`;
287
- };
288
- const createApp$1 = (app) => {
289
- app.use({
290
- // eslint-disable-next-line no-shadow
291
- install: (app2, options) => {
292
- app2.config.globalProperties.$t = (dict, lang) => {
293
- return i18n(dict, lang || options?.lang);
294
- };
295
- app2.config.globalProperties.$money = formatMoney;
296
- app2.config.globalProperties.$percentage = formatPercentage;
297
- app2.config.globalProperties.$settings = globalThis.$storefront.settings;
298
- app2.config.globalProperties.$apiContext = globalThis.$storefront.apiContext;
299
- }
300
- });
301
- app.component("Fade", Fade);
302
- app.component("ALink", ALink);
303
- app.component("AImg", AImg);
304
- app.component("Skeleton", Skeleton);
305
- };
306
-
307
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
308
- __name: "CarouselControl",
309
- props: {
310
- isPrev: { type: Boolean, default: false }
311
- },
312
- setup(__props, { expose: __expose }) {
313
- __expose();
314
- const { axis, changeSlide } = inject(carouselKey);
315
- const isX = axis === "x";
316
- const __returned__ = { axis, changeSlide, isX };
317
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
318
- return __returned__;
319
- }
320
- });
321
- function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
322
- _push(`<button${ssrRenderAttrs(mergeProps({
323
- type: "button",
324
- "aria-label": !$props.isPrev ? "Pr\xF3ximo" : "Anterior",
325
- class: ["group absolute z-[11]", $setup.isX ? `${!$props.isPrev ? "right-0" : "left-0"} top-0` : `${!$props.isPrev ? "bottom-0" : "top-0"} left-0`],
326
- "data-carousel-control": !$props.isPrev ? "next" : "previous"
327
- }, _attrs))}>`);
328
- ssrRenderSlot(_ctx.$slots, "default", {}, () => {
329
- _push(`<i class="${ssrRenderClass([{
330
- "group-active:translate-x-1": $setup.isX && !$props.isPrev,
331
- "rotate-180 group-active:-translate-x-1": $setup.isX && $props.isPrev,
332
- "rotate-90 group-active:translate-y-1": !$setup.isX && !$props.isPrev,
333
- "-rotate-90 group-active:-translate-y-1": !$setup.isX && $props.isPrev
334
- }, "i-chevron-right m-0"])}"></i>`);
335
- }, _push, _parent);
336
- _push(`</button>`);
337
- }
338
- const _sfc_setup$1 = _sfc_main$1.setup;
339
- _sfc_main$1.setup = (props, ctx) => {
340
- const ssrContext = useSSRContext();
341
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CarouselControl.vue");
342
- return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
343
- };
344
- const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);
345
-
346
- const carouselKey = Symbol("carousel");
347
- const _sfc_main = /* @__PURE__ */ defineComponent({
348
- __name: "Carousel",
349
- props: {
350
- as: { default: "ul" },
351
- index: { default: 0 },
352
- autoplay: {},
353
- axis: { default: "x" },
354
- hasControls: { type: Boolean },
355
- wrapperKey: {}
356
- },
357
- emits: ["update:index"],
358
- setup(__props, { expose: __expose, emit: __emit }) {
359
- __expose();
360
- const props = __props;
361
- const emit = __emit;
362
- const activeIndex = ref(0);
363
- watch(toRef(props, "index"), (index) => {
364
- if (index !== activeIndex.value) {
365
- const step = index - activeIndex.value;
366
- changeSlide(step, false);
367
- }
368
- }, {
369
- immediate: true
370
- });
371
- watch(activeIndex, (current, previous) => {
372
- if (current !== previous) {
373
- emit("update:index", current);
374
- }
375
- });
376
- const wrapper = ref(null);
377
- const { [props.axis]: currentPos, isScrolling, arrivedState } = useScroll(wrapper);
378
- const isX = props.axis === "x";
379
- const isBoundStart = computed(() => isX ? arrivedState.left : arrivedState.top);
380
- const isBoundEnd = computed(() => isX ? arrivedState.right : arrivedState.bottom);
381
- const slideSizes = ref([]);
382
- const wrapperScrollSize = ref(0);
383
- const wrapperVisibleSize = ref(0);
384
- const calcWrapperSize = () => {
385
- if (!wrapper.value)
386
- return;
387
- if (isX) {
388
- wrapperScrollSize.value = wrapper.value.scrollWidth;
389
- wrapperVisibleSize.value = wrapper.value.offsetWidth;
390
- } else {
391
- wrapperScrollSize.value = wrapper.value.scrollHeight;
392
- wrapperVisibleSize.value = wrapper.value.offsetHeight;
393
- }
394
- };
395
- const calcSlidesSize = () => {
396
- if (!wrapper.value)
397
- return;
398
- let childNodes = [...wrapper.value.children];
399
- if (childNodes.length === 1 && childNodes[0].tagName.endsWith("SLOT")) {
400
- childNodes = [...childNodes[0].children];
401
- }
402
- slideSizes.value = childNodes.map((node) => ({
403
- offset: isX ? node.offsetLeft : node.offsetTop,
404
- size: isX ? node.offsetWidth : node.offsetHeight
405
- }));
406
- };
407
- const calcNextOffset = (step) => {
408
- let nextSlideIndex = activeIndex.value + step;
409
- if (nextSlideIndex >= slideSizes.value.length) {
410
- return 0;
411
- }
412
- if (nextSlideIndex < 0) {
413
- nextSlideIndex = slideSizes.value.length + nextSlideIndex;
414
- }
415
- const { offset, size } = slideSizes.value[nextSlideIndex] || {};
416
- if (!size) {
417
- return 0;
418
- }
419
- return offset;
420
- };
421
- const calcCurrentIndex = () => {
422
- const index = slideSizes.value.findIndex((slide) => {
423
- return Math.abs(slide.offset - currentPos.value) <= 5;
424
- });
425
- if (index > -1) {
426
- activeIndex.value = index || 0;
427
- }
428
- };
429
- let autoplayTimer;
430
- const restartAutoplay = () => {
431
- if (props.autoplay) {
432
- clearTimeout(autoplayTimer);
433
- autoplayTimer = setTimeout(() => {
434
- changeSlide(1);
435
- }, props.autoplay);
436
- }
437
- };
438
- const changeSlide = (step, isPageScroll = true) => {
439
- if (slideSizes.value.length < 2) {
440
- return;
441
- }
442
- let nextOffset = -1;
443
- if (currentPos.value + wrapperVisibleSize.value >= wrapperScrollSize.value) {
444
- nextOffset = 0;
445
- } else {
446
- if (isPageScroll && (step === 1 || step === -1)) {
447
- let pageStep = 0;
448
- let pageStepSize = 0;
449
- for (let i = activeIndex.value; i < slideSizes.value.length; i++) {
450
- const { size } = slideSizes.value[i] || {};
451
- if (size) {
452
- pageStep += 1;
453
- pageStepSize += size;
454
- if (pageStepSize + size * 0.75 >= wrapperVisibleSize.value) {
455
- break;
456
- }
457
- }
458
- }
459
- if (pageStep) {
460
- step = step > 0 ? pageStep : -pageStep;
461
- }
462
- }
463
- nextOffset = calcNextOffset(step);
464
- }
465
- wrapper.value?.scrollTo({
466
- [isX ? "left" : "top"]: nextOffset,
467
- behavior: "smooth"
468
- });
469
- restartAutoplay();
470
- };
471
- watch(isScrolling, (_isScrolling) => {
472
- if (_isScrolling) {
473
- clearTimeout(autoplayTimer);
474
- } else {
475
- calcCurrentIndex();
476
- restartAutoplay();
477
- }
478
- });
479
- const carousel = ref(null);
480
- const isHovered = useElementHover(carousel);
481
- watch(isHovered, (_isHovered) => {
482
- if (_isHovered) {
483
- clearTimeout(autoplayTimer);
484
- } else {
485
- restartAutoplay();
486
- }
487
- });
488
- const calcOnInit = () => {
489
- if (!wrapper.value) {
490
- return;
491
- }
492
- calcWrapperSize();
493
- calcSlidesSize();
494
- calcCurrentIndex();
495
- };
496
- const onResize = useDebounceFn(() => {
497
- if (!wrapper.value)
498
- return;
499
- if (isX) {
500
- wrapper.value.scrollLeft = 0;
501
- } else {
502
- wrapper.value.scrollTop = 0;
503
- }
504
- calcOnInit();
505
- }, 400);
506
- onMounted(() => {
507
- calcOnInit();
508
- });
509
- watch(toRef(props, "wrapperKey"), calcOnInit);
510
- onBeforeUnmount(() => {
511
- clearTimeout(autoplayTimer);
512
- });
513
- provide(carouselKey, {
514
- autoplay: toRef(props, "autoplay"),
515
- axis: props.axis,
516
- changeSlide,
517
- isBoundStart,
518
- isBoundEnd
519
- });
520
- const __returned__ = { carouselKey, props, emit, activeIndex, wrapper, currentPos, isScrolling, arrivedState, isX, isBoundStart, isBoundEnd, slideSizes, wrapperScrollSize, wrapperVisibleSize, calcWrapperSize, calcSlidesSize, calcNextOffset, calcCurrentIndex, get autoplayTimer() {
521
- return autoplayTimer;
522
- }, set autoplayTimer(v) {
523
- autoplayTimer = v;
524
- }, restartAutoplay, changeSlide, carousel, isHovered, calcOnInit, onResize, CarouselControl };
525
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
526
- return __returned__;
527
- }
528
- });
529
- function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
530
- _push(`<div${ssrRenderAttrs(mergeProps({
531
- ref: "carousel",
532
- class: `relative ${!$setup.isX ? "overflow-hidden" : ""}`,
533
- "data-carousel": ""
534
- }, _attrs))}>`);
535
- ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), {
536
- ref: "wrapper",
537
- class: ["m-0 flex snap-mandatory list-none scroll-smooth p-0 [&>*]:snap-start [&>*]:outline-none", $setup.isX ? "snap-x overflow-y-hidden overflow-x-scroll" : "h-full flex-col snap-y overflow-x-hidden overflow-y-scroll"],
538
- style: { "scrollbar-width": "none", "-webkit-overflow-scrolling": "touch", "-ms-overflow-style": "none" },
539
- "data-carousel-wrapper": ""
540
- }, {
541
- default: withCtx((_, _push2, _parent2, _scopeId) => {
542
- if (_push2) {
543
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
544
- } else {
545
- return [
546
- renderSlot(_ctx.$slots, "default")
547
- ];
548
- }
549
- }),
550
- _: 3
551
- }), _parent);
552
- ssrRenderSlot(_ctx.$slots, "controls", {
553
- changeSlide: $setup.changeSlide,
554
- isBoundStart: $setup.isBoundStart,
555
- isBoundEnd: $setup.isBoundEnd,
556
- activeIndex: $setup.activeIndex
557
- }, () => {
558
- if ($setup.slideSizes.length > 1 || $props.hasControls) {
559
- _push(ssrRenderComponent($setup["CarouselControl"], { "is-prev": "" }, {
560
- default: withCtx((_, _push2, _parent2, _scopeId) => {
561
- if (_push2) {
562
- ssrRenderSlot(_ctx.$slots, "previous", {}, null, _push2, _parent2, _scopeId);
563
- } else {
564
- return [
565
- renderSlot(_ctx.$slots, "previous")
566
- ];
567
- }
568
- }),
569
- _: 3
570
- }, _parent));
571
- } else {
572
- _push(`<!---->`);
573
- }
574
- if ($setup.slideSizes.length > 1 || $props.hasControls) {
575
- _push(ssrRenderComponent($setup["CarouselControl"], null, {
576
- default: withCtx((_, _push2, _parent2, _scopeId) => {
577
- if (_push2) {
578
- ssrRenderSlot(_ctx.$slots, "next", {}, null, _push2, _parent2, _scopeId);
579
- } else {
580
- return [
581
- renderSlot(_ctx.$slots, "next")
582
- ];
583
- }
584
- }),
585
- _: 3
586
- }, _parent));
587
- } else {
588
- _push(`<!---->`);
589
- }
590
- }, _push, _parent);
591
- _push(`</div>`);
592
- }
593
- const _sfc_setup = _sfc_main.setup;
594
- _sfc_main.setup = (props, ctx) => {
595
- const ssrContext = useSSRContext();
596
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Carousel.vue");
597
- return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
598
- };
599
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
600
-
601
- const createApp = (app) => {
602
- createApp$1(app);
603
- app.component("Carousel", Carousel);
604
- app.component("CarouselControl", CarouselControl);
605
- };
606
-
607
- const mod = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
608
- __proto__: null,
609
- default: createApp
610
- }, Symbol.toStringTag, { value: 'Module' }));
611
-
612
- const setup = (app) => {
5
+ const setup = async (app) => {
613
6
  if ('default' in mod) {
614
- createApp(app);
7
+ await createApp(app);
615
8
  }
616
9
  };
617
10
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "2.0.4",
4
+ "version": "2.0.6",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "bin": {
7
7
  "storefront": "./scripts/build-prod.sh"
@@ -42,7 +42,7 @@
42
42
  "@types/gtag.js": "^0.0.18",
43
43
  "@vite-pwa/astro": "^0.2.0",
44
44
  "@vueuse/core": "10.7.1",
45
- "astro": "4.1.1",
45
+ "astro": "4.1.2",
46
46
  "astro-capo": "^0.0.1",
47
47
  "chroma-js": "^2.4.2",
48
48
  "dotenv": "^16.3.1",
@@ -51,7 +51,7 @@
51
51
  "mime": "^3.0.0",
52
52
  "mitt": "^3.0.1",
53
53
  "semver": "^7.5.4",
54
- "sharp": "^0.33.1",
54
+ "sharp": "^0.32.6",
55
55
  "tailwindcss": "^3.4.1",
56
56
  "unocss": "^0.58.3",
57
57
  "unplugin-auto-import": "^0.17.3",
@@ -13,6 +13,7 @@ const linkTarget = computed(() => {
13
13
  if (props.href.startsWith('http')) {
14
14
  const domain = globalThis.$storefront.settings.domain || window.location.host;
15
15
  if (props.href.startsWith(`https://${domain}`)) return undefined;
16
+ return '_blank';
16
17
  }
17
18
  return undefined;
18
19
  });
@@ -2,7 +2,7 @@
2
2
  "name": "@cloudcommerce/test-base",
3
3
  "private": true,
4
4
  "type": "module",
5
- "version": "2.0.4",
5
+ "version": "2.0.6",
6
6
  "description": "E-Com Plus Cloud Commerce basic setup for testing",
7
7
  "main": "lib/index.js",
8
8
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "2.0.4",
4
+ "version": "2.0.6",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {