@salsita-ai/sdk 0.50.0-develop.d87b28256e → 0.50.0-develop.d9534cf412

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 (1105) hide show
  1. package/README.md +5 -1
  2. package/dist/admin/AdminShell.js +1 -1
  3. package/dist/admin/legacy-admin/Application.js +1 -1
  4. package/dist/application/index.d.ts +1 -0
  5. package/dist/application/index.js +1 -1
  6. package/dist/application/mount-application.d.ts +1 -1
  7. package/dist/application/mount-application.js +1 -1
  8. package/dist/application/mount-configurator.d.ts +19 -0
  9. package/dist/application/mount-configurator.js +1 -0
  10. package/dist/application/mounted-application-runtime.d.ts +4 -0
  11. package/dist/application/mounted-application-runtime.js +1 -0
  12. package/dist/application/register-web-component.d.ts +2 -0
  13. package/dist/application/register-web-component.js +1 -0
  14. package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
  15. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  16. package/dist/application-spec/core/index.d.ts +1 -3
  17. package/dist/application-spec/core/index.js +1 -1
  18. package/dist/application-spec/core/json-schema.d.ts +2 -52
  19. package/dist/application-spec/core/markers/index.d.ts +1 -1
  20. package/dist/application-spec/core/markers/index.js +1 -1
  21. package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
  22. package/dist/application-spec/core/markers/msg-marker.js +1 -1
  23. package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
  24. package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
  25. package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
  26. package/dist/application-spec/errors/diagnostic-codes.d.ts +17 -1
  27. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  28. package/dist/application-spec/errors/diagnostic-messages.d.ts +25 -2
  29. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  30. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  31. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  32. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  33. package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
  34. package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
  35. package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
  36. package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
  37. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
  38. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
  39. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
  40. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +24 -22
  41. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  42. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  43. package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
  44. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  45. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
  46. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +7 -0
  47. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  48. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +14 -7
  49. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  50. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -4
  51. package/dist/application-spec/generate-application/implementations/phx-application-types.d.ts +25 -0
  52. package/dist/application-spec/generate-application/implementations/phx-application-types.js +1 -0
  53. package/dist/application-spec/generate-application/implementations/phx-domain.d.ts +36 -0
  54. package/dist/application-spec/generate-application/implementations/phx-domain.js +1 -0
  55. package/dist/application-spec/generate-application/implementations/phx-model.d.ts +24 -0
  56. package/dist/application-spec/generate-application/implementations/phx-model.js +1 -0
  57. package/dist/application-spec/generate-application/implementations/phx.d.ts +22 -0
  58. package/dist/application-spec/generate-application/implementations/phx.js +1 -0
  59. package/dist/application-spec/generate-application/index.d.ts +2 -0
  60. package/dist/application-spec/generate-application/index.js +1 -1
  61. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +3 -4
  62. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +7 -4
  63. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  64. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.d.ts +16 -0
  65. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +1 -0
  66. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +17 -4
  67. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  68. package/dist/application-spec/generate-application/runtime/application-spec-slice.d.ts +71 -0
  69. package/dist/application-spec/generate-application/runtime/application-spec-slice.js +1 -0
  70. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +3 -4
  71. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +7 -5
  72. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  73. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.d.ts +16 -0
  74. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
  75. package/dist/application-spec/generate-application/runtime/create-application.d.ts +57 -0
  76. package/dist/application-spec/generate-application/runtime/create-application.js +1 -0
  77. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +1 -2
  78. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +1 -1
  79. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -1
  80. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -2
  81. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -1
  82. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +1 -1
  83. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +1 -1
  84. package/dist/application-spec/generate-application/runtime/index.d.ts +8 -0
  85. package/dist/application-spec/generate-application/runtime/index.js +1 -0
  86. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +1 -2
  87. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
  88. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  89. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +1 -1
  90. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +1 -2
  91. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +9 -4
  92. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  93. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -2
  94. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  95. package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +2 -3
  96. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +1 -1
  97. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +1 -1
  98. package/dist/application-spec/generate-application/runtime/spec-runtime.d.ts +21 -0
  99. package/dist/application-spec/generate-application/runtime/spec-runtime.js +1 -0
  100. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +3 -2
  101. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +124 -24
  102. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -1
  103. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +1 -1
  104. package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
  105. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  106. package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
  107. package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
  108. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  109. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
  110. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
  111. package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
  112. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +58 -23
  113. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  114. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
  115. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
  116. package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
  117. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
  118. package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
  119. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
  120. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
  121. package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
  122. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
  123. package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
  124. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
  125. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  126. package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
  127. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +2 -3
  128. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  129. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +2 -3
  130. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
  131. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
  132. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  133. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
  134. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  135. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +2 -2
  136. package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
  137. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +4 -14
  138. package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
  139. package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
  140. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
  141. package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
  142. package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
  143. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
  144. package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
  145. package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
  146. package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
  147. package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
  148. package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
  149. package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
  150. package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
  151. package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
  152. package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
  153. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
  154. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
  155. package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
  156. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
  157. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
  158. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
  159. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  160. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.js +1 -1
  161. package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
  162. package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
  163. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
  164. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
  165. package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
  166. package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
  167. package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
  168. package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
  169. package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
  170. package/dist/client/authorized-client.d.ts +3 -1
  171. package/dist/client/authorized-client.js +1 -1
  172. package/dist/client/contract.d.ts +30 -1
  173. package/dist/client/contract.js +1 -1
  174. package/dist/client/index.d.ts +1 -1
  175. package/dist/client/local-authorized-client.d.ts +3 -1
  176. package/dist/client/local-authorized-client.js +1 -1
  177. package/dist/client/memory-authorized-client.d.ts +4 -1
  178. package/dist/client/memory-authorized-client.js +1 -1
  179. package/dist/client/phoenix-api.d.ts +259 -1
  180. package/dist/configurator/ConfiguratorApp.js +1 -1
  181. package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
  182. package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
  183. package/dist/configurator/app-loader-content/index.d.ts +1 -0
  184. package/dist/configurator/app-loader-content/index.js +1 -0
  185. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  186. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +68 -9
  187. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  188. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +52 -9
  189. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  190. package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
  191. package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
  192. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
  193. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
  194. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
  195. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  196. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +82 -55
  197. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  198. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +66 -4
  199. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  200. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
  201. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
  202. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
  203. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  204. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  205. package/dist/configurator/common/configurator-interface.d.ts +91 -7
  206. package/dist/configurator/common/configurator-interface.js +1 -1
  207. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
  208. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
  209. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +0 -6
  210. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -1
  211. package/dist/configurator/configuration-not-found-page/index.d.ts +2 -2
  212. package/dist/configurator/configuration-not-found-page/index.js +1 -1
  213. package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
  214. package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
  215. package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
  216. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +4 -0
  217. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
  218. package/dist/configurator/configurator-context/index.d.ts +0 -5
  219. package/dist/configurator/configurator-context/index.js +1 -1
  220. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +3 -3
  221. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -1
  222. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +0 -5
  223. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -1
  224. package/dist/configurator/configurator-error-page/index.d.ts +1 -2
  225. package/dist/configurator/configurator-error-page/index.js +1 -1
  226. package/dist/configurator/index.d.ts +10 -2
  227. package/dist/configurator/index.js +1 -1
  228. package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
  229. package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
  230. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  231. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  232. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  233. package/dist/configurator/pages/default-configurator-elements.d.ts +6 -1
  234. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  235. package/dist/configurator/pages/default-elements/index.d.ts +1 -0
  236. package/dist/configurator/pages/default-elements/index.js +1 -1
  237. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
  238. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
  239. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
  240. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
  241. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
  242. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
  243. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
  244. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
  245. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
  246. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
  247. package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
  248. package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
  249. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
  250. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
  251. package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.d.ts +5 -0
  252. package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.js +1 -0
  253. package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
  254. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
  255. package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
  256. package/dist/configurator/pages/error-boundaries/index.d.ts +1 -0
  257. package/dist/configurator/pages/error-boundaries/index.js +1 -1
  258. package/dist/configurator/{configurator-context → pages/provider-slots}/ConfiguratorResponsiveProvider.d.ts +3 -3
  259. package/dist/configurator/pages/provider-slots/ConfiguratorResponsiveProvider.js +1 -0
  260. package/dist/configurator/pages/provider-slots/ContainerSlotProvider.d.ts +3 -0
  261. package/dist/configurator/pages/provider-slots/ContainerSlotProvider.js +1 -0
  262. package/dist/configurator/pages/provider-slots/LoaderSlotProvider.d.ts +3 -0
  263. package/dist/configurator/pages/provider-slots/LoaderSlotProvider.js +1 -0
  264. package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.d.ts +3 -0
  265. package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.js +1 -0
  266. package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.d.ts +3 -0
  267. package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.js +1 -0
  268. package/dist/configurator/pages/provider-slots/ThemeSlotProvider.d.ts +3 -0
  269. package/dist/configurator/pages/provider-slots/ThemeSlotProvider.js +1 -0
  270. package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.d.ts +3 -0
  271. package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.js +1 -0
  272. package/dist/configurator/pages/provider-slots/index.d.ts +6 -0
  273. package/dist/configurator/pages/provider-slots/index.js +1 -0
  274. package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.d.ts +2 -0
  275. package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.js +1 -0
  276. package/dist/configurator/pages/ui-elements/configurator-ui-elements.d.ts +3 -0
  277. package/dist/configurator/pages/ui-elements/configurator-ui-elements.js +1 -0
  278. package/dist/configurator/pages/ui-elements/index.d.ts +2 -0
  279. package/dist/configurator/pages/ui-elements/index.js +1 -0
  280. package/dist/configurator/scene/index.d.ts +1 -0
  281. package/dist/configurator/scene/index.js +1 -1
  282. package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
  283. package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
  284. package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
  285. package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
  286. package/dist/configurator/toolbar-actions/index.d.ts +3 -0
  287. package/dist/configurator/toolbar-actions/index.js +1 -0
  288. package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
  289. package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
  290. package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
  291. package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
  292. package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
  293. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
  294. package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
  295. package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
  296. package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
  297. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  298. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
  299. package/dist/configurator/ui/assistant/AssistantComposer.js +2 -1
  300. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
  301. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  302. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  303. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
  304. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
  305. package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
  306. package/dist/configurator/ui/assistant/alert/index.js +1 -0
  307. package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
  308. package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
  309. package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +11 -0
  310. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
  311. package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
  312. package/dist/configurator/ui/assistant/attachments/index.js +1 -0
  313. package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +19 -0
  314. package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
  315. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  316. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -1
  317. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
  318. package/dist/configurator/ui/assistant/form/form-model.d.ts +3 -4
  319. package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
  320. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  321. package/dist/configurator/ui/assistant/form/index.js +1 -1
  322. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +3 -2
  323. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  324. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
  325. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
  326. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
  327. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
  328. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
  329. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
  330. package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
  331. package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
  332. package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +2 -2
  333. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
  334. package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
  335. package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
  336. package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
  337. package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
  338. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
  339. package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
  340. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
  341. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
  342. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +4 -1
  343. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
  344. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
  345. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +4 -1
  346. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +4 -1
  347. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
  348. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
  349. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
  350. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +4 -1
  351. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
  352. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
  353. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
  354. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +20 -16
  355. package/dist/configurator/ui/assistant/form-elements/index.d.ts +4 -0
  356. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  357. package/dist/configurator/ui/assistant/index.d.ts +3 -0
  358. package/dist/configurator/ui/assistant/index.js +1 -1
  359. package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
  360. package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
  361. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +0 -9
  362. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -1
  363. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
  364. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
  365. package/dist/configurator/ui/assistant/screenshots/index.d.ts +3 -0
  366. package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
  367. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +22 -0
  368. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
  369. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
  370. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
  371. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -2
  372. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  373. package/dist/configurator/ui/assistant/thread-items.d.ts +2 -0
  374. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  375. package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
  376. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  377. package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
  378. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  379. package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
  380. package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
  381. package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
  382. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  383. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
  384. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
  385. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  386. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  387. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
  388. package/dist/configurator/ui/index.d.ts +1 -0
  389. package/dist/configurator/ui/index.js +1 -1
  390. package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
  391. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  392. package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
  393. package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
  394. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  395. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  396. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  397. package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
  398. package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
  399. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
  400. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -6
  401. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  402. package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
  403. package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
  404. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
  405. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
  406. package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
  407. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  408. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  409. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +8 -1
  410. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  411. package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
  412. package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
  413. package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
  414. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
  415. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
  416. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
  417. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  418. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  419. package/dist/configurator/ui/preset-layout/PresetUi.d.ts +0 -2
  420. package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
  421. package/dist/configurator/ui/preset-layout/index.d.ts +6 -1
  422. package/dist/configurator/ui/preset-layout/index.js +1 -1
  423. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
  424. package/dist/docs/3d-scene/cameras/custom.mdx +4 -2
  425. package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
  426. package/dist/docs/drag-and-drop/room-planner.mdx +1 -1
  427. package/dist/docs/fabs/basic.mdx +4 -0
  428. package/dist/docs/index.json +95 -1
  429. package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
  430. package/dist/docs/layouts/custom-layout.mdx +321 -159
  431. package/dist/docs/layouts/gallery/ardent-compressor.mdx +3516 -0
  432. package/dist/docs/layouts/gallery/corvid-drone.mdx +3428 -0
  433. package/dist/docs/layouts/gallery/fenwick-window.mdx +2803 -0
  434. package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6567 -0
  435. package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
  436. package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3698 -0
  437. package/dist/docs/layouts/gallery/sunfold-solar.mdx +2683 -0
  438. package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5203 -0
  439. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  440. package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
  441. package/dist/docs/phoenix/configurator-interface.mdx +101 -17
  442. package/dist/docs/phoenix/domain-model.mdx +4 -1
  443. package/dist/docs/phoenix/layout-slots.mdx +25 -4
  444. package/dist/docs/phoenix/migration-guide.mdx +3 -3
  445. package/dist/docs/phoenix/phoenix-cli.mdx +40 -7
  446. package/dist/docs/phoenix/project-structure.mdx +23 -19
  447. package/dist/docs/phoenix/sdk-builder-workflow.mdx +7 -5
  448. package/dist/docs/phoenix/sessions-and-access.mdx +2 -0
  449. package/dist/docs/phoenix/testing.mdx +8 -3
  450. package/dist/docs/phoenix/webhooks.mdx +9 -1
  451. package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
  452. package/dist/domain/application/application-config.d.ts +6 -24
  453. package/dist/domain/application/assistant/assistant-manifest.d.ts +29 -4
  454. package/dist/domain/application/assistant/assistant-manifest.js +1 -1
  455. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +12 -9
  456. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  457. package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
  458. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  459. package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
  460. package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
  461. package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +174 -0
  462. package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
  463. package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
  464. package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
  465. package/dist/domain/application/assistant/form/index.d.ts +4 -0
  466. package/dist/domain/application/assistant/form/index.js +1 -0
  467. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  468. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  469. package/dist/domain/application/assistant/index.d.ts +4 -5
  470. package/dist/domain/application/assistant/index.js +1 -1
  471. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  472. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +4 -4
  473. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  474. package/dist/domain/application/assistant-mutations.js +1 -1
  475. package/dist/domain/application/configurator-builder.d.ts +7 -1
  476. package/dist/domain/application/configurator-builder.js +1 -1
  477. package/dist/domain/application/index.d.ts +1 -1
  478. package/dist/domain/application/index.js +1 -1
  479. package/dist/domain/application/standard-properties.js +1 -1
  480. package/dist/domain/application/web-component-property.d.ts +3 -1
  481. package/dist/domain/application/web-component-property.js +1 -1
  482. package/dist/domain/available-system-components/available-system-components.d.ts +11 -0
  483. package/dist/domain/available-system-components/available-system-components.js +1 -0
  484. package/dist/domain/available-system-components/index.d.ts +1 -0
  485. package/dist/domain/available-system-components/index.js +1 -0
  486. package/dist/domain/{domain-builder.d.ts → domain-builder/domain-builder.d.ts} +11 -5
  487. package/dist/domain/domain-builder/domain-builder.js +1 -0
  488. package/dist/domain/domain-builder/index.d.ts +1 -0
  489. package/dist/domain/domain-builder/index.js +1 -0
  490. package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
  491. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  492. package/dist/domain/domain-runtime/application.d.ts +39 -0
  493. package/dist/domain/domain-runtime/application.js +1 -0
  494. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -0
  495. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  496. package/dist/domain/domain-runtime/domain-runtime.d.ts +44 -4
  497. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  498. package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
  499. package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
  500. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +2 -0
  501. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -1
  502. package/dist/domain/domain-runtime/index.d.ts +2 -1
  503. package/dist/domain/domain-runtime/index.js +1 -1
  504. package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
  505. package/dist/domain/domain-runtime/spec/index.js +1 -1
  506. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  507. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +15 -1
  508. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  509. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
  510. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
  511. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +3 -1
  512. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  513. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.d.ts +23 -0
  514. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +1 -0
  515. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +3 -4
  516. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
  517. package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
  518. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  519. package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
  520. package/dist/domain/domain-runtime/web-component/actions.js +1 -1
  521. package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
  522. package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
  523. package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
  524. package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
  525. package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
  526. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +30 -0
  527. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
  528. package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
  529. package/dist/domain/extensions/export-images/client-side-image.js +1 -0
  530. package/dist/domain/extensions/export-images/index.d.ts +3 -0
  531. package/dist/domain/extensions/export-images/index.js +1 -0
  532. package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
  533. package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
  534. package/dist/domain/extensions/index.d.ts +1 -2
  535. package/dist/domain/extensions/index.js +1 -1
  536. package/dist/domain/index.d.ts +3 -2
  537. package/dist/domain/index.js +1 -1
  538. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -0
  539. package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
  540. package/dist/domain/spec/application/admin-pages.d.ts +26 -0
  541. package/dist/domain/spec/application/admin-states.d.ts +5 -0
  542. package/dist/domain/spec/application/configurator-states.d.ts +8 -0
  543. package/dist/domain/spec/application/index.d.ts +5 -0
  544. package/dist/domain/spec/application/index.js +1 -0
  545. package/dist/domain/spec/components/bindings/index.d.ts +2 -0
  546. package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
  547. package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
  548. package/dist/domain/spec/components/bindings/write-binding.js +1 -0
  549. package/dist/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
  550. package/dist/domain/spec/components/component-entry.js +1 -0
  551. package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
  552. package/dist/domain/spec/components/component-filters.d.ts +10 -0
  553. package/dist/domain/spec/components/component-filters.js +1 -0
  554. package/dist/domain/spec/components/components.d.ts +4 -0
  555. package/dist/domain/spec/components/components.js +1 -0
  556. package/dist/domain/spec/components/index.d.ts +6 -0
  557. package/dist/domain/spec/enhanced-json/enhanced-json-value.d.ts +30 -0
  558. package/dist/domain/spec/enhanced-json/enhanced-json-value.js +1 -0
  559. package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
  560. package/dist/domain/spec/enhanced-json/index.js +1 -0
  561. package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
  562. package/dist/domain/spec/expressions/expression.js +1 -0
  563. package/dist/domain/spec/expressions/expressions.d.ts +27 -0
  564. package/dist/domain/spec/expressions/expressions.js +1 -0
  565. package/dist/domain/spec/expressions/index.d.ts +5 -0
  566. package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
  567. package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
  568. package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
  569. package/dist/domain/spec/index.d.ts +9 -0
  570. package/dist/domain/spec/index.js +1 -0
  571. package/dist/domain/spec/invariants/index.d.ts +2 -0
  572. package/dist/domain/spec/invariants/index.js +1 -0
  573. package/dist/domain/spec/invariants/invariant.d.ts +24 -0
  574. package/dist/domain/spec/invariants/invariant.js +1 -0
  575. package/dist/domain/spec/invariants/invariants.d.ts +14 -0
  576. package/dist/domain/spec/invariants/invariants.js +1 -0
  577. package/dist/domain/spec/json-schema.d.ts +52 -0
  578. package/dist/domain/spec/json-schema.js +1 -0
  579. package/dist/domain/spec/markers/index.d.ts +3 -0
  580. package/dist/domain/spec/markers/index.js +1 -0
  581. package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
  582. package/dist/domain/spec/markers/msg-marker.js +1 -0
  583. package/dist/domain/spec/model/aliases.d.ts +9 -0
  584. package/dist/domain/spec/model/aliases.js +1 -0
  585. package/dist/domain/spec/model/common-types.d.ts +15 -0
  586. package/dist/domain/spec/model/common-types.js +1 -0
  587. package/dist/domain/spec/model/defaults.d.ts +33 -0
  588. package/dist/domain/spec/model/defaults.js +1 -0
  589. package/dist/domain/spec/model/entity-types.d.ts +8 -0
  590. package/dist/domain/spec/model/entity-types.js +1 -0
  591. package/dist/domain/spec/model/index.d.ts +7 -0
  592. package/dist/domain/spec/model/index.js +1 -0
  593. package/dist/domain/spec/model/model-version-key.d.ts +3 -0
  594. package/dist/domain/spec/model/model-version-key.js +1 -0
  595. package/dist/domain/spec/model/names/action-name.d.ts +7 -0
  596. package/dist/domain/spec/model/names/action-name.js +1 -0
  597. package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
  598. package/dist/domain/spec/model/names/alias-name.js +1 -0
  599. package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
  600. package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
  601. package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
  602. package/dist/domain/spec/model/names/entity-type-name.js +1 -0
  603. package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
  604. package/dist/domain/spec/model/names/expression-name.js +1 -0
  605. package/dist/domain/spec/model/names/index.d.ts +9 -0
  606. package/dist/domain/spec/model/names/index.js +1 -0
  607. package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
  608. package/dist/domain/spec/model/names/instance-name.js +1 -0
  609. package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
  610. package/dist/domain/spec/model/names/invariant-name.js +1 -0
  611. package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
  612. package/dist/domain/spec/model/names/shape-property-name.js +1 -0
  613. package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
  614. package/dist/domain/spec/model/names/violation-type-name.js +1 -0
  615. package/dist/domain/spec/model/presets.d.ts +30 -0
  616. package/dist/domain/spec/model/presets.js +1 -0
  617. package/dist/domain/spec/sections/actions.d.ts +23 -0
  618. package/dist/domain/spec/sections/actions.js +1 -0
  619. package/dist/domain/spec/sections/app-metadata.d.ts +18 -0
  620. package/dist/domain/spec/sections/app-metadata.js +1 -0
  621. package/dist/domain/spec/sections/application-version.d.ts +7 -0
  622. package/dist/domain/spec/sections/application-version.js +1 -0
  623. package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
  624. package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
  625. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
  626. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
  627. package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
  628. package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
  629. package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
  630. package/dist/domain/spec/sections/data-spec/index.js +1 -0
  631. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
  632. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
  633. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
  634. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
  635. package/dist/domain/spec/sections/index.d.ts +9 -0
  636. package/dist/domain/spec/sections/index.js +1 -0
  637. package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
  638. package/dist/domain/spec/sections/infra/acl.js +1 -0
  639. package/dist/domain/spec/sections/infra/index.d.ts +3 -0
  640. package/dist/domain/spec/sections/infra/index.js +1 -0
  641. package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
  642. package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
  643. package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
  644. package/dist/domain/spec/sections/infra/resources-config.js +1 -0
  645. package/dist/domain/spec/sections/state-value.d.ts +7 -0
  646. package/dist/domain/spec/sections/state-value.js +1 -0
  647. package/dist/domain/spec/sections/theme.d.ts +10 -0
  648. package/dist/domain/spec/sections/theme.js +1 -0
  649. package/dist/domain/spec/sections/transformers.d.ts +15 -0
  650. package/dist/domain/spec/sections/transformers.js +1 -0
  651. package/dist/domain/spec/sections/ui.d.ts +12 -0
  652. package/dist/domain/spec/sections/ui.js +1 -0
  653. package/dist/domain/system-definitions.js +1 -1
  654. package/dist/domain/utils/index.d.ts +2 -0
  655. package/dist/domain/utils/index.js +1 -0
  656. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  657. package/dist/editor/domain-editors/apply-spec-update.d.ts +10 -2
  658. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  659. package/dist/editor/domain-editors/use-implementation-files.d.ts +6 -14
  660. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  661. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  662. package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
  663. package/dist/i18n/locales/cs/messages.js +1 -1
  664. package/dist/i18n/locales/da/messages.js +1 -1
  665. package/dist/i18n/locales/de/messages.js +1 -1
  666. package/dist/i18n/locales/de-AT/messages.js +1 -1
  667. package/dist/i18n/locales/en/messages.js +1 -1
  668. package/dist/i18n/locales/en-AU/messages.js +1 -1
  669. package/dist/i18n/locales/en-GB/messages.js +1 -1
  670. package/dist/i18n/locales/es/messages.js +1 -1
  671. package/dist/i18n/locales/fr/messages.js +1 -1
  672. package/dist/i18n/locales/hu/messages.js +1 -1
  673. package/dist/i18n/locales/it/messages.js +1 -1
  674. package/dist/i18n/locales/nl/messages.js +1 -1
  675. package/dist/i18n/locales/pl/messages.js +1 -1
  676. package/dist/i18n/locales/pt/messages.js +1 -1
  677. package/dist/i18n/locales/ro/messages.js +1 -1
  678. package/dist/i18n/locales/sk/messages.js +1 -1
  679. package/dist/i18n/locales/tr/messages.js +1 -1
  680. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  681. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  682. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -0
  683. package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
  684. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  685. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  686. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  687. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +11 -5
  688. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  689. package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.d.ts +1 -0
  690. package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.js +1 -1
  691. package/dist/legacy/webhook-cli/lambda-local/index.js +1 -1
  692. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
  693. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  694. package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
  695. package/dist/phoenix/application-spec/index.d.ts +1 -0
  696. package/dist/phoenix/application-spec/index.js +1 -1
  697. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +11 -0
  698. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  699. package/dist/phoenix/bin.js +1 -1
  700. package/dist/phoenix/cli.js +1 -1
  701. package/dist/phoenix/commands/activate-deployment.js +1 -1
  702. package/dist/phoenix/commands/build.js +1 -1
  703. package/dist/phoenix/commands/changelog.js +1 -1
  704. package/dist/phoenix/commands/check.js +1 -1
  705. package/dist/phoenix/commands/clean.js +1 -1
  706. package/dist/phoenix/commands/cleanup-environment.js +2 -2
  707. package/dist/phoenix/commands/create-environment.js +1 -1
  708. package/dist/phoenix/commands/data.js +1 -1
  709. package/dist/phoenix/commands/deploy.js +1 -1
  710. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  711. package/dist/phoenix/commands/dev.js +4 -5
  712. package/dist/phoenix/commands/docs.js +1 -1
  713. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  714. package/dist/phoenix/commands/fix.js +1 -1
  715. package/dist/phoenix/commands/index.d.ts +1 -1
  716. package/dist/phoenix/commands/index.js +1 -1
  717. package/dist/phoenix/commands/inspect-assets.js +1 -1
  718. package/dist/phoenix/commands/list-environments.js +1 -1
  719. package/dist/phoenix/commands/login.d.ts +4 -1
  720. package/dist/phoenix/commands/login.js +2 -2
  721. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  722. package/dist/phoenix/commands/register-deployment.js +1 -1
  723. package/dist/phoenix/commands/scene.js +1 -1
  724. package/dist/phoenix/commands/screenshot.js +1 -1
  725. package/dist/phoenix/commands/state.js +1 -1
  726. package/dist/phoenix/commands/story-build.js +3 -3
  727. package/dist/phoenix/commands/story-create.js +1 -1
  728. package/dist/phoenix/commands/story-dev.js +2 -2
  729. package/dist/phoenix/commands/sync.js +1 -1
  730. package/dist/phoenix/commands/variants.js +1 -1
  731. package/dist/phoenix/editor-server/commands-router.js +1 -1
  732. package/dist/phoenix/editor-server/editor-server.d.ts +2 -13
  733. package/dist/phoenix/editor-server/editor-server.js +1 -1
  734. package/dist/phoenix/editor-server/spec-router.js +1 -1
  735. package/dist/phoenix/editor-server/trpc.d.ts +2 -12
  736. package/dist/phoenix/lingui/index.d.ts +1 -0
  737. package/dist/phoenix/lingui/index.js +1 -0
  738. package/dist/phoenix/lingui/lingui.d.ts +18 -0
  739. package/dist/phoenix/lingui/lingui.js +1 -0
  740. package/dist/phoenix/services/application-spec-project-watcher.d.ts +11 -6
  741. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  742. package/dist/phoenix/services/cli-credentials.d.ts +3 -0
  743. package/dist/phoenix/services/cli-credentials.js +1 -1
  744. package/dist/phoenix/services/cli-exit.d.ts +5 -0
  745. package/dist/phoenix/services/cli-exit.js +1 -0
  746. package/dist/phoenix/services/deployment/deployment-preparation-service.d.ts +28 -0
  747. package/dist/phoenix/services/deployment/deployment-preparation-service.js +1 -0
  748. package/dist/phoenix/{commands → services/deployment}/generated-env-markers.d.ts +1 -0
  749. package/dist/phoenix/services/deployment/generated-env-markers.js +1 -0
  750. package/dist/phoenix/services/deployment/index.d.ts +2 -0
  751. package/dist/phoenix/services/deployment/index.js +1 -0
  752. package/dist/phoenix/services/index.d.ts +5 -1
  753. package/dist/phoenix/services/index.js +1 -1
  754. package/dist/phoenix/services/lingui-watcher.js +1 -1
  755. package/dist/phoenix/services/phoenix-store.d.ts +3 -0
  756. package/dist/phoenix/services/phoenix-store.js +1 -1
  757. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  758. package/dist/phoenix/services/session/editor-server-handle.d.ts +5 -0
  759. package/dist/phoenix/services/session/editor-server-handle.js +1 -0
  760. package/dist/phoenix/services/session/index.d.ts +2 -0
  761. package/dist/phoenix/services/session/index.js +1 -0
  762. package/dist/phoenix/services/session/phoenix-application.d.ts +82 -0
  763. package/dist/phoenix/services/session/phoenix-application.js +2 -0
  764. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.d.ts +9 -0
  765. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.js +1 -0
  766. package/dist/phoenix/services/telemetry/index.d.ts +3 -0
  767. package/dist/phoenix/services/telemetry/index.js +1 -0
  768. package/dist/phoenix/services/telemetry/telemetry-client.d.ts +25 -0
  769. package/dist/phoenix/services/telemetry/telemetry-client.js +1 -0
  770. package/dist/phoenix/services/telemetry/telemetry-command.d.ts +2 -0
  771. package/dist/phoenix/services/telemetry/telemetry-command.js +1 -0
  772. package/dist/phoenix/services/telemetry/telemetry-event.d.ts +44 -0
  773. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -0
  774. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +25 -0
  775. package/dist/phoenix/services/telemetry/telemetry-state.js +2 -0
  776. package/dist/phoenix/services/vite-config.js +1 -1
  777. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  778. package/dist/phoenix/services/webhook-service/tunnel.d.ts +1 -0
  779. package/dist/phoenix/services/webhook-service/tunnel.js +1 -1
  780. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
  781. package/dist/react-sdk/application-runtime/common-services/analytics/frontend-analytics.d.ts +4 -0
  782. package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
  783. package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
  784. package/dist/react-sdk/application-runtime/hooks/index.d.ts +2 -0
  785. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  786. package/dist/react-sdk/application-runtime/hooks/loading/index.d.ts +5 -0
  787. package/dist/react-sdk/application-runtime/hooks/loading/index.js +1 -0
  788. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.d.ts +11 -0
  789. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.js +1 -0
  790. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.d.ts +8 -0
  791. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.js +1 -0
  792. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.d.ts +7 -0
  793. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.js +1 -0
  794. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.d.ts +9 -0
  795. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.js +1 -0
  796. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.d.ts +24 -0
  797. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.js +1 -0
  798. package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
  799. package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
  800. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
  801. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
  802. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +26 -0
  803. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
  804. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
  805. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
  806. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
  807. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
  808. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +5 -0
  809. package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
  810. package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
  811. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.d.ts +4 -11
  812. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.js +1 -1
  813. package/dist/react-sdk/application-runtime/hooks/use-web-component.d.ts +5 -0
  814. package/dist/react-sdk/application-runtime/hooks/use-web-component.js +1 -1
  815. package/dist/react-sdk/application-runtime/host-properties/actions.d.ts +15 -0
  816. package/dist/react-sdk/application-runtime/host-properties/actions.js +1 -0
  817. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.d.ts +30 -0
  818. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.js +1 -0
  819. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.d.ts +7 -0
  820. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.js +1 -0
  821. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.d.ts +21 -0
  822. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.js +1 -0
  823. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.d.ts +42 -0
  824. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.js +1 -0
  825. package/dist/react-sdk/application-runtime/host-properties/index.d.ts +8 -0
  826. package/dist/react-sdk/application-runtime/host-properties/index.js +1 -0
  827. package/dist/react-sdk/application-runtime/host-properties/initialize.d.ts +7 -0
  828. package/dist/react-sdk/application-runtime/host-properties/initialize.js +1 -0
  829. package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +54 -0
  830. package/dist/react-sdk/application-runtime/host-properties/selectors.js +1 -0
  831. package/dist/react-sdk/application-runtime/host-properties/types.d.ts +18 -0
  832. package/dist/react-sdk/application-runtime/host-properties/types.js +1 -0
  833. package/dist/react-sdk/application-runtime/index.d.ts +3 -0
  834. package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
  835. package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
  836. package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
  837. package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
  838. package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
  839. package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
  840. package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
  841. package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
  842. package/dist/react-sdk/application-runtime/loading/index.js +1 -0
  843. package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
  844. package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
  845. package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
  846. package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
  847. package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
  848. package/dist/react-sdk/application-runtime/loading/types.js +1 -0
  849. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  850. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
  851. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
  852. package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
  853. package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
  854. package/dist/react-sdk/application-runtime/responsive/actions.d.ts +47 -0
  855. package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
  856. package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
  857. package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
  858. package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
  859. package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
  860. package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
  861. package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
  862. package/dist/react-sdk/application-runtime/responsive/types.d.ts +104 -0
  863. package/dist/react-sdk/application-runtime/responsive/types.js +1 -0
  864. package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
  865. package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
  866. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +313 -10
  867. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  868. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
  869. package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
  870. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
  871. package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
  872. package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
  873. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
  874. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
  875. package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
  876. package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.d.ts +7 -0
  877. package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.js +1 -0
  878. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.d.ts +14 -0
  879. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.js +1 -0
  880. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.d.ts +18 -0
  881. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.js +1 -0
  882. package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.d.ts +5 -0
  883. package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.js +1 -0
  884. package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.d.ts +17 -0
  885. package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.js +1 -0
  886. package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.d.ts +5 -0
  887. package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.js +1 -0
  888. package/dist/react-sdk/configurator-ui-elements/index.d.ts +6 -0
  889. package/dist/react-sdk/configurator-ui-elements/index.js +1 -0
  890. package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
  891. package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
  892. package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
  893. package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
  894. package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
  895. package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
  896. package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
  897. package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
  898. package/dist/react-sdk/domain-application-context/index.js +1 -1
  899. package/dist/react-sdk/domain-context/common-hooks/index.d.ts +9 -0
  900. package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
  901. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
  902. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
  903. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +1 -0
  904. package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
  905. package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
  906. package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
  907. package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
  908. package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
  909. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
  910. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
  911. package/dist/react-sdk/domain-context/index.d.ts +4 -0
  912. package/dist/react-sdk/domain-context/index.js +1 -1
  913. package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
  914. package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
  915. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
  916. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
  917. package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
  918. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
  919. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
  920. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  921. package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
  922. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
  923. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
  924. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -1
  925. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -1
  926. package/dist/react-sdk/elements/PhoenixEntityElement.js +1 -1
  927. package/dist/react-sdk/elements/PhoenixLayoutElement.js +1 -1
  928. package/dist/react-sdk/elements/index.d.ts +0 -1
  929. package/dist/react-sdk/index.d.ts +9 -1
  930. package/dist/react-sdk/index.js +1 -1
  931. package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
  932. package/dist/react-sdk/integration/index.d.ts +1 -0
  933. package/dist/react-sdk/integration/index.js +1 -0
  934. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
  935. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
  936. package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
  937. package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
  938. package/dist/react-sdk/lifecycle-providers/index.js +1 -0
  939. package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
  940. package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
  941. package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
  942. package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
  943. package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
  944. package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
  945. package/dist/react-sdk/loading-state/index.d.ts +4 -2
  946. package/dist/react-sdk/loading-state/index.js +1 -1
  947. package/dist/react-sdk/loading-state/{LoadingStateProvider.d.ts → loading-state-hooks.d.ts} +3 -12
  948. package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
  949. package/dist/react-sdk/notifications/index.d.ts +1 -0
  950. package/dist/react-sdk/notifications/index.js +1 -0
  951. package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
  952. package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
  953. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
  954. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
  955. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
  956. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
  957. package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
  958. package/dist/{configurator/configuration-not-found-page → react-sdk/page-elements}/create-configuration-not-found-page.d.ts +7 -1
  959. package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
  960. package/dist/{configurator/configurator-error-page → react-sdk/page-elements}/create-configurator-error-page.d.ts +6 -1
  961. package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
  962. package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
  963. package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
  964. package/dist/react-sdk/page-elements/index.d.ts +6 -0
  965. package/dist/react-sdk/page-elements/index.js +1 -0
  966. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -0
  967. package/dist/react-sdk/preset-selection/index.d.ts +1 -0
  968. package/dist/react-sdk/preset-selection/index.js +1 -0
  969. package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.d.ts +11 -0
  970. package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.js +1 -0
  971. package/dist/react-sdk/provider-slots/configurator-provider-slot.d.ts +24 -0
  972. package/dist/react-sdk/provider-slots/configurator-provider-slot.js +1 -0
  973. package/dist/react-sdk/provider-slots/create-configurator-provider-slot.d.ts +5 -0
  974. package/dist/react-sdk/provider-slots/create-configurator-provider-slot.js +1 -0
  975. package/dist/react-sdk/provider-slots/index.d.ts +3 -0
  976. package/dist/react-sdk/provider-slots/index.js +1 -0
  977. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
  978. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
  979. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
  980. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
  981. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
  982. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
  983. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
  984. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
  985. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
  986. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
  987. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
  988. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
  989. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
  990. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
  991. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
  992. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
  993. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
  994. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
  995. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
  996. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
  997. package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
  998. package/dist/react-sdk/scene-control-elements/index.js +1 -0
  999. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
  1000. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.js +1 -0
  1001. package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
  1002. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  1003. package/dist/react-sdk/web-component/create-web-component.js +1 -1
  1004. package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
  1005. package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
  1006. package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
  1007. package/dist/react-sdk/web-component/god-mode/index.js +1 -0
  1008. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
  1009. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  1010. package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
  1011. package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
  1012. package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
  1013. package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
  1014. package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
  1015. package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
  1016. package/dist/ui-sdk/icons/__generated/index.d.ts +6 -0
  1017. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  1018. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  1019. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +2 -2
  1020. package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +11 -9
  1021. package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -1
  1022. package/dist/ui-sdk/theme/types.d.ts +5 -1
  1023. package/dist/watch/glob-matcher.d.ts +4 -4
  1024. package/dist/watch/glob-matcher.js +1 -1
  1025. package/dist/watch/watch.d.ts +4 -4
  1026. package/dist/watch/watch.js +1 -1
  1027. package/package.json +13 -3
  1028. package/schema/domain-spec.json +158 -0
  1029. package/dist/application-spec/core/components/index.d.ts +0 -2
  1030. package/dist/application-spec/core/expressions/index.d.ts +0 -2
  1031. package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +0 -1
  1032. package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
  1033. package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
  1034. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +0 -1
  1035. package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
  1036. package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
  1037. package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
  1038. package/dist/configurator/configurator-context/PresetSelectionProvider.js +0 -1
  1039. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
  1040. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
  1041. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
  1042. package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
  1043. package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
  1044. package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
  1045. package/dist/configurator/configurator-error-page/create-configurator-error-page.js +0 -1
  1046. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
  1047. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
  1048. package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
  1049. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
  1050. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
  1051. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
  1052. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
  1053. package/dist/domain/application/assistant/assistant-form-elements.d.ts +0 -28
  1054. package/dist/domain/application/assistant/assistant-form-elements.js +0 -1
  1055. package/dist/domain/available-system-components.d.ts +0 -11
  1056. package/dist/domain/available-system-components.js +0 -1
  1057. package/dist/domain/domain-builder.js +0 -1
  1058. package/dist/domain/extensions/client-side-image.js +0 -1
  1059. package/dist/domain/extensions/save-template-thumbnail.js +0 -1
  1060. package/dist/phoenix/commands/generated-env-markers.js +0 -1
  1061. package/dist/phoenix/services/lingui.d.ts +0 -15
  1062. package/dist/phoenix/services/lingui.js +0 -1
  1063. package/dist/phoenix/services/phoenix-application.d.ts +0 -21
  1064. package/dist/phoenix/services/phoenix-application.js +0 -1
  1065. package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
  1066. package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
  1067. package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
  1068. package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -32
  1069. package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
  1070. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +0 -25
  1071. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +0 -1
  1072. package/dist/react-sdk/responsive-state/canvas-padding.d.ts +0 -14
  1073. package/dist/react-sdk/responsive-state/index.d.ts +0 -5
  1074. package/dist/react-sdk/responsive-state/index.js +0 -1
  1075. package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +0 -111
  1076. package/dist/react-sdk/responsive-state/responsive-state-manager.js +0 -1
  1077. package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +0 -10
  1078. package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +0 -1
  1079. package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +0 -11
  1080. package/dist/react-sdk/responsive-state/use-responsive-state.js +0 -1
  1081. /package/dist/{application-spec/core/expressions/relation-expression-params.js → domain/spec/application/admin-pages-section.js} +0 -0
  1082. /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/application/admin-pages.js} +0 -0
  1083. /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/application/admin-states.js} +0 -0
  1084. /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
  1085. /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
  1086. /package/dist/{configurator/ui/assistant/form/form-element-definition.js → domain/spec/application/configurator-states.js} +0 -0
  1087. /package/dist/{react-sdk/elements/configurator-error-page-props.js → domain/spec/components/bindings/index.js} +0 -0
  1088. /package/dist/{react-sdk/responsive-state/canvas-padding.js → domain/spec/components/bindings/read-binding.js} +0 -0
  1089. /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
  1090. /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
  1091. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
  1092. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
  1093. /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
  1094. /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
  1095. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
  1096. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
  1097. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
  1098. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
  1099. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
  1100. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
  1101. /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
  1102. /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
  1103. /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
  1104. /package/dist/react-sdk/{elements → page-elements}/configurator-error-page-props.d.ts +0 -0
  1105. /package/dist/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
