@pega/sdk 0.0.5 → 0.0.7

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.
Files changed (269) hide show
  1. package/README.md +10 -3
  2. package/dist/index.js +828 -165
  3. package/package.json +1 -1
  4. package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
  5. package/templates/react-native-sdk-reference/.prettierignore +17 -0
  6. package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
  7. package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
  8. package/templates/react-native-sdk-reference/AGENTS.md +3 -0
  9. package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
  10. package/templates/react-native-sdk-reference/README.md +56 -0
  11. package/templates/react-native-sdk-reference/app.json +40 -5
  12. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
  13. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
  14. package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
  15. package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
  16. package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
  17. package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
  18. package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
  19. package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
  20. package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
  21. package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
  22. package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
  23. package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
  24. package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
  25. package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
  26. package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
  27. package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
  28. package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
  29. package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
  30. package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
  31. package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
  32. package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
  33. package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
  34. package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
  35. package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
  36. package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
  37. package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
  38. package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
  39. package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
  40. package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
  41. package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
  42. package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
  43. package/templates/react-native-sdk-reference/package.json +59 -14
  44. package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
  45. package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  46. package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
  47. package/templates/react-native-sdk-reference/sdk-config.json +31 -9
  48. package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
  49. package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
  50. package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
  51. package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
  52. package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
  53. package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
  54. package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
  55. package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
  56. package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
  57. package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
  58. package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
  59. package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
  60. package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
  61. package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
  62. package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
  63. package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
  64. package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
  65. package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
  66. package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
  67. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
  68. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
  69. package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
  70. package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
  71. package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
  72. package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
  73. package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
  74. package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
  75. package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
  76. package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
  77. package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
  78. package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
  79. package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
  80. package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
  81. package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
  82. package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
  83. package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
  84. package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
  85. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
  86. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
  87. package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
  88. package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
  89. package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
  90. package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
  91. package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
  92. package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
  93. package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
  94. package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
  95. package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
  96. package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
  97. package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
  98. package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
  99. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
  100. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
  101. package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
  102. package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
  103. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
  104. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
  105. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
  106. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
  107. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
  108. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
  109. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
  110. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
  111. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
  112. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
  113. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
  114. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
  115. package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
  116. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
  117. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
  118. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
  119. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
  120. package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
  121. package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
  122. package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
  123. package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
  124. package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
  125. package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
  126. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
  127. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
  128. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
  129. package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
  130. package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
  131. package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
  132. package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
  133. package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
  134. package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
  135. package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
  136. package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
  137. package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
  138. package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
  139. package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
  140. package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
  141. package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
  142. package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
  143. package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
  144. package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
  145. package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
  146. package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
  147. package/templates/react-native-sdk-reference/tsconfig.json +9 -8
  148. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
  149. package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
  150. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
  151. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
  152. package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
  153. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
  154. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
  155. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
  156. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
  157. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
  158. package/templates/react-sdk-reference/.ai-common/mcp/claude-code.mcp.json +8 -0
  159. package/templates/react-sdk-reference/.ai-common/mcp/copilot.mcp.json +8 -0
  160. package/templates/react-sdk-reference/.ai-common/mcp/cursor.mcp.json +11 -0
  161. package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
  162. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
  163. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
  164. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
  165. package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
  166. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
  167. package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
  168. package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
  169. package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
  170. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
  171. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
  172. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
  173. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
  174. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
  175. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
  176. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
  177. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
  178. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
  179. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
  180. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
  181. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
  182. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
  183. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
  184. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
  185. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
  186. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
  187. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
  188. package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
  189. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
  190. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
  191. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
  192. package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
  193. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
  194. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
  195. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
  196. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
  197. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
  198. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
  199. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
  200. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
  201. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
  202. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
  203. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
  204. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
  205. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
  206. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
  207. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
  208. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
  209. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
  210. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
  211. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
  212. package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
  213. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
  214. package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
  215. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
  216. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
  217. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
  218. package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
  219. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
  220. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
  221. package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
  222. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
  223. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
  224. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
  225. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
  226. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
  227. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
  228. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
  229. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
  230. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
  231. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
  232. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
  233. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
  234. package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
  235. package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
  236. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
  237. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
  238. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
  239. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
  240. package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
  241. package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
  242. package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
  243. package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
  244. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
  245. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
  246. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
  247. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
  248. package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
  249. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
  250. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
  251. package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
  252. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
  253. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
  254. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
  255. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
  256. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
  257. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
  258. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
  259. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
  260. package/templates/react-sdk-reference/package.json +1 -1
  261. package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
  262. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  263. package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
  264. package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
  265. package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
  266. package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
  267. package/templates/react-native-sdk-reference/App.tsx +0 -49
  268. package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
  269. package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
