cloudcommerce 0.0.64 → 0.0.65
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 +13 -0
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/README.md +1 -1
- package/packages/apps/correios/lib-mjs/calculate-correios.mjs +2 -2
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-shipping/CHANGELOG.md +1 -0
- package/packages/apps/custom-shipping/README.md +1 -0
- package/packages/apps/custom-shipping/lib/custom-shipping.d.ts +2 -0
- package/packages/apps/custom-shipping/lib/custom-shipping.js +6 -0
- package/packages/apps/custom-shipping/lib/custom-shipping.js.map +1 -0
- package/packages/apps/custom-shipping/lib/index.d.ts +1 -0
- package/packages/apps/custom-shipping/lib/index.js +2 -0
- package/packages/apps/custom-shipping/lib/index.js.map +1 -0
- package/packages/apps/custom-shipping/lib-mjs/calculate-custom-shipping.mjs +251 -0
- package/packages/apps/custom-shipping/package.json +27 -0
- package/packages/apps/custom-shipping/src/custom-shipping.ts +7 -0
- package/packages/apps/custom-shipping/src/index.ts +1 -0
- package/packages/apps/custom-shipping/tsconfig.json +6 -0
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/tiny-erp/README.md +1 -1
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +9 -6
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +9 -6
- package/packages/cli/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/firebase/lib/config.d.ts +3 -0
- package/packages/firebase/lib/config.js +3 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/config.ts +3 -0
- package/packages/modules/lib/firebase/call-app-module.js +5 -0
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/package.json +2 -1
- package/packages/modules/src/firebase/call-app-module.ts +5 -0
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/storefront/astro.config.mjs +20 -0
- package/packages/storefront/dist/client/assets/_...0b5ebd52.css +1 -0
- package/packages/storefront/dist/client/assets/_...d4aa8aff.css +1 -0
- package/packages/storefront/dist/client/assets/index.5608ba47.css +1 -0
- package/packages/storefront/dist/client/client.dbac84dd.js +1 -0
- package/packages/storefront/dist/client/favicon.ico +0 -0
- package/packages/storefront/dist/client/page.3aa82516.js +1 -0
- package/packages/storefront/dist/client/~partytown/partytown-atomics.js +2 -0
- package/packages/storefront/dist/client/~partytown/partytown-media.js +2 -0
- package/packages/storefront/dist/client/~partytown/partytown-sw.js +2 -0
- package/packages/storefront/dist/client/~partytown/partytown.js +2 -0
- package/packages/storefront/dist/server/entry.mjs +1674 -0
- package/packages/storefront/package.json +7 -3
- package/packages/storefront/public/favicon.ico +0 -0
- package/packages/storefront/src/components/Card.astro +74 -0
- package/packages/storefront/src/layouts/Layout.astro +56 -0
- package/packages/storefront/src/pages/[...slug].astro +76 -0
- package/packages/storefront/src/pages/index.astro +82 -0
- package/packages/storefront/tsconfig.json +3 -0
- package/packages/types/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.65",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/storefront#readme",
|
|
18
18
|
"scripts": {
|
|
19
|
-
"
|
|
19
|
+
"dev": "astro dev",
|
|
20
|
+
"start": "astro dev",
|
|
21
|
+
"build": "astro build",
|
|
22
|
+
"preview": "astro preview",
|
|
23
|
+
"astro": "astro"
|
|
20
24
|
},
|
|
21
25
|
"dependencies": {
|
|
22
|
-
"@astrojs/mdx": "^0.10.2",
|
|
23
26
|
"@astrojs/node": "^1.0.0",
|
|
24
27
|
"@astrojs/partytown": "^1.0.0",
|
|
25
28
|
"@astrojs/prefetch": "^0.0.7",
|
|
@@ -31,6 +34,7 @@
|
|
|
31
34
|
"rollup": "^2.78.1",
|
|
32
35
|
"unocss": "^0.45.13",
|
|
33
36
|
"vite": "^3.0.9",
|
|
37
|
+
"vite-plugin-pwa": "^0.12.6",
|
|
34
38
|
"vue": "^3.2.37"
|
|
35
39
|
}
|
|
36
40
|
}
|
|
Binary file
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
export interface Props {
|
|
3
|
+
title: string,
|
|
4
|
+
body: string,
|
|
5
|
+
href: string,
|
|
6
|
+
}
|
|
7
|
+
const {href, title, body} = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
<li class="link-card">
|
|
10
|
+
<a href={href}>
|
|
11
|
+
<h2>
|
|
12
|
+
{title}
|
|
13
|
+
<span>→</span>
|
|
14
|
+
</h2>
|
|
15
|
+
<p>
|
|
16
|
+
{body}
|
|
17
|
+
</p>
|
|
18
|
+
</a>
|
|
19
|
+
</li>
|
|
20
|
+
<style>
|
|
21
|
+
|
|
22
|
+
:root {
|
|
23
|
+
--link-gradient: linear-gradient(45deg, #4F39FA, #DA62C4 30%, var(--color-border) 60%);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.link-card {
|
|
27
|
+
list-style: none;
|
|
28
|
+
display: flex;
|
|
29
|
+
padding: 0.15rem;
|
|
30
|
+
background-image: var(--link-gradient);
|
|
31
|
+
background-size: 400%;
|
|
32
|
+
border-radius: 0.5rem;
|
|
33
|
+
background-position: 100%;
|
|
34
|
+
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.link-card > a {
|
|
38
|
+
width: 100%;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
line-height: 1.4;
|
|
41
|
+
padding: 1em 1.3em;
|
|
42
|
+
border-radius: 0.35rem;
|
|
43
|
+
color: var(--text-color);
|
|
44
|
+
background-color: white;
|
|
45
|
+
opacity: 0.8;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
h2 {
|
|
49
|
+
margin: 0;
|
|
50
|
+
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
p {
|
|
54
|
+
margin-top: 0.75rem;
|
|
55
|
+
margin-bottom: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
h2 span {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.link-card:is(:hover, :focus-within) {
|
|
64
|
+
background-position: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.link-card:is(:hover, :focus-within) h2 {
|
|
68
|
+
color: #4F39FA;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.link-card:is(:hover, :focus-within) h2 span {
|
|
72
|
+
transform: translateX(2px);
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
export interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const { title } = Astro.props as Props;
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!DOCTYPE html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="UTF-8">
|
|
13
|
+
<meta name="viewport" content="width=device-width">
|
|
14
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
15
|
+
<title>{title}</title>
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<slot />
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
:root {
|
|
24
|
+
--font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem);
|
|
25
|
+
--font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem);
|
|
26
|
+
--font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);
|
|
27
|
+
|
|
28
|
+
--color-text: hsl(12, 5%, 4%);
|
|
29
|
+
--color-bg: hsl(10, 21%, 95%);
|
|
30
|
+
--color-border: hsl(17, 24%, 90%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
html {
|
|
34
|
+
font-family: system-ui, sans-serif;
|
|
35
|
+
font-size: var(--font-size-base);
|
|
36
|
+
color: var(--color-text);
|
|
37
|
+
background-color: var(--color-bg);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
body {
|
|
41
|
+
margin: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:global(h1) {
|
|
45
|
+
font-size: var(--font-size-xl);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:global(h2) {
|
|
49
|
+
font-size: var(--font-size-lg);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:global(code) {
|
|
53
|
+
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
|
54
|
+
Bitstream Vera Sans Mono, Courier New, monospace;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
import api from '@cloudcommerce/api';
|
|
3
|
+
import Layout from '../layouts/Layout.astro';
|
|
4
|
+
|
|
5
|
+
const { slug } = Astro.params;
|
|
6
|
+
const { data: { resource, doc } } = await api.get(`slugs/${slug}`, {
|
|
7
|
+
storeId: 1056,
|
|
8
|
+
fetch,
|
|
9
|
+
});
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<Layout title={doc.name}>
|
|
13
|
+
<main>
|
|
14
|
+
<h1>Hello <span class="text-gradient">{doc.name}</span></h1>
|
|
15
|
+
<hr>
|
|
16
|
+
<div class="mt-3">
|
|
17
|
+
<mark>{doc._id}</mark> from <i>{resource}</i>
|
|
18
|
+
<p>{Math.random()}</p>
|
|
19
|
+
<em>Lorem ipsum dolor sit amet</em>
|
|
20
|
+
</div>
|
|
21
|
+
</main>
|
|
22
|
+
</Layout>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
:root {
|
|
26
|
+
--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
h1 {
|
|
30
|
+
margin: 2rem 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
main {
|
|
34
|
+
margin: auto;
|
|
35
|
+
padding: 1em;
|
|
36
|
+
max-width: 60ch;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.text-gradient {
|
|
40
|
+
font-weight: 900;
|
|
41
|
+
background-image: var(--astro-gradient);
|
|
42
|
+
-webkit-background-clip: text;
|
|
43
|
+
-webkit-text-fill-color: transparent;
|
|
44
|
+
background-size: 100% 200%;
|
|
45
|
+
background-position-y: 100%;
|
|
46
|
+
border-radius: 0.4rem;
|
|
47
|
+
animation: pulse 4s ease-in-out infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes pulse {
|
|
51
|
+
0%, 100% { background-position-y: 0%; }
|
|
52
|
+
50% { background-position-y: 80%; }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.instructions {
|
|
56
|
+
line-height: 1.6;
|
|
57
|
+
margin: 1rem 0;
|
|
58
|
+
background: #4F39FA;
|
|
59
|
+
padding: 1.0rem;
|
|
60
|
+
border-radius: 0.4rem;
|
|
61
|
+
color: var(--color-bg);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.instructions code {
|
|
65
|
+
font-size: 0.875em;
|
|
66
|
+
border: 0.1em solid var(--color-border);
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
padding: 0.15em 0.25em;
|
|
69
|
+
}
|
|
70
|
+
.link-card-grid {
|
|
71
|
+
display: grid;
|
|
72
|
+
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
|
73
|
+
gap: 1rem;
|
|
74
|
+
padding: 0;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Layout from '../layouts/Layout.astro';
|
|
3
|
+
import Card from '../components/Card.astro';
|
|
4
|
+
|
|
5
|
+
const fetchingProducts = await fetch('https://ecomplus.io/v2/:1056/products');
|
|
6
|
+
const products = (await fetchingProducts.json()).result;
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<Layout title="Welcome to Astro.">
|
|
10
|
+
<main>
|
|
11
|
+
<h1>Welcome to <span class="text-gradient">Astro</span></h1>
|
|
12
|
+
<p class="instructions">
|
|
13
|
+
Check out the <code>src/pages</code> directory to get started.<br/>
|
|
14
|
+
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
15
|
+
</p>
|
|
16
|
+
<ul role="list" class="link-card-grid">
|
|
17
|
+
<Card href="https://docs.astro.build/" title="Documentation" body="Learn how Astro works and explore the official API docs." />
|
|
18
|
+
<Card href="https://astro.build/integrations/" title="Integrations" body="Supercharge your project with new frameworks and libraries." />
|
|
19
|
+
<Card href="https://astro.build/themes/" title="Themes" body="Explore a galaxy of community-built starter themes." />
|
|
20
|
+
<Card href="https://astro.build/chat/" title="Chat" body="Come say hi to our amazing Discord community. ❤️" />
|
|
21
|
+
</ul>
|
|
22
|
+
<ul role="list" class="mt-3 fs-20">
|
|
23
|
+
{products.map((product) => <li>
|
|
24
|
+
<a href={`/${product.slug}`}>{product.sku}</a>
|
|
25
|
+
</li>)}
|
|
26
|
+
</ul>
|
|
27
|
+
</main>
|
|
28
|
+
</Layout>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
:root {
|
|
32
|
+
--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
h1 {
|
|
36
|
+
margin: 2rem 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
main {
|
|
40
|
+
margin: auto;
|
|
41
|
+
padding: 1em;
|
|
42
|
+
max-width: 60ch;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.text-gradient {
|
|
46
|
+
font-weight: 900;
|
|
47
|
+
background-image: var(--astro-gradient);
|
|
48
|
+
-webkit-background-clip: text;
|
|
49
|
+
-webkit-text-fill-color: transparent;
|
|
50
|
+
background-size: 100% 200%;
|
|
51
|
+
background-position-y: 100%;
|
|
52
|
+
border-radius: 0.4rem;
|
|
53
|
+
animation: pulse 4s ease-in-out infinite;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes pulse {
|
|
57
|
+
0%, 100% { background-position-y: 0%; }
|
|
58
|
+
50% { background-position-y: 80%; }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.instructions {
|
|
62
|
+
line-height: 1.6;
|
|
63
|
+
margin: 1rem 0;
|
|
64
|
+
background: #4F39FA;
|
|
65
|
+
padding: 1.0rem;
|
|
66
|
+
border-radius: 0.4rem;
|
|
67
|
+
color: var(--color-bg);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.instructions code {
|
|
71
|
+
font-size: 0.875em;
|
|
72
|
+
border: 0.1em solid var(--color-border);
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
padding: 0.15em 0.25em;
|
|
75
|
+
}
|
|
76
|
+
.link-card-grid {
|
|
77
|
+
display: grid;
|
|
78
|
+
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
|
79
|
+
gap: 1rem;
|
|
80
|
+
padding: 0;
|
|
81
|
+
}
|
|
82
|
+
</style>
|