@salesforce/b2c-dx-mcp 3.2.1 → 3.3.0
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/bin/run.js +5 -9
- package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
- package/content/guidance/b2c/b2c-onboarding/SKILL.md +4 -4
- package/content/guidance/b2c/b2c-ordering/SKILL.md +2 -2
- package/content/guidance/b2c/b2c-querying-data/SKILL.md +2 -2
- package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +3 -3
- package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
- package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +6 -6
- package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
- package/content/guidance/b2c-cli/b2c-cip/SKILL.md +3 -3
- package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +1 -1
- package/content/guidance/b2c-cli/b2c-config/SKILL.md +31 -21
- package/content/guidance/b2c-cli/b2c-content/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-debug/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-docs/SKILL.md +23 -2
- package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +1 -1
- package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +1 -1
- package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +3 -3
- package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-sites/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-slas/SKILL.md +1 -1
- package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +2 -2
- package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +2 -2
- package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +1 -1
- package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +2 -2
- package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +4 -4
- package/content/guidance/index.json +935 -258
- package/content/guidance/mcp/{cip → b2c-mcp-cip}/SKILL.md +10 -8
- package/content/guidance/mcp/{b2c-config → b2c-mcp-config}/SKILL.md +10 -9
- package/content/guidance/mcp/{debugger → b2c-mcp-debugger}/SKILL.md +9 -8
- package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/SKILL.md +81 -10
- package/content/guidance/mcp/{server → b2c-mcp-server}/SKILL.md +49 -25
- package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
- package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
- package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +86 -79
- package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
- package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
- package/content/guidance/storefront-next/sfnext-components/SKILL.md +98 -136
- package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
- package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
- package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
- package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
- package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
- package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +116 -113
- package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
- package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +100 -150
- package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
- package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +83 -97
- package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
- package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +73 -97
- package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +47 -44
- package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +59 -114
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
- package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +96 -131
- package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
- package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
- package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +152 -131
- package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
- package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
- package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
- package/content/guidance/storefront-next/sfnext-performance/SKILL.md +75 -105
- package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
- package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
- package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +103 -116
- package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
- package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
- package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
- package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
- package/content/guidance/storefront-next/sfnext-routing/SKILL.md +86 -143
- package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
- package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
- package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
- package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
- package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
- package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
- package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
- package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
- package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +80 -89
- package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
- package/content/guidance/storefront-next/sfnext-testing/SKILL.md +105 -138
- package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
- package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
- package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
- package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
- package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
- package/dist/commands/mcp.d.ts +8 -2
- package/dist/commands/mcp.js +54 -20
- package/dist/guidance.d.ts +4 -1
- package/dist/guidance.js +23 -5
- package/dist/registry.d.ts +2 -1
- package/dist/registry.js +3 -3
- package/dist/server.d.ts +10 -0
- package/dist/server.js +21 -0
- package/dist/skill-references.js +5 -5
- package/dist/tools/cartridges/index.js +1 -0
- package/dist/tools/cip/index.js +6 -3
- package/dist/tools/diagnostics/debug-capture-at-breakpoint.js +1 -1
- package/dist/tools/diagnostics/debug-set-breakpoints.js +1 -1
- package/dist/tools/diagnostics/debug-start-session.js +1 -1
- package/dist/tools/scapi/index.d.ts +4 -1
- package/dist/tools/scapi/index.js +4 -2
- package/dist/tools/scapi/scapi-code.d.ts +2 -2
- package/dist/tools/scapi/scapi-code.js +17 -61
- package/dist/utils/types.d.ts +6 -0
- package/node_modules/@salesforce/b2c-agent-plugins/CHANGELOG.md +20 -0
- package/node_modules/@salesforce/b2c-agent-plugins/README.md +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-onboarding/SKILL.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-ordering/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-querying-data/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/SKILL.md +6 -6
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/references/SALES_ANALYSIS.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-config/SKILL.md +31 -21
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-content/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-debug/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-docs/SKILL.md +23 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/ADVANCED.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-job/references/IMPORT.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-metrics/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-mrt/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-custom/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-schemas/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-site-import-export/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-sites/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-slas/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-checkout-triage/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-job-health/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/references/order-evidence.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-production-triage/SKILL.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/README.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/SKILL.md +76 -73
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/evals/trigger-evals.json +12 -10
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/references/PAGE-DESIGNER-SFN.md +49 -74
- package/node_modules/@salesforce/b2c-agent-plugins/package.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/.codex-plugin/plugin.json +9 -6
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/README.md +43 -22
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/plugin.json +9 -6
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/SKILL.md +103 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/references/checklist.md +64 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/SKILL.md +91 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/SKILL.md +86 -79
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/COOKIES.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/SKILL.md +67 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/SKILL.md +98 -136
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/SHAPE-TOKENS.md +51 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/STORYBOOK.md +54 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TROUBLESHOOTING.md +19 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/SKILL.md +116 -113
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/SKILL.md +100 -150
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/ACTIONS.md +53 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADERS.md +73 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/SKILL.md +83 -97
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/SKILL.md +73 -97
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/BASE-AUDIT.md +47 -44
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/SKILL.md +59 -114
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/SKILL.md +96 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/references/locale-config.md +35 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/SKILL.md +101 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/SKILL.md +152 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/SKILL.md +75 -105
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/SKILL.md +103 -116
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SCRIPTS.md +47 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/SKILL.md +70 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/SKILL.md +121 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/SKILL.md +86 -143
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/SKILL.md +126 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/SKILL.md +129 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/TURNSTILE.md +43 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/SKILL.md +95 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/SEO-ROUTES.md +31 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/SKILL.md +80 -89
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/references/PATTERNS.md +45 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/SKILL.md +105 -138
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/E2E.md +38 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/SKILL.md +104 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next-figma/skills/sfnext-create-figma-kit/SKILL.md +3 -3
- package/oclif.manifest.json +21 -4
- package/package.json +3 -3
- package/content/guidance/storefront-next/sfnext-create-component/SKILL.md +0 -195
- package/content/guidance/storefront-next/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
- package/content/guidance/storefront-next/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
- package/content/guidance/storefront-next/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
- package/content/guidance/storefront-next/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
- package/content/guidance/storefront-next/sfnext-create-vertical/SKILL.md +0 -135
- package/content/guidance/storefront-next/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
- package/content/guidance/storefront-next/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
- package/content/guidance/storefront-next/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
- package/content/guidance/storefront-next/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
- package/content/guidance/storefront-next/sfnext-custom-apis/SKILL.md +0 -221
- package/content/guidance/storefront-next/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
- package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
- package/content/guidance/storefront-next/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
- package/content/guidance/storefront-next/sfnext-scapi-management/SKILL.md +0 -203
- package/content/guidance/storefront-next/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/SKILL.md +0 -195
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/SKILL.md +0 -135
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/SKILL.md +0 -221
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/SKILL.md +0 -203
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-apis.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-properties.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/jobs.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/products.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/promotions.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/saving.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/snippets.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/tokens.md +0 -0
- /package/content/guidance/mcp/{server → b2c-mcp-server}/references/files.md +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: figma-to-sfnext-pagedesigner
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
Convert a Figma frame into merchant-authorable Storefront Next Page Designer blocks: splits the frame into sections, proposes attributes with defaults from the design copy, reconciles brand tokens, writes React components with @Component/@AttributeDefinition metadata, a required fallback and (for catalog sections) a product loader, generates and deploys the Business Manager cartridge JSON, and checks design fidelity. Use when the user gives a Figma URL (with node-id) and wants it to become Page Designer components in a Storefront Next project. Requires the Figma MCP server; a browser MCP is recommended. Do not use for plain React/Tailwind without Page Designer, for SFRA/ISML (use `b2c:b2c-page-designer`), or for the Page Designer API reference (use `storefront-next:sfnext-page-designer`).
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Skill: figma-to-sfnext-pagedesigner
|
|
@@ -13,8 +14,9 @@ Convert a Figma frame into one or more live Storefront Next Page Designer blocks
|
|
|
13
14
|
|
|
14
15
|
- **Figma MCP server** configured in your AI tool — the skill reads design context through it. Without it, the skill can only act as a manual checklist.
|
|
15
16
|
- **Browser MCP** (Playwright or similar) — for the Phase 5 visual validation. Optional but recommended.
|
|
16
|
-
- A **Storefront Next** project in a git repo, with the `sfnext` CLI available (`pnpm sfnext …`).
|
|
17
|
-
-
|
|
17
|
+
- A **Storefront Next** project in a git repo (Node >= 24, pnpm >= 10.28), with the `sfnext` CLI available (`pnpm sfnext …`).
|
|
18
|
+
- A B2C instance and credentials for `pnpm cartridge:deploy` (see `b2c-cli:b2c-code`), and MRT access for `pnpm push` (see `b2c-cli:b2c-mrt`).
|
|
19
|
+
- `gh` CLI authenticated (`gh auth status`) only if you want the skill to clone the repo for you.
|
|
18
20
|
- A Figma frame URL that includes a `node-id`.
|
|
19
21
|
|
|
20
22
|
## When to use
|
|
@@ -23,7 +25,10 @@ Invoke this skill (`/figma-to-sfnext-pagedesigner`) whenever the user provides a
|
|
|
23
25
|
|
|
24
26
|
Do NOT invoke this when:
|
|
25
27
|
- The user only wants React/Tailwind code (no PD integration needed) — use the `figma-design-to-code` skill directly.
|
|
26
|
-
- The target project is SFRA/ISML, not Storefront Next.
|
|
28
|
+
- The target project is SFRA/ISML, not Storefront Next (use `b2c:b2c-page-designer`).
|
|
29
|
+
- The user wants to sync a design kit or Code Connect mappings from brand tokens (use `storefront-next-figma:sfnext-create-figma-kit`).
|
|
30
|
+
|
|
31
|
+
For the decorator, registry, loader and `<Region>` reference used throughout, see `storefront-next:sfnext-page-designer`.
|
|
27
32
|
|
|
28
33
|
---
|
|
29
34
|
|
|
@@ -33,10 +38,10 @@ Do NOT invoke this when:
|
|
|
33
38
|
|---|---|
|
|
34
39
|
| Figma node URL (must include `node-id`) | `https://www.figma.com/design/abc123/...?node-id=1-2` |
|
|
35
40
|
| Git repo URL (or a local path to the project) | `https://github.com/org/my-storefront` |
|
|
36
|
-
| PD group (palette folder) | `Content` |
|
|
41
|
+
| PD group (palette folder; the generated id is `<Group>.<typeId>`) | `Content` |
|
|
37
42
|
| Target branch | `main` or a feature branch name |
|
|
38
43
|
|
|
39
|
-
Do not ask the user for typeIds, display names, or descriptions upfront — derive these from the section names discovered in the frame and confirm them in the approval gate (Phase 1, step 4).
|
|
44
|
+
Use camelCase typeIds (for example `heroBanner`). Do not ask the user for typeIds, display names, or descriptions upfront — derive these from the section names discovered in the frame and confirm them in the approval gate (Phase 1, step 4).
|
|
40
45
|
|
|
41
46
|
If the Figma URL has no `node-id` query param, stop and ask the user to select the frame in Figma and copy the link — never guess a node ID.
|
|
42
47
|
|
|
@@ -62,7 +67,7 @@ All file writes in Phases 1–3 operate on this local clone.
|
|
|
62
67
|
|
|
63
68
|
1. Read `references/PAGE-DESIGNER-SFN.md` (bundled alongside this skill) — mental model for PD + Storefront Next.
|
|
64
69
|
2. Read the `figma-design-to-code` skill (from the official Figma plugin, if installed) — it governs correct `get_design_context` usage. If it isn't available, fall back to `get_design_context` + a screenshot and treat the design tokens as reference only.
|
|
65
|
-
3. Read `src/theme/tokens/brand.css` — know which design tokens exist AND their current values, so you can spot where the Figma design diverges and needs a token update (Phase 1b.1), not just which classes are available.
|
|
70
|
+
3. Read `src/theme/tokens/core.css` (and `brand.css`, `header.css` as needed; see `storefront-next:sfnext-theming`) — know which design tokens exist AND their current values, so you can spot where the Figma design diverges and needs a token update (Phase 1b.1), not just which classes are available.
|
|
66
71
|
4. Scan `src/components/` — identify shared atoms to reuse rather than rebuild.
|
|
67
72
|
|
|
68
73
|
---
|
|
@@ -127,7 +132,7 @@ Mark layout-only props (padding, rotation, shadow) as **hardcoded** — do not l
|
|
|
127
132
|
|
|
128
133
|
Walking a Figma design into the codebase is **not just adding new components — it also means updating the base design tokens the whole storefront already uses** wherever the design diverges from them. This is easy to miss: you build the new block correctly against existing tokens, but the design actually specifies a *different* primary color / radius / font, and the existing token is now wrong. The block looks right; the rest of the storefront (buttons, links, focus rings) is now off-brand.
|
|
129
134
|
|
|
130
|
-
For each section, before finalizing fields, compare the Figma design's core visual values against what's in `src/theme/tokens/brand.css` (and any shadcn/tailwind theme vars — `--primary`, `--accent`, `--background`, `--foreground`, `--radius`, font families):
|
|
135
|
+
For each section, before finalizing fields, compare the Figma design's core visual values against what's in `src/theme/tokens/core.css` and `brand.css` (and any shadcn/tailwind theme vars — `--primary`, `--accent`, `--background`, `--foreground`, `--ui-radius`, font families):
|
|
131
136
|
|
|
132
137
|
- **Primary / accent / brand colors** — if the Figma design's buttons, links, or highlights use a color that differs from the current `--primary` / `--accent` token value, that's a **token update**, not a per-component override. Do NOT hardcode the new hex in the block; update the token so every existing component (buttons, badges, focus states) inherits it.
|
|
133
138
|
- **Typography** — heading/body font family, weights, and scale. If the design uses a different type family than the token defines, flag the font token for update.
|
|
@@ -137,11 +142,11 @@ Produce a **token diff table** for the approval gate:
|
|
|
137
142
|
|
|
138
143
|
```
|
|
139
144
|
── Token reconciliation ──────────────────────────────────────
|
|
140
|
-
Token Current (
|
|
145
|
+
Token Current (core.css) Figma design Action
|
|
141
146
|
--------------------------------------------------------------
|
|
142
147
|
--primary #1f2a44 #E11D48 UPDATE (primary buttons are pink in design)
|
|
143
|
-
--radius
|
|
144
|
-
--font-
|
|
148
|
+
--ui-radius 0.5rem 0.75rem UPDATE
|
|
149
|
+
--font-sans "Inter" "Playfair" UPDATE
|
|
145
150
|
--accent #f5a623 #f5a623 keep (matches)
|
|
146
151
|
```
|
|
147
152
|
|
|
@@ -162,12 +167,12 @@ Update the tables to reflect corrections, then confirm once more if changes were
|
|
|
162
167
|
|
|
163
168
|
### 1d — Apply approved token updates, then write the React component (after approval)
|
|
164
169
|
|
|
165
|
-
**First, apply any token updates approved in 1b.1.** Edit `src/theme/tokens/brand.css`
|
|
170
|
+
**First, apply any token updates approved in 1b.1.** Edit the token file in `src/theme/tokens/` where the variable lives (`core.css` for the palette and shape, `header.css` for header/footer, `brand.css` for `--brand-*`; fonts are in `src/theme/tailwind.css`) to the new values *before* writing components, so the new block and all existing components render against the corrected tokens. This is a real edit to the base design — commit it alongside the new component in Phase 4.
|
|
166
171
|
|
|
167
172
|
Then, for each section, write `src/components/<name>/index.tsx`:
|
|
168
173
|
- Props typed as a plain TypeScript interface — all approved authorable fields plus any layout-only props needed for rendering.
|
|
169
|
-
- No decorator imports yet.
|
|
170
|
-
- Use
|
|
174
|
+
- No decorator imports yet; add them in Phase 2. Also plan a lightweight `fallback` export (Phase 2f).
|
|
175
|
+
- Use theme tokens (`src/theme/tokens/*.css`) as Tailwind utilities or CSS variables — no hardcoded hex. If the design needed a shared value changed (primary color, radius, font), that lives in the updated token, not in the component.
|
|
171
176
|
- Reuse existing shared components where they match design intent.
|
|
172
177
|
|
|
173
178
|
---
|
|
@@ -181,15 +186,13 @@ Using the approved field plan from Phase 1, edit `src/components/<name>/index.ts
|
|
|
181
186
|
### 2a — Imports (add at top)
|
|
182
187
|
|
|
183
188
|
```tsx
|
|
184
|
-
import { Component } from '@/lib/decorators
|
|
185
|
-
import {
|
|
186
|
-
import { RegionDefinition } from '@/lib/decorators';
|
|
189
|
+
import { AttributeDefinition, Component, RegionDefinition } from '@/lib/decorators';
|
|
190
|
+
import { type Image } from '@/types';
|
|
187
191
|
```
|
|
188
192
|
|
|
189
193
|
### 2b — Metadata class (insert above the default export)
|
|
190
194
|
|
|
191
195
|
```tsx
|
|
192
|
-
/* v8 ignore start */
|
|
193
196
|
@Component('typeId', { name: 'Display Name', description: 'Description', group: 'Content' })
|
|
194
197
|
@RegionDefinition([])
|
|
195
198
|
export class <Name>Metadata {
|
|
@@ -200,12 +203,15 @@ export class <Name>Metadata {
|
|
|
200
203
|
ctaLabel?: string;
|
|
201
204
|
|
|
202
205
|
@AttributeDefinition({ id: 'backgroundImage', name: 'Background Image', type: 'image', required: true })
|
|
203
|
-
backgroundImage?:
|
|
206
|
+
backgroundImage?: Image;
|
|
204
207
|
}
|
|
205
|
-
/* v8 ignore end */
|
|
206
208
|
```
|
|
207
209
|
|
|
208
210
|
Rules:
|
|
211
|
+
- The metadata class must be `export`ed, and each class field name must equal its attribute `id`; the field name is the prop name the component receives.
|
|
212
|
+
- `typeId` must be a string literal in camelCase. `group` is the palette folder; the registry id becomes `<Group>.<typeId>` (for example `Content.heroBanner`).
|
|
213
|
+
- An `image` attribute delivers an `Image` object (`{ url, metaData?, focalPoint? }`, from `@/types`), not a string. Render it with `image.url`.
|
|
214
|
+
- A `markup` attribute delivers raw HTML; render it with `dangerouslySetInnerHTML` only from trusted Page Designer content.
|
|
209
215
|
- Set `defaultValue` for every `string`, `markup`, and `boolean` field using the value from the approved field plan.
|
|
210
216
|
- Do **not** set `defaultValue` on `image`, `url`, `product`, or `category` fields — these require real assets the Figma mock cannot provide.
|
|
211
217
|
- Only include props marked authorable in the plan. Layout props are not attributes.
|
|
@@ -223,7 +229,7 @@ Apply these rules to each authorable prop name:
|
|
|
223
229
|
| Long body copy / rich text | `markup` |
|
|
224
230
|
| Anything else | `string` |
|
|
225
231
|
|
|
226
|
-
For product reference props → `product`. For category reference props → `category`.
|
|
232
|
+
For product reference props → `product`. For category reference props → `category`. Other supported types are `text`, `file`, `page`, `enum`, `custom` and `cms_record`; see `storefront-next:sfnext-page-designer`.
|
|
227
233
|
|
|
228
234
|
### 2d — Regions (if has_regions = true)
|
|
229
235
|
|
|
@@ -256,16 +262,17 @@ product1Id?: string;
|
|
|
256
262
|
product2Id?: string;
|
|
257
263
|
```
|
|
258
264
|
|
|
259
|
-
**Loader** — the thing the registry imports as `loader` MUST be a callable function. A top-level async function is the simplest correct shape:
|
|
265
|
+
**Loader** — `componentData` is the whole SCAPI component object, so merchant-set attributes live at `componentData.data.*`. The loader runs on the server only (it may import `*.server` modules; the component file must not). The thing the registry imports as `loader` MUST be a callable function. A top-level async function is the simplest correct shape:
|
|
260
266
|
|
|
261
267
|
```tsx
|
|
262
|
-
|
|
263
|
-
|
|
268
|
+
import type { LoaderFunctionArgs } from 'react-router'
|
|
269
|
+
import { fetchProductById } from '@/lib/api/products.server'
|
|
270
|
+
|
|
271
|
+
export async function loader({ componentData, context }: { componentData: { data?: Record<string, unknown> }; context: LoaderFunctionArgs['context'] }) {
|
|
272
|
+
const productId = componentData.data?.productId as string | undefined
|
|
264
273
|
if (!productId) return null
|
|
265
274
|
|
|
266
|
-
const product = await context
|
|
267
|
-
parameters: { id: productId, allImages: true },
|
|
268
|
-
})
|
|
275
|
+
const product = await fetchProductById(context, productId)
|
|
269
276
|
return { product }
|
|
270
277
|
}
|
|
271
278
|
```
|
|
@@ -293,18 +300,14 @@ export const loader = loaders.server // ✅ callable — NOT `export { loader
|
|
|
293
300
|
For multi-product blocks, fetch in parallel:
|
|
294
301
|
|
|
295
302
|
```tsx
|
|
296
|
-
export async function loader({ componentData, context }: { componentData:
|
|
303
|
+
export async function loader({ componentData, context }: { componentData: { data?: Record<string, unknown> }; context: LoaderFunctionArgs['context'] }) {
|
|
297
304
|
const ids = ['product1Id', 'product2Id', 'product3Id']
|
|
298
|
-
.map((k) => componentData.data?.[k] as string)
|
|
299
|
-
.filter(Boolean)
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
parameters: { id, allImages: true },
|
|
305
|
-
})
|
|
306
|
-
)
|
|
307
|
-
)
|
|
305
|
+
.map((k) => componentData.data?.[k] as string | undefined)
|
|
306
|
+
.filter((id): id is string => Boolean(id))
|
|
307
|
+
if (ids.length === 0) return null
|
|
308
|
+
|
|
309
|
+
// One batched SCAPI call for all slots
|
|
310
|
+
const products = await fetchProductsByIds(context, ids)
|
|
308
311
|
return { products }
|
|
309
312
|
}
|
|
310
313
|
```
|
|
@@ -318,9 +321,11 @@ export default function ProductRow({ product1Id, data }: ProductRowProps & { dat
|
|
|
318
321
|
}
|
|
319
322
|
```
|
|
320
323
|
|
|
321
|
-
**Flag `needs_server_loader = true`** in the prop triage
|
|
324
|
+
**Flag `needs_server_loader = true`** in the prop triage. The registry records the `loader` flag for you (Phase 3).
|
|
322
325
|
|
|
323
|
-
|
|
326
|
+
### 2f — Fallback (required for every block)
|
|
327
|
+
|
|
328
|
+
Every component must export a lightweight `fallback` with reserved height; it renders in a Suspense boundary while the loader or component chunk loads:
|
|
324
329
|
|
|
325
330
|
```tsx
|
|
326
331
|
export function fallback() {
|
|
@@ -328,32 +333,18 @@ export function fallback() {
|
|
|
328
333
|
}
|
|
329
334
|
```
|
|
330
335
|
|
|
331
|
-
Register it: `{ loader: 'loader', fallback: 'fallback' }`
|
|
332
336
|
|
|
333
337
|
---
|
|
334
338
|
|
|
335
|
-
## Phase 3 —
|
|
339
|
+
## Phase 3 — Verify the registry entry (no manual edit)
|
|
336
340
|
|
|
337
|
-
|
|
341
|
+
`src/lib/page-designer/static-registry.ts` is generated. When `pnpm dev` or `pnpm build` starts, the Vite plugin scans `src/components` for `@Component` and rewrites the block between the `STATIC_REGISTRY_START` / `STATIC_REGISTRY_END` markers, including `{ loader: 'loader' }` and `{ fallback: 'fallback' }` flags. Do not hand-edit it.
|
|
338
342
|
|
|
339
|
-
|
|
343
|
+
Run `pnpm dev` (or `pnpm build`) once, then confirm the file contains an entry for `'<Group>.<typeId>'` with the expected flags. A missing entry means the metadata class is not exported, the `typeId` is not a string literal, or the component is not under `src/components`.
|
|
340
344
|
|
|
341
|
-
|
|
342
|
-
targetRegistry.registerImporter(
|
|
343
|
-
'Group.typeId',
|
|
344
|
-
() => import('../../components/<name>/index')
|
|
345
|
-
);
|
|
346
|
-
```
|
|
345
|
+
### Placing the blocks on a page
|
|
347
346
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
```ts
|
|
351
|
-
targetRegistry.registerImporter(
|
|
352
|
-
'Group.typeId',
|
|
353
|
-
() => import('../../components/<name>/index'),
|
|
354
|
-
{ loader: 'loader' }
|
|
355
|
-
);
|
|
356
|
-
```
|
|
347
|
+
Blocks appear in regions of a page. Merchants place them in Business Manager, but the page route must render that region: use `fetchPageWithComponentData` and `<Region page={...} regionId="..." />` (routes such as home already do). See `storefront-next:sfnext-page-designer` for routes, aspect types and `critical` regions. Do not pass `componentData` to `<Region>`.
|
|
357
348
|
|
|
358
349
|
---
|
|
359
350
|
|
|
@@ -365,23 +356,23 @@ targetRegistry.registerImporter(
|
|
|
365
356
|
pnpm cartridge:generate
|
|
366
357
|
```
|
|
367
358
|
|
|
368
|
-
Confirm the expected JSON files were written under `cartridges
|
|
359
|
+
Confirm the expected JSON files were written under `cartridges/app_storefrontnext_base/cartridge/experience/`, then run `pnpm cartridge:validate` to check them against the schemas. If either fails, fix before committing — a broken decorator parse blocks the deploy too.
|
|
369
360
|
|
|
370
361
|
### 4b — Commit
|
|
371
362
|
|
|
372
|
-
Commit the new component file(s), the registry
|
|
363
|
+
Commit the new component file(s), the regenerated registry, the generated cartridge JSON, **and any token updates from Phase 1d**. If the token changes were substantial, keep them in a separate commit (e.g. `chore: align brand tokens with Figma design`) so the rebrand is reviewable on its own.
|
|
373
364
|
|
|
374
365
|
### 4c — Deploy
|
|
375
366
|
|
|
376
367
|
Two commands make the block live — run them directly against the target instance/environment:
|
|
377
368
|
|
|
378
|
-
1. **Cartridge deploy** (`pnpm cartridge:deploy` / `sfnext deploy-cartridge`) — uploads the cartridge JSON to B2C. The new component types appear in the Page Designer palette after this.
|
|
369
|
+
1. **Cartridge deploy** (`pnpm cartridge:deploy` / `sfnext deploy-cartridge`; `-- --delete` removes old cartridge files first) — uploads the cartridge JSON to B2C. The new component types appear in the Page Designer palette after this. The optional MCP tool `cartridge_deploy` does the same.
|
|
379
370
|
|
|
380
|
-
2. **MRT deploy** (`pnpm push` / `sfnext push`) — deploys the storefront bundle to
|
|
371
|
+
2. **MRT deploy** (`pnpm push` / `sfnext push`) — deploys the storefront bundle to Managed Runtime so the new React components render (see `storefront-next:sfnext-deployment`).
|
|
381
372
|
|
|
382
373
|
Then tell the user: open Business Manager → Page Designer → the target page, and the new blocks appear in the component palette ready to author — text fields pre-filled with the copy from the Figma design; they just swap in real images, URLs, and product IDs.
|
|
383
374
|
|
|
384
|
-
If a deploy command fails, re-run it with `--log-level trace` for full diagnostics, and consult the `b2c` and `b2c-cli` skills (if installed) — they cover auth, WebDAV, and deploy troubleshooting in depth.
|
|
375
|
+
If a deploy command fails, re-run it with `--log-level trace` for full diagnostics, and consult the `b2c-cli:b2c-code` and `b2c-cli:b2c-mrt` skills (if installed) — they cover auth, WebDAV, and deploy troubleshooting in depth.
|
|
385
376
|
|
|
386
377
|
---
|
|
387
378
|
|
|
@@ -393,7 +384,7 @@ If a deploy command fails, re-run it with `--log-level trace` for full diagnosti
|
|
|
393
384
|
```
|
|
394
385
|
cartridges/app_storefrontnext_base/cartridge/experience/components/<Group>/<typeId>.json
|
|
395
386
|
```
|
|
396
|
-
2. If browser MCP is available: open Business Manager → Merchant Tools → Content →
|
|
387
|
+
2. If browser MCP is available: open Business Manager → Merchant Tools → Content → Page Designer, confirm each component appears in the component palette under its group.
|
|
397
388
|
|
|
398
389
|
### 5b — Visual design match (Chrome)
|
|
399
390
|
|
|
@@ -421,13 +412,14 @@ If `pnpm dev` is not running or browser MCP is unavailable, explicitly tell the
|
|
|
421
412
|
| Symptom | Fix |
|
|
422
413
|
|---|---|
|
|
423
414
|
| `get_design_context` returns no Code Connect hints | Project has no `.figma.ts` files yet — use raw design tokens and screenshot as reference only. |
|
|
424
|
-
| `cartridge:generate` exits with decorator parse error | The metadata class must be
|
|
415
|
+
| `cartridge:generate` exits with decorator parse error or an invalid attribute config | The metadata class must be an exported `class` (not interface) and decorators must be on class fields, not function params. Check `typeId` is a literal and attribute options (for example `searching`) are valid. |
|
|
425
416
|
| Component not appearing in PD palette after deploy | Check BM → Administration → Site Development → Development Setup for cartridge assignment; the storefront cartridge must be in the cartridge path. |
|
|
426
|
-
| `cartridge:deploy` / `push` fails (auth, WebDAV, or connection error) | Re-run the command with `--log-level trace` for full diagnostics, and consult the `b2c` / `b2c-cli` skills (if installed) — they cover auth and deploy troubleshooting. |
|
|
427
|
-
| `markup` type attribute renders as escaped HTML | Use `dangerouslySetInnerHTML={{ __html:
|
|
428
|
-
|
|
|
417
|
+
| `cartridge:deploy` / `push` fails (auth, WebDAV, or connection error) | Re-run the command with `--log-level trace` for full diagnostics, and consult the `b2c-cli:b2c-code` / `b2c-cli:b2c-mrt` skills (if installed) — they cover auth and deploy troubleshooting. |
|
|
418
|
+
| `markup` type attribute renders as escaped HTML | Use `dangerouslySetInnerHTML={{ __html: bodyText }}` for markup-typed attributes — they send raw HTML. |
|
|
419
|
+
| Component missing from `static-registry.ts` | The metadata class is not exported, `typeId` is not a literal, or the file is outside `src/components`. Restart `pnpm dev` and re-check. More symptoms: `storefront-next:sfnext-page-designer` (Troubleshooting). |
|
|
429
420
|
| Product block renders as a blank/empty space, no error | The export named `loader` is not callable (a `{ server: fn }` object, or `export { loader } from './loaders'` re-exporting that object). The loader never runs, `data` is `undefined`, and `return null` hides the block. Fix: export a callable — `export const loader = loaders.server` or a plain `export async function loader(...)`. Verify with `typeof loader === 'function'`. See Phase 2e. |
|
|
430
|
-
| New block looks right but the rest of the storefront is off-brand (wrong button colour, radius, font) | A shared value in the Figma design diverged from an existing token and was missed. Update the token in `src/theme/tokens
|
|
421
|
+
| New block looks right but the rest of the storefront is off-brand (wrong button colour, radius, font) | A shared value in the Figma design diverged from an existing token and was missed. Update the token in `src/theme/tokens/` (Phase 1b.1 / 1d), don't hardcode it in the block. |
|
|
422
|
+
| Block shows only its skeleton or nothing | The component has no `fallback` export, or the page route does not render the region. See Phase 3. |
|
|
431
423
|
|
|
432
424
|
---
|
|
433
425
|
|
|
@@ -436,9 +428,20 @@ If `pnpm dev` is not running or browser MCP is unavailable, explicitly tell the
|
|
|
436
428
|
A completed block's `src/components/<name>/index.tsx` contains, in order:
|
|
437
429
|
|
|
438
430
|
1. Imports — React/Tailwind, shared components, and the PD decorators (`Component`, `AttributeDefinition`, `RegionDefinition`).
|
|
439
|
-
2.
|
|
431
|
+
2. An exported `@Component`-decorated metadata class declaring each authorable attribute with its `type`, `required`, and (for string/markup/boolean) `defaultValue`.
|
|
440
432
|
3. A plain TypeScript props interface.
|
|
441
|
-
4.
|
|
433
|
+
4. A required `export function fallback()` skeleton, and for product blocks a callable `export async function loader(...)`.
|
|
442
434
|
5. The default-exported React component, destructuring both the PD attributes and `data` (the loader return).
|
|
443
435
|
|
|
444
|
-
Brand values come from
|
|
436
|
+
Brand values come from theme tokens as Tailwind utilities/CSS variables — never hardcoded hex.
|
|
437
|
+
|
|
438
|
+
## Related Skills
|
|
439
|
+
|
|
440
|
+
- `storefront-next:sfnext-page-designer` - decorators, registry, loaders, `<Region>`, troubleshooting
|
|
441
|
+
- `storefront-next:sfnext-theming` - brand tokens and theme files
|
|
442
|
+
- `storefront-next:sfnext-components` - component conventions
|
|
443
|
+
- `storefront-next:sfnext-deployment` - shipping the storefront bundle
|
|
444
|
+
- `storefront-next-figma:sfnext-create-figma-kit` - building the Figma kit from your tokens
|
|
445
|
+
- `b2c-cli:b2c-code` - cartridge and code-version deployment
|
|
446
|
+
- `b2c-cli:b2c-mrt` - Managed Runtime deploys
|
|
447
|
+
- `b2c:b2c-page-designer` - classic Page Designer
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
[
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
2
|
+
{
|
|
3
|
+
"query": "Here's a Figma frame for our new homepage \u2014 turn it into Page Designer blocks for my Storefront Next project so merchants can edit the copy.",
|
|
4
|
+
"should_trigger": true
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"query": "Build Page Designer blocks from my Figma mockup and wire up the product cards to pull live catalog data via SCAPI.",
|
|
8
|
+
"should_trigger": true
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"query": "Just implement this Figma design as plain React and Tailwind components \u2014 I don't need any Page Designer or Business Manager integration.",
|
|
12
|
+
"should_trigger": false
|
|
13
|
+
}
|
|
12
14
|
]
|
|
@@ -1,120 +1,95 @@
|
|
|
1
|
-
# Page Designer + Storefront Next
|
|
1
|
+
# Page Designer + Storefront Next: mental model and gotchas
|
|
2
2
|
|
|
3
|
-
> **Purpose:** background reference for the `figma-to-sfnext-
|
|
3
|
+
> **Purpose:** background reference for the `figma-to-sfnext-pagedesigner` skill. It explains how React components become Page Designer components in a Storefront Next project. The skill reads this file during pre-flight. For the full decorator, registry and loader API, use `storefront-next:sfnext-page-designer`.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## 1. Related tooling
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Install these alongside this skill:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
claude plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
|
|
13
|
-
claude plugin install storefront-next
|
|
14
|
-
claude plugin install b2c-cli
|
|
15
|
-
claude plugin install b2c
|
|
13
|
+
claude plugin install storefront-next # Storefront Next skills incl. sfnext-page-designer
|
|
14
|
+
claude plugin install b2c-cli # cartridge/code deploys, Managed Runtime, WebDAV
|
|
15
|
+
claude plugin install b2c # classic B2C and Page Designer background
|
|
16
16
|
# optional:
|
|
17
|
-
claude plugin install b2c-dx-mcp
|
|
18
|
-
claude plugin install storefront-next-figma
|
|
17
|
+
claude plugin install b2c-dx-mcp # MCP server (docs search, SCAPI discovery, cartridge_deploy)
|
|
18
|
+
claude plugin install storefront-next-figma # Figma design-kit workflows
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
When uncertain about anything below,
|
|
21
|
+
When uncertain about anything below, read the official docs (section 7); this area evolves.
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
## 2. Mental model
|
|
25
|
+
## 2. Mental model
|
|
26
26
|
|
|
27
|
-
Page Designer (PD) is the visual editor in Business Manager where merchants
|
|
27
|
+
Page Designer (PD) is the visual editor in Business Manager where merchants drag **component types** into **page-type regions**. Classic (SFRA) PD needs hand-written JSON meta-definitions and ISML. In Storefront Next, **your React components are the PD components**. The bridge is decorator metadata:
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
1. You annotate components under `src/components` with decorators from `@/lib/decorators`: `@Component` (component type), `@AttributeDefinition` (editable fields), `@RegionDefinition` (named child slots). Page routes use `@PageType` (with `supportedAspectTypes` for dynamic PDP/PLP templates). There is no `@Aspect` decorator.
|
|
30
|
+
2. The Vite plugin generates `src/lib/page-designer/static-registry.ts` from `@Component` classes, keyed `<Group>.<typeId>`. It is generated; do not hand-edit it.
|
|
31
|
+
3. `pnpm cartridge:generate` (also run by `pnpm build`) turns the decorators into Business Manager JSON under `cartridges/app_storefrontnext_base/cartridge/experience/` (`components/<Group>/<typeId>.json`, `pages/`, `aspects/`).
|
|
32
|
+
4. `pnpm cartridge:deploy` uploads that cartridge to the B2C instance, which makes the components appear in the PD palette.
|
|
33
|
+
5. At runtime a route loader calls `fetchPageWithComponentData` (which reads the page from the Shopper Experience API and attaches each component's loader promise), and `<Region>` renders the components by registry id.
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
2. The `sfnext` CLI **scans `src/` for those decorators and generates the classic PD JSON metadata** into `cartridge/cartridge/experience/` (separate files for components, page types, aspects).
|
|
33
|
-
3. That generated cartridge is deployed to the B2C instance, which is what makes your components appear in the Page Designer visual editor for merchants.
|
|
34
|
-
4. At runtime, the storefront renders PD pages via **prebuilt page manifests** served from the **MRT Data Store** (not assembled per shopper request), and/or the **`shopperExperience`** SCAPI client for page/content lookups.
|
|
35
|
+
Two loops to keep straight:
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- **Dev-time loop (you):** decorated components → generated metadata cartridge → deployed to B2C. Keeps the _palette of available components_ in PD current.
|
|
39
|
-
- **Merchant-time loop (automatic):** merchant edits pages in PD → system job prebuilds manifests → pushed to MRT Data Store → storefront reads them. Keeps the _page content_ current.
|
|
37
|
+
- **Dev-time loop (you):** decorated components, generated cartridge, deployed to B2C. Keeps the palette current.
|
|
38
|
+
- **Merchant-time loop:** merchants edit pages in PD; the storefront renders their content. For how published page content reaches your storefront (publishing, jobs, replication), see the official docs in section 7 rather than assuming timing.
|
|
40
39
|
|
|
41
40
|
---
|
|
42
41
|
|
|
43
42
|
## 3. Developer workflow
|
|
44
43
|
|
|
45
|
-
### Author
|
|
46
|
-
|
|
47
|
-
Create/modify a React component, annotate with the PD decorators (`@Component` for component types, `@PageType` for page layouts with regions, `@Aspect` for dynamic page types like PDP/PLP templates). The `storefront-next` plugin skill has the current decorator API — follow it rather than guessing attribute schemas.
|
|
48
|
-
|
|
49
|
-
### Generate + deploy metadata
|
|
50
|
-
|
|
51
44
|
```bash
|
|
52
|
-
pnpm
|
|
53
|
-
pnpm
|
|
45
|
+
pnpm dev # regenerates the registry as components change
|
|
46
|
+
pnpm cartridge:generate # decorators -> cartridge JSON
|
|
47
|
+
pnpm cartridge:validate # validate the generated JSON
|
|
48
|
+
pnpm cartridge:deploy # upload to B2C (-- --delete removes old files first)
|
|
49
|
+
pnpm push # deploy the storefront bundle to Managed Runtime
|
|
54
50
|
```
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### Keep metadata in sync automatically (recommended once stable)
|
|
52
|
+
The same commands exist as `pnpm sfnext generate-cartridge`, `validate-cartridge`, `deploy-cartridge` and `push`. The optional MCP tool `cartridge_deploy` deploys the cartridge. Credentials come from `dw.json`, environment variables or CLI flags; see `b2c-cli:b2c-code`.
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
// config.ts
|
|
62
|
-
export const GENERATE_AND_DEPLOY_CARTRIDGE_ON_MRT_PUSH = true; // default: false
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
With this on, every `pnpm sfnext push` (MRT deploy) first regenerates and redeploys the cartridge metadata — code on MRT and component palette in PD can't drift.
|
|
66
|
-
|
|
67
|
-
### Deploy the storefront itself
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
pnpm sfnext push -e <mrt-environment> -w
|
|
71
|
-
```
|
|
54
|
+
Deploy order: cartridge first (palette), bundle second (rendering). Both must be current before merchants see working blocks.
|
|
72
55
|
|
|
73
56
|
---
|
|
74
57
|
|
|
75
|
-
## 4.
|
|
58
|
+
## 4. Prerequisites and gotchas
|
|
76
59
|
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
60
|
+
- [ ] **Storefront connected in Business Manager.** A storefront created outside Business Manager may need connecting before PD and Storefront Preview see it; check the official docs (section 7) for the current steps.
|
|
61
|
+
- [ ] A valid `dw.json` (or equivalent) for `cartridge:deploy`; MRT credentials for `push` (see `b2c-cli:b2c-mrt`).
|
|
62
|
+
- [ ] Component missing from the PD palette: regenerate, validate, redeploy to the active code version, hard-refresh PD. Also check the registry entry exists.
|
|
63
|
+
- [ ] Block renders empty: the exported `loader` is not a function, or the attribute is read from the wrong place. Attributes are at `componentData.data.*` in loaders.
|
|
64
|
+
- [ ] Every component needs a `fallback` export.
|
|
65
|
+
- [ ] Render PD content in route loaders with `fetchPageWithComponentData` (server-side), not in client effects. `<Region>` takes `page` (and no `componentData`).
|
|
66
|
+
- [ ] Node >= 24 and pnpm >= 10.28; run `sfnext` as `pnpm sfnext ...` from the project root.
|
|
81
67
|
|
|
82
68
|
---
|
|
83
69
|
|
|
84
|
-
## 5.
|
|
70
|
+
## 5. Vocabulary
|
|
85
71
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
72
|
+
| Term | Meaning |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| Page type | Layout definition with named regions (`@PageType` on a route's metadata class) |
|
|
75
|
+
| Component type | Reusable block with merchant-editable attributes (`@Component`) |
|
|
76
|
+
| Region | Named slot that accepts child components (`@RegionDefinition`, rendered by `<Region>`) |
|
|
77
|
+
| Aspect / dynamic page | Template page driven by runtime attributes, such as PDP or PLP (`supportedAspectTypes`) |
|
|
78
|
+
| Generated cartridge | `cartridges/app_storefrontnext_base/cartridge/experience/` JSON; regenerate, never hand-edit |
|
|
79
|
+
| Static registry | Generated map of `<Group>.<typeId>` to lazy component imports and loader/fallback flags |
|
|
93
80
|
|
|
94
81
|
---
|
|
95
82
|
|
|
96
|
-
## 6.
|
|
83
|
+
## 6. Where this skill ends
|
|
97
84
|
|
|
98
|
-
|
|
99
|
-
| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
100
|
-
| Page type | Layout definition with named regions merchants fill with components |
|
|
101
|
-
| Component type | Reusable building block with merchant-editable attributes |
|
|
102
|
-
| Region | Named slot in a page/component that accepts child components |
|
|
103
|
-
| Aspect / dynamic page | Template page driven by runtime attributes (e.g. PDP/PLP templates) |
|
|
104
|
-
| Decorators (`@Component`, `@PageType`, `@Aspect`) | TS annotations on React components that the CLI compiles into PD metadata |
|
|
105
|
-
| Generated cartridge | `cartridge/cartridge/experience/` JSON produced by `generate-cartridge` — never hand-edit; regenerate |
|
|
106
|
-
| Page manifest | Prebuilt PD page description stored in the MRT Data Store, read at render time |
|
|
107
|
-
| MRT Data Store | MRT-side storage syncing site preferences + PD manifests from B2C |
|
|
108
|
-
| `shopperExperience` | SCAPI client namespace for fetching PD pages/content in loaders |
|
|
85
|
+
This skill produces components, metadata and a deployed palette. Placing blocks on a specific page, aspect types and critical regions are covered by `storefront-next:sfnext-page-designer`; token changes by `storefront-next:sfnext-theming`.
|
|
109
86
|
|
|
110
87
|
---
|
|
111
88
|
|
|
112
|
-
## 7. Official docs
|
|
89
|
+
## 7. Official docs
|
|
113
90
|
|
|
114
91
|
- Page Designer with Storefront Next: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-page-designer.html
|
|
115
|
-
- MRT Data Store
|
|
92
|
+
- MRT Data Store: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-mrt-data-store.html
|
|
116
93
|
- Connect an existing storefront: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-connect-storefront.html
|
|
117
|
-
- CLI reference
|
|
118
|
-
-
|
|
119
|
-
- Agentic B2C Developer Toolkit (plugins/MCP): https://salesforcecommercecloud.github.io/b2c-developer-tooling/
|
|
120
|
-
- Classic PD concepts (background only — SFRA-era): https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html
|
|
94
|
+
- CLI reference: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-cli.html
|
|
95
|
+
- Agentic B2C Developer Toolkit: https://salesforcecommercecloud.github.io/b2c-developer-tooling/llms.txt
|
package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/.codex-plugin/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storefront-next",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Storefront Next development skills for building React 19 storefronts on Salesforce B2C Commerce.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Salesforce"
|
|
@@ -13,13 +13,16 @@
|
|
|
13
13
|
"storefront-next",
|
|
14
14
|
"react",
|
|
15
15
|
"b2c-commerce",
|
|
16
|
-
"commerce-cloud"
|
|
16
|
+
"commerce-cloud",
|
|
17
|
+
"react-router",
|
|
18
|
+
"page-designer",
|
|
19
|
+
"scapi"
|
|
17
20
|
],
|
|
18
21
|
"skills": "./skills/",
|
|
19
22
|
"interface": {
|
|
20
23
|
"displayName": "Storefront Next",
|
|
21
24
|
"shortDescription": "Build Salesforce B2C Storefront Next projects with AI assistance.",
|
|
22
|
-
"longDescription": "Skills for developing React 19 storefronts on Salesforce B2C Commerce — routing, data fetching, components, Page Designer,
|
|
25
|
+
"longDescription": "Skills for developing React 19 storefronts on Salesforce B2C Commerce — project setup, configuration, routing, data fetching and revalidation, SCAPI clients, authentication, security, theming, components, Page Designer, extensions, i18n, SEO, analytics and consent, accessibility, testing, quality gates, and deployment to Managed Runtime.",
|
|
23
26
|
"developerName": "Salesforce",
|
|
24
27
|
"category": "Productivity",
|
|
25
28
|
"capabilities": [
|
|
@@ -30,9 +33,9 @@
|
|
|
30
33
|
"brandColor": "#0D9DDA",
|
|
31
34
|
"websiteURL": "https://salesforcecommercecloud.github.io/b2c-developer-tooling/",
|
|
32
35
|
"defaultPrompt": [
|
|
33
|
-
"
|
|
34
|
-
"Add a
|
|
35
|
-
"
|
|
36
|
+
"Create a new Storefront Next storefront",
|
|
37
|
+
"Add a route with data fetching to my storefront",
|
|
38
|
+
"Rebrand my storefront's colors and fonts",
|
|
36
39
|
"Add Page Designer support to my storefront component"
|
|
37
40
|
]
|
|
38
41
|
}
|