@@ -0,0 +1,155 @@
1
+ ---
2
+ ai-description: 'Design Profile template — defines the structure and schema for the customer codebase analysis output consumed by generate-embedded-components'
3
+ ---
4
+
5
+ # Design Profile Schema
6
+
7
+ This document defines the required structure for a Design Profile produced by the `{{SKILL_DIR}}/embedded-flow/analyze-customer-repo.md` skill. The profile is consumed by the `{{PROMPT_DIR}}/generate-embedded-components{{PROMPT_EXT}}` prompt to generate Pega components matching the customer's application.
8
+
9
+ ---
10
+
11
+ ## Required Sections
12
+
13
+ Every Design Profile **must** contain the following sections. If a section cannot be populated (e.g., the project has no explicit theme tokens), note "Not detected — infer from component source" rather than omitting the section.
14
+
15
+ ---
16
+
17
+ ### 1. Project Fundamentals
18
+
19
+ | Field | Description | Example values |
20
+ | ------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
21
+ | Framework | Application framework and version | Any frontend framework + version |
22
+ | Language | Primary programming language and configuration | Any typed or untyped language |
23
+ | UI Library | Component library name and version, or "Custom" | Any component library or "Custom" |
24
+ | Styling | Styling approach identifier | Utility classes, CSS modules, CSS-in-JS, scoped styles, etc. |
25
+ | Form Handling | Form library or pattern used by the customer's own forms — **context only**, generated components never use it | Any form library or "Native" |
26
+ | Module System | Module format used | ESM, CommonJS, etc. |
27
+
28
+ ---
29
+
30
+ ### 2. Design Tokens
31
+
32
+ Organize by category. Use semantic names where the customer defines them; otherwise use descriptive labels.
33
+
34
+ **Colors:**
35
+
36
+ - Primary, secondary, accent
37
+ - Error/danger, warning, success, info
38
+ - Background (surface, page, card)
39
+ - Text (primary, secondary, disabled, inverse)
40
+ - Border (default, focus, error)
41
+
42
+ **Spacing:**
43
+
44
+ - The scale used (e.g., 4px base, or named sizes)
45
+
46
+ **Typography:**
47
+
48
+ - Font families (heading, body, mono)
49
+ - Size scale
50
+ - Weight scale
51
+ - Line heights
52
+
53
+ **Borders & Radii:**
54
+
55
+ - Border widths
56
+ - Radius values (small, medium, large, full)
57
+
58
+ **Shadows:**
59
+
60
+ - Elevation levels (if defined)
61
+
62
+ **Breakpoints:**
63
+
64
+ - Responsive boundaries (if defined)
65
+
66
+ ---
67
+
68
+ ### 3. Component Patterns
69
+
70
+ Document how the customer's existing components work. **This section is context, not instructions.** Only the Validation Display and Styling conventions below are replicated in generated Pega components, because they affect appearance. The Input Interface, State Management, and Event Handling conventions are recorded so the reader understands the codebase — generated components follow the Pega contract for all three regardless of what is written here.
71
+
72
+ **Input Interface Convention:**
73
+
74
+ - How components define what they accept (typed interfaces, attribute schemas, parameter decorators, etc.)
75
+ - Whether inputs are flat or nested/grouped
76
+ - Common optional vs required patterns
77
+
78
+ **State Management Convention:**
79
+
80
+ - How components manage transient/local state
81
+ - Controlled vs uncontrolled patterns
82
+ - How derived/computed values are handled
83
+
84
+ **Event Handling Convention:**
85
+
86
+ - How components report value changes to parents
87
+ - Whether changes are immediate, debounced, or committed on blur
88
+ - Event naming conventions
89
+
90
+ **Validation Display Convention:**
91
+
92
+ Record the visual treatment only. Generated components read validation messages from PConnect, never from the customer's form state — so capture what an error _looks_ like, not where the customer's error value comes from.
93
+
94
+ - Where error messages appear (below field, in tooltip, as banner)
95
+ - How error styling is applied (border color, background, icon)
96
+ - Whether validation is inline or form-level
97
+
98
+ **Styling Convention:**
99
+
100
+ - How styles are applied to elements
101
+ - How conditional/dynamic styles are _expressed_ (e.g., error, disabled, focus states) — record the visual mechanism only; Pega supplies the state itself
102
+ - How responsive behavior is implemented
103
+
104
+ ---
105
+
106
+ ### 4. File Conventions
107
+
108
+ **Context only.** Generated components use Pega-owned paths and names (`pega-components/{type}/{ComponentName}/`), so Structure and Naming below do not apply to them. Re-exports, test location, and style location still inform co-located files.
109
+
110
+ | Field | Description |
111
+ | -------------- | ------------------------------------------------------- |
112
+ | Structure | Folder-per-component, flat, grouped by feature, etc. |
113
+ | Naming | File and folder naming convention (casing, separators) |
114
+ | Re-exports | Barrel/index file pattern (if any) |
115
+ | Test location | Co-located with component or in separate test directory |
116
+ | Style location | Co-located, in shared styles directory, or inline |
117
+
118
+ ---
119
+
120
+ ### 5. Import Conventions
121
+
122
+ | Field | Description |
123
+ | ------------------------ | ---------------------------------------------------------------- |
124
+ | Path resolution | Aliases used, or relative paths |
125
+ | Grouping order | How imports are organized (external → internal → relative, etc.) |
126
+ | Default/named preference | Which import style dominates |
127
+ | Style imports | How stylesheets or style modules are imported |
128
+
129
+ Generated components import the customer's UI primitives through their path aliases. Relative paths are used only _within_ `pega-components/` — for shared helpers, barrel files, and the registry file's component imports. One Pega component is never imported into another to render it; that always goes through the component registry.
130
+
131
+ ---
132
+
133
+ ### 6. Representative Component Examples
134
+
135
+ List 3–5 components that were analyzed, with their file paths. These serve as reference points that the generation workflow can re-read for detailed implementation guidance.
136
+
137
+ | Component | Path | Why selected |
138
+ | --------- | ------ | ---------------------------- |
139
+ | [Name] | [path] | Text input with validation |
140
+ | [Name] | [path] | Select/dropdown with options |
141
+ | [Name] | [path] | Layout/container component |
142
+ | ... | ... | ... |
143
+
144
+ ---
145
+
146
+ ## Usage
147
+
148
+ The generation prompt reads this profile once at the start of component generation. It uses:
149
+
150
+ - **Project Fundamentals** → to determine which SDK adapter to reference and what language to generate
151
+ - **Design Tokens** → to apply correct colors, spacing, typography without hardcoding values
152
+ - **Component Patterns** → to replicate the customer's validation display and styling conventions; the rest of the section is context only
153
+ - **File Conventions** → to inform co-located files (barrels, tests, styles); generated components' paths and names come from Pega, not from here
154
+ - **Import Conventions** → to write imports that match the project's style
155
+ - **Representative Examples** → as reference sources to re-read for detailed pattern matching
@@ -65,175 +65,57 @@ Keep all loaded skill files active throughout the entire session.
65
65
 