@@ -1 +1,2 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{IconButton as i,InputBase as o,Tooltip as t,styled as n}from"@mui/material";import{useCallback as s,useRef as l,useState as d}from"react";import{useEagerObservableSelector as m,useLocalizable as p}from"#package/react-sdk";import{PhxIcon as c,useResponsive as u}from"#package/ui-sdk";import{useConfigurator as g}from"../../application-runtime/index.js";import{AssistantPanelName as h}from"./theme.js";let b={id:"sdk.assistant.composer.placeholder",message:"Ask or tell me what to change…"},k={id:"sdk.assistant.composer.send.label",message:"Send"},f={id:"sdk.assistant.composer.stop.label",message:"Stop"},y=n("form",{name:h,slot:"composer"})(({theme:{palette:e,spacing:a}})=>({borderBlockStart:`1px solid ${e.divider}`,display:"grid",gap:a(.75),paddingBlock:a(1.25),paddingInline:`var(--phx-sidebar-padding, ${a(2)})`})),x=n("div",{name:h,slot:"inputFrame"})(({theme:{palette:e,spacing:a}})=>({alignItems:"flex-end",border:`1px solid ${e.divider}`,borderRadius:12,display:"flex",gap:a(1),paddingBlock:a(.5),paddingInline:`${a(1.5)} ${a(.5)}`,"&:focus-within":{borderColor:e.primary.main}})),v=n(o,{name:h,slot:"input"})(({theme:{spacing:e,typography:a}})=>({...a.body2,flex:1,paddingBlock:e(.75)})),R=n(i,{name:h,slot:"sendButton"})(({theme:{palette:e}})=>({background:e.primary.main,borderRadius:8,color:e.primary.contrastText,"&:hover":{background:e.primary.dark},"&.Mui-disabled":{background:e.action.disabledBackground,color:e.action.disabled}})),B=n(i,{name:h,slot:"stopButton"})(({theme:{palette:e}})=>({background:e.text.primary,borderRadius:8,color:e.background.paper,"&:hover":{background:e.text.secondary}})),C=n("span")({background:"currentColor",blockSize:10,borderRadius:2,inlineSize:10,margin:5}),S=n("div",{name:h,slot:"hint"})(({theme:{palette:e,typography:a}})=>({...a.caption,color:e.text.secondary}));export const AssistantComposer=()=>{let{assistantSystem:i}=g(),[o,n]=d(""),h=l(null),{isDesktop:w}=u(),I=p(b),$=p(k),j=p(f),{isReplying:z,isResuming:F}=m(i.chat$,e=>({isReplying:e.isLoading,isResuming:e.isResuming}),[]),A=o.trim(),D=!z&&!F&&A.length>0,P=s(async()=>{!D||(w||h.current?.blur(),await i.resume()&&(n(""),i.send(A)))},[i,D,A,w]),E=s(e=>{e.preventDefault(),P()},[P]),K=s(e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),P())},[P]),T=s(()=>{i.stop()},[i]);return a(y,{onSubmit:E,children:[a(x,{children:[e(v,{multiline:!0,maxRows:6,placeholder:I,value:o,readOnly:F,inputRef:h,onChange:e=>n(e.target.value),onKeyDown:K,onFocus:()=>i.setInputFocused(!0),onBlur:()=>i.setInputFocused(!1),inputProps:{"aria-label":I}}),z?e(t,{title:j,placement:"top",children:e(B,{size:"small","aria-label":j,onClick:T,children:e(C,{})})}):e(t,{title:$,placement:"top",children:e("span",{children:e(R,{type:"submit",size:"small","aria-label":$,disabled:!D,children:e(c,{name:"PaperPlaneRightBold",fontSize:"small"})})})})]}),e(S,{children:e(r,{id:"sdk.assistant.composer.disclaimer",message:"AI can be wrong. Check the result."})})]})};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Trans as a}from"@lingui/react";import{IconButton as r,InputBase as i,Tooltip as n,styled as o}from"@mui/material";import{useCallback as l,useEffect as s,useRef as d,useState as c}from"react";import{useEagerObservableSelector as m,useLocalizable as p}from"#package/react-sdk";import{PhxIcon as u,useResponsive as g}from"#package/ui-sdk";import{useConfigurator as h}from"../../application-runtime/index.js";import{prepareImage as b}from"./attachments/index.js";import{AssistantPanelName as f}from"./theme.js";let k={id:"sdk.assistant.composer.placeholder",message:"Ask or tell me what to change…"},v={id:"sdk.assistant.composer.send.label",message:"Send"},y={id:"sdk.assistant.composer.stop.label",message:"Stop"},x={id:"sdk.assistant.composer.attach.label",message:"Attach images"},R={id:"sdk.assistant.composer.attachment.remove",message:"Remove image"},S={id:"sdk.assistant.composer.attachment.unreadable",message:"Unsupported image format."},w={id:"sdk.assistant.composer.attachment.limit",message:"You can attach up to {max} images."},z=o("form",{name:f,slot:"composer"})(({theme:{palette:e,spacing:t}})=>({borderBlockStart:`1px solid ${e.divider}`,display:"grid",gap:t(.75),paddingBlock:t(1.25),paddingInline:`var(--phx-sidebar-padding, ${t(2)})`})),U=o("div",{name:f,slot:"inputFrame"})(({theme:{palette:e,spacing:t}})=>({alignItems:"end",border:`1px solid ${e.divider}`,borderRadius:12,columnGap:t(1),display:"grid",gridTemplateColumns:"auto minmax(0, 1fr) auto",padding:t(.5),'&:focus-within, &[data-dragging="true"]':{borderColor:e.primary.main}})),C=o("div",{name:f,slot:"attachments"})(({theme:{spacing:e}})=>({display:"flex",flexWrap:"wrap",gap:e(1),gridColumn:"1 / -1",paddingBlockStart:e(.75)})),j=o(r,{name:f,slot:"attachButton"})(({theme:{palette:e}})=>({background:"transparent",border:"none",borderRadius:8,boxShadow:"none",color:e.text.secondary,"&:hover":{background:e.action.hover,color:e.text.primary},"&.Mui-disabled":{background:"transparent",color:e.action.disabled}})),B=o("div",{name:f,slot:"attachment"})(({theme:{palette:e,shape:t}})=>({blockSize:56,border:`1px solid ${e.divider}`,borderRadius:t.borderRadius,inlineSize:56,overflow:"hidden",position:"relative"})),D=o("img")({blockSize:"100%",display:"block",inlineSize:"100%",objectFit:"cover"}),L=o(r,{name:f,slot:"removeAttachment"})(({theme:{palette:e}})=>({background:e.background.paper,insetBlockStart:2,insetInlineEnd:2,padding:2,position:"absolute","&:hover":{background:e.background.paper}})),T=o("div")({alignSelf:"stretch",display:"grid",minInlineSize:0}),$=o(i,{name:f,slot:"input"})(({theme:{spacing:e,typography:t}})=>({...t.body2,flex:1,paddingBlock:e(.75)})),I=o(r,{name:f,slot:"sendButton"})(({theme:{palette:e}})=>({background:e.primary.main,borderRadius:8,color:e.primary.contrastText,"&:hover":{background:e.primary.dark},"&.Mui-disabled":{background:e.action.disabledBackground,color:e.action.disabled}})),F=o(r,{name:f,slot:"stopButton"})(({theme:{palette:e}})=>({background:e.text.primary,borderRadius:8,color:e.background.paper,"&:hover":{background:e.text.secondary}})),O=o("span")({background:"currentColor",blockSize:10,borderRadius:2,inlineSize:10,margin:5}),P=o("div",{name:f,slot:"hint"})(({theme:{palette:e,typography:t}})=>({...t.caption,color:e.text.secondary})),A=o("div",{name:f,slot:"attachmentNotice"})(({theme:{palette:e,typography:t}})=>({...t.caption,color:e.error.main})),E=o("input")({display:"none"}),M=0,K=e=>{for(let{previewUrl:t}of e)URL.revokeObjectURL(t)};export const AssistantComposer=()=>{let{assistantSystem:r}=h(),[i,o]=c(""),[f,N]=c([]),[W,G]=c(0),[X,Y]=c(),[q,H]=c(!1),[J,Q]=c(!1),V=d(null),Z=d(null),_=d(0),ee=d(f),{isDesktop:et}=g();ee.current=f;let ea=p(k),er=p(v),ei=p(y),en=p(x),eo=p(R),el=p(S),es=p({...w,values:{max:4}}),ed=d(!0);s(()=>(ed.current=!0,()=>{ed.current=!1,K(ee.current)}),[]);let{isReplying:ec,isResuming:em}=m(r.chat$,e=>({isReplying:e.isLoading,isResuming:e.isResuming}),[]),ep=i.trim(),eu=em||q,eg=!ec&&!eu&&0===W&&(ep.length>0||f.length>0),eh=l(async e=>{if(0===e.length)return;let t=e.slice(0,Math.max(0,4-_.current));Y(t.length<e.length?"limit":void 0),0!==t.length&&(_.current+=t.length,G(e=>e+t.length),await Promise.all(t.map(async e=>{try{let t=await b(e);if(!ed.current)return;let a={id:`attachment-${++M}`,blob:t,previewUrl:URL.createObjectURL(t)};N(e=>[...e,a])}catch{_.current-=1,Y("unreadable")}finally{G(e=>e-1)}})))},[]),eb=l(e=>{URL.revokeObjectURL(e.previewUrl),_.current-=1,N(t=>t.filter(({id:t})=>t!==e.id)),Y(void 0)},[]),ef=l(async()=>{if(eg){et||V.current?.blur(),H(!0);try{await r.send(ep,f.map(({blob:e})=>e),{onSent:()=>{o(""),N(e=>e.filter(e=>!f.includes(e))),K(f),_.current-=f.length,Y(void 0),H(!1)},onUnsent:()=>{if(!ed.current)return;let e=f.slice(0,Math.max(0,4-_.current)),t=e.map(e=>({...e,previewUrl:URL.createObjectURL(e.blob)}));o(e=>e.trim()?`${e}
2
+ ${i}`:i),N(e=>[...t,...e]),_.current+=t.length,Y(e.length<f.length?"limit":void 0)}})}finally{H(!1)}}},[r,f,eg,ep,i,et]),ek=l(e=>{e.preventDefault(),ef()},[ef]),ev=l(e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),ef())},[ef]),ey=l(()=>{r.stop()},[r]),ex=l(e=>{let t=[...e.target.files??[]];e.target.value="",eh(t)},[eh]),eR=l(e=>{let t=[...e.clipboardData.files].filter(e=>e.type.startsWith("image/"));0!==t.length&&(e.preventDefault(),eh(t))},[eh]);return t(z,{onSubmit:ek,onDragOver:l(e=>{e.dataTransfer.types.includes("Files")&&(e.preventDefault(),e.dataTransfer.dropEffect="copy",Q(!0))},[]),onDragLeave:l(e=>{e.relatedTarget instanceof Node&&e.currentTarget.contains(e.relatedTarget)||Q(!1)},[]),onDrop:l(e=>{0!==e.dataTransfer.files.length&&(e.preventDefault(),Q(!1),eh([...e.dataTransfer.files]))},[eh]),children:[t(U,{"data-dragging":J,children:[f.length>0&&e(C,{children:f.map(a=>t(B,{children:[e(D,{src:a.previewUrl,alt:""}),e(L,{size:"small","aria-label":eo,disabled:eu,onClick:()=>eb(a),children:e(u,{name:"X",sx:{fontSize:12}})})]},a.id))}),e(n,{title:en,placement:"top",children:e("span",{children:e(j,{size:"small","aria-label":en,disabled:eu,onClick:()=>Z.current?.click(),children:e(u,{name:"Paperclip",fontSize:"small"})})})}),e(E,{ref:Z,type:"file",accept:"image/*",multiple:!0,onChange:ex}),e(T,{children:e($,{multiline:!0,maxRows:6,placeholder:ea,value:i,readOnly:eu,inputRef:V,onChange:e=>o(e.target.value),onKeyDown:ev,onPaste:eR,onFocus:()=>r.setInputFocused(!0),onBlur:()=>r.setInputFocused(!1),inputProps:{"aria-label":ea}})}),ec?e(n,{title:ei,placement:"top",children:e(F,{size:"small","aria-label":ei,onClick:ey,children:e(O,{})})}):e(n,{title:er,placement:"top",children:e("span",{children:e(I,{type:"submit",size:"small","aria-label":er,disabled:!eg,children:e(u,{name:"PaperPlaneRightBold",fontSize:"small"})})})})]}),X?e(A,{role:"status",children:"limit"===X?es:el}):e(P,{children:e(a,{id:"sdk.assistant.composer.disclaimer",message:"AI can be wrong. Check the result."})})]})};
@@ -6,7 +6,7 @@ export interface AssistantMarkdownProps {
6
6
  readonly forms: AssistantFormsVisibility;
7
7
  }
