@wix/agent-skills 1.36.0 → 1.36.1
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/package.json +8 -3
- package/skills/wix-headless-kit/install/pins.json +1 -1
- package/skills/wix-manage/SKILL.md +3 -3
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +78 -1
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +11 -11
- package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +20 -51
- package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +4 -4
- package/skills/wix-base44-connector/SKILL.md +0 -437
- package/skills/wix-base44-connector/references/CAPABILITY_MAP.md +0 -78
- package/skills/wix-base44-connector/scripts/utils.cjs +0 -466
- package/skills/wix-export/SKILL.md +0 -83
- package/skills/wix-harmony-editor/.publish-manifest.json +0 -8
- package/skills/wix-harmony-editor/COPY-SITE.md +0 -494
- package/skills/wix-harmony-editor/SKILL.md +0 -317
- package/skills/wix-harmony-editor/scripts/copy/build-description.mjs +0 -249
- package/skills/wix-harmony-editor/scripts/copy/check-description.mjs +0 -225
- package/skills/wix-harmony-editor/scripts/copy/check-mirror.mjs +0 -89
- package/skills/wix-harmony-editor/scripts/copy/compare-preview.mjs +0 -76
- package/skills/wix-harmony-editor/scripts/copy/deploy-description.mjs +0 -212
- package/skills/wix-harmony-editor/scripts/copy/desc-hash.mjs +0 -44
- package/skills/wix-harmony-editor/scripts/copy/editor-run.mjs +0 -45
- package/skills/wix-harmony-editor/scripts/copy/export-page.mjs +0 -53
- package/skills/wix-harmony-editor/scripts/copy/find-interactions.mjs +0 -76
- package/skills/wix-harmony-editor/scripts/copy/hide-scrollbars.mjs +0 -16
- package/skills/wix-harmony-editor/scripts/copy/import-media.mjs +0 -150
- package/skills/wix-harmony-editor/scripts/copy/link-url.mjs +0 -27
- package/skills/wix-harmony-editor/scripts/copy/lint-api.mjs +0 -56
- package/skills/wix-harmony-editor/scripts/copy/measure-source.mjs +0 -211
- package/skills/wix-harmony-editor/scripts/copy/merge-mirrors.mjs +0 -29
- package/skills/wix-harmony-editor/scripts/copy/mirror-site.mjs +0 -92
- package/skills/wix-harmony-editor/scripts/copy/mobile-stage.mjs +0 -56
- package/skills/wix-harmony-editor/scripts/copy/preview-widths.mjs +0 -73
- package/skills/wix-harmony-editor/scripts/copy/render-plate.mjs +0 -67
- package/skills/wix-harmony-editor/scripts/copy/serve-mirror.mjs +0 -102
- package/skills/wix-harmony-editor/scripts/copy/snapshot-capabilities.mjs +0 -40
- package/skills/wix-harmony-editor/scripts/copy/split-sections.mjs +0 -191
- package/skills/wix-harmony-editor/scripts/copy/upload-media-manager.mjs +0 -61
- package/skills/wix-harmony-editor/scripts/launch.sh +0 -359
- package/skills/wix-headless/SKILL.md +0 -151
- package/skills/wix-headless/references/AI_FEATURES.md +0 -178
- package/skills/wix-headless/references/CAPABILITIES.md +0 -117
- package/skills/wix-headless/references/CONTENT.md +0 -36
- package/skills/wix-headless/references/DESIGN.md +0 -55
- package/skills/wix-headless/references/DISCOVERY.md +0 -80
- package/skills/wix-headless/references/DOC_DISCOVERY.md +0 -43
- package/skills/wix-headless/references/FEEDBACK.md +0 -129
- package/skills/wix-headless/references/IMAGE_GENERATION.md +0 -80
- package/skills/wix-headless/references/SDK_HANDOFF.md +0 -108
- package/skills/wix-headless/references/SEED.md +0 -74
- package/skills/wix-headless/references/SETUP.md +0 -60
- package/skills/wix-headless/references/astro.md +0 -98
- package/skills/wix-headless/references/inline-recipes/experience-donations.md +0 -102
- package/skills/wix-headless/references/inline-recipes/experience-store.md +0 -49
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +0 -196
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +0 -590
- package/skills/wix-headless/references/inline-recipes/how-to-code-bookings.md +0 -279
- package/skills/wix-headless/references/inline-recipes/how-to-code-cms.md +0 -163
- package/skills/wix-headless/references/inline-recipes/how-to-code-donations.md +0 -146
- package/skills/wix-headless/references/inline-recipes/how-to-code-events.md +0 -203
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +0 -696
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +0 -124
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +0 -160
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +0 -118
- package/skills/wix-headless/references/inline-recipes/how-to-code-portfolio.md +0 -132
- package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +0 -126
- package/skills/wix-headless/references/inline-recipes/how-to-code-rentals.md +0 -254
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +0 -191
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +0 -213
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurants.md +0 -161
- package/skills/wix-headless/references/inline-recipes/setup-blog.md +0 -175
- package/skills/wix-headless/references/inline-recipes/setup-bookings.md +0 -232
- package/skills/wix-headless/references/inline-recipes/setup-cms.md +0 -200
- package/skills/wix-headless/references/inline-recipes/setup-donations.md +0 -15
- package/skills/wix-headless/references/inline-recipes/setup-events.md +0 -196
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +0 -288
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +0 -214
- package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +0 -155
- package/skills/wix-headless/references/inline-recipes/setup-pricing-plans.md +0 -229
- package/skills/wix-headless/references/inline-recipes/setup-rentals.md +0 -254
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +0 -73
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +0 -197
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +0 -136
- package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +0 -152
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +0 -71
- package/skills/wix-headless/references/managed/CONNECT.md +0 -74
- package/skills/wix-headless/references/managed/CREATE.md +0 -149
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +0 -104
- package/skills/wix-headless/references/non-astro.md +0 -59
- package/skills/wix-headless/references/self-managed/AUTHENTICATION.md +0 -22
- package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +0 -15
- package/skills/wix-headless/references/stripe/AUTHENTICATION.md +0 -55
- package/skills/wix-headless/references/stripe/DEPLOYMENT.md +0 -71
- package/skills/wix-headless/scripts/bootstrap.mjs +0 -156
- package/skills/wix-headless-replatform/.publish-manifest.json +0 -8
- package/skills/wix-headless-replatform/SKILL.md +0 -116
- package/skills/wix-headless-replatform/agents/openai.yaml +0 -6
- package/skills/wix-headless-replatform/references/control-and-visual-fidelity-contract.md +0 -43
- package/skills/wix-headless-replatform/references/extraction-schema.md +0 -187
- package/skills/wix-headless-replatform/references/interaction-runtime-contract.md +0 -137
- package/skills/wix-headless-replatform/references/layout-blueprint-contract.md +0 -41
- package/skills/wix-headless-replatform/references/output-contract.md +0 -93
- package/skills/wix-headless-replatform/references/post-build-gap-contract.md +0 -125
- package/skills/wix-headless-replatform/references/qa-checklist.md +0 -83
- package/skills/wix-headless-replatform/references/safety.md +0 -19
- package/skills/wix-headless-replatform/references/ui-normalization-contract.md +0 -70
- package/skills/wix-headless-replatform/references/workflow.md +0 -157
- package/skills/wix-headless-replatform/registry/README.md +0 -20
- package/skills/wix-headless-replatform/registry/approvals/button/shadcn-default-ac60ef5.json +0 -28
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/button.tsx +0 -54
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/capabilities.json +0 -60
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/contract.md +0 -48
- package/skills/wix-headless-replatform/registry/licenses/shadcn-ui-ac60ef5-MIT.txt +0 -21
- package/skills/wix-headless-replatform/registry/registry.json +0 -36
- package/skills/wix-headless-replatform/resources/rp-facelift/SKILL.md +0 -32
- package/skills/wix-headless-replatform/resources/rp-project-context/SKILL.md +0 -62
- package/skills/wix-headless-replatform/resources/rp-qa-gap-loop/SKILL.md +0 -64
- package/skills/wix-headless-replatform/resources/rp-source-evidence/SKILL.md +0 -42
- package/skills/wix-headless-replatform/resources/rp-ui-implementation/SKILL.md +0 -73
- package/skills/wix-headless-replatform/schemas/build-plan.schema.json +0 -10
- package/skills/wix-headless-replatform/schemas/candidate.schema.json +0 -19
- package/skills/wix-headless-replatform/schemas/common.schema.json +0 -33
- package/skills/wix-headless-replatform/schemas/decision-patch.schema.json +0 -10
- package/skills/wix-headless-replatform/schemas/decision-request.schema.json +0 -10
- package/skills/wix-headless-replatform/schemas/extraction-gap.schema.json +0 -28
- package/skills/wix-headless-replatform/schemas/extraction-manifest.schema.json +0 -34
- package/skills/wix-headless-replatform/schemas/final-report.schema.json +0 -10
- package/skills/wix-headless-replatform/schemas/foundation.schema.json +0 -11
- package/skills/wix-headless-replatform/schemas/metadata.schema.json +0 -11
- package/skills/wix-headless-replatform/schemas/observation-packet.schema.json +0 -17
- package/skills/wix-headless-replatform/schemas/page-capture.schema.json +0 -11
- package/skills/wix-headless-replatform/schemas/page-resolution.schema.json +0 -33
- package/skills/wix-headless-replatform/schemas/shared-chrome.schema.json +0 -11
- package/skills/wix-headless-replatform/schemas/unit.schema.json +0 -40
- package/skills/wix-headless-replatform/scripts/assemble-extraction.mjs +0 -844
- package/skills/wix-headless-replatform/scripts/benchmark-extraction.mjs +0 -163
- package/skills/wix-headless-replatform/scripts/browser-extraction-preflight.mjs +0 -42
- package/skills/wix-headless-replatform/scripts/build-extracted-homepage.mjs +0 -228
- package/skills/wix-headless-replatform/scripts/clear-wix-starter.mjs +0 -87
- package/skills/wix-headless-replatform/scripts/create-wix-project.mjs +0 -505
- package/skills/wix-headless-replatform/scripts/discover-urls.mjs +0 -142
- package/skills/wix-headless-replatform/scripts/extract-assets.mjs +0 -140
- package/skills/wix-headless-replatform/scripts/extract-design-system.mjs +0 -637
- package/skills/wix-headless-replatform/scripts/extract-interactions.mjs +0 -1903
- package/skills/wix-headless-replatform/scripts/extract-page.mjs +0 -2461
- package/skills/wix-headless-replatform/scripts/extract-seo.mjs +0 -25
- package/skills/wix-headless-replatform/scripts/extract-tokens.mjs +0 -63
- package/skills/wix-headless-replatform/scripts/finalize-extraction-report.mjs +0 -126
- package/skills/wix-headless-replatform/scripts/finalize-gap-review.mjs +0 -180
- package/skills/wix-headless-replatform/scripts/finalize-gap-review.test.mjs +0 -98
- package/skills/wix-headless-replatform/scripts/finalize-migration-website.mjs +0 -103
- package/skills/wix-headless-replatform/scripts/generate-control-state-contract.mjs +0 -176
- package/skills/wix-headless-replatform/scripts/generate-design-md.mjs +0 -261
- package/skills/wix-headless-replatform/scripts/generate-extraction-validators.mjs +0 -25
- package/skills/wix-headless-replatform/scripts/generate-invoice-download-backend.mjs +0 -342
- package/skills/wix-headless-replatform/scripts/generate-layout-blueprint.mjs +0 -140
- package/skills/wix-headless-replatform/scripts/generate-repeater-cms.mjs +0 -22
- package/skills/wix-headless-replatform/scripts/generate-route-plan.mjs +0 -143
- package/skills/wix-headless-replatform/scripts/generate-scene-contract.mjs +0 -288
- package/skills/wix-headless-replatform/scripts/generate-ui-normalization.mjs +0 -266
- package/skills/wix-headless-replatform/scripts/generate-visual-assets.mjs +0 -111
- package/skills/wix-headless-replatform/scripts/lib/browser-tooling.mjs +0 -570
- package/skills/wix-headless-replatform/scripts/lib/common.mjs +0 -329
- package/skills/wix-headless-replatform/scripts/lib/component-capabilities.mjs +0 -121
- package/skills/wix-headless-replatform/scripts/lib/component-registry.mjs +0 -282
- package/skills/wix-headless-replatform/scripts/lib/content-boundary.mjs +0 -61
- package/skills/wix-headless-replatform/scripts/lib/extraction-contract.mjs +0 -374
- package/skills/wix-headless-replatform/scripts/lib/extraction-detectors.mjs +0 -243
- package/skills/wix-headless-replatform/scripts/lib/extraction-validators.generated.mjs +0 -1139
- package/skills/wix-headless-replatform/scripts/lib/font-contract.mjs +0 -326
- package/skills/wix-headless-replatform/scripts/lib/frontend-automation-state.mjs +0 -184
- package/skills/wix-headless-replatform/scripts/lib/gap-analysis.mjs +0 -396
- package/skills/wix-headless-replatform/scripts/lib/html-extract.mjs +0 -168
- package/skills/wix-headless-replatform/scripts/lib/interaction-bootstrap.mjs +0 -10
- package/skills/wix-headless-replatform/scripts/lib/interaction-runtime.mjs +0 -194
- package/skills/wix-headless-replatform/scripts/lib/interaction-timeline.mjs +0 -348
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/classifiers.mjs +0 -141
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/geometry.mjs +0 -43
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/vocabulary.mjs +0 -18
- package/skills/wix-headless-replatform/scripts/lib/ui-normalization.css +0 -64
- package/skills/wix-headless-replatform/scripts/optimize-svg.mjs +0 -31
- package/skills/wix-headless-replatform/scripts/post-build-gap.mjs +0 -358
- package/skills/wix-headless-replatform/scripts/provision-repeater-cms.mjs +0 -25
- package/skills/wix-headless-replatform/scripts/record-gap-decision.mjs +0 -39
- package/skills/wix-headless-replatform/scripts/replay-extraction.mjs +0 -107
- package/skills/wix-headless-replatform/scripts/resolve-home-page.mjs +0 -96
- package/skills/wix-headless-replatform/scripts/site-clone.mjs +0 -658
- package/skills/wix-headless-replatform/scripts/validate-font-contract.mjs +0 -29
- package/skills/wix-headless-replatform/scripts/verify-interactions.mjs +0 -669
- package/skills/wix-headless-replatform/scripts/visual-qa.mjs +0 -370
- package/skills/wix-import/SKILL.md +0 -90
- package/skills/wix-replatform/.publish-manifest.json +0 -8
- package/skills/wix-replatform/CLI.md +0 -162
- package/skills/wix-replatform/README.md +0 -52
- package/skills/wix-replatform/SKILL.md +0 -238
- package/skills/wix-replatform/console/account.css +0 -1
- package/skills/wix-replatform/console/app.css +0 -1
- package/skills/wix-replatform/console/app.js +0 -117
- package/skills/wix-replatform/console/index.html +0 -4
- package/skills/wix-replatform/console/json.css +0 -11
- package/skills/wix-replatform/lib/agent-adapters/index.js +0 -71
- package/skills/wix-replatform/lib/app-page-routing.js +0 -75
- package/skills/wix-replatform/lib/artifact-freshness.js +0 -225
- package/skills/wix-replatform/lib/blocked-data-requests.js +0 -427
- package/skills/wix-replatform/lib/census-reconciliation.js +0 -426
- package/skills/wix-replatform/lib/completion-report.js +0 -1580
- package/skills/wix-replatform/lib/config-env.js +0 -133
- package/skills/wix-replatform/lib/confirmed-pictures.js +0 -212
- package/skills/wix-replatform/lib/dependency-readiness.js +0 -423
- package/skills/wix-replatform/lib/dependency-recovery.js +0 -21
- package/skills/wix-replatform/lib/destination-choice.js +0 -163
- package/skills/wix-replatform/lib/destination-handoff.js +0 -62
- package/skills/wix-replatform/lib/destination-http.js +0 -81
- package/skills/wix-replatform/lib/destination-route.js +0 -98
- package/skills/wix-replatform/lib/destination.js +0 -919
- package/skills/wix-replatform/lib/discovered-census.js +0 -231
- package/skills/wix-replatform/lib/discovered-set-status.js +0 -255
- package/skills/wix-replatform/lib/document-url-guard.js +0 -203
- package/skills/wix-replatform/lib/entity-qa-attestation.js +0 -339
- package/skills/wix-replatform/lib/entity-verification.js +0 -18
- package/skills/wix-replatform/lib/execution-capability.js +0 -120
- package/skills/wix-replatform/lib/execution-log.js +0 -170
- package/skills/wix-replatform/lib/execution-manifest.js +0 -203
- package/skills/wix-replatform/lib/execution-state.js +0 -195
- package/skills/wix-replatform/lib/expectations-ledger.js +0 -96
- package/skills/wix-replatform/lib/generated-plugin-handoff.js +0 -140
- package/skills/wix-replatform/lib/import-readiness-contract.js +0 -23
- package/skills/wix-replatform/lib/import-recovery.js +0 -1107
- package/skills/wix-replatform/lib/imported-redirect-targets.js +0 -608
- package/skills/wix-replatform/lib/internal-link-reconciliation.js +0 -166
- package/skills/wix-replatform/lib/link-audit.js +0 -173
- package/skills/wix-replatform/lib/link-census.js +0 -194
- package/skills/wix-replatform/lib/link-plan.js +0 -148
- package/skills/wix-replatform/lib/link-verification.js +0 -274
- package/skills/wix-replatform/lib/link-write-journal.js +0 -42
- package/skills/wix-replatform/lib/local-state.js +0 -1481
- package/skills/wix-replatform/lib/member-completion.js +0 -658
- package/skills/wix-replatform/lib/member-crosswalk.js +0 -69
- package/skills/wix-replatform/lib/member-outcome-registry.js +0 -265
- package/skills/wix-replatform/lib/migration-completion.js +0 -311
- package/skills/wix-replatform/lib/operator-identity.js +0 -47
- package/skills/wix-replatform/lib/orchestration-decisions.js +0 -248
- package/skills/wix-replatform/lib/orchestration-preflight.js +0 -525
- package/skills/wix-replatform/lib/orchestration-router.js +0 -698
- package/skills/wix-replatform/lib/orchestration-state.js +0 -631
- package/skills/wix-replatform/lib/order-reference-readiness.js +0 -30
- package/skills/wix-replatform/lib/payments-outcome-registry.js +0 -200
- package/skills/wix-replatform/lib/plugin-cms-fallback.js +0 -618
- package/skills/wix-replatform/lib/preservation-approval-stamp.js +0 -54
- package/skills/wix-replatform/lib/product-media-deferral.js +0 -96
- package/skills/wix-replatform/lib/progress-log.js +0 -240
- package/skills/wix-replatform/lib/progress-log.sh +0 -140
- package/skills/wix-replatform/lib/read-back-approval.js +0 -184
- package/skills/wix-replatform/lib/read-back-comparison.js +0 -136
- package/skills/wix-replatform/lib/read-back-contract.js +0 -243
- package/skills/wix-replatform/lib/read-back-extract.js +0 -118
- package/skills/wix-replatform/lib/read-back-gate.js +0 -734
- package/skills/wix-replatform/lib/read-back-reads.js +0 -94
- package/skills/wix-replatform/lib/read-back-state.js +0 -107
- package/skills/wix-replatform/lib/read-back-summary.js +0 -81
- package/skills/wix-replatform/lib/rerun-conflicts.js +0 -334
- package/skills/wix-replatform/lib/run-controller.js +0 -401
- package/skills/wix-replatform/lib/seo-outcome-registry.js +0 -45
- package/skills/wix-replatform/lib/setup-verification.js +0 -148
- package/skills/wix-replatform/lib/source-access.js +0 -231
- package/skills/wix-replatform/lib/source-coverage.js +0 -1130
- package/skills/wix-replatform/lib/source-secrets.js +0 -277
- package/skills/wix-replatform/lib/structured-link-patch.js +0 -59
- package/skills/wix-replatform/lib/task-state.js +0 -110
- package/skills/wix-replatform/lib/url-preservation-report.js +0 -319
- package/skills/wix-replatform/lib/url-preservation-state.js +0 -739
- package/skills/wix-replatform/lib/url-redirect-plan.js +0 -728
- package/skills/wix-replatform/lib/url-verification.js +0 -315
- package/skills/wix-replatform/lib/user-action-effects.js +0 -42
- package/skills/wix-replatform/lib/user-actions.js +0 -264
- package/skills/wix-replatform/lib/website-handoff.js +0 -1220
- package/skills/wix-replatform/lib/wix-client-callers.js +0 -54
- package/skills/wix-replatform/lib/wix-dashboard-url.js +0 -35
- package/skills/wix-replatform/lib/write-verification-state.js +0 -92
- package/skills/wix-replatform/lib/write-verification.js +0 -274
- package/skills/wix-replatform/resources/rp-destination/SKILL.md +0 -137
- package/skills/wix-replatform/resources/rp-discovery/SKILL.md +0 -357
- package/skills/wix-replatform/resources/rp-discovery/scripts/promote-source-coverage.js +0 -47
- package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +0 -1369
- package/skills/wix-replatform/resources/rp-execute-import/scripts/shipping-estimate-audit.js +0 -70
- package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +0 -482
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/execute-setup.js +0 -442
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +0 -64
- package/skills/wix-replatform/resources/rp-execution-policy/SKILL.md +0 -112
- package/skills/wix-replatform/resources/rp-execution-policy/lib/coupon-currency-plan-report.js +0 -143
- package/skills/wix-replatform/resources/rp-execution-policy/lib/payments-report.js +0 -244
- package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +0 -3158
- package/skills/wix-replatform/resources/rp-mapper/SKILL.md +0 -947
- package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +0 -217
- package/skills/wix-replatform/resources/rp-mapper/lib/structure-bridge-planning.js +0 -303
- package/skills/wix-replatform/resources/rp-mapper/scripts/coverage-reconcile.js +0 -88
- package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +0 -148
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +0 -378
- package/skills/wix-replatform/resources/rp-preflight/SKILL.md +0 -40
- package/skills/wix-replatform/resources/rp-project-intake/SKILL.md +0 -55
- package/skills/wix-replatform/resources/rp-quick-runtime/SKILL.md +0 -60
- package/skills/wix-replatform/resources/rp-quick-runtime/lib/import-progress.js +0 -89
- package/skills/wix-replatform/resources/rp-quick-runtime/lib/limit-recovery.js +0 -36
- package/skills/wix-replatform/resources/rp-quick-shopify/SKILL.md +0 -123
- package/skills/wix-replatform/resources/rp-quick-shopify/quick-mode.json +0 -124
- package/skills/wix-replatform/resources/rp-quick-shopify/scripts/quick-mode.js +0 -522
- package/skills/wix-replatform/resources/rp-quick-woocommerce/SKILL.md +0 -56
- package/skills/wix-replatform/resources/rp-quick-woocommerce/quick-mode.json +0 -91
- package/skills/wix-replatform/resources/rp-quick-woocommerce/scripts/quick-mode.js +0 -255
- package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +0 -253
- package/skills/wix-replatform/resources/rp-setup-discovery/scripts/quick-setup-plan.js +0 -44
- package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +0 -481
- package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +0 -136
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +0 -310
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +0 -1081
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +0 -618
- package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +0 -969
- package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +0 -196
- package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +0 -66
- package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +0 -60
- package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +0 -95
- package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +0 -82
- package/skills/wix-replatform/resources/rp-source-inputs/SKILL.md +0 -66
- package/skills/wix-replatform/resources/rp-source-sfcc/SKILL.md +0 -153
- package/skills/wix-replatform/resources/rp-source-shopify/SKILL.md +0 -394
- package/skills/wix-replatform/resources/rp-source-shopify/lib/discovery-reads.js +0 -200
- package/skills/wix-replatform/resources/rp-source-shopify/lib/import-findings.js +0 -34
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-bulk-sqlite-worker.js +0 -44
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-bulk.js +0 -1470
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-cli.js +0 -446
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-gift-cards.js +0 -474
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-protected-fields.js +0 -879
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-session.js +0 -426
- package/skills/wix-replatform/resources/rp-source-shopify/queries/articles.graphql +0 -24
- package/skills/wix-replatform/resources/rp-source-shopify/queries/blogs.graphql +0 -18
- package/skills/wix-replatform/resources/rp-source-shopify/queries/collections.graphql +0 -40
- package/skills/wix-replatform/resources/rp-source-shopify/queries/customers.graphql +0 -76
- package/skills/wix-replatform/resources/rp-source-shopify/queries/delivery-profiles.graphql +0 -51
- package/skills/wix-replatform/resources/rp-source-shopify/queries/discounts.graphql +0 -35
- package/skills/wix-replatform/resources/rp-source-shopify/queries/files.graphql +0 -20
- package/skills/wix-replatform/resources/rp-source-shopify/queries/gift-cards.graphql +0 -18
- package/skills/wix-replatform/resources/rp-source-shopify/queries/inventory.graphql +0 -31
- package/skills/wix-replatform/resources/rp-source-shopify/queries/locations.graphql +0 -21
- package/skills/wix-replatform/resources/rp-source-shopify/queries/menus.graphql +0 -21
- package/skills/wix-replatform/resources/rp-source-shopify/queries/metaobjects.graphql +0 -30
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-core.graphql +0 -150
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-fulfillments.graphql +0 -36
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-refunds.graphql +0 -48
- package/skills/wix-replatform/resources/rp-source-shopify/queries/pages.graphql +0 -20
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-address.graphql +0 -8
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-email.graphql +0 -6
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-name.graphql +0 -8
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-phone.graphql +0 -8
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-address.graphql +0 -12
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-email.graphql +0 -6
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-name.graphql +0 -13
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-phone.graphql +0 -13
- package/skills/wix-replatform/resources/rp-source-shopify/queries/products.graphql +0 -73
- package/skills/wix-replatform/resources/rp-source-shopify/queries/url-redirects.graphql +0 -13
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-discovery.js +0 -693
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-extract.js +0 -283
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-gift-card-remedy.js +0 -191
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-session-check.js +0 -115
- package/skills/wix-replatform/resources/rp-source-shopify/source-schema.example.json +0 -201
- package/skills/wix-replatform/resources/rp-source-wordpress/PLUGIN-READ-PLANS.md +0 -146
- package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +0 -970
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/blocked-data-handlers.js +0 -73
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/checkout-field-csv-parser.js +0 -115
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/checkout-field-csv-parser.test-fixture.js +0 -91
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/coupon-discovery.js +0 -440
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/currency-gate.js +0 -125
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-source-keys.js +0 -252
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-source-keys.json +0 -183
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-summary.mjs +0 -333
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/invoice-discovery.js +0 -426
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-disposition.js +0 -400
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-entity-read-plan.js +0 -633
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-knowledge.js +0 -1127
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/refund-corroboration.js +0 -194
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/refund-corroboration.json +0 -100
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/sampled-ids-batch.js +0 -157
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/secret-value-guard.js +0 -234
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/store-currency.js +0 -101
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/structure-bridge-reader.js +0 -755
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wix-wp-plugin-v2-client.js +0 -1074
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wix-wp-plugin-v2-client.test-fixture.js +0 -149
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/woo-inventory.js +0 -25
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +0 -444
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-image-url.js +0 -186
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-plugin-detect.js +0 -1422
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-redirect-sources.js +0 -343
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +0 -680
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/yoast-product-seo-evidence.js +0 -272
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/README.md +0 -373
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/advanced-custom-fields.json +0 -101
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/back-in-stock-notifier-for-woocommerce.json +0 -81
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/capabilities-pending-decision.json +0 -128
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/cms-fallback-eligible.json +0 -18
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/contact-form-7.json +0 -104
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/facebook-for-woocommerce.json +0 -44
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/fingerprint-aliases.json +0 -49
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/free-gifts-for-woocommerce.json +0 -94
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/index.json +0 -863
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/mailpoet.json +0 -52
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/membership-for-woocommerce.json +0 -161
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/mwb-bookings-for-woocommerce.json +0 -180
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/no-migration-needed.json +0 -286
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/pricing-deals-for-woocommerce.json +0 -79
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/product-extras-for-woocommerce.json +0 -120
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/pw-woocommerce-gift-cards.json +0 -128
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/requires-development.json +0 -88
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/seo-by-rank-math.json +0 -80
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/seriously-simple-podcasting.json +0 -46
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/strong-testimonials.json +0 -55
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/subscriptions-for-woocommerce.json +0 -99
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/tablepress.json +0 -55
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/the-events-calendar.json +0 -160
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/ti-woocommerce-wishlist.json +0 -81
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-checkout-field-editor-pro.json +0 -60
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-discount-rules.json +0 -74
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-product-bundle.json +0 -75
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-gift-cards.json +0 -60
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-other-payment-gateway.json +0 -44
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-pdf-invoices-packing-slips.json +0 -57
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-product-addon.json +0 -141
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-progressive-discounts.json +0 -54
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wordpress-seo.json +0 -158
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wpc-composite-products.json +0 -97
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wpforms-lite.json +0 -86
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/capture-store-settings.js +0 -90
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/plugin-knowledge-validate.js +0 -51
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/plugin-knowledge.js +0 -103
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +0 -2409
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-plugin-inventory.js +0 -273
- package/skills/wix-replatform/resources/rp-source-wordpress/secret-value-patterns.v1.json +0 -11
- package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +0 -71
- package/skills/wix-replatform/resources/rp-source-wordpress/sub-parts.json +0 -13
- package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +0 -1046
- package/skills/wix-replatform/resources/rp-target-wix/app-page-routing-capabilities.json +0 -36
- package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +0 -57
- package/skills/wix-replatform/resources/rp-target-wix/domains/SERVICE-PLUGINS.md +0 -322
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/docs-survey.json +0 -70
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +0 -29
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +0 -71
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +0 -83
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +0 -95
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +0 -66
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/docs-survey.json +0 -332
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/domain.json +0 -75
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/booking.json +0 -181
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/service-add-on.json +0 -130
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/service.json +0 -180
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/docs-survey.json +0 -161
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +0 -25
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +0 -67
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +0 -75
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +0 -41
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/docs-survey.json +0 -204
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +0 -27
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +0 -275
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +0 -105
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +0 -77
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/docs-survey.json +0 -297
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +0 -44
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/delivery-profile.json +0 -171
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/discount-rule.json +0 -182
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-applied-discount.json +0 -129
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-invoice-document.json +0 -192
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item-options.json +0 -123
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +0 -85
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-merchant-note.json +0 -112
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-payment.json +0 -191
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +0 -164
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +0 -462
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/pickup-location.json +0 -122
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/shipping-option.json +0 -98
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/wishlist-item.json +0 -86
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/docs-survey.json +0 -128
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/domain.json +0 -38
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/category.json +0 -73
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/event.json +0 -107
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/registration-form.json +0 -89
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/rsvp.json +0 -118
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/ticket-definition.json +0 -93
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/docs-survey.json +0 -86
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/domain.json +0 -56
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/entities/form-submission.json +0 -121
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/entities/form.json +0 -134
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/docs-survey.json +0 -41
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/domain.json +0 -50
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/entities/gift-card-product.json +0 -87
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/entities/gift-card.json +0 -130
- package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +0 -1418
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/docs-survey.json +0 -41
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +0 -24
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +0 -75
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +0 -71
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/docs-survey.json +0 -119
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +0 -23
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +0 -71
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/custom-field.json +0 -82
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member-about.json +0 -77
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +0 -205
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/docs-survey.json +0 -41
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/domain.json +0 -46
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/entities/plan-order.json +0 -137
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/entities/plan.json +0 -133
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/docs-survey.json +0 -7
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/domain.json +0 -36
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/amazon-shop-connect.json +0 -71
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/ebay-shop-connect.json +0 -67
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/google-youtube-connect.json +0 -72
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/meta-catalog-connect.json +0 -74
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/pinterest-catalog-connect.json +0 -69
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/tiktok-catalog-connect.json +0 -61
- package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +0 -111
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/docs-survey.json +0 -109
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/domain.json +0 -73
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/item-seo-tags.json +0 -148
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/seo-pattern.json +0 -91
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/site-seo-tags.json +0 -79
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/docs-survey.json +0 -32
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/domain.json +0 -49
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/entities/business-contact.json +0 -103
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/docs-survey.json +0 -203
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +0 -42
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/back-in-stock-request.json +0 -119
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/brand.json +0 -111
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +0 -81
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +0 -241
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +0 -118
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-customization.json +0 -111
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +0 -79
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +0 -221
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/promotion.json +0 -84
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/review.json +0 -178
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/subscription-product.json +0 -87
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/docs-survey.json +0 -106
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/domain.json +0 -64
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/manual-tax-mapping.json +0 -119
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-group.json +0 -94
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-region.json +0 -113
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-settings.json +0 -65
- package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +0 -64
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-author-attribution.js +0 -165
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-client.js +0 -60
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-duplicates.js +0 -201
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-ledger.js +0 -306
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-report.js +0 -229
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-stage.js +0 -55
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build.js +0 -715
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-media.js +0 -567
- package/skills/wix-replatform/resources/rp-target-wix/lib/bulk-results.js +0 -73
- package/skills/wix-replatform/resources/rp-target-wix/lib/contact-extended-fields.js +0 -194
- package/skills/wix-replatform/resources/rp-target-wix/lib/contact-import.js +0 -133
- package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +0 -150
- package/skills/wix-replatform/resources/rp-target-wix/lib/coupon-redemption-drift.js +0 -491
- package/skills/wix-replatform/resources/rp-target-wix/lib/customer-member.js +0 -104
- package/skills/wix-replatform/resources/rp-target-wix/lib/data-extension-schema.js +0 -673
- package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +0 -835
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-balance-reconciliation.js +0 -119
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-build.js +0 -566
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-redemption-build.js +0 -249
- package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +0 -260
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-applied-discount-build.js +0 -63
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-buyer.js +0 -187
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-channel-build.js +0 -64
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-history.js +0 -1027
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-invoice-contract.js +0 -90
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-payment-mapping.js +0 -420
- package/skills/wix-replatform/resources/rp-target-wix/lib/pricing-plan-definition.js +0 -177
- package/skills/wix-replatform/resources/rp-target-wix/lib/product-import.js +0 -151
- package/skills/wix-replatform/resources/rp-target-wix/lib/product-seo.js +0 -723
- package/skills/wix-replatform/resources/rp-target-wix/lib/seo-redirects.js +0 -353
- package/skills/wix-replatform/resources/rp-target-wix/lib/shipping-build.js +0 -1437
- package/skills/wix-replatform/resources/rp-target-wix/lib/shipping-option-stage.js +0 -354
- package/skills/wix-replatform/resources/rp-target-wix/lib/store-config-build.js +0 -134
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-category-attach.js +0 -221
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-inventory.js +0 -248
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +0 -321
- package/skills/wix-replatform/resources/rp-target-wix/lib/tax-build.js +0 -231
- package/skills/wix-replatform/resources/rp-target-wix/lib/url-mapper-transport.js +0 -28
- package/skills/wix-replatform/resources/rp-target-wix/lib/value-utils.js +0 -14
- package/skills/wix-replatform/resources/rp-target-wix/lib/variant-correlation.js +0 -34
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +0 -388
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +0 -255
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +0 -6041
- package/skills/wix-replatform/resources/rp-target-wix/lib/write-verification.js +0 -3
- package/skills/wix-replatform/resources/rp-target-wix/scripts/docs-survey-sync.js +0 -150
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +0 -69
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +0 -100
- package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +0 -112
- package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +0 -484
- package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +0 -318
- package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +0 -2831
- package/skills/wix-replatform/resources/rp-telemetry/lib/transcript-digest.js +0 -318
- package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +0 -83
- package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +0 -243
- package/skills/wix-replatform/resources/rp-website-continuation/SKILL.md +0 -94
- package/skills/wix-replatform/scripts/artifact-freshness.js +0 -76
- package/skills/wix-replatform/scripts/census-reconciliation.js +0 -25
- package/skills/wix-replatform/scripts/cms-fallback.js +0 -89
- package/skills/wix-replatform/scripts/discovered-census.js +0 -26
- package/skills/wix-replatform/scripts/discovered-set-status.js +0 -33
- package/skills/wix-replatform/scripts/entity-qa-attestation.js +0 -130
- package/skills/wix-replatform/scripts/execution-health-check.js +0 -415
- package/skills/wix-replatform/scripts/execution-manifest-validate.js +0 -43
- package/skills/wix-replatform/scripts/execution-state-prepare.js +0 -128
- package/skills/wix-replatform/scripts/expectations-ledger.js +0 -44
- package/skills/wix-replatform/scripts/import-contract-verify.js +0 -183
- package/skills/wix-replatform/scripts/internal-link-audit.js +0 -90
- package/skills/wix-replatform/scripts/item-seo-tags-verify.js +0 -205
- package/skills/wix-replatform/scripts/migration-completion.js +0 -76
- package/skills/wix-replatform/scripts/orchestration-preflight.js +0 -67
- package/skills/wix-replatform/scripts/orchestration-route.js +0 -77
- package/skills/wix-replatform/scripts/orchestration-state.js +0 -381
- package/skills/wix-replatform/scripts/read-back-gate.js +0 -175
- package/skills/wix-replatform/scripts/replatform-console.js +0 -146
- package/skills/wix-replatform/scripts/replatform.js +0 -436
- package/skills/wix-replatform/scripts/source-secrets.js +0 -77
- package/skills/wix-replatform/scripts/url-redirects.js +0 -286
- package/skills/wix-replatform/scripts/user-action.js +0 -58
- package/skills/wix-replatform/scripts/website-handoff-generate.js +0 -64
- package/skills/wix-replatform/scripts/wix-dashboard-url.js +0 -54
- package/skills/wix-replatform/scripts/wix-destination.js +0 -143
- package/skills/wix-replatform/scripts/wix-headless-scaffold.js +0 -762
- package/skills/wix-vibe-headless/SKILL.md +0 -183
- package/skills/wix-vibe-headless/install/deploy.cjs +0 -221
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +0 -35
- package/skills/wix-vibe-headless/platforms/README.md +0 -26
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +0 -127
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +0 -121
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +0 -87
- package/skills/wix-vibe-headless/platforms/base44.md +0 -148
- package/skills/wix-vibe-headless/platforms/generic.md +0 -132
- package/skills/wix-vibe-headless/references/_shared/nav/nav.tanstack.js +0 -30
- package/skills/wix-vibe-headless/references/_shared/routing.md +0 -86
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +0 -270
- package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +0 -43
- package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +0 -25
- package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +0 -15
- package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +0 -35
- package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +0 -38
- package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +0 -40
- package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +0 -54
- package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +0 -65
- package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +0 -50
- package/skills/wix-vibe-headless/references/blog/app/rest/wix-blog.js +0 -217
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +0 -99
- package/skills/wix-vibe-headless/references/blog/seed/seed-blog.cjs +0 -269
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +0 -342
- package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +0 -65
- package/skills/wix-vibe-headless/references/bookings/app/components/RentalDurationPicker.jsx +0 -67
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +0 -47
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +0 -13
- package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +0 -126
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useRentalDuration.js +0 -128
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +0 -110
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +0 -58
- package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +0 -95
- package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +0 -94
- package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +0 -89
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +0 -148
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-rentals.js +0 -250
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-services.js +0 -300
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +0 -154
- package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.cjs +0 -333
- package/skills/wix-vibe-headless/references/bookings/seed/seed-rentals.cjs +0 -267
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +0 -178
- package/skills/wix-vibe-headless/references/cms/app/collection.config.js +0 -31
- package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +0 -18
- package/skills/wix-vibe-headless/references/cms/app/rest/wix-cms.js +0 -231
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +0 -145
- package/skills/wix-vibe-headless/references/donations/INSTRUCTIONS.md +0 -88
- package/skills/wix-vibe-headless/references/donations/app/rest/wix-donations.js +0 -112
- package/skills/wix-vibe-headless/references/donations/seed/SEED.md +0 -11
- package/skills/wix-vibe-headless/references/donations/tests/donations.test.mjs +0 -258
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +0 -267
- package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +0 -23
- package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +0 -43
- package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +0 -13
- package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +0 -29
- package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +0 -57
- package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +0 -78
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +0 -27
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +0 -54
- package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +0 -40
- package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +0 -81
- package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +0 -48
- package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +0 -36
- package/skills/wix-vibe-headless/references/events/app/rest/wix-events-browse.js +0 -136
- package/skills/wix-vibe-headless/references/events/app/rest/wix-events-registration.js +0 -187
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +0 -103
- package/skills/wix-vibe-headless/references/events/seed/seed-events.cjs +0 -251
- package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +0 -487
- package/skills/wix-vibe-headless/references/forms/app/hooks/useWixForm.js +0 -425
- package/skills/wix-vibe-headless/references/forms/app/lib/wix-form-schema-utils.js +0 -187
- package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms-submissions.js +0 -238
- package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms.js +0 -108
- package/skills/wix-vibe-headless/references/forms/seed/SEED.md +0 -1836
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +0 -328
- package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +0 -101
- package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +0 -33
- package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +0 -21
- package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +0 -29
- package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +0 -54
- package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +0 -77
- package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +0 -36
- package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +0 -32
- package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +0 -35
- package/skills/wix-vibe-headless/references/members/app/rest/wix-members-auth.js +0 -390
- package/skills/wix-vibe-headless/references/members/install/Register.jsx +0 -22
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +0 -21
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +0 -270
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +0 -31
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +0 -15
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +0 -39
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +0 -15
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +0 -29
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +0 -35
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +0 -27
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +0 -25
- package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +0 -39
- package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +0 -27
- package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +0 -60
- package/skills/wix-vibe-headless/references/portfolio/app/rest/wix-portfolio.js +0 -223
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +0 -90
- package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.cjs +0 -236
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +0 -280
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +0 -35
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +0 -48
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +0 -16
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +0 -35
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +0 -25
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +0 -28
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +0 -30
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +0 -30
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +0 -53
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +0 -28
- package/skills/wix-vibe-headless/references/pricing-plans/app/rest/wix-pricing-plans.js +0 -157
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +0 -82
- package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.cjs +0 -251
- package/skills/wix-vibe-headless/references/rentals/INSTRUCTIONS.md +0 -13
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +0 -290
- package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +0 -81
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +0 -71
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +0 -43
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +0 -21
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +0 -72
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +0 -66
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +0 -32
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +0 -73
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +0 -28
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +0 -102
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-menu.js +0 -224
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +0 -218
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-reservations.js +0 -107
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +0 -176
- package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.cjs +0 -452
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +0 -56
- package/skills/wix-vibe-headless/references/shared/app/lib/nav.js +0 -9
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-client.js +0 -185
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +0 -8
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +0 -471
- package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +0 -20
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +0 -167
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +0 -83
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +0 -104
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +0 -163
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +0 -83
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useVariantOptions.js +0 -76
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +0 -64
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +0 -176
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +0 -218
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +0 -174
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.cjs +0 -546
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Header cart trigger — an icon button with a live item-count badge. Drop into the app header; opens the CartDrawer.
|
|
2
|
-
// Icon-only by design (no "Cart" text): reads the header's currentColor, so it inherits the brand automatically.
|
|
3
|
-
import { useCart } from "@/context/CartContext";
|
|
4
|
-
|
|
5
|
-
export default function CartButton() {
|
|
6
|
-
const { itemCount, setIsOpen } = useCart();
|
|
7
|
-
return (
|
|
8
|
-
<button onClick={() => setIsOpen(true)} aria-label={`Open cart${itemCount ? `, ${itemCount} item${itemCount > 1 ? "s" : ""}` : ""}`}
|
|
9
|
-
className="relative inline-flex items-center justify-center w-10 h-10 p-0 cursor-pointer bg-transparent text-current border-none rounded-sm">
|
|
10
|
-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
11
|
-
<path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" />
|
|
12
|
-
<path d="M3 6h18" />
|
|
13
|
-
<path d="M16 10a4 4 0 0 1-8 0" />
|
|
14
|
-
</svg>
|
|
15
|
-
{itemCount > 0 && (
|
|
16
|
-
<span className="absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-[5px] py-0 inline-flex items-center justify-center text-[11px] font-semibold bg-primary text-primary-foreground rounded-full">{itemCount}</span>
|
|
17
|
-
)}
|
|
18
|
-
</button>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
// Slide-over cart. Reads everything from useCart(); mutate by lineItem.id (NOT catalogItemId),
|
|
2
|
-
// check out via the context (redirect-session URL). Styled with base44 design tokens (shadcn Tailwind classes).
|
|
3
|
-
//
|
|
4
|
-
// Load-bearing beyond the styling:
|
|
5
|
-
// • prices come from the SERVER cart. In Cart V2 each line total is `pricing.totalPrice`, a
|
|
6
|
-
// ConvertedMoney { amount, convertedAmount } with NO formatted string — format it yourself with the
|
|
7
|
-
// cart's currency (see formatCartMoney). Never compute a total in the client: tax, shipping and
|
|
8
|
-
// promotions are resolved server-side. The V2 cart has no `subtotalAfterDiscounts`/`discount` —
|
|
9
|
-
// the after-discount subtotal and the cart-level discount come from the estimate the context keeps
|
|
10
|
-
// in `summary.priceSummary`; the raw cart `subtotal` is the fallback while it's unknown.
|
|
11
|
-
// • `quantityInfo.availableQuantity` caps the stepper, so exceeding stock is refused here rather than
|
|
12
|
-
// at checkout.
|
|
13
|
-
// • `status` is flagged per line here because checkout() refuses the whole cart when any item isn't
|
|
14
|
-
// IN_STOCK — showing it on the row is what makes that refusal understandable.
|
|
15
|
-
import { useEffect, useRef } from "react";
|
|
16
|
-
import { useCart } from "@/context/CartContext";
|
|
17
|
-
import { storeImage } from "@/lib/storeImage";
|
|
18
|
-
|
|
19
|
-
// Cart V2 money is a ConvertedMoney { amount, convertedAmount } with NO formatted string — format it
|
|
20
|
-
// with the cart's currency (buyer's display currency when present, else the site currency).
|
|
21
|
-
function formatCartMoney(money, cart) {
|
|
22
|
-
const value = money?.convertedAmount ?? money?.amount;
|
|
23
|
-
const currency = cart?.customerInfo?.currencyCode ?? cart?.businessInfo?.currencyCode ?? "USD";
|
|
24
|
-
return value == null ? "" : new Intl.NumberFormat(undefined, { style: "currency", currency }).format(Number(value));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default function CartDrawer() {
|
|
28
|
-
const { cart, summary, isOpen, setIsOpen, removeItem, updateQuantity, checkout, loading, error, clearError } = useCart();
|
|
29
|
-
const lineItems = cart?.lineItems ?? [];
|
|
30
|
-
// Totals come from the estimate the context keeps next to the cart (after-discount subtotal, the
|
|
31
|
-
// cart-level discount). While it's unknown, or if it failed, fall back to the cart's raw subtotal.
|
|
32
|
-
// Delivery and tax are NOT in here — they resolve at checkout, and the footer says so.
|
|
33
|
-
const subtotal = formatCartMoney(summary?.priceSummary?.subtotal ?? cart?.subtotal, cart);
|
|
34
|
-
const discountAmount = Number(summary?.priceSummary?.discount?.convertedAmount ?? summary?.priceSummary?.discount?.amount ?? 0);
|
|
35
|
-
const discount = discountAmount > 0 ? formatCartMoney(summary.priceSummary.discount, cart) : "";
|
|
36
|
-
const unavailable = lineItems.filter((li) => li.status && li.status !== "IN_STOCK");
|
|
37
|
-
|
|
38
|
-
// The overlay contract, verified in the browser rather than assumed from CSS: Escape closes (the
|
|
39
|
-
// backdrop click is pointer-only), the page behind stops scrolling, focus moves into the panel on
|
|
40
|
-
// open and returns to whatever opened it on close.
|
|
41
|
-
const panelRef = useRef(null);
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
if (!isOpen) return;
|
|
44
|
-
const opener = document.activeElement;
|
|
45
|
-
const previousOverflow = document.body.style.overflow;
|
|
46
|
-
document.body.style.overflow = "hidden";
|
|
47
|
-
panelRef.current?.focus();
|
|
48
|
-
const onKey = (e) => e.key === "Escape" && setIsOpen(false);
|
|
49
|
-
document.addEventListener("keydown", onKey);
|
|
50
|
-
return () => {
|
|
51
|
-
document.removeEventListener("keydown", onKey);
|
|
52
|
-
document.body.style.overflow = previousOverflow;
|
|
53
|
-
if (opener instanceof HTMLElement) opener.focus();
|
|
54
|
-
};
|
|
55
|
-
}, [isOpen, setIsOpen]);
|
|
56
|
-
|
|
57
|
-
if (!isOpen) return null;
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<div onClick={() => setIsOpen(false)} className="fixed inset-0 z-50 bg-black/40 flex justify-end">
|
|
61
|
-
<aside ref={panelRef} tabIndex={-1} onClick={(e) => e.stopPropagation()} role="dialog" aria-modal="true" aria-label="Your cart"
|
|
62
|
-
className="w-[min(420px,100%)] h-full flex flex-col bg-background text-foreground border-l border-border font-body outline-none">
|
|
63
|
-
<header className="flex justify-between items-center p-4 border-b border-border">
|
|
64
|
-
<strong className="font-display">Your cart{lineItems.length ? ` (${lineItems.length})` : ""}</strong>
|
|
65
|
-
<button onClick={() => setIsOpen(false)} aria-label="Close cart"
|
|
66
|
-
className="border-none bg-transparent cursor-pointer text-xl text-muted-foreground">×</button>
|
|
67
|
-
</header>
|
|
68
|
-
|
|
69
|
-
{error && (
|
|
70
|
-
<div role="alert" className="m-4 mb-0 p-3 rounded-sm border border-destructive/40 bg-destructive/10 text-sm">
|
|
71
|
-
<div className="flex items-start gap-2">
|
|
72
|
-
<span className="flex-1">{error}</span>
|
|
73
|
-
<button onClick={clearError} aria-label="Dismiss"
|
|
74
|
-
className="border-none bg-transparent cursor-pointer text-muted-foreground leading-none">×</button>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
)}
|
|
78
|
-
|
|
79
|
-
<div className="flex-1 overflow-y-auto p-4">
|
|
80
|
-
{lineItems.length === 0 ? (
|
|
81
|
-
<div className="h-full flex flex-col items-center justify-center text-center gap-3 py-10">
|
|
82
|
-
<svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"
|
|
83
|
-
className="text-muted-foreground/40" aria-hidden="true">
|
|
84
|
-
<path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" /><path d="M3 6h18" />
|
|
85
|
-
<path d="M16 10a4 4 0 0 1-8 0" />
|
|
86
|
-
</svg>
|
|
87
|
-
<p className="m-0 text-muted-foreground">Your cart is empty.</p>
|
|
88
|
-
<button onClick={() => setIsOpen(false)}
|
|
89
|
-
className="border border-border bg-card text-foreground rounded-sm py-2 px-4 cursor-pointer text-sm">Continue shopping</button>
|
|
90
|
-
</div>
|
|
91
|
-
) : lineItems.map((item) => {
|
|
92
|
-
const image = storeImage(item.attributes?.image?.url);
|
|
93
|
-
const paid = formatCartMoney(item.pricing?.totalPrice, cart);
|
|
94
|
-
const isOut = item.status && item.status !== "IN_STOCK";
|
|
95
|
-
const stock = item.quantityInfo?.availableQuantity;
|
|
96
|
-
const qty = item.quantityInfo?.confirmedQuantity;
|
|
97
|
-
const atStockLimit = Number.isFinite(stock) && qty >= stock;
|
|
98
|
-
return (
|
|
99
|
-
<div key={item.id} className="flex gap-3 py-3 px-0 border-b border-border">
|
|
100
|
-
<div className="w-16 h-16 shrink-0 rounded-sm bg-card overflow-hidden">
|
|
101
|
-
{image && <img src={image} alt={item.name?.original || ""} className="w-full h-full object-cover" />}
|
|
102
|
-
</div>
|
|
103
|
-
<div className="flex-1 flex flex-col gap-1 min-w-0">
|
|
104
|
-
<span className="font-semibold truncate">{item.name?.original}</span>
|
|
105
|
-
{/* V2 nests these under `attributes` — a top-level lineItem.descriptionLines no longer exists */}
|
|
106
|
-
{item.attributes?.descriptionLines?.map((dl, i) => (
|
|
107
|
-
<small key={i} className="text-muted-foreground">
|
|
108
|
-
{dl.name?.original}: {dl.plainText?.original || dl.colorInfo?.original}
|
|
109
|
-
</small>
|
|
110
|
-
))}
|
|
111
|
-
{isOut ? (
|
|
112
|
-
<small className="text-destructive">
|
|
113
|
-
{item.status === "PARTIALLY_IN_STOCK" ? "Not enough stock" : "No longer available"}
|
|
114
|
-
</small>
|
|
115
|
-
) : atStockLimit ? (
|
|
116
|
-
<small className="text-muted-foreground">Only {stock} left</small>
|
|
117
|
-
) : null}
|
|
118
|
-
<div className="flex items-center gap-2 mt-1">
|
|
119
|
-
<QtyButton disabled={loading || qty <= 1} label="Decrease quantity"
|
|
120
|
-
onClick={() => updateQuantity(item.id, qty - 1)}>−</QtyButton>
|
|
121
|
-
<span className="min-w-5 text-center" aria-label={`Quantity ${qty}`}>{qty}</span>
|
|
122
|
-
<QtyButton disabled={loading || atStockLimit} label="Increase quantity"
|
|
123
|
-
onClick={() => updateQuantity(item.id, qty + 1)}>+</QtyButton>
|
|
124
|
-
<button onClick={() => removeItem(item.id)} disabled={loading}
|
|
125
|
-
className="ml-auto border-none bg-transparent cursor-pointer text-muted-foreground text-[13px] underline disabled:opacity-50">Remove</button>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
<div className="flex flex-col items-end shrink-0">
|
|
129
|
-
<span className="font-semibold">{paid}</span>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
);
|
|
133
|
-
})}
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
{lineItems.length > 0 && (
|
|
137
|
-
<footer className="p-4 border-t border-border flex flex-col gap-3">
|
|
138
|
-
{discount && (
|
|
139
|
-
<div className="flex justify-between items-baseline text-sm">
|
|
140
|
-
<span className="text-muted-foreground">Discount</span>
|
|
141
|
-
<span>−{discount}</span>
|
|
142
|
-
</div>
|
|
143
|
-
)}
|
|
144
|
-
{subtotal && (
|
|
145
|
-
<div className="flex justify-between items-baseline">
|
|
146
|
-
<span className="text-muted-foreground">Subtotal</span>
|
|
147
|
-
<strong className="text-[17px]">{subtotal}</strong>
|
|
148
|
-
</div>
|
|
149
|
-
)}
|
|
150
|
-
<p className="m-0 text-[12px] text-muted-foreground">Shipping and taxes are calculated at checkout.</p>
|
|
151
|
-
<button disabled={loading || unavailable.length > 0} onClick={checkout}
|
|
152
|
-
className="w-full p-3 bg-primary text-primary-foreground border-none rounded-sm text-[15px] font-semibold cursor-pointer disabled:cursor-not-allowed disabled:opacity-60">
|
|
153
|
-
{loading ? "Working…" : unavailable.length > 0 ? "Remove unavailable items to continue" : "Checkout"}
|
|
154
|
-
</button>
|
|
155
|
-
</footer>
|
|
156
|
-
)}
|
|
157
|
-
</aside>
|
|
158
|
-
</div>
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function QtyButton({ children, onClick, disabled, label }) {
|
|
163
|
-
return (
|
|
164
|
-
<button onClick={onClick} disabled={disabled} aria-label={label}
|
|
165
|
-
className="w-7 h-7 cursor-pointer leading-none bg-card text-foreground border border-border rounded-sm disabled:opacity-40 disabled:cursor-not-allowed">{children}</button>
|
|
166
|
-
);
|
|
167
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// Cart state — mirrors the Wix SERVER cart (never a local copy). Wrap the app in <CartProvider>;
|
|
2
|
-
// every component reads useCart(). Data wiring is correct as-is — do not restyle or re-derive it.
|
|
3
|
-
import { createContext, useContext, useState, useEffect, useCallback } from "react";
|
|
4
|
-
import {
|
|
5
|
-
getCurrentCart,
|
|
6
|
-
estimateCurrentCart,
|
|
7
|
-
addToCart as apiAdd,
|
|
8
|
-
removeFromCart as apiRemove,
|
|
9
|
-
updateCartItemQuantity as apiQty,
|
|
10
|
-
checkout as apiCheckout,
|
|
11
|
-
} from "@/rest/wix-store-cart";
|
|
12
|
-
|
|
13
|
-
const CartContext = createContext(null);
|
|
14
|
-
|
|
15
|
-
export function CartProvider({ children }) {
|
|
16
|
-
const [cart, setCartState] = useState(null);
|
|
17
|
-
// The calculated summary (after-discount subtotal, cart-level discount) — from the estimate, never
|
|
18
|
-
// summed in the client. Refreshed with every cart change; null while unknown or when the estimate
|
|
19
|
-
// fails, in which case surfaces fall back to cart.subtotal.
|
|
20
|
-
const [summary, setSummary] = useState(null);
|
|
21
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
22
|
-
const [loading, setLoading] = useState(false);
|
|
23
|
-
// The cart helpers throw on refusal with a buyer-readable reason — an empty cart, or line items
|
|
24
|
-
// whose status isn't IN_STOCK. Hold the message so the drawer can show it; without
|
|
25
|
-
// this the rejection is unhandled and the shopper sees the spinner stop with nothing said.
|
|
26
|
-
const [error, setError] = useState(null);
|
|
27
|
-
|
|
28
|
-
// Every cart write goes through here so the summary always describes the cart on screen.
|
|
29
|
-
const setCart = useCallback((next) => {
|
|
30
|
-
setCartState(next);
|
|
31
|
-
if (!next?.lineItems?.length) { setSummary(null); return; }
|
|
32
|
-
estimateCurrentCart().then((s) => setSummary(s)).catch(() => setSummary(null));
|
|
33
|
-
}, []);
|
|
34
|
-
const refreshCart = useCallback(async () => setCart(await getCurrentCart()), [setCart]);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
refreshCart();
|
|
37
|
-
const onVisible = () => document.visibilityState === "visible" && refreshCart();
|
|
38
|
-
document.addEventListener("visibilitychange", onVisible);
|
|
39
|
-
return () => document.removeEventListener("visibilitychange", onVisible);
|
|
40
|
-
}, [refreshCart]);
|
|
41
|
-
|
|
42
|
-
const itemCount = (cart?.lineItems ?? []).reduce((n, li) => n + (li.quantityInfo?.confirmedQuantity || 0), 0);
|
|
43
|
-
|
|
44
|
-
// Every mutation runs through here so a rejection always lands somewhere visible. `run` keeps the
|
|
45
|
-
// cart untouched on failure — the server stays the source of truth — and re-reads it for anything
|
|
46
|
-
// that may have changed underneath (an item selling out between page load and checkout).
|
|
47
|
-
const run = async (fn, { reread = false } = {}) => {
|
|
48
|
-
setLoading(true);
|
|
49
|
-
setError(null);
|
|
50
|
-
try {
|
|
51
|
-
return await fn();
|
|
52
|
-
} catch (e) {
|
|
53
|
-
setError(e?.message || "Something went wrong. Please try again.");
|
|
54
|
-
setIsOpen(true); // Surface refusals even when adding from a card or PDP with the drawer closed.
|
|
55
|
-
if (reread) await refreshCart().catch(() => {});
|
|
56
|
-
return null;
|
|
57
|
-
} finally {
|
|
58
|
-
setLoading(false);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const addToCart = async (id, variantId, qty = 1, extras) =>
|
|
63
|
-
run(async () => {
|
|
64
|
-
setCart(await apiAdd(id, variantId, qty, extras));
|
|
65
|
-
setIsOpen(true);
|
|
66
|
-
});
|
|
67
|
-
const removeItem = (lineItemId) => run(async () => setCart(await apiRemove(lineItemId)));
|
|
68
|
-
const updateQuantity = (lineItemId, qty) => run(async () => setCart(await apiQty(lineItemId, qty)));
|
|
69
|
-
const checkout = () =>
|
|
70
|
-
run(async () => { window.location.href = await apiCheckout(); }, { reread: true });
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<CartContext.Provider value={{ cart, summary, itemCount, isOpen, setIsOpen, loading, error, clearError: () => setError(null), addToCart, removeItem, updateQuantity, checkout, refreshCart }}>
|
|
74
|
-
{children}
|
|
75
|
-
</CartContext.Provider>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function useCart() {
|
|
80
|
-
const ctx = useContext(CartContext);
|
|
81
|
-
if (!ctx) throw new Error("useCart must be used within <CartProvider>");
|
|
82
|
-
return ctx;
|
|
83
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// Headless data layer for a product grid tile.
|
|
2
|
-
// Normalises raw Wix product fields into render-agnostic structures so you can build
|
|
3
|
-
// whatever card UI you want (image layout, badge style, price display, quick-add trigger)
|
|
4
|
-
// without touching the badge logic, price rules, or colour-dot extraction.
|
|
5
|
-
//
|
|
6
|
-
// Usage:
|
|
7
|
-
// const { isSoldOut, leftBadges, ribbons, promoBadge, priceDisplay, compareAtDisplay, teaser,
|
|
8
|
-
// colors, optionLabel, isQuickAddable, directAddVariantId, image, hoverImage } = useProductCard(product);
|
|
9
|
-
// // then render however you want; quick-add: addToCart(product.id, directAddVariantId) from useCart().
|
|
10
|
-
|
|
11
|
-
import { useMemo } from "react";
|
|
12
|
-
import { productImage, productGallery } from "@/lib/storeImage";
|
|
13
|
-
import { sellingPrice } from "@/rest/wix-store-catalog";
|
|
14
|
-
|
|
15
|
-
export function useProductCard(product) {
|
|
16
|
-
return useMemo(() => {
|
|
17
|
-
const status = product?.inventory?.availabilityStatus;
|
|
18
|
-
const isSoldOut = status === "OUT_OF_STOCK";
|
|
19
|
-
// preorderStatus is only meaningful when the product is out of stock
|
|
20
|
-
const isPreorder = isSoldOut && product?.inventory?.preorderStatus === "ENABLED";
|
|
21
|
-
const isPartiallyOutOfStock = status === "PARTIALLY_OUT_OF_STOCK";
|
|
22
|
-
|
|
23
|
-
// Left-side badges (stacked, top-left of the image): stock / pre-order state.
|
|
24
|
-
const leftBadges = [];
|
|
25
|
-
if (isPreorder) leftBadges.push({ type: "pre-order", label: "Pre-order" });
|
|
26
|
-
else if (isSoldOut) leftBadges.push({ type: "sold-out", label: "Sold out" });
|
|
27
|
-
if (isPartiallyOutOfStock) leftBadges.push({ type: "limited-stock", label: "Limited stock" });
|
|
28
|
-
|
|
29
|
-
// Merchant ribbons — the primary one plus every additional one. Render ALL of them, in one shared
|
|
30
|
-
// style (a "Sale" accent is fine, applied by label). Never compute a "-20%" badge from the price
|
|
31
|
-
// range: a range's minimum says nothing about the variant the buyer picks, and a ribbon is a
|
|
32
|
-
// label, not a price claim.
|
|
33
|
-
const ribbons = [product?.ribbon?.name, ...(product?.additionalRibbons ?? []).map((r) => r?.name)]
|
|
34
|
-
.filter((name, i, all) => name && all.indexOf(name) === i);
|
|
35
|
-
const promoBadge = ribbons[0] ? { type: "ribbon", label: ribbons[0] } : null;
|
|
36
|
-
|
|
37
|
-
// Price. A single-price product shows the price the buyer pays — the lowest-priced variant's
|
|
38
|
-
// discounted price when an automatic discount applies (priceAfterDiscount), else its regular
|
|
39
|
-
// price — with the struck "was" price beside it. Variants priced differently show a min–max
|
|
40
|
-
// range with NO struck price: one lone "was" against a range implies a saving that may not
|
|
41
|
-
// apply to the variant the buyer picks; the PDP shows the real comparison once a variant is chosen.
|
|
42
|
-
const min = product?.actualPriceRange?.minValue;
|
|
43
|
-
const max = product?.actualPriceRange?.maxValue;
|
|
44
|
-
const isRange = !!(min?.amount && max?.amount && min.amount !== max.amount);
|
|
45
|
-
const minVariant = product?.variantSummary?.minPriceVariant ?? null;
|
|
46
|
-
const { current, original } = sellingPrice(minVariant?.price);
|
|
47
|
-
const priceDisplay = isRange
|
|
48
|
-
? `${min?.formattedAmount ?? ""} – ${max?.formattedAmount ?? ""}`
|
|
49
|
-
: current?.formattedAmount ?? min?.formattedAmount;
|
|
50
|
-
const compareAtDisplay =
|
|
51
|
-
!isRange && original?.formattedAmount && Number(original.amount) > Number(current?.amount ?? min?.amount)
|
|
52
|
-
? original.formattedAmount
|
|
53
|
-
: null;
|
|
54
|
-
|
|
55
|
-
// Options preview for the tile summary row.
|
|
56
|
-
// Colour options → real hex dots (more informative than "3 colours").
|
|
57
|
-
// Non-colour options → "3 sizes · 2 materials" (pluralised from the merchant's own name).
|
|
58
|
-
const labels = [], colors = [];
|
|
59
|
-
for (const o of product?.options || []) {
|
|
60
|
-
const choices = (o.choicesSettings?.choices || []).filter((c) => c.visible !== false);
|
|
61
|
-
if (!choices.length) continue;
|
|
62
|
-
const swatches = choices.map((c) => c.colorCode).filter(Boolean);
|
|
63
|
-
if (swatches.length) { colors.push(...swatches); continue; }
|
|
64
|
-
const n = o.name.toLowerCase();
|
|
65
|
-
labels.push(`${choices.length} ${choices.length === 1 || n.endsWith("s") ? n : `${n}s`}`);
|
|
66
|
-
}
|
|
67
|
-
const optionLabel = labels.join(" · ");
|
|
68
|
-
const hasOptions = (product?.options?.length || 0) > 0;
|
|
69
|
-
|
|
70
|
-
// Quick-add is only safe for single-variant products (no option choices to resolve).
|
|
71
|
-
// Sold-out with pre-order still shows a CTA, but it links to the PDP, not quick-add.
|
|
72
|
-
const isQuickAddable = !hasOptions && !isSoldOut;
|
|
73
|
-
// The variant a direct add sends (a product with no options still has one variant).
|
|
74
|
-
const directAddVariantId = isQuickAddable ? minVariant?.id ?? null : null;
|
|
75
|
-
|
|
76
|
-
// plainDescription is an HTML string despite its name (<p>…</p>). A card wants plain text:
|
|
77
|
-
// strip the tags and cut at a word boundary, so no tile ever prints a literal "<p>".
|
|
78
|
-
const text = (product?.plainDescription || "").replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
|
|
79
|
-
const teaser = text.length > 140 ? `${text.slice(0, 140).replace(/\s+\S*$/, "")}…` : text;
|
|
80
|
-
|
|
81
|
-
// Images: normalised through lib/storeImage so URLs are consistent across the tile,
|
|
82
|
-
// the PDP gallery, and the cart. Hover image is the second gallery shot (if one exists).
|
|
83
|
-
const image = productImage(product);
|
|
84
|
-
const hoverImage = productGallery(product)[1]?.url ?? null;
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
isSoldOut,
|
|
88
|
-
isPreorder,
|
|
89
|
-
isPartiallyOutOfStock,
|
|
90
|
-
leftBadges, // [{ type: 'pre-order'|'sold-out'|'limited-stock', label }]
|
|
91
|
-
ribbons, // every merchant ribbon label, primary first — render all of them
|
|
92
|
-
promoBadge, // { type: 'ribbon', label } | null — the primary ribbon, for a single-badge slot
|
|
93
|
-
priceDisplay, // formatted price the buyer pays, or a min–max range
|
|
94
|
-
compareAtDisplay, // formatted struck "was" price | null (never beside a range)
|
|
95
|
-
teaser, // plain-text description for the tile (tags stripped, ~140 chars) — never render plainDescription raw on a card
|
|
96
|
-
colors, // hex strings — render as dots; the tile shows up to however many you want
|
|
97
|
-
optionLabel, // "3 sizes · 2 materials" or empty string
|
|
98
|
-
isQuickAddable,
|
|
99
|
-
directAddVariantId, // pass as variantId to addToCart on quick-add
|
|
100
|
-
image, // primary image URL | null
|
|
101
|
-
hoverImage, // second image URL for hover effect | null
|
|
102
|
-
};
|
|
103
|
-
}, [product]);
|
|
104
|
-
}
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
// useProductDetail — all PDP logic, no markup: load product by slug, resolve the buyer's selections
|
|
2
|
-
// to a Wix variant, gate add-to-cart on availability + mandatory modifiers, and build the addToCart
|
|
3
|
-
// payload. The data paths here (variant resolution, price precedence, modifier keys, stock gating)
|
|
4
|
-
// are the bug-prone part — keep them verbatim; the PDP page only renders what this returns.
|
|
5
|
-
import { useState, useEffect, useMemo } from "react";
|
|
6
|
-
import { getProductBySlug, sellingPrice } from "@/rest/wix-store-catalog";
|
|
7
|
-
import { choiceImage, variantImage } from "@/lib/storeImage";
|
|
8
|
-
import { useCart } from "@/context/CartContext";
|
|
9
|
-
|
|
10
|
-
// A variant is identified by the SET of its choice ids — sorted, so option order can't matter.
|
|
11
|
-
const choiceKey = (choiceIds) => [...choiceIds].sort().join("_");
|
|
12
|
-
|
|
13
|
-
export function useProductDetail(slug) {
|
|
14
|
-
const { addToCart } = useCart();
|
|
15
|
-
const [product, setProduct] = useState(null);
|
|
16
|
-
const [notFound, setNotFound] = useState(false);
|
|
17
|
-
// A missing product (notFound) and a failed request (error) need different pages: one is a dead
|
|
18
|
-
// link, the other is worth retrying. Without the split, a network blip reads as "product deleted".
|
|
19
|
-
const [error, setError] = useState(null);
|
|
20
|
-
const [adding, setAdding] = useState(false);
|
|
21
|
-
// Selections start EMPTY. Pre-picking the first choice lets a buyer who never noticed the default
|
|
22
|
-
// buy the wrong colour; the PDP shows a neutral "choose a size" until every option is picked.
|
|
23
|
-
const [selectedOptions, setSelectedOptions] = useState({});
|
|
24
|
-
const [modifierValues, setModifierValues] = useState({});
|
|
25
|
-
const [quantity, setQuantity] = useState(1);
|
|
26
|
-
const [reloadKey, setReloadKey] = useState(0);
|
|
27
|
-
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
let cancelled = false;
|
|
30
|
-
setProduct(null);
|
|
31
|
-
setNotFound(false);
|
|
32
|
-
setError(null);
|
|
33
|
-
setSelectedOptions({});
|
|
34
|
-
setQuantity(1);
|
|
35
|
-
getProductBySlug(slug)
|
|
36
|
-
.then((p) => {
|
|
37
|
-
if (cancelled) return;
|
|
38
|
-
if (!p) return setNotFound(true);
|
|
39
|
-
setProduct(p);
|
|
40
|
-
})
|
|
41
|
-
.catch((e) => { if (!cancelled) setError(e?.message || "Couldn't load this product."); });
|
|
42
|
-
return () => { cancelled = true; };
|
|
43
|
-
}, [slug, reloadKey]);
|
|
44
|
-
|
|
45
|
-
const options = product?.options || [];
|
|
46
|
-
const modifiers = product?.modifiers || [];
|
|
47
|
-
|
|
48
|
-
// Visible variants keyed by their sorted choice ids. Two variants with the same choices is a
|
|
49
|
-
// catalog defect — report it instead of silently letting one overwrite the other.
|
|
50
|
-
const { variantByKey, duplicateKey } = useMemo(() => {
|
|
51
|
-
const map = new Map();
|
|
52
|
-
let dup = null;
|
|
53
|
-
for (const v of product?.variantsInfo?.variants || []) {
|
|
54
|
-
if (v.visible === false) continue;
|
|
55
|
-
const k = choiceKey((v.choices || []).map((c) => c.optionChoiceIds?.choiceId));
|
|
56
|
-
if (map.has(k) && !dup) dup = k;
|
|
57
|
-
map.set(k, v);
|
|
58
|
-
}
|
|
59
|
-
return { variantByKey: map, duplicateKey: dup };
|
|
60
|
-
}, [product]);
|
|
61
|
-
|
|
62
|
-
const selectionComplete = options.length > 0 && options.every((o) => selectedOptions[o.id]);
|
|
63
|
-
const variant = useMemo(() => {
|
|
64
|
-
if (options.length === 0) return variantByKey.values().next().value || null; // the single variant
|
|
65
|
-
if (!selectionComplete || duplicateKey) return null;
|
|
66
|
-
return variantByKey.get(choiceKey(options.map((o) => selectedOptions[o.id]))) || null;
|
|
67
|
-
}, [options, variantByKey, duplicateKey, selectedOptions, selectionComplete]);
|
|
68
|
-
|
|
69
|
-
// In stock OR pre-orderable counts as buyable; a preorder add carries preOrderRequested.
|
|
70
|
-
const inStock = variant ? variant.inventoryStatus?.inStock !== false : true;
|
|
71
|
-
const isPreorder = !!variant && !inStock && variant.inventoryStatus?.preorderEnabled === true;
|
|
72
|
-
const available = inStock || isPreorder;
|
|
73
|
-
|
|
74
|
-
const missingModifier = modifiers.find((m) => m.mandatory && !(
|
|
75
|
-
m.modifierRenderType === "FREE_TEXT" ? modifierValues[m.freeTextSettings?.key] : modifierValues[m.key]));
|
|
76
|
-
|
|
77
|
-
const canAdd = useMemo(() => {
|
|
78
|
-
if (!product) return false;
|
|
79
|
-
if (options.length > 0 && !variant) return false;
|
|
80
|
-
if (variant && !available) return false;
|
|
81
|
-
return !missingModifier;
|
|
82
|
-
}, [product, options, variant, available, missingModifier]);
|
|
83
|
-
|
|
84
|
-
// Why the buy button is disabled — neutral guidance to render next to the action ("Choose a
|
|
85
|
-
// size"), not an error; null when the buyer can add. Promote to error styling only after they try.
|
|
86
|
-
const blockedReason = useMemo(() => {
|
|
87
|
-
if (!product) return null;
|
|
88
|
-
if (duplicateKey) return "This product's variants can't be resolved right now.";
|
|
89
|
-
if (options.length > 0 && !selectionComplete) {
|
|
90
|
-
const missing = options.filter((o) => !selectedOptions[o.id]).map((o) => o.name);
|
|
91
|
-
return `Choose ${missing.join(" and ")}`;
|
|
92
|
-
}
|
|
93
|
-
if (options.length > 0 && !variant) return "This combination isn't available";
|
|
94
|
-
if (variant && !available) return "Out of stock";
|
|
95
|
-
if (missingModifier) return `Add ${missingModifier.name}`;
|
|
96
|
-
return null;
|
|
97
|
-
}, [product, duplicateKey, options, selectionComplete, selectedOptions, variant, available, missingModifier]);
|
|
98
|
-
|
|
99
|
-
// Everything the buyer sees follows the resolved `variant` (also returned below). The price obeys
|
|
100
|
-
// the exact precedence in sellingPrice(): an automatic discount beats the regular price and strikes
|
|
101
|
-
// it; else the regular price with the merchant's compare-at as the "was". Before every option is
|
|
102
|
-
// picked, the product's min–max range (one value when equal) — never an empty price.
|
|
103
|
-
const min = product?.actualPriceRange?.minValue, max = product?.actualPriceRange?.maxValue;
|
|
104
|
-
const rangeDisplay = min?.amount && max?.amount && min.amount !== max.amount
|
|
105
|
-
? `${min.formattedAmount} – ${max.formattedAmount}` : (min?.formattedAmount || "");
|
|
106
|
-
const resolved = variant ? sellingPrice(variant.price) : null;
|
|
107
|
-
const price = resolved?.current?.formattedAmount || rangeDisplay;
|
|
108
|
-
const compareAtPrice = resolved && resolved.original?.formattedAmount &&
|
|
109
|
-
Number(resolved.original.amount) > Number(resolved.current?.amount) ? resolved.original.formattedAmount : "";
|
|
110
|
-
const discountNames = product?.discountInfo?.discountRuleNames || []; // automatic discounts, product level
|
|
111
|
-
|
|
112
|
-
// The gallery follows the selection. Prefer the selected choice's own image (the per-swatch photo,
|
|
113
|
-
// choice.media.items[].mediaId) — Wix's per-variant media is often NOT differentiated (it defaults to
|
|
114
|
-
// the product's main image), so preferring the variant would override the correct choice image for
|
|
115
|
-
// every colour. Fall back to the resolved variant's image only when no chosen option carries one.
|
|
116
|
-
// See lib/storeImage: choiceImage() / variantImage().
|
|
117
|
-
const focusMediaUrl = useMemo(() => {
|
|
118
|
-
for (const o of options) {
|
|
119
|
-
const choice = (o.choicesSettings?.choices || []).find((c) => c.choiceId === selectedOptions[o.id]);
|
|
120
|
-
const url = choiceImage(choice);
|
|
121
|
-
if (url) return url;
|
|
122
|
-
}
|
|
123
|
-
return variantImage(variant);
|
|
124
|
-
}, [variant, options, selectedOptions]);
|
|
125
|
-
|
|
126
|
-
// Changing an option resets the quantity — the ceiling belongs to the newly resolved variant.
|
|
127
|
-
const selectOption = (optionId, choiceId) => {
|
|
128
|
-
setSelectedOptions((s) => ({ ...s, [optionId]: choiceId }));
|
|
129
|
-
setQuantity(1);
|
|
130
|
-
};
|
|
131
|
-
const setModifier = (key, value) => setModifierValues((s) => ({ ...s, [key]: value }));
|
|
132
|
-
|
|
133
|
-
async function submit() {
|
|
134
|
-
const modifierChoices = {}, customTextFields = {};
|
|
135
|
-
modifiers.forEach((m) => {
|
|
136
|
-
const k = m.modifierRenderType === "FREE_TEXT" ? m.freeTextSettings?.key : m.key;
|
|
137
|
-
if (!k || !modifierValues[k]) return;
|
|
138
|
-
(m.modifierRenderType === "FREE_TEXT" ? customTextFields : modifierChoices)[k] = modifierValues[k];
|
|
139
|
-
});
|
|
140
|
-
setAdding(true);
|
|
141
|
-
try {
|
|
142
|
-
// addToCart reports its own failures through the cart context (it opens the drawer with the
|
|
143
|
-
// reason). Preserve its undefined-on-success / null-on-failure result for chained actions.
|
|
144
|
-
// Coerce the quantity: the shipped stepper lets the field sit empty mid-edit, and a keyboard
|
|
145
|
-
// submit from that state would otherwise post "" as the quantity.
|
|
146
|
-
return await addToCart(product.id, variant?.id, Math.max(1, Number(quantity) || 1), {
|
|
147
|
-
modifierChoices: Object.keys(modifierChoices).length ? modifierChoices : undefined,
|
|
148
|
-
customTextFields: Object.keys(customTextFields).length ? customTextFields : undefined,
|
|
149
|
-
preorder: isPreorder,
|
|
150
|
-
});
|
|
151
|
-
} finally {
|
|
152
|
-
setAdding(false);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return {
|
|
157
|
-
product, notFound, error, retry: () => setReloadKey((k) => k + 1),
|
|
158
|
-
options, modifiers,
|
|
159
|
-
selectedOptions, selectOption, modifierValues, setModifier,
|
|
160
|
-
quantity, setQuantity, variant, inStock, isPreorder, canAdd, blockedReason, adding,
|
|
161
|
-
price, compareAtPrice, discountNames, submit, focusMediaUrl,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// Catalog queries run on Wix before pagination. A changed selection starts a fresh cursor chain.
|
|
2
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { searchProducts, queryCategories, CATALOG_SORTS } from "@/rest/wix-store-catalog";
|
|
4
|
-
|
|
5
|
-
export const SORTS = CATALOG_SORTS;
|
|
6
|
-
const SYSTEM_CATEGORY_SLUG = "all-products";
|
|
7
|
-
|
|
8
|
-
export function useShop({ pageSize = 24 } = {}) {
|
|
9
|
-
const [categories, setCategories] = useState([]);
|
|
10
|
-
const [activeCategory, setActiveCategory] = useState(null);
|
|
11
|
-
const [sort, setSort] = useState("featured");
|
|
12
|
-
const [filters, setFilters] = useState({});
|
|
13
|
-
const [attempt, setAttempt] = useState(0);
|
|
14
|
-
const [page, setPage] = useState({ key: null, products: null, cursor: null, error: null, loadingMore: false });
|
|
15
|
-
const generation = useRef(0);
|
|
16
|
-
const pendingMore = useRef(null);
|
|
17
|
-
const key = JSON.stringify([pageSize, activeCategory?.id ?? null, sort, filters.minPrice ?? null,
|
|
18
|
-
filters.maxPrice ?? null, !!filters.inStockOnly, filters.search ?? "", attempt]);
|
|
19
|
-
const currentKey = useRef(key);
|
|
20
|
-
currentKey.current = key;
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
let alive = true;
|
|
24
|
-
queryCategories({ limit: 100 })
|
|
25
|
-
.then(({ categories: list }) => {
|
|
26
|
-
if (alive) setCategories((list || []).filter(c => c.visible !== false && c.slug !== SYSTEM_CATEGORY_SLUG));
|
|
27
|
-
})
|
|
28
|
-
.catch(() => { if (alive) setCategories([]); });
|
|
29
|
-
return () => { alive = false; };
|
|
30
|
-
}, []);
|
|
31
|
-
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
const id = ++generation.current;
|
|
34
|
-
let alive = true;
|
|
35
|
-
pendingMore.current = null;
|
|
36
|
-
setPage({ key, products: null, cursor: null, error: null, loadingMore: false });
|
|
37
|
-
const [limit, categoryId, selectedSort, minPrice, maxPrice, inStockOnly, search] = JSON.parse(key);
|
|
38
|
-
searchProducts({ limit, categoryId, sort: selectedSort, minPrice, maxPrice, inStockOnly, search })
|
|
39
|
-
.then(res => {
|
|
40
|
-
if (alive && generation.current === id && currentKey.current === key) {
|
|
41
|
-
setPage({ key, products: res.products, cursor: res.nextCursor, error: null, loadingMore: false });
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
.catch(e => {
|
|
45
|
-
if (alive && generation.current === id && currentKey.current === key) {
|
|
46
|
-
setPage({ key, products: [], cursor: null, error: e?.message || "Couldn't load products.", loadingMore: false });
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
return () => { alive = false; generation.current++; };
|
|
50
|
-
}, [key]);
|
|
51
|
-
|
|
52
|
-
const loadMore = useCallback(async () => {
|
|
53
|
-
if (page.key !== key || !page.cursor || pendingMore.current) return;
|
|
54
|
-
const request = { generation: generation.current, key };
|
|
55
|
-
pendingMore.current = request; // blocks repeated clicks before React rerenders
|
|
56
|
-
const isCurrent = () => generation.current === request.generation && currentKey.current === key;
|
|
57
|
-
setPage(p => ({ ...p, loadingMore: true, error: null }));
|
|
58
|
-
try {
|
|
59
|
-
const res = await searchProducts({ limit: pageSize, cursor: page.cursor });
|
|
60
|
-
if (isCurrent()) setPage(p => {
|
|
61
|
-
const seen = new Set((p.products || []).map(product => product.id));
|
|
62
|
-
return { ...p, products: [...(p.products || []), ...res.products.filter(product => {
|
|
63
|
-
if (seen.has(product.id)) return false;
|
|
64
|
-
seen.add(product.id); return true;
|
|
65
|
-
})], cursor: res.nextCursor };
|
|
66
|
-
});
|
|
67
|
-
} catch (e) {
|
|
68
|
-
if (isCurrent()) setPage(p => ({ ...p, error: e?.message || "Couldn't load more products." }));
|
|
69
|
-
} finally {
|
|
70
|
-
if (pendingMore.current === request) pendingMore.current = null;
|
|
71
|
-
if (isCurrent()) setPage(p => ({ ...p, loadingMore: false }));
|
|
72
|
-
}
|
|
73
|
-
}, [key, page.key, page.cursor, pageSize]);
|
|
74
|
-
|
|
75
|
-
const retry = useCallback(() => setAttempt(n => n + 1), []);
|
|
76
|
-
const current = page.key === key;
|
|
77
|
-
return {
|
|
78
|
-
categories, activeCategory, setActiveCategory, sort, setSort, filters, setFilters,
|
|
79
|
-
products: current ? page.products : null, loading: !current || page.products === null,
|
|
80
|
-
error: current ? page.error : null, retry,
|
|
81
|
-
hasMore: current && !!page.cursor, loadMore, loadingMore: current && page.loadingMore,
|
|
82
|
-
};
|
|
83
|
-
}
|