66
66
  ## Step 2 — Install and discover the design system (once)
67
67
 
68
- ### 2a — Check and install the DS package
68
+ Check the project's dependency manifest to determine whether the design system package is already installed. If it is **not** listed in the project's dependencies, install it using the project's package manager. Report what was installed.
69
69
 
70
- Run this command in your terminal:
70
+ **Immediately after installation**, read `node_modules/<designSystem>/README.md` in full. From it, note the correct import paths, usage patterns, version-specific guidance, global CSS/styles import path, provider wrapper component name, and any peer dependency requirements. Store this information in your memory and use it for all subsequent steps — do not re-read the README later. If the README lists peer dependencies that are not already installed in the project, install them now — the design system will not function correctly without them.
71
71
 
72
- ```bash
73
- cat package.json | grep "<design-system-package>"
74
- ```
72
+ You MUST also thoroughly inspect the installed design system package:
75
73
 
76
- If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
74
+ 1. **Discover all available components** — browse the installed package's directory tree under `node_modules/<designSystem>/` to find every component it exports. Do not assume a specific folder structure (e.g. `dist/`) — packages vary widely in how they organize source, types, and entry points. Navigate through the package's folders, read its entry-point files and type definitions, and build a complete list of every component the package actually provides. Store all discovered component names and their import paths in your memory for reference during code generation.
75
+ 2. **Map each requested component to the best available DS component** — component names from the skill files may not have an exact name match in the installed design system. Using the complete component list you just discovered, identify which DS component best serves the same purpose. For example, `@carbon/react` does not export an `AutoComplete` component — but it does export `ComboBox`, which provides equivalent autocomplete/typeahead functionality. If no single DS component is a close match, compose the requested behavior from multiple available DS primitives. Never fabricate a component import that does not exist in the installed package.
76
+ 3. **Read the props interface of every component you plan to use** — for each component you intend to use, locate and read its TypeScript type definitions (`.d.ts` files or inline types) to understand the exact prop names, types, required vs. optional status, and any relevant enums or union types. Store this information in your memory alongside the component names.
77
+ 4. **Use ONLY confirmed component names and prop names** — when generating code, you must exclusively use the component names and prop names you discovered from the installed package. Do not rely on training knowledge of the design system's API, as it may be outdated, inaccurate, or refer to components/props that do not exist in the installed version.
77
78
 
78
- ```bash
79
- npm install <design-system-package>
80
- ```
79
+ Also check:
81
80
 
82
- Also install any peer dependencies documented in the package's README. Report what was installed.
81
+ - Whether the design system has a **form layout wrapper** (label + input + helper text) — use it instead of manual margins
82
+ - Whether it has **size/density/variant conventions** — use built-in props rather than custom padding
83
+ - Whether it has a **companion icons package** — read its exports before using any icon name; never guess icon names
84
+ - Whether it has a **tokens or CSS directory** — use design system CSS custom properties for spacing; never hardcode `px` values
83
85
 
