cloudcommerce 0.0.128 → 0.0.129

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 (56) hide show
  1. package/.eslintrc.cjs +4 -0
  2. package/CHANGELOG.md +14 -0
  3. package/package.json +8 -8
  4. package/packages/api/package.json +1 -1
  5. package/packages/apps/correios/package.json +1 -1
  6. package/packages/apps/custom-shipping/package.json +1 -1
  7. package/packages/apps/discounts/package.json +1 -1
  8. package/packages/apps/emails/package.json +1 -1
  9. package/packages/apps/frenet/package.json +1 -1
  10. package/packages/apps/infinitepay/lib/ip-create-transaction.js +7 -5
  11. package/packages/apps/infinitepay/lib/ip-create-transaction.js.map +1 -1
  12. package/packages/apps/infinitepay/package.json +2 -2
  13. package/packages/apps/infinitepay/src/ip-create-transaction.ts +8 -5
  14. package/packages/apps/mercadopago/package.json +1 -1
  15. package/packages/apps/pagarme/package.json +1 -1
  16. package/packages/apps/pix/package.json +1 -1
  17. package/packages/apps/tiny-erp/package.json +1 -1
  18. package/packages/cli/package.json +1 -1
  19. package/packages/config/package.json +2 -2
  20. package/packages/emails/package.json +1 -1
  21. package/packages/events/package.json +1 -1
  22. package/packages/firebase/package.json +1 -1
  23. package/packages/i18n/package.json +1 -1
  24. package/packages/modules/package.json +1 -1
  25. package/packages/passport/package.json +1 -1
  26. package/packages/ssr/package.json +3 -3
  27. package/packages/storefront/.eslintrc-auto-import.json +1242 -0
  28. package/packages/storefront/.eslintrc.cjs +11 -0
  29. package/packages/storefront/astro.config.mjs +44 -1
  30. package/packages/storefront/auto-imports.d.ts +1242 -0
  31. package/packages/storefront/components.d.ts +21 -0
  32. package/packages/storefront/{storefront.cms.cjs → config/storefront.cms.cjs} +0 -0
  33. package/packages/storefront/{storefront.cms.mjs → config/storefront.cms.mjs} +0 -0
  34. package/packages/storefront/dist/client/{HeaderButtons.bc4a5c97.js → HeaderButtons.5867fe1c.js} +1 -1
  35. package/packages/storefront/dist/client/assets/_...slug_.88f9146d.css +1 -0
  36. package/packages/storefront/dist/client/chunks/HeaderButtons.cc68ecde.js +1 -0
  37. package/packages/storefront/dist/client/chunks/{LoginForm.7e9c481c.js → LoginForm.5bdbb363.js} +2 -2
  38. package/packages/storefront/dist/client/sw.js +1 -1
  39. package/packages/storefront/dist/server/chunks/{image-pool.f66f99fb.mjs → image-pool.abfa6f7b.mjs} +3 -0
  40. package/packages/storefront/dist/server/entry.mjs +44 -9
  41. package/packages/storefront/package.json +10 -6
  42. package/packages/storefront/src/lib/assets/base.css +16 -33
  43. package/packages/storefront/src/lib/assets/forms.css +209 -0
  44. package/packages/storefront/src/lib/assets/preflight.css +2 -2
  45. package/packages/storefront/src/lib/components/LoginDrawer.vue +13 -5
  46. package/packages/storefront/src/lib/components/atoms/ALink.vue +26 -0
  47. package/packages/storefront/src/lib/layouts/BaseBody.astro +1 -0
  48. package/packages/storefront/storefront.config.mjs +1 -1
  49. package/packages/storefront/tailwind.config.cjs +9 -1
  50. package/packages/storefront/uno.config.cjs +15 -6
  51. package/packages/types/package.json +1 -1
  52. package/packages/storefront/dist/client/assets/_...slug_.acb18581.css +0 -1
  53. package/packages/storefront/dist/client/chunks/HeaderButtons.861af799.js +0 -1
  54. package/packages/storefront/src/lib/assets/dark.css +0 -92
  55. package/packages/storefront/src/lib/assets/pico.css +0 -2080
  56. package/packages/storefront/src/lib/assets/typography.css +0 -15
@@ -7,4 +7,15 @@ module.exports = {
7
7
  'global-require': 'off',
8
8
  'import/no-dynamic-require': 'off',
9
9
  },
10
+ ignorePatterns: [
11
+ 'auto-imports.d.ts',
12
+ 'components.d.ts',
13
+ ],
14
+ overrides: [{
15
+ files: [
16
+ 'src/**/*.vue',
17
+ 'src/**/*.astro',
18
+ ],
19
+ extends: './.eslintrc-auto-import.json',
20
+ }],
10
21
  };
@@ -1,4 +1,4 @@
1
- import { existsSync, lstatSync } from 'fs';
1
+ import { existsSync, lstatSync, readdirSync } from 'fs';
2
2
  import { join as joinPath } from 'path';
3
3
  import * as dotenv from 'dotenv';
4
4
  // https://github.com/import-js/eslint-plugin-import/issues/1810
@@ -9,7 +9,15 @@ import image from '@astrojs/image';
9
9
  import partytown from '@astrojs/partytown';
10
10
  import prefetch from '@astrojs/prefetch';
11
11
  import UnoCSS from 'unocss/astro';
12
+ import AutoImport from 'unplugin-auto-import/astro';
12
13
  import { VitePWA } from 'vite-plugin-pwa';
14
+ import Components from 'unplugin-vue-components/vite';
15
+ import {
16
+ HeadlessUiResolver,
17
+ VueUseComponentsResolver,
18
+ VueUseDirectiveResolver,
19
+ } from 'unplugin-vue-components/resolvers';
20
+ import { ptBr } from '@cloudcommerce/i18n';
13
21
  import getConfig from './storefront.config.mjs';
14
22
 
15
23
  const __dirname = new URL('.', import.meta.url).pathname;
@@ -158,11 +166,46 @@ const genAstroConfig = ({
158
166
  injectReset: false,
159
167
  injectEntry: false,
160
168
  }),
169
+ AutoImport({
170
+ include: [
171
+ /\.vue$/, /\.vue\?vue/,
172
+ /\.mdx?$/,
173
+ /\.astro$/,
174
+ ],
175
+ imports: [
176
+ 'vue',
177
+ '@vueuse/core',
178
+ { '@@i18n': Object.keys(ptBr) },
179
+ ],
180
+ dts: true,
181
+ eslintrc: {
182
+ enabled: true,
183
+ },
184
+ }),
161
185
  ],
162
186
  site,
163
187
  vite: {
164
188
  plugins: [
165
189
  VitePWA(vitePWAOptions),
190
+ Components({
191
+ dirs: [localComponentsDir, libComponentsDir].reduce((dirs, dir) => {
192
+ readdirSync(dir).forEach((filename) => {
193
+ if (!filename.startsWith('.')) {
194
+ const filepath = joinPath(dir, filename);
195
+ if (lstatSync(filepath).isDirectory()) {
196
+ dirs.push(filepath);
197
+ }
198
+ }
199
+ });
200
+ dirs.push(dir);
201
+ return dirs;
202
+ }, []),
203
+ resolvers: [
204
+ HeadlessUiResolver(),
205
+ VueUseComponentsResolver(),
206
+ VueUseDirectiveResolver(),
207
+ ],
208
+ }),
166
209
  ],
167
210
  resolve: {
168
211
  preserveSymlinks: lstatSync(localComponentsDir).isSymbolicLink(),