mkfashion-sdk 2.2.7 → 2.2.9
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/.claude/settings.local.json +9 -7
- package/.claude/worktrees/ecstatic-volhard/.claude/settings.local.json +24 -0
- package/.claude/worktrees/ecstatic-volhard/.gitattributes +2 -0
- package/.claude/worktrees/ecstatic-volhard/.vscode/launch.json +15 -0
- package/.claude/worktrees/ecstatic-volhard/index.html +67 -0
- package/.claude/worktrees/ecstatic-volhard/package.json +18 -0
- package/.claude/worktrees/ecstatic-volhard/src/mkfashion.js +1014 -0
- package/.claude/worktrees/zealous-jennings/.claude/settings.local.json +18 -0
- package/.claude/worktrees/zealous-jennings/.gitattributes +2 -0
- package/.claude/worktrees/zealous-jennings/.vscode/launch.json +15 -0
- package/.claude/worktrees/zealous-jennings/index.html +67 -0
- package/.claude/worktrees/zealous-jennings/package.json +18 -0
- package/.claude/worktrees/zealous-jennings/src/mkfashion.js +1037 -0
- package/package.json +1 -1
- package/src/mkfashion.js +2 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(curl:*)",
|
|
5
|
+
"WebFetch(domain:metakosmos.gitbook.io)",
|
|
6
|
+
"WebFetch(domain:mkfashion-new-api.mk3dlabs.com)",
|
|
7
|
+
"WebFetch(domain:shopify.dev)",
|
|
8
|
+
"WebFetch(domain:github.com)",
|
|
9
|
+
"Bash(node --version)",
|
|
10
|
+
"Bash(npm --version)",
|
|
11
|
+
"Bash(npx shopify version)",
|
|
12
|
+
"Bash(npx degit Shopify/shopify-app-template-remix mkfashion-shopify-app)",
|
|
13
|
+
"Bash(npx prisma generate)",
|
|
14
|
+
"Bash(npx prisma migrate dev --name add_mkfashion_tables)",
|
|
15
|
+
"Bash(npm run build)",
|
|
16
|
+
"WebFetch(domain:community.shopify.com)",
|
|
17
|
+
"Bash(npx prisma migrate dev --name remove_product_mapping --accept-data-loss)",
|
|
18
|
+
"Bash(npx prisma migrate dev --create-only --name remove_product_mapping)",
|
|
19
|
+
"Bash(npx prisma db push --force-reset)",
|
|
20
|
+
"Bash(PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION=\"Sim, pode sim.\" npx prisma db push --force-reset)",
|
|
21
|
+
"Bash(npx prisma migrate dev --name init)"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"type": "chrome",
|
|
9
|
+
"request": "launch",
|
|
10
|
+
"name": "Launch Chrome against localhost",
|
|
11
|
+
"url": "http://localhost:8080",
|
|
12
|
+
"webRoot": "${workspaceFolder}"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<title>Integração mKFashion</title>
|
|
7
|
+
<!-- Para testar localmente, use o caminho local -->
|
|
8
|
+
<script src="./src/mkfashion.js"></script>
|
|
9
|
+
<!-- Para produção, use o CDN: -->
|
|
10
|
+
<!-- <script src="https://unpkg.com/mkfashion-sdk/src/mkfashion.js"></script> -->
|
|
11
|
+
<style>
|
|
12
|
+
.btn-provar {
|
|
13
|
+
background: #000;
|
|
14
|
+
color: #fff;
|
|
15
|
+
padding: 12px 24px;
|
|
16
|
+
border: none;
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.btn-provar:hover {
|
|
24
|
+
background: #333;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
27
|
+
</head>
|
|
28
|
+
|
|
29
|
+
<body>
|
|
30
|
+
|
|
31
|
+
<h1>Produto XYZ</h1>
|
|
32
|
+
<p>SKU: 165230</p>
|
|
33
|
+
|
|
34
|
+
<button class="btn-provar" id="btn-provar">
|
|
35
|
+
Provador Virtual
|
|
36
|
+
</button>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
// 1. Verifica disponibilidade e configura botão
|
|
40
|
+
mkfashion.isAvailable('309728').then(function (disponivel) {
|
|
41
|
+
if (disponivel) {
|
|
42
|
+
|
|
43
|
+
// 2. Registra callback do carrinho (ANTES de abrir)
|
|
44
|
+
mkfashion.addToCart(function (payload) {
|
|
45
|
+
console.log('Payload completo:', JSON.stringify(payload, null, 2));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
console.log('✅ Produto SKU 306636 disponível para prova virtual');
|
|
50
|
+
var btn = document.getElementById('btn-provar');
|
|
51
|
+
btn.style.display = 'inline-block';
|
|
52
|
+
|
|
53
|
+
btn.onclick = function () {
|
|
54
|
+
mkfashion.open({
|
|
55
|
+
store: 'gregory',
|
|
56
|
+
identifier: '165182'
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
} else {
|
|
60
|
+
console.log('❌ Produto SKU 306636 NÃO disponível para prova virtual');
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
</body>
|
|
66
|
+
|
|
67
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mkfashion-sdk",
|
|
3
|
+
"version": "2.2.3",
|
|
4
|
+
"description": "SDK para integrar o provador virtual mKFashion com suporte a Wake Commerce",
|
|
5
|
+
"main": "src/mkfashion.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Abra test.html no navegador\""
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"fashion",
|
|
11
|
+
"virtual",
|
|
12
|
+
"try-on",
|
|
13
|
+
"sdk",
|
|
14
|
+
"metakosmos"
|
|
15
|
+
],
|
|
16
|
+
"author": "metaKosmos",
|
|
17
|
+
"license": "MIT"
|
|
18
|
+
}
|