84
- ### 2a.1 — Install the DS styles package and configure global CSS (MANDATORY)
86
+ ### 2.1 — Install the DS styles package and configure global CSS (MANDATORY)
85
87
 
86
- Design systems require their global stylesheet to be loaded — without it, components render as unstyled browser-native HTML. This step is **not optional**.
88
+ Design systems require their global stylesheet — without it, components render unstyled.
87
89
 
88
- #### Known DS style requirements (examples — verify from README for exact paths):
90
+ #### Known DS style requirements (examples — verify against the README you already read):
89
91
 
90
- | Design System | Styles Package to Install | CSS Import to Add in `src/main.tsx` (example) | Provider Wrapper (example) |
91
- | ------------- | -------------------------------- | --------------------------------------------- | --------------------------------------------- |
92
- | Carbon | `@carbon/styles` | `import '@carbon/react/css/styles.css';` | `<Theme>` from `@carbon/react` |
93
- | Ant Design | (included in `antd`) | `import 'antd/dist/reset.css';` | `<ConfigProvider>` from `antd` |
94
- | Radix Themes | `@radix-ui/themes` | `import '@radix-ui/themes/styles.css';` | `<Theme>` from `@radix-ui/themes` |
95
- | Chakra UI | (included in `@chakra-ui/react`) | (no CSS file needed) | `<ChakraProvider>` from `@chakra-ui/react` |
96
- | Shadcn/ui | (Tailwind CSS) | `import './globals.css';` (Tailwind output) | None (uses Tailwind classes directly) |
97
- | MUI | (included in `@mui/material`) | (no CSS file needed — CSS-in-JS) | `<ThemeProvider>` from `@mui/material/styles` |
92
+ | Design System | Styles Package (example) | CSS Import (example) | Provider Wrapper (example) |
93
+ | ------------- | ------------------------ | ---------------------------------------- | -------------------------- |
94
+ | Carbon | `@carbon/styles` | `import '@carbon/react/css/styles.css';` | `<Theme>` |
95
+ | Ant Design | (included) | `import 'antd/dist/reset.css';` | `<ConfigProvider>` |
96
+ | Radix Themes | `@radix-ui/themes` | `import '@radix-ui/themes/styles.css';` | `<Theme>` |
97
+ | Chakra UI | (included) | (none — runtime) | `<ChakraProvider>` |
98
+ | Shadcn/ui | (Tailwind) | `import './globals.css';` | None |
99
+ | MUI | (included) | (none — CSS-in-JS) | `<ThemeProvider>` |
98
100
 
99
- These are **examples** based on common versions. Always verify the exact import path and provider name from the installed package's README (`node_modules/<ds>/README.md`) — paths may differ across versions.
101
+ Above mentioned are **examples** based on common versions. Use the import path and provider name you noted from the README — they take precedence over this table.
100
102
 
101
- #### If the DS is in the table above:
103
+ If in table and not already configured: install styles package (if separate), add the global CSS import as the **first import** in the application's entry file, and add the Provider wrapper in the application's providers file.
104
+ If not in table: browse the installed design system's folder in `node_modules` for a `styles/` or `dist/` directory containing CSS files, and use what you find there.
102
105
 
103
- 1. Install the styles package (if separate): `npm install <styles-package>`
104
- 2. Add the CSS import as the **first import** in `src/main.tsx` (before any component imports)
105
- 3. Add the Provider wrapper in `src/AppProviders.tsx`
106
+ Since you have already read the design system's README, install the styles package it specifies (if any). If you have already installed it, skip this step. If the README did not provide enough detail about design-system-specific styles, browse the `styles/` folder within the installed design system package to locate the correct stylesheet and understand how it should be applied. Ensure these design system styles are applied globally so that all generated components render correctly.
106
107
 
107
- #### If the DS is NOT in the table:
108
+ Before implementing any component, verify whether design-system-specific styles are already configured in the existing codebase — check the application's entry file for a matching CSS import. If the styles are already imported and configured, skip this step and report "already configured".
108
109
 
109
- 1. Check `node_modules/<designSystem>/README.md` for CSS/styles setup instructions
110
- 2. Search for a CSS entry point:
111
- ```bash
112
- find node_modules/<designSystem> -name "*.css" -path "*/dist/*" | head -5
113
- ```
114
- 3. Install and import whatever is found
115
- 4. Check if a Provider/ThemeProvider is documented in the README
110
+ Report what was installed/configured (or "already configured").
116
111
 