8
8
  /**
9
- * Assistant text of the thread: Markdown with lists, tables, links, entity links, references, images, code and forms,
9
+ * Assistant text of the thread: Markdown with lists, tables, alerts, links, entity links, references, images, code and forms,
10
10
  * without a bubble. A form fence the model is still writing shows a placeholder.
11
11
  */
12
12
  export declare const AssistantMarkdown: import("react").MemoExoticComponent<({ markdown, isStreaming, forms }: AssistantMarkdownProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1 +1 @@
1
- import{jsx as e,Fragment as r}from"react/jsx-runtime";import{styled as n}from"@mui/material";import{createContext as i,memo as o,useContext as t,useMemo as l}from"react";import a,{defaultUrlTransform as d}from"react-markdown";import m from"remark-gfm";import{AssistantEntityLink as s}from"./entity-link/index.js";import{AssistantForm as c}from"./form/index.js";import{AssistantReferenceLink as u,isAssistantLinkHref as p,parseAssistantLinkTarget as g}from"./reference-link/index.js";import{AssistantImage as f}from"./resource-image/index.js";import{completeStreamedMarkdown as h,hasOpenFence as k}from"./streamed-markdown.js";import{AssistantPanelName as b}from"./theme.js";let v=n("div",{name:b,slot:"assistantMessage"})(({theme:{palette:e,shape:r,spacing:n,typography:i}})=>({overflowWrap:"anywhere","& > :first-child":{marginBlockStart:0},"& > :last-child":{marginBlockEnd:0},"p, ul, ol, pre, blockquote":{marginBlock:n(1)},"h1, h2, h3, h4, h5, h6":{...i.subtitle2,marginBlock:n(1.5,.5)},"ul, ol":{paddingInlineStart:n(2.5)},a:{color:e.primary.main},code:{background:e.action.hover,borderRadius:r.borderRadius/2,fontFamily:"ui-monospace, Menlo, monospace",fontSize:"0.9em",paddingInline:n(.5)},pre:{background:e.action.hover,borderRadius:r.borderRadius,overflowX:"auto",padding:n(1),code:{background:"none",padding:0}},blockquote:{borderInlineStart:`2px solid ${e.divider}`,color:e.text.secondary,marginInline:0,paddingInlineStart:n(1.5)},"th, td":{borderBlockEnd:`1px solid ${e.divider}`,padding:n(.5,1),textAlign:"start",verticalAlign:"top"}})),x=n("div")({overflowX:"auto",table:{borderCollapse:"collapse",inlineSize:"100%"}}),y=i({forms:"hidden",openFenceEnd:void 0,isStreaming:!1}),j=({source:r,end:n})=>{let{forms:i,openFenceEnd:o,isStreaming:l}=t(y);return"hidden"===i?null:null!=n&&n===o?l?e(c,{source:r,status:"writing"}):null:e(c,{source:r,status:"disabled"===i?"waiting":"ready"})},w={a:({node:n,children:i,href:o,...t})=>{if(null==o||!p(o))return e("a",{...t,href:o,target:"_blank",rel:"noopener noreferrer",children:i});let l=g(o);return null==l?e(r,{children:i}):"entity"===l.kind?e(s,{id:l.id,children:i}):e(u,{target:l,children:i})},img:({src:r,alt:n})=>e(f,{src:r,alt:n}),pre:({node:r,children:n,...i})=>{let o=(e=>{let[r]=e?.children??[];if(r?.type!=="element"||"code"!==r.tagName)return;let{className:n}=r.properties;if(Array.isArray(n)&&n.includes("language-form"))return r.children.map(e=>"text"===e.type?e.value:"").join("")})(r);return null==o?e("pre",{...i,children:n}):e(j,{source:o,end:r?.position?.end.offset})},table:({node:r,children:n,...i})=>e(x,{children:e("table",{...i,children:n})})},S=[m],A=e=>p(e)?e:d(e);export const AssistantMarkdown=o(({markdown:r,isStreaming:n,forms:i})=>{let o=n?h(r):r,t=k(r)?o.length:void 0,d=l(()=>({forms:i,openFenceEnd:t,isStreaming:n}),[i,t,n]);return e(v,{children:e(y.Provider,{value:d,children:e(a,{components:w,remarkPlugins:S,urlTransform:A,children:o})})})});
1
+ import{jsx as e,Fragment as r}from"react/jsx-runtime";import{styled as n}from"@mui/material";import{createContext as i,memo as o,useContext as t,useMemo as l}from"react";import a,{defaultUrlTransform as d}from"react-markdown";import m from"remark-gfm";import{AssistantAlert as s,isAlertKind as c,remarkAlerts as u}from"./alert/index.js";import{AssistantEntityLink as p}from"./entity-link/index.js";import{AssistantForm as h}from"./form/index.js";import{AssistantReferenceLink as f,isAssistantLinkHref as g,parseAssistantLinkTarget as k}from"./reference-link/index.js";import{AssistantImage as b}from"./resource-image/index.js";import{completeStreamedMarkdown as v,hasOpenFence as x}from"./streamed-markdown.js";import{AssistantPanelName as y}from"./theme.js";let j=n("div",{name:y,slot:"assistantMessage"})(({theme:{palette:e,shape:r,spacing:n,typography:i}})=>({overflowWrap:"anywhere","& > :first-child":{marginBlockStart:0},"& > :last-child":{marginBlockEnd:0},"p, ul, ol, pre, blockquote":{marginBlock:n(1)},"h1, h2, h3, h4, h5, h6":{...i.subtitle2,marginBlock:n(1.5,.5)},"ul, ol":{paddingInlineStart:n(2.5)},a:{color:e.primary.main},code:{background:e.action.hover,borderRadius:r.borderRadius/2,fontFamily:"ui-monospace, Menlo, monospace",fontSize:"0.9em",paddingInline:n(.5)},pre:{background:e.action.hover,borderRadius:r.borderRadius,overflowX:"auto",padding:n(1),code:{background:"none",padding:0}},blockquote:{borderInlineStart:`2px solid ${e.divider}`,color:e.text.secondary,marginInline:0,paddingInlineStart:n(1.5)},"th, td":{borderBlockEnd:`1px solid ${e.divider}`,padding:n(.5,1),textAlign:"start",verticalAlign:"top"}})),w=n("div")({overflowX:"auto",table:{borderCollapse:"collapse",inlineSize:"100%"}}),S=i({forms:"hidden",openFenceEnd:void 0,isStreaming:!1}),A=({source:r,end:n})=>{let{forms:i,openFenceEnd:o,isStreaming:l}=t(S);return"hidden"===i?null:null!=n&&n===o?l?e(h,{source:r,status:"writing"}):null:e(h,{source:r,status:"disabled"===i?"waiting":"ready"})},B={a:({node:n,children:i,href:o,...t})=>{if(null==o||!g(o))return e("a",{...t,href:o,target:"_blank",rel:"noopener noreferrer",children:i});let l=k(o);return null==l?e(r,{children:i}):"entity"===l.kind?e(p,{id:l.id,children:i}):e(f,{target:l,children:i})},blockquote:({node:r,children:n,...i})=>{let o=r?.properties.dataAlert;return c(o)?e(s,{kind:o,children:n}):e("blockquote",{...i,children:n})},img:({src:r,alt:n})=>e(b,{src:r,alt:n}),pre:({node:r,children:n,...i})=>{let o=(e=>{let[r]=e?.children??[];if(r?.type!=="element"||"code"!==r.tagName)return;let{className:n}=r.properties;if(Array.isArray(n)&&n.includes("language-form"))return r.children.map(e=>"text"===e.type?e.value:"").join("")})(r);return null==o?e("pre",{...i,children:n}):e(A,{source:o,end:r?.position?.end.offset})},table:({node:r,children:n,...i})=>e(w,{children:e("table",{...i,children:n})})},I=[m,u],q=e=>g(e)?e:d(e);export const AssistantMarkdown=o(({markdown:r,isStreaming:n,forms:i})=>{let o=n?v(r):r,t=x(r)?o.length:void 0,d=l(()=>({forms:i,openFenceEnd:t,isStreaming:n}),[i,t,n]);return e(j,{children:e(S.Provider,{value:d,children:e(a,{components:B,remarkPlugins:I,urlTransform:q,children:o})})})});
@@ -1 +1 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as t,styled as s}from"@mui/material";import{useCallback as r,useMemo as n}from"react";import{match as o}from"ts-pattern";import{useEagerObservableValue as l}from"#package/react-sdk";import{PhxIcon as d}from"#package/ui-sdk";import{useConfigurator as m}from"../../application-runtime/index.js";import{AssistantToolChips as c}from"./AssistantChips.js";import{AssistantMarkdown as h}from"./AssistantMarkdown.js";import{describeAssistantFailure as p}from"./assistant-failure.js";import{EntityLinkSelectionProvider as g,useCreateEntityLinkSelection as u}from"./entity-link/index.js";import{AssistantPanelName as f}from"./theme.js";import{buildEarlierThreadItems as k,buildThreadView as v}from"./thread-items.js";import{useFollowStream as b}from"./use-follow-stream.js";let w=s("div",{name:f,slot:"thread"})({display:"grid",position:"relative"}),x=s("div",{name:f,slot:"messages"})(({theme:{spacing:e,typography:a}})=>({...a.body2,display:"flex",flexDirection:"column",gap:e(1.5),overflowY:"auto",overscrollBehavior:"contain",paddingBlock:e(2),paddingInline:`var(--phx-sidebar-padding, ${e(2)})`,"& > :first-child":{marginBlockStart:"auto"}})),y=s("div",{name:f,slot:"userMessage"})(({theme:{palette:e,spacing:a}})=>({alignSelf:"flex-end",background:`hsl(from ${e.primary.main} h s l / 12%)`,borderRadius:"14px 14px 4px 14px",maxInlineSize:"85%",overflowWrap:"anywhere",paddingBlock:a(1),paddingInline:a(1.5),whiteSpace:"pre-wrap"})),T=s("div",{name:f,slot:"greeting"})({}),C=s("div",{name:f,slot:"status"})(({theme:{palette:e,typography:a}})=>({...a.caption,color:e.text.secondary})),S=s("div",{name:f,slot:"separator"})(({theme:{palette:e,spacing:a,typography:i}})=>({...i.caption,alignItems:"center",color:e.text.secondary,display:"flex",gap:a(1),"&::before, &::after":{borderBlockStart:`1px solid ${e.divider}`,content:'""',flex:1}})),j=s(t,{name:f,slot:"earlierButton"})({alignSelf:"center"}),I=s("div",{name:f,slot:"notice"})(({theme:{palette:e,shape:a,spacing:i}})=>({alignItems:"center",background:e.action.hover,borderRadius:a.borderRadius,display:"flex",flexWrap:"wrap",gap:i(1),justifyContent:"space-between",paddingBlock:i(1),paddingInline:i(1.5)})),B=s(t,{name:f,slot:"newReplyButton"})(({theme:{palette:e,spacing:a}})=>({background:e.text.primary,borderRadius:"calc(infinity * 1px)",color:e.background.paper,insetBlockEnd:a(1),insetInlineStart:"50%",position:"absolute",translate:"-50% 0","&:hover":{background:e.text.secondary}})),E=({item:a,isActive:t,undoableToolCallId:s,onUndo:r})=>o(a).with({kind:"user"},({text:a})=>e(y,{children:a})).with({kind:"text"},({markdown:a,isStreaming:i,forms:t})=>e(h,{markdown:a,isStreaming:i,forms:t})).with({kind:"tools"},({tools:a})=>e(c,{tools:a,isActive:t,canUndo:a.some(({id:e})=>e===s),onUndo:r})).with({kind:"separator"},()=>e(S,{role:"separator",children:e(i,{id:"sdk.assistant.thread.earlierSummarized",message:"Earlier conversation summarized"})})).exhaustive();export const AssistantThread=()=>{let{assistantSystem:s}=m(),c=l(s.chat$),{messages:h,isLoading:f,isResuming:y,earlierThreads:S}=c,A=l(s.undoTipToolCallId$),R=f?void 0:A,{items:L,isThinking:z}=n(()=>v(h,f,y),[h,f,y]),$=n(()=>k(S),[S]),U=n(()=>L.filter(({kind:e})=>"user"===e).length,[L]),D=c.error?p(c.failedStatus):void 0,{scrollerRef:M,hasUnseenContent:W,handleScroll:q,scrollToEnd:H}=b(n(()=>({messages:h,isThinking:z,isResuming:y,failure:D?.kind}),[h,z,y,D?.kind]),U),N=u(),Y=r(e=>{e.target instanceof Element&&e.target.closest('a, button, input, label, select, textarea, [role="button"], [role="tooltip"]')||window.getSelection()?.isCollapsed!==!1&&N.release()},[N]),F=!c.isLoaded&&0===$.length&&!y&&!D;return a(w,{children:[e(g,{selection:N,children:a(x,{ref:M,onScroll:q,onClick:Y,role:"log","aria-live":"polite",children:[c.isLoaded&&0===L.length&&0===$.length&&!f&&!y&&!D&&e(T,{children:e(i,{id:"sdk.assistant.thread.greeting",message:"Hi. I can answer questions about this design and change it with you. Tell me what you need."})}),F&&e(C,{children:e(i,{id:"sdk.assistant.thread.loading",message:"Loading the conversation…"})}),c.isLoadingEarlierThread&&e(C,{children:e(i,{id:"sdk.assistant.thread.loadingEarlier",message:"Loading the earlier conversation…"})}),c.hasEarlierThread&&!c.isLoadingEarlierThread&&e(j,{size:"small",color:"inherit",onClick:s.loadEarlierThread,children:e(i,{id:"sdk.assistant.thread.showEarlier.label",message:"Show earlier conversation"})}),$.map(a=>e(E,{item:a,isActive:!1,undoableToolCallId:R,onUndo:s.undoToolCalls},a.id)),L.map(a=>e(E,{item:a,isActive:f&&a===L.at(-1),undoableToolCallId:R,onUndo:s.undoToolCalls},a.id)),y&&e(C,{children:e(i,{id:"sdk.assistant.thread.resuming",message:"Resuming the conversation…"})}),z&&e(C,{children:e(i,{id:"sdk.assistant.thread.thinking",message:"Thinking…"})}),D&&a(I,{role:"alert",children:[e("span",{children:o(D.kind).with("notAvailable",()=>e(i,{id:"sdk.assistant.failure.notAvailable",message:"The assistant is not available here."})).with("busy",()=>e(i,{id:"sdk.assistant.failure.busy",message:"The assistant is still working on an earlier message."})).with("unavailable",()=>e(i,{id:"sdk.assistant.failure.unavailable",message:"The assistant is unavailable right now."})).exhaustive()}),D.canRetry&&e(t,{size:"small",variant:"outlined",color:"inherit",onClick:s.reloadThread,children:e(i,{id:"sdk.assistant.failure.retry.label",message:"Try again"})})]})]})}),W&&e(B,{size:"small",onClick:H,endIcon:e(d,{name:"CaretDown"}),children:e(i,{id:"sdk.assistant.thread.newReply.label",message:"New reply"})})]})};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as t,styled as s}from"@mui/material";import{useCallback as r,useMemo as n}from"react";import{match as o}from"ts-pattern";import{useEagerObservableValue as l}from"#package/react-sdk";import{PhxIcon as d}from"#package/ui-sdk";import{useConfigurator as m}from"../../application-runtime/index.js";import{AssistantToolChips as c}from"./AssistantChips.js";import{AssistantMarkdown as h}from"./AssistantMarkdown.js";import{describeAssistantFailure as p}from"./assistant-failure.js";import{MessageImages as g}from"./attachments/index.js";import{EntityLinkSelectionProvider as u,useCreateEntityLinkSelection as f}from"./entity-link/index.js";import{AssistantPanelName as k}from"./theme.js";import{buildEarlierThreadItems as v,buildThreadView as b}from"./thread-items.js";import{useFollowStream as w}from"./use-follow-stream.js";let x=s("div",{name:k,slot:"thread"})({display:"grid",position:"relative"}),y=s("div",{name:k,slot:"messages"})(({theme:{spacing:e,typography:a}})=>({...a.body2,display:"flex",flexDirection:"column",gap:e(1.5),overflowY:"auto",overscrollBehavior:"contain",paddingBlock:e(2),paddingInline:`var(--phx-sidebar-padding, ${e(2)})`,"& > :first-child":{marginBlockStart:"auto"}})),T=s("div",{name:k,slot:"userMessage"})(({theme:{palette:e,spacing:a}})=>({alignSelf:"flex-end",background:`hsl(from ${e.primary.main} h s l / 12%)`,borderRadius:"14px 14px 4px 14px",display:"grid",gap:a(1),maxInlineSize:"85%",overflowWrap:"anywhere",paddingBlock:a(1),paddingInline:a(1.5),whiteSpace:"pre-wrap"})),j=s("div",{name:k,slot:"greeting"})({}),C=s("div",{name:k,slot:"status"})(({theme:{palette:e,typography:a}})=>({...a.caption,color:e.text.secondary})),I=s("div",{name:k,slot:"separator"})(({theme:{palette:e,spacing:a,typography:i}})=>({...i.caption,alignItems:"center",color:e.text.secondary,display:"flex",gap:a(1),"&::before, &::after":{borderBlockStart:`1px solid ${e.divider}`,content:'""',flex:1}})),S=s(t,{name:k,slot:"earlierButton"})({alignSelf:"center"}),B=s("div",{name:k,slot:"notice"})(({theme:{palette:e,shape:a,spacing:i}})=>({alignItems:"center",background:e.action.hover,borderRadius:a.borderRadius,display:"flex",flexWrap:"wrap",gap:i(1),justifyContent:"space-between",paddingBlock:i(1),paddingInline:i(1.5)})),E=s(t,{name:k,slot:"newReplyButton"})(({theme:{palette:e,spacing:a}})=>({background:e.text.primary,borderRadius:"calc(infinity * 1px)",color:e.background.paper,insetBlockEnd:a(1),insetInlineStart:"50%",position:"absolute",translate:"-50% 0","&:hover":{background:e.text.secondary}})),A=({item:t,isActive:s,undoableToolCallId:r,onUndo:n})=>o(t).with({kind:"user"},({text:i,imageIds:t})=>a(T,{children:[t.length>0&&e(g,{imageIds:t}),i]})).with({kind:"text"},({markdown:a,isStreaming:i,forms:t})=>e(h,{markdown:a,isStreaming:i,forms:t})).with({kind:"tools"},({tools:a})=>e(c,{tools:a,isActive:s,canUndo:a.some(({id:e})=>e===r),onUndo:n})).with({kind:"separator"},()=>e(I,{role:"separator",children:e(i,{id:"sdk.assistant.thread.earlierSummarized",message:"Earlier conversation summarized"})})).exhaustive();export const AssistantThread=()=>{let{assistantSystem:s}=m(),c=l(s.chat$),{messages:h,isLoading:g,isResuming:k,earlierThreads:T}=c,I=l(s.undoTipToolCallId$),R=g?void 0:I,{items:L,isThinking:z}=n(()=>b(h,g,k),[h,g,k]),$=n(()=>v(T),[T]),U=n(()=>L.filter(({kind:e})=>"user"===e).length,[L]),D=c.error?p(c.failedStatus):void 0,{scrollerRef:M,hasUnseenContent:W,handleScroll:q,scrollToEnd:H}=w(n(()=>({messages:h,isThinking:z,isResuming:k,failure:D?.kind}),[h,z,k,D?.kind]),U),N=f(),Y=r(e=>{e.target instanceof Element&&e.target.closest('a, button, input, label, select, textarea, [role="button"], [role="tooltip"]')||window.getSelection()?.isCollapsed!==!1&&N.release()},[N]),F=!c.isLoaded&&0===$.length&&!k&&!D;return a(x,{children:[e(u,{selection:N,children:a(y,{ref:M,onScroll:q,onClick:Y,role:"log","aria-live":"polite",children:[c.isLoaded&&0===L.length&&0===$.length&&!g&&!k&&!D&&e(j,{children:e(i,{id:"sdk.assistant.thread.greeting",message:"Hi. I can answer questions about this design and change it with you. Tell me what you need."})}),F&&e(C,{children:e(i,{id:"sdk.assistant.thread.loading",message:"Loading the conversation…"})}),c.isLoadingEarlierThread&&e(C,{children:e(i,{id:"sdk.assistant.thread.loadingEarlier",message:"Loading the earlier conversation…"})}),c.hasEarlierThread&&!c.isLoadingEarlierThread&&e(S,{size:"small",color:"inherit",onClick:s.loadEarlierThread,children:e(i,{id:"sdk.assistant.thread.showEarlier.label",message:"Show earlier conversation"})}),$.map(a=>e(A,{item:a,isActive:!1,undoableToolCallId:R,onUndo:s.undoToolCalls},a.id)),L.map(a=>e(A,{item:a,isActive:g&&a===L.at(-1),undoableToolCallId:R,onUndo:s.undoToolCalls},a.id)),k&&e(C,{children:e(i,{id:"sdk.assistant.thread.resuming",message:"Resuming the conversation…"})}),z&&e(C,{children:e(i,{id:"sdk.assistant.thread.thinking",message:"Thinking…"})}),D&&a(B,{role:"alert",children:[e("span",{children:o(D.kind).with("notAvailable",()=>e(i,{id:"sdk.assistant.failure.notAvailable",message:"The assistant is not available here."})).with("busy",()=>e(i,{id:"sdk.assistant.failure.busy",message:"The assistant is still working on an earlier message."})).with("unavailable",()=>e(i,{id:"sdk.assistant.failure.unavailable",message:"The assistant is unavailable right now."})).exhaustive()}),D.canRetry&&e(t,{size:"small",variant:"outlined",color:"inherit",onClick:s.reloadThread,children:e(i,{id:"sdk.assistant.failure.retry.label",message:"Try again"})})]})]})}),W&&e(E,{size:"small",onClick:H,endIcon:e(d,{name:"CaretDown"}),children:e(i,{id:"sdk.assistant.thread.newReply.label",message:"New reply"})})]})};
@@ -0,0 +1,8 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { AlertKind } from './remark-alerts.js';
3
+ export interface AssistantAlertProps {
4
+ readonly kind: AlertKind;
5
+ readonly children: ReactNode;
6
+ }
7
+ /** A GitHub alert in a reply: its content as Markdown, marked by the colour and icon of its kind. */
8
+ export declare const AssistantAlert: import("react").MemoExoticComponent<({ kind, children }: AssistantAlertProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1 @@
1
+ import{jsx as r,jsxs as i}from"react/jsx-runtime";import{alpha as o,styled as t}from"@mui/material";import{memo as n}from"react";import{PhxIcon as a}from"#package/ui-sdk";import{AssistantPanelName as e}from"../theme.js";let l={note:{color:"info",icon:"Info"},tip:{color:"success",icon:"Lightbulb"},important:{color:"primary",icon:"WarningCircle"},warning:{color:"warning",icon:"Warning"},caution:{color:"error",icon:"XCircle"}},c=t("div",{name:e,slot:"alert"})(({theme:{palette:r,shape:i,spacing:t,typography:n}})=>({borderInlineStart:"3px solid",borderRadius:i.borderRadius,display:"grid",gap:t(1),gridTemplateColumns:"min-content minmax(0, 1fr)",marginBlock:t(1),padding:t(1,1.5),...Object.fromEntries(Object.entries(l).map(([i,{color:t}])=>[`&[data-alert="${i}"]`,{background:o(r[t].main,.08),borderInlineStartColor:r[t].main,"& > :first-child":{color:r[t].main}}])),"& > :last-child > :first-child":{marginBlockStart:0},"& > :last-child > :last-child":{marginBlockEnd:0},"& > :first-child":{blockSize:`calc(${n.body2.lineHeight} * 1em)`,display:"grid",placeItems:"center"}}));export const AssistantAlert=n(({kind:o,children:t})=>i(c,{role:"note","data-alert":o,children:[r("span",{children:r(a,{name:l[o].icon})}),r("div",{children:t})]}));
@@ -0,0 +1,2 @@
1
+ export { AssistantAlert } from './AssistantAlert.js';
2
+ export { isAlertKind, remarkAlerts } from './remark-alerts.js';
@@ -0,0 +1 @@
1
+ export{AssistantAlert}from"./AssistantAlert.js";export{isAlertKind,remarkAlerts}from"./remark-alerts.js";
@@ -0,0 +1,10 @@
1
+ import type { Root } from 'mdast';
2
+ /** The kinds of GitHub alerts a reply can write, each with its own colour and icon. */
3
+ export type AlertKind = 'note' | 'tip' | 'important' | 'warning' | 'caution';
4
+ export declare const isAlertKind: (value: unknown) => value is AlertKind;
5
+ /**
6
+ * Remark plugin for GitHub alerts: a blockquote whose first line is a marker such as `[!WARNING]`
7
+ * loses the marker and carries its kind as the `dataAlert` property (`data-alert` in the page), for the `blockquote` override to render as a
8
+ * callout. A blockquote with an unknown marker stays as it is.
9
+ */
10
+ export declare const remarkAlerts: () => (tree: Root) => void;
@@ -0,0 +1 @@
1
+ let e=["note","tip","important","warning","caution"],t=/^\[!([a-z]+)\][ \t]*(?:\n|$)/i;export const isAlertKind=t=>"string"==typeof t&&e.some(e=>e===t);let r=e=>{let[r]=e.children;if(r?.type!=="paragraph")return;let[n,l]=r.children;if(n?.type!=="text")return;let i=t.exec(n.value),a=i?.[1]?.toLowerCase();if(null==i||!isAlertKind(a))return;let o=n.value.slice(i[0].length),c=!i[0].endsWith("\n")&&l?.type==="break";if(i[0].endsWith("\n")||null==l||c)return""===o?r.children.splice(0,c?2:1):n.value=o,0===r.children.length&&e.children.shift(),a},n=e=>{for(let t of e){if("blockquote"===t.type){let e=r(t);if(null!=e){t.data={...t.data,hProperties:{...t.data?.hProperties,dataAlert:e}};continue}}"children"in t&&n(t.children)}};export const remarkAlerts=()=>e=>{n(e.children)};
@@ -0,0 +1,11 @@
1
+ interface MessageImagesProps {
2
+ /** The images the user attached to the message, by the ids it references them by. */
3
+ readonly imageIds: readonly string[];
4
+ }
5
+ /**
6
+ * The images a user attached to a message, as thumbnails above its text. They are read from the
7
+ * server as soon as the bubble shows, through the same per-configuration cache as the screenshots;
8
+ * a click shows one larger in a popover.
9
+ */
10
+ export declare const MessageImages: ({ imageIds }: MessageImagesProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{ButtonBase as i,Popover as o,styled as a}from"@mui/material";import{useCallback as t,useMemo as s,useState as n}from"react";import{useLocalizable as m}from"#package/react-sdk";import{useScreenshotSrc as l}from"../screenshots/index.js";import{AssistantPanelName as d}from"../theme.js";let c={id:"sdk.assistant.message.image.open",message:"Show the attached image larger"},p=a("div",{name:d,slot:"messageImages"})(({theme:{spacing:e}})=>({display:"flex",flexWrap:"wrap",gap:e(.75),justifyContent:"flex-end"})),g=a(i,{name:d,slot:"messageImage"})(({theme:{palette:e,shape:r}})=>({background:e.action.hover,blockSize:64,borderRadius:r.borderRadius,inlineSize:64,overflow:"hidden"})),h=a("img")({blockSize:"100%",display:"block",inlineSize:"100%",objectFit:"cover"}),b=a("img")(({theme:{shape:e}})=>({borderRadius:e.borderRadius,display:"block",maxBlockSize:"70vh",maxInlineSize:"min(80vw, 640px)"})),v=({imageId:r,onOpen:i})=>{let o=l(s(()=>({kind:"stored",imageId:r}),[r]));return e(g,{"aria-label":m(c),disabled:void 0===o,onClick:e=>void 0!==o&&i(e,o),children:void 0!==o&&e(h,{src:o,alt:""})})};export const MessageImages=({imageIds:i})=>{let[a,s]=n(),m=t((e,r)=>{s({anchor:e.currentTarget,src:r})},[]),l=t(()=>s(void 0),[]);return r(p,{children:[i.map(r=>e(v,{imageId:r,onOpen:m},r)),e(o,{open:void 0!==a,anchorEl:a?.anchor,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{padding:1}}},children:a&&e(b,{src:a.src,alt:""})})]})};
@@ -0,0 +1,2 @@
1
+ export { MessageImages } from './MessageImages.js';
2
+ export { ASSISTANT_IMAGE_MAX_SIDE, fitWithin, prepareImage } from './prepare-image.js';
@@ -0,0 +1 @@
1
+ export{MessageImages}from"./MessageImages.js";export{ASSISTANT_IMAGE_MAX_SIDE,fitWithin,prepareImage}from"./prepare-image.js";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The longest side, in pixels, of an image the user attaches: the provider fits every image within
3
+ * 2048 × 2048 before the model reads it, so more would only cost upload time and storage.
4
+ */
5
+ export declare const ASSISTANT_IMAGE_MAX_SIDE = 2048;
6
+ interface Size {
7
+ readonly width: number;
8
+ readonly height: number;
9
+ }
10
+ /** The size that fits within `max` × `max`, keeping the aspect ratio and never enlarging. */
11
+ export declare const fitWithin: ({ width, height }: Size, max: number) => Size;
12
+ /**
13
+ * Turns an image file the user attaches into what is uploaded: decoded, fitted within
14
+ * {@link ASSISTANT_IMAGE_MAX_SIDE} on each side and re-encoded as JPEG. Re-encoding drops the
15
+ * file's metadata, its location included, and fills a transparent background white. Rejects for a
16
+ * file the browser cannot decode.
17
+ */
18
+ export declare const prepareImage: (file: Blob) => Promise<Blob>;
19
+ export {};
@@ -0,0 +1 @@
1
+ export const ASSISTANT_IMAGE_MAX_SIDE=2048;export const fitWithin=({width:e,height:t},a)=>{let r=Math.min(1,a/e,a/t);return{width:Math.max(1,Math.round(e*r)),height:Math.max(1,Math.round(t*r))}};let e=async e=>{let t=URL.createObjectURL(e),a=new Image;a.src=t;try{return await a.decode(),a}finally{URL.revokeObjectURL(t)}};export const prepareImage=async t=>{let a=await e(t),{width:r,height:n}=fitWithin({width:a.naturalWidth,height:a.naturalHeight},2048),o=document.createElement("canvas");o.width=r,o.height=n;let h=o.getContext("2d");if(!h)throw Error("The browser gave no 2D canvas to prepare the attached image on.");return h.fillStyle="#fff",h.fillRect(0,0,r,n),h.drawImage(a,0,0,r,n),new Promise((e,t)=>{o.toBlob(a=>a?e(a):t(Error("The browser could not encode the attached image as JPEG.")),"image/jpeg",.85)})};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{Button as t,styled as o}from"@mui/material";import{memo as n,useCallback as a,useEffect as s,useMemo as l,useState as d}from"react";import{match as m}from"ts-pattern";import{useConfigurator as c}from"../../../application-runtime/index.js";import{AssistantPanelName as p}from"../theme.js";import{getBuiltInFormRegistry as u}from"./built-in-form-registry.js";import{composeAnswer as b}from"./compose-answer.js";import{describeBuildErrors as f}from"./describe-build-errors.js";import{parseFormBlock as g}from"./parse-form-block.js";let h=o("form",{name:p,slot:"form"})(({theme:{spacing:e}})=>({display:"flex",flexDirection:"column",gap:e(1.5),marginBlock:e(1)})),k=o(t,{name:p,slot:"formSubmit"})(({theme:{palette:e,spacing:i,typography:r}})=>({...r.body2,alignSelf:"end",background:e.primary.main,border:"none",borderRadius:8,color:e.primary.contrastText,fontWeight:r.fontWeightMedium,letterSpacing:"normal",minBlockSize:0,minInlineSize:0,paddingBlock:i(.5),paddingInline:i(2),textTransform:"none","&:hover":{background:e.primary.dark,border:"none"},"&.Mui-disabled":{background:e.action.disabledBackground,border:"none",color:e.action.disabled}})),w=o("div",{name:p,slot:"formNote"})(({theme:{palette:e,shape:i,spacing:r,typography:t}})=>({...t.caption,alignItems:"center",background:e.action.hover,borderRadius:i.borderRadius,color:e.text.secondary,display:"flex",flexWrap:"wrap",gap:r(1),justifyContent:"space-between",marginBlock:r(1),paddingBlock:r(1),paddingInline:r(1.5)})),x=({model:t,disabled:o,send:n})=>{let[a,s]=d(()=>new Map),[l,c]=d(()=>new Map),p=(i,r)=>{let{id:d,definition:u,label:f,value:g,attributes:h}=i;return m(u).with({role:"option"},({component:m})=>e(m,{attributes:h,label:f,disabled:o,selected:!0===a.get(d),onSelect:()=>{t.isQuick?n(b(t,new Map([[i.id,!0]]),l)):s(e=>{let t=new Map(e);if("choice"===r.definition.role){for(let e of r.children)t.delete(e.id);t.set(i.id,!0)}else t.set(i.id,!0!==e.get(i.id));return t})}},d)).with({role:"input"},({component:r})=>e(r,{attributes:h,label:f,value:g,disabled:o,state:a.get(d),onChange:(e,r)=>{s(r=>new Map(r).set(i.id,e)),c(e=>new Map(e).set(i.id,r))}},d)).with({role:"group"},{role:"choice"},{role:"choices"},({component:r})=>e(r,{attributes:h,label:f,disabled:o,children:i.children.map(e=>p(e,i))},d)).exhaustive()};return i(h,{onSubmit:e=>{e.preventDefault(),o||t.isQuick||n(b(t,a,l))},children:[t.root.children.map(e=>p(e,t.root)),!t.isQuick&&e(k,{type:"submit",variant:"contained",disabled:o,disableElevation:!0,children:e(r,{id:"sdk.assistant.form.submit.label",message:"Submit"})})]})};export const AssistantForm=n(({source:o,status:n})=>{let{assistantSystem:m}=c(),[p,b]=d(!1),h="writing"===n,k=l(()=>h?void 0:g(o,u()),[o,h]),y="ready"!==n||p,j=a(e=>{b(!0),m.send(e).finally(()=>b(!1))},[m]);return(s(()=>{k?.ok===!1&&console.warn("The assistant wrote a form that could not be built.",k.errors)},[k]),k)?k.ok?0===k.root.children.length?null:e(x,{model:k,disabled:y,send:j}):i(w,{role:"alert",children:[e("span",{children:e(r,{id:"sdk.assistant.form.failure",message:"The assistant couldn't build this form."})}),e(t,{size:"small",variant:"outlined",color:"inherit",disabled:y,onClick:()=>j(f(k.errors)),children:e(r,{id:"sdk.assistant.form.fix.label",message:"Fix it"})})]}):e(w,{children:e(r,{id:"sdk.assistant.form.writing",message:"Preparing a form…"})})});
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{Button as o,styled as t}from"@mui/material";import{memo as n,useCallback as a,useEffect as s,useMemo as l,useState as d}from"react";import{match as m}from"ts-pattern";import{useConfigurator as c}from"../../../application-runtime/index.js";import{AssistantPanelName as p}from"../theme.js";import{composeAnswer as u}from"./compose-answer.js";import{describeBuildErrors as b}from"./describe-build-errors.js";import{parseFormBlock as f}from"./parse-form-block.js";import{useFormRegistry as g}from"./registry/index.js";let h=t("div",{name:p,slot:"form"})(({theme:{spacing:e}})=>({display:"flex",flexDirection:"column",gap:e(1.5),marginBlock:e(1)})),k=t(o,{name:p,slot:"formSubmit"})(({theme:{palette:e,spacing:i,typography:r}})=>({...r.body2,alignSelf:"end",background:e.primary.main,border:"none",borderRadius:8,color:e.primary.contrastText,fontWeight:r.fontWeightMedium,letterSpacing:"normal",minBlockSize:0,minInlineSize:0,paddingBlock:i(.5),paddingInline:i(2),textTransform:"none","&:hover":{background:e.primary.dark,border:"none"},"&.Mui-disabled":{background:e.action.disabledBackground,border:"none",color:e.action.disabled}})),w=t("div",{name:p,slot:"formNote"})(({theme:{palette:e,shape:i,spacing:r,typography:o}})=>({...o.caption,alignItems:"center",background:e.action.hover,borderRadius:i.borderRadius,color:e.text.secondary,display:"flex",flexWrap:"wrap",gap:r(1),justifyContent:"space-between",marginBlock:r(1),paddingBlock:r(1),paddingInline:r(1.5)})),x=({model:o,disabled:t,send:n})=>{let[a,s]=d(()=>new Map),[l,c]=d(()=>new Map),p=(i,r)=>{let{id:l,definition:d,label:b,attributes:f}=i;return m(d).with({role:"option"},({component:d})=>e(d,{attributes:f,label:b,disabled:t,selected:!0===a.get(l),onSelect:e=>{o.isQuick?n(u(o,new Map([[i.id,!0]]),new Map([[i.id,e]]))):(c(r=>new Map(r).set(i.id,e)),s(e=>{let o=new Map(e);if("choice"===r.definition.role){for(let e of r.children)o.delete(e.id);o.set(i.id,!0)}else o.set(i.id,!0!==e.get(i.id));return o}))}},l)).with({role:"input"},({component:r})=>e(r,{attributes:f,label:b,disabled:t,state:a.get(l),onChange:(e,r)=>{o.isQuick?n(u(o,new Map([[i.id,e]]),new Map([[i.id,r]]))):(s(r=>new Map(r).set(i.id,e)),c(e=>new Map(e).set(i.id,r)))}},l)).with({role:"group"},{role:"choice"},{role:"choices"},({component:r})=>e(r,{attributes:f,label:b,disabled:t,children:i.children.map(e=>p(e,i))},l)).exhaustive()};return i(h,{children:[o.root.children.map(e=>p(e,o.root)),!o.isQuick&&e(k,{variant:"contained",disabled:t,disableElevation:!0,onClick:()=>{t||o.isQuick||n(u(o,a,l))},children:e(r,{id:"sdk.assistant.form.submit.label",message:"Submit"})})]})};export const AssistantForm=n(({source:t,status:n})=>{let{assistantSystem:m}=c(),[p,u]=d(!1),h="writing"===n,k=g(),M=l(()=>h?void 0:f(t,k),[t,h,k]),y="ready"!==n||p,j=a(e=>{u(!0),m.send(e).finally(()=>u(!1))},[m]);return(s(()=>{M?.ok===!1&&console.warn("The assistant wrote a form that could not be built.",M.errors)},[M]),M)?M.ok?0===M.root.children.length?null:e(x,{model:M,disabled:y,send:j}):i(w,{role:"alert",children:[e("span",{children:e(r,{id:"sdk.assistant.form.failure",message:"The assistant couldn't build this form."})}),e(o,{size:"small",variant:"outlined",color:"inherit",disabled:y,onClick:()=>j(b(M.errors)),children:e(r,{id:"sdk.assistant.form.fix.label",message:"Fix it"})})]}):e(w,{children:e(r,{id:"sdk.assistant.form.writing",message:"Preparing a form…"})})});
@@ -6,6 +6,6 @@ export declare const FORM_PLACEHOLDER = "\u2014";
6
6
  * The user's answer to a form, sent as their message: one line per labelled container or input as
