@salsita-ai/sdk 0.50.0-develop.b5d443db78 → 0.50.0-develop.b65a5a9c66

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 (980) hide show
  1. package/README.md +10 -3
  2. package/dist/admin/common/admin-interface.d.ts +13 -3
  3. package/dist/admin/common/admin-interface.js +1 -1
  4. package/dist/admin/ui/layout/UserProfile.d.ts +1 -1
  5. package/dist/admin/ui/layout/UserProfile.js +1 -1
  6. package/dist/admin/ui/maintenance/ImportPresets.js +1 -1
  7. package/dist/application/mount-application.js +1 -1
  8. package/dist/application/mount-configurator.js +1 -1
  9. package/dist/application/studio-embedding.d.ts +6 -0
  10. package/dist/application/studio-embedding.js +1 -0
  11. package/dist/application-spec/core/enhanced-json-schema.d.ts +5 -6
  12. package/dist/application-spec/core/enhanced-json-schema.js +1 -1
  13. package/dist/application-spec/core/markers/index.d.ts +1 -0
  14. package/dist/application-spec/core/markers/index.js +1 -1
  15. package/dist/application-spec/core/markers/set-in-studio-marker.d.ts +15 -0
  16. package/dist/application-spec/core/markers/set-in-studio-marker.js +1 -0
  17. package/dist/application-spec/errors/diagnostic-codes.d.ts +22 -0
  18. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  19. package/dist/application-spec/errors/diagnostic-messages.d.ts +23 -1
  20. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  21. package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +3 -3
  22. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  23. package/dist/application-spec/generate-application/code/index.d.ts +1 -0
  24. package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +4 -15
  25. package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
  26. package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +5 -1
  27. package/dist/application-spec/generate-application/code/templates/admin-config.js +4 -3
  28. package/dist/application-spec/generate-application/code/templates/application-types.js +5 -5
  29. package/dist/application-spec/generate-application/code/templates/configurator-config.js +8 -6
  30. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +0 -1
  31. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +6 -8
  32. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -0
  33. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +8 -6
  34. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +6 -8
  35. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +3 -3
  36. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-base-configurator-builder.js +2 -1
  37. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +1 -1
  38. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +38 -41
  39. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.d.ts +1 -1
  40. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +19 -3
  41. package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
  42. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  43. package/dist/application-spec/generate-application/code/templates/editor.d.ts +1 -1
  44. package/dist/application-spec/generate-application/code/templates/editor.js +16 -3
  45. package/dist/application-spec/generate-application/code/templates/frontend-config.js +7 -3
  46. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +3 -3
  47. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +3 -3
  48. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +10 -6
  49. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -7
  50. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +12 -13
  51. package/dist/application-spec/generate-application/code/templates/globals.js +21 -12
  52. package/dist/application-spec/generate-application/code/templates/html-index.d.ts +12 -1
  53. package/dist/application-spec/generate-application/code/templates/html-index.js +9 -10
  54. package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
  55. package/dist/application-spec/generate-application/code/templates/sign-in-page-options.d.ts +5 -0
  56. package/dist/application-spec/generate-application/code/templates/sign-in-page-options.js +1 -0
  57. package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
  58. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +8 -36
  59. package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +15 -11
  60. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
  61. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
  62. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
  63. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.d.ts +3 -0
  64. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +42 -0
  65. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
  66. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +55 -0
  67. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.d.ts +3 -0
  68. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +16 -0
  69. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +3 -3
  70. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +1 -1
  71. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +1 -1
  72. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.d.ts +3 -0
  73. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.js +19 -0
  74. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +1 -1
  75. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +4 -2
  76. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +3 -3
  77. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.js +2 -2
  78. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +1 -1
  79. package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
  80. package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +2 -2
  81. package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -1
  82. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.d.ts +3 -0
  83. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +48 -0
  84. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.d.ts +3 -0
  85. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.js +45 -0
  86. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.d.ts +3 -0
  87. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +36 -0
  88. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.d.ts +3 -0
  89. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.js +92 -0
  90. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.d.ts +1 -0
  91. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.js +1 -0
  92. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.d.ts +3 -0
  93. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.js +1 -0
  94. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.d.ts +3 -0
  95. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.js +1 -0
  96. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.d.ts +3 -0
  97. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.js +26 -0
  98. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.d.ts +3 -0
  99. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.js +51 -0
  100. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.d.ts +3 -0
  101. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.js +38 -0
  102. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.d.ts +1 -0
  103. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.js +1 -0
  104. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.d.ts +3 -0
  105. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.js +88 -0
  106. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.d.ts +3 -0
  107. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.js +68 -0
  108. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.d.ts +3 -0
  109. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.js +1 -0
  110. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.d.ts +3 -0
  111. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -0
  112. package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +2 -2
  113. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
  114. package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.js +1 -1
  115. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
  116. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
  117. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +3 -0
  118. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +29 -1
  119. package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -2
  120. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +29 -15
  121. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +17 -14
  122. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +2 -2
  123. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +3 -3
  124. package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -0
  125. package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
  126. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
  127. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +2 -2
  128. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
  129. package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -1
  130. package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +1 -1
  131. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
  132. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
  133. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +2 -0
  134. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -1
  135. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.d.ts +2 -0
  136. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.js +28 -0
  137. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +0 -7
  138. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
  139. package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -1
  140. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +8 -6
  141. package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -6
  142. package/dist/application-spec/generate-application/code/webhook-safe-files.d.ts +3 -1
  143. package/dist/application-spec/generate-application/code/webhook-safe-files.js +1 -1
  144. package/dist/application-spec/parse-application-files/access/access-handler-kinds.d.ts +18 -0
  145. package/dist/application-spec/parse-application-files/access/access-handler-kinds.js +1 -0
  146. package/dist/application-spec/parse-application-files/access/analyzed-file.d.ts +7 -0
  147. package/dist/application-spec/parse-application-files/access/check-access-handler-files.d.ts +20 -0
  148. package/dist/application-spec/parse-application-files/access/check-access-handler-files.js +1 -0
  149. package/dist/application-spec/parse-application-files/access/check-auth-hook-files.d.ts +17 -0
  150. package/dist/application-spec/parse-application-files/access/check-auth-hook-files.js +1 -0
  151. package/dist/application-spec/parse-application-files/access/index.d.ts +5 -0
  152. package/dist/application-spec/parse-application-files/access/index.js +1 -0
  153. package/dist/application-spec/parse-application-files/access/sign-in-control.d.ts +7 -0
  154. package/dist/application-spec/parse-application-files/access/sign-in-control.js +1 -0
  155. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +2 -1
  156. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  157. package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +30 -4
  158. package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
  159. package/dist/application-spec/parse-application-files/categorize/webhook-safety.js +1 -1
  160. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +17 -1
  161. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
  162. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  163. package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +7 -1
  164. package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
  165. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  166. package/dist/application-spec/parse-application-files/parse-common-admin-spec.js +1 -1
  167. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +3 -2
  168. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -1
  169. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +67 -8
  170. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  171. package/dist/application-spec/parse-application-files/raw-spec/raw-components.js +1 -1
  172. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +12 -3
  173. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  174. package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
  175. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +6 -0
  176. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  177. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  178. package/dist/application-spec/parse-application-files/spec/model/index.d.ts +2 -1
  179. package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
  180. package/dist/application-spec/parse-application-files/spec/model/session-data-schema.d.ts +5 -2
  181. package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
  182. package/dist/application-spec/parse-application-files/spec/model/session-fields/index.d.ts +1 -0
  183. package/dist/application-spec/parse-application-files/spec/model/session-fields/index.js +1 -0
  184. package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.d.ts +15 -0
  185. package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.js +1 -0
  186. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  187. package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -1
  188. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
  189. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +14 -2
  190. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -1
  191. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +7 -10
  192. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  193. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +5 -6
  194. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.js +1 -1
  195. package/dist/application-spec/parse-application-files/spec/sections/assistant/index.d.ts +0 -1
  196. package/dist/application-spec/webhook-boundary.js +1 -1
  197. package/dist/client/authenticated-client.d.ts +5 -1
  198. package/dist/client/authenticated-client.js +1 -1
  199. package/dist/client/authorized-client.d.ts +4 -1
  200. package/dist/client/authorized-client.js +1 -1
  201. package/dist/client/base-client.d.ts +15 -1
  202. package/dist/client/base-client.js +1 -1
  203. package/dist/client/cli-client/cli-api-client.d.ts +17 -0
  204. package/dist/client/cli-client/cli-api-client.js +1 -0
  205. package/dist/client/cli-client/index.d.ts +2 -0
  206. package/dist/client/cli-client/index.js +1 -0
  207. package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
  208. package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
  209. package/dist/client/contract.d.ts +53 -10
  210. package/dist/client/contract.js +1 -1
  211. package/dist/client/index.d.ts +2 -1
  212. package/dist/client/index.js +1 -1
  213. package/dist/client/local-authorized-client.d.ts +1 -0
  214. package/dist/client/local-authorized-client.js +1 -1
  215. package/dist/client/memory-authorized-client.d.ts +1 -0
  216. package/dist/client/memory-authorized-client.js +1 -1
  217. package/dist/client/phoenix-api.d.ts +8470 -2127
  218. package/dist/client/unauthenticated-client.d.ts +1 -0
  219. package/dist/client/unauthenticated-client.js +1 -1
  220. package/dist/configurator/ConfiguratorApp.js +1 -1
  221. package/dist/configurator/agent-at-work/AgentAtWorkFallback.d.ts +7 -0
  222. package/dist/configurator/agent-at-work/AgentAtWorkFallback.js +1 -0
  223. package/dist/configurator/agent-at-work/AgentAtWorkPage.d.ts +20 -0
  224. package/dist/configurator/agent-at-work/AgentAtWorkPage.js +1 -0
  225. package/dist/configurator/agent-at-work/AgentModeBadge.d.ts +11 -0
  226. package/dist/configurator/agent-at-work/AgentModeBadge.js +1 -0
  227. package/dist/configurator/agent-at-work/StudioMark.d.ts +8 -0
  228. package/dist/configurator/agent-at-work/StudioMark.js +1 -0
  229. package/dist/configurator/agent-at-work/agent-at-work-copy.d.ts +17 -0
  230. package/dist/configurator/agent-at-work/agent-at-work-copy.js +1 -0
  231. package/dist/configurator/agent-at-work/agent-at-work-styles.d.ts +23 -0
  232. package/dist/configurator/agent-at-work/agent-at-work-styles.js +374 -0
  233. package/dist/configurator/agent-at-work/index.d.ts +3 -0
  234. package/dist/configurator/agent-at-work/index.js +1 -0
  235. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +5 -4
  236. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
  237. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  238. package/dist/configurator/application-runtime/extensions/selectors.d.ts +4 -2
  239. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  240. package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.d.ts +14 -0
  241. package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.js +1 -0
  242. package/dist/configurator/application-runtime/extensions/systems/action-system/action-factory.d.ts +13 -0
  243. package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.d.ts +55 -0
  244. package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.js +1 -0
  245. package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +56 -0
  246. package/dist/configurator/application-runtime/extensions/systems/action-system/action.js +1 -0
  247. package/dist/configurator/application-runtime/extensions/systems/action-system/index.d.ts +6 -0
  248. package/dist/configurator/application-runtime/extensions/systems/action-system/index.js +1 -0
  249. package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.d.ts +4 -3
  250. package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.js +2 -2
  251. package/dist/{domain/spec/modules → configurator/application-runtime/extensions/systems/action-system}/resolve-action-modules.d.ts +2 -2
  252. package/dist/configurator/application-runtime/extensions/systems/action-system/resolve-action-modules.js +1 -0
  253. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +14 -8
  254. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.d.ts +18 -0
  255. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.js +1 -0
  256. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.d.ts +69 -0
  257. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.js +1 -0
  258. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +252 -22
  259. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  260. package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +63 -0
  261. package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -0
  262. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +52 -36
  263. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  264. package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.d.ts +13 -0
  265. package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.js +1 -0
  266. package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.d.ts +7 -0
  267. package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.js +1 -0
  268. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +3 -0
  269. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -0
  270. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +33 -0
  271. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +6 -0
  272. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.d.ts +14 -0
  273. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.js +2 -0
  274. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.d.ts +10 -0
  275. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.js +1 -0
  276. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
  277. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
  278. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +18 -5
  279. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  280. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +8 -1
  281. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  282. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +46 -12
  283. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  284. package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.d.ts +16 -0
  285. package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.js +1 -0
  286. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +26 -0
  287. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -0
  288. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +25 -8
  289. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -1
  290. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.d.ts +15 -4
  291. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.js +3 -3
  292. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +15 -7
  293. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  294. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +8 -3
  295. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  296. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +11 -0
  297. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  298. package/dist/configurator/application-runtime/extensions/systems/sketching-system/sketching-system.d.ts +5 -5
  299. package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
  300. package/dist/configurator/common/configurator-interface.d.ts +21 -9
  301. package/dist/configurator/common/configurator-interface.js +1 -1
  302. package/dist/configurator/index.d.ts +1 -0
  303. package/dist/configurator/index.js +1 -1
  304. package/dist/configurator/{ui/configurator-layout/universal → pages}/ExportingOverlay.d.ts +3 -2
  305. package/dist/configurator/pages/ExportingOverlay.js +1 -0
  306. package/dist/configurator/pages/InertRoot.d.ts +10 -0
  307. package/dist/configurator/pages/InertRoot.js +1 -0
  308. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  309. package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
  310. package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
  311. package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.d.ts +8 -0
  312. package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.js +1 -0
  313. package/dist/configurator/pages/error-boundaries/DevContextFallback.d.ts +4 -2
  314. package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
  315. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.d.ts +6 -4
  316. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
  317. package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
  318. package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
  319. package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
  320. package/dist/configurator/scene/resources/use-phx-gltf.js +1 -1
  321. package/dist/configurator/scene/scene-entity/materials/LocalCreatedMaterial.js +1 -1
  322. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.d.ts +5 -0
  323. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
  324. package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.d.ts +27 -0
  325. package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.js +1 -0
  326. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -1
  327. package/dist/configurator/ui/assistant/AssistantChips.d.ts +78 -6
  328. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  329. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +99 -1
  330. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
  331. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +37 -3
  332. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  333. package/dist/configurator/ui/assistant/AssistantPanel.d.ts +51 -4
  334. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  335. package/dist/configurator/ui/assistant/AssistantThread.d.ts +85 -2
  336. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  337. package/dist/configurator/ui/assistant/AssistantThreadItemView.d.ts +83 -6
  338. package/dist/configurator/ui/assistant/AssistantThreadItemView.js +1 -1
  339. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +35 -1
  340. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -1
  341. package/dist/configurator/ui/assistant/alert/index.d.ts +1 -1
  342. package/dist/configurator/ui/assistant/annotation/AnnotationBadge.d.ts +34 -0
  343. package/dist/configurator/ui/assistant/annotation/AnnotationBadge.js +1 -1
  344. package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.d.ts +2 -3
  345. package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -1
  346. package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -1
  347. package/dist/configurator/ui/assistant/annotation/annotation-layout.d.ts +59 -5
  348. package/dist/configurator/ui/assistant/annotation/annotation-layout.js +1 -1
  349. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +40 -5
  350. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
  351. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +6 -5
  352. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
  353. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
  354. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
  355. package/dist/configurator/ui/assistant/annotation/editor/index.d.ts +1 -0
  356. package/dist/configurator/ui/assistant/annotation/index.d.ts +3 -2
  357. package/dist/configurator/ui/assistant/annotation/index.js +1 -1
  358. package/dist/configurator/ui/assistant/assistant-failure.d.ts +9 -4
  359. package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
  360. package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +49 -5
  361. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
  362. package/dist/configurator/ui/assistant/attachments/index.d.ts +1 -1
  363. package/dist/configurator/ui/assistant/composer/composer-frame.d.ts +7 -2
  364. package/dist/configurator/ui/assistant/composer/composer-frame.js +1 -1
  365. package/dist/configurator/ui/assistant/composer/index.d.ts +1 -1
  366. package/dist/configurator/ui/assistant/composer/index.js +1 -1
  367. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.d.ts +10 -0
  368. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.js +1 -0
  369. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.d.ts +10 -0
  370. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.js +1 -0
  371. package/dist/configurator/ui/assistant/disclaimer/index.d.ts +2 -0
  372. package/dist/configurator/ui/assistant/disclaimer/index.js +1 -0
  373. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +58 -0
  374. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -0
  375. package/dist/configurator/ui/assistant/drawing/index.d.ts +2 -0
  376. package/dist/configurator/ui/assistant/drawing/index.js +1 -0
  377. package/dist/configurator/ui/assistant/drawing/parse-drawing.d.ts +18 -0
  378. package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -0
  379. package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +8 -0
  380. package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -0
  381. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +35 -1
  382. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
  383. package/dist/configurator/ui/assistant/entity-link/index.d.ts +1 -1
  384. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +59 -2
  385. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  386. package/dist/configurator/ui/assistant/form/built-in-form-slots.d.ts +16 -0
  387. package/dist/configurator/ui/assistant/form/built-in-form-slots.js +1 -0
  388. package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
  389. package/dist/configurator/ui/assistant/form/index.d.ts +2 -1
  390. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +6 -5
  391. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  392. package/dist/configurator/ui/assistant/form/read-form-tile.d.ts +8 -0
  393. package/dist/configurator/ui/assistant/form/read-form-tile.js +1 -0
  394. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +6 -3
  395. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -1
  396. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +11 -7
  397. package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +1 -1
  398. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -1
  399. package/dist/configurator/ui/assistant/form/registry/index.d.ts +1 -1
  400. package/dist/configurator/ui/assistant/form/split-form-rows.d.ts +7 -0
  401. package/dist/configurator/ui/assistant/form/split-form-rows.js +1 -0
  402. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +51 -0
  403. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -1
  404. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +47 -0
  405. package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -1
  406. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +43 -0
  407. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -1
  408. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +56 -2
  409. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
  410. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +43 -0
  411. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
  412. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +47 -0
  413. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
  414. package/dist/configurator/ui/assistant/form-elements/FormTile.d.ts +72 -0
  415. package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -0
  416. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +27 -0
  417. package/dist/configurator/ui/assistant/form-elements/index.d.ts +8 -9
  418. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  419. package/dist/configurator/ui/assistant/image-view/ImageView.d.ts +66 -0
  420. package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -0
  421. package/dist/configurator/ui/assistant/image-view/index.d.ts +1 -0
  422. package/dist/configurator/ui/assistant/image-view/index.js +1 -0
  423. package/dist/configurator/ui/assistant/image-view/use-image-blob.d.ts +7 -0
  424. package/dist/configurator/ui/assistant/image-view/use-image-blob.js +1 -0
  425. package/dist/configurator/ui/assistant/index.d.ts +21 -10
  426. package/dist/configurator/ui/assistant/index.js +1 -1
  427. package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.d.ts +57 -0
  428. package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -0
  429. package/dist/configurator/ui/assistant/panel/index.d.ts +1 -0
  430. package/dist/configurator/ui/assistant/panel/index.js +1 -0
  431. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +43 -1
  432. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -1
  433. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +4 -1
  434. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -1
  435. package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -2
  436. package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
  437. package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +49 -2
  438. package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -1
  439. package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
  440. package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
  441. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +34 -0
  442. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
  443. package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -1
  444. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +2 -6
  445. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
  446. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +5 -6
  447. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
  448. package/dist/configurator/ui/assistant/thread-items.d.ts +17 -3
  449. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  450. package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +32 -7
  451. package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
  452. package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +15 -1
  453. package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -1
  454. package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +3 -3
  455. package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -1
  456. package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts} +1 -1
  457. package/dist/configurator/ui/assistant/use-on-unmount.js +1 -0
  458. package/dist/configurator/ui/assistant/voice/RecordingBar.d.ts +21 -0
  459. package/dist/configurator/ui/assistant/voice/RecordingBar.js +1 -0
  460. package/dist/configurator/ui/assistant/voice/ReplyPlayButton.d.ts +43 -0
  461. package/dist/configurator/ui/assistant/voice/ReplyPlayButton.js +1 -0
  462. package/dist/configurator/ui/assistant/voice/index.d.ts +4 -0
  463. package/dist/configurator/ui/assistant/voice/index.js +1 -0
  464. package/dist/configurator/ui/assistant/voice/use-voice-recording.d.ts +39 -0
  465. package/dist/configurator/ui/assistant/voice/use-voice-recording.js +1 -0
  466. package/dist/configurator/ui/assistant/voice/voice-capture.d.ts +22 -0
  467. package/dist/configurator/ui/assistant/voice/voice-capture.js +1 -0
  468. package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
  469. package/dist/configurator/ui/configurator-layout/index.js +1 -1
  470. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  471. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
  472. package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
  473. package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
  474. package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
  475. package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
  476. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
  477. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
  478. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
  479. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
  480. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  481. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  482. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
  483. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  484. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
  485. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
  486. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
  487. package/dist/configurator/ui/index.d.ts +1 -1
  488. package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
  489. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  490. package/dist/docs/index.json +130 -5
  491. package/dist/docs/integrations/woocommerce/overview.mdx +4 -2
  492. package/dist/docs/layouts/nested-view-controls.mdx +223 -0
  493. package/dist/docs/layouts/presets/custom.mdx +1 -0
  494. package/dist/docs/layouts/preview/always.mdx +22 -0
  495. package/dist/docs/layouts/view-controls.mdx +2 -0
  496. package/dist/docs/other-features/domain-actions.mdx +82 -55
  497. package/dist/docs/other-features/violation-messages.mdx +3 -1
  498. package/dist/docs/phoenix/admin.mdx +25 -64
  499. package/dist/docs/phoenix/application-states.mdx +1 -1
  500. package/dist/docs/phoenix/assistant/actions.mdx +183 -0
  501. package/dist/docs/phoenix/assistant/changing-the-configuration.mdx +333 -0
  502. package/dist/docs/phoenix/assistant/instructions-and-ai-settings.mdx +221 -0
  503. package/dist/docs/phoenix/assistant/overview.mdx +137 -0
  504. package/dist/docs/phoenix/assistant/per-session-setup.mdx +166 -0
  505. package/dist/docs/phoenix/assistant/reading-the-configuration.mdx +349 -0
  506. package/dist/docs/phoenix/assistant/screenshots.mdx +135 -0
  507. package/dist/docs/phoenix/assistant/security-and-limits.mdx +151 -0
  508. package/dist/docs/phoenix/assistant/the-panel.mdx +298 -0
  509. package/dist/docs/phoenix/blender-rendering.mdx +3 -1
  510. package/dist/docs/phoenix/clerk-sign-in.mdx +9 -5
  511. package/dist/docs/phoenix/configurator-interface.mdx +105 -10
  512. package/dist/docs/phoenix/data-sources.mdx +71 -51
  513. package/dist/docs/phoenix/deployments.mdx +3 -3
  514. package/dist/docs/phoenix/finalization.mdx +2 -2
  515. package/dist/docs/phoenix/getting-started.mdx +1 -1
  516. package/dist/docs/phoenix/integration/authentication-external.mdx +5 -5
  517. package/dist/docs/phoenix/integration/authentication-internal.mdx +3 -3
  518. package/dist/docs/phoenix/integration/finalization-internal.mdx +2 -5
  519. package/dist/docs/phoenix/integration/integration-modes-internal.mdx +9 -0
  520. package/dist/docs/phoenix/layout-slots.mdx +2 -2
  521. package/dist/docs/phoenix/localization.mdx +2 -1
  522. package/dist/docs/phoenix/migrations.mdx +1 -1
  523. package/dist/docs/phoenix/phoenix-cli.mdx +100 -60
  524. package/dist/docs/phoenix/project-structure.mdx +30 -15
  525. package/dist/docs/phoenix/publishing.mdx +21 -28
  526. package/dist/docs/phoenix/sdk-builder-workflow.mdx +61 -30
  527. package/dist/docs/phoenix/sessions-and-access.mdx +180 -153
  528. package/dist/docs/phoenix/sharing.mdx +1 -1
  529. package/dist/docs/phoenix/theming.mdx +5 -9
  530. package/dist/docs/phoenix/webhook-membership.mdx +4 -1
  531. package/dist/docs/phoenix/webhooks.mdx +449 -296
  532. package/dist/docs/ux-guidelines/choosing-navigation.mdx +2 -0
  533. package/dist/docs/ux-guidelines/designing-the-configuration-journey.mdx +43 -0
  534. package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
  535. package/dist/docs/ux-guidelines/overview.mdx +11 -9
  536. package/dist/domain/admin-domain/index.d.ts +2 -2
  537. package/dist/domain/application/access/access-handlers.d.ts +19 -0
  538. package/dist/domain/application/access/access-handlers.js +1 -0
  539. package/dist/domain/application/access/anonymous-handler.d.ts +16 -0
  540. package/dist/domain/application/access/anonymous-handler.js +1 -0
  541. package/dist/domain/application/access/chunk-scopes-handler.d.ts +27 -0
  542. package/dist/domain/application/access/chunk-scopes-handler.js +1 -0
  543. package/dist/domain/application/access/code-handler.d.ts +16 -0
  544. package/dist/domain/application/access/code-handler.js +1 -0
  545. package/dist/domain/application/access/index.d.ts +7 -0
  546. package/dist/domain/application/access/index.js +1 -0
  547. package/dist/domain/application/access/refresh-handler.d.ts +16 -0
  548. package/dist/domain/application/access/refresh-handler.js +1 -0
  549. package/dist/domain/application/access/signed-in-handler.d.ts +44 -0
  550. package/dist/domain/application/access/signed-in-handler.js +1 -0
  551. package/dist/domain/application/access/visitor-handler.d.ts +23 -0
  552. package/dist/domain/application/access/visitor-handler.js +1 -0
  553. package/dist/domain/application/application-config.d.ts +37 -1
  554. package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
  555. package/dist/domain/application/assistant/assistant-exposure.js +1 -0
  556. package/dist/domain/application/assistant/assistant-selection.d.ts +30 -0
  557. package/dist/domain/application/assistant/assistant-selection.js +1 -0
  558. package/dist/domain/application/assistant/build-assistant-lenses.js +4 -4
  559. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +2 -2
  560. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  561. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +18 -2
  562. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  563. package/dist/domain/application/assistant/index.d.ts +5 -1
  564. package/dist/domain/application/assistant/index.js +1 -1
  565. package/dist/domain/application/assistant/prepare-assistant-navigation-updates.d.ts +16 -0
  566. package/dist/domain/application/assistant/prepare-assistant-navigation-updates.js +1 -0
  567. package/dist/domain/application/assistant/read-assistant-navigation.d.ts +40 -0
  568. package/dist/domain/application/assistant/read-assistant-navigation.js +1 -0
  569. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  570. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +30 -2
  571. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  572. package/dist/domain/application/assistant/session-setup/assistant-takes-images.d.ts +7 -0
  573. package/dist/domain/application/assistant/session-setup/assistant-takes-images.js +1 -0
  574. package/dist/domain/application/assistant/session-setup/index.d.ts +1 -0
  575. package/dist/domain/application/assistant/session-setup/index.js +1 -1
  576. package/dist/domain/application/assistant-field-options.d.ts +2 -0
  577. package/dist/domain/application/assistant-field-options.js +1 -1
  578. package/dist/domain/application/assistant-mutations.d.ts +17 -11
  579. package/dist/domain/application/assistant-mutations.js +1 -1
  580. package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
  581. package/dist/domain/application/assistant-recipe-groups.js +1 -1
  582. package/dist/domain/application/configurator-builder.d.ts +47 -37
  583. package/dist/domain/application/configurator-builder.js +1 -1
  584. package/dist/domain/application/index.d.ts +2 -1
  585. package/dist/domain/application/index.js +1 -1
  586. package/dist/domain/application/standard-properties.d.ts +1 -1
  587. package/dist/domain/application/standard-properties.js +1 -1
  588. package/dist/domain/available-system-components/available-system-components.d.ts +1 -1
  589. package/dist/domain/available-system-components/available-system-components.js +1 -1
  590. package/dist/domain/core/action/action.d.ts +0 -49
  591. package/dist/domain/core/action/index.d.ts +0 -1
  592. package/dist/domain/core/action/index.js +1 -1
  593. package/dist/domain/core/component/system-component-filter.d.ts +1 -0
  594. package/dist/domain/core/component/system-component-filter.js +1 -1
  595. package/dist/domain/core/component/view-state-component.d.ts +4 -3
  596. package/dist/domain/core/component/view-state-component.js +1 -1
  597. package/dist/domain/core/domain-factory.d.ts +8 -3
  598. package/dist/domain/core/domain-factory.js +1 -1
  599. package/dist/domain/core/fit-session-data.d.ts +16 -0
  600. package/dist/domain/core/fit-session-data.js +1 -0
  601. package/dist/domain/core/index.d.ts +1 -1
  602. package/dist/domain/core/index.js +1 -1
  603. package/dist/domain/core/invariant/control-violation-hints.d.ts +37 -0
  604. package/dist/domain/core/invariant/control-violation-hints.js +1 -0
  605. package/dist/domain/core/invariant/index.d.ts +1 -0
  606. package/dist/domain/core/invariant/index.js +1 -1
  607. package/dist/domain/domain-builder/domain-builder.d.ts +1 -6
  608. package/dist/domain/domain-builder/domain-builder.js +1 -1
  609. package/dist/domain/domain-context/domain-context-systems.d.ts +3 -5
  610. package/dist/domain/domain-context/index.d.ts +0 -1
  611. package/dist/domain/domain-context/index.js +1 -1
  612. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
  613. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  614. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  615. package/dist/domain/domain-runtime/domain-context/actions.d.ts +4 -0
  616. package/dist/domain/domain-runtime/domain-context/actions.js +1 -1
  617. package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +9 -1
  618. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  619. package/dist/domain/domain-runtime/domain-context/index.d.ts +0 -1
  620. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +6 -4
  621. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  622. package/dist/domain/domain-runtime/domain-context/types.d.ts +8 -4
  623. package/dist/domain/domain-runtime/domain-runtime.d.ts +27 -13
  624. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  625. package/dist/domain/domain-runtime/environment/actions.d.ts +1 -0
  626. package/dist/domain/domain-runtime/environment/actions.js +1 -1
  627. package/dist/domain/domain-runtime/environment/initialize.js +1 -1
  628. package/dist/domain/domain-runtime/environment/selectors.d.ts +2 -0
  629. package/dist/domain/domain-runtime/environment/selectors.js +1 -1
  630. package/dist/domain/domain-runtime/environment/types.d.ts +6 -0
  631. package/dist/domain/domain-runtime/spec/index.d.ts +0 -1
  632. package/dist/domain/domain-runtime/spec/index.js +1 -1
  633. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  634. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  635. package/dist/domain/domain-runtime/spec/types.d.ts +12 -10
  636. package/dist/domain/extensions/assistant/assistant-greeting.d.ts +30 -0
  637. package/dist/domain/extensions/assistant/assistant-greeting.js +1 -0
  638. package/dist/domain/extensions/assistant/index.d.ts +1 -0
  639. package/dist/domain/extensions/assistant/index.js +1 -0
  640. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +5 -4
  641. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
  642. package/dist/domain/extensions/index.d.ts +1 -1
  643. package/dist/domain/extensions/index.js +1 -1
  644. package/dist/domain/index.d.ts +1 -1
  645. package/dist/domain/index.js +1 -1
  646. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +13 -6
  647. package/dist/domain/spec/expressions/relation-expression-params.d.ts +1 -1
  648. package/dist/domain/spec/modules/index.d.ts +0 -1
  649. package/dist/domain/spec/modules/index.js +1 -1
  650. package/dist/domain/spec/phx/phx-domain.d.ts +0 -1
  651. package/dist/domain/spec/phx/phx-domain.js +1 -1
  652. package/dist/domain/spec/runtime/application-spec-slice.d.ts +5 -5
  653. package/dist/domain/spec/runtime/application-spec-slice.js +1 -1
  654. package/dist/domain/spec/runtime/create-application.d.ts +5 -2
  655. package/dist/domain/spec/runtime/create-application.js +1 -1
  656. package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +2 -2
  657. package/dist/domain/spec/sections/actions.d.ts +3 -2
  658. package/dist/domain/spec/sections/app-metadata.d.ts +13 -0
  659. package/dist/domain/spec/sections/assistant/assistant-features.d.ts +13 -0
  660. package/dist/domain/spec/sections/assistant/assistant-features.js +1 -0
  661. package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +35 -2
  662. package/dist/domain/spec/sections/assistant/assistant-navigation.d.ts +21 -0
  663. package/dist/domain/spec/sections/assistant/assistant-navigation.js +1 -0
  664. package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +55 -13
  665. package/dist/domain/spec/sections/assistant/assistant-select.d.ts +12 -0
  666. package/dist/domain/spec/sections/assistant/assistant-select.js +1 -0
  667. package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +10 -26
  668. package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -1
  669. package/dist/domain/spec/sections/assistant/index.d.ts +5 -2
  670. package/dist/domain/system-components/index.d.ts +1 -0
  671. package/dist/domain/system-components/index.js +1 -1
  672. package/dist/domain/system-components/navigation/index.d.ts +1 -0
  673. package/dist/domain/system-components/navigation/index.js +1 -0
  674. package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
  675. package/dist/domain/system-components/navigation/view-controls.js +1 -0
  676. package/dist/editor/Editor.d.ts +5 -0
  677. package/dist/editor/Editor.js +1 -1
  678. package/dist/editor/EditorMode.d.ts +2 -0
  679. package/dist/editor/EditorMode.js +1 -1
  680. package/dist/editor/agent-mode/AgentModeBridge.d.ts +10 -0
  681. package/dist/editor/agent-mode/AgentModeBridge.js +1 -0
  682. package/dist/editor/agent-mode/agent-at-work-fonts.d.ts +2 -0
  683. package/dist/editor/agent-mode/agent-at-work-fonts.js +1 -0
  684. package/dist/editor/console-reporter/BrowserConsoleReporter.js +1 -1
  685. package/dist/editor/console-reporter/console-capture.d.ts +20 -0
  686. package/dist/editor/console-reporter/console-capture.js +1 -0
  687. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  688. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  689. package/dist/editor/domain-editors/use-implementation-files.d.ts +4 -3
  690. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  691. package/dist/editor/index.d.ts +1 -0
  692. package/dist/editor/index.js +1 -1
  693. package/dist/editor/variants/VariantAnswerFooter.d.ts +8 -1
  694. package/dist/editor/variants/VariantAnswerFooter.js +1 -1
  695. package/dist/editor/variants/VariantPageUnavailable.d.ts +5 -0
  696. package/dist/editor/variants/VariantPageUnavailable.js +1 -0
  697. package/dist/editor/variants/VariantPreviewHandler.js +1 -1
  698. package/dist/editor/variants/variant-preview-fonts.d.ts +2 -0
  699. package/dist/editor/variants/variant-preview-fonts.js +1 -0
  700. package/dist/editor/variants/variant-preview-styles.d.ts +40 -48
  701. package/dist/editor/variants/variant-preview-styles.js +493 -1
  702. package/dist/extras/clerk/index.d.ts +6 -0
  703. package/dist/extras/cognito/AccountAvatar.d.ts +7 -0
  704. package/dist/extras/cognito/AccountAvatar.js +1 -0
  705. package/dist/extras/cognito/AccountControl.d.ts +13 -0
  706. package/dist/extras/cognito/AccountControl.js +1 -0
  707. package/dist/extras/cognito/AdminSignInPage.d.ts +26 -0
  708. package/dist/extras/cognito/AdminSignInPage.js +1 -0
  709. package/dist/extras/cognito/CognitoSignInPage.d.ts +8 -0
  710. package/dist/extras/cognito/CognitoSignInPage.js +1 -0
  711. package/dist/extras/cognito/ConfiguratorSignInPage.d.ts +19 -0
  712. package/dist/extras/cognito/ConfiguratorSignInPage.js +1 -0
  713. package/dist/extras/cognito/SignInFailurePage.d.ts +11 -0
  714. package/dist/extras/cognito/SignInFailurePage.js +1 -0
  715. package/dist/extras/cognito/SignInGateLayout.d.ts +25 -0
  716. package/dist/extras/cognito/SignInGateLayout.js +1 -0
  717. package/dist/extras/cognito/SignInNotice.d.ts +8 -0
  718. package/dist/extras/cognito/SignInNotice.js +1 -0
  719. package/dist/extras/cognito/index.d.ts +5 -0
  720. package/dist/extras/cognito/index.js +1 -0
  721. package/dist/globals/index.d.ts +5 -0
  722. package/dist/i18n/locales/cs/messages.js +1 -1
  723. package/dist/i18n/locales/da/messages.js +1 -1
  724. package/dist/i18n/locales/de/messages.js +1 -1
  725. package/dist/i18n/locales/de-AT/messages.js +1 -1
  726. package/dist/i18n/locales/en/messages.js +1 -1
  727. package/dist/i18n/locales/en-AU/messages.js +1 -1
  728. package/dist/i18n/locales/en-GB/messages.js +1 -1
  729. package/dist/i18n/locales/es/messages.js +1 -1
  730. package/dist/i18n/locales/fr/messages.js +1 -1
  731. package/dist/i18n/locales/hu/messages.js +1 -1
  732. package/dist/i18n/locales/it/messages.js +1 -1
  733. package/dist/i18n/locales/nl/messages.js +1 -1
  734. package/dist/i18n/locales/pl/messages.js +1 -1
  735. package/dist/i18n/locales/pt/messages.js +1 -1
  736. package/dist/i18n/locales/ro/messages.js +1 -1
  737. package/dist/i18n/locales/sk/messages.js +1 -1
  738. package/dist/i18n/locales/tr/messages.js +1 -1
  739. package/dist/legacy/deployment-cli/commands/create-environment.js +1 -1
  740. package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
  741. package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
  742. package/dist/legacy/domain-cli/gen/configurator-builder.js +5 -4
  743. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  744. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  745. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +25 -3
  746. package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
  747. package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
  748. package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
  749. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  750. package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
  751. package/dist/phoenix/application-spec/application-spec-builder.d.ts +2 -2
  752. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  753. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +2 -1
  754. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  755. package/dist/phoenix/application-spec/generate-project-files.d.ts +4 -3
  756. package/dist/phoenix/application-spec/generate-project-files.js +1 -1
  757. package/dist/phoenix/application-spec/index.d.ts +2 -1
  758. package/dist/phoenix/application-spec/index.js +1 -1
  759. package/dist/phoenix/application-spec/read-spec-project.d.ts +1 -2
  760. package/dist/phoenix/application-spec/read-spec-project.js +1 -1
  761. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +10 -2
  762. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  763. package/dist/phoenix/cli.js +1 -1
  764. package/dist/phoenix/commands/account/index.d.ts +1 -0
  765. package/dist/phoenix/commands/account/index.js +1 -0
  766. package/dist/phoenix/commands/account/whoami.d.ts +10 -0
  767. package/dist/phoenix/commands/account/whoami.js +4 -0
  768. package/dist/phoenix/commands/build.d.ts +2 -1
  769. package/dist/phoenix/commands/build.js +1 -1
  770. package/dist/phoenix/commands/clean.d.ts +2 -1
  771. package/dist/phoenix/commands/clean.js +1 -1
  772. package/dist/phoenix/commands/cleanup-environment.js +1 -1
  773. package/dist/phoenix/commands/deploy.d.ts +7 -2
  774. package/dist/phoenix/commands/deploy.js +9 -3
  775. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  776. package/dist/phoenix/commands/deps/deps.js +2 -2
  777. package/dist/phoenix/commands/dev.d.ts +2 -1
  778. package/dist/phoenix/commands/dev.js +4 -4
  779. package/dist/phoenix/commands/feedback.d.ts +2 -2
  780. package/dist/phoenix/commands/feedback.js +1 -1
  781. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  782. package/dist/phoenix/commands/index.d.ts +1 -0
  783. package/dist/phoenix/commands/index.js +1 -1
  784. package/dist/phoenix/commands/init-starter-spec.js +3 -4
  785. package/dist/phoenix/commands/init.d.ts +2 -2
  786. package/dist/phoenix/commands/init.js +1 -1
  787. package/dist/phoenix/commands/login.d.ts +6 -3
  788. package/dist/phoenix/commands/login.js +3 -3
  789. package/dist/phoenix/commands/logout.js +1 -1
  790. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  791. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  792. package/dist/phoenix/commands/sync.d.ts +2 -1
  793. package/dist/phoenix/commands/sync.js +1 -1
  794. package/dist/phoenix/services/application-spec-project-watcher.d.ts +3 -1
  795. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  796. package/dist/phoenix/services/cli-credentials.d.ts +26 -7
  797. package/dist/phoenix/services/cli-credentials.js +2 -2
  798. package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
  799. package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
  800. package/dist/phoenix/services/cli-server/index.d.ts +2 -0
  801. package/dist/phoenix/services/cli-server/index.js +1 -0
  802. package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +19 -0
  803. package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
  804. package/dist/phoenix/services/dev-experience/dev-experience.d.ts +31 -0
  805. package/dist/phoenix/services/dev-experience/dev-experience.js +1 -0
  806. package/dist/phoenix/services/dev-experience/index.d.ts +3 -0
  807. package/dist/phoenix/services/dev-experience/index.js +1 -0
  808. package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.d.ts +7 -0
  809. package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.js +1 -0
  810. package/dist/phoenix/services/dev-experience/regenerated-page-experience.d.ts +24 -0
  811. package/dist/phoenix/services/dev-experience/regenerated-page-experience.js +1 -0
  812. package/dist/phoenix/services/development-credential.js +1 -1
  813. package/dist/phoenix/services/frontend-config.d.ts +2 -0
  814. package/dist/phoenix/services/index.d.ts +6 -3
  815. package/dist/phoenix/services/index.js +1 -1
  816. package/dist/phoenix/services/phoenix-pubsub.d.ts +4 -0
  817. package/dist/phoenix/services/phoenix-regions.d.ts +6 -1
  818. package/dist/phoenix/services/phoenix-regions.js +1 -1
  819. package/dist/phoenix/services/prepare-development-environment.js +2 -2
  820. package/dist/phoenix/services/session/phoenix-application.d.ts +2 -1
  821. package/dist/phoenix/services/session/phoenix-application.js +2 -2
  822. package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
  823. package/dist/phoenix/services/signed-in-development-environment.js +1 -1
  824. package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
  825. package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
  826. package/dist/phoenix/services/spec-project/index.d.ts +3 -0
  827. package/dist/phoenix/services/spec-project/index.js +1 -0
  828. package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
  829. package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
  830. package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
  831. package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
  832. package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
  833. package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
  834. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -1
  835. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +1 -1
  836. package/dist/phoenix/services/telemetry/telemetry-state.js +1 -1
  837. package/dist/phoenix/services/variant-file-session.js +1 -1
  838. package/dist/phoenix/services/vite-config.d.ts +2 -1
  839. package/dist/phoenix/services/vite-config.js +1 -1
  840. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  841. package/dist/react-sdk/application-runtime/common-services/index.d.ts +1 -0
  842. package/dist/react-sdk/application-runtime/common-services/index.js +1 -1
  843. package/dist/react-sdk/application-runtime/common-services/selectors.d.ts +2 -0
  844. package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
  845. package/dist/react-sdk/application-runtime/common-services/webmcp/index.d.ts +3 -0
  846. package/dist/react-sdk/application-runtime/common-services/webmcp/index.js +1 -0
  847. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.d.ts +35 -0
  848. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.js +1 -0
  849. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.d.ts +44 -0
  850. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.js +1 -0
  851. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.d.ts +24 -0
  852. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.js +1 -0
  853. package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.d.ts +7 -1
  854. package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.js +1 -1
  855. package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.d.ts +6 -0
  856. package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.js +1 -1
  857. package/dist/react-sdk/application-runtime/domain-application-context/domain-application-systems.d.ts +2 -2
  858. package/dist/react-sdk/application-runtime/domain-application-context/selectors.d.ts +1 -3
  859. package/dist/react-sdk/application-runtime/domain-application-context/selectors.js +1 -1
  860. package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
  861. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  862. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +2 -0
  863. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -1
  864. package/dist/react-sdk/application-runtime/hooks/use-environment.d.ts +7 -0
  865. package/dist/react-sdk/application-runtime/hooks/use-environment.js +1 -1
  866. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  867. package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.d.ts +7 -0
  868. package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.js +1 -0
  869. package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +2 -2
  870. package/dist/react-sdk/application-runtime/integration/integration-mode.d.ts +30 -0
  871. package/dist/react-sdk/application-runtime/integration/integration-mode.js +1 -1
  872. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  873. package/dist/react-sdk/application-runtime/responsive/actions.d.ts +6 -0
  874. package/dist/react-sdk/application-runtime/responsive/actions.js +1 -1
  875. package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -1
  876. package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -1
  877. package/dist/react-sdk/application-runtime/responsive/types.d.ts +9 -0
  878. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +48 -18
  879. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  880. package/dist/react-sdk/application-runtime/session/actions.d.ts +2 -1
  881. package/dist/react-sdk/application-runtime/session/actions.js +1 -1
  882. package/dist/react-sdk/application-runtime/session/initialize.js +1 -1
  883. package/dist/react-sdk/application-runtime/session/selectors.d.ts +2 -0
  884. package/dist/react-sdk/application-runtime/session/selectors.js +1 -1
  885. package/dist/react-sdk/application-runtime/session/session-service.d.ts +34 -1
  886. package/dist/react-sdk/application-runtime/session/session-service.js +1 -1
  887. package/dist/react-sdk/application-runtime/session/session-token.d.ts +8 -0
  888. package/dist/react-sdk/application-runtime/session/session-token.js +1 -1
  889. package/dist/react-sdk/application-runtime/session/types.d.ts +6 -1
  890. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -2
  891. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +1 -1
  892. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
  893. package/dist/react-sdk/domain-context/index.d.ts +3 -2
  894. package/dist/react-sdk/domain-context/index.js +1 -1
  895. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +1 -5
  896. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -1
  897. package/dist/react-sdk/domain-context/system-hooks/generate-share-link.d.ts +25 -0
  898. package/dist/react-sdk/domain-context/system-hooks/generate-share-link.js +1 -0
  899. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
  900. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  901. package/dist/react-sdk/preset-selection/PresetSelectionProvider.d.ts +11 -0
  902. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
  903. package/dist/react-sdk/preset-selection/PresetWebMcpTools.d.ts +14 -0
  904. package/dist/react-sdk/preset-selection/PresetWebMcpTools.js +1 -0
  905. package/dist/react-sdk/preset-selection/index.d.ts +2 -1
  906. package/dist/react-sdk/preset-selection/index.js +1 -1
  907. package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.d.ts +31 -0
  908. package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.js +1 -0
  909. package/dist/react-sdk/session/AccessDeniedAdminPage.d.ts +13 -0
  910. package/dist/react-sdk/session/AccessDeniedAdminPage.js +1 -0
  911. package/dist/react-sdk/session/AccessDeniedPage.d.ts +20 -0
  912. package/dist/react-sdk/session/AccessDeniedPage.js +1 -0
  913. package/dist/react-sdk/session/ConfiguratorUnavailablePage.d.ts +5 -0
  914. package/dist/react-sdk/session/ConfiguratorUnavailablePage.js +1 -0
  915. package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
  916. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  917. package/dist/react-sdk/session/index.d.ts +3 -0
  918. package/dist/react-sdk/session/index.js +1 -1
  919. package/dist/react-sdk/session/sign-in-address.d.ts +13 -0
  920. package/dist/react-sdk/session/sign-in-address.js +1 -0
  921. package/dist/react-sdk/session/studio-frame.d.ts +7 -0
  922. package/dist/react-sdk/session/studio-frame.js +1 -0
  923. package/dist/react-sdk/session/use-sign-in.d.ts +50 -0
  924. package/dist/react-sdk/session/use-sign-in.js +1 -0
  925. package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
  926. package/dist/ui-sdk/components/preview/Preview.js +2 -2
  927. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +3 -2
  928. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  929. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
  930. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
  931. package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
  932. package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
  933. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
  934. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
  935. package/dist/ui-sdk/icons/__generated/Microphone.d.ts +3 -0
  936. package/dist/ui-sdk/icons/__generated/Microphone.js +1 -0
  937. package/dist/ui-sdk/icons/__generated/MicrophoneSlash.d.ts +3 -0
  938. package/dist/ui-sdk/icons/__generated/MicrophoneSlash.js +1 -0
  939. package/dist/ui-sdk/icons/__generated/SpeakerHigh.d.ts +3 -0
  940. package/dist/ui-sdk/icons/__generated/SpeakerHigh.js +1 -0
  941. package/dist/ui-sdk/icons/__generated/SpeakerSlash.d.ts +3 -0
  942. package/dist/ui-sdk/icons/__generated/SpeakerSlash.js +1 -0
  943. package/dist/ui-sdk/icons/__generated/Stop.d.ts +3 -0
  944. package/dist/ui-sdk/icons/__generated/Stop.js +1 -0
  945. package/dist/ui-sdk/icons/__generated/index.d.ts +10 -0
  946. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  947. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  948. package/dist/ui-sdk/theme/types.d.ts +0 -4
  949. package/dist/webhook/builders/auth-handler-builder.d.ts +24 -1
  950. package/dist/webhook/builders/auth-handler-builder.js +1 -1
  951. package/dist/webhook/builders/common.d.ts +14 -3
  952. package/dist/webhook/builders/webhook-builder.d.ts +18 -0
  953. package/dist/webhook/builders/webhook-builder.js +1 -1
  954. package/package.json +11 -4
  955. package/schema/domain-spec.json +444 -65
  956. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.d.ts +0 -2
  957. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.js +0 -1
  958. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +0 -2
  959. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +0 -25
  960. package/dist/configurator/ui/assistant/annotation/annotation-host-context.d.ts +0 -5
  961. package/dist/configurator/ui/assistant/annotation/annotation-host-context.js +0 -1
  962. package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
  963. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -9
  964. package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
  965. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -10
  966. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
  967. package/dist/configurator/ui/assistant/theme.d.ts +0 -2
  968. package/dist/configurator/ui/assistant/theme.js +0 -1
  969. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +0 -1
  970. package/dist/domain/core/action/action-factory.d.ts +0 -11
  971. package/dist/domain/domain-context/action-system/action-system.d.ts +0 -38
  972. package/dist/domain/domain-context/action-system/action-system.js +0 -1
  973. package/dist/domain/domain-context/action-system/index.d.ts +0 -1
  974. package/dist/domain/domain-context/action-system/index.js +0 -1
  975. package/dist/domain/domain-runtime/domain-context/action-context.d.ts +0 -11
  976. package/dist/domain/extensions/view-controls.d.ts +0 -25
  977. package/dist/domain/extensions/view-controls.js +0 -1
  978. package/dist/domain/spec/modules/resolve-action-modules.js +0 -1
  979. /package/dist/{domain/domain-runtime/domain-context/action-context.js → application-spec/parse-application-files/access/analyzed-file.js} +0 -0
  980. /package/dist/{domain/core/action → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
@@ -46,4 +46,4 @@ const PresetScreen = () => {
46
46
  export default phx.frontend.createPresetUi(PresetScreen)
47
47
  \`\`\`
48
48
 
49
- The app loader is as short: \`export default phx.frontend.createAppLoader(({ phases }) => <span role="status">{phases[0]?.label ?? 'Loading…'}</span>)\`.`;export const generatePhoenixProjectPagesFeature=()=>e({path:"features/custom-layout/pages.md",title:"Project pages",summary:"Replacing the preset screen and its action and overlay, the app loader, the not-authenticated, not-found and error pages, and the assistant's form elements; read when branding the first moments or the failure pages, or when the assistant needs a project form element.",whenToUse:"Read when a page outside the loaded configuration should carry the brand, such as the preset screen, the loader or a failure page, or when the assistant should offer a form element of the project.",capabilities:"Each page below is an element: default-export its registration from a file in `src/elements/`.\n\n### Preset screen\n\n- The preset screen shows at the start when there is more than one preset; with a single preset the configuration starts at once.\n- `phx.frontend.createPresetUi(Component)` replaces the whole screen. The built-in screen's categories, close button, action, overlay and empty state go with it.\n- Inside it, `phx.frontend.usePresetSelection()` returns `{ presetCategories, hasMultiplePresets, selectPreset, creatingPresetId, selectionError }`.\n- A category is `{ id, name, description?, img?, imgAlt?, presets }`; a preset is `{ id, name, description?, img?, imgAlt?, detailTitle?, detailDescription? }`. Texts are `Localizable`: resolve them with `phx.frontend.useResolveLocalizable()`.\n- `img` is a resource path: turn it into a URL with `useResourceUrl().getResourceUrl(img)` from `@salsita-ai/sdk/react`, as the built-in screen does.\n- `selectPreset(id)` creates the configuration and opens it. While `creatingPresetId` is set, mark that card busy and disable the others.\n- `selectionError` is the last failed creation: show it. In production with several presets the failure is also a snackbar, so mount `PresetSnackbarsRoot` from `@salsita-ai/sdk/configurator`, or it renders outside the configurator.\n- Keep the preview branch. While `phx.frontend.usePreview().isPreview` is `true`, return `PresetPreviewLayout` from `@salsita-ai/sdk/configurator` with `title` and `startButtonLabel`. Without it, a phone embed with `preview: auto` never expands and shows the whole screen in the collapsed preview.\n- With no categories, for example when the host's `presetTags` match none, the built-in screen shows the not-found page; a replacement decides itself.\n- What a preset is and how to declare one belongs to [Presets](../application-states/presets.md).\n\n### Preset action and overlay\n\nThese fill the built-in preset screen only; a `createPresetUi` screen renders its own instead.\n\n- `phx.frontend.createPresetPageAction(Component)` adds content below the cards, such as a link to request an unlisted product.\n- `phx.frontend.createPresetDeviceNotSupported(Component)` adds an overlay, such as a notice that the configurator works best on a larger screen.\n- The overlay renders as the last child of the screen, not over the cards, and at every width: make it a dialog or position it, and gate it on the condition it is for.\n\n### App loader\n\n- `phx.frontend.createAppLoader(({ phases }) => …)` replaces what the loading overlay shows. Phoenix keeps the overlay, its place over the safe area and its fade.\n- `phases` are the running loading phases, each `{ id, label?, progress? }` with `progress` from 0 to 1. The list can be empty while the loader waits for the scene.\n- The loader covers the session, the data, the configuration and the scene; it waits for the scene only when the layout mounts `LayoutSlots.SharedCanvas` ([Scene and safe area](scene-and-safe-area.md)).\n- `phx.frontend.useLoadingStateValue()` returns `{ isLoading, hasError, phases, expectedPhaseIds }` for loader content that needs more than `phases`.\n- `phx.frontend.useLoadingState()` returns `{ startPhase, endPhase }`, or `null` outside the loader's host. `startPhase({ id, label, progress })` holds the overlay for the project's own loading step; calling it again with the same `id` updates it.\n- End every started phase with `endPhase(id)`, on failure and on unmount too, or the overlay never leaves.\n- A top-level `appLoader: legacy` in the spec turns the overlay off.\n\n### Failure pages\n\n- `phx.frontend.createNotAuthenticatedPage(Component)` — shown when session authentication fails, and to an anonymous visitor of the start page when `acl.canCreate` excludes `anonymous`. It gets no props. Its default renders the not-found page, so a project not-found page shows there too.\n- `phx.frontend.createConfigurationNotFoundPage(({ onBack }) => …)` — shown when a configuration fails to load, is opened without a valid access key, or a signed-in role may not create one. Offer a way back only when the optional `onBack` is set.\n- `phx.frontend.createConfiguratorErrorPage(({ reason, onRetry }) => …)` — the production error page. `reason` is `'uncaughtError'` or `'presetCreationFailed'` (the single preset failed to start); `onRetry` renders again or reloads.\n- Development shows detailed error pages instead, so check the error page in a production build. A page that throws falls back to the built-in one.\n- Use these helpers rather than `createCustomPhoenixLayoutElement` with the element's name: only the helpers type the props.\n\n### Assistant form elements\n\n- Declare an element under `assistant.formElements.<name>` with `description` (what the model reads), `role` (`group`, `choice`, `choices`, `option` or `input`), optional scalar `attributes` and `required`. Names are lowercase, such as `ralcolor`.\n- Implement it in one file: `export default phx.frontend.createAssistantFormElement('name', Component)`.\n- The name types the props by role through the global `AssistantFormElementProps<'name', STATE>`. Every element gets `attributes`, `label` and `disabled`; an option reports with `onSelect(answer)`, an input with `onChange(state, answer)`, and a container renders `children`.\n- A declared element without a registration, one registered twice, or a registration without a declaration stops the application with an implementation error, at start and on hot reload.",example:t,documentation:'Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/layouts/presets/custom.mdx` — the complete branded preset screen with search and the preview branch.\n- `docs/layouts/presets/action-and-overlay.mdx` — the action and the overlay of the built-in screen.\n- `docs/phoenix/configurator-interface.mdx` — "Preset UI", "Configuration Not Found Page", "Configurator Error Page" and "App Loader".\n- `docs/other-features/not-found-404.mdx`, `docs/other-features/error-5xx.mdx` — worked failure pages.\n- `docs/ux-guidelines/presets.mdx` — what a good preset screen offers.',phxMembers:["frontend.createPresetUi","frontend.usePresetSelection","frontend.createPresetPageAction","frontend.createPresetDeviceNotSupported","frontend.createAppLoader","frontend.useLoadingState","frontend.useLoadingStateValue","frontend.createNotAuthenticatedPage","frontend.createConfigurationNotFoundPage","frontend.createConfiguratorErrorPage","frontend.createAssistantFormElement"]});
49
+ The app loader is as short: \`export default phx.frontend.createAppLoader(({ phases }) => <span role="status">{phases[0]?.label ?? 'Loading…'}</span>)\`.`;export const generatePhoenixProjectPagesFeature=()=>e({path:"features/custom-layout/pages.md",title:"Project pages",summary:"Replacing the preset screen and its action and overlay, the app loader, and the not-authenticated, not-found and error pages; read when branding the first moments or the failure pages.",whenToUse:"Read when a page outside the loaded configuration should carry the brand, such as the preset screen, the loader or a failure page.",capabilities:"Each page below is an element: default-export its registration from a file in `src/elements/`.\n\n### Preset screen\n\n- The preset screen shows at the start when there is more than one preset; with a single preset the configuration starts at once.\n- `phx.frontend.createPresetUi(Component)` replaces the whole screen. The built-in screen's categories, close button, action, overlay and empty state go with it.\n- Inside it, `phx.frontend.usePresetSelection()` returns `{ presetCategories, hasMultiplePresets, selectPreset, createFromPreset, creatingPresetId, selectionError }`.\n- A category is `{ id, name, description?, img?, imgAlt?, presets }`; a preset is `{ id, name, description?, img?, imgAlt?, detailTitle?, detailDescription? }`. Texts are `Localizable`: resolve them with `phx.frontend.useResolveLocalizable()`.\n- `img` is a resource path: turn it into a URL with `useResourceUrl().getResourceUrl(img)` from `@salsita-ai/sdk/react`, as the built-in screen does.\n- `selectPreset(id)` creates the configuration and opens it. While `creatingPresetId` is set, mark that card busy and disable the others.\n- `selectionError` is the last failed creation: show it. In production with several presets the failure is also a snackbar, so mount `PresetSnackbarsRoot` from `@salsita-ai/sdk/configurator`, or it renders outside the configurator.\n- Keep the preview branch. While `phx.frontend.usePreview().isPreview` is `true`, return `PresetPreviewLayout` from `@salsita-ai/sdk/configurator` with `title` and `startButtonLabel`. Without it, a phone embed with `preview: auto` never expands and shows the whole screen in the collapsed preview.\n- With no categories, for example when the host's `presetTags` match none, the built-in screen shows the not-found page; a replacement decides itself.\n- What a preset is and how to declare one belongs to [Presets](../application-states/presets.md).\n\n### Preset action and overlay\n\nThese fill the built-in preset screen only; a `createPresetUi` screen renders its own instead.\n\n- `phx.frontend.createPresetPageAction(Component)` adds content below the cards, such as a link to request an unlisted product.\n- `phx.frontend.createPresetDeviceNotSupported(Component)` adds an overlay, such as a notice that the configurator works best on a larger screen.\n- The overlay renders as the last child of the screen, not over the cards, and at every width: make it a dialog or position it, and gate it on the condition it is for.\n\n### App loader\n\n- `phx.frontend.createAppLoader(({ phases }) => …)` replaces what the loading overlay shows. Phoenix keeps the overlay, its place over the safe area and its fade.\n- `phases` are the running loading phases, each `{ id, label?, progress? }` with `progress` from 0 to 1. The list can be empty while the loader waits for the scene.\n- The loader covers the session, the data, the configuration and the scene; it waits for the scene only when the layout mounts `LayoutSlots.SharedCanvas` ([Scene and safe area](scene-and-safe-area.md)).\n- `phx.frontend.useLoadingStateValue()` returns `{ isLoading, hasError, phases, expectedPhaseIds }` for loader content that needs more than `phases`.\n- `phx.frontend.useLoadingState()` returns `{ startPhase, endPhase }`, or `null` outside the loader's host. `startPhase({ id, label, progress })` holds the overlay for the project's own loading step; calling it again with the same `id` updates it.\n- End every started phase with `endPhase(id)`, on failure and on unmount too, or the overlay never leaves.\n- A top-level `appLoader: legacy` in the spec turns the overlay off.\n\n### Failure pages\n\n- `phx.frontend.createNotAuthenticatedPage(Component)` — shown when session authentication fails, and to an anonymous visitor of the start page when `acl.canCreate` excludes `anonymous`. It gets no props. Its default renders the not-found page, so a project not-found page shows there too.\n- `phx.frontend.createConfigurationNotFoundPage(({ onBack }) => …)` — shown when a configuration fails to load, is opened without a valid access key, or a signed-in role may not create one. Offer a way back only when the optional `onBack` is set.\n- `phx.frontend.createConfiguratorErrorPage(({ reason, onRetry }) => …)` — the production error page. `reason` is `'uncaughtError'` or `'presetCreationFailed'` (the single preset failed to start); `onRetry` renders again or reloads.\n- Development shows detailed error pages instead, or in agent mode the \"Agent at work\" screen, so check the error page in a production build. A page that throws falls back to the built-in one.\n- Use these helpers rather than `createCustomPhoenixLayoutElement` with the element's name: only the helpers type the props.\n",example:t,documentation:'Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/layouts/presets/custom.mdx` — the complete branded preset screen with search and the preview branch.\n- `docs/layouts/presets/action-and-overlay.mdx` — the action and the overlay of the built-in screen.\n- `docs/phoenix/configurator-interface.mdx` — "Preset UI", "Configuration Not Found Page", "Configurator Error Page" and "App Loader".\n- `docs/other-features/not-found-404.mdx`, `docs/other-features/error-5xx.mdx` — worked failure pages.\n- `docs/ux-guidelines/presets.mdx` — what a good preset screen offers.',phxMembers:["frontend.createPresetUi","frontend.usePresetSelection","frontend.createPresetPageAction","frontend.createPresetDeviceNotSupported","frontend.createAppLoader","frontend.useLoadingState","frontend.useLoadingStateValue","frontend.createNotAuthenticatedPage","frontend.createConfigurationNotFoundPage","frontend.createConfiguratorErrorPage"]});
@@ -0,0 +1,3 @@
1
+ import { type PhoenixGuide } from '../../guide.js';
2
+ /** The Studio-account sign-in in the browser: its pages, the account control and the hook a project's own builds on. */
3
+ export declare const generatePhoenixSignInFeature: () => PhoenixGuide;
@@ -0,0 +1,19 @@
1
+ import{createPhoenixFeatureGuide as e}from"../../guide.js";let n=`A toolbar that offers sign-in to visitors and names the dealer signed in:
2
+
3
+ \`\`\`tsx
4
+ // src/elements/Toolbar.tsx
5
+ import { AccountControl } from '@salsita-ai/sdk/extras/cognito'
6
+
7
+ const Toolbar = () => {
8
+ const { person } = phx.frontend.useSignIn()
9
+
10
+ return (
11
+ <header style={{ display: 'flex', justifyContent: 'space-between', padding: 8 }}>
12
+ <span>{person ? 'Dealer prices' : 'Retail prices'}</span>
13
+ <AccountControl />
14
+ </header>
15
+ )
16
+ }
17
+
18
+ export default phx.frontend.createCustomPhoenixLayoutElement('Toolbar', Toolbar)
19
+ \`\`\``;export const generatePhoenixSignInFeature=()=>e({path:"features/custom-layout/sign-in.md",title:"Sign-in pages and account control",summary:"The Studio-account sign-in in the browser: the built-in sign-in and access-denied pages, the account control of Public with sign-in, and `useSignIn` for a project's own; read when people sign in to the configurator or its admin.",whenToUse:"Read when the configurator or its admin signs people in with Studio accounts, when visitors should be able to sign in, or when a sign-in or access-denied page should carry the brand.",capabilities:"This guide applies in the Studio-account access modes, `invited`, `public-with-sign-in` and `public` ([Authentication](../webhooks/authentication.md)).\n\n### Built-in pages\n\n- Generated code registers them by itself: the configurator's sign-in page in `invited` and `public-with-sign-in`, the admin's in all three. The spec's `pageTitle` names the project on them.\n- Sign-in is a redirect to Studio's form, never a password field on the configurator's address. The page leaves straight away and shows its button after a sign-out, after a sign-in that did not finish, and when the sign-in is unavailable right now. In Studio's frame the pages and the control render nothing.\n- A refused account sees the access-denied page with \"Sign in with another account\", and with the account when the person is a member of the project's workspace; anyone else is refused without being named. It is refused when it is not invited, or when the project's signed-in handler returned `{ allow: false }`. The admin's tells a person without the Admin role so and offers the configurator.\n- Replace a page by default-exporting a registration from `src/elements/`:\n - `phx.frontend.createAccessDeniedPage(({ projectName }) => …)` — the configurator's access-denied page.\n - `phx.frontend.admin.createAccessDeniedAdminPage(({ projectName }) => …)` — the admin's, from `src/admin/elements/`.\n - `phx.frontend.createNotAuthenticatedPage(Component)` — the configurator's whole sign-in page ([Project pages](pages.md)).\n\n### Account control\n\n- In `public-with-sign-in` visitors use the configurator and sign in only by choice, so place `<AccountControl />` from `@salsita-ai/sdk/extras/cognito` in the layout, such as in its toolbar. Without it, or a control built on `useSignIn`, parsing reports `SIGN_IN_CONTROL_NOT_PLACED`.\n- A visitor sees Sign in. A signed-in person sees their name, or their email when their Studio account has no name, with a menu holding the email and Sign out. Sign out ends this configurator's sign-in, and the person continues as a visitor.\n- A sign-in that did not finish, or a refused account, leaves the person a visitor, and the control says so under its button. To show that note in the page instead, place `<SignInNotice />` and set `<AccountControl notice={false} />`.\n- A visitor who signs in comes back to the same configuration: signing in saves its latest change first.\n\n### useSignIn\n\n`phx.frontend.useSignIn()` returns `{ state, person, refusedAccount, failure, signedOut, hidden, signIn, signOut }`:\n\n- `state` — `idle`, `signing-in`, `refused` or `failed`.\n- `person` — `{ email, name }` of the person signed in, `null` for a visitor; `name` is `null` when the account has none.\n- `refusedAccount` — with `refused`, the account the server named, `null` when it named none.\n- `failure` — with `failed`, `{ reason, message }`: `not-completed` when the person came back without being signed in, `unavailable` when trying again may help.\n- `signedOut` — the person signed out here; a sign-in page waits for a click.\n- `hidden` — render nothing: Studio's frame, or no server.\n- `signIn()` — saves the latest change and leaves for the form; after a sign-out or a refusal the form asks which account continues. `signIn({ anotherAccount: true })` asks it too while the person is signed in, for a \"Sign in with another account\" button. `signOut()` ends the sign-in.",example:n,documentation:"Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/phoenix/sessions-and-access.mdx` — sessions, roles and the Studio-account sign-in.",phxMembers:["frontend.useSignIn","frontend.createAccessDeniedPage"]});
@@ -71,4 +71,4 @@ const DeskPanel = () => {
71
71
 
72
72
  return deskId !== null && !accessInfo.viewMode ? <DeskControls deskId={deskId} /> : null
73
73
  }
74
- \`\`\``;export const generatePhoenixCustomControlsFeature=()=>e({path:"features/domain-controls/custom-controls.md",title:"Custom controls",summary:"The project's own React element per control: where the file lives, registering spec-named elements, mounting it for the selected entity, read mode and the write path; read when rendering a control component.",whenToUse:"Read when a control component needs its UI: a panel in the project layout, a control next to a part on the product, or a change no single control component makes. [Control hooks](control-hooks.md) lists the hooks by job; [Updates and dry runs](../state/updates.md) covers writing the store directly.",capabilities:"### One element per control\n\n- Render each control component with the project's own React element, built from its control hook ([Control hooks](control-hooks.md)): `phx.frontend.useAttributeSelection(entityId, 'frameColor')` for an `attributeSelection` instance named `frameColor`, and so on.\n- Take a typed entity id as a prop, such as `Desk['id']`. Entity types are global in a project, like `phx`.\n- Group the elements of one entity type in a panel component when the layout shows them together.\n\n### Where the file lives\n\n- **Rendered by the layout** — a plain component in an underscore folder, such as `src/_shared/DeskControls.tsx`, with a named export. The layout imports it with a relative `.js` path. It needs no registration: the control hooks work anywhere inside the `ConfiguratorLayout`.\n- **Named by the spec** — an element that an `htmlHotspot`, `sceneEntityObjectHtmlHotspot` or `sceneEntityControl` names ([Scene controls](scene-controls.md)). Default-export `phx.frontend.createCustomPhoenixEntityElement('Name', ({ entityId }) => …)` from `src/elements/`; a file may export an array of registrations instead. It must return an element, `<></>` for nothing.\n- Every file in `src/elements/` outside an underscore folder must default-export a registration, so keep plain components out of it. An unregistered name in the spec renders a red \"not found\" box.\n- A spec-named element receives only `entityId`, untyped: find the entity in `phx.frontend.useCommittedState().entities` and narrow it by `type` before reading fields or calling the typed hooks. An element registered under a built-in kind name, such as the FAB factories of [Scene controls](scene-controls.md), also receives that kind's YAML props.\n\n### Mount it from the layout\n\n- Read the selected entity with `phx.frontend.useSelectedEntityId(phx.domain.enhancedModel.$Desk)`: the id while a desk is selected, else `null`. With nothing selected the root counts as selected.\n- `phx.frontend.useRootEntityId()` gives the root's id for controls that always show.\n- Render the panel only for an id of the right type, and only while `phx.frontend.useAccessService().accessInfo.viewMode` is `false`: no hook enforces read mode.\n- Mirror any `$filter` of the control component in the same condition, since the hook throws while its instance is filtered out ([Control components](control-components.md)).\n- [Scene and safe area](../custom-layout/scene-and-safe-area.md) has the layout skeleton with such a panel.\n\n### Write anything else\n\nWhen no control hook fits, such as a change to several fields or entities, build the updates with `phx.frontend.updates` ([Updates and dry runs](../state/updates.md)) and let a hook dry-run them:\n\n- `phx.frontend.useUpdatedControl(updates)` returns `{ disabled, hints, update }` for one update list. Memoize the list: every new array is a new dry run.\n- `phx.frontend.useUpdateControl()` returns `prepare(updates)`, which returns the same for each candidate, such as one per button.\n- `update()` stages and commits in one step, one undo entry; `disabled` and `hints` follow [Violations](../state/violations.md). Both hooks take `fixableViolations`, which only hides those types from `hints`.\n- Run a domain action the same way: `prepare(phx.frontend.useDomain().actionSystem.prepareAction(name, args, state).updates)`, with `state` from `phx.frontend.useCommittedState()`. `prepareAction` throws on arguments it rejects, so catch it and show its message; [Actions](../domain-model/actions.md) owns them.\n\n```tsx\nconst control = prepare([\n phx.frontend.updates.DomainEntityModification({\n entityId: deskId,\n stateDelta: { width: 1800, depth: 800 },\n updateTag: 'desk.sizePreset',\n }),\n])\n// <Button disabled={control.disabled} title={control.hints} onClick={control.update}>Large</Button>\n```\n\n### Look native\n\nThe project's element is the default. Inside it, the SDK's control components from `@salsita-ai/sdk/react`, such as `AttributeCardSelector` with `entityId` and `instanceName`, can render one control in the SDK's look, and `PropertyContainer` from `@salsita-ai/sdk/ui` gives section spacing and headings. None of these is on `phx`.",example:t,documentation:'Read each with `pnpm phoenix docs -r <path>`:\n\n- `docs/layouts/custom-layout.mdx` — "Read and change the product" (a control in the layout\'s panel, from `src/_shared/`) and "Put a control on the product" (a hotspot element).\n- `docs/controls/custom.mdx` — `useUpdatedControl` and `useCookedRecipes` in elements; skip its property-page attachment.\n- `docs/other-features/domain-actions.mdx` — "Run it from the UI": an action behind `useUpdateControl`.\n- "Updates Factory" in `docs/phoenix/configurator-interface.mdx` — `useUpdatedControl` and `useUpdateControl` with a worked element.',phxMembers:["frontend.createCustomPhoenixEntityElement","frontend.useUpdateControl","frontend.useUpdatedControl"]});
74
+ \`\`\``;export const generatePhoenixCustomControlsFeature=()=>e({path:"features/domain-controls/custom-controls.md",title:"Custom controls",summary:"The project's own React element per control: where the file lives, registering spec-named elements, mounting it for the selected entity, read mode and the write path; read when rendering a control component.",whenToUse:"Read when a control component needs its UI: a panel in the project layout, a control next to a part on the product, or a change no single control component makes. [Control hooks](control-hooks.md) lists the hooks by job; [Updates and dry runs](../state/updates.md) covers writing the store directly.",capabilities:"### One element per control\n\n- Render each control component with the project's own React element, built from its control hook ([Control hooks](control-hooks.md)): `phx.frontend.useAttributeSelection(entityId, 'frameColor')` for an `attributeSelection` instance named `frameColor`, and so on.\n- Take a typed entity id as a prop, such as `Desk['id']`. Entity types are global in a project, like `phx`.\n- Group the elements of one entity type in a panel component when the layout shows them together.\n\n### Where the file lives\n\n- **Rendered by the layout** — a plain component in an underscore folder, such as `src/_shared/DeskControls.tsx`, with a named export. The layout imports it with a relative `.js` path. It needs no registration: the control hooks work anywhere inside the `ConfiguratorLayout`.\n- **Named by the spec** — an element that an `htmlHotspot`, `sceneEntityObjectHtmlHotspot` or `sceneEntityControl` names ([Scene controls](scene-controls.md)). Default-export `phx.frontend.createCustomPhoenixEntityElement('Name', ({ entityId }) => …)` from `src/elements/`; a file may export an array of registrations instead. It must return an element, `<></>` for nothing.\n- Every file in `src/elements/` outside an underscore folder must default-export a registration, so keep plain components out of it. An unregistered name in the spec renders a red \"not found\" box.\n- A spec-named element receives only `entityId`, untyped: find the entity in `phx.frontend.useCommittedState().entities` and narrow it by `type` before reading fields or calling the typed hooks. An element registered under a built-in kind name, such as the FAB factories of [Scene controls](scene-controls.md), also receives that kind's YAML props.\n\n### Mount it from the layout\n\n- Read the selected entity with `phx.frontend.useSelectedEntityId(phx.domain.enhancedModel.$Desk)`: the id while a desk is selected, else `null`. With nothing selected the root counts as selected.\n- `phx.frontend.useRootEntityId()` gives the root's id for controls that always show.\n- Render the panel only for an id of the right type, and only while `phx.frontend.useAccessService().accessInfo.viewMode` is `false`: no hook enforces read mode.\n- Mirror any `$filter` of the control component in the same condition, since the hook throws while its instance is filtered out ([Control components](control-components.md)).\n- [Scene and safe area](../custom-layout/scene-and-safe-area.md) has the layout skeleton with such a panel.\n\n### Write anything else\n\nWhen no control hook fits, such as a change to several fields or entities, build the updates with `phx.frontend.updates` ([Updates and dry runs](../state/updates.md)) and let a hook dry-run them:\n\n- `phx.frontend.useUpdatedControl(updates)` returns `{ disabled, hints, update }` for one update list. Memoize the list: every new array is a new dry run.\n- `phx.frontend.useUpdateControl()` returns `prepare(updates)`, which returns the same for each candidate, such as one per button.\n- `update()` stages and commits in one step, one undo entry; `disabled` and `hints` follow [Violations](../state/violations.md). Both hooks take `fixableViolations`, which only hides those types from `hints`.\n- Run a domain action the same way: `prepare(phx.frontend.useConfigurator().actionSystem.prepareAction(name, args, state).updates)`, with `state` from `phx.frontend.useCommittedState()`. `prepareAction` throws on arguments it rejects, so catch it and show its message; [Actions](../domain-model/actions.md) owns them.\n\n```tsx\nconst control = prepare([\n phx.frontend.updates.DomainEntityModification({\n entityId: deskId,\n stateDelta: { width: 1800, depth: 800 },\n updateTag: 'desk.sizePreset',\n }),\n])\n// <Button disabled={control.disabled} title={control.hints} onClick={control.update}>Large</Button>\n```\n\n### Look native\n\nThe project's element is the default. Inside it, the SDK's control components from `@salsita-ai/sdk/react`, such as `AttributeCardSelector` with `entityId` and `instanceName`, can render one control in the SDK's look, and `PropertyContainer` from `@salsita-ai/sdk/ui` gives section spacing and headings. None of these is on `phx`.",example:t,documentation:'Read each with `pnpm phoenix docs -r <path>`:\n\n- `docs/layouts/custom-layout.mdx` — "Read and change the product" (a control in the layout\'s panel, from `src/_shared/`) and "Put a control on the product" (a hotspot element).\n- `docs/controls/custom.mdx` — `useUpdatedControl` and `useCookedRecipes` in elements; skip its property-page attachment.\n- `docs/other-features/domain-actions.mdx` — "Run it from the UI": an action behind `useUpdateControl`.\n- "Updates Factory" in `docs/phoenix/configurator-interface.mdx` — `useUpdatedControl` and `useUpdateControl` with a worked element.',phxMembers:["frontend.createCustomPhoenixEntityElement","frontend.useUpdateControl","frontend.useUpdatedControl"]});
@@ -1,4 +1,6 @@
1
- import{createPhoenixFeatureGuide as e}from"../../guide.js";let t=`Shelves with the SDK's in-scene controls, placed by the spec and restyled once for the brand. The delete FAB keeps its dry run: it is disabled with the reason while removing the shelf would break an invariant.
1
+ import{createPhoenixFeatureGuide as e}from"../../guide.js";let t=`For a modular run, put an add FAB at the exposed end for new columns and another above a column for stacking. Each belongs to the entity whose child recipes create the part. Position it from the current dimensions, and offer compatible sizes through its recipe menu. After adding, make the new part the editing target through [Selection and hover](../application-states/selection.md); keep its properties contextual and shared finishes separate. Check a blocked addition and phone target visibility as well as the successful path. [Control components](control-components.md) owns recipe wiring.
2
+
3
+ The smaller shelf example below shows placement and branded deletion. The delete FAB keeps its dry run: it is disabled with the reason while removing the shelf would break an invariant.
2
4
 
3
5
  \`\`\`yaml
4
6
  # spec/scene-controls.yaml
@@ -45,4 +47,4 @@ export default phx.frontend.createDeleteEntityFab(({ onDelete, disabled, disable
45
47
  })
46
48
  \`\`\`
47
49
 
48
- \`onDelete\` already stops the click's propagation and records the built-in analytics event.`;export const generatePhoenixSceneControlsFeature=()=>e({path:"features/domain-controls/scene-controls.md",title:"Scene controls",summary:"Hotspots, FABs, editable dimension indicators and 3D entity controls, their placement, and replacing the built-in look; read when putting a control on the product.",whenToUse:"Read when configurator users should act on the product itself: select a part or go to a step from a hotspot, add or delete from a FAB, edit a dimension in the scene, switch tools, or open a project control next to a part. These controls write the same control components as the project's elements ([Control components](control-components.md)).",capabilities:"### Choose the control\n\n- **Select a part** — `sceneEntitySelectHotspot`. Selection itself belongs to [Selection and hover](../application-states/selection.md).\n- **Go to a navigation state** — `sceneEntityNavigationHotspot` with `navigationState` (required), `pushToStack` and `canStackOnto`; [Navigation states](../application-states/navigation.md) owns the stack.\n- **Add children** — `sceneEntityAddFab` offers the entity's `childEntityRecipes`: `instanceNames` narrows them, `skipMenuWhenOnlyOne` adds a single recipe directly, `hideWhenNone` hides an empty FAB, `label` and `icon` style it, and `hiddenViolations` drops those types from its hints.\n- **Delete the entity** — `sceneEntityDeleteFab` with `icon`, `title` and `label`, and `hiddenViolations` to drop those types from its hints.\n- **Switch tools** — `toolMenuFab` with `title` and `options` of `{ label, icon?, toolState }`; [View and tool states](../application-states/views-and-tools.md) owns tools.\n- **Edit a dimension on the product** — the editable indicators open an input for the component they target. `editableDistanceDimensionIndicator` (`targetDimension`, a `distanceDimension` instance), `listSelectorDimensionIndicator` (`targetDistanceDimensionSelect`) and `editableSizeIndicator` (`targetSize`) draw a dimension line from `startX/Y/Z` to `endX/Y/Z`. `editableAngleIndicator` targets an `angleDimension` and is placed by `positionX/Y/Z`, `startAngle` and `sweepAngle`.\n- `editableOffsetIndicator` has no start and end: it requires `targetOffset`, `targetEntityOffsetAnchors`, `targetReferenceOffsetAnchors` and `directionVector`. `dimensionIndicator`, `angleIndicator` and `offsetIndicator` only show the value.\n- **A project control on the product** — `htmlHotspot` with `name`, a project element ([Custom controls](custom-controls.md)), or `sceneEntityObjectHtmlHotspot` with `target`, a `sceneEntityRemoteObject` instance whose animation it follows, offsets in that object's local space and units.\n- **3D content on an entity** — `sceneEntityControl` with `name`: the element renders inside the WebGL scene, so it returns React Three Fiber objects, such as drei's `Billboard` and `Text`, not DOM. It stays out of camera fitting unless `includeInCameraFit: true`.\n\nPrefer the built-in control for its job and restyle it (below); an `htmlHotspot` is for a control the SDK has none of.\n\n### Place and show\n\n- `offsetX`, `offsetY` and `offsetZ` are measured from the entity's origin in the distance data unit; `screenOffsetHorizontal` and `screenOffsetVertical` shift the control in pixels. `$read` or `$eval` an offset that follows a size.\n- `showWhen` takes `selected` and `unselected`. Defaults: `[selected]` for the add and delete FABs, `[unselected]` for the selection and navigation hotspots and the tool menu; an `htmlHotspot` shows in both.\n- `hideWhileDragging` hides the control while an entity is dragged. `azimuthAngleLimits` and `polarAngleLimits` (radians) and `distanceLimits` fade it outside `{ min, max, smoothZone?, minOpacity? }`.\n- Give an icon-only FAB or hotspot a `title`; `tooltipVisibility` is `on-hover` (default), `forced`, `forced-when-still` or `hidden`.\n- `$filter` decides when the control exists: `modes: [owner]` keeps editing controls from viewers, `navigationStates` ties them to a step. [Components](../domain-model/components.md) owns filters.\n- `controlHotspot: true` on an `htmlHotspot` hides it while a change is previewed, so its dry runs never read a stale state; the add and delete FABs always behave so. It also unmounts an open popover on every change: leave it off for a hotspot whose menu stays open while users compare options. `inert: true` makes an `htmlHotspot` ignore the pointer.\n\n### Elements in the scene\n\n- In-scene elements get the theme and every `phx.frontend` hook; MUI popovers and tooltips work inside them.\n- Stop a click inside a project control from reaching the scene with `event.stopPropagation()`, or it also changes the selection. The `onDelete`, `onSelect` and `onNavigate` props below already do; a recipe's `handleClick` does not.\n- The scene's HTML sits under the layout's panels, so a covered control cannot be clicked.\n\n### Replace a built-in control's look\n\nEach helper registers the element the scene renders for one component, everywhere the spec places it, in the built-in layout and in a project layout. The spec keeps the position, visibility, filters and tooltip settings. Pass a component `(props) => JSX.Element | null` (`null` shows nothing) and default-export the registration, or an array of registrations, from a file in `src/elements/`:\n\n- `phx.frontend.createAddEntityFab(Component)` — replaces `AddEntityFab`, for `sceneEntityAddFab`. Props: `entityId`, `instanceNames`, `fixableViolations` (the spec's `hiddenViolations`), `icon`, `label`, `title`, `tooltipVisibility`, `skipMenuWhenOnlyOne`, `hideWhenNone`. It gets no recipes: read them with `phx.frontend.useGroupedRecipeOptions(entityId, instanceNames, fixableViolations)` in the menu, mounted only while open, since every recipe is a dry run.\n- `phx.frontend.createDeleteEntityFab(Component)` — replaces `DeleteEntityFab`. Props: `entityId`, `onDelete`, `disabled`, `disabledHint`, `trace` (logs the dry run), `icon`, `label`, `title`, `tooltipVisibility`.\n- `phx.frontend.createSelectionHotspot(Component)` — replaces `SelectionHotspot`. Props: `entityId`, `onSelect`, `title`, `tooltipVisibility`.\n- `phx.frontend.createNavigationHotspot(Component)` — replaces `NavigationHotspot`. Props: `entityId`, `navigationState`, `onNavigate`, `title`, `tooltipVisibility`.\n- `phx.frontend.createToolMenuFab(Component)` — replaces `ToolMenuFab`. Props: `entityId`, `options`, `onSelectTool(toolState)`, `icon`, `title`, `tooltipVisibility`.\n\n`title` and `label` are localizable: resolve them with `phx.frontend.useResolveLocalizable()`. Registering these names with `createCustomPhoenixEntityElement` works too, but types only `entityId`. The dimension indicators have no replacement; build a different editor as an `htmlHotspot`.",example:t,documentation:'Read each with `pnpm phoenix docs -r <path>`:\n\n- "In-Scene Controls" in `docs/phoenix/configurator-interface.mdx` — the replaceable elements, their props and a complete replacement.\n- `docs/fabs/basic.mdx`, `docs/fabs/layout.mdx` — FAB settings, visibility and tooltips, and grouping controls with screen offsets.\n- `docs/controls/scene/html-hotspots.mdx`, `docs/controls/scene/object-html-hotspots.mdx`, `docs/controls/scene/custom-controls.mdx` (`sceneEntityControl`).\n- "Put a control on the product" in `docs/layouts/custom-layout.mdx` — a project hotspot with a popover.\n- `docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx` and its siblings in that folder, one per indicator (`pnpm phoenix docs -l` lists them).',phxMembers:["frontend.createAddEntityFab","frontend.createDeleteEntityFab","frontend.createSelectionHotspot","frontend.createNavigationHotspot","frontend.createToolMenuFab"]});
50
+ \`onDelete\` already stops the click's propagation and records the built-in analytics event.`;export const generatePhoenixSceneControlsFeature=()=>e({path:"features/domain-controls/scene-controls.md",title:"Scene controls",summary:"Hotspots, FABs, editable dimension indicators and 3D entity controls, their placement, and replacing the built-in look; read when putting a control on the product.",whenToUse:"Read when configurator users should act on the product itself: select a part or go to a step from a hotspot, add or delete from a FAB, edit a dimension in the scene, switch tools, or open a project control next to a part. These controls write the same control components as the project's elements ([Control components](control-components.md)).",capabilities:"For adding, placing or resizing parts at a visible location, start with the corresponding scene control. A menu of options can open from that location; multiple sizes do not require a permanent panel. Use a panel when it makes the target or choices clearer for the task, such as obscured attachment points. Try the spatial action before expanding the property editor.\n\n### Choose the control\n\n- **Select a part** — `sceneEntitySelectHotspot`. Selection itself belongs to [Selection and hover](../application-states/selection.md).\n- **Go to a navigation state** — `sceneEntityNavigationHotspot` with `navigationState` (required), `pushToStack` and `canStackOnto`; [Navigation states](../application-states/navigation.md) owns the stack.\n- **Add children** — `sceneEntityAddFab` offers the entity's `childEntityRecipes`: `instanceNames` narrows them, `skipMenuWhenOnlyOne` adds a single recipe directly, `hideWhenNone` hides an empty FAB, `label` and `icon` style it, and `hiddenViolations` drops those types from its hints.\n- **Delete the entity** — `sceneEntityDeleteFab` with `icon`, `title` and `label`, and `hiddenViolations` to drop those types from its hints.\n- **Switch tools** — `toolMenuFab` with `title` and `options` of `{ label, icon?, toolState }`; [View and tool states](../application-states/views-and-tools.md) owns tools.\n- **Edit a dimension on the product** — the editable indicators open an input for the component they target. `editableDistanceDimensionIndicator` (`targetDimension`, a `distanceDimension` instance), `listSelectorDimensionIndicator` (`targetDistanceDimensionSelect`) and `editableSizeIndicator` (`targetSize`) draw a dimension line from `startX/Y/Z` to `endX/Y/Z`. `editableAngleIndicator` targets an `angleDimension` and is placed by `positionX/Y/Z`, `startAngle` and `sweepAngle`.\n- `editableOffsetIndicator` has no start and end: it requires `targetOffset`, `targetEntityOffsetAnchors`, `targetReferenceOffsetAnchors` and `directionVector`. `dimensionIndicator`, `angleIndicator` and `offsetIndicator` only show the value.\n- **A project control on the product** — `htmlHotspot` with `name`, a project element ([Custom controls](custom-controls.md)), or `sceneEntityObjectHtmlHotspot` with `target`, a `sceneEntityRemoteObject` instance whose animation it follows, offsets in that object's local space and units.\n- **3D content on an entity** — `sceneEntityControl` with `name`: the element renders inside the WebGL scene, so it returns React Three Fiber objects, such as drei's `Billboard` and `Text`, not DOM. It stays out of camera fitting unless `includeInCameraFit: true`.\n\nPrefer the built-in control for its job and restyle it (below); an `htmlHotspot` is for a control the SDK has none of.\n\n### Place and show\n\n- `offsetX`, `offsetY` and `offsetZ` are measured from the entity's origin in the distance data unit; `screenOffsetHorizontal` and `screenOffsetVertical` shift the control in pixels. `$read` or `$eval` an offset that follows a size.\n- `showWhen` takes `selected` and `unselected`. Defaults: `[selected]` for the add and delete FABs, `[unselected]` for the selection and navigation hotspots and the tool menu; an `htmlHotspot` shows in both.\n- `hideWhileDragging` hides the control while an entity is dragged. `azimuthAngleLimits` and `polarAngleLimits` (radians) and `distanceLimits` fade it outside `{ min, max, smoothZone?, minOpacity? }`.\n- Give an icon-only FAB or hotspot a `title`; `tooltipVisibility` is `on-hover` (default), `forced`, `forced-when-still` or `hidden`.\n- `$filter` decides when the control exists: `modes: [owner]` keeps editing controls from viewers, `navigationStates` ties them to a step. [Components](../domain-model/components.md) owns filters.\n- `controlHotspot: true` on an `htmlHotspot` hides it while a change is previewed, so its dry runs never read a stale state; the add and delete FABs always behave so. It also unmounts an open popover on every change: leave it off for a hotspot whose menu stays open while users compare options. `inert: true` makes an `htmlHotspot` ignore the pointer.\n\n### Elements in the scene\n\n- In-scene elements get the theme and every `phx.frontend` hook; MUI popovers and tooltips work inside them.\n- Stop a click inside a project control from reaching the scene with `event.stopPropagation()`, or it also changes the selection. The `onDelete`, `onSelect` and `onNavigate` props below already do; a recipe's `handleClick` does not.\n- The scene's HTML sits under the layout's panels, so a covered control cannot be clicked.\n\n### Replace a built-in control's look\n\nEach helper registers the element the scene renders for one component, everywhere the spec places it, in the built-in layout and in a project layout. The spec keeps the position, visibility, filters and tooltip settings. Pass a component `(props) => JSX.Element | null` (`null` shows nothing) and default-export the registration, or an array of registrations, from a file in `src/elements/`:\n\n- `phx.frontend.createAddEntityFab(Component)` — replaces `AddEntityFab`, for `sceneEntityAddFab`. Props: `entityId`, `instanceNames`, `fixableViolations` (the spec's `hiddenViolations`), `icon`, `label`, `title`, `tooltipVisibility`, `skipMenuWhenOnlyOne`, `hideWhenNone`. It gets no recipes: read them with `phx.frontend.useGroupedRecipeOptions(entityId, instanceNames, fixableViolations)` in the menu, mounted only while open, since every recipe is a dry run.\n- `phx.frontend.createDeleteEntityFab(Component)` — replaces `DeleteEntityFab`. Props: `entityId`, `onDelete`, `disabled`, `disabledHint`, `trace` (logs the dry run), `icon`, `label`, `title`, `tooltipVisibility`.\n- `phx.frontend.createSelectionHotspot(Component)` — replaces `SelectionHotspot`. Props: `entityId`, `onSelect`, `title`, `tooltipVisibility`.\n- `phx.frontend.createNavigationHotspot(Component)` — replaces `NavigationHotspot`. Props: `entityId`, `navigationState`, `onNavigate`, `title`, `tooltipVisibility`.\n- `phx.frontend.createToolMenuFab(Component)` — replaces `ToolMenuFab`. Props: `entityId`, `options`, `onSelectTool(toolState)`, `icon`, `title`, `tooltipVisibility`.\n\n`title` and `label` are localizable: resolve them with `phx.frontend.useResolveLocalizable()`. Registering these names with `createCustomPhoenixEntityElement` works too, but types only `entityId`. The dimension indicators have no replacement; build a different editor as an `htmlHotspot`.",example:t,documentation:'Read each with `pnpm phoenix docs -r <path>`:\n\n- "In-Scene Controls" in `docs/phoenix/configurator-interface.mdx` — the replaceable elements, their props and a complete replacement.\n- `docs/fabs/basic.mdx`, `docs/fabs/layout.mdx` — FAB settings, visibility and tooltips, and grouping controls with screen offsets.\n- `docs/controls/scene/html-hotspots.mdx`, `docs/controls/scene/object-html-hotspots.mdx`, `docs/controls/scene/custom-controls.mdx` (`sceneEntityControl`).\n- "Put a control on the product" in `docs/layouts/custom-layout.mdx` — a project hotspot with a popover.\n- `docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx` and its siblings in that folder, one per indicator (`pnpm phoenix docs -l` lists them).',phxMembers:["frontend.createAddEntityFab","frontend.createDeleteEntityFab","frontend.createSelectionHotspot","frontend.createNavigationHotspot","frontend.createToolMenuFab"]});
@@ -22,7 +22,7 @@ actions:
22
22
 
23
23
  \`\`\`ts
24
24
  // src/actions/move-drawer.ts
25
- export default phx.domain.implementActions({
25
+ export default phx.frontend.implementActions({
26
26
  moveDrawer: ({ drawerId, delta }, state, { systems: { domain }, updates }) => {
27
27
  const desk = domain.getRoot$Entity(state)
28
28
  const from = desk.drawerIds.indexOf(drawerId)
@@ -49,7 +49,7 @@ export default phx.domain.implementActions({
49
49
 
50
50
  \`\`\`tsx
51
51
  // in the drawer's custom element: one prepared move per button
52
- const { actionSystem } = phx.frontend.useDomain()
52
+ const { actionSystem } = phx.frontend.useConfigurator()
53
53
  const state = phx.frontend.useCommittedState()
54
54
  const prepare = phx.frontend.useUpdateControl()
55
55
 
@@ -61,4 +61,4 @@ const move = (delta: number) => {
61
61
  }
62
62
  }
63
63
  const left = move(-1) // <Button disabled={left.disabled} title={left.hints} onClick={left.update}>
64
- \`\`\``;export const generatePhoenixActionsFeature=()=>e({path:"features/domain-model/actions.md",title:"Actions",summary:"Named domain operations declared in YAML, prepared in `src/actions/` and run by controls or the assistant; read when one change touches several entities or the UI and the assistant must share it.",whenToUse:"Read when a change is more than writing one field — a move among siblings, a swap, a change to several entities at once — or when the UI and the assistant must make the same change under the same rule. A single bound field needs no action: bind it in YAML ([Components](components.md)).",capabilities:"### Declare\n\n- Declare actions under the top-level `actions:`, each with a `description`, `params` and `result`. Both maps are required; write `params: {}` for an action without parameters. Names are identifiers.\n- Each param and result member is a JSON schema with the shape syntax: `$ref: phx:...`, `references`, `tsType` and `import`. A param whose schema admits `null` is optional; the others are required.\n- `phx:DomainEntityId` with `references` types an id param; `phx:$DomainEntity` with `references` types a result member as the `$` entity after the change.\n- The descriptions become the doc comments of the generated `ActionParams<'name'>` and `ActionResult<'name'>` types and what the assistant reads about the action, so write them for both readers.\n- Only the configurator domain has actions; the admin domain has none.\n\n### Implement\n\n- Default-export `phx.domain.implementActions({ name: (params, state, ctx) => ... })` from a file in `src/actions/`. A file may implement any subset of the declared actions.\n- `params` arrive validated against the declared schema; `state` is the state the action runs on.\n- `ctx.systems` holds the domain systems (`systems.domain.get$Entity(id, state)`, `systems.domain.getRoot$Entity(state)`); `ctx.updates` is the typed update factory, `ctx.getIdSequence()` gives ids for created entities, and `ctx.expressionContext` is the expression context.\n- Return `{ updates, readResult }`: the updates to apply, and `readResult({ previousState, state })`, which reads the declared result from the state those updates produced, transformer changes included.\n- An action only prepares. It never stages or commits; its caller does.\n- Throw to reject a call, with a message that says what was wrong and what to send instead: users see it as the control's hint and the assistant as the failed mutation's error.\n- `references` types an id but any entity id passes validation, so check what the id names, for example with `phx.domain.model.Drawer.isId(id)` or by finding it in the parent's list.\n- A declared action without an implementation stops the application at start (`MISSING_ACTION_IMPLEMENTATIONS` in the dev editor); implementing an undeclared name is a type error. Nothing validates what `readResult` returns at runtime.\n- Actions are domain code that also runs on the server: pure, `phx.domain` only, no browser imports.\n\n### Run from the UI\n\n- `phx.frontend.useDomain().actionSystem.prepareAction(name, args, state)` returns the prepared action for the committed state from `phx.frontend.useCommittedState()`.\n- Pass its `updates` to a function from `phx.frontend.useUpdateControl()`: it dry-runs them for `disabled` and `hints` and commits them on `update()`. [Custom controls](../domain-controls/custom-controls.md) owns that hook and the control around it.\n- `prepareAction` throws for an unknown name, arguments that do not fit and every rejection; catch it and show the message as the disabled control's hint.\n- At the call site the name and arguments are not checked against the generated types; the implementation is.\n\n### Expose to the assistant\n\n- List the action under `assistant.actions` to add it as a custom mutation; `as` renames the field and `description` replaces the action's. The mutation runs the same `prepareAction` and applies its updates with the same validation as every other change.",example:t,documentation:"Read `docs/other-features/domain-actions.mdx` with `pnpm phoenix docs -r docs/other-features/domain-actions.mdx`: declaring, implementing and running an action, with a complete control and the assistant schema. `docs/phoenix/domain-model.mdx` has no actions section.",phxMembers:["domain.implementActions"]});
64
+ \`\`\``;export const generatePhoenixActionsFeature=()=>e({path:"features/domain-model/actions.md",title:"Actions",summary:"Named domain operations declared in YAML, prepared in `src/actions/` and run by controls or the assistant; read when one change touches several entities or the UI and the assistant must share it.",whenToUse:"Read when a change is more than writing one field — a move among siblings, a swap, a change to several entities at once — or when the UI and the assistant must make the same change under the same rule. A single bound field needs no action: bind it in YAML ([Components](components.md)).",capabilities:"### Declare\n\n- Declare actions under the top-level `actions:`, each with a `description`, `params` and an optional `result`. `params` is required; write `params: {}` for an action without parameters. Leave `result` out, or set it to `null`, when the action reports nothing: its `ActionResult<'name'>` is `void`. An empty `result: {}` is a spec error. Names are identifiers.\n- Each param and result member is a JSON schema with the shape syntax: `$ref: phx:...`, `references`, `tsType` and `import`. A param whose schema admits `null` is optional; the others are required.\n- `phx:DomainEntityId` with `references` types an id param; `phx:$DomainEntity` with `references` types a result member as the `$` entity after the change.\n- The descriptions become the doc comments of the generated `ActionParams<'name'>` and `ActionResult<'name'>` types and what the assistant reads about the action, so write them for both readers.\n- Only the configurator domain has actions; the admin domain has none.\n\n### Implement\n\n- Default-export `phx.frontend.implementActions({ name: (params, state, ctx) => ... })` from a file in `src/actions/`. A file may implement any subset of the declared actions.\n- `params` arrive validated against the declared schema; `state` is the state the action runs on.\n- `ctx.systems` holds the domain systems and the registered systems for this browser application slot (`systems.domain.get$Entity(id, state)`, `systems.domain.getRoot$Entity(state)`); `ctx.updates` is the typed update factory, `ctx.getIdSequence()` gives ids for created entities, and `ctx.expressionContext` is the expression context.\n- Return `{ updates, readResult }`: the updates to apply, and `readResult({ previousState, state })`, which reads the declared result from the state those updates produced, transformer changes included. An action without a `result` returns `{ updates }` only; a `readResult` there is a type error.\n- An action only prepares. It never stages or commits; its caller does.\n- Throw to reject a call, with a message that says what was wrong and what to send instead: users see it as the control's hint and the assistant as the failed mutation's error.\n- `references` types an id but any entity id passes validation, so check what the id names, for example with `phx.domain.model.Drawer.isId(id)` or by finding it in the parent's list.\n- A declared action without an implementation stops the application at start: `.phoenix/phoenix-dev.log` shows `Missing actions: <names>`, and the editor (`--editor`) the `MISSING_ACTION_IMPLEMENTATIONS` diagnostic; implementing an undeclared name is a type error. Nothing validates what `readResult` returns at runtime.\n- Actions currently execute in the browser, including assistant custom mutations. Built-in extensions such as `ctx.systems.sketchingSystem` are optional: check the value before using it and throw a clear message when the slot does not provide it. For a custom system, check its name with `in` and narrow its value with a local type guard.\n- Action implementations are registered only by the browser assembly. They may import browser systems; the webhook reads their declarations for the assistant schema without loading their implementation modules.\n- Read sketching projections from the supplied `state` and call `getLineLengthUpdates`, `getRectangleWidthUpdates`, `getRectangleDepthUpdates`, `getConnectionAngleUpdate` or `getMoveSketchingPointUpdates`. Do not use methods that read committed state, such as `prepareInitialDrawingUpdates`. Never stage, commit, roll back, or change drawing/camera state in an action: assistant operations can use a hypothetical working state.\n\n### Run from the UI\n\n- `phx.frontend.useConfigurator().actionSystem.prepareAction(name, args, state)` returns the prepared action for the committed state from `phx.frontend.useCommittedState()`.\n- Pass its `updates` to a function from `phx.frontend.useUpdateControl()`: it dry-runs them for `disabled` and `hints` and commits them on `update()`. [Custom controls](../domain-controls/custom-controls.md) owns that hook and the control around it.\n- `prepareAction` throws for an unknown name, arguments that do not fit and every rejection; catch it and show the message as the disabled control's hint.\n- The generated `useConfigurator().actionSystem` checks action names and arguments and preserves each action result type.\n\n### Expose to the assistant\n\n- List the action under `assistant.actions` to add it as a custom mutation; `as` renames the field and `description` replaces the action's. An action without a `result` becomes a mutation returning `Boolean!`, which is `true` once its changes apply; a failure is an error, never `false`. The mutation runs the same `prepareAction` and applies its updates with the same validation as every other change.",example:t,documentation:"Read `docs/other-features/domain-actions.mdx` with `pnpm phoenix docs -r docs/other-features/domain-actions.mdx`: declaring, implementing and running an action, with a complete control and the assistant schema. `docs/phoenix/domain-model.mdx` has no actions section.",phxMembers:["frontend.implementActions"]});
@@ -1,4 +1,4 @@
1
- import{createPhoenixFeatureGuide as e}from"../../guide.js";let t=`A bound control shown only while designing and only to owners, a label that follows the selection, and legs whose number depends on the width:
1
+ import{createPhoenixFeatureGuide as e}from"../../guide.js";let n=`A bound control shown only while designing and only to owners, a label that follows the selection, and legs whose number depends on the width:
2
2
 
3
3
  \`\`\`yaml
4
4
  # spec/components.yaml
@@ -59,4 +59,4 @@ const finish = phx.frontend.useComponent({
59
59
  if (finish === null) {
60
60
  return null // filtered out: not designing, or a viewer
61
61
  }
62
- \`\`\``;export const generatePhoenixComponentsFeature=()=>e({path:"features/domain-model/components.md",title:"Components",summary:"Attaching components in YAML or TypeScript, bindings, `$eval`, filters and reading components in React; read when binding data or behavior to entities or reading a component in custom UI.",whenToUse:"Read when attaching a component to an entity or alias, binding its props to the domain, limiting it to some states, or reading one in custom React code. The guide of each job names the kind that does it: [Domain controls](../domain-controls/index.md) for controls, [Custom project layout](../custom-layout/index.md) for page-level UI.",capabilities:"### Attach in YAML first\n\n- Nest `components:` by entity type or alias, component kind, instance name, then props. On an alias the instance applies to every member type.\n- Instance names are yours. One entity can carry several instances of a kind; name each by its job (`finish`, `width`).\n- A prop holds a static value or a binding:\n - `$read: field` or `$read: $name` — one field, expression, relation or constant of the entity, by name only (no path).\n - `$bind: field` — reads and writes one shape field, on the props a kind lets users change, such as a selection's `value`.\n - `$read` or `$eval` together with `$write: field` — read one thing, write a shape field. `$write` never stands alone and never targets an expression.\n - `$eval: <expression>` — one inline JavaScript expression of `self`, the `$` entity with its relations and expressions (`self.$desk.width / 2`). It sees nothing else: no state, no context, no imports and no TypeScript-only syntax.\n- Whole state from one expression: give the instance `$read: $name` instead of props, with an optional `$filter` beside it.\n- Reading an undeclared `$name` declares an expression that still needs an implementation; see [Expressions](expressions.md).\n- The build checks that a bound value fits its prop (`COMPONENT_BINDING_TYPE_MISMATCH`). An entity id cannot be written in YAML: bind it (`$read: id`).\n\n### Filters\n\n- A `$filter` inside an instance decides when the component is active. An inactive component is absent for every system and hook.\n- Criteria: `navigationStates`, `viewStates`, `toolStates`, `exportStates`, `modes` (`owner`, `read`, `finalize`), `roles`, `selectedEntityIds`, `hoveredEntityIds`, `draggedEntityIds`, `exportedEntityIds`, `viewports`, `fullscreen`, `debug` and `active`.\n- Each criterion is static or a `$read` or `$eval`. An omitted criterion matches everything, an empty list nothing. All stated criteria must match; `$or: [...]` lists alternative filters, any of which may match.\n- `selectedEntityIds: { $read: id }` shows an instance only while its own entity is selected.\n- Criteria run cheapest first and `active` last, so put a computed condition in `active: { $read: $name }` beside the static ones. Never write `$filter: { $read: $name }`: that whole-filter form is the deprecated legacy filter and warns at runtime.\n- `modes` tests the configurator mode; a viewer is in `read` mode, so `modes: [owner]` keeps an editing component from viewers.\n- [Application states](../application-states/index.md) explains the navigation, view and tool states and the selection the criteria test.\n\n### Attach in TypeScript\n\n- Use `phx.domain.attachComponent` in `src/components/` only for what YAML cannot express: a React node or other browser value, or a number of instances that depends on the state. A file default-exports one attachment or an array.\n- Chain `.withEntity('Desk')` or `.withAlias('Top')` (repeatable), `.withComponent(<kind>Component, 'instance')`, optionally `.withGradualFilter({ ... })` (each call is one alternative), then `.attach(read, write?)` or `.attachMany(read)`.\n- `read(self, state, ctx)` returns the state; `write(writableState)` returns the entity fields to change; `attachMany` returns an array of states, each with a stable `key`, one instance per key.\n- Component types are `<kind>Component` exports of `@salsita-ai/sdk/domain`, such as `attributeSelectionComponent`; `phx` does not carry them.\n- Wrap `read` in `memoEval` (from `@salsita-ai/sdk/domain`) so the state keeps its reference while its inputs are unchanged. A fresh object on every state re-renders controls and can reset systems that react to references, such as cameras.\n- Files in `src/components/` stay out of the webhook unless their first statement is `'use webhook'`; [Webhooks](../webhooks.md) says when a component needs it.\n\n### Read components in React\n\n- `phx.frontend.useComponent({ entityId, componentType, instanceName })` returns the component's state, or `null` while it is not attached or filtered out. Leave out `instanceName` only when the kind is attached once; several matches throw.\n- `phx.frontend.useComponents({ componentTypes, entityIds?, instanceNames? })` returns `{ componentInstance, state }` snapshots, empty when nothing matches although its type admits `null`.\n- `phx.frontend.useFirstComponent({ ... })` takes the same filter and returns the first snapshot or `null`.\n- `phx.frontend.useRootComponents(componentType)` and `phx.frontend.useFirstRootComponent(componentType)` read the root entity; both also take an array of types.\n- These read the committed state. The rendered variants follow staged changes too, such as a slider being dragged: `phx.frontend.useRenderedComponent`, `phx.frontend.useRenderedComponents`, `phx.frontend.useFirstRenderedComponent`, `phx.frontend.useRootRenderedComponents` and `phx.frontend.useFirstRootRenderedComponent`. [State slices](../state/slices.md) explains when each fits.\n- Control hooks throw for a component that is not attached: check it with `phx.frontend.useComponent` first and render nothing on `null`.",example:t,documentation:'Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/phoenix/components.mdx` — bindings, `$eval`, filters and `memoEval`.\n- `docs/other-features/component-filters.mdx` — every criterion combination, `$or` included.\n- `docs/other-features/dynamic-component-attachments.mdx` — `attachMany` from memoized expressions, beside static YAML components.\n- `docs/phoenix/configurator-interface.mdx` — "Components" under "Core Hooks": the component hooks with a sample call each.',phxMembers:["domain.attachComponent","frontend.useComponent","frontend.useRenderedComponent","frontend.useComponents","frontend.useRenderedComponents","frontend.useFirstComponent","frontend.useFirstRenderedComponent","frontend.useRootComponents","frontend.useRootRenderedComponents","frontend.useFirstRootComponent","frontend.useFirstRootRenderedComponent"]});
62
+ \`\`\``;export const generatePhoenixComponentsFeature=()=>e({path:"features/domain-model/components.md",title:"Components",summary:"Attaching components in YAML or TypeScript, bindings, `$eval`, filters and reading components in React; read when binding data or behavior to entities or reading a component in custom UI.",whenToUse:"Read when attaching a component to an entity or alias, binding its props to the domain, limiting it to some states, or reading one in custom React code. The guide of each job names the kind that does it: [Domain controls](../domain-controls/index.md) for controls, [Custom project layout](../custom-layout/index.md) for page-level UI.",capabilities:"### Attach in YAML first\n\n- Nest `components:` by entity type or alias, component kind, instance name, then props. On an alias the instance applies to every member type.\n- Instance names are yours. One entity can carry several instances of a kind; name each by its job (`finish`, `width`).\n- A prop holds a static value or a binding:\n - `$read: field` or `$read: $name` — one field, expression, relation or constant of the entity, by name only (no path).\n - `$bind: field` — reads and writes one shape field, on the props a kind lets users change, such as a selection's `value`.\n - `$read` or `$eval` together with `$write: field` — read one thing, write a shape field. `$write` never stands alone and never targets an expression.\n - `$eval: <expression>` — one inline JavaScript expression of `self`, the `$` entity with its relations and expressions (`self.$desk.width / 2`). It sees nothing else: no state, no context, no imports and no TypeScript-only syntax.\n- Whole state from one expression: give the instance `$read: $name` instead of props, with an optional `$filter` beside it.\n- Reading an undeclared `$name` declares an expression that still needs an implementation; see [Expressions](expressions.md).\n- The build checks that a bound value fits its prop (`COMPONENT_BINDING_TYPE_MISMATCH`). An entity id cannot be written in YAML: bind it (`$read: id`).\n\n### Filters\n\n- A `$filter` inside an instance decides when the component is active. An inactive component is absent for every system and hook.\n- Criteria: `navigationStates`, `viewStates`, `toolStates`, `exportStates`, `modes` (`owner`, `read`, `finalize`), `roles`, `selectedEntityIds`, `hoveredEntityIds`, `draggedEntityIds`, `exportedEntityIds`, `viewports`, `fullscreen`, `debug` and `active`.\n- Each criterion is static or a `$read` or `$eval`. An omitted criterion matches everything, an empty list nothing. All stated criteria must match; `$or: [...]` lists alternative filters, any of which may match.\n- `selectedEntityIds: { $read: id }` shows an instance only while its own entity is selected.\n- Criteria run cheapest first and `active` last, so put a computed condition in `active: { $read: $name }` beside the static ones. Never write `$filter: { $read: $name }`: that whole-filter form is the deprecated legacy filter and warns at runtime.\n- `modes` tests the configurator mode; a viewer is in `read` mode, so `modes: [owner]` keeps an editing component from viewers.\n- [Application states](../application-states/index.md) explains the navigation, view and tool states and the selection the criteria test.\n\n### Attach in TypeScript\n\n- Use `phx.domain.attachComponent` in `src/components/` only for what YAML cannot express: a React node or other browser value, or a number of instances that depends on the state. A file default-exports one attachment or an array.\n- Chain `.withEntity('Desk')` or `.withAlias('Top')` (repeatable), `.withComponent(<kind>Component, 'instance')`, optionally `.withGradualFilter({ ... })` (each call is one alternative), then `.attach(read, write?)` or `.attachMany(read)`.\n- `read(self, state, ctx)` returns the state; `write(writableState)` returns the entity fields to change; `attachMany` returns an array of states, each with a stable `key`, one instance per key.\n- Component types are `<kind>Component` exports of `@salsita-ai/sdk/domain`, such as `attributeSelectionComponent`; `phx` does not carry them.\n- Wrap `read` in `memoEval` (from `@salsita-ai/sdk/domain`) so the state keeps its reference while its inputs are unchanged. A fresh object on every state re-renders controls and can reset systems that react to references, such as cameras.\n- Files in `src/components/` stay out of the webhook unless their first statement is `'use webhook'`; [Webhook entry and environment](../webhooks/entry-and-environment.md) says when a component needs it.\n\n### Read components in React\n\n- `phx.frontend.useComponent({ entityId, componentType, instanceName })` returns the component's state, or `null` while it is not attached or filtered out. Leave out `instanceName` only when the kind is attached once; several matches throw.\n- `phx.frontend.useComponents({ componentTypes, entityIds?, instanceNames? })` returns `{ componentInstance, state }` snapshots, empty when nothing matches although its type admits `null`.\n- `phx.frontend.useFirstComponent({ ... })` takes the same filter and returns the first snapshot or `null`.\n- `phx.frontend.useRootComponents(componentType)` and `phx.frontend.useFirstRootComponent(componentType)` read the root entity; both also take an array of types.\n- These read the committed state. The rendered variants follow staged changes too, such as a slider being dragged: `phx.frontend.useRenderedComponent`, `phx.frontend.useRenderedComponents`, `phx.frontend.useFirstRenderedComponent`, `phx.frontend.useRootRenderedComponents` and `phx.frontend.useFirstRootRenderedComponent`. [State slices](../state/slices.md) explains when each fits.\n- Control hooks throw for a component that is not attached: check it with `phx.frontend.useComponent` first and render nothing on `null`.",example:n,documentation:'Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/phoenix/components.mdx` — bindings, `$eval`, filters and `memoEval`.\n- `docs/other-features/component-filters.mdx` — every criterion combination, `$or` included.\n- `docs/other-features/dynamic-component-attachments.mdx` — `attachMany` from memoized expressions, beside static YAML components.\n- `docs/phoenix/configurator-interface.mdx` — "Components" under "Core Hooks": the component hooks with a sample call each.',phxMembers:["domain.attachComponent","frontend.useComponent","frontend.useRenderedComponent","frontend.useComponents","frontend.useRenderedComponents","frontend.useFirstComponent","frontend.useFirstRenderedComponent","frontend.useRootComponents","frontend.useRootRenderedComponents","frontend.useFirstRootComponent","frontend.useFirstRootRenderedComponent"]});
@@ -43,4 +43,4 @@ export default phx.domain.implementCustomExpressions({
43
43
  })
44
44
  \`\`\`
45
45
 
46
- \`$delivery\` keeps one object while its five inputs are unchanged, so a reader of \`cabinet.$delivery\` re-renders only when one of them changes. \`$halfWidth\` is a number and needs neither TypeScript nor \`memoEval\`.`;export const generatePhoenixExpressionsFeature=()=>e({path:"features/domain-model/expressions.md",title:"Expressions",summary:"Derived values in YAML or TypeScript, `memoEval`, the expression context and the data hooks; read when computing a value from entity state or data sources.",whenToUse:"Read when a value derives from the configuration or its data — a price, a label, a limit, recipe options, a filter condition — or when custom React code needs the published, frontend or backend data.",capabilities:"### Choose the form\n\n- **`constants:`** — a fixed value per entity type or alias, without code (`$maxLegs: 4`). One that does not read `self` is also readable without an entity, as `phx.domain.enhancedModel.$Chair.$maxLegs`.\n- **`$eval` under `expressions:`** — one inline JavaScript expression of `self` (`$eval: self.width / 2`); give it an explicit `type`, because a value that reads `self` cannot be inferred. It sees only `self`: no state, context, helpers or imports. A `$eval` that does not read `self` is folded at parse time when it uses only literals, operators and `Math`; anything else needs an explicit `type` too.\n- **`$msg`** — a translatable text; [Localization](../localization.md) owns it.\n- **TypeScript** — anything that reads the data sources, the state or a helper, or needs more than one expression: declare the type in YAML and implement it in `src/expressions/`.\n\n### Declare and implement\n\n- Declare under `expressions:`, by entity type or alias, a `$name` with a JSON schema: `type`, `items`, `properties`, `$ref: phx:...`, or `tsType` with `import`.\n- Implement it with `phx.domain.implementCustomExpressions({ Desk: { $name: (self, state, ctx) => value } })`, default-exported from a file in `src/expressions/`, one file per entity type. Implement it under the entity type or alias that declares it.\n- A declared expression without an implementation stops the application at start with `MISSING_IMPLEMENTATION`; one implemented twice, or one the spec already gives a value, with `DUPLICATE_DEFINITION`.\n- Inference: a component `$read: $name` or filter `active: { $read: $name }` of an undeclared `$name` declares it with the type that prop or criterion expects, as recipe lists usually are. It still needs a TypeScript implementation. Declare it yourself to own the type; a type no read can accept fails with `EXPRESSION_READ_TYPE_CONFLICT`.\n\n### Pure, server-safe and stable\n\n- Expressions are pure: no side effects, no mutation of inputs, the same result for the same state and data. They are computed on demand and cached per state.\n- Expressions, invariants and actions also run on the server. Use `phx.domain` only, never `phx.frontend`, React or a browser-only import; put shared helpers in `_`-prefixed folders.\n- Keep the reference of an object or array result while its inputs are unchanged: wrap the implementation in `memoEval(deps, compute)` from `@salsita-ai/sdk/domain`. `deps(self, state, ctx)` returns an array compared item by item with `===`, and `compute(...deps)` runs only when an item changed.\n- List every input in `deps` and read nothing else in `compute`. Primitives need no `memoEval`.\n- A new object on every evaluation re-renders every reader and can reset systems that react to references, such as cameras; a mutated cached result hides the change.\n\n### The expression context\n\n- `self` is the `$` entity: fields, relations (`self.$drawers`), expressions and constants.\n- `state` is the domain state: `state.entities`, `state.rootEntityId`.\n- `ctx.publishedData`, `ctx.frontendData` and `ctx.sessionData` are typed by the spec's `publishedData:`, `frontendData:` and `sessionData:` schemas: a property missing from the schema's `required` list is optional.\n- A `sessionData` schema cannot list `required` properties (`SESSION_DATA_REQUIRED_PROPERTIES`), so every `ctx.sessionData` property may be `undefined`.\n- `ctx.backendData` is `Record<string, unknown> | undefined`: optional and untyped, so narrow each value before use.\n- `ctx.mode` is `owner`, `read` or `finalize`; `ctx.role` is the session role.\n- `ctx.domain.get$Entity(id, state)` and `ctx.domain.getRoot$Entity(state)` read other entities; `ctx` also has the component reader and the projections.\n\n### The data in React\n\n- `phx.frontend.usePublishedData()` and `phx.frontend.useFrontendData()` return the typed published and frontend data.\n- `phx.frontend.useBackendData()` returns the same optional, untyped backend data as `ctx.backendData`.\n- `phx.frontend.useLoadedData()` returns what the configurator loaded — `initialEntities`, `initialRevisionId`, `modelVersion`, `rootEntityType` — not the current state, which [State slices](../state/slices.md) reads.\n- Prefer an expression when the value also depends on the configuration: it is cached, runs on the server and can be bound in YAML. Read the hooks for data a custom element only displays.",example:t,documentation:"Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/phoenix/domain-model.mdx` — the Expressions, Constants and Static values with `$eval` sections.\n- `docs/phoenix/expression-context.mdx` — the context, its projections and the SDK expression builders.\n- `docs/phoenix/data-sources.mdx` — declaring the data schemas, their sources and lifetimes.\n- `docs/phoenix/components.mdx` — the `memoEval` section, for component outputs.",phxMembers:["domain.implementCustomExpressions","frontend.usePublishedData","frontend.useFrontendData","frontend.useBackendData","frontend.useLoadedData"]});
46
+ \`$delivery\` keeps one object while its five inputs are unchanged, so a reader of \`cabinet.$delivery\` re-renders only when one of them changes. \`$halfWidth\` is a number and needs neither TypeScript nor \`memoEval\`.`;export const generatePhoenixExpressionsFeature=()=>e({path:"features/domain-model/expressions.md",title:"Expressions",summary:"Derived values in YAML or TypeScript, `memoEval`, the expression context and the data hooks; read when computing a value from entity state or data sources.",whenToUse:"Read when a value derives from the configuration or its data — a price, a label, a limit, recipe options, a filter condition — or when custom React code needs the published, frontend or backend data.",capabilities:"### Choose the form\n\n- **`constants:`** — a fixed value per entity type or alias, without code (`$maxLegs: 4`). One that does not read `self` is also readable without an entity, as `phx.domain.enhancedModel.$Chair.$maxLegs`.\n- **`$eval` under `expressions:`** — one inline JavaScript expression of `self` (`$eval: self.width / 2`); give it an explicit `type`, because a value that reads `self` cannot be inferred. It sees only `self`: no state, context, helpers or imports. A `$eval` that does not read `self` is folded at parse time when it uses only literals, operators and `Math`; anything else needs an explicit `type` too.\n- **`$msg`** — a translatable text; [Localization](../localization.md) owns it.\n- **TypeScript** — anything that reads the data sources, the state or a helper, or needs more than one expression: declare the type in YAML and implement it in `src/expressions/`.\n\n### Declare and implement\n\n- Declare under `expressions:`, by entity type or alias, a `$name` with a JSON schema: `type`, `items`, `properties`, `$ref: phx:...`, or `tsType` with `import`.\n- Implement it with `phx.domain.implementCustomExpressions({ Desk: { $name: (self, state, ctx) => value } })`, default-exported from a file in `src/expressions/`, one file per entity type. Implement it under the entity type or alias that declares it.\n- A declared expression without an implementation stops the application at start with `MISSING_IMPLEMENTATION`; one implemented twice, or one the spec already gives a value, with `DUPLICATE_DEFINITION`.\n- Inference: a component `$read: $name` or filter `active: { $read: $name }` of an undeclared `$name` declares it with the type that prop or criterion expects, as recipe lists usually are. It still needs a TypeScript implementation. Declare it yourself to own the type; a type no read can accept fails with `EXPRESSION_READ_TYPE_CONFLICT`.\n\n### Pure, server-safe and stable\n\n- Expressions are pure: no side effects, no mutation of inputs, the same result for the same state and data. They are computed on demand and cached per state.\n- Expressions and invariants also run on the server. Use `phx.domain` only, never `phx.frontend`, React or a browser-only import; put shared helpers in `_`-prefixed folders.\n- [Actions](actions.md) belong to configurator and load only in the browser; expressions and invariants must remain server-safe.\n- Keep the reference of an object or array result while its inputs are unchanged: wrap the implementation in `memoEval(deps, compute)` from `@salsita-ai/sdk/domain`. `deps(self, state, ctx)` returns an array compared item by item with `===`, and `compute(...deps)` runs only when an item changed.\n- List every input in `deps` and read nothing else in `compute`. Primitives need no `memoEval`.\n- A new object on every evaluation re-renders every reader and can reset systems that react to references, such as cameras; a mutated cached result hides the change.\n\n### The expression context\n\n- `self` is the `$` entity: fields, relations (`self.$drawers`), expressions and constants.\n- `state` is the domain state: `state.entities`, `state.rootEntityId`.\n- `ctx.publishedData`, `ctx.frontendData` and `ctx.sessionData` are typed by the spec's `publishedData:`, `frontendData:` and `sessionData:` schemas: a property missing from the schema's `required` list is optional.\n- A `sessionData` schema cannot list `required` properties (`SESSION_DATA_REQUIRED_PROPERTIES`), so every `ctx.sessionData` property may be `undefined`.\n- `ctx.backendData` is `Record<string, unknown> | undefined`: optional and untyped, so narrow each value before use.\n- `ctx.mode` is `owner`, `read` or `finalize`; `ctx.role` is the session role.\n- `ctx.domain.get$Entity(id, state)` and `ctx.domain.getRoot$Entity(state)` read other entities; `ctx` also has the component reader and the projections.\n\n### The data in React\n\n- `phx.frontend.usePublishedData()` and `phx.frontend.useFrontendData()` return the typed published and frontend data.\n- `phx.frontend.useBackendData()` returns the same optional, untyped backend data as `ctx.backendData`.\n- `phx.frontend.useLoadedData()` returns what the configurator loaded — `initialEntities`, `initialRevisionId`, `modelVersion`, `rootEntityType` — not the current state, which [State slices](../state/slices.md) reads.\n- Prefer an expression when the value also depends on the configuration: it is cached, runs on the server and can be bound in YAML. Read the hooks for data a custom element only displays.",example:t,documentation:"Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/phoenix/domain-model.mdx` — the Expressions, Constants and Static values with `$eval` sections.\n- `docs/phoenix/expression-context.mdx` — the context, its projections and the SDK expression builders.\n- `docs/phoenix/data-sources.mdx` — declaring the data schemas, their sources and lifetimes.\n- `docs/phoenix/components.mdx` — the `memoEval` section, for component outputs.",phxMembers:["domain.implementCustomExpressions","frontend.usePublishedData","frontend.useFrontendData","frontend.useBackendData","frontend.useLoadedData"]});
@@ -1 +1 @@
1
- import{createPhoenixIndexGuide as e}from"../guide.js";import{generatePhoenixApplicationStatesGuides as n}from"./application-states/index.js";import{generatePhoenixCustomLayoutGuides as o}from"./custom-layout/index.js";import{generatePhoenixDomainControlsGuides as s}from"./domain-controls/index.js";import{generatePhoenixDomainModelGuides as i}from"./domain-model/index.js";import{generatePhoenixInspectionFeature as t}from"./inspection.js";import{generatePhoenixLocalizationFeature as a}from"./localization.js";import{generatePhoenixSceneObjectsFeature as d}from"./scene-objects.js";import{generatePhoenixStateGuides as r}from"./state/index.js";import{generatePhoenixVariantsFeature as c}from"./variants.js";import{generatePhoenixWebhooksFeature as m}from"./webhooks.js";export const generatePhoenixFeatureGuides=()=>{let p=[i(),r(),n(),s(),o(),[a()],[d()],[m()],[t()],[c()]];return[e({path:"features/index.md",title:"Features",summary:"What Phoenix capabilities support, their constraints and the canonical SDK documentation.",intro:"Read only the guide the task needs. Each guide teaches its part of the `phx` global and names the SDK documents to read with `pnpm phoenix docs -r <path>`; a link does not make its destination required reading.",guides:p.flatMap(e=>e.slice(0,1)),notes:["## Browse the SDK docs\n\n`pnpm phoenix docs` lists every category with its document count, `-c '<Category>'` shows one category's documents with descriptions and `-l` lists every path with its title. `-s '<text>'` matches literal text line by line, so search for one distinctive term, such as an API or YAML key, rather than a phrase.","## Topic map\n\nTopics no guide covers yet point straight to the canonical SDK docs.\n\n### Project and customization\n\n- `docs/phoenix/getting-started.mdx`, `docs/phoenix/quickstart.mdx` — setup and a complete worked configurator.\n- `docs/phoenix/best-practices.mdx` — supported composition and extension patterns.\n- `docs/phoenix/project-structure.mdx` — authored folders, generated files and naming rules.\n- `docs/phoenix/theming.mdx`, `docs/ux-guidelines/overview.mdx` — theme, branding and interaction principles.\n- The **3d scene**, **Drag & Drop**, **Performance** and **Complex Use Cases** categories — materials, lights, cameras, dragging and snapping, and worked combinations.\n\n### Webhooks and finalization\n\n- `docs/phoenix/webhooks.mdx`, `docs/phoenix/finalization.mdx` — execution, tasks, PDF, email and CSV.\n- `docs/phoenix/blender-rendering.mdx` — server-rendered images of the `GenerateImages` task.\n- `docs/other-features/client-side-rendering/declarative.mdx` — configurator-rendered images in PDFs and emails.\n\n### Data sources\n\n- `docs/phoenix/data-sources.mdx`, `docs/phoenix/connected-data-sources.mdx` — published, frontend, session and backend data, and connected sheets.\n\n### Admin and Studio\n\n- `docs/phoenix/admin.mdx`, `docs/phoenix/publishing.mdx` — project content administration and published revisions.\n- `docs/phoenix/sdk-builder-workflow.mdx` — Studio workspaces, projects, environments and builds.\n\n### CLI, access and deployment\n\n- `docs/phoenix/phoenix-cli.mdx` — login, dependencies, sync, dev, build and check.\n- `docs/phoenix/sessions-and-access.mdx`, `docs/phoenix/clerk-sign-in.mdx` — configurator access and project authentication.\n- `docs/phoenix/deployments.mdx` — environments and server builds."]}),...p.flat()]};
1
+ import{createPhoenixIndexGuide as e}from"../guide.js";import{generatePhoenixApplicationStatesGuides as n}from"./application-states/index.js";import{generatePhoenixAssistantGuides as o}from"./assistant/index.js";import{generatePhoenixCustomLayoutGuides as t}from"./custom-layout/index.js";import{generatePhoenixDomainControlsGuides as s}from"./domain-controls/index.js";import{generatePhoenixDomainModelGuides as i}from"./domain-model/index.js";import{generatePhoenixInspectionFeature as a}from"./inspection.js";import{generatePhoenixLocalizationFeature as d}from"./localization.js";import{generatePhoenixSceneObjectsFeature as r}from"./scene-objects.js";import{generatePhoenixStateGuides as c}from"./state/index.js";import{generatePhoenixVariantsFeature as p}from"./variants.js";import{generatePhoenixWebhooksGuides as m}from"./webhooks/index.js";export const generatePhoenixFeatureGuides=()=>{let h=[i(),c(),n(),s(),t(),o(),[d()],[r()],m(),[a()],[p()]];return[e({path:"features/index.md",title:"Features",summary:"What Phoenix capabilities support, their constraints and the canonical SDK documentation.",intro:"Read only the guide the task needs. Each guide teaches its part of the `phx` global and names the SDK documents to read with `pnpm phoenix docs -r <path>`; a link does not make its destination required reading.",guides:h.flatMap(e=>e.slice(0,1)),notes:["## Browse the SDK docs\n\n`pnpm phoenix docs` lists every category with its document count, `-c '<Category>'` shows one category's documents with descriptions and `-l` lists every path with its title. `-s '<text>'` matches literal text line by line, so search for one distinctive term, such as an API or YAML key, rather than a phrase.","## Topic map\n\nTopics no guide covers yet point straight to the canonical SDK docs.\n\n### Project and customization\n\n- `docs/phoenix/getting-started.mdx`, `docs/phoenix/quickstart.mdx` — setup and a complete worked configurator.\n- `docs/phoenix/best-practices.mdx` — supported composition and extension patterns.\n- `docs/phoenix/project-structure.mdx` — authored folders, generated files and naming rules.\n- `docs/phoenix/theming.mdx`, `docs/ux-guidelines/overview.mdx` — theme, branding and interaction principles.\n- The **3d scene**, **Drag & Drop**, **Performance** and **Complex Use Cases** categories — materials, lights, cameras, dragging and snapping, and worked combinations.\n\n### Data sources\n\n- `docs/phoenix/data-sources.mdx`, `docs/phoenix/connected-data-sources.mdx` — published, frontend, session and backend data, and connected sheets.\n\n### Admin and Studio\n\n- `docs/phoenix/admin.mdx`, `docs/phoenix/publishing.mdx` — project content administration and published revisions.\n- `docs/phoenix/sdk-builder-workflow.mdx` — Studio workspaces, projects, environments and builds.\n\n### CLI, access and deployment\n\n- `docs/phoenix/phoenix-cli.mdx` — login, dependencies, sync, dev, build and check.\n- `docs/phoenix/sessions-and-access.mdx`, `docs/phoenix/clerk-sign-in.mdx` — configurator access and project authentication.\n- `docs/phoenix/deployments.mdx` — environments and server builds."]}),...h.flat()]};
@@ -1,4 +1,4 @@
1
- import{createPhoenixFeatureGuide as t}from"../../guide.js";let i=`A missing purpose is a \`warning\`: the change stays, the purpose step's Next waits for it, and finalizing waits for it like for every other warning. Its priority puts its text alone in the finalize hint while lower-ranked warnings also hold.
1
+ import{createPhoenixFeatureGuide as t}from"../../guide.js";let e=`A missing purpose is a \`warning\`: the change stays, the purpose step's Next waits for it, and finalizing waits for it like for every other warning. Its priority puts its text alone in the finalize hint while lower-ranked warnings also hold.
2
2
 
3
3
  \`\`\`yaml
4
4
  # spec/invariants.yaml
@@ -33,4 +33,4 @@ export const PurposeNextButton = () => {
33
33
  </Tooltip>
34
34
  )
35
35
  }
36
- \`\`\``;export const generatePhoenixViolationsFeature=()=>t({path:"features/state/violations.md",title:"Violations",summary:"How violations disable control options, become hints and gate finalizing; read when a control or button must reflect what a change would break or what still blocks the configuration.",whenToUse:"Read when a control must show what an option would break, when hint text needs ranking or custom wording, or when Next or Finalize must wait for the configuration's problems. Declaring invariants, choosing a severity and repairing with transformers belong to [Validation and repair](../domain-model/validation-and-repair.md).",capabilities:"### Where violations surface\n\n- **Controls** — every option is dry-run ([Updates and dry runs](updates.md#dry-runs)). An option is `disabled` when its dry run, after transformers, still has a `fatal` or `fixable` violation or an invariant throws; its hint is the text of those violations. A `warning` or `notice` never disables an option.\n- **Messages** — a rejected commit reaches the potentially invalid slice, and its violations become configurator messages. They include every violation of that state, notices and warnings too, so check `violation.severity`. [Messages](../custom-layout/messages.md) owns showing them.\n- **Finalizing** — reads the committed state: a `warning` or a failed save blocks it, a `notice` only adds text.\n\n### Control violations\n\n`phx.frontend.useControlViolations(ignoredTypes)` returns a function from a prepared emission to `{ disabled, hints, violations }`:\n\n- no violation — enabled, no hint;\n- `notice` or `warning` — enabled, no hint, `violations` listed;\n- `fatal` or `fixable` — disabled, `hints` from those violations, `violations` all of them;\n- an invariant that throws — disabled, no hint. A transformer that throws is not caught: the control's render throws.\n\nPrefer `phx.frontend.useUpdateControl` from [Custom controls](../domain-controls/custom-controls.md), which prepares the emission and applies this mapping. Call `useControlViolations` yourself only for an emission you prepared, such as a dialog listing from `violations` what an option would break.\n\n`fixableViolations`, an argument of every control hook and of both update hooks, only removes those violation types from the hint text: the option stays disabled. List a type when another part of the UI explains it. To keep an option enabled, repair the violation in a transformer, so its dry run ends valid.\n\n### Hint text\n\n- Hints keep only the violations with the highest `controlViolationPriority` (default 0), drop duplicates and join several as sentences. Rank a root cause above its consequences, such as size above color.\n- Ignored types are removed before the highest priority is found, so ignoring the top-ranked violation shows the next one.\n- Set `controlViolationPriority` on a YAML invariant or on a violation returned from TypeScript. The finalize hint applies the same ranking.\n- A TypeScript violation may add `formatControlViolationMessage(emission, { i18n })`: a hint naming the attempted value, or `null` to drop this hint, such as for all but one of identical violations. Messages keep using `message`.\n- `message` is optional on a TypeScript violation, and messages fall back to its type. In YAML it is a string or `$msg`; [Localization](../localization.md) covers the catalogs.\n- `phx.frontend.useMapViolationHints(ignoreTypes?)` returns `(violations, emission) => string`, the hint text these rules make from any violations. For the committed state, take the emission from `phx.frontend.useCommittedSlice()`.\n\n### Finalize and step gating\n\n`phx.frontend.useFinalizeViolations()` returns `{ disabled, hints, violations }` for the committed state:\n\n- `disabled` while a `warning` holds or the last save failed; `hints` then says why, and `violations` is `undefined` for a failed save;\n- a `notice` leaves it enabled, with its text in `hints`;\n- `violations` lists the committed state's violations, `undefined` when there are none.\n\n`phx.frontend.useStateValidity()` returns the validity of the last committed emission: `{ valid: true, severity: null }`, or `{ valid: true, severity: 'warning' | 'notice', entityViolations }`. A `fatal` or `fixable` violation is never committed, so a `warning` is the problem the committed state can still have. Its type also lists the rejected results: narrow on `severity` before reading `entityViolations`.\n\n- Gate Finalize with `disabled` and show `hints` beside it; `useFinalizeActions` already returns both ([Finalization actions](../custom-layout/finalization-actions.md)).\n- Next enforces nothing by itself ([Tabs and steps](../custom-layout/tabs-and-steps.md)). Gate it with `disabled` and show `hints`. `useStateValidity().severity === 'warning'` holds it for the configuration alone, ignoring a failed save, and gives no text.\n- When a step waits only for its own problems, filter `violations` by their types and word them with `useMapViolationHints`.",example:i,documentation:'Read each with `pnpm phoenix docs -r <path>`:\n\n- `docs/other-features/violation-messages.mdx` — `controlViolationPriority` and `formatControlViolationMessage` worked through four ranked violations, with localized hint text.\n- `docs/other-features/violation-severity.mdx` — what each severity does to controls and finalizing; [Validation and repair](../domain-model/validation-and-repair.md) owns choosing one.\n- `docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx` — controls ordered so transformers repair lower choices, with `fixableViolations` shortening each hint.\n- `docs/phoenix/configurator-interface.mdx` — "Violations" lists the violation hooks with what each returns.',phxMembers:["frontend.useControlViolations","frontend.useFinalizeViolations","frontend.useStateValidity","frontend.useMapViolationHints"]});
36
+ \`\`\``;export const generatePhoenixViolationsFeature=()=>t({path:"features/state/violations.md",title:"Violations",summary:"How violations disable control options, become hints and gate finalizing; read when a control or button must reflect what a change would break or what still blocks the configuration.",whenToUse:"Read when a control must show what an option would break, when hint text needs ranking or custom wording, or when Next or Finalize must wait for the configuration's problems. Declaring invariants, choosing a severity and repairing with transformers belong to [Validation and repair](../domain-model/validation-and-repair.md).",capabilities:"### Where violations surface\n\n- **Controls** — every option is dry-run ([Updates and dry runs](updates.md#dry-runs)). An option is `disabled` when its dry run, after transformers, still has a `fatal` or `fixable` violation or an invariant throws; its hint is the text of those violations. A `warning` or `notice` never disables an option.\n- **Messages** — a rejected commit reaches the potentially invalid slice, and its violations become configurator messages. They include every violation of that state, notices and warnings too, so check `violation.severity`. [Messages](../custom-layout/messages.md) owns showing them.\n- **Finalizing** — reads the committed state: a `warning` or a failed save blocks it, a `notice` only adds text.\n\n### Control violations\n\n`phx.frontend.useControlViolations(ignoredTypes)` returns a function from a prepared emission to `{ disabled, hints, violations }`:\n\n- no violation — enabled, no hint;\n- `notice` or `warning` — enabled, no hint, `violations` listed;\n- `fatal` or `fixable` — disabled, `hints` from those violations, `violations` all of them;\n- an invariant that throws — disabled, no hint. A transformer that throws is not caught: the control's render throws.\n\nPrefer `phx.frontend.useUpdateControl` from [Custom controls](../domain-controls/custom-controls.md), which prepares the emission and applies this mapping. Call `useControlViolations` yourself only for an emission you prepared, such as a dialog listing from `violations` what an option would break.\n\n`fixableViolations`, an argument of every control hook and of both update hooks, only removes those violation types from the hint text: the option stays disabled. List a type when another part of the UI explains it. To keep an option enabled, repair the violation in a transformer, so its dry run ends valid.\n\n### Hint text\n\n- Hints keep only the violations with the highest `controlViolationPriority` (default 0), drop duplicates and join several as sentences. Rank a root cause above its consequences, such as size above color.\n- Ignored types are removed before the highest priority is found, so ignoring the top-ranked violation shows the next one.\n- Set `controlViolationPriority` on a YAML invariant or on a violation returned from TypeScript. The finalize hint applies the same ranking.\n- A TypeScript violation may add `formatControlViolationMessage(emission, { i18n })`: a hint naming the attempted value, or `null` to drop this hint, such as for all but one of identical violations. When every hint is dropped, the first violation's `message` is shown, so a disabled option always says why. Messages keep using `message`.\n- The AI assistant reads a change it cannot make by these rules too: each reason's `message`, and the formatted hint as `details` when it differs.\n- `message` is optional on a TypeScript violation, and messages fall back to its type. In YAML it is a string or `$msg`; [Localization](../localization.md) covers the catalogs.\n- `phx.frontend.useMapViolationHints(ignoreTypes?)` returns `(violations, emission) => string`, the hint text these rules make from any violations. For the committed state, take the emission from `phx.frontend.useCommittedSlice()`.\n\n### Finalize and step gating\n\n`phx.frontend.useFinalizeViolations()` returns `{ disabled, hints, violations }` for the committed state:\n\n- `disabled` while a `warning` holds or the last save failed; `hints` then says why, and `violations` is `undefined` for a failed save;\n- a `notice` leaves it enabled, with its text in `hints`;\n- `violations` lists the committed state's violations, `undefined` when there are none.\n\n`phx.frontend.useStateValidity()` returns the validity of the last committed emission: `{ valid: true, severity: null }`, or `{ valid: true, severity: 'warning' | 'notice', entityViolations }`. A `fatal` or `fixable` violation is never committed, so a `warning` is the problem the committed state can still have. Its type also lists the rejected results: narrow on `severity` before reading `entityViolations`.\n\n- Gate Finalize with `disabled` and show `hints` beside it; `useFinalizeActions` already returns both ([Finalization actions](../custom-layout/finalization-actions.md)).\n- Next enforces nothing by itself ([Tabs and steps](../custom-layout/tabs-and-steps.md)). Gate it with `disabled` and show `hints`. `useStateValidity().severity === 'warning'` holds it for the configuration alone, ignoring a failed save, and gives no text.\n- When a step waits only for its own problems, filter `violations` by their types and word them with `useMapViolationHints`.",example:e,documentation:'Read each with `pnpm phoenix docs -r <path>`:\n\n- `docs/other-features/violation-messages.mdx` — `controlViolationPriority` and `formatControlViolationMessage` worked through four ranked violations, with localized hint text.\n- `docs/other-features/violation-severity.mdx` — what each severity does to controls and finalizing; [Validation and repair](../domain-model/validation-and-repair.md) owns choosing one.\n- `docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx` — controls ordered so transformers repair lower choices, with `fixableViolations` shortening each hint.\n- `docs/phoenix/configurator-interface.mdx` — "Violations" lists the violation hooks with what each returns.',phxMembers:["frontend.useControlViolations","frontend.useFinalizeViolations","frontend.useStateValidity","frontend.useMapViolationHints"]});
@@ -1 +1 @@
1
- import{createPhoenixFeatureGuide as e}from"../guide.js";export const generatePhoenixVariantsFeature=()=>e({path:"features/variants.md",title:"Variants",summary:"Supported alternative types, preview constraints and usage; read when preparing a comparison in the live preview and applying the choice.",whenToUse:"Read when preparing a visual or interaction comparison in the running preview. The [workflow](../core/workflow.md#visual-choices) owns whether alternatives would help; this guide covers the supported options and how to collect and apply a choice.",capabilities:'### Option types\n\n- Use `<id>.variant.js` to edit real frontend project files on top of one captured baseline. Use `<id>.html` for a standalone branding, layout or flow proposal rendered in an iframe.\n- Use the same mechanism for controls, layout, brand, lights, visuals, materials, positions, components, elements and transformers.\n- Keep the model, schemas, data, assistant server settings, webhooks and code shared with them, dependencies, environment and uploaded assets unchanged. The preview rejects changes needing server preparation.\n- Options reuse the already loaded configurator, one at a time. Variant transactions bypass the file-watcher debounce; hot reload still takes time to apply, without a special wait for rendering to settle.\n\n### Design the comparison\n\n- One decision per set, one set open at a time. Vary the decision being compared and keep unrelated details identical.\n- Make the difference visible in the UI or the scene; similar materials in flat light may not distinguish the alternatives.\n- Choose the number of options that clarifies the decision; no fixed count is required.\n- Name options in the client\'s product language and explain what changes in one line.\n\n### Write the options\n\n- One folder per set: `.phoenix/variants/<name>/`, one script or HTML file per option. HTML and scripts can share a set, but option ids must be unique. Keep HTML self-contained. This folder survives rebuilds and is never committed.\n- For HTML, set `<title>` and `<meta name="description" content="...">`; choosing a page changes no source files.\n- For scripts, export `title` and `description` as plain string literals, and a default function `({ read, write, remove }) => {}`; it may be async.\n- `read(path)` returns the original baseline file contents. `write(path, contents)` replaces or creates a file; `remove(path)` deletes it. Paths are relative to the project root.\n- Scripts run once per selection in the browser and collect edits. Phoenix validates and writes the whole batch locally and owns backups and undo. Do not perform your own filesystem or network operations.\n- Supported edits are YAML in `spec/` outside `spec/admin/`, and TypeScript under `src/components`, `transformers`, `handlers`, `elements` and `_`-prefixed shared folders. Expressions, actions and invariants run on the server too, so they cannot be edited.\n- Every option starts from the same baseline. Original restores it; switching restores the files only the previous option changed.\n- Keep the working tree untouched while comparing. Phoenix never overwrites an edit made outside the preview: it refuses to switch options over one, and when the comparison ends it leaves that file as it is and warns in the dev log.\n\n### Run it and wait\n\n```bash\npnpm phoenix variants .phoenix/variants/<name> --title \'<the question>\' --description \'<what differs between the options>\'\n```\n\n- `pnpm phoenix dev` must be running with the preview open in a browser. Tell the client the options are open there.\n- Put the title and the description in single quotes, so the shell passes backticks, `$` and double quotes through unchanged. In bash or zsh, write a single quote inside them as `\'\\\'\'`; in PowerShell, double it instead.\n- The command waits for the answer, 540 seconds unless `--timeout <seconds>` says otherwise, so give it a command timeout longer than that. It prints JSON:\n - `"status": "chosen"` with `choice` (the option id, or `null` for Original) and `label`;\n - `"status": "waiting"` when the wait ran out. The options stay open: run the same command again, or end the turn and run it when the client is back. An answer given in between is returned by the next run;\n - `"status": "closed"` when the preview was closed without an answer.\n- `pnpm phoenix variants --close` closes the open set when the comparison is abandoned.\n- `--port <port>` names the editor WebSocket port when `phoenix dev` does not use 3020.\n- The live configurator keeps its current configuration. Interactions still change it; restoring source files does not undo configuration changes.\n\n### Use the answer\n\n- **Chosen** — a script\'s exact file edits remain in the project. For an HTML choice, implement the selected proposal using the SDK and compare the result with the page. With `choice: null`, the client chose Original and the baseline remains. Verify the result with `pnpm phoenix inspect:scene` and `pnpm phoenix screenshot`, and tell the client anything that came out differently.\n- Record the decision and its reason in the [project record](../core/workflow.md#records).\n- The client confirms Original or another option; Escape and the backdrop do not close the comparison. `--close` restores the baseline source files without an answer. The folder is removed once the client answers; pass `--keep` while its files are still needed to build from, and remove the folder afterwards.',example:"Compare warm and neutral lighting with two variant scripts while keeping the product and camera unchanged. Use HTML proposals instead when comparing standalone pages, such as branding sheets, then implement the selected proposal in the project. Original remains available as the captured baseline.",documentation:"Read `docs/phoenix/phoenix-cli.mdx` with `pnpm phoenix docs -r docs/phoenix/phoenix-cli.mdx` for the CLI contract. Use the [review index](../processes/review/index.md) to select evidence for the applied result.",phxMembers:[]});
1
+ import{createPhoenixFeatureGuide as e}from"../guide.js";export const generatePhoenixVariantsFeature=()=>e({path:"features/variants.md",title:"Variants",summary:"Supported alternative types, preview constraints and usage; read when preparing a comparison in the live preview and applying the choice.",whenToUse:"Read when preparing a visual or interaction comparison in the running preview. The [workflow](../core/workflow.md#visual-choices) owns whether alternatives would help; this guide covers the supported options and how to collect and apply a choice.",capabilities:'### Option types\n\n- Use `<id>.variant.js` to edit real frontend project files on top of one captured baseline. Use `<id>.html` for a standalone branding, layout or flow proposal rendered in an iframe.\n- Use the same mechanism for controls, layout, brand, lights, visuals, materials, positions, components, elements and transformers.\n- Keep the model, schemas, data, assistant server settings, webhooks and code shared with them, dependencies, environment and uploaded assets unchanged. The preview rejects changes needing server preparation.\n- Options reuse the already loaded configurator, one at a time. Variant transactions bypass the file-watcher debounce; hot reload still takes time to apply, without a special wait for rendering to settle.\n\n### Design the comparison\n\n- One decision per set, one set open at a time. Vary the decision being compared and keep unrelated details identical.\n- Make the difference visible in the UI or the scene; similar materials in flat light may not distinguish the alternatives.\n- Choose the number of options that clarifies the decision; no fixed count is required.\n- Name options in the client\'s product language and explain what changes in one line.\n\n### Write the options\n\n- One folder per set: `.phoenix/variants/<name>/`, one script or HTML file per option. HTML and scripts can share a set, but option ids must be unique. Keep HTML self-contained. This folder survives rebuilds and is never committed.\n- For HTML, set `<title>` and `<meta name="description" content="...">`; choosing a page changes no source files.\n- For scripts, export `title` and `description` as plain string literals, and a default function `({ read, write, remove }) => {}`; it may be async.\n- `read(path)` returns the original baseline file contents. `write(path, contents)` replaces or creates a file; `remove(path)` deletes it. Paths are relative to the project root.\n- Scripts run once per selection in the browser and collect edits. Phoenix validates and writes the whole batch locally and owns backups and undo. Do not perform your own filesystem or network operations.\n- Supported edits are YAML in `spec/` outside `spec/admin/`, and TypeScript under `src/components`, `transformers`, `handlers`, `elements` and `_`-prefixed shared folders. Expressions and invariants run on the server too; those folders and action files are outside the supported edit surface.\n- Every option starts from the same baseline. Original restores it; switching restores the files only the previous option changed.\n- Keep the working tree untouched while comparing. Phoenix never overwrites an edit made outside the preview: it refuses to switch options over one, and when the comparison ends it leaves that file as it is and warns in the dev log.\n\n### Run it and wait\n\n```bash\npnpm phoenix variants .phoenix/variants/<name> --title \'<the question>\' --description \'<what differs between the options>\'\n```\n\n- `pnpm phoenix dev` must be running with the preview open in a browser. Tell the client the options are open there.\n- Put the title and the description in single quotes, so the shell passes backticks, `$` and double quotes through unchanged. In bash or zsh, write a single quote inside them as `\'\\\'\'`; in PowerShell, double it instead.\n- The command waits for the answer, 540 seconds unless `--timeout <seconds>` says otherwise, so give it a command timeout longer than that. It prints JSON:\n - `"status": "chosen"` with `choice` (the option id, or `null` for Original) and `label`;\n - `"status": "waiting"` when the wait ran out. The options stay open: run the same command again, or end the turn and run it when the client is back. An answer given in between is returned by the next run;\n - `"status": "closed"` when the preview was closed without an answer.\n- `pnpm phoenix variants --close` closes the open set when the comparison is abandoned.\n- `--port <port>` names the editor WebSocket port when `phoenix dev` does not use 3020.\n- The live configurator keeps its current configuration. Interactions still change it; restoring source files does not undo configuration changes.\n\n### Use the answer\n\n- **Chosen** — a script\'s exact file edits remain in the project. For an HTML choice, implement the selected proposal using the SDK and compare the result with the page. With `choice: null`, the client chose Original and the baseline remains. Verify the result with `pnpm phoenix inspect:scene` and `pnpm phoenix screenshot`, and tell the client anything that came out differently.\n- Record the decision and its reason in the [project record](../core/workflow.md#records).\n- The client confirms Original or another option; Escape and the backdrop do not close the comparison. `--close` restores the baseline source files without an answer. The folder is removed once the client answers; pass `--keep` while its files are still needed to build from, and remove the folder afterwards.',example:"Compare warm and neutral lighting with two variant scripts while keeping the product and camera unchanged. Use HTML proposals instead when comparing standalone pages, such as branding sheets, then implement the selected proposal in the project. Original remains available as the captured baseline.",documentation:"Read `docs/phoenix/phoenix-cli.mdx` with `pnpm phoenix docs -r docs/phoenix/phoenix-cli.mdx` for the CLI contract. Use the [review index](../processes/review/index.md) to select evidence for the applied result.",phxMembers:[]});
@@ -0,0 +1,3 @@
1
+ import { type PhoenixGuide } from '../../guide.js';
2
+ /** Access modes and the handler files that customise their sign-in: what each allows and what a handler returns. */
3
+ export declare const generatePhoenixWebhookAuthenticationFeature: () => PhoenixGuide;
@@ -0,0 +1,48 @@
1
+ import{createPhoenixFeatureGuide as e}from"../../guide.js";let s=`Dealers arrive from a portal with a code and read dealer prices; everyone else browses with retail prices:
2
+
3
+ \`\`\`yaml
4
+ # spec/session.yaml
5
+ access: custom
6
+ sessionData:
7
+ type: object
8
+ properties:
9
+ customerGroup:
10
+ type: string
11
+ enum:
12
+ - retail
13
+ - dealer
14
+ additionalProperties: false
15
+ \`\`\`
16
+
17
+ \`\`\`ts
18
+ // src/handlers/dealer-sign-in.ts
19
+ export default phx.access.createCodeHandler(async ({ accessToken }) => {
20
+ const response = await fetch(\`\${phx.webhooksEnv.CRM_API_URL}/dealers/me\`, {
21
+ headers: { authorization: \`Bearer \${accessToken}\` },
22
+ })
23
+
24
+ if (!response.ok) {
25
+ console.warn(\`The CRM refused the dealer token with status \${response.status}.\`)
26
+
27
+ return { success: false }
28
+ }
29
+
30
+ const dealer: { readonly id: string } = await response.json()
31
+
32
+ return { success: true, role: 'user', data: { customerGroup: 'dealer' }, userId: dealer.id }
33
+ })
34
+ \`\`\`
35
+
36
+ \`\`\`ts
37
+ // src/handlers/retail-visitors.ts
38
+ export default phx.access.createAnonymousHandler(async () => ({
39
+ success: true,
40
+ role: 'anonymous',
41
+ data: { customerGroup: 'retail' },
42
+ }))
43
+ \`\`\`
44
+
45
+ \`\`\`ts
46
+ // src/handlers/chunk-scopes.ts
47
+ export default phx.access.createChunkScopesHandler(({ data }) => (data.customerGroup === 'dealer' ? ['dealer'] : []))
48
+ \`\`\``;export const generatePhoenixWebhookAuthenticationFeature=()=>e({path:"features/webhooks/authentication.md",title:"Authentication",summary:"Access modes and the `phx.access` handler files: who signs in, chunk scopes, visitors, Studio-account sign-ins, a project's own code, refresh and anonymous sign-in, roles and session data; read when the configurator signs users in or treats some of them differently.",whenToUse:"Read when configurator users sign in, arrive from a host application, need different roles or prices, or when anonymous access must be refused.",capabilities:"### Choosing the mode\n\n- `access` in `spec/application.yaml` says who can open the configurator and who signs its users in; only `custom` needs sign-in code of its own:\n - `public` — the default; everyone opens it as a visitor.\n - `invited` — only people invited to the project open it, signed in with a Studio account.\n - `public-with-sign-in` — visitors open it, and invited people can sign in with a Studio account; place the account control ([Sign-in pages and account control](../custom-layout/sign-in.md)).\n - `custom` — the project's own handlers sign people in and decide every role, admin included.\n - `legacy-clerk` — the workspace's Clerk signs people in and visitors get in.\n- In `public`, `invited` and `public-with-sign-in` a Studio-account sign-in with the project's Admin or Superadmin role gets Project Admin. Project code cannot grant a role there: a visitor is always anonymous, and the server refuses a project's own code and refresh sign-in. A sign-in lasts up to 30 days and ends at the next deploy, its sessions three hours (see the Studio-account sign-in section of `docs/phoenix/webhooks.mdx`). In `invited` and `public-with-sign-in` the other `sessionData` properties are set per person in Studio ([Session fields set in Studio](session-fields.md)). These modes need Studio accounts; a Clerk workspace gets a warning and uses `legacy-clerk` or `custom`.\n- In the three Studio-account modes the session data holds the person's `id`, `emailAddress`, `fullName`, `tags` and `accessToken` undeclared; declaring one with another type fails with `COGNITO_SESSION_DATA_INCOMPATIBLE`. Visitors carry none.\n- `useAuthHook`, `useClerk` and `useCognito` are deprecated: parsing reports `ACCESS_FLAGS_DEPRECATED` with the mode they map to, or fails with `ACCESS_WITH_DEPRECATED_FLAGS` beside `access`.\n\n### Customising the sign-in with handler files\n\n- Customise the sign-in with a file in `src/handlers/` that default-exports one `phx.access` handler. Parsing finds the call (use the factory's full name) and bundles the file into the webhook only, so it may import server-only modules. Parsing fails with `ACCESS_HANDLER_DUPLICATE` for a second file of a kind, `ACCESS_HANDLER_NOT_EXPORTED` for a handler not default-exported, `ACCESS_HANDLER_NOT_ALONE` for other handlers beside it, and `ACCESS_HANDLER_NOT_ALLOWED` for a kind the mode does not allow:\n - `phx.access.createChunkScopesHandler(({ role, data }) => [...])` — every mode. It returns the published-data chunk scopes a session may read; `public` is always added. Read `docs/phoenix/publishing.mdx` before scoping chunks.\n - `phx.access.createVisitorHandler(async ({ data }) => ({ data }))` — `public` and `public-with-sign-in`. It adds session data for visitors (people not signed in) and cannot refuse one.\n - `phx.access.createSignedInHandler(async ({ user, role, data }) => ({ data: { ... } }))` — `invited` and `public-with-sign-in`. It runs at each Studio-account sign-in and refresh, about every three hours per person, and so does any outside call it makes. It receives `user` (`id`, `email`, `name` or `null`), the `role` and the session data with the Studio values:\n - `{ data }` merges over that data, property by property; one `sessionData` does not declare or that does not fit is left out with a warning in the logs.\n - `{ allow: false }` refuses the person, admins included, so also out of Project Admin: `403` with `code: 'access-refused'`.\n - A throw, any other answer, or none within ten seconds fails the sign-in with `503` and `code: 'sign-in-unavailable'`; it never lets the person in.\n - A changed `id`, `emailAddress`, `fullName`, `tags` or `accessToken` is refused, and the role cannot change.\n - `phx.access.createCodeHandler`, `phx.access.createRefreshHandler` and `phx.access.createAnonymousHandler` — `custom` only. They answer the three flows of the project's own sign-in, picked by what the browser sends:\n - **Code** — a host application's backend deposited its token and handed the configurator a one-time code; the handler receives `{ accessToken, refreshToken?, idToken? }` and decides who signs in.\n - **Refresh** — the browser holds a refresh token an earlier answer returned; the handler receives `{ refreshToken }`.\n - **Anonymous** — neither; the handler grants or refuses a session to users who are not signed in, and without it their sessions fail.\n- `custom` with neither `src/webhooks/index.ts` nor a code, refresh or anonymous handler reports `AUTH_WITHOUT_PROJECT_WEBHOOK`.\n- An auth hook assembled in `src/webhooks/` is deprecated and reports `AUTH_HOOK_DEPRECATED`; with `access` set to `public`, `invited` or `public-with-sign-in` it fails with `AUTH_HOOK_NOT_ALLOWED`. Move its handlers to handler files.\n- Under `phoenix dev` the sign-in has 15 seconds to answer.\n\n### What a sign-in handler returns\n\n- `{ success: false }` refuses the session. `{ success: true, role, data }` grants it:\n - `role` — `anonymous`, `user`, `admin` or `superadmin`. The admin roles also open Project Admin.\n - `data` — the session data, validated strictly against the spec's `sessionData` schema. The schema declares no required properties, because Admin and preset sessions carry none, so readers handle a missing field. Webhook calls read it as `data.sessionPayload`. It is readable in the browser, so it never holds a credential such as an API key.\n - `userId` — the person's stable id, which their configurations and assistant threads follow.\n - `refreshToken` — returned to the browser for the refresh flow; return one only together with a refresh handler.\n - `expirationTime` — when the session ends, as a Unix timestamp in seconds, not a duration. Leave it out unless the client needs other session lengths: the platform's session tracking assumes the three-hour default.",example:s,documentation:"Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/phoenix/sessions-and-access.mdx` — sessions, roles, the session user and access to configurations.\n- `docs/phoenix/clerk-sign-in.mdx` — Clerk sign-in, its handlers and pages.\n- `docs/phoenix/integration/authentication-internal.mdx` and `authentication-external.mdx` — a host application signing its users in with a code.",phxMembers:["access.createChunkScopesHandler","access.createVisitorHandler","access.createSignedInHandler","access.createCodeHandler","access.createRefreshHandler","access.createAnonymousHandler"]});
@@ -0,0 +1,3 @@
1
+ import { type PhoenixGuide } from '../../guide.js';
2
+ /** Backend data: the webhook handler that fetches per-session data, when it runs and how the project reads it. */
3
+ export declare const generatePhoenixWebhookBackendDataFeature: () => PhoenixGuide;
@@ -0,0 +1,45 @@
1
+ import{createPhoenixFeatureGuide as e}from"../../guide.js";let a=`Lead times depend on the customer group and come from the CRM:
2
+
3
+ \`\`\`yaml
4
+ # spec/backend-data.yaml
5
+ backendData:
6
+ type: object
7
+ properties:
8
+ leadTimeDays:
9
+ type: number
10
+ required:
11
+ - leadTimeDays
12
+ additionalProperties: false
13
+ \`\`\`
14
+
15
+ \`\`\`ts
16
+ // src/webhooks/backend-data.ts
17
+ type FetchBackendData = Parameters<typeof phx.webhooks.webhookBuilder.withFetchBackendData>[0]
18
+
19
+ const FALLBACK_LEAD_TIME_DAYS = 28
20
+
21
+ const fetchLeadTimeDays = async (customerGroup: string): Promise<number> => {
22
+ const response = await fetch(\`\${phx.webhooksEnv.CRM_API_URL}/lead-times/\${customerGroup}\`, {
23
+ headers: { authorization: \`Bearer \${phx.webhooksEnv.CRM_API_TOKEN}\` },
24
+ })
25
+
26
+ if (!response.ok) {
27
+ throw new Error(\`The CRM answered with status \${response.status}.\`)
28
+ }
29
+
30
+ const { days }: { readonly days: number } = await response.json()
31
+
32
+ return days
33
+ }
34
+
35
+ export const fetchBackendData: FetchBackendData = async ({ sessionPayload }, { logger }) => {
36
+ try {
37
+ return { backendData: { leadTimeDays: await fetchLeadTimeDays(sessionPayload.customerGroup ?? 'retail') } }
38
+ } catch (error) {
39
+ // The fallback keeps the configurator and every finalization working while the CRM is down
40
+ logger.warn(\`Lead times are unavailable (\${String(error)}); using \${FALLBACK_LEAD_TIME_DAYS} days.\`)
41
+
42
+ return { backendData: { leadTimeDays: FALLBACK_LEAD_TIME_DAYS } }
43
+ }
44
+ }
45
+ \`\`\``;export const generatePhoenixWebhookBackendDataFeature=()=>e({path:"features/webhooks/backend-data.md",title:"Backend data",summary:"Data the webhook fetches per session, such as stock, lead times or customer prices, and how expressions and tasks read it; read when the configurator needs data only the server may fetch.",whenToUse:"Read when a value depends on who is configuring or changes faster than published content, and fetching it needs a credential the browser must not see.",capabilities:"### When it runs\n\n- Declare a `backendData` schema; without one the configurator never asks for backend data. Register the handler with `withFetchBackendData` in the [entry](entry-and-environment.md).\n- The configurator asks for it when it loads and again whenever its frontend data changes, and the webhook runs the handler again before every [finalization](finalization.md). The two answers can differ, and finalization uses its own.\n- A failure in the browser's request leaves backend data `undefined` and the configurator keeps running, so expressions handle `undefined`. A failure before finalization fails the finalization: catch what may fail and return a safe value when one exists.\n- Under `phoenix dev` the handler has 15 seconds to answer, and an answer above 5 MiB is refused.\n\n### What it receives and returns\n\n- The handler receives `{ sessionRole, sessionPayload, frontendData, frontendUrl, deploymentId }` and the `logger`, and returns `{ backendData }`, validated against the schema.\n- Backend data is readable in the browser. Fetch with the credentials in the webhook and return only what the configurator may show.\n- Expressions read it as `ctx.backendData` ([Expressions](../domain-model/expressions.md)) and webhook tasks as `data.backendData`. Both are `Record<string, unknown> | undefined`: the schema validates the handler's answer but does not type what reads it, so narrow each value before use.\n- Choose backend data for values that depend on who is configuring or change too often to publish: stock, lead times, customer prices. Published data suits catalogue content, frontend data what the embedding page passes in.",example:a,documentation:"Read `docs/phoenix/data-sources.mdx` with `pnpm phoenix docs -r docs/phoenix/data-sources.mdx` for every data source and its lifetime; its backend data section shows the frontend side.",phxMembers:[]});
@@ -0,0 +1,3 @@
1
+ import { type PhoenixGuide } from '../../guide.js';
2
+ /** The webhook entry, which project code joins the webhook, and its environment variables. */
3
+ export declare const generatePhoenixWebhookEntryFeature: () => PhoenixGuide;
@@ -0,0 +1,36 @@
1
+ import{createPhoenixFeatureGuide as e}from"../../guide.js";let t=`A quote configurator reads its CRM and integration credentials from the environment and registers the hooks the other webhook guides implement:
2
+
3
+ \`\`\`yaml
4
+ # spec/webhook-env.yaml
5
+ env:
6
+ webhook:
7
+ CRM_API_URL:
8
+ type: url
9
+ required: true
10
+ devDefault: http://localhost:4000
11
+ CRM_API_TOKEN:
12
+ type: str
13
+ required: true
14
+ QUOTE_SENDER:
15
+ type: str
16
+ default: quotes@example.com
17
+ WOOCOMMERCE_SHOP_URL:
18
+ type: url
19
+ WOOCOMMERCE_API_KEY:
20
+ type: str
21
+ QUOTES_SPREADSHEET_ID:
22
+ type: str
23
+ GOOGLE_SERVICE_ACCOUNT_JSON:
24
+ type: str
25
+ \`\`\`
26
+
27
+ \`\`\`ts
28
+ // src/webhooks/index.ts
29
+ import { fetchBackendData } from './backend-data.js'
30
+ import { quoteFinalization } from './finalization.js'
31
+
32
+ export default phx.webhooks.webhookBuilder
33
+ .withFetchBackendData(fetchBackendData)
34
+ .withConfiguratorFinalize(quoteFinalization)
35
+ .build()
36
+ \`\`\``;export const generatePhoenixWebhookEntryFeature=()=>e({path:"features/webhooks/entry-and-environment.md",title:"Webhook entry and environment",summary:"`src/webhooks/index.ts`, which project code runs on the server, browser-import limits and `env.webhook` variables; read when creating the webhook, adding server code or a secret, or fixing a webhook parse or build error.",whenToUse:"Read when the project needs server-side code — sign-in, backend data, finalization — or a credential, or when parsing or the build names a webhook file.",capabilities:"### The entry\n\n- The webhook is the project's server side: one bundle the platform calls for sign-in, backend data, finalization and its callback, configuration insights evaluation, Admin publishing and assistant setup. A deployed environment runs it as a cloud function; `phoenix dev` runs it on the developer's machine through the development tunnel.\n- `src/webhooks/index.ts` is the entry and default-exports `phx.webhooks.webhookBuilder` with its hooks, then `.build()`. Only that file is imported; other files in `src/webhooks/` run when it imports them. Files in `src/webhooks/` without an `index.ts` fail with `MISSING_WEBHOOK_INDEX`.\n- The builder takes `withFetchBackendData` ([Backend data](backend-data.md)) and `withConfiguratorFinalize` ([Finalization](finalization.md)). Register only what the project uses. The SDK adds sign-in for the access mode itself, customised by handler files ([Authentication](authentication.md)), [Admin publishing](publishing.md), and [assistant setup](../assistant/session-setup.md) when the spec configures the assistant.\n- `withConfigurationInsights(fields)` publishes explicitly selected scalar expressions for Studio. Each field supplies `id`, `label`, `description`, `expression` (such as `$price`), `version` and `type` (`number`, `category` or `boolean`); money also supplies `currency` and `taxBasis`. Use only deterministic expressions over saved entities and published catalog data. Session, frontend and live backend dependencies are unsupported. Ask the Phoenix team to enable Configuration insights for the project in System Studio before finalizing. It defaults off. Enabling it does not backfill older finalizations. The server evaluates against the deployment and catalog versions captured when finalization is accepted, outside the finalization request. Mutable development tunnels and historical finalizations without provenance cannot produce verified values. Do not expose personal data through these fields.\n- Without an entry the SDK builds a webhook with the sign-in of the access mode alone. `access: custom` without an entry or a sign-in handler file reports `AUTH_WITHOUT_PROJECT_WEBHOOK`.\n- A hook that throws answers with an error: the sign-in, the finalization or the publish fails. Its message reaches the server log, not the configurator user, so log what went wrong with the `logger` each hook receives.\n\n### Project code in the webhook\n\n- The spec's domain, expressions and invariants also run in the webhook. Action implementation modules load and execute only in the browser, including assistant custom mutations; assistant setup uses their shared schemas. Components, admin components and handlers are frontend-only by default.\n- A handler module that calls `phx.domain.createAssistantSetupHandler`, one of the `phx.domain.admin` publishing and validation factories or one of the `phx.access` factories joins the webhook automatically. The call is detected literally, so do not alias it.\n- Make `'use webhook'` the first statement of another component or handler the server needs, such as one that prepares the scene for server rendering. Leading comments may precede it.\n- An included file and every local file it imports must not import the browser SDK entry points (`admin`, `application`, `configurator`, `editor`, `react`, `ui`, `extras/clerk`, `extras/cognito`) or style, font and image files. Type-only imports are allowed. For files included by `'use webhook'` or a detected handler registration, parsing reports `WEBHOOK_UNSAFE_IMPORT` with the import chain. Action implementations load only in the browser and are not part of webhook assembly. Move logic both sides need into a module without them, and keep rendering in a frontend-only file.\n\n### Environment variables and secrets\n\n- Declare variables under `env.webhook`: `type` is `bool`, `str`, `num` or `url`, with an optional `default`, `devDefault` (the value under `phoenix dev`) and `required`. A variable that is neither required nor defaulted is `undefined` when unset. Read them as `phx.webhooksEnv.NAME`.\n- Values are fixed when the webhook is built: a changed value needs a restart of `phoenix dev` locally and a new deploy on an environment. Deployed builds take values from the environment variables a workspace or project Superadmin sets in Studio; `phoenix dev` takes them from `.env`, which is not committed.\n- Keep credentials in the webhook. Session data, backend data and the finalization result all reach the browser, and `env.frontend` values are public.\n- `budgets.webhookGzipMb` fails the build when the compressed webhook grows past it; `phoenix build --onlyWebhook` builds the webhook alone.",example:t,documentation:"Read with `pnpm phoenix docs -r <path>`:\n\n- `docs/phoenix/webhooks.mdx` — the entry, the built-in webhook and environment variables.\n- `docs/phoenix/webhook-membership.mdx` — which files join the webhook and the server-safe import rule.\n- `docs/phoenix/sdk-builder-workflow.mdx` — setting environment variables in Studio.",phxMembers:["webhooks.webhookBuilder"]});
@@ -0,0 +1,3 @@
1
+ import { type PhoenixGuide } from '../../guide.js';
2
+ /** Configurator finalization: the pipeline, task data and context, prefetch, resources, execution order and failure. */
3
+ export declare const generatePhoenixWebhookFinalizationFeature: () => PhoenixGuide;