117
- #### Verification (non-visual):
118
-
119
- After adding the CSS import, confirm it exists in the entry file:
120
-
121
- ```bash
122
- grep -n "import.*css\|import.*styles\|import.*reset" src/main.tsx
123
- ```
124
-
125
- If this grep returns nothing, the CSS was NOT added correctly — fix it before proceeding.
126
-
127
- ⛔ **Do NOT proceed to Step 2b until the CSS import is confirmed present in `src/main.tsx`.** Without it, every generated component will render unstyled.
128
-
129
- ### 2b — Deep-dive into the installed DS package
130
-
131
- After installation, build a comprehensive understanding of the design system by reading its source declarations. Do NOT rely on training knowledge — read the actual installed files.
132
-
133
- #### Step 2b.1 — Read the README and understand the DS architecture
134
-
135
- ```bash
136
- cat node_modules/<designSystem>/README.md
137
- ```
138
-
139
- Extract:
140
-
141
- - Correct import paths (named exports from root vs subpath imports like `<ds>/Button`)
142
- - Whether it uses a **Provider/ThemeProvider** wrapper (if so, note the setup requirements)
143
- - Whether it has a **CSS reset or global styles** requirement
144
-
145
- #### Step 2b.2 — List every exported component
146
-
147
- ```bash
148
- grep "^export" node_modules/<designSystem>/dist/index.d.ts 2>/dev/null || grep -rl "^export" node_modules/<designSystem> --include="index.d.ts" | head -5 | xargs grep "^export"
149
- ```
150
-
151
- Save this full export list — it is the authoritative source of what components exist. Any component name not in this list does NOT exist and must NOT be used.
152
-
153
- #### Step 2b.3 — Read every exported component's prop interface
154
-
155
- For EACH exported component from Step 2b.2, read its TypeScript declarations to understand:
156
-
157
- - All available props (required and optional)
158
- - Supported variants, sizes, and states (e.g., `variant: 'outlined' | 'filled'`)
159
- - Event handler prop names (e.g., `onChange`, `onValueChange`, `onSelect`)
160
- - Slot/composition patterns (e.g., `renderInput`, `startAdornment`, `prefix`)
161
- - Whether it accepts `children` or uses named slots
162
-
163
- ```bash
164
- # For each component, find and read its type declarations:
165
- find node_modules/<designSystem> -name "*.d.ts" -path "*ComponentName*" | head -3
166
- grep -A 60 "interface.*Props" <path-from-above>
167
- ```
168
-
169
- Organize your findings into a **DS Component Catalog** grouped by UI category:
170
-
171
- **Form inputs:** Input, Select, Checkbox, Radio, DatePicker, TimePicker, Autocomplete/Combobox, NumberInput, Textarea, Switch, etc.
172
-
173
- - For each: note the exact prop names for `value`, `onChange`, `error/invalid`, `disabled`, `readOnly`, `placeholder`, `label`, `helperText/description`
174
-
175
- **Layout:** Grid, Flex, Stack, SimpleGrid, Columns, Box, Container, etc.
176
-
177
- - For each: note how column counts/ratios are specified (e.g., `columns={2}`, `templateColumns`, `span`)
178
- - Note responsive breakpoint props (e.g., `{{ base: 1, md: 2 }}`)
179
-
180
- **Data display:** Table, List, Card, Badge, Tag, Avatar, Typography/Text, etc.
181
-
182
- - For each: note sub-components (e.g., `Table.Head`, `Card.Header`)
183
-
184
- **Feedback:** Alert, Toast/Snackbar, Dialog/Modal, Popover, Progress, Spinner, etc.
185
-
186
- - For each: note severity/status prop names and how to show/dismiss
187
-
188
- **Navigation:** Tabs, Menu/Dropdown, Link, Button, IconButton, etc.
189
-
190
- #### Step 2b.4 — Check supporting features
191
-
192
- - **Form layout wrapper** — does the DS provide a component that combines label + input + helper text + error message? (e.g., `Form.Item`, `FormControl`, `Field`). If yes, use it for ALL field components instead of composing label/input/helper manually.
193
- - **Companion icons package** — list the package name and read its exports. Never guess icon names:
194
- ```bash
195
- ls node_modules/<designSystem>-icons/dist/ 2>/dev/null | head -20
196
- ```
197
- - **CSS tokens / design tokens** — does the DS expose CSS custom properties or a token system? Use them for spacing instead of hardcoded `px` values.
198
- - **Theme variants** — what `size` values are available? (e.g., `sm`, `md`, `lg`). What `variant` values? (e.g., `outlined`, `filled`, `ghost`).
199
-
200
- #### Step 2b.5 — Build the DS API reference map
201
-
202
- Compile all findings into a single reference map structured as:
203
-
204
- ```
205
- DS API Reference Map
206
- ====================
207
- Package: <name>@<version>
208
- Import pattern: import { Component } from '<path>'
209
- Provider required: yes/no (ThemeProvider, etc.)
210
-
211
- Form Inputs:
212
- Input: { value, onChange, onBlur, placeholder, disabled, readOnly, invalid/error, size, variant }
213
- Select: { value, onChange, options/children, placeholder, disabled, ... }
214
- ...
215
-
216
- Layout:
217
- Grid: { columns, gap, children }
218
- ...
219
-
220
- Data Display:
221
- Card: { children } → Card.Header, Card.Body, Card.Footer
222
- Table: { children } → Table.Head, Table.Body, Table.Row, Table.Cell
223
- ...
224
-
225
- Feedback:
226
- Alert: { status/severity, title, description, closable/onClose }
227
- ...
228
- ```
229
-
230
- Keep this map active throughout the entire session. Reference it whenever generating a component — do NOT re-run discovery commands per component.
112
+ Keep all DS discovery information active throughout the entire session. Reference it whenever generating a component — do NOT re-run discovery per component.
231
113
 
