@salesforce/templates 66.5.4 → 66.5.6
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/lib/templates/project/.forceignore +3 -1
- package/lib/templates/project/reactb2e/AGENT.md +12 -2
- package/lib/templates/project/reactb2e/CHANGELOG.md +401 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/.forceignore +15 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/codegen.yml +1 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/eslint.config.js +44 -27
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/index.html +0 -1
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/package.json +7 -11
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/accountSearchService.ts +46 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/query/distinctAccountIndustries.graphql +19 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/query/distinctAccountTypes.graphql +19 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/query/getAccountDetail.graphql +121 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/query/searchAccounts.graphql +51 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/pages/AccountObjectDetailPage.tsx +357 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/pages/AccountSearch.tsx +275 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/pages/Home.tsx +34 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/api/objectSearchService.ts +84 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/ActiveFilters.tsx +89 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/FilterPanel.tsx +127 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/ObjectBreadcrumb.tsx +66 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/PaginationControls.tsx +151 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/SearchBar.tsx +41 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/SortControl.tsx +143 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/BooleanFilter.tsx +94 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/DateFilter.tsx +165 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/DateRangeFilter.tsx +78 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/MultiSelectFilter.tsx +106 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/NumericRangeFilter.tsx +102 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/SearchFilter.tsx +40 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/SelectFilter.tsx +97 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/TextFilter.tsx +77 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useAsyncData.ts +53 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useCachedAsyncData.ts +183 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useObjectSearchParams.ts +225 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/debounce.ts +22 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/fieldUtils.ts +29 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/filterUtils.ts +372 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/sortUtils.ts +38 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/api/graphql-operations-types.ts +11260 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/app.tsx +4 -1
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/appLayout.tsx +1 -1
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/AgentforceConversationClient.tsx +33 -5
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/alerts/status-alert.tsx +1 -1
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/ui/badge.tsx +48 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/ui/breadcrumb.tsx +109 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/ui/calendar.tsx +232 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/ui/checkbox.tsx +32 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/ui/collapsible.tsx +33 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/ui/datePicker.tsx +127 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/ui/popover.tsx +89 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/ui/sonner.tsx +20 -0
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/index.ts +3 -117
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/pages/Home.tsx +10 -11
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/pages/TestAccPage.tsx +1 -1
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/routes.tsx +8 -20
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/types/conversation.ts +14 -4
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/tsconfig.json +7 -1
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/vite.config.ts +17 -13
- package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-data-visualization → building-data-visualization}/SKILL.md +3 -3
- package/lib/templates/project/reactb2e/_r_/skills/building-data-visualization/implementation/bar-line-chart.md +316 -0
- package/lib/templates/project/{reactb2x/_r_/skills/webapp-react-data-visualization → reactb2e/_r_/skills/building-data-visualization}/implementation/donut-chart.md +1 -1
- package/lib/templates/project/{reactb2x/_r_/skills/webapp-react → reactb2e/_r_/skills/building-react-components}/SKILL.md +21 -5
- package/lib/templates/project/reactb2e/_r_/skills/{webapp-csp-trusted-sites → configuring-csp-trusted-sites}/SKILL.md +1 -1
- package/lib/templates/project/{reactb2x/_r_/webapp-webapplication.md → reactb2e/_r_/skills/configuring-webapp-metadata/SKILL.md} +2 -3
- package/lib/templates/project/reactb2e/_r_/{webapp.md → skills/creating-webapp/SKILL.md} +46 -4
- package/lib/templates/project/reactb2e/_r_/skills/deploying-to-salesforce/SKILL.md +226 -0
- package/lib/templates/project/reactb2e/_r_/skills/{feature-react-file-upload-file-upload → implementing-file-upload}/SKILL.md +1 -1
- package/lib/templates/project/{reactb2x/_r_/skills/webapp-features → reactb2e/_r_/skills/installing-webapp-features}/SKILL.md +3 -3
- package/lib/templates/project/reactb2e/_r_/skills/managing-agentforce-conversation-client/SKILL.md +186 -0
- package/lib/templates/project/reactb2e/_r_/skills/managing-agentforce-conversation-client/references/constraints.md +134 -0
- package/lib/templates/project/reactb2e/_r_/skills/managing-agentforce-conversation-client/references/examples.md +132 -0
- package/lib/templates/project/reactb2e/_r_/skills/managing-agentforce-conversation-client/references/style-tokens.md +101 -0
- package/lib/templates/project/reactb2e/_r_/skills/managing-agentforce-conversation-client/references/troubleshooting.md +57 -0
- package/lib/templates/project/reactb2e/_r_/skills/using-salesforce-data/SKILL.md +363 -0
- package/lib/templates/project/reactb2e/_r_/skills/using-salesforce-data/graphql-search.sh +139 -0
- package/lib/templates/project/reactb2e/_r_/webapp-data.md +353 -0
- package/lib/templates/project/reactb2e/_r_/webapp-ui.md +16 -0
- package/lib/templates/project/reactb2e/eslint.config.js +7 -0
- package/lib/templates/project/reactb2e/package-lock.json +9995 -0
- package/lib/templates/project/reactb2e/package.json +12 -11
- package/lib/templates/project/reactb2e/scripts/setup-cli.mjs +61 -31
- package/lib/templates/project/reactb2e/scripts/sf-project-setup.mjs +66 -0
- package/lib/templates/project/reactb2x/AGENT.md +12 -2
- package/lib/templates/project/reactb2x/CHANGELOG.md +401 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/.forceignore +15 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/codegen.yml +1 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/eslint.config.js +44 -27
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/index.html +0 -1
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/package.json +8 -11
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/accountSearchService.ts +46 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/query/distinctAccountIndustries.graphql +19 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/query/distinctAccountTypes.graphql +19 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/query/getAccountDetail.graphql +121 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/api/query/searchAccounts.graphql +51 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/pages/AccountObjectDetailPage.tsx +357 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/pages/AccountSearch.tsx +275 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/__examples__/pages/Home.tsx +34 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/api/objectSearchService.ts +84 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/ActiveFilters.tsx +89 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/FilterPanel.tsx +127 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/ObjectBreadcrumb.tsx +66 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/PaginationControls.tsx +151 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/SearchBar.tsx +41 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/SortControl.tsx +143 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/BooleanFilter.tsx +94 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/DateFilter.tsx +165 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/DateRangeFilter.tsx +78 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/MultiSelectFilter.tsx +106 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/NumericRangeFilter.tsx +102 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/SearchFilter.tsx +40 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/SelectFilter.tsx +97 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/components/filters/TextFilter.tsx +77 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useAsyncData.ts +53 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useCachedAsyncData.ts +183 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/hooks/useObjectSearchParams.ts +225 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/debounce.ts +22 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/fieldUtils.ts +29 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/filterUtils.ts +372 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/sortUtils.ts +38 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/api/userProfileApi.ts +13 -13
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/layouts/privateRouteLayout.tsx +10 -2
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ChangePassword.tsx +2 -2
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ForgotPassword.tsx +2 -2
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Login.tsx +2 -2
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Profile.tsx +26 -4
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Register.tsx +2 -2
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ResetPassword.tsx +2 -2
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/sessionTimeout/SessionTimeoutValidator.tsx +8 -16
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/sessionTimeout/sessionTimeService.ts +30 -42
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/api/graphql-operations-types.ts +11260 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/app.tsx +3 -1
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/alerts/status-alert.tsx +1 -1
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/ui/badge.tsx +48 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/ui/breadcrumb.tsx +109 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/ui/calendar.tsx +232 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/ui/checkbox.tsx +32 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/ui/collapsible.tsx +33 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/ui/datePicker.tsx +127 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/ui/popover.tsx +89 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/components/ui/sonner.tsx +20 -0
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/pages/Home.tsx +10 -11
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/routes.tsx +9 -21
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/tsconfig.json +7 -1
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/vite.config.ts +17 -13
- package/lib/templates/project/reactb2x/_p_/_m_/networks/appreacttemplateb2x.network +1 -1
- package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-data-visualization → building-data-visualization}/SKILL.md +3 -3
- package/lib/templates/project/reactb2x/_r_/skills/building-data-visualization/implementation/bar-line-chart.md +316 -0
- package/lib/templates/project/{reactb2e/_r_/skills/webapp-react-data-visualization → reactb2x/_r_/skills/building-data-visualization}/implementation/donut-chart.md +1 -1
- package/lib/templates/project/{reactb2e/_r_/skills/webapp-react → reactb2x/_r_/skills/building-react-components}/SKILL.md +21 -5
- package/lib/templates/project/reactb2x/_r_/skills/{webapp-csp-trusted-sites → configuring-csp-trusted-sites}/SKILL.md +1 -1
- package/lib/templates/project/{reactb2e/_r_/webapp-webapplication.md → reactb2x/_r_/skills/configuring-webapp-metadata/SKILL.md} +2 -3
- package/lib/templates/project/reactb2x/_r_/{webapp.md → skills/creating-webapp/SKILL.md} +46 -4
- package/lib/templates/project/reactb2x/_r_/skills/deploying-to-salesforce/SKILL.md +226 -0
- package/lib/templates/project/reactb2x/_r_/skills/{feature-react-file-upload-file-upload → implementing-file-upload}/SKILL.md +1 -1
- package/lib/templates/project/{reactb2e/_r_/skills/webapp-features → reactb2x/_r_/skills/installing-webapp-features}/SKILL.md +3 -3
- package/lib/templates/project/reactb2x/_r_/skills/managing-agentforce-conversation-client/SKILL.md +186 -0
- package/lib/templates/project/reactb2x/_r_/skills/managing-agentforce-conversation-client/references/constraints.md +134 -0
- package/lib/templates/project/reactb2x/_r_/skills/managing-agentforce-conversation-client/references/examples.md +132 -0
- package/lib/templates/project/reactb2x/_r_/skills/managing-agentforce-conversation-client/references/style-tokens.md +101 -0
- package/lib/templates/project/reactb2x/_r_/skills/managing-agentforce-conversation-client/references/troubleshooting.md +57 -0
- package/lib/templates/project/reactb2x/_r_/skills/using-salesforce-data/SKILL.md +363 -0
- package/lib/templates/project/reactb2x/_r_/skills/using-salesforce-data/graphql-search.sh +139 -0
- package/lib/templates/project/reactb2x/_r_/webapp-data.md +353 -0
- package/lib/templates/project/reactb2x/_r_/webapp-ui.md +16 -0
- package/lib/templates/project/reactb2x/eslint.config.js +7 -0
- package/lib/templates/project/reactb2x/package-lock.json +9995 -0
- package/lib/templates/project/reactb2x/package.json +12 -11
- package/lib/templates/project/reactb2x/scripts/setup-cli.mjs +61 -31
- package/lib/templates/project/reactb2x/scripts/sf-project-setup.mjs +66 -0
- package/lib/templates/webapplication/reactbasic/.forceignore +15 -0
- package/lib/templates/webapplication/reactbasic/codegen.yml +1 -0
- package/lib/templates/webapplication/reactbasic/eslint.config.js +44 -27
- package/lib/templates/webapplication/reactbasic/index.html +0 -1
- package/lib/templates/webapplication/reactbasic/package.json +6 -3
- package/lib/templates/webapplication/reactbasic/src/app.tsx +4 -1
- package/lib/templates/webapplication/reactbasic/src/components/alerts/status-alert.tsx +1 -1
- package/lib/templates/webapplication/reactbasic/src/components/ui/badge.tsx +48 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/breadcrumb.tsx +109 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/calendar.tsx +232 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/checkbox.tsx +32 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/collapsible.tsx +33 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/datePicker.tsx +127 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/popover.tsx +89 -0
- package/lib/templates/webapplication/reactbasic/src/components/ui/sonner.tsx +20 -0
- package/lib/templates/webapplication/reactbasic/tsconfig.json +7 -1
- package/lib/templates/webapplication/reactbasic/vite.config.ts +17 -13
- package/lib/utils/template-placeholders.js +7 -0
- package/lib/utils/template-placeholders.js.map +1 -1
- package/lib/utils/webappTemplateUtils.d.ts +3 -1
- package/lib/utils/webappTemplateUtils.js +4 -1
- package/lib/utils/webappTemplateUtils.js.map +1 -1
- package/package.json +6 -6
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/DetailFields.tsx +0 -55
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/DetailForm.tsx +0 -146
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/DetailHeader.tsx +0 -34
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/DetailLayoutSections.tsx +0 -80
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/Section.tsx +0 -108
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/SectionRow.tsx +0 -20
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/UiApiDetailForm.tsx +0 -140
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FieldValueDisplay.tsx +0 -73
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedAddress.tsx +0 -29
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedEmail.tsx +0 -17
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedPhone.tsx +0 -24
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedText.tsx +0 -11
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedUrl.tsx +0 -29
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/filters/FilterField.tsx +0 -54
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/filters/FilterInput.tsx +0 -55
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/filters/FilterSelect.tsx +0 -72
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/filters/FiltersPanel.tsx +0 -380
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/forms/filters-form.tsx +0 -114
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/forms/submit-button.tsx +0 -47
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/GlobalSearchInput.tsx +0 -114
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/ResultCardFields.tsx +0 -71
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/SearchHeader.tsx +0 -31
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/SearchPagination.tsx +0 -144
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/SearchResultCard.tsx +0 -136
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/SearchResultsPanel.tsx +0 -197
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/shared/LoadingFallback.tsx +0 -61
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/api/objectDetailService.ts +0 -102
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/api/objectInfoGraphQLService.ts +0 -137
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/api/objectInfoService.ts +0 -95
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/api/recordListGraphQLService.ts +0 -364
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/constants.ts +0 -39
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/filters/FilterInput.tsx +0 -55
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/filters/FilterSelect.tsx +0 -72
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/form.tsx +0 -209
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/useObjectInfoBatch.ts +0 -65
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/useObjectSearchData.ts +0 -174
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/useRecordDetailLayout.ts +0 -137
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/useRecordListGraphQL.ts +0 -135
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/pages/DetailPage.tsx +0 -109
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/pages/GlobalSearch.tsx +0 -229
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/filters/filters.ts +0 -121
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/filters/picklist.ts +0 -6
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/objectInfo/objectInfo.ts +0 -49
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/recordDetail/recordDetail.ts +0 -61
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/schema.d.ts +0 -200
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/search/searchResults.ts +0 -229
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/apiUtils.ts +0 -59
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/cacheUtils.ts +0 -76
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/debounce.ts +0 -89
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/fieldUtils.ts +0 -354
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/fieldValueExtractor.ts +0 -67
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/filterUtils.ts +0 -32
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/formDataTransformUtils.ts +0 -260
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/formUtils.ts +0 -142
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/graphQLNodeFieldUtils.ts +0 -186
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/graphQLObjectInfoAdapter.ts +0 -77
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/graphQLRecordAdapter.ts +0 -90
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/layoutTransformUtils.ts +0 -236
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/linkUtils.ts +0 -14
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/paginationUtils.ts +0 -49
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/recordUtils.ts +0 -159
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/sanitizationUtils.ts +0 -49
- package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/tsconfig.tsbuildinfo +0 -1
- package/lib/templates/project/reactb2e/_r_/features/feature-graphql-graphql-data-access-rule.md +0 -470
- package/lib/templates/project/reactb2e/_r_/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md +0 -18
- package/lib/templates/project/reactb2e/_r_/features/feature-react-chart-analytics-charts-rule.md +0 -27
- package/lib/templates/project/reactb2e/_r_/skills/_k_/SKILL.md +0 -148
- package/lib/templates/project/reactb2e/_r_/skills/_k_/docs/embed-examples.md +0 -192
- package/lib/templates/project/reactb2e/_r_/skills/_k_/docs/troubleshooting.md +0 -51
- package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/SKILL.md +0 -155
- package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/docs/explore-schema.md +0 -256
- package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md +0 -228
- package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md +0 -202
- package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/docs/shared-schema.graphqls +0 -1150
- package/lib/templates/project/reactb2e/_r_/skills/feature-micro-frontend-micro-frontend/SKILL.md +0 -137
- package/lib/templates/project/reactb2e/_r_/skills/feature-react-chart-analytics-charts/SKILL.md +0 -41
- package/lib/templates/project/reactb2e/_r_/skills/feature-react-chart-analytics-charts/docs/schema-mapping.md +0 -4
- package/lib/templates/project/reactb2e/_r_/skills/webapp-react-interactive-map/SKILL.md +0 -92
- package/lib/templates/project/reactb2e/_r_/skills/webapp-react-interactive-map/implementation/geocoding.md +0 -245
- package/lib/templates/project/reactb2e/_r_/skills/webapp-react-interactive-map/implementation/leaflet-map.md +0 -279
- package/lib/templates/project/reactb2e/_r_/skills/webapp-react-weather-widget/SKILL.md +0 -65
- package/lib/templates/project/reactb2e/_r_/skills/webapp-react-weather-widget/implementation/weather-hook.md +0 -258
- package/lib/templates/project/reactb2e/_r_/skills/webapp-react-weather-widget/implementation/weather-ui.md +0 -216
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/SKILL.md +0 -271
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/charts.csv +0 -26
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/colors.csv +0 -97
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/icons.csv +0 -101
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/landing.csv +0 -31
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/products.csv +0 -97
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/react-performance.csv +0 -45
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/stacks/html-tailwind.csv +0 -56
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/stacks/react.csv +0 -54
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/stacks/shadcn.csv +0 -61
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/styles.csv +0 -68
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/typography.csv +0 -58
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/ui-reasoning.csv +0 -101
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/ux-guidelines.csv +0 -100
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/data/web-interface.csv +0 -31
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/scripts/core.js +0 -255
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/scripts/design_system.js +0 -861
- package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/scripts/search.js +0 -98
- package/lib/templates/project/reactb2e/_r_/skills/webapp-unsplash-images/SKILL.md +0 -71
- package/lib/templates/project/reactb2e/_r_/skills/webapp-unsplash-images/implementation/usage.md +0 -159
- package/lib/templates/project/reactb2e/_r_/webapp-cli-commands.md +0 -88
- package/lib/templates/project/reactb2e/_r_/webapp-react-code-quality.md +0 -136
- package/lib/templates/project/reactb2e/_r_/webapp-react-typescript.md +0 -205
- package/lib/templates/project/reactb2e/_r_/webapp-react.md +0 -202
- package/lib/templates/project/reactb2e/_r_/webapp-skills-first.md +0 -26
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/DetailFields.tsx +0 -55
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/DetailForm.tsx +0 -146
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/DetailHeader.tsx +0 -34
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/DetailLayoutSections.tsx +0 -80
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/Section.tsx +0 -108
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/SectionRow.tsx +0 -20
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/UiApiDetailForm.tsx +0 -140
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FieldValueDisplay.tsx +0 -73
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedAddress.tsx +0 -29
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedEmail.tsx +0 -17
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedPhone.tsx +0 -24
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedText.tsx +0 -11
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/_det_/_fmt_/FormattedUrl.tsx +0 -29
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/filters/FilterField.tsx +0 -54
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/filters/FilterInput.tsx +0 -55
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/filters/FilterSelect.tsx +0 -72
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/filters/FiltersPanel.tsx +0 -380
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/forms/filters-form.tsx +0 -114
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/forms/submit-button.tsx +0 -47
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/GlobalSearchInput.tsx +0 -114
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/ResultCardFields.tsx +0 -71
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/SearchHeader.tsx +0 -31
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/SearchPagination.tsx +0 -144
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/SearchResultCard.tsx +0 -136
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/search/SearchResultsPanel.tsx +0 -197
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/_c_/shared/LoadingFallback.tsx +0 -61
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/api/objectDetailService.ts +0 -102
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/api/objectInfoGraphQLService.ts +0 -137
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/api/objectInfoService.ts +0 -95
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/api/recordListGraphQLService.ts +0 -364
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/constants.ts +0 -39
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/filters/FilterInput.tsx +0 -55
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/filters/FilterSelect.tsx +0 -72
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/form.tsx +0 -209
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/useObjectInfoBatch.ts +0 -65
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/useObjectSearchData.ts +0 -174
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/useRecordDetailLayout.ts +0 -137
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/hooks/useRecordListGraphQL.ts +0 -135
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/pages/DetailPage.tsx +0 -109
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/pages/GlobalSearch.tsx +0 -229
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/filters/filters.ts +0 -121
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/filters/picklist.ts +0 -6
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/objectInfo/objectInfo.ts +0 -49
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/recordDetail/recordDetail.ts +0 -61
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/schema.d.ts +0 -200
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/types/search/searchResults.ts +0 -229
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/apiUtils.ts +0 -59
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/cacheUtils.ts +0 -76
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/debounce.ts +0 -89
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/fieldUtils.ts +0 -354
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/fieldValueExtractor.ts +0 -67
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/filterUtils.ts +0 -32
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/formDataTransformUtils.ts +0 -260
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/formUtils.ts +0 -142
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/graphQLNodeFieldUtils.ts +0 -186
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/graphQLObjectInfoAdapter.ts +0 -77
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/graphQLRecordAdapter.ts +0 -90
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/layoutTransformUtils.ts +0 -236
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/linkUtils.ts +0 -14
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/paginationUtils.ts +0 -49
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/recordUtils.ts +0 -159
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/_gs_/utils/sanitizationUtils.ts +0 -49
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/index.ts +0 -120
- package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/tsconfig.tsbuildinfo +0 -1
- package/lib/templates/project/reactb2x/_r_/features/feature-graphql-graphql-data-access-rule.md +0 -470
- package/lib/templates/project/reactb2x/_r_/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md +0 -18
- package/lib/templates/project/reactb2x/_r_/features/feature-react-chart-analytics-charts-rule.md +0 -27
- package/lib/templates/project/reactb2x/_r_/skills/_k_/SKILL.md +0 -148
- package/lib/templates/project/reactb2x/_r_/skills/_k_/docs/embed-examples.md +0 -192
- package/lib/templates/project/reactb2x/_r_/skills/_k_/docs/troubleshooting.md +0 -51
- package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/SKILL.md +0 -155
- package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/docs/explore-schema.md +0 -256
- package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md +0 -228
- package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md +0 -202
- package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/docs/shared-schema.graphqls +0 -1150
- package/lib/templates/project/reactb2x/_r_/skills/feature-micro-frontend-micro-frontend/SKILL.md +0 -137
- package/lib/templates/project/reactb2x/_r_/skills/feature-react-chart-analytics-charts/SKILL.md +0 -41
- package/lib/templates/project/reactb2x/_r_/skills/feature-react-chart-analytics-charts/docs/schema-mapping.md +0 -4
- package/lib/templates/project/reactb2x/_r_/skills/webapp-react-interactive-map/SKILL.md +0 -92
- package/lib/templates/project/reactb2x/_r_/skills/webapp-react-interactive-map/implementation/geocoding.md +0 -245
- package/lib/templates/project/reactb2x/_r_/skills/webapp-react-interactive-map/implementation/leaflet-map.md +0 -279
- package/lib/templates/project/reactb2x/_r_/skills/webapp-react-weather-widget/SKILL.md +0 -65
- package/lib/templates/project/reactb2x/_r_/skills/webapp-react-weather-widget/implementation/weather-hook.md +0 -258
- package/lib/templates/project/reactb2x/_r_/skills/webapp-react-weather-widget/implementation/weather-ui.md +0 -216
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/SKILL.md +0 -271
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/charts.csv +0 -26
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/colors.csv +0 -97
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/icons.csv +0 -101
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/landing.csv +0 -31
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/products.csv +0 -97
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/react-performance.csv +0 -45
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/stacks/html-tailwind.csv +0 -56
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/stacks/react.csv +0 -54
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/stacks/shadcn.csv +0 -61
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/styles.csv +0 -68
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/typography.csv +0 -58
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/ui-reasoning.csv +0 -101
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/ux-guidelines.csv +0 -100
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/data/web-interface.csv +0 -31
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/scripts/core.js +0 -255
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/scripts/design_system.js +0 -861
- package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/scripts/search.js +0 -98
- package/lib/templates/project/reactb2x/_r_/skills/webapp-unsplash-images/SKILL.md +0 -71
- package/lib/templates/project/reactb2x/_r_/skills/webapp-unsplash-images/implementation/usage.md +0 -159
- package/lib/templates/project/reactb2x/_r_/webapp-cli-commands.md +0 -88
- package/lib/templates/project/reactb2x/_r_/webapp-react-code-quality.md +0 -136
- package/lib/templates/project/reactb2x/_r_/webapp-react-typescript.md +0 -205
- package/lib/templates/project/reactb2x/_r_/webapp-react.md +0 -202
- package/lib/templates/project/reactb2x/_r_/webapp-skills-first.md +0 -26
- /package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/{src/components.json → components.json} +0 -0
- /package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-data-visualization → building-data-visualization}/implementation/dashboard-layout.md +0 -0
- /package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-data-visualization → building-data-visualization}/implementation/stat-card.md +0 -0
- /package/lib/templates/project/reactb2e/_r_/skills/{webapp-react → building-react-components}/implementation/component.md +0 -0
- /package/lib/templates/project/reactb2e/_r_/skills/{webapp-react → building-react-components}/implementation/header-footer.md +0 -0
- /package/lib/templates/project/reactb2e/_r_/skills/{webapp-react → building-react-components}/implementation/page.md +0 -0
- /package/lib/templates/project/reactb2e/_r_/skills/{webapp-csp-trusted-sites → configuring-csp-trusted-sites}/implementation/metadata-format.md +0 -0
- /package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/{src/components.json → components.json} +0 -0
- /package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-data-visualization → building-data-visualization}/implementation/dashboard-layout.md +0 -0
- /package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-data-visualization → building-data-visualization}/implementation/stat-card.md +0 -0
- /package/lib/templates/project/reactb2x/_r_/skills/{webapp-react → building-react-components}/implementation/component.md +0 -0
- /package/lib/templates/project/reactb2x/_r_/skills/{webapp-react → building-react-components}/implementation/header-footer.md +0 -0
- /package/lib/templates/project/reactb2x/_r_/skills/{webapp-react → building-react-components}/implementation/page.md +0 -0
- /package/lib/templates/project/reactb2x/_r_/skills/{webapp-csp-trusted-sites → configuring-csp-trusted-sites}/implementation/metadata-format.md +0 -0
- /package/lib/templates/webapplication/reactbasic/{src/components.json → components.json} +0 -0
package/lib/templates/project/reactb2x/_r_/skills/feature-micro-frontend-micro-frontend/SKILL.md
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: feature-micro-frontend-micro-frontend
|
|
3
|
-
description: Generate a Micro Frontend LWC component for a Web Application.
|
|
4
|
-
license: Proprietary. LICENSE.txt has complete terms
|
|
5
|
-
metadata:
|
|
6
|
-
author: salesforce-experience-platform-emu/lwc-admins
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Micro Frontend generation (workflow)
|
|
10
|
-
|
|
11
|
-
When the user wants a Micro Frontend for a Web Application, follow this workflow.
|
|
12
|
-
|
|
13
|
-
## 1. Install the dependency
|
|
14
|
-
|
|
15
|
-
Micro Frontends are generated using the `generate-micro-frontend` CLI command from the `@salesforce/micro-frontends-experimental` package.
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install @salesforce/micro-frontends-experimental
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
The dependency should be added to the project's `package.json` dependencies.
|
|
22
|
-
|
|
23
|
-
## 2. Identify the Web Application
|
|
24
|
-
|
|
25
|
-
- Verify the Web Application exists in `force-app/main/default/webapplications/<web-app-name>/`.
|
|
26
|
-
- Confirm the Web Application has a `lightningOut` target in its `webapplication-meta.xml` file.
|
|
27
|
-
- If no Web Application exists, the user must create one first using the Web Apps template system.
|
|
28
|
-
|
|
29
|
-
## 3. Generate the Micro Frontend component
|
|
30
|
-
|
|
31
|
-
Run the `generate-micro-frontend` command with the Web Application name from the root of an SFDX project:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npx generate-micro-frontend <web-app-name>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
This creates:
|
|
38
|
-
|
|
39
|
-
- A custom wrapper LWC component in `force-app/main/default/lwc/<webAppName>/`. This is the "Micro Frontend component".
|
|
40
|
-
- The static `microFrontendShell` component that handles iframe communication.
|
|
41
|
-
|
|
42
|
-
Notes:
|
|
43
|
-
|
|
44
|
-
- The command may be added to the project's `package.json` scripts for convenience.
|
|
45
|
-
- The Micro Frontend component uses the Web Application name (e.g. `my-web-app/`) in camelCase for its folder and file names (e.g. `myWebApp/myWebApp.js`, `myWebApp/myWebApp.html`).
|
|
46
|
-
|
|
47
|
-
## 4. Customize the Micro Frontend component metadata
|
|
48
|
-
|
|
49
|
-
Edit the `<webAppName>.js-meta.xml` file to:
|
|
50
|
-
|
|
51
|
-
- Set appropriate `targets` (e.g. `lightning__HomePage`, `lightning__AppPage`, `lightning__RecordPage`, `lightningCommunity__Page`)
|
|
52
|
-
- Add `targetConfigs` for page-specific properties
|
|
53
|
-
- Optionally update the `masterLabel` and `description`
|
|
54
|
-
|
|
55
|
-
Example:
|
|
56
|
-
|
|
57
|
-
```xml
|
|
58
|
-
<targetConfigs>
|
|
59
|
-
<targetConfig targets="lightning__HomePage">
|
|
60
|
-
<property name="height" type="Integer" min="0" max="600" default="300" />
|
|
61
|
-
</targetConfig>
|
|
62
|
-
</targetConfigs>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## 5. Pass properties to the Micro Frontend component
|
|
66
|
-
|
|
67
|
-
Edit the `<webAppName>.js` file to customize the `properties` getter:
|
|
68
|
-
|
|
69
|
-
```javascript
|
|
70
|
-
@api height;
|
|
71
|
-
|
|
72
|
-
@api get properties() {
|
|
73
|
-
return {
|
|
74
|
-
height: this.height,
|
|
75
|
-
// Add any other data your Web Application needs
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
All properties are passed to the embedded Web Application via `postMessage` and can be accessed in the app's code.
|
|
81
|
-
|
|
82
|
-
## 6. Deploy and test
|
|
83
|
-
|
|
84
|
-
Deploy the Micro Frontend component using standard SF CLI commands:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
sf project deploy start --source-dir force-app/main/default
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Add the component to a page using Lightning App Builder or Experience Builder and verify it loads correctly.
|
|
91
|
-
|
|
92
|
-
# Micro Frontend component customization examples
|
|
93
|
-
|
|
94
|
-
## Record page example
|
|
95
|
-
|
|
96
|
-
Command to generate a Micro Frontend component for the `my-site` Web Application:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
npx generate-micro-frontend my-site
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
`mySite.js-meta.xml` file with a `lightning__RecordPage` target:
|
|
103
|
-
|
|
104
|
-
```xml
|
|
105
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
106
|
-
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
107
|
-
<apiVersion>66.0</apiVersion>
|
|
108
|
-
<isExposed>true</isExposed>
|
|
109
|
-
<masterLabel>Micro Frontend for "My Site"</masterLabel>
|
|
110
|
-
<targets>
|
|
111
|
-
<target>lightning__RecordPage</target>
|
|
112
|
-
</targets>
|
|
113
|
-
<targetConfigs>
|
|
114
|
-
<targetConfig targets="lightning__RecordPage">
|
|
115
|
-
<property name="mode" type="String" default="dark" />
|
|
116
|
-
</targetConfig>
|
|
117
|
-
</targetConfigs>
|
|
118
|
-
</LightningComponentBundle>
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
`mySite.js` file with public properties and `properties` getter:
|
|
122
|
-
|
|
123
|
-
```js
|
|
124
|
-
// Micro Frontend component
|
|
125
|
-
export default class mySite extends LightningElement {
|
|
126
|
-
@api recordId;
|
|
127
|
-
@api mode;
|
|
128
|
-
|
|
129
|
-
@api get properties() {
|
|
130
|
-
// This data is passed to the Micro Frontend
|
|
131
|
-
return {
|
|
132
|
-
recordId: this.recordId, // automatically populated for lightning__RecordPage target
|
|
133
|
-
mode: this.mode, // matches the mode targetConfig
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
```
|
package/lib/templates/project/reactb2x/_r_/skills/feature-react-chart-analytics-charts/SKILL.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: feature-react-chart-analytics-charts
|
|
3
|
-
description: Add or change charts from raw data. Use when the user asks for a chart, graph, or analytics visualization from JSON/data.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Analytics charts (workflow)
|
|
7
|
-
|
|
8
|
-
When the user wants a chart or visualization from data, follow this workflow. Charts use **Recharts** via the **AnalyticsChart** component.
|
|
9
|
-
|
|
10
|
-
## Dependencies
|
|
11
|
-
|
|
12
|
-
Ensure the following package is installed in the project:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install recharts
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## 1. Interpret data type
|
|
19
|
-
|
|
20
|
-
- **Time-series**: data over time or ordered (dates, timestamps). Use a line chart. Raw shape often has date-like keys and a numeric value.
|
|
21
|
-
- **Categorical**: data by category (labels, segments). Use a bar chart. Raw shape often has a category name and a numeric value.
|
|
22
|
-
|
|
23
|
-
If the user says "over time", "trend", or uses date-like keys → time-series. If they say "by category", "by X", or use label-like keys → categorical.
|
|
24
|
-
|
|
25
|
-
## 2. Map data to chart shape
|
|
26
|
-
|
|
27
|
-
- **Time-series**: produce `[{ x: string, y: number }, ...]` (e.g. map `date`→`x`, `value`→`y`).
|
|
28
|
-
- **Categorical**: produce `[{ name: string, value: number }, ...]` (e.g. map `category`→`name`, `total`→`value`).
|
|
29
|
-
|
|
30
|
-
See [schema-mapping.md](docs/schema-mapping.md) for examples.
|
|
31
|
-
|
|
32
|
-
## 3. Choose theme
|
|
33
|
-
|
|
34
|
-
- **red**: declining, loss, negative trend.
|
|
35
|
-
- **green**: growth, gain, positive trend.
|
|
36
|
-
- **neutral**: default or mixed.
|
|
37
|
-
|
|
38
|
-
## 4. Generate and place the chart
|
|
39
|
-
|
|
40
|
-
- Use **AnalyticsChart** with `chartType` (`"time-series"` or `"categorical"`), `data` (mapped array), `theme`, and optional `title`. Wrap in **ChartContainer** if the app uses it for chart blocks.
|
|
41
|
-
- Insert the chart inside the existing app (e.g. main content or a route), not as the entire page.
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: webapp-react-interactive-map
|
|
3
|
-
description: Adds interactive Leaflet maps with geocoded markers to React pages. Use when the user asks to add a map, show locations on a map, display property pins, add a map view, or integrate mapping into the web application.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Interactive Map
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
Use this skill when:
|
|
11
|
-
- Adding an interactive map to a page (property search, store locator, location detail)
|
|
12
|
-
- Displaying one or more markers/pins on a map
|
|
13
|
-
- Converting addresses to map coordinates (geocoding)
|
|
14
|
-
- Building a split-panel layout with map + list
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Step 1 — Determine the map use case
|
|
19
|
-
|
|
20
|
-
Identify the scenario:
|
|
21
|
-
|
|
22
|
-
- **Multi-marker search** — map shows multiple pins alongside a scrollable list (e.g. property search, store locator)
|
|
23
|
-
- **Single-location detail** — map shows one pin for a specific address (e.g. property detail, contact page)
|
|
24
|
-
- **Static overview** — map centered on a region with no interactive markers
|
|
25
|
-
|
|
26
|
-
If unclear, ask:
|
|
27
|
-
|
|
28
|
-
> "Should the map show a single location, multiple markers from a list, or just a general area overview?"
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Step 2 — Install dependencies
|
|
33
|
-
|
|
34
|
-
The map requires `leaflet` and `react-leaflet`. Read `implementation/leaflet-map.md` for the exact dependency setup.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Step 3 — Choose implementation path
|
|
39
|
-
|
|
40
|
-
Read the corresponding guide:
|
|
41
|
-
|
|
42
|
-
- **Map component** — read `implementation/leaflet-map.md` for building the reusable `<MapComponent>`.
|
|
43
|
-
- **Geocoding** — read `implementation/geocoding.md` for converting addresses to lat/lng coordinates.
|
|
44
|
-
|
|
45
|
-
For a multi-marker search page, you will need both.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Step 4 — Wire the map into the page
|
|
50
|
-
|
|
51
|
-
Depending on the use case:
|
|
52
|
-
|
|
53
|
-
### Multi-marker search layout
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
┌──────────────────────────────────────┐
|
|
57
|
-
│ Search bar / filters │
|
|
58
|
-
├────────────────────┬─────────────────┤
|
|
59
|
-
│ │ Scrollable │
|
|
60
|
-
│ Map (2/3) │ list (1/3) │
|
|
61
|
-
│ │ │
|
|
62
|
-
└────────────────────┴─────────────────┘
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
- Map takes `~2/3` width on desktop, full width on mobile stacked above the list.
|
|
66
|
-
- List is scrollable with `overflow-y-auto`.
|
|
67
|
-
- Markers are geocoded from addresses in the list.
|
|
68
|
-
|
|
69
|
-
### Single-location detail
|
|
70
|
-
|
|
71
|
-
- Place the map below the hero image or address section.
|
|
72
|
-
- Geocode the address on mount, render one marker.
|
|
73
|
-
- Show the map only after coordinates resolve (conditional render).
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Verification
|
|
78
|
-
|
|
79
|
-
Before completing:
|
|
80
|
-
|
|
81
|
-
1. Map renders with visible tiles (no gray boxes).
|
|
82
|
-
2. Markers appear at correct locations.
|
|
83
|
-
3. Map is responsive (works on mobile widths).
|
|
84
|
-
4. SSR-safe — no `window is not defined` errors during build.
|
|
85
|
-
5. Run from the web app directory:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
cd force-app/main/default/webapplications/<appName> && npm run lint && npm run build
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
- **Lint:** MUST result in 0 errors.
|
|
92
|
-
- **Build:** MUST succeed.
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
# Geocoding — Implementation Guide
|
|
2
|
-
|
|
3
|
-
## What is geocoding
|
|
4
|
-
|
|
5
|
-
Geocoding converts a human-readable address (e.g. "123 Main St, San Francisco, CA") into latitude/longitude coordinates for map display.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Recommended service: OpenStreetMap Nominatim
|
|
10
|
-
|
|
11
|
-
| Property | Value |
|
|
12
|
-
|----------|-------|
|
|
13
|
-
| Endpoint | `https://nominatim.openstreetmap.org/search` |
|
|
14
|
-
| Cost | Free |
|
|
15
|
-
| API key | None |
|
|
16
|
-
| Rate limit | 1 request/second (enforced by Nominatim usage policy) |
|
|
17
|
-
| Terms | Must set a meaningful `User-Agent` header |
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Geocode utility with caching and concurrency control
|
|
22
|
-
|
|
23
|
-
Create at `utils/geocode.ts`:
|
|
24
|
-
|
|
25
|
-
```ts
|
|
26
|
-
const CACHE = new Map<string, { lat: number; lng: number }>();
|
|
27
|
-
const MAX_CONCURRENT = 6;
|
|
28
|
-
let inFlight = 0;
|
|
29
|
-
const queue: Array<() => void> = [];
|
|
30
|
-
|
|
31
|
-
function acquire(): Promise<void> {
|
|
32
|
-
if (inFlight < MAX_CONCURRENT) {
|
|
33
|
-
inFlight += 1;
|
|
34
|
-
return Promise.resolve();
|
|
35
|
-
}
|
|
36
|
-
return new Promise<void>((resolve) => {
|
|
37
|
-
queue.push(() => {
|
|
38
|
-
inFlight += 1;
|
|
39
|
-
resolve();
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function release(): void {
|
|
45
|
-
inFlight -= 1;
|
|
46
|
-
const next = queue.shift();
|
|
47
|
-
if (next) next();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface GeocodeResult {
|
|
51
|
-
lat: number;
|
|
52
|
-
lng: number;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export async function geocodeAddress(address: string): Promise<GeocodeResult | null> {
|
|
56
|
-
const key = address.trim().replace(/\s+/g, " ").toLowerCase();
|
|
57
|
-
if (!key) return null;
|
|
58
|
-
const cached = CACHE.get(key);
|
|
59
|
-
if (cached) return cached;
|
|
60
|
-
|
|
61
|
-
await acquire();
|
|
62
|
-
try {
|
|
63
|
-
const url = new URL("https://nominatim.openstreetmap.org/search");
|
|
64
|
-
url.searchParams.set("q", address.trim());
|
|
65
|
-
url.searchParams.set("format", "json");
|
|
66
|
-
url.searchParams.set("limit", "1");
|
|
67
|
-
const res = await fetch(url.toString(), {
|
|
68
|
-
headers: { "User-Agent": "MyApp/1.0 (contact@example.com)" },
|
|
69
|
-
});
|
|
70
|
-
if (!res.ok) return null;
|
|
71
|
-
const data = (await res.json()) as Array<{ lat?: string; lon?: string }>;
|
|
72
|
-
const first = data?.[0];
|
|
73
|
-
if (!first?.lat || !first?.lon) return null;
|
|
74
|
-
const lat = Number(first.lat);
|
|
75
|
-
const lng = Number(first.lon);
|
|
76
|
-
if (Number.isNaN(lat) || Number.isNaN(lng)) return null;
|
|
77
|
-
const result = { lat, lng };
|
|
78
|
-
CACHE.set(key, result);
|
|
79
|
-
return result;
|
|
80
|
-
} catch {
|
|
81
|
-
return null;
|
|
82
|
-
} finally {
|
|
83
|
-
release();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Design decisions
|
|
89
|
-
|
|
90
|
-
| Decision | Rationale |
|
|
91
|
-
|----------|-----------|
|
|
92
|
-
| In-memory cache | Avoids repeated API calls for the same address within a session |
|
|
93
|
-
| Concurrency limiter (6) | Prevents flooding Nominatim when geocoding many addresses in parallel |
|
|
94
|
-
| Semaphore queue | Requests beyond the limit wait in FIFO order |
|
|
95
|
-
| Null return on failure | Callers decide how to handle missing coordinates (skip marker, show fallback) |
|
|
96
|
-
| `User-Agent` header | Required by Nominatim usage policy; set to your app name and contact |
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## React hook: useGeocode
|
|
101
|
-
|
|
102
|
-
For single-address geocoding (e.g. detail pages):
|
|
103
|
-
|
|
104
|
-
```ts
|
|
105
|
-
import { useState, useEffect } from "react";
|
|
106
|
-
import { geocodeAddress, type GeocodeResult } from "@/utils/geocode";
|
|
107
|
-
|
|
108
|
-
export function useGeocode(address: string | null | undefined): {
|
|
109
|
-
coords: GeocodeResult | null;
|
|
110
|
-
loading: boolean;
|
|
111
|
-
} {
|
|
112
|
-
const [coords, setCoords] = useState<GeocodeResult | null>(null);
|
|
113
|
-
const [loading, setLoading] = useState(false);
|
|
114
|
-
|
|
115
|
-
useEffect(() => {
|
|
116
|
-
if (!address?.trim()) {
|
|
117
|
-
setCoords(null);
|
|
118
|
-
setLoading(false);
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
let cancelled = false;
|
|
122
|
-
setLoading(true);
|
|
123
|
-
geocodeAddress(address)
|
|
124
|
-
.then((result) => {
|
|
125
|
-
if (!cancelled) setCoords(result);
|
|
126
|
-
})
|
|
127
|
-
.catch(() => {
|
|
128
|
-
if (!cancelled) setCoords(null);
|
|
129
|
-
})
|
|
130
|
-
.finally(() => {
|
|
131
|
-
if (!cancelled) setLoading(false);
|
|
132
|
-
});
|
|
133
|
-
return () => {
|
|
134
|
-
cancelled = true;
|
|
135
|
-
};
|
|
136
|
-
}, [address?.trim() ?? ""]);
|
|
137
|
-
|
|
138
|
-
return { coords, loading };
|
|
139
|
-
}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Usage in a component
|
|
143
|
-
|
|
144
|
-
```tsx
|
|
145
|
-
const { coords } = useGeocode("123 Main St, San Francisco, CA");
|
|
146
|
-
|
|
147
|
-
{coords && (
|
|
148
|
-
<MapView
|
|
149
|
-
center={[coords.lat, coords.lng]}
|
|
150
|
-
zoom={15}
|
|
151
|
-
markers={[{ lat: coords.lat, lng: coords.lng, label: "Location" }]}
|
|
152
|
-
/>
|
|
153
|
-
)}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## Batch geocoding for lists
|
|
159
|
-
|
|
160
|
-
When geocoding multiple addresses (e.g. search results → map markers), use `Promise.all` with the built-in concurrency limiter:
|
|
161
|
-
|
|
162
|
-
```ts
|
|
163
|
-
const results = await Promise.all(
|
|
164
|
-
addresses.map(({ id, address }) =>
|
|
165
|
-
geocodeAddress(address).then((coords) =>
|
|
166
|
-
coords ? { id, lat: coords.lat, lng: coords.lng } : null
|
|
167
|
-
)
|
|
168
|
-
)
|
|
169
|
-
);
|
|
170
|
-
const markers = results.filter(Boolean);
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
The `MAX_CONCURRENT` semaphore in the utility ensures no more than 6 requests are in flight, even if you pass 50 addresses.
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## Hook for multi-marker geocoding
|
|
178
|
-
|
|
179
|
-
```ts
|
|
180
|
-
import { useState, useEffect } from "react";
|
|
181
|
-
import { geocodeAddress } from "@/utils/geocode";
|
|
182
|
-
import type { MapMarker } from "@/components/MapView";
|
|
183
|
-
|
|
184
|
-
export function useMapMarkers(
|
|
185
|
-
items: Array<{ id: string; address: string; label?: string }>
|
|
186
|
-
): { markers: MapMarker[]; loading: boolean } {
|
|
187
|
-
const [markers, setMarkers] = useState<MapMarker[]>([]);
|
|
188
|
-
const [loading, setLoading] = useState(false);
|
|
189
|
-
|
|
190
|
-
const key = items.map((i) => i.id).join(",");
|
|
191
|
-
|
|
192
|
-
useEffect(() => {
|
|
193
|
-
if (items.length === 0) {
|
|
194
|
-
setMarkers([]);
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
let cancelled = false;
|
|
198
|
-
setLoading(true);
|
|
199
|
-
Promise.all(
|
|
200
|
-
items.map((item) =>
|
|
201
|
-
geocodeAddress(item.address).then((coords) =>
|
|
202
|
-
coords ? { lat: coords.lat, lng: coords.lng, label: item.label ?? item.address } : null
|
|
203
|
-
)
|
|
204
|
-
)
|
|
205
|
-
)
|
|
206
|
-
.then((results) => {
|
|
207
|
-
if (!cancelled) setMarkers(results.filter(Boolean) as MapMarker[]);
|
|
208
|
-
})
|
|
209
|
-
.catch(() => {
|
|
210
|
-
if (!cancelled) setMarkers([]);
|
|
211
|
-
})
|
|
212
|
-
.finally(() => {
|
|
213
|
-
if (!cancelled) setLoading(false);
|
|
214
|
-
});
|
|
215
|
-
return () => {
|
|
216
|
-
cancelled = true;
|
|
217
|
-
};
|
|
218
|
-
}, [key]);
|
|
219
|
-
|
|
220
|
-
return { markers, loading };
|
|
221
|
-
}
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
## CSP considerations
|
|
227
|
-
|
|
228
|
-
If CSP is enforced, add Nominatim to `connect-src`:
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
connect-src 'self' https://nominatim.openstreetmap.org;
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
## Alternative geocoding providers
|
|
237
|
-
|
|
238
|
-
| Provider | Free tier | API key | Notes |
|
|
239
|
-
|----------|-----------|---------|-------|
|
|
240
|
-
| Nominatim (OSM) | Unlimited (rate-limited) | No | Best for prototypes and low-traffic apps |
|
|
241
|
-
| Google Geocoding API | 200 USD/month credit | Yes | Most accurate; requires billing account |
|
|
242
|
-
| Mapbox Geocoding | 100K req/month | Yes | Good accuracy; JS SDK available |
|
|
243
|
-
| LocationIQ | 5K req/day | Yes | Nominatim-compatible API |
|
|
244
|
-
|
|
245
|
-
For production apps with high traffic, consider Google or Mapbox with an API key and server-side geocoding.
|