7
7
  * `Label: value`, a bare line for an unlabelled one, two spaces of indentation per labelled
8
8
  * container, and the placeholder for anything unanswered. Unlabelled groups are flattened into
9
- * their parent, and a picked option answers with its value, or its label without one.
9
+ * their parent, and a picked option, as an input, answers with what it reported.
10
10
  */
11
11
  export declare const composeAnswer: (model: BuiltFormModel, state: FormState, answers: FormAnswers) => string;
@@ -1 +1 @@
1
- import{match as t}from"ts-pattern";export const FORM_PLACEHOLDER="—";let e=(t,e)=>`${" ".repeat(t)}${e}`,n=(t,e)=>null==t?e:`${t}: ${e}`,r=({value:t,label:e})=>t??e??"",i=({children:t},{state:e})=>t.filter(({id:t})=>!0===e.get(t)).map(r),o=(r,l,p)=>{let{label:h}=r;return t(r.definition.role).with("group",()=>{if(null==h)return r.children.flatMap(t=>o(t,l,p));let t=r.children.flatMap(t=>o(t,l+1,p));return t.length>0?[e(l,`${h}:`),...t]:[e(l,`${h}: —`)]}).with("choice",()=>[e(l,n(h,i(r,p)[0]??"—"))]).with("choices",()=>{let t=i(r,p);return 0===t.length?[e(l,n(h,"—"))]:null==h?t.map(t=>e(l,t)):[e(l,`${h}:`),...t.map(t=>e(l+1,t))]}).with("input",()=>[e(l,n(h,(({id:t,value:e},{answers:n})=>n.has(t)?n.get(t):""===e?void 0:e)(r,p)??"—"))]).with("option",()=>[]).exhaustive()};export const composeAnswer=(t,e,n)=>o(t.root,0,{state:e,answers:n}).join("\n");
1
+ import{match as t}from"ts-pattern";export const FORM_PLACEHOLDER="—";let e=(t,e)=>`${" ".repeat(t)}${e}`,n=(t,e)=>null==t?e:`${t}: ${e}`,r=({children:t},{state:e,answers:n})=>t.flatMap(({id:t})=>{let r=n.get(t);return!0===e.get(t)&&null!=r&&""!==r?[r]:[]}),l=(i,o,p)=>{let{label:a}=i;return t(i.definition.role).with("group",()=>{if(null==a)return i.children.flatMap(t=>l(t,o,p));let t=i.children.flatMap(t=>l(t,o+1,p));return t.length>0?[e(o,`${a}:`),...t]:[e(o,`${a}: —`)]}).with("choice",()=>[e(o,n(a,r(i,p)[0]??"—"))]).with("choices",()=>{let t=r(i,p);return 0===t.length?[e(o,n(a,"—"))]:null==a?t.map(t=>e(o,t)):[e(o,`${a}:`),...t.map(t=>e(o+1,t))]}).with("input",()=>[e(o,n(a,p.answers.get(i.id)??"—"))]).with("option",()=>[]).exhaustive()};export const composeAnswer=(t,e,n)=>l(t.root,0,{state:e,answers:n}).join("\n");
@@ -1,4 +1,4 @@
1
- import type { FormElementDefinition } from './form-element-definition.js';
1
+ import type { FormElementDefinition } from './registry/index.js';
2
2
  /**
3
3
  * An element of a parsed form. Options outside a `choice` or `choices` are already wrapped in an
4
4
  * implicit container, and the top level of the block is an implicit group without a label.
@@ -8,7 +8,6 @@ export interface FormNode {
8
8
  readonly id: string;
9
9
  readonly definition: FormElementDefinition;
10
10
  readonly label?: string;
11
- readonly value?: string;
12
11
  readonly attributes: Readonly<Record<string, unknown>>;
13
12
  readonly children: readonly FormNode[];
14
13
  }
@@ -21,8 +20,8 @@ export interface FormBuildError {
21
20
  readonly message: string;
22
21
  }
23
22
  /**
24
- * A form fence as the panel renders it, or every reason it cannot. A quick form asks one question:
25
- * the first pick sends it, and it has no submit button.
23
+ * A form fence as the panel renders it, or every reason it cannot. A quick form asks one question,
24
+ * a choice or a quick input: the first pick or action sends it, and it has no submit button.
26
25
  */