232
114
  ---
233
115
 
234
116
  ## Step 3 — Overwrite check (all types, all at once)
235
117
 
236
- For every type in scope, check whether each component's `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
118
+ For every type in scope, check whether each component's file or directory already exists at the derived output path.
237
119
 
238
120
  Collect all existing components across all types and report them in one consolidated list:
239
121
 
@@ -273,28 +155,20 @@ If no skill file exists at that path, use the general behavioral skeleton from `
273
155
 
274
156
  Create the directory `<base>/field/<ComponentName>/`.
275
157
 
276
- Create `<ComponentName>.tsx` using this structure from `field-components.md` (loaded in Step 1):
158
+ Create the component's main implementation file using the file naming convention and extension appropriate to the project's framework (determine this by examining existing components in the project).
277
159
 
278
- 1. Imports: React hooks + `handleEvent` from `../../helpers/event-utils` + `getComponentFromRegistry` from `@pega/sdk-react` + `PConnFieldProps` + DS input from Step 2
279
- 2. Interface extending `PConnFieldProps` with any extra props from the component skill file
280
- 3. Destructure: `getPConnect`, `label`, `required`, `disabled`, `value`, `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`
281
- 4. Display mode guards: if `DISPLAY_ONLY` or `STACKED_LARGE_VAL` → return `FieldValueList`
282
- 5. Return → DS form input from Step 2, with `onBlur` calling `handleEvent(actions, 'changeNblur', propName, inputValue)`
160
+ Follow the implementation structure described in `field-components.md` (loaded in Step 1). That file specifies the exact imports, interface, props destructuring, display mode guards, event handling, and render approach for this project's framework. Use the DS component you identified in Step 2 as the primary input element.
283
161
 
284
- Pass `data-test-id={testId}` on the underlying interactive element.
162
+ If the component-specific skill file exists, also incorporate its Behavioral Contract (validation rules, option loading, event sequences, edge cases).
285
163
 
286
- Create `index.tsx`:
287
-
288
- ```typescript
289
- export { default } from './<ComponentName>';
290
- ```
164
+ If the project uses barrel/re-export files (check existing component directories for the convention), create one in the same directory following the same pattern.
291
165
 
292
166
  ### 4.3 — Register the component
293
167
 
294
- Edit `src/components/component-map.ts`:
168
+ Open the project's component map file (the file that maps component names to their implementations) and:
295
169
 
296
170
  1. Add an import at the top in the **Fields** section
297
- 2. Add an entry in `getSampleComponentMap()` under the fields comment
171
+ 2. Add an entry in the component map object under the fields comment
298
172
 
299
173
  ⚠️ **Key name exceptions for fields** — these MUST use explicit key mapping (Pega sends a name that differs from the JS variable):
300
174
 
@@ -332,21 +206,13 @@ If no skill file exists at that path, use the general pattern from `template-com
332
206
 
333
207
  Create the directory `<base>/template/<ComponentName>/`.
334
208
 
335
- Create `<ComponentName>.tsx` using the structure matching the template category from `template-components.md` (loaded in Step 1):
336
-
337
- - **Layout**: `PropsWithChildren` + `templateCol` parsing (split on whitespace, strip units, compute ratios) + DS grid/flex from Step 2 rendering children in computed column ratios. On mobile: columns must stack to full width.
338
- - **Form**: `createElement(createPConnectComponent(), ...)` for each child from `getPConnect().getChildren()[0].getPConnect().getChildren()`. No DS primitives.
339
- - **Page**: `createElement(createPConnectComponent(), ...)` for each region from `getPConnect().getChildren()`. No DS primitives.
340
-
341
- Apply the Behavioral Contract from the component skill file.
209
+ Create the component's main implementation file using the file naming convention and extension appropriate to the project's framework.
342
210
 
343
- Create `index.tsx` if required by the skill file:
211
+ Follow the implementation structure described in `template-components.md` (loaded in Step 1). That file specifies the layout, form, and page patterns — including how to render child components — for this project's framework.
344
212
 
345
- ```typescript
346
- export { default } from './<ComponentName>';
347
- ```
213
+ Apply the Behavioral Contract from the component skill file (sub-variants, region handling, slot rendering logic).
348
214
 
349
- Create any CSS file required by the skill file.
215
+ If the project uses barrel/re-export files, create one in the same directory. Also create any CSS file required by the skill file.
350
216
 
351
217
  ### 5.2.1 — Create sub-variant files (MANDATORY for Layout templates)
352
218
 
@@ -354,33 +220,21 @@ Create any CSS file required by the skill file.
354
220
 
355
221
  After generating **TwoColumn**, **OneColumn**, **NarrowWide**, or **WideNarrow**, you MUST immediately create these additional files in the same directory:
356
222
 
357
- | Base template | Sub-variant files to create |
358
- | ------------- | ------------------------------------------------------------------- |
359
- | TwoColumn | `TwoColumnPage.tsx`, `TwoColumnTab.tsx` |
360
- | OneColumn | `OneColumnPage.tsx`, `OneColumnTab.tsx` |
361
- | NarrowWide | `NarrowWideForm.tsx`, `NarrowWidePage.tsx` |
362
- | WideNarrow | `WideNarrowDetails.tsx`, `WideNarrowForm.tsx`, `WideNarrowPage.tsx` |
363
-
364
- Each sub-variant is a one-line passthrough that delegates to the base component via the registry:
365
-
366
- ```typescript
367
- import { getComponentFromRegistry } from '@pega/sdk-react';
368
- import type { PConnProps } from '@pega/sdk-react';
369
-
370
- export default function TwoColumnPage(props: PConnProps & Record<string, any>) {
371
- const TwoColumn = getComponentFromRegistry('TwoColumn');
372
- return <TwoColumn {...props} />;
373
- }
374
- ```
223
+ | Base template | Sub-variant files to create |
224
+ | ------------- | ------------------------------------------------------- |
225
+ | TwoColumn | `TwoColumnPage`, `TwoColumnTab` |
226
+ | OneColumn | `OneColumnPage`, `OneColumnTab` |
227
+ | NarrowWide | `NarrowWideForm`, `NarrowWidePage` |
228
+ | WideNarrow | `WideNarrowDetails`, `WideNarrowForm`, `WideNarrowPage` |
375
229
 
376
- Replace `TwoColumnPage`/`TwoColumn` with the appropriate names for each sub-variant. These files go in the same directory as the base component (e.g., `template/TwoColumn/TwoColumnPage.tsx`).
230
+ Each sub-variant is a one-line passthrough that delegates to the base component via the project's component registry. It retrieves the base component (e.g. `TwoColumn`) from the registry and renders it with all props forwarded. Follow the same file extension and module pattern used by the rest of the project.
377
231
 
378
232
  ### 5.3 — Register the component
379
233
 
380
- Edit `src/components/component-map.ts`:
234
+ Open the project's component map file and:
381
235
 
382
236
  1. Add an import at the top in the **Templates** section
383
- 2. Add an entry in `getSampleComponentMap()` under the templates comment
237
+ 2. Add an entry in the component map object under the templates comment
384
238
  3. **Also import and register ALL sub-variant files** created in Step 5.2.1. Each sub-variant gets its own import and its own entry in the map.
385
239
 
386
240
  ### 5.4 — Report progress
@@ -403,7 +257,7 @@ After reading, extract and keep active:
403
257
 
404
258
  - **Behavioral Contract** — the exact PCore API calls, state variables, event handlers, and edge cases specific to this widget
405
259
  - **Design System Mapping** table — the recommended DS primitive for this component's presentation layer
406
- - **Props interface** — any required/optional props beyond the base `PConnProps`
260
+ - **Props interface** — any required/optional props beyond the base props type
407
261
 
408
262
  If no skill file exists at that path (e.g., `SummaryList`), use the general data-fetching pattern from `widget-components.md` loaded in Step 1.
409
263
 
@@ -413,30 +267,20 @@ If no skill file exists at that path (e.g., `SummaryList`), use the general data
413
267
 
414
268
  Create the directory `<base>/widget/<ComponentName>/`.
415
269
 
416
- Create `<ComponentName>.tsx` using this structure from `widget-components.md` (loaded in Step 1):
270
+ Create the component's main implementation file using the file naming convention and extension appropriate to the project's framework.
417
271
 
418
- 1. Imports (React hooks + DS components from Step 2 + `PConnProps` from `@pega/sdk-react`)
419
- 2. Interface extending PConnProps with props from the component skill file's Props table
420
- 3. Component function: destructure `getPConnect`, call `getPConnect()` to get `pConn`
421
- 4. `useEffect` → data fetch using the exact PCore API call from the skill file's Behavioral Contract
422
- 5. Return → DS Card/List/Table primitive from Step 2 API map, rendering the fetched data
272
+ Follow the implementation structure described in `widget-components.md` (loaded in Step 1). That file specifies the imports, interface, data-fetching lifecycle, and render approach for this project's framework. Use the DS components you identified in Step 2 for presentation.
423
273
 