27
26
  export type FormModel = {
28
27
  readonly ok: true;
@@ -1,4 +1,4 @@
1
1
  /** What the user did in a form, by node id: `true` for a picked option, the input's own state for an input. */
2
2
  export type FormState = ReadonlyMap<string, unknown>;
3
- /** The answer text each input reported, by node id; an input that never reported is missing. */
3
+ /** The answer text each option or input reported, by node id; one that never reported is missing. */
4
4
  export type FormAnswers = ReadonlyMap<string, string | undefined>;
@@ -1,2 +1,4 @@
1
1
  export { AssistantForm } from './AssistantForm.js';
2
2
  export type { AssistantFormStatus } from './AssistantForm.js';
3
+ export type { AssistantFormElementRoleProps, AssistantFormElementType, CreateAssistantFormElement, } from './registry/index.js';
4
+ export { createAssistantFormElementFactory } from './registry/index.js';
@@ -1 +1 @@
1
- export{AssistantForm}from"./AssistantForm.js";
1
+ export{AssistantForm}from"./AssistantForm.js";export{createAssistantFormElementFactory}from"./registry/index.js";
@@ -1,9 +1,10 @@
1
1
  import type { FormModel } from './form-model.js';
2
- import type { FormRegistry } from './form-registry.js';
2
+ import type { FormRegistry } from './registry/index.js';
3
3
  /**
4
4
  * Builds a form from the markup of a ```` ```form ```` fence. A block whose only content is loose
5
5
  * options asks one question, so they form an implicit `choice`; elsewhere loose options form an
6
- * implicit `choices`. A block with any unknown element, invalid attribute or misplaced element is
6
+ * implicit `choices`. A block that asks one question, a choice or a quick input, is quick. A block
7
+ * with any unknown element, invalid attribute, misplaced element or option with nothing to show is
7
8
  * not built at all, and every such error is returned.
8
9
  */
9
10
  export declare const parseFormBlock: (source: string, registry: FormRegistry) => FormModel;
@@ -1 +1 @@
1
- import{Parser as e}from"htmlparser2";import{readFormAttributes as o}from"./read-form-attributes.js";let r=({name:e,attributes:o,position:r})=>({element:e,label:o.label,position:r}),t=({definition:e},o,r)=>({id:o,definition:e,attributes:{},children:r}),i=(e,o)=>{let r=[],i=[],n=()=>{i.length>0&&(r.push(t(o.registry.choices,`choices-${i[0]?.id}`,i)),i=[])};for(let o of e)"option"===o.definition.role?i.push(o):(n(),r.push(o));return n(),r},n=(e,t,l)=>e.flatMap(e=>((e,t,l)=>{var s;let a=l.registry.get(e.name);if(!a){l.errors.push({...r(e),message:"not a form element"}),n(e.children,void 0,l);return}let{definition:h}=a,p=(s=h.role,t?.role==="option"||t?.role==="input"?`cannot be inside <${t.name}>, which holds no elements`:(t?.role==="choice"||t?.role==="choices")&&"option"!==s?`cannot be inside <${t.name}>, which holds only options`:void 0);p&&l.errors.push({...r(e),message:p});let{attributes:c,errors:u}=o(a,e.attributes);for(let o of u)l.errors.push({...r(e),message:o});let{label:d,value:g,...m}=c,f=n(e.children,{name:e.name,role:h.role},l);return{id:String(e.position),definition:h,label:"string"==typeof d?d:void 0,value:"string"==typeof g?g:void 0,attributes:m,children:"group"===h.role?i(f,l):f}})(e,t,l)??[]),l=e=>{if("choice"===e.definition.role)return!0;let[o,...r]=e.children;return"group"===e.definition.role&&null!=o&&0===r.length&&l(o)};export const parseFormBlock=(o,r)=>{let s,a,h,p,c={registry:r,errors:[]},u={name:r.group.definition.name,role:"group"},d=n((a=[s=[]],h=0,(p=new e({onopentag:(e,o)=>{let r={name:e,attributes:o,position:h+=1,children:[]};a.at(-1)?.push(r),a.push(r.children)},onclosetag:()=>{a.length>1&&a.pop()}},{xmlMode:!0,lowerCaseTags:!0,lowerCaseAttributeNames:!0,recognizeSelfClosing:!0})).write(o),p.end(),s),u,c);if(c.errors.length>0)return{ok:!1,errors:c.errors};let g=d.length>0&&d.every(e=>"option"===e.definition.role)?[t(r.choice,"choice",d)]:i(d,c),m=t(r.group,"root",g);return{ok:!0,root:m,isQuick:l(m)}};
1
+ import{Parser as e}from"htmlparser2";import{readFormAttributes as r}from"./read-form-attributes.js";let o=({name:e,attributes:r,position:o})=>({element:e,label:r.label,position:o}),t=({definition:e},r,o)=>({id:r,definition:e,attributes:{},children:o}),i=(e,r)=>{let o=[],i=[],n=()=>{i.length>0&&(o.push(t(r.registry.choices,`choices-${i[0]?.id}`,i)),i=[])};for(let r of e)"option"===r.definition.role?i.push(r):(n(),o.push(r));return n(),o},n=(e,t,l)=>e.flatMap(e=>((e,t,l)=>{var s;let a,h=l.registry.get(e.name);if(!h){l.errors.push({...o(e),message:"not a form element"}),n(e.children,void 0,l);return}let{definition:u}=h,p=(s=u.role,t?.role==="option"||t?.role==="input"?`cannot be inside <${t.name}>, which holds no elements`:(t?.role==="choice"||t?.role==="choices")&&"option"!==s?`cannot be inside <${t.name}>, which holds only options`:void 0);p&&l.errors.push({...o(e),message:p});let{attributes:c,errors:g}=r(h,e.attributes);for(let r of g)l.errors.push({...o(e),message:r});let{label:d,...m}=c;null!=u.identity&&["label",...u.identity].every(r=>{let o;return null==(o=e.attributes[r])||""===o})&&l.errors.push({...o(e),message:(a=u.identity,`has nothing to show: give it one of the attributes ${["label",...a].map(e=>`"${e}"`).join(", ")}`)});let f=n(e.children,{name:e.name,role:u.role},l);return{id:String(e.position),definition:u,label:"string"==typeof d?d:void 0,attributes:m,children:"group"===u.role?i(f,l):f}})(e,t,l)??[]),l=e=>{let{definition:r}=e;if("choice"===r.role||"input"===r.role&&!0===r.quick)return!0;let[o,...t]=e.children;return"group"===r.role&&null!=o&&0===t.length&&l(o)};export const parseFormBlock=(r,o)=>{let s,a,h,u,p={registry:o,errors:[]},c={name:o.group.definition.name,role:"group"},g=n((a=[s=[]],h=0,(u=new e({onopentag:(e,r)=>{let o={name:e,attributes:r,position:h+=1,children:[]};a.at(-1)?.push(o),a.push(o.children)},onclosetag:()=>{a.length>1&&a.pop()}},{xmlMode:!0,lowerCaseTags:!0,lowerCaseAttributeNames:!0,recognizeSelfClosing:!0})).write(r),u.end(),s),c,p);if(p.errors.length>0)return{ok:!1,errors:p.errors};let d=g.length>0&&g.every(e=>"option"===e.definition.role)?[t(o.choice,"choice",g)]:i(g,p),m=t(o.group,"root",d);return{ok:!0,root:m,isQuick:l(m)}};
@@ -1,4 +1,4 @@
1
- import type { RegisteredFormElement } from './form-registry.js';
1
+ import type { RegisteredFormElement } from './registry/index.js';
2
2
  /** The attributes of an element converted to their declared types, and what was wrong with them. */
3
3
  export interface FormAttributesReading {
4
4
  readonly attributes: Readonly<Record<string, unknown>>;
@@ -1 +1 @@
1
- import{match as t}from"ts-pattern";let e=t=>{if(""===t.trim())return;let e=Number(t);return Number.isFinite(e)?e:void 0},r=(r,{type:i})=>t(i).with("string",()=>r).with("number",()=>e(r)??r).with("integer",()=>{let t=e(r);return null!=t&&Number.isInteger(t)?t:r}).with("boolean",()=>""===r||"true"===r||"false"!==r&&r).exhaustive(),i={string:"a string",number:"a number",integer:"an integer",boolean:"true or false"},u=(t,{type:e,enum:r})=>r?`the attribute "${t}" must be one of ${r.map(t=>`"${t}"`).join(", ")}`:`the attribute "${t}" must be ${i[e]}`;export const readFormAttributes=({definition:t,attributes:e},i)=>{let n={},a=[];for(let[t,o]of Object.entries(i)){let i=e.get(t);if(!i){a.push(`the attribute "${t}" is not declared`);continue}let s=r(o,i.attribute);i.validate(s)?n[t]=s:a.push(u(t,i.attribute))}for(let e of t.required??[])e in i||a.push(`the attribute "${e}" is required`);return{attributes:n,errors:a}};
1
+ import{match as t}from"ts-pattern";let e=t=>{if(""===t.trim())return;let e=Number(t);return Number.isFinite(e)?e:void 0},r=(r,{type:u})=>t(u).with("string",()=>r).with("number",()=>e(r)??r).with("integer",()=>{let t=e(r);return null!=t&&Number.isInteger(t)?t:r}).with("boolean",()=>""===r||"true"===r||"false"!==r&&r).exhaustive(),u={string:"a string",number:"a number",integer:"an integer",boolean:"true or false"},n=(t,e,r)=>null!=t&&null!=e?`between ${t} and ${e}${r}`:null!=t?`at least ${t}${r}`:`at most ${e}${r}`,i=(t,e,r)=>{let{type:i,enum:l,pattern:a,minimum:s,maximum:b,minLength:o,maxLength:$}=e;if(l)return`the attribute "${t}" must be one of ${l.map(t=>`"${t}"`).join(", ")}`;if("string"===i){if(null!=o||null!=$){let e="string"==typeof r?[...r].length:0;if(null!=o&&e<o||null!=$&&e>$)return`the attribute "${t}" must be ${n(o,$," characters long")}`}return null==a?`the attribute "${t}" must be ${u[i]}`:`the attribute "${t}" must match the pattern ${a}`}return"number"==typeof r&&(null!=s||null!=b)?`the attribute "${t}" must be ${u[i]} ${n(s,b,"")}`:`the attribute "${t}" must be ${u[i]}`};export const readFormAttributes=({definition:t,attributes:e},u)=>{let n={},l=[];for(let[t,a]of Object.entries(u)){let u=e.get(t);if(!u){l.push(`the attribute "${t}" is not declared`);continue}let s=r(a,u.attribute);u.validate(s)?n[t]=s:l.push(i(t,u.attribute,s))}for(let e of t.required??[])e in u||l.push(`the attribute "${e}" is required`);return{attributes:n,errors:l}};
@@ -0,0 +1,3 @@
1
+ import { type FormElementDefinition } from './form-element-definition.js';
2
+ /** The elements of every assistant form: the built-ins the SDK prompt lists, with their components. */
3
+ export declare const BUILT_IN_FORM_ELEMENTS: readonly FormElementDefinition[];
@@ -0,0 +1 @@
1
+ import{ASSISTANT_BUILT_IN_FORM_ELEMENTS as e}from"#package/domain";import{FormCard as o,FormConfirm as m,FormGroup as r,FormNumber as t,FormOptions as i,FormReply as n,FormSwatch as c,FormText as p}from"../../form-elements/index.js";import{createFormElementDefinition as a}from"./form-element-definition.js";let f={group:r,choice:i,choices:i,reply:n,card:o,swatch:c,text:p,number:t,confirm:m};export const BUILT_IN_FORM_ELEMENTS=e.map(e=>a(e,f[e.name]));
@@ -0,0 +1,31 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type AssistantFormElementRegistration, type AssistantFormRole } from '#package/domain';
3
+ import type { FormContainerProps, FormInputProps, FormOptionProps } from '../../form-elements/index.js';
4
+ /**
5
+ * What a project's generated types say of one of its assistant form elements: its role and the
6
+ * attributes its component gets, typed from its declaration under `assistant.formElements`.
7
+ */
8
+ export interface AssistantFormElementType {
9
+ readonly role: AssistantFormRole;
10
+ readonly attributes: object;
11
+ }
12
+ /**
13
+ * The props of the component of a project's form element, by its role: a container's, an option's
14
+ * or an input's, with the element's typed attributes. An input's `STATE` is its own and is inferred
15
+ * from the component.
16
+ */
17
+ export type AssistantFormElementRoleProps<TYPE extends AssistantFormElementType, STATE = unknown> = TYPE extends {
18
+ readonly role: 'option';
19
+ } ? FormOptionProps<TYPE['attributes']> : TYPE extends {
20
+ readonly role: 'input';
21
+ } ? FormInputProps<STATE, TYPE['attributes']> : FormContainerProps<TYPE['attributes']>;
22
+ /**
23
+ * Registers the component of one of the project's assistant form elements, under the name its YAML
24
+ * declares it by in `assistant.formElements`. The name picks the props the component gets.
25
+ */
26
+ export type CreateAssistantFormElement<TYPES extends object> = <NAME extends keyof TYPES & string, STATE = unknown>(name: NAME, component: (props: TYPES[NAME] extends AssistantFormElementType ? AssistantFormElementRoleProps<TYPES[NAME], STATE> : never) => ReactNode) => AssistantFormElementRegistration;
27
+ /**
28
+ * `createAssistantFormElement` typed by a project's form elements, for the generated code to put
29
+ * on `phx.frontend`.
30
+ */
31
+ export declare const createAssistantFormElementFactory: <TYPES extends object>() => CreateAssistantFormElement<TYPES>;
@@ -0,0 +1 @@
1
+ import{createAssistantFormElement as t}from"#package/domain";export const createAssistantFormElementFactory=()=>t;
@@ -1,6 +1,6 @@
1
1
  import type { ComponentType } from 'react';
2
2
  import type { AssistantFormElementDescriptor } from '#package/domain';
3
- import type { FormContainerProps, FormInputProps, FormOptionProps } from '../form-elements/index.js';
3
+ import type { FormContainerProps, FormInputProps, FormOptionProps } from '../../form-elements/index.js';
4
4
  /** An element a form can render: what the prompt knows of it, and the component that renders it for its role. */
5
5
  export type FormElementDefinition = (AssistantFormElementDescriptor & {
6
6
  readonly role: 'group' | 'choice' | 'choices';
@@ -12,3 +12,5 @@ export type FormElementDefinition = (AssistantFormElementDescriptor & {
12
12
  readonly role: 'input';
13
13
  readonly component: ComponentType<FormInputProps>;
14
14
  });
15
+ /** Pairs an element's descriptor with the component written for it, a built-in's or the project's own. */
16
+ export declare const createFormElementDefinition: (descriptor: AssistantFormElementDescriptor, component: ComponentType<never>) => FormElementDefinition;
@@ -0,0 +1 @@
1
+ import{match as o}from"ts-pattern";export const createFormElementDefinition=(t,e)=>o(t.role).with("group","choice","choices",o=>({...t,role:o,component:e})).with("option",o=>({...t,role:o,component:e})).with("input",o=>({...t,role:o,component:e})).exhaustive();
@@ -1,11 +1,11 @@
1
- import type { AssistantFormAttribute, PhxValidateFunction, SchemaValidator } from '#package/domain';
1
+ import { type AssistantFormAttribute, type PhxValidateFunction, type SchemaValidator } from '#package/domain';
2
2
  import type { FormElementDefinition } from './form-element-definition.js';
3
3
  /** A declared attribute of a form element with the validator of its coerced value. */
4
4
  export interface RegisteredFormAttribute {
5
5
  readonly attribute: AssistantFormAttribute;
6
6
  readonly validate: PhxValidateFunction;
7
7
  }
8
- /** A form element with its declared attributes, the built-in `label` and `value` included. */
8
+ /** A form element with its declared attributes, the built-in `label` included. */
9
9
  export interface RegisteredFormElement {
10
10
  readonly definition: FormElementDefinition;
11
11
  readonly attributes: ReadonlyMap<string, RegisteredFormAttribute>;
@@ -0,0 +1 @@
1
+ import{ASSISTANT_FORM_NAME_PATTERN as e,isHtmlElementName as t}from"#package/domain";let r={type:"string"},n=e=>Object.entries({label:r,...e.attributes}),o=(e,t)=>{let r=e.get(t);if(r?.definition.role!==t)throw Error(`The form registry has no "${t}" element with the role "${t}". Forms wrap implicit content in it. Register the built-in "${t}".`);return r};export const createFormRegistry=(r,{schemaValidator:a})=>{let i=new Map;for(let o of r){if(!e.test(o.name)||t(o.name))throw Error(`The form element "${o.name}" cannot be registered: its name must be lowercase and must not be an HTML element name, so form markup is never read as HTML. Rename the element.`);if(i.has(o.name))throw Error(`The form element "${o.name}" is registered twice. Each tag names one element. Remove or rename one of them.`);let r=new Map(n(o).map(([e,t])=>[e,{attribute:t,validate:a.compile(t)}]));i.set(o.name,{definition:o,attributes:r})}return{group:o(i,"group"),choice:o(i,"choice"),choices:o(i,"choices"),get:e=>i.get(e)}};
@@ -0,0 +1,6 @@
1
+ export { BUILT_IN_FORM_ELEMENTS } from './built-in-form-elements.js';
2
+ export type { AssistantFormElementRoleProps, AssistantFormElementType, CreateAssistantFormElement, } from './create-assistant-form-element.js';
3
+ export { createAssistantFormElementFactory } from './create-assistant-form-element.js';
4
+ export { type FormElementDefinition, createFormElementDefinition } from './form-element-definition.js';
5
+ export { type FormRegistry, type FormRegistryContext, type RegisteredFormAttribute, type RegisteredFormElement, createFormRegistry, } from './form-registry.js';
6
+ export { useFormRegistry } from './use-form-registry.js';
@@ -0,0 +1 @@
1
+ export{BUILT_IN_FORM_ELEMENTS}from"./built-in-form-elements.js";export{createAssistantFormElementFactory}from"./create-assistant-form-element.js";export{createFormElementDefinition}from"./form-element-definition.js";export{createFormRegistry}from"./form-registry.js";export{useFormRegistry}from"./use-form-registry.js";
@@ -0,0 +1,8 @@
1
+ import { type FormRegistry } from './form-registry.js';
2
+ /**
3
+ * The registry the application's forms are read with. It is built when a form renders rather than
4
+ * when the bundle loads, since compiling validators then would break a configurator on a page whose
5
+ * CSP forbids eval, even one without an assistant; and rebuilt when the YAML or a component
6
+ * changes, so hot reload reaches the forms.
7
+ */
8
+ export declare const useFormRegistry: () => FormRegistry;
@@ -0,0 +1 @@
1
+ import{useMemo as r}from"react";import{extendedSchemaValidator as e}from"#package/domain";import{usePhoenixElementSlots as t,useSpecAssistant as m}from"#package/react-sdk";import{BUILT_IN_FORM_ELEMENTS as o}from"./built-in-form-elements.js";import{createFormElementDefinition as i}from"./form-element-definition.js";import{createFormRegistry as a}from"./form-registry.js";let f=[];export const useFormRegistry=()=>{let n=m()?.formElements??f,{assistantFormElements:s}=t();return r(()=>a([...o,...n.flatMap(r=>{let e=Object.entries(s).find(([e])=>e===r.name)?.[1];return e?[i(r,e)]:[]})],{schemaValidator:e}),[n,s])};
@@ -0,0 +1,9 @@
1
+ import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
2
+ import type { FormOptionProps } from './form-element-props.js';
3
+ type FormCardProps = FormOptionProps<AssistantBuiltInFormElementAttributes<'card'>>;
4
+ /**
5
+ * A `card`: a tile with its picture on top, then its label and description, outlined and checked
6
+ * while it is picked. A picture that is not a resource path or fails to load is left out.
7
+ */
8
+ export declare const FormCard: ({ attributes, label, disabled, selected, onSelect }: FormCardProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{styled as i}from"@mui/material";import{useCallback as o,useState as t}from"react";import{PhxIcon as a}from"#package/ui-sdk";import{useResourceImageUrl as n}from"../resource-image/index.js";import{AssistantPanelName as d}from"../theme.js";let l=i("button",{name:d,slot:"formCard"})(({theme:{palette:e,shape:r,spacing:i}})=>({alignContent:"start",background:e.background.paper,border:`1px solid ${e.divider}`,borderRadius:r.borderRadius,color:e.text.primary,cursor:"pointer",display:"grid",flex:"1 1 140px",font:"inherit",gap:i(.25),margin:0,maxInlineSize:220,padding:i(.75),position:"relative",textAlign:"start","&:hover:not(:disabled)":{background:e.action.hover},"&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:1},"&:disabled":{color:e.text.disabled,cursor:"default"},'&[aria-pressed="true"]':{borderColor:e.primary.main,boxShadow:`inset 0 0 0 1px ${e.primary.main}`}})),s=i("img",{name:d,slot:"formCardImage"})(({theme:{shape:e,spacing:r}})=>({aspectRatio:"4 / 3",borderRadius:e.borderRadius,display:"block",inlineSize:"100%",marginBlockEnd:r(.5),objectFit:"contain"})),m=i("span",{name:d,slot:"formCardLabel"})(({theme:{typography:e}})=>({...e.body2,fontWeight:e.fontWeightMedium})),p=i("span",{name:d,slot:"formCardDescription"})(({theme:{palette:e,typography:r}})=>({...r.caption,color:e.text.secondary})),c=i("span",{name:d,slot:"formCardCheck"})(({theme:{palette:e,spacing:r}})=>({alignItems:"center",background:e.primary.main,borderRadius:"50%",color:e.primary.contrastText,display:"flex",fontSize:14,insetBlockStart:r(.5),insetInlineEnd:r(.5),justifyContent:"center",padding:2,position:"absolute"}));export const FormCard=({attributes:i,label:d,disabled:u,selected:b,onSelect:f})=>{let{value:g,image:h}=i,x=[d,g].find(Boolean),y=""===i.description?void 0:i.description,k=n()(h),[C,j]=t(),v=o(()=>{j(k)},[k]);return r(l,{type:"button","aria-label":null==x&&null==y?h:void 0,disabled:u,"aria-pressed":b,onClick:()=>f([g,d,y,h].find(Boolean)??""),children:[null!=k&&k!==C&&e(s,{src:k,alt:"",loading:"lazy",onError:v}),null!=x&&e(m,{children:x}),null!=y&&e(p,{children:y}),b&&e(c,{"aria-hidden":!0,children:e(a,{name:"Check",fontSize:"inherit"})})]})};
@@ -0,0 +1,9 @@
1
+ import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
2
+ import type { FormInputProps } from './form-element-props.js';
3
+ type FormConfirmProps = FormInputProps<boolean, AssistantBuiltInFormElementAttributes<'confirm'>>;
4
+ /**
5
+ * A `confirm`: a yes or no question as ✓ and ✗ buttons. Its state is the pick, and it answers with
6
+ * the user's own words for yes and no, as the answer is their own message.
7
+ */
8
+ export declare const FormConfirm: ({ label, disabled, state, onChange }: FormConfirmProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{alpha as i,styled as a}from"@mui/material";import{useLocalizable as o}from"#package/react-sdk";import{PhxIcon as t}from"#package/ui-sdk";import{AssistantPanelName as n}from"../theme.js";let s={id:"sdk.assistant.form.confirm.yes",message:"Yes"},l={id:"sdk.assistant.form.confirm.no",message:"No"},d=a("div",{name:n,slot:"formConfirm"})(({theme:{palette:e,spacing:r,typography:i}})=>({...i.caption,color:e.text.secondary,display:"grid",gap:r(.75)})),m=a("div",{name:n,slot:"formConfirmButtons"})(({theme:{spacing:e}})=>({display:"flex",gap:e(.75)})),c=a("button",{name:n,slot:"formConfirmButton"})(({theme:{palette:e,spacing:r}})=>({alignItems:"center",background:e.background.paper,border:`1px solid ${e.divider}`,borderRadius:"calc(infinity * 1px)",color:e.text.primary,cursor:"pointer",display:"inline-flex",justifyContent:"center",margin:0,paddingBlock:r(.5),paddingInline:r(1.5),"&:hover:not(:disabled)":{background:e.action.hover},"&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:1},"&:disabled":{color:e.text.disabled,cursor:"default"},'&[aria-pressed="true"]':{background:i(e.primary.main,e.action.selectedOpacity),borderColor:e.primary.main}}));export const FormConfirm=({label:i,disabled:a,state:n,onChange:p})=>{let f=o(s),u=o(l);return r(d,{role:"group","aria-label":i,children:[null!=i&&e("span",{"aria-hidden":!0,children:i}),r(m,{children:[e(c,{type:"button","aria-label":f,title:f,disabled:a,"aria-pressed":!0===n,onClick:()=>p(!0,f),children:e(t,{name:"Check",fontSize:"small"})}),e(c,{type:"button","aria-label":u,title:u,disabled:a,"aria-pressed":!1===n,onClick:()=>p(!1,u),children:e(t,{name:"X",fontSize:"small"})})]})]})};
@@ -1,3 +1,6 @@
1
+ import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
1
2
  import type { FormContainerProps } from './form-element-props.js';
3
+ type FormGroupProps = FormContainerProps<AssistantBuiltInFormElementAttributes<'group'>>;
2
4
  /** A `group`: its children stacked under its label, which heads them. */
3
- export declare const FormGroup: ({ label, children }: FormContainerProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const FormGroup: ({ label, children }: FormGroupProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
2
+ import type { FormInputProps } from './form-element-props.js';
3
+ type FormNumberProps = FormInputProps<number, AssistantBuiltInFormElementAttributes<'number'>>;
4
+ /**
5
+ * A `number`: a field with its unit, and a slider beside it when both `min` and `max` are given. It
6
+ * stays unanswered until the user enters a number, even while the slider rests at `min`.
7
+ */
8
+ export declare const FormNumber: ({ attributes: { value, min, max, step, unit }, label, disabled, state, onChange, }: FormNumberProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as r,jsxs as i}from"react/jsx-runtime";import{Trans as e}from"@lingui/react";import{styled as o}from"@mui/material";import{useCallback as t,useEffect as a}from"react";import{NumericalInput as m}from"#package/ui-sdk";import{AssistantPanelName as n}from"../theme.js";import{clampFormNumber as s}from"./clamp-form-number.js";let l=o("div",{name:n,slot:"formNumber"})(({theme:{palette:r,spacing:i,typography:e}})=>({alignSelf:"stretch",color:r.text.secondary,display:"grid",gap:i(.5),...e.caption})),d=(r,i)=>i?`${r} ${i}`:String(r),u=r=>""===r.trim()?null:Number(r);export const FormNumber=({attributes:{value:o,min:n,max:p,step:v,unit:c},label:f,disabled:g,state:b,onChange:h})=>{let x=void 0===o?void 0:s(o,{min:n,max:p}),j=b??x;a(()=>{void 0===b&&void 0!==x&&h(x,d(x,c))},[b,x,c,h]);let N=t(r=>h(r,d(r,c)),[h,c]),S=t(()=>{if(void 0===j)return;let r=s(j,{min:n,max:p});r!==j&&N(r)},[j,n,p,N]),k=t(r=>void 0===j?"":String(r),[j]);return i(l,{role:"group","aria-label":f,children:[null!=f&&r("span",{"aria-hidden":!0,children:f}),r(m,{value:j??n??0,min:n,max:p,unit:c,size:"small",disabled:g,withSlider:void 0!==n&&void 0!==p,sliderProps:void 0===v?void 0:{step:v},inputFieldProps:{parseValue:u,formatValue:k,invalidNumberErrorMessage:r(e,{id:"sdk.assistant.form.number.invalid",message:"Enter a number."})},onChange:N,onChanged:S})]})};
@@ -1,3 +1,6 @@
1
+ import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
1
2
  import type { FormContainerProps } from './form-element-props.js';
3
+ type FormOptionsProps = FormContainerProps<AssistantBuiltInFormElementAttributes<'choice' | 'choices'>>;
2
4
  /** A `choice` or `choices`: its options in a wrapping row under its label. */
3
- export declare const FormOptions: ({ label, children }: FormContainerProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const FormOptions: ({ label, children }: FormOptionsProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,3 +1,6 @@
1
+ import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
1
2
  import type { FormOptionProps } from './form-element-props.js';
3
+ type FormReplyProps = FormOptionProps<AssistantBuiltInFormElementAttributes<'reply'>>;
2
4
  /** A `reply`: a short answer as a small pill, marked while it is picked. */
3
- export declare const FormReply: ({ label, disabled, selected, onSelect }: FormOptionProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const FormReply: ({ attributes, label, disabled, selected, onSelect }: FormReplyProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{alpha as e,styled as i}from"@mui/material";import{AssistantPanelName as o}from"../theme.js";let t=i("button",{name:o,slot:"formReply"})(({theme:{palette:r,spacing:i,typography:o}})=>({...o.body2,background:r.background.paper,border:`1px solid ${r.divider}`,borderRadius:"calc(infinity * 1px)",color:r.text.primary,cursor:"pointer",margin:0,paddingBlock:i(.25),paddingInline:i(1.25),textAlign:"start","&:hover:not(:disabled)":{background:r.action.hover},"&:focus-visible":{outline:`2px solid ${r.primary.main}`,outlineOffset:1},"&:disabled":{color:r.text.disabled,cursor:"default"},'&[aria-pressed="true"]':{background:e(r.primary.main,r.action.selectedOpacity),borderColor:r.primary.main}}));export const FormReply=({label:e,disabled:i,selected:o,onSelect:a})=>r(t,{type:"button",disabled:i,"aria-pressed":o,onClick:a,children:e});
1
+ import{jsx as r}from"react/jsx-runtime";import{alpha as e,styled as o}from"@mui/material";import{AssistantPanelName as i}from"../theme.js";let a=o("button",{name:i,slot:"formReply"})(({theme:{palette:r,spacing:o,typography:i}})=>({...i.body2,background:r.background.paper,border:`1px solid ${r.divider}`,borderRadius:"calc(infinity * 1px)",color:r.text.primary,cursor:"pointer",margin:0,paddingBlock:o(.25),paddingInline:o(1.25),textAlign:"start","&:hover:not(:disabled)":{background:r.action.hover},"&:focus-visible":{outline:`2px solid ${r.primary.main}`,outlineOffset:1},"&:disabled":{color:r.text.disabled,cursor:"default"},'&[aria-pressed="true"]':{background:e(r.primary.main,r.action.selectedOpacity),borderColor:r.primary.main}}));export const FormReply=({attributes:e,label:o,disabled:i,selected:t,onSelect:d})=>r(a,{type:"button",disabled:i,"aria-pressed":t,onClick:()=>d([e.value,o].find(Boolean)??""),children:o});
@@ -0,0 +1,10 @@
1
+ import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
2
+ import type { FormOptionProps } from './form-element-props.js';
3
+ type FormSwatchProps = FormOptionProps<AssistantBuiltInFormElementAttributes<'swatch'>>;
4
+ /**
5
+ * A `swatch`: a small square filled with its color or covered by its picture, its label in a
6
+ * tooltip, ringed and checked while it is picked. A picture that is not a resource path or fails to
7
+ * load leaves the color, or a neutral tile.
8
+ */
9
+ export declare const FormSwatch: ({ attributes, label, disabled, selected, onSelect }: FormSwatchProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Tooltip as r,styled as o}from"@mui/material";import{useCallback as a,useState as t}from"react";import{PhxIcon as n}from"#package/ui-sdk";import{useResourceImageUrl as l}from"../resource-image/index.js";import{AssistantPanelName as s}from"../theme.js";let d=o("button",{name:s,slot:"formSwatch"})(({theme:{palette:e,shape:i}})=>({background:e.action.hover,blockSize:36,border:`1px solid ${e.divider}`,borderRadius:i.borderRadius,cursor:"pointer",flex:"none",inlineSize:36,margin:0,overflow:"hidden",padding:0,position:"relative","&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:3},"&:disabled":{cursor:"default",opacity:e.action.disabledOpacity},'&[aria-pressed="true"]':{boxShadow:`0 0 0 2px ${e.background.paper}, 0 0 0 4px ${e.primary.main}`}})),m=o("img",{name:s,slot:"formSwatchImage"})({blockSize:"100%",display:"block",inlineSize:"100%",objectFit:"cover"}),c=o("span",{name:s,slot:"formSwatchCheck"})(({theme:{palette:e}})=>({alignItems:"center",background:e.primary.main,borderRadius:"50%",color:e.primary.contrastText,display:"flex",fontSize:14,inset:"50% auto auto 50%",justifyContent:"center",padding:2,position:"absolute",transform:"translate(-50%, -50%)"})),p=o("span")({display:"inline-flex"});export const FormSwatch=({attributes:o,label:s,disabled:u,selected:f,onSelect:b})=>{let{value:h,color:x,image:g}=o,y=l()(g),[k,S]=t(),j=[s,h,x,g].find(Boolean),v=a(()=>{S(y)},[y]);return e(r,{title:j??"",placement:"top",children:e(p,{children:i(d,{type:"button","aria-label":j,disabled:u,"aria-pressed":f,onClick:()=>b([h,s,x,g].find(Boolean)??""),style:null==x?void 0:{background:x},children:[null!=y&&y!==k&&e(m,{src:y,alt:"",loading:"lazy",onError:v}),f&&e(c,{"aria-hidden":!0,children:e(n,{name:"Check",fontSize:"inherit"})})]})})})};
@@ -1,3 +1,6 @@
1
+ import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
1
2
  import type { FormInputProps } from './form-element-props.js';
3
+ type FormTextProps = FormInputProps<string, AssistantBuiltInFormElementAttributes<'text'>>;
2
4
  /** A `text`: a single line the user types, with its label above it. */
3
- export declare const FormText: ({ attributes, label, value, disabled, state, onChange }: FormInputProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const FormText: ({ attributes: { value, placeholder }, label, disabled, state, onChange }: FormTextProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};