424
- Fill in the `// [DS RENDER]` section with DS primitives confirmed in Step 2. The data-fetching logic comes from the skill file's Behavioral Contract — do NOT invent API calls.
274
+ The data-fetching logic comes from the skill file's Behavioral Contract — do NOT invent API calls. Fill in the presentation layer with DS primitives confirmed in Step 2.
425
275
 
426
- Create `index.tsx`:
427
-
428
- ```typescript
429
- export { default } from './<ComponentName>';
430
- ```
431
-
432
- Create any CSS or utility files required by the skill file.
276
+ If the project uses barrel/re-export files, create one in the same directory. Also create any CSS or utility files required by the skill file.
433
277
 
434
278
  ### 6.3 — Register the component
435
279
 
436
- Edit `src/components/component-map.ts`:
280
+ Open the project's component map file and:
437
281
 
438
282
  1. Add an import at the top in the **Widgets** section
439
- 2. Add an entry in `getSampleComponentMap()` under the widgets comment
283
+ 2. Add an entry in the component map object under the widgets comment
440
284
 
441
285
  ⚠️ **Key name exception for widgets** — this MUST use explicit key mapping:
442
286
 
@@ -472,28 +316,20 @@ If no skill file exists at that path, use the general pattern from `design-syste
472
316
 
473
317
  Create the directory `<base>/designSystemExtension/<ComponentName>/`.
474
318
 
475
- Create `<ComponentName>.tsx` using the structure matching the pattern from `design-system-extension.md` (loaded in Step 1):
476
-
477
- - **Pattern B** (Pure display — AlertBanner, Banner, Operator, WssQuickCreate): variant mapping (urgent→error, warning→warning, info→info, success→success) + DS Alert/Card/Avatar primitive from Step 2. No `getPConnect`.
478
- - **Pattern A** (PConnect display — CaseSummaryFields, DetailsFields, FieldValueList): CSS classes + optional DS typography, no DS component primitives. May use `getPConnect`.
479
- - **Pattern C** (Complex display — FieldGroup, FieldGroupList, Pulse, RichTextEditor): `createElement(createPConnectComponent(), ...)` for PConnect children, semantic HTML. No DS primitives.
319
+ Create the component's main implementation file using the file naming convention and extension appropriate to the project's framework.
480
320
 
481
- Apply the Behavioral Contract from the component skill file.
321
+ Follow the implementation structure described in `design-system-extension.md` (loaded in Step 1). That file specifies the pattern variants (pure display, PConnect display, complex display) for this project's framework.
482
322
 
483
- Create `index.tsx` if required by the skill file:
323
+ Apply the Behavioral Contract from the component skill file (prop handling, variant mapping, rendering logic, edge cases).
484
324
 
485
- ```typescript
486
- export { default } from './<ComponentName>';
487
- ```
488
-
489
- Create any CSS file required by the skill file.
325
+ If the project uses barrel/re-export files, create one in the same directory. Also create any CSS file required by the skill file.
490
326
 
491
327
  ### 7.3 — Register the component
492
328
 
493
- Edit `src/components/component-map.ts`:
329
+ Open the project's component map file and:
494
330
 
495
331
  1. Add an import at the top in the **Design System Extension** section
496
- 2. Add an entry in `getSampleComponentMap()` under the DSE comment
332
+ 2. Add an entry in the component map object under the DSE comment
497
333
 
498
334
  ### 7.4 — Report progress
499
335
 
@@ -503,17 +339,11 @@ After each component: "`<ComponentName>` ✓ — Pattern `<B/A/C>`"
503
339
 
504
340
  ## Step 8 — Verify the build
505
341
 
506
- Run:
507
-
508
- ```bash
509
- npm run build
510
- ```
511
-
512
- Fix any TypeScript or build errors before reporting completion.
342
+ Run the project's build process to confirm everything compiles without errors. Fix any TypeScript or build errors before reporting completion.
513
343
 
514
- ### 8.1 — Validate component-map key names
344
+ ### 8.1 — Validate component map key names
515
345
 
516
- After a clean build, verify these key name exceptions in `component-map.ts`:
346
+ After a clean build, verify these key name exceptions in the component map:
517
347
 
518
348
  - [ ] `Date: DateField` (not `DateField,`)
519
349
  - [ ] `URL: URLComponent` (not `URLComponent,`)
@@ -524,5 +354,5 @@ These are cases where the Pega engine sends a component name that differs from t
524
354
  Report a final summary:
525
355
 
526
356
  - Total components generated, grouped by type
527
- - All entries added to `component-map.ts`
357
+ - All entries added to the component map
528
358
  - Any components skipped (if "skip existing" was chosen in Step 3)