@salsita-ai/sdk 0.50.0-develop.ae52227c7e → 0.50.0-develop.ae9a830ef0

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 (362) hide show
  1. package/dist/application-spec/core/components/component-filter.d.ts +53 -0
  2. package/dist/application-spec/core/components/component-filter.js +1 -0
  3. package/dist/application-spec/core/components/index.d.ts +2 -0
  4. package/dist/application-spec/core/components/index.js +1 -0
  5. package/dist/application-spec/core/components/sdk-code-ref.d.ts +9 -0
  6. package/dist/application-spec/core/components/sdk-code-ref.js +1 -0
  7. package/dist/application-spec/core/enhanced-json-value.d.ts +0 -68
  8. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  9. package/dist/application-spec/core/expressions/index.d.ts +2 -0
  10. package/dist/application-spec/core/expressions/index.js +1 -0
  11. package/dist/application-spec/core/expressions/relation-expression-params.d.ts +11 -0
  12. package/dist/application-spec/core/expressions/sdk-expression-implementation.d.ts +24 -0
  13. package/dist/application-spec/core/expressions/sdk-expression-implementation.js +1 -0
  14. package/dist/application-spec/core/index.d.ts +2 -0
  15. package/dist/application-spec/core/index.js +1 -1
  16. package/dist/application-spec/core/json-value.d.ts +1 -1
  17. package/dist/application-spec/{core → enhanced-json}/eval-to-constant.d.ts +1 -1
  18. package/dist/application-spec/enhanced-json/index.d.ts +4 -0
  19. package/dist/application-spec/enhanced-json/index.js +1 -0
  20. package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
  21. package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
  22. package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
  23. package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
  24. package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
  25. package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
  26. package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
  27. package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
  28. package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
  29. package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
  30. package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
  31. package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
  32. package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -0
  33. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  34. package/dist/application-spec/errors/diagnostic-messages.d.ts +11 -0
  35. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  36. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  37. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +4 -4
  38. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.d.ts +4 -2
  39. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
  40. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +43 -45
  41. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  42. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
  43. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
  44. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +11 -11
  45. package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +1 -1
  46. package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
  47. package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
  48. package/dist/application-spec/generate-application/code/templates/globals.js +5 -4
  49. package/dist/application-spec/generate-application/code/templates/index.d.ts +0 -1
  50. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  51. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +8 -2
  52. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  53. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +5 -3
  54. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  55. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +1 -3
  56. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +1 -3
  57. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
  58. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  59. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +2 -1
  60. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  61. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +2 -4
  62. package/dist/application-spec/index.d.ts +1 -0
  63. package/dist/application-spec/index.js +1 -1
  64. package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
  65. package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
  66. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +16 -3
  67. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  68. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  69. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  70. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  71. package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +1 -9
  72. package/dist/application-spec/parse-application-files/spec/components/component-entry.js +1 -1
  73. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +1 -54
  74. package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
  75. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -1
  76. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  77. package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +1 -28
  78. package/dist/application-spec/parse-application-files/spec/expressions/expression.js +1 -1
  79. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +1 -1
  80. package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
  81. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  82. package/dist/application-spec/parse-application-files/spec/expressions/index.js +1 -1
  83. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  84. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  85. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +3 -3
  86. package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
  87. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
  88. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
  89. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
  90. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
  91. package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
  92. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  93. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  94. package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
  95. package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
  96. package/dist/client/phoenix-api.d.ts +96 -0
  97. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  98. package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
  99. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  100. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +3 -1
  101. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  102. package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
  103. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +14 -4
  104. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  105. package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
  106. package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
  107. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
  108. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  109. package/dist/configurator/common/configurator-interface.d.ts +11 -1
  110. package/dist/configurator/common/configurator-interface.js +1 -1
  111. package/dist/configurator/common/frontend-analytics.d.ts +2 -0
  112. package/dist/configurator/common/frontend-analytics.js +1 -1
  113. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +1 -1
  114. package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
  115. package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
  116. package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
  117. package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
  118. package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
  119. package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
  120. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
  121. package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
  122. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
  123. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  124. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  125. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +13 -0
  126. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
  127. package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
  128. package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
  129. package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
  130. package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
  131. package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +5 -0
  132. package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +1 -0
  133. package/dist/configurator/ui/assistant/entity-link/index.d.ts +3 -0
  134. package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
  135. package/dist/configurator/ui/configurator-layout/sidebar-keys/index.d.ts +1 -0
  136. package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
  137. package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
  138. package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
  139. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.d.ts +101 -0
  140. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
  141. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
  142. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
  143. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
  144. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
  145. package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
  146. package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.js +1 -1
  147. package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
  148. package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
  149. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +0 -74
  150. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
  151. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
  152. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -2
  153. package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
  154. package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -1
  155. package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -1
  156. package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -1
  157. package/dist/docs/drag-and-drop/drag-handle.mdx +1 -1
  158. package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -1
  159. package/dist/docs/drag-and-drop/planes.mdx +1 -1
  160. package/dist/docs/drag-and-drop/rotatable.mdx +2 -2
  161. package/dist/docs/index.json +42 -1
  162. package/dist/docs/layouts/custom-layout.mdx +1164 -0
  163. package/dist/docs/layouts/header/fixed.mdx +2 -2
  164. package/dist/docs/layouts/header/floating.mdx +2 -2
  165. package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
  166. package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
  167. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  168. package/dist/docs/other-features/transformers.mdx +4 -0
  169. package/dist/docs/phoenix/application-states.mdx +9 -7
  170. package/dist/docs/phoenix/configurator-interface.mdx +87 -18
  171. package/dist/docs/phoenix/domain-model.mdx +4 -0
  172. package/dist/docs/phoenix/finalization.mdx +1 -1
  173. package/dist/docs/phoenix/layout-slots.mdx +114 -0
  174. package/dist/docs/phoenix/phoenix-cli.mdx +5 -1
  175. package/dist/docs/phoenix/project-structure.mdx +6 -3
  176. package/dist/docs/phoenix/testing.mdx +140 -0
  177. package/dist/docs/phoenix/webhook-membership.mdx +10 -9
  178. package/dist/docs/phoenix/webhooks.mdx +1 -1
  179. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -11
  180. package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
  181. package/dist/domain/admin-domain/index.js +1 -1
  182. package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
  183. package/dist/domain/application/application-config.d.ts +4 -2
  184. package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
  185. package/dist/domain/application/assistant/assistant-fields.js +1 -0
  186. package/dist/domain/application/assistant/assistant-manifest.d.ts +9 -1
  187. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +38 -2
  188. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  189. package/dist/domain/application/assistant/build-assistant-lenses.d.ts +14 -0
  190. package/dist/domain/application/assistant/build-assistant-lenses.js +5 -0
  191. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  192. package/dist/domain/application/assistant/create-assistant-execution-schema.d.ts +32 -0
  193. package/dist/domain/application/assistant/create-assistant-execution-schema.js +1 -0
  194. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  195. package/dist/domain/application/assistant/index.d.ts +6 -1
  196. package/dist/domain/application/assistant/index.js +1 -1
  197. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
  198. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
  199. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
  200. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
  201. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
  202. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
  203. package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
  204. package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
  205. package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
  206. package/dist/domain/application/assistant/session-setup/index.js +1 -0
  207. package/dist/domain/application/configurator-builder.d.ts +1 -1
  208. package/dist/domain/application/configurator-builder.js +1 -1
  209. package/dist/domain/application/create-initial-published-data.d.ts +5 -5
  210. package/dist/domain/application/index.d.ts +0 -1
  211. package/dist/domain/application/index.js +1 -1
  212. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
  213. package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
  214. package/dist/domain/core/component/domain-component-optic.d.ts +1 -2
  215. package/dist/domain/core/component/domain-component-optic.js +2 -2
  216. package/dist/domain/core/component/system-component-filter.d.ts +15 -2
  217. package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
  218. package/dist/domain/core/expression/custom-expression.d.ts +16 -3
  219. package/dist/domain/core/invariant/violation.d.ts +50 -2
  220. package/dist/domain/core/invariant/violation.js +1 -1
  221. package/dist/domain/core/model/model.d.ts +1 -1
  222. package/dist/domain/core/recipe/recipes.d.ts +18 -50
  223. package/dist/domain/core/recipe/recipes.js +1 -1
  224. package/dist/domain/core/relation/all-of-type-relation.d.ts +8 -21
  225. package/dist/domain/core/relation/all-of-type-relation.js +1 -1
  226. package/dist/domain/core/relation/direct-relation.d.ts +13 -24
  227. package/dist/domain/core/relation/index.d.ts +0 -1
  228. package/dist/domain/core/relation/indirect-relation.d.ts +12 -67
  229. package/dist/domain/core/relation/indirect-relation.js +1 -1
  230. package/dist/domain/core/relation/relation-factory.d.ts +19 -15
  231. package/dist/domain/core/relation/relation-factory.js +1 -1
  232. package/dist/domain/core/state/state.d.ts +1 -1
  233. package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
  234. package/dist/domain/domain-runtime/access/selectors.js +1 -1
  235. package/dist/domain/domain-runtime/access/types.d.ts +2 -0
  236. package/dist/domain/domain-runtime/access/types.js +1 -1
  237. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +14 -13
  238. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  239. package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
  240. package/dist/domain/domain-runtime/domain-runtime.d.ts +32 -16
  241. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
  242. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
  243. package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
  244. package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
  245. package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
  246. package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
  247. package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
  248. package/dist/domain/domain-runtime/errors/index.js +1 -0
  249. package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
  250. package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
  251. package/dist/domain/domain-runtime/index.d.ts +1 -0
  252. package/dist/domain/domain-runtime/index.js +1 -1
  253. package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
  254. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  255. package/dist/domain/domain-runtime/spec/module-checks/project-modules.d.ts +8 -1
  256. package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -1
  257. package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -1
  258. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
  259. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +7 -7
  260. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -1
  261. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -1
  262. package/dist/domain/extensions/attribute-switch.d.ts +1 -1
  263. package/dist/domain/extensions/attribute-switch.js +1 -1
  264. package/dist/domain/extensions/canvas-config.d.ts +1 -1
  265. package/dist/domain/extensions/client-side-image.d.ts +2 -2
  266. package/dist/domain/extensions/client-side-image.js +1 -1
  267. package/dist/domain/extensions/common/angle-indicator-schema.d.ts +2 -2
  268. package/dist/domain/extensions/common/dimension-indicator-schema.d.ts +2 -2
  269. package/dist/domain/extensions/editable-angle-indicator.d.ts +1 -1
  270. package/dist/domain/extensions/editable-distance-dimension-indicator.d.ts +1 -1
  271. package/dist/domain/extensions/editable-offset-indicator.d.ts +1 -1
  272. package/dist/domain/extensions/editable-offset-indicator.js +1 -1
  273. package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -1
  274. package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -1
  275. package/dist/domain/extensions/horizontal-tabs.d.ts +2 -2
  276. package/dist/domain/extensions/list-selector-dimension-indicator.d.ts +1 -1
  277. package/dist/domain/extensions/navigation-steps.d.ts +2 -2
  278. package/dist/domain/extensions/offset-indicator.js +1 -1
  279. package/dist/domain/extensions/rotation-handle.d.ts +2 -2
  280. package/dist/domain/extensions/save-template-thumbnail.d.ts +2 -2
  281. package/dist/domain/extensions/save-template-thumbnail.js +1 -1
  282. package/dist/domain/extensions/scene-entity-animation.js +1 -1
  283. package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
  284. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +18 -9
  285. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  286. package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
  287. package/dist/domain/mocks/create-mock-domain.js +1 -1
  288. package/dist/domain/mocks/create-mock-state.d.ts +2 -2
  289. package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
  290. package/dist/domain/mocks/create-test-application-config.js +1 -0
  291. package/dist/domain/mocks/index.d.ts +1 -0
  292. package/dist/domain/mocks/index.js +1 -1
  293. package/dist/domain/projections/blender-projections/camera.d.ts +1 -1
  294. package/dist/domain/system-components/application-config.d.ts +2 -2
  295. package/dist/domain/system-components/child-entity-selection.js +1 -1
  296. package/dist/domain/system-components/collision-box-geometry.d.ts +4 -2
  297. package/dist/domain/system-components/collision-geometry.d.ts +4 -2
  298. package/dist/domain/system-components/collision-point-geometry.d.ts +4 -2
  299. package/dist/domain/system-components/common/material-override-schema.d.ts +2 -2
  300. package/dist/domain/system-components/common/recipes.d.ts +21 -3
  301. package/dist/domain/system-components/common/recipes.js +1 -1
  302. package/dist/domain/system-components/constraint.d.ts +10 -23
  303. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  304. package/dist/domain/system-components/drag-handle.js +1 -1
  305. package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
  306. package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
  307. package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
  308. package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
  309. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
  310. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  311. package/dist/domain/system-components/material-swatch.js +1 -1
  312. package/dist/domain/system-components/scene-entity-material-override.d.ts +1 -1
  313. package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
  314. package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
  315. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
  316. package/dist/domain/system-components/scene-entity-transimissive-material-override.d.ts +1 -1
  317. package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
  318. package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
  319. package/dist/domain/utils/eval-cache.d.ts +1 -1
  320. package/dist/domain/utils/map-nested-object.d.ts +1 -1
  321. package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
  322. package/dist/editor/mocks/EditorMockContext.js +1 -1
  323. package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
  324. package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -1
  325. package/dist/legacy/domain-cli/gen/defaults.js +1 -7
  326. package/dist/legacy/domain-cli/gen/relations.js +1 -1
  327. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  328. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  329. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +81 -68
  330. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  331. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  332. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  333. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +2 -1
  334. package/dist/phoenix/commands/deploy.js +1 -1
  335. package/dist/phoenix/services/source-archive.d.ts +1 -0
  336. package/dist/phoenix/services/source-archive.js +1 -1
  337. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +2 -0
  338. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  339. package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
  340. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +33 -16
  341. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  342. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +30 -0
  343. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
  344. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +4 -4
  345. package/dist/react-sdk/domain-context/index.d.ts +2 -1
  346. package/dist/react-sdk/domain-context/index.js +1 -1
  347. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +6 -0
  348. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  349. package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
  350. package/dist/ui-sdk/theme/types.d.ts +1 -1
  351. package/dist/webhook/builders/webhook-builder.js +1 -1
  352. package/package.json +3 -3
  353. package/schema/domain-spec.json +1115 -209
  354. package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
  355. package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
  356. package/dist/domain/application/resource-builder.d.ts +0 -13
  357. package/dist/domain/application/resource-builder.js +0 -1
  358. package/dist/domain/core/relation/relation-implementation.d.ts +0 -7
  359. /package/dist/{domain/core/relation/relation-implementation.js → application-spec/core/expressions/relation-expression-params.js} +0 -0
  360. /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
  361. /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
  362. /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.js +0 -0
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{styled as e}from"@mui/material";import{memo as o}from"react";import a from"react-markdown";import i from"remark-gfm";import{completeStreamedMarkdown as n}from"./streamed-markdown.js";import{AssistantPanelName as t}from"./theme.js";let l=e("div",{name:t,slot:"assistantMessage"})(({theme:{palette:r,shape:e,spacing:o,typography:a}})=>({overflowWrap:"anywhere","& > :first-child":{marginBlockStart:0},"& > :last-child":{marginBlockEnd:0},"p, ul, ol, pre, blockquote":{marginBlock:o(1)},"h1, h2, h3, h4, h5, h6":{...a.subtitle2,marginBlock:o(1.5,.5)},"ul, ol":{paddingInlineStart:o(2.5)},a:{color:r.primary.main},code:{background:r.action.hover,borderRadius:e.borderRadius/2,fontFamily:"ui-monospace, Menlo, monospace",fontSize:"0.9em",paddingInline:o(.5)},pre:{background:r.action.hover,borderRadius:e.borderRadius,overflowX:"auto",padding:o(1),code:{background:"none",padding:0}},blockquote:{borderInlineStart:`2px solid ${r.divider}`,color:r.text.secondary,marginInline:0,paddingInlineStart:o(1.5)},"th, td":{borderBlockEnd:`1px solid ${r.divider}`,padding:o(.5,1),textAlign:"start",verticalAlign:"top"}})),d=e("div")({overflowX:"auto",table:{borderCollapse:"collapse",inlineSize:"100%"}}),m={a:({node:e,children:o,...a})=>r("a",{...a,target:"_blank",rel:"noopener noreferrer",children:o}),table:({node:e,children:o,...a})=>r(d,{children:r("table",{...a,children:o})})},s=[i],c=["img"];export const AssistantMarkdown=o(({markdown:e,isStreaming:o})=>r(l,{children:r(a,{components:m,remarkPlugins:s,disallowedElements:c,children:o?n(e):e})}));
1
+ import{jsx as r,Fragment as e}from"react/jsx-runtime";import{styled as o}from"@mui/material";import{memo as n}from"react";import i,{defaultUrlTransform as a}from"react-markdown";import t from"remark-gfm";import{AssistantEntityLink as l,isEntityLinkHref as d,parseEntityLinkTarget as m}from"./entity-link/index.js";import{completeStreamedMarkdown as s}from"./streamed-markdown.js";import{AssistantPanelName as c}from"./theme.js";let p=o("div",{name:c,slot:"assistantMessage"})(({theme:{palette:r,shape:e,spacing:o,typography:n}})=>({overflowWrap:"anywhere","& > :first-child":{marginBlockStart:0},"& > :last-child":{marginBlockEnd:0},"p, ul, ol, pre, blockquote":{marginBlock:o(1)},"h1, h2, h3, h4, h5, h6":{...n.subtitle2,marginBlock:o(1.5,.5)},"ul, ol":{paddingInlineStart:o(2.5)},a:{color:r.primary.main},code:{background:r.action.hover,borderRadius:e.borderRadius/2,fontFamily:"ui-monospace, Menlo, monospace",fontSize:"0.9em",paddingInline:o(.5)},pre:{background:r.action.hover,borderRadius:e.borderRadius,overflowX:"auto",padding:o(1),code:{background:"none",padding:0}},blockquote:{borderInlineStart:`2px solid ${r.divider}`,color:r.text.secondary,marginInline:0,paddingInlineStart:o(1.5)},"th, td":{borderBlockEnd:`1px solid ${r.divider}`,padding:o(.5,1),textAlign:"start",verticalAlign:"top"}})),u=o("div")({overflowX:"auto",table:{borderCollapse:"collapse",inlineSize:"100%"}}),g={a:({node:o,children:n,href:i,...a})=>{if(null==i||!d(i))return r("a",{...a,href:i,target:"_blank",rel:"noopener noreferrer",children:n});let t=m(i);return null==t?r(e,{children:n}):r(l,{id:t,children:n})},table:({node:e,children:o,...n})=>r(u,{children:r("table",{...n,children:o})})},h=[t],f=r=>d(r)?r:a(r),b=["img"];export const AssistantMarkdown=n(({markdown:e,isStreaming:o})=>r(p,{children:r(i,{components:g,remarkPlugins:h,disallowedElements:b,urlTransform:f,children:o?s(e):e})}));
@@ -1 +1 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as s,styled as t}from"@mui/material";import{useMemo as r}from"react";import{match as n}from"ts-pattern";import{useEagerObservableValue as o}from"#package/react-sdk";import{PhxIcon as l}from"#package/ui-sdk";import{useConfigurator as d}from"../../application-runtime/index.js";import{AssistantToolChips as m}from"./AssistantChips.js";import{AssistantMarkdown as h}from"./AssistantMarkdown.js";import{describeAssistantFailure as c}from"./assistant-failure.js";import{AssistantPanelName as p}from"./theme.js";import{buildEarlierThreadItems as g,buildThreadView as u}from"./thread-items.js";import{useFollowStream as k}from"./use-follow-stream.js";let f=t("div",{name:p,slot:"thread"})({display:"grid",position:"relative"}),v=t("div",{name:p,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"}})),w=t("div",{name:p,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"})),b=t("div",{name:p,slot:"greeting"})({}),x=t("div",{name:p,slot:"status"})(({theme:{palette:e,typography:a}})=>({...a.caption,color:e.text.secondary})),y=t("div",{name:p,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}})),T=t(s,{name:p,slot:"earlierButton"})({alignSelf:"center"}),S=t("div",{name:p,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)})),j=t(s,{name:p,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}})),B=({item:a,isActive:s})=>n(a).with({kind:"user"},({text:a})=>e(w,{children:a})).with({kind:"text"},({markdown:a,isStreaming:i})=>e(h,{markdown:a,isStreaming:i})).with({kind:"tools"},({tools:a})=>e(m,{tools:a,isActive:s})).with({kind:"separator"},()=>e(y,{role:"separator",children:e(i,{id:"sdk.assistant.thread.earlierSummarized",message:"Earlier conversation summarized"})})).exhaustive();export const AssistantThread=()=>{let{assistantSystem:t}=d(),m=o(t.chat$),{messages:h,isLoading:p,isResuming:w,earlierThreads:y}=m,{items:I,isThinking:A}=r(()=>u(h,p),[h,p]),E=r(()=>g(y),[y]),R=r(()=>I.filter(({kind:e})=>"user"===e).length,[I]),L=m.error?c(m.failedStatus):void 0,{scrollerRef:z,hasUnseenContent:C,handleScroll:$,scrollToEnd:D}=k(r(()=>({messages:h,isThinking:A,isResuming:w,failure:L?.kind}),[h,A,w,L?.kind]),R),M=!m.isLoaded&&0===E.length&&!w&&!L;return a(f,{children:[a(v,{ref:z,onScroll:$,role:"log","aria-live":"polite",children:[m.isLoaded&&0===I.length&&0===E.length&&!p&&!w&&!L&&e(b,{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."})}),M&&e(x,{children:e(i,{id:"sdk.assistant.thread.loading",message:"Loading the conversationâ€Ļ"})}),m.isLoadingEarlierThread&&e(x,{children:e(i,{id:"sdk.assistant.thread.loadingEarlier",message:"Loading the earlier conversationâ€Ļ"})}),m.hasEarlierThread&&!m.isLoadingEarlierThread&&e(T,{size:"small",color:"inherit",onClick:t.loadEarlierThread,children:e(i,{id:"sdk.assistant.thread.showEarlier.label",message:"Show earlier conversation"})}),E.map(a=>e(B,{item:a,isActive:!1},a.id)),I.map(a=>e(B,{item:a,isActive:p&&a===I.at(-1)},a.id)),w&&e(x,{children:e(i,{id:"sdk.assistant.thread.resuming",message:"Resuming the conversationâ€Ļ"})}),A&&e(x,{children:e(i,{id:"sdk.assistant.thread.thinking",message:"Thinkingâ€Ļ"})}),L&&a(S,{role:"alert",children:[e("span",{children:n(L.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()}),L.canRetry&&e(s,{size:"small",variant:"outlined",color:"inherit",onClick:t.reloadThread,children:e(i,{id:"sdk.assistant.failure.retry.label",message:"Try again"})})]})]}),C&&e(j,{size:"small",onClick:D,endIcon:e(l,{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{EntityLinkSelectionProvider as g,useCreateEntityLinkSelection as u}from"./entity-link/index.js";import{AssistantPanelName as k}from"./theme.js";import{buildEarlierThreadItems as f,buildThreadView as v}from"./thread-items.js";import{useFollowStream as w}from"./use-follow-stream.js";let b=s("div",{name:k,slot:"thread"})({display:"grid",position:"relative"}),x=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"}})),y=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",maxInlineSize:"85%",overflowWrap:"anywhere",paddingBlock:a(1),paddingInline:a(1.5),whiteSpace:"pre-wrap"})),S=s("div",{name:k,slot:"greeting"})({}),T=s("div",{name:k,slot:"status"})(({theme:{palette:e,typography:a}})=>({...a.caption,color:e.text.secondary})),j=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}})),B=s(t,{name:k,slot:"earlierButton"})({alignSelf:"center"}),E=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)})),I=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:a,isActive:t})=>o(a).with({kind:"user"},({text:a})=>e(y,{children:a})).with({kind:"text"},({markdown:a,isStreaming:i})=>e(h,{markdown:a,isStreaming:i})).with({kind:"tools"},({tools:a})=>e(c,{tools:a,isActive:t})).with({kind:"separator"},()=>e(j,{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:k,isResuming:y,earlierThreads:j}=c,{items:C,isThinking:R}=n(()=>v(h,k),[h,k]),L=n(()=>f(j),[j]),z=n(()=>C.filter(({kind:e})=>"user"===e).length,[C]),$=c.error?p(c.failedStatus):void 0,{scrollerRef:D,hasUnseenContent:M,handleScroll:W,scrollToEnd:q}=w(n(()=>({messages:h,isThinking:R,isResuming:y,failure:$?.kind}),[h,R,y,$?.kind]),z),H=u(),N=r(e=>{e.target instanceof Element&&e.target.closest('a, button, input, select, textarea, [role="button"]')||window.getSelection()?.isCollapsed!==!1&&H.release()},[H]),Y=!c.isLoaded&&0===L.length&&!y&&!$;return a(b,{children:[e(g,{selection:H,children:a(x,{ref:D,onScroll:W,onClick:N,role:"log","aria-live":"polite",children:[c.isLoaded&&0===C.length&&0===L.length&&!k&&!y&&!$&&e(S,{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."})}),Y&&e(T,{children:e(i,{id:"sdk.assistant.thread.loading",message:"Loading the conversationâ€Ļ"})}),c.isLoadingEarlierThread&&e(T,{children:e(i,{id:"sdk.assistant.thread.loadingEarlier",message:"Loading the earlier conversationâ€Ļ"})}),c.hasEarlierThread&&!c.isLoadingEarlierThread&&e(B,{size:"small",color:"inherit",onClick:s.loadEarlierThread,children:e(i,{id:"sdk.assistant.thread.showEarlier.label",message:"Show earlier conversation"})}),L.map(a=>e(A,{item:a,isActive:!1},a.id)),C.map(a=>e(A,{item:a,isActive:k&&a===C.at(-1)},a.id)),y&&e(T,{children:e(i,{id:"sdk.assistant.thread.resuming",message:"Resuming the conversationâ€Ļ"})}),R&&e(T,{children:e(i,{id:"sdk.assistant.thread.thinking",message:"Thinkingâ€Ļ"})}),$&&a(E,{role:"alert",children:[e("span",{children:o($.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()}),$.canRetry&&e(t,{size:"small",variant:"outlined",color:"inherit",onClick:s.reloadThread,children:e(i,{id:"sdk.assistant.failure.retry.label",message:"Try again"})})]})]})}),M&&e(I,{size:"small",onClick:q,endIcon:e(d,{name:"CaretDown"}),children:e(i,{id:"sdk.assistant.thread.newReply.label",message:"New reply"})})]})};
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type DomainEntityId } from '#package/domain';
3
+ export interface AssistantEntityLinkProps {
4
+ readonly id: DomainEntityId<string>;
5
+ /** The text the assistant gave the link; the id itself is never shown. */
6
+ readonly children: ReactNode;
7
+ }
8
+ /**
9
+ * An entity the assistant named in a reply, shown as its label. It follows the configurator live:
10
+ * a click selects the entity when the scene can select it, the link shows when the entity is
11
+ * selected or hovered in the scene, and it is struck out once the entity is gone.
12
+ */
13
+ export declare const AssistantEntityLink: import("react").MemoExoticComponent<({ id, children }: AssistantEntityLinkProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{alpha as t,styled as i}from"@mui/material";import{memo as n,useCallback as r,useEffect as o,useRef as a}from"react";import{sceneEntitySelectHotspotComponent as l,selectableComponent as c}from"#package/domain";import{useDomain as d,useFirstRenderedComponent as s,useHoveredDomainEntityId as m,useRenderedSelector as u,useSelectEntity as p,useSelectedDomainEntityId as k,useStoreSelector as y}from"#package/react-sdk";import{FrontendAnalyticsFactory as h}from"../../../common/index.js";import{AssistantPanelName as b}from"../theme.js";import{useEntityLinkSelection as g}from"./entity-link-selection.js";import{resolveEntityLinkState as f}from"./entity-link-state.js";let v=({theme:{palette:e,shape:i,spacing:n}})=>({background:e.action.hover,border:"none",borderRadius:i.borderRadius/2,boxDecorationBreak:"clone",color:"inherit",font:"inherit",margin:0,paddingBlock:0,paddingInline:n(.5),textAlign:"inherit",WebkitBoxDecorationBreak:"clone",'&[data-entity-link="interactive"]':{background:t(e.primary.main,e.action.hoverOpacity),color:e.primary.main,cursor:"pointer",'&:hover, &:focus-visible, &[data-hovered="true"]':{background:t(e.primary.main,e.action.focusOpacity)},"&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:1}},'&[data-entity-link="missing"]':{background:"none",color:e.text.disabled,paddingInline:0,textDecoration:"line-through"},'&[data-selected="true"]':{boxShadow:`inset 0 0 0 1px ${e.primary.main}`}}),x=i("span",{name:b,slot:"entityLink"})(v),S=i("button",{name:b,slot:"entityLink"})(v),j=({kind:t,isSelected:i,children:n})=>e(x,{"data-entity-link":t,"data-selected":i,children:n}),T=({id:t,isSelected:i,children:n})=>{let{navigationSystem:u}=d(),k=s({entityIds:[t],componentTypes:[c]}),y=s({entityIds:[t],componentTypes:[l]}),{kind:b,canHover:v}=f({isSelectable:null!=k,isHoverDisabled:k?.state.hoverable===!1,hasSelectHotspot:null!=y}),x=m()===t,T=p(h.AssistantEntityLinkClicked),B=g(),E=r(()=>{B?.remember(t),T(t)},[t,B,T]),L=a(!1),D=r(()=>{v&&(L.current=!0,u.debouncedToggleHover(t))},[v,t,u]),H=r(()=>{L.current&&(L.current=!1,u.debouncedToggleHover(null))},[u]),I=r(e=>{"touch"!==e.pointerType&&D()},[D]),A=r(e=>{e.currentTarget.matches(":focus-visible")&&D()},[D]);return(o(()=>H,[v,H,t]),"interactive"!==b)?e(j,{kind:b,isSelected:i,children:n}):e(S,{type:"button","data-entity-link":b,"data-selected":i,"data-hovered":v&&x,"aria-current":i?"true":void 0,onClick:E,onPointerEnter:I,onPointerLeave:H,onFocus:A,onBlur:H,children:n})};export const AssistantEntityLink=n(({id:t,children:i})=>{let{domain:n}=d(),r=y(e=>null!=n.getEntity(t,e.state),[n,t]),o=u(e=>null!=n.getEntity(t,e.state),[n,t]),a=k()===t;return r?o?e(T,{id:t,isSelected:a,children:i}):e(j,{kind:"plain",isSelected:a,children:i}):e(j,{kind:"missing",isSelected:!1,children:i})});
@@ -0,0 +1,22 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { DomainEntityId } from '#package/domain';
3
+ /**
4
+ * The selection an entity link made, held for the thread the links are in. A click elsewhere in
5
+ * the thread takes back what a link selected, so a user can look at an entity and let it go again.
6
+ * A selection made anywhere else, in the scene, a hotspot or the sidebar, is never taken back.
7
+ */
8
+ export interface EntityLinkSelection {
9
+ /** Records that a link is selecting this entity; call it before the select update is committed. */
10
+ readonly remember: (id: DomainEntityId<string>) => void;
11
+ /** Deselects the entity a link selected, when it is still the selected one, and forgets it. */
12
+ readonly release: () => void;
13
+ }
14
+ /** Creates the selection the entity links of one thread share; the thread provides it to them. */
15
+ export declare const useCreateEntityLinkSelection: () => EntityLinkSelection;
16
+ export interface EntityLinkSelectionProviderProps {
17
+ readonly selection: EntityLinkSelection;
18
+ readonly children: ReactNode;
19
+ }
20
+ export declare const EntityLinkSelectionProvider: ({ selection, children }: EntityLinkSelectionProviderProps) => import("react/jsx-runtime").JSX.Element;
21
+ /** The selection of the thread the link is in, or `null` for a link rendered outside a thread. */
22
+ export declare const useEntityLinkSelection: () => EntityLinkSelection | null;
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{createContext as e,useCallback as r,useContext as n,useEffect as l,useMemo as c,useRef as i}from"react";import{useDeselect as o,useDomain as u,useSelectedDomainEntityId as a}from"#package/react-sdk";let s=e(null);export const useCreateEntityLinkSelection=()=>{let{storeSystem:t,navigationSystem:e}=u(),n=o(),s=a(),m=i(null);l(()=>{s!==m.current&&(m.current=null)},[s]);let p=r(t=>{m.current=t},[]),S=r(()=>{let r=m.current;m.current=null,null!=r&&e.getActiveSelectionState(t.stateSlices.committed.value.state)===r&&n()},[n,e,t]);return c(()=>({remember:p,release:S}),[p,S])};export const EntityLinkSelectionProvider=({selection:e,children:r})=>t(s.Provider,{value:e,children:r});export const useEntityLinkSelection=()=>n(s);
@@ -0,0 +1,27 @@
1
+ /** What is attached right now to an existing entity that an entity link points at. */
2
+ export interface EntityLinkFacts {
3
+ /** A `selectable` component is attached to the entity under the current filters. */
4
+ readonly isSelectable: boolean;
5
+ /** The attached `selectable` component switches hover off with `hoverable: false`. */
6
+ readonly isHoverDisabled: boolean;
7
+ /** A `sceneEntitySelectHotspot` component is attached to the entity under the current filters. */
8
+ readonly hasSelectHotspot: boolean;
9
+ }
10
+ /**
11
+ * How an entity link shows and behaves:
12
+ *
13
+ * - `missing`: the entity is gone, the link is struck out;
14
+ * - `plain`: the entity exists but nothing in the scene selects it, so the link is only a label;
15
+ * - `interactive`: a click selects the entity, as a click on it or on its hotspot in the scene does.
16
+ */
17
+ export type EntityLinkKind = 'missing' | 'plain' | 'interactive';
18
+ /** The state of a link to an entity that exists; a link to one that is gone is `missing` without it. */
19
+ export interface EntityLinkState {
20
+ readonly kind: Exclude<EntityLinkKind, 'missing'>;
21
+ /**
22
+ * The link sends its hover to the scene and shows the hover of the scene. Only an entity the
23
+ * scene itself can hover takes part, so one that is selected through a hotspot alone does not.
24
+ */
25
+ readonly canHover: boolean;
26
+ }
27
+ export declare const resolveEntityLinkState: (facts: EntityLinkFacts) => EntityLinkState;
@@ -0,0 +1 @@
1
+ export const resolveEntityLinkState=e=>{let{isSelectable:n,isHoverDisabled:t,hasSelectHotspot:i}=e;return n||i?{kind:"interactive",canHover:n&&!t}:{kind:"plain",canHover:!1}};
@@ -0,0 +1,5 @@
1
+ import { type DomainEntityId } from '#package/domain';
2
+ /** True for the target of a link the assistant wrote to point at an entity, `entity:<id>`, whatever follows the scheme. */
3
+ export declare const isEntityLinkHref: (href: string) => boolean;
4
+ /** The entity id an entity link points at, or `null` when what follows the scheme is not a well-formed entity id. */
5
+ export declare const parseEntityLinkTarget: (href: string) => DomainEntityId<string> | null;
@@ -0,0 +1 @@
1
+ import{DomainEntityIdSchema as t}from"#package/domain";let e="entity:",n=new RegExp(t.pattern);export const isEntityLinkHref=t=>t.startsWith(e);export const parseEntityLinkTarget=t=>{let r=t.slice(e.length);return t.startsWith(e)&&n.test(r)?r:null};
@@ -0,0 +1,3 @@
1
+ export { AssistantEntityLink } from './AssistantEntityLink.js';
2
+ export { EntityLinkSelectionProvider, useCreateEntityLinkSelection } from './entity-link-selection.js';
3
+ export { isEntityLinkHref, parseEntityLinkTarget } from './entity-link-target.js';
@@ -0,0 +1 @@
1
+ export{AssistantEntityLink}from"./AssistantEntityLink.js";export{EntityLinkSelectionProvider,useCreateEntityLinkSelection}from"./entity-link-selection.js";export{isEntityLinkHref,parseEntityLinkTarget}from"./entity-link-target.js";
@@ -0,0 +1 @@
1
+ export { SidebarKeys } from './sidebar-keys.js';
@@ -0,0 +1 @@
1
+ export{SidebarKeys}from"./sidebar-keys.js";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Values of the desktop sidebar's `data-sidebar` attribute: its variants and states. The sidebar writes
3
+ * them; the built-in desktop layout's rules react to them.
4
+ */
5
+ export declare const SidebarKeys: {
6
+ readonly Minimalist: 'minimalist';
7
+ readonly Split: 'split';
8
+ readonly Visible: 'visible';
9
+ readonly Hidden: 'hidden';
10
+ readonly Assistant: 'assistant';
11
+ };
@@ -0,0 +1 @@
1
+ export const SidebarKeys={Minimalist:"minimalist",Split:"split",Visible:"visible",Hidden:"hidden",Assistant:"assistant"};
@@ -0,0 +1,101 @@
1
+ import type { ComponentsOverrides } from '@mui/material';
2
+ import type { CSSProperties } from 'react';
3
+ import type { ValueOf } from '@salsita-ai/common/utils';
4
+ declare const MuiSidebarComponentName: 'PhxDesktopSidebar';
5
+ declare const MuiSidebarSlots: {
6
+ readonly Root: 'root';
7
+ readonly Header: 'header';
8
+ readonly Body: 'body';
9
+ readonly Content: 'content';
10
+ readonly Tabs: 'tabs';
11
+ readonly Footer: 'footer';
12
+ };
13
+ type DesktopSidebarSlots = ValueOf<typeof MuiSidebarSlots>;
14
+ declare module '@mui/material/styles' {
15
+ interface ComponentNameToClassKey {
16
+ [MuiSidebarComponentName]: DesktopSidebarSlots;
17
+ }
18
+ interface ComponentsPropsList {
19
+ [MuiSidebarComponentName]: ThemeableDesktopSidebarProps;
20
+ }
21
+ interface Components {
22
+ [MuiSidebarComponentName]?: {
23
+ defaultProps?: ComponentsPropsList['PhxDesktopSidebar'];
24
+ styleOverrides?: ComponentsOverrides<Theme>['PhxDesktopSidebar'];
25
+ };
26
+ }
27
+ }
28
+ /** Which side of its layout the sidebar is on. */
29
+ export type DesktopSidebarSide = 'start' | 'end';
30
+ interface SidebarOwnerState {
31
+ readonly isHeaderEmpty?: boolean;
32
+ readonly isContentEmpty?: boolean;
33
+ }
34
+ export interface ThemeableDesktopSidebarProps extends SidebarOwnerState {
35
+ /**
36
+ * Background applied to sidebar sections (header, body, footer).
37
+ *
38
+ * @default theme.palette.background.paper
39
+ */
40
+ readonly background?: CSSProperties['background'];
41
+ /**
42
+ * Border applied to sidebar sections.
43
+ *
44
+ * @default 0
45
+ */
46
+ readonly border?: CSSProperties['border'];
47
+ /**
48
+ * Corner radius applied to sidebar sections.
49
+ *
50
+ * @default theme.shape.sidebarBorderRadius ?? theme.shape.borderRadius
51
+ */
52
+ readonly borderRadius?: CSSProperties['borderRadius'];
53
+ /**
54
+ * CSS filter applied to the sidebar root (e.g. drop-shadow for elevation).
55
+ *
56
+ * @default elevation[1] drop-shadow
57
+ */
58
+ readonly filter?: CSSProperties['filter'];
59
+ /**
60
+ * Spacing value for sidebar inner padding.
61
+ * Accepts a theme spacing multiplier or a CSS value.
62
+ *
63
+ * @default theme.spacing(2.5)
64
+ */
65
+ readonly padding?: number | string;
66
+ /**
67
+ * Background gradient for scrollable edge indicators.
68
+ * Applied to `::before` and `::after` pseudo-elements on the content area.
69
+ *
70
+ * @default linear-gradient(180deg, hsl(from black h s l / 12%), transparent 8px)
71
+ */
72
+ readonly scrollableIndicatorBackground?: CSSProperties['background'];
73
+ /**
74
+ * Inline size (width) of the sidebar. Not read from the theme: the sidebar takes its width from its
75
+ * `width` prop, which the built-in desktop layout sets from `ThemeableDesktopLayoutProps.sidebarWidth`.
76
+ */
77
+ readonly width?: CSSProperties['width'];
78
+ }
79
+ /** Props of the built-in desktop sidebar. */
80
+ export interface DesktopSidebarProps {
81
+ /**
82
+ * Inline size (width) of the sidebar. Without it the sidebar fills the width and height of its
83
+ * container, which the layout sizes and positions; with it the sidebar takes this width and the
84
+ * height of its content, unless its container stretches it.
85
+ */
86
+ readonly width?: CSSProperties['width'];
87
+ /**
88
+ * Which side of the layout the sidebar is on. The sidebar tabs sit outside the sidebar on the other
89
+ * side: to its left for `end`, to its right for `start`.
90
+ *
91
+ * @default 'end'
92
+ */
93
+ readonly side?: DesktopSidebarSide;
94
+ }
95
+ /**
96
+ * The built-in desktop sidebar: tabs, back button, property page, footer and the assistant panel, with
97
+ * their spacing, scrolling and empty states. In fullscreen it stays in place, transparent and inert;
98
+ * the layout decides whether it keeps its space.
99
+ */
100
+ export declare const DesktopSidebar: ({ width, side }: DesktopSidebarProps) => import("react/jsx-runtime").JSX.Element;
101
+ export {};
@@ -0,0 +1,16 @@
1
+ import{jsx as r,jsxs as a}from"react/jsx-runtime";import{paperClasses as e,styled as d,tabsClasses as i,useTheme as t,useThemeProps as o}from"@mui/material";import{useMemo as n,useState as s}from"react";import{useIsFullscreenActive as b}from"#package/react-sdk";import{attrf as l,commonStyles as p,useInvalidateScrollTimeline as c,useIsEmpty as h}from"#package/ui-sdk";import{ASSISTANT_PANEL_SLOT as m,AssistantPanel as u,useIsAssistantPanelOpen as S}from"../../../assistant/index.js";import{SidebarKeys as g}from"../../sidebar-keys/index.js";import{DesktopSidebarBackButton as k}from"../sidebar-back-button/index.js";import{DesktopSidebarContent as x,useSidebarContent as E}from"../sidebar-contents/index.js";import{DesktopSidebarFooter as f}from"../sidebar-footer/index.js";import{DesktopSidebarTabs as v}from"../sidebar-tabs/index.js";let R="PhxDesktopSidebar",y={Root:d("div",{name:R,slot:"root",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r})=>[`
2
+ --phx-sidebar-background: ${r.background};
3
+ --phx-sidebar-border: ${r.border};
4
+ --phx-sidebar-filter: ${r.filter};
5
+ --phx-sidebar-padding: ${r.padding};
6
+ --phx-sidebar-radius: ${r.borderRadius}px;
7
+ --phx-sidebar-scrollable-indicator-background: ${r.scrollableIndicatorBackground};
8
+ `,{borderRadius:"var(--phx-sidebar-radius)",display:"grid",filter:"var(--phx-sidebar-filter)",gridTemplateRows:"min-content minmax(0, 1fr) min-content",inlineSize:r.width,...void 0===r.width&&{blockSize:"100%",inlineSize:"100%"},position:"relative","& > *":{pointerEvents:"auto"},"@container style(--inspect: on)":{"--phx-sidebar-background":"hsl(from gold h s l / 50%)"},[`&[data-sidebar*="${g.Visible}"]`]:{opacity:1},[`&[data-sidebar*="${g.Hidden}"]`]:{opacity:0},[`&[data-sidebar*="${g.Assistant}"] > :not([data-sidebar="${m}"])`]:{visibility:"hidden"}}]),Tabs:d("div",{name:R,slot:"tabs",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{spacing:a}})=>({insetBlockStart:0,insetInlineEnd:"100%",maxInlineSize:150,paddingInlineEnd:a(2),position:"absolute",..."start"===r.side&&{insetInlineEnd:"auto",insetInlineStart:"100%",paddingInlineEnd:0,paddingInlineStart:a(2),[`.${i.indicator}`]:{left:0,right:"auto"}},"&:is(:empty)":{padding:0},[`.${e.root}`]:{boxShadow:"none"}})),Header:d("header",{name:R,slot:"header",shouldForwardProp:r=>"ownerState"!==r})({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockEnd:0,borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",paddingBlock:"calc(0.6 * var(--phx-sidebar-padding))",paddingInline:"var(--phx-sidebar-padding)","&:is(:empty)":{border:0,paddingBlock:0}}),Body:d("div",{name:R,slot:"body",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r})=>({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockStart:0,borderBlockEnd:0,display:"grid",position:"relative","[data-sidebar] &":{...r.isHeaderEmpty&&{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",paddingBlockStart:"var(--phx-sidebar-padding)"}},'&:has([data-sidebar*="slot[content]"]:empty)':{...r.isContentEmpty&&{paddingBlock:0}},[`[data-sidebar*="${g.Minimalist}"] &`]:{...r.isContentEmpty&&{border:0}},[`[data-sidebar*="${g.Split}"] &`]:{borderBlockEnd:"var(--phx-sidebar-border)",borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",paddingBlockEnd:"var(--phx-sidebar-padding)"}})),Content:d("div",{name:R,slot:"content",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{spacing:a}})=>({...p.layout.normalizeScrollableContainer,alignContent:"start",borderRadius:"inherit",display:"grid",gap:a(3),padding:"var(--phx-sidebar-padding)","@supports (animation-timeline: scroll())":{"&[data-scrollable]":{scrollTimeline:"--phx-sidebar-timeline y","&::after, &::before":{animation:`${p.keyframes.fadeIn} both`,animationTimeline:"--phx-sidebar-timeline",background:"var(--phx-sidebar-scrollable-indicator-background)",backgroundRepeat:"no-repeat",content:'""',display:"block",insetInline:0,opacity:0,pointerEvents:"none",position:"absolute",zIndex:1},"&::after":{animationDirection:"reverse",animationRange:`calc(100% - ${a(4)}) 100%`,borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",insetBlockStart:"50%",insetBlockEnd:0,scale:"1 -1"},"&::before":{animationRange:`0 ${a(4)}`,borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",insetBlockStart:0,insetBlockEnd:"50%"}}},"&:is(:empty)":{paddingBlock:0},"[data-sidebar] &":{...r.isHeaderEmpty&&{paddingBlockStart:0,"&::before":{borderStartStartRadius:0,borderStartEndRadius:0,insetBlockStart:"var(--phx-sidebar-padding)"}}},[`[data-sidebar*="${g.Split}"] &`]:{paddingBlockEnd:0,"&::after":{borderEndStartRadius:0,borderEndEndRadius:0,insetBlockEnd:"var(--phx-sidebar-padding)"}}})),Footer:d("footer",{name:R,slot:"footer",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{palette:a,spacing:e}})=>({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockStart:`1px solid ${a.divider}`,borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",padding:"var(--phx-sidebar-padding)","&:is(:empty)":{border:0,paddingBlock:0},[`[data-sidebar*="${g.Minimalist}"] &`]:{...r.isContentEmpty&&{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit"}},[`[data-sidebar*="${g.Split}"] &`]:{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",marginBlockStart:e(2)}}))};export const DesktopSidebar=({width:e,side:d="end"})=>{let[i,p]=s(null),[m,B]=s(null),$=n(()=>({current:i}),[i]),w=n(()=>({current:m}),[m]),{palette:I,shape:j,spacing:C}=t(),{background:F=I.background.paper,border:H=0,borderRadius:P=j.sidebarBorderRadius??j.borderRadius,filter:z=`
9
+ drop-shadow(0 1px 1.5px hsl(from ${I.common.black} h s l / 12%))
10
+ drop-shadow(0 1px 0.5px hsl(from ${I.common.black} h s l / 14%))
11
+ drop-shadow(0 2px 0.5px hsl(from ${I.common.black} h s l / 20%))
12
+ `,padding:T=C(2.5),scrollableIndicatorBackground:D=`linear-gradient(
13
+ 180deg,
14
+ hsl(from black h s l / 12%),
15
+ hsl(from black h s l / 0%) 8px
16
+ )`}=o({props:{},name:R}),{hasMiniSidebar:M,hasSplitSidebar:A}=E(),V=S(),q=!b(),G=h($,{disabled:!q}),J=h(w,{disabled:!q});c(w,{disabled:!q});let K={background:F,border:H,borderRadius:P,filter:z,isHeaderEmpty:G,isContentEmpty:J,padding:T,scrollableIndicatorBackground:D,width:e};return a(y.Root,{ownerState:K,"data-sidebar":l({variant:{[`${g.Minimalist}`]:M,[`${g.Split}`]:A},state:{[`${g.Visible}`]:q,[`${g.Hidden}`]:!q,[`${g.Assistant}`]:V}}),inert:q?void 0:"",children:[r(y.Tabs,{ownerState:{...K,side:d},"data-sidebar":"slot[tabs]",children:r(v,{})}),r(y.Header,{ref:p,ownerState:K,"data-sidebar":"slot[header]",children:r(k,{})}),r(y.Body,{ownerState:K,"data-sidebar":"slot[body]",children:r(y.Content,{ref:B,ownerState:K,"data-sidebar":"slot[content]",children:r(x,{})})}),r(y.Footer,{ownerState:K,"data-sidebar":"slot[footer]",children:r(f,{})}),r(u,{})]})};
@@ -0,0 +1 @@
1
+ export { DesktopSidebar, type DesktopSidebarProps, type DesktopSidebarSide } from './DesktopSidebar.js';
@@ -0,0 +1 @@
1
+ export{DesktopSidebar}from"./DesktopSidebar.js";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * InvariantViolations component that monitors domain store validity and displays
3
- * violation notifications using notistack snackbars.
2
+ * InvariantViolations component that shows the violation and error messages of
3
+ * `useConfiguratorMessages` as notistack snackbars.
4
4
  *
5
- * This component subscribes to the store's validity state and shows appropriate
6
- * error messages for uncaught errors and entity validation violations.
5
+ * An uncaught error is also logged; each entity violation becomes one snackbar
6
+ * prefixed with the id of its entity.
7
7
  */
8
8
  export declare const InvariantViolations: () => null;
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Trans as t}from"@lingui/react";import{useSnackbar as i}from"notistack";import{useSubscription as e}from"observable-hooks";import{useMemo as a}from"react";import{map as o}from"rxjs";import{match as n}from"ts-pattern";import{useDomain as s,useLogger as m,useResolveLocalizable as l}from"#package/react-sdk";export const InvariantViolations=()=>{let{storeSystem:p}=s(),{enqueueSnackbar:g}=i(),c=l(),f=m();return e(a(()=>p.stateSlices.potentiallyInvalid.pipe(o(r=>r.validity)),[p]),i=>{if(!i.valid&&"uncaught"===i.severity){f.error("Uncaught error",i.error),g(r(t,{id:"sdk.messages.validation.uncaughtError.message",message:"Oops, something went wrong"}),{variant:"error"});return}i.valid||i.entityViolations.forEach(({violation:r,entityId:t})=>{let i=c(r.message??r.type);g(`${String(t)}: ${i}`,{variant:n(r.severity).with("notice",()=>"info").with("warning",()=>"warning").with("fixable",()=>"error").with("fatal",()=>"error").exhaustive()})})}),null};
1
+ import{jsx as r}from"react/jsx-runtime";import{Trans as t}from"@lingui/react";import{useSnackbar as i}from"notistack";import{match as e}from"ts-pattern";import{useConfiguratorMessages as a,useLogger as n}from"#package/react-sdk";export const InvariantViolations=()=>{let{enqueueSnackbar:o}=i(),s=n();return a(i=>{e(i).with({kind:"error"},({error:i})=>{s.error("Uncaught error",i),o(r(t,{id:"sdk.messages.validation.uncaughtError.message",message:"Oops, something went wrong"}),{variant:"error"})}).with({kind:"violation"},({entityId:r,violation:t,text:i})=>{o(`${String(r)}: ${i}`,{variant:e(t.severity).with("notice",()=>"info").with("warning",()=>"warning").with("fixable",()=>"error").with("fatal",()=>"error").exhaustive()})}).with({kind:"sideEffect"},()=>{}).exhaustive()}),null};
@@ -1,9 +1,6 @@
1
1
  /**
2
- * SideEffects component that listens to domain store updates and displays
3
- * informational snackbars for updates that contain hint messages.
4
- *
5
- * This component renders nothing but subscribes to the committed state changes
6
- * from the domain store system and shows user-friendly notifications for
7
- * operations that provide feedback hints.
2
+ * SideEffects component that shows the side-effect messages of
3
+ * `useConfiguratorMessages`, the hints of committed updates, as informational
4
+ * notistack snackbars.
8
5
  */
9
6
  export declare const SideEffects: () => null;
@@ -1 +1 @@
1
- import{useSnackbar as t}from"notistack";import{useSubscription as r}from"observable-hooks";import{useMemo as e}from"react";import{distinctUntilChanged as o,map as i,skip as a}from"rxjs/operators";import{useDomain as m,useResolveLocalizable as n}from"#package/react-sdk";let p=[];export const SideEffects=()=>{let{storeSystem:s}=m(),f=n(),{enqueueSnackbar:c}=t();return r(e(()=>s.stateSlices.committed.pipe(a(1),o(),i(t=>{if("updates"in t){let r=t.updates.filter(t=>!!t.hint);return r.length>0?r:p}return p})),[s]),t=>{t.forEach(t=>{c(f(t.hint),{variant:"info"})})}),null};
1
+ import{useSnackbar as t}from"notistack";import{useConfiguratorMessages as e}from"#package/react-sdk";export const SideEffects=()=>{let{enqueueSnackbar:r}=t();return e(t=>{"sideEffect"===t.kind&&r(t.text,{variant:"info"})}),null};
@@ -1,5 +1,6 @@
1
1
  export * from './call-to-action/index.js';
2
2
  export * from './canvas/index.js';
3
+ export * from './desktop-sidebar/index.js';
3
4
  export * from './footer/index.js';
4
5
  export * from './hamburger-menu/index.js';
5
6
  export * from './header/index.js';
@@ -1 +1 @@
1
- export*from"./call-to-action/index.js";export*from"./canvas/index.js";export*from"./footer/index.js";export*from"./hamburger-menu/index.js";export*from"./header/index.js";export*from"./mobile-tabs/index.js";export*from"./powered-by/index.js";export*from"./readonly-banner/index.js";export*from"./services/index.js";export*from"./sidebar-back-button/index.js";export*from"./sidebar-contents/index.js";export*from"./sidebar-footer/index.js";export*from"./sidebar-tabs/index.js";export*from"./snackbar-root/index.js";export*from"./toolbar/index.js";export*from"./tool-controls/index.js";export*from"./view-controls/index.js";
1
+ export*from"./call-to-action/index.js";export*from"./canvas/index.js";export*from"./desktop-sidebar/index.js";export*from"./footer/index.js";export*from"./hamburger-menu/index.js";export*from"./header/index.js";export*from"./mobile-tabs/index.js";export*from"./powered-by/index.js";export*from"./readonly-banner/index.js";export*from"./services/index.js";export*from"./sidebar-back-button/index.js";export*from"./sidebar-contents/index.js";export*from"./sidebar-footer/index.js";export*from"./sidebar-tabs/index.js";export*from"./snackbar-root/index.js";export*from"./toolbar/index.js";export*from"./tool-controls/index.js";export*from"./view-controls/index.js";
@@ -1,80 +1,6 @@
1
1
  import type { ComponentsOverrides } from '@mui/material';
2
2
  import type { CSSProperties } from 'react';
3
3
  import type { ValueOf } from '@salsita-ai/common/utils';
4
- declare const MuiSidebarComponentName: 'PhxDesktopSidebar';
5
- declare const MuiSidebarSlots: {
6
- readonly Root: 'root';
7
- readonly Header: 'header';
8
- readonly Body: 'body';
9
- readonly Content: 'content';
10
- readonly Tabs: 'tabs';
11
- readonly Footer: 'footer';
12
- };
13
- type DesktopSidebarSlots = ValueOf<typeof MuiSidebarSlots>;
14
- declare module '@mui/material/styles' {
15
- interface ComponentNameToClassKey {
16
- [MuiSidebarComponentName]: DesktopSidebarSlots;
17
- }
18
- interface ComponentsPropsList {
19
- [MuiSidebarComponentName]: ThemeableDesktopSidebarProps;
20
- }
21
- interface Components {
22
- [MuiSidebarComponentName]?: {
23
- defaultProps?: ComponentsPropsList['PhxDesktopSidebar'];
24
- styleOverrides?: ComponentsOverrides<Theme>['PhxDesktopSidebar'];
25
- };
26
- }
27
- }
28
- interface SidebarOwnerState {
29
- readonly isHeaderEmpty?: boolean;
30
- readonly isContentEmpty?: boolean;
31
- }
32
- export interface ThemeableDesktopSidebarProps extends SidebarOwnerState {
33
- /**
34
- * Background applied to sidebar sections (header, body, footer).
35
- *
36
- * @default theme.palette.background.paper
37
- */
38
- readonly background?: CSSProperties['background'];
39
- /**
40
- * Border applied to sidebar sections.
41
- *
42
- * @default 0
43
- */
44
- readonly border?: CSSProperties['border'];
45
- /**
46
- * Corner radius applied to sidebar sections.
47
- *
48
- * @default theme.shape.sidebarBorderRadius ?? theme.shape.borderRadius
49
- */
50
- readonly borderRadius?: CSSProperties['borderRadius'];
51
- /**
52
- * CSS filter applied to the sidebar root (e.g. drop-shadow for elevation).
53
- *
54
- * @default elevation[1] drop-shadow
55
- */
56
- readonly filter?: CSSProperties['filter'];
57
- /**
58
- * Spacing value for sidebar inner padding.
59
- * Accepts a theme spacing multiplier or a CSS value.
60
- *
61
- * @default theme.spacing(2.5)
62
- */
63
- readonly padding?: number | string;
64
- /**
65
- * Background gradient for scrollable edge indicators.
66
- * Applied to `::before` and `::after` pseudo-elements on the content area.
67
- *
68
- * @default linear-gradient(180deg, hsl(from black h s l / 12%), transparent 8px)
69
- */
70
- readonly scrollableIndicatorBackground?: CSSProperties['background'];
71
- /**
72
- * Inline size (width) of the sidebar.
73
- *
74
- * @default inherited from ThemeableDesktopLayoutProps.sidebarWidth
75
- */
76
- readonly width?: CSSProperties['width'];
77
- }
78
4
  export declare const PhxDesktopLayoutName: 'PhxDesktopLayout';
79
5
  declare const MuiLayoutComponentName: "PhxDesktopLayout";
80
6
  declare const MuiLayoutSlots: {
@@ -1,17 +1,10 @@
1
- import{jsx as a,jsxs as t,Fragment as o}from"react/jsx-runtime";import{keyframes as e,paperClasses as r,snackbarClasses as d,styled as i,useTheme as n,useThemeProps as s}from"@mui/material";import{AnimatePresence as l,motion as p}from"motion/react";import{useCallback as b,useRef as u}from"react";import{useAccessService as c,useIsFullscreenActive as h}from"#package/react-sdk";import{attrf as m,commonStyles as y,numToPx as g,useInvalidateScrollTimeline as f,useIsEmpty as x,useResponsive as k}from"#package/ui-sdk";import{usePreview as v}from"../../../configurator-context/index.js";import{ASSISTANT_PANEL_SLOT as S,AssistantPanel as E,useIsAssistantPanelOpen as w}from"../../assistant/index.js";import{LayoutSlots as R}from"../slots/index.js";import{DesktopPreview as $}from"./DesktopPreview.js";import{useLayoutSceneSafeArea as B}from"./use-layout-scene-safe-area.js";let C="PhxDesktopSidebar",D="minimalist",T="split",I="visible",A="hidden",P="assistant",F={Root:i("div",{name:C,slot:"root",shouldForwardProp:a=>"ownerState"!==a})(({ownerState:a})=>[`
2
- --phx-sidebar-background: ${a.background};
3
- --phx-sidebar-border: ${a.border};
4
- --phx-sidebar-filter: ${a.filter};
5
- --phx-sidebar-padding: ${a.padding};
6
- --phx-sidebar-radius: ${a.borderRadius}px;
7
- --phx-sidebar-scrollable-indicator-background: ${a.scrollableIndicatorBackground};
8
- `,{borderRadius:"var(--phx-sidebar-radius)",display:"grid",filter:"var(--phx-sidebar-filter)",gridTemplateRows:"min-content minmax(0, 1fr) min-content",inlineSize:a.width,position:"relative","& > *":{pointerEvents:"auto"},"@container style(--inspect: on)":{"--phx-sidebar-background":"hsl(from gold h s l / 50%)"},[`&[data-sidebar*="${I}"]`]:{opacity:1},[`&[data-sidebar*="${A}"]`]:{opacity:0},[`&[data-sidebar*="${P}"] > :not([data-sidebar="${S}"])`]:{visibility:"hidden"}}]),Tabs:i("div",{name:C,slot:"tabs",shouldForwardProp:a=>"ownerState"!==a})(({theme:{spacing:a}})=>({insetBlockStart:0,insetInlineEnd:"100%",maxInlineSize:150,paddingInlineEnd:a(2),position:"absolute","&:is(:empty)":{padding:0},[`.${r.root}`]:{boxShadow:"none"}})),Header:i("header",{name:C,slot:"header",shouldForwardProp:a=>"ownerState"!==a})({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockEnd:0,borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",paddingBlock:"calc(0.6 * var(--phx-sidebar-padding))",paddingInline:"var(--phx-sidebar-padding)","&:is(:empty)":{border:0,paddingBlock:0}}),Body:i("div",{name:C,slot:"body",shouldForwardProp:a=>"ownerState"!==a})(({ownerState:a})=>({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockStart:0,borderBlockEnd:0,display:"grid",position:"relative",'[data-layout*="slot[sidebar]"]:where(:has([data-sidebar="slot[header]"])) &':{...a.isHeaderEmpty&&{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",paddingBlockStart:"var(--phx-sidebar-padding)"}},'&:has([data-sidebar*="slot[content]"]:empty)':{...a.isContentEmpty&&{paddingBlock:0}},[`[data-sidebar*="${D}"] &`]:{...a.isContentEmpty&&{border:0}},[`[data-sidebar*="${T}"] &`]:{borderBlockEnd:"var(--phx-sidebar-border)",borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",paddingBlockEnd:"var(--phx-sidebar-padding)"}})),Content:i("div",{name:C,slot:"content",shouldForwardProp:a=>"ownerState"!==a})(({ownerState:a,theme:{spacing:t}})=>({...y.layout.normalizeScrollableContainer,alignContent:"start",borderRadius:"inherit",display:"grid",gap:t(3),padding:"var(--phx-sidebar-padding)","@supports (animation-timeline: scroll())":{"&[data-scrollable]":{scrollTimeline:"--phx-sidebar-timeline y","&::after, &::before":{animation:`${y.keyframes.fadeIn} both`,animationTimeline:"--phx-sidebar-timeline",background:"var(--phx-sidebar-scrollable-indicator-background)",backgroundRepeat:"no-repeat",content:'""',display:"block",insetInline:0,opacity:0,pointerEvents:"none",position:"absolute",zIndex:1},"&::after":{animationDirection:"reverse",animationRange:`calc(100% - ${t(4)}) 100%`,borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",insetBlockStart:"50%",insetBlockEnd:0,scale:"1 -1"},"&::before":{animationRange:`0 ${t(4)}`,borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",insetBlockStart:0,insetBlockEnd:"50%"}}},"&:is(:empty)":{paddingBlock:0},'[data-layout*="slot[sidebar]"] &':{...a.isHeaderEmpty&&{paddingBlockStart:0,"&::before":{borderStartStartRadius:0,borderStartEndRadius:0,insetBlockStart:"var(--phx-sidebar-padding)"}}},[`[data-sidebar*="${T}"] &`]:{paddingBlockEnd:0,"&::after":{borderEndStartRadius:0,borderEndEndRadius:0,insetBlockEnd:"var(--phx-sidebar-padding)"}}})),Footer:i("footer",{name:C,slot:"footer",shouldForwardProp:a=>"ownerState"!==a})(({ownerState:a,theme:{palette:t,spacing:o}})=>({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockStart:`1px solid ${t.divider}`,borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",padding:"var(--phx-sidebar-padding)","&:is(:empty)":{border:0,paddingBlock:0},[`[data-sidebar*="${D}"] &`]:{...a.isContentEmpty&&{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit"}},[`[data-sidebar*="${T}"] &`]:{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",marginBlockStart:o(2)}}))};export const PhxDesktopLayoutName="PhxDesktopLayout";let j="PhxDesktopLayout",z=i(p.div,{name:j,slot:"root",shouldForwardProp:a=>"ownerState"!==a})(({ownerState:a,theme:{spacing:t}})=>{let o=e({"0%":{marginInlineEnd:0},"100%":{marginInlineEnd:t(-2)}});return[`
1
+ import{jsx as t,jsxs as a,Fragment as o}from"react/jsx-runtime";import{keyframes as e,snackbarClasses as i,styled as r,useThemeProps as d}from"@mui/material";import{AnimatePresence as l,motion as s}from"motion/react";import{useCallback as n}from"react";import{useAccessService as u,useIsFullscreenActive as m}from"#package/react-sdk";import{attrf as p,commonStyles as y,numToPx as c,useResponsive as b}from"#package/ui-sdk";import{usePreview as h}from"../../../configurator-context/index.js";import{useIsAssistantPanelOpen as f}from"../../assistant/index.js";import{SidebarKeys as g}from"../sidebar-keys/index.js";import{LayoutSlots as x}from"../slots/index.js";import{DesktopPreview as v}from"./DesktopPreview.js";import{useLayoutSceneSafeArea as k}from"./use-layout-scene-safe-area.js";export const PhxDesktopLayoutName="PhxDesktopLayout";let w="PhxDesktopLayout",C=r(s.div,{name:w,slot:"root",shouldForwardProp:t=>"ownerState"!==t})(({ownerState:t,theme:{spacing:a}})=>{let o=e({"0%":{marginInlineEnd:0},"100%":{marginInlineEnd:a(-2)}});return[`
9
2
  --inspect: off; // đŸ•šī¸ inspection mode toggle
10
3
 
11
- --phx-layout-sidebar-track-size: ${g(a.sidebarWidth)};
4
+ --phx-layout-sidebar-track-size: ${c(t.sidebarWidth)};
12
5
 
13
- --phx-layout-gap: ${t(2)};
14
- --phx-layout-gutter: ${t(3)};
6
+ --phx-layout-gap: ${a(2)};
7
+ --phx-layout-gutter: ${a(3)};
15
8
  `,{display:"grid",gridTemplateColumns:`
16
9
  [full-start]
17
10
  var(--phx-layout-gutter)
@@ -38,12 +31,4 @@ import{jsx as a,jsxs as t,Fragment as o}from"react/jsx-runtime";import{keyframes
38
31
  [bottom-start]
39
32
  min-content
40
33
  [bottom-end full-end]
41
- `,inset:0,isolation:"isolate",pointerEvents:"none",position:"absolute","@container style(--inspect: on)":{'& > *, & > * > *, [data-layout*="slot[body.footer]"] > *':{outline:"2px solid hsl(from tomato h s l / 50%)"}},'[data-layout*="interactive"]':{"& > *":{pointerEvents:"auto"}},'[data-layout*="slot[header]"]':{gridArea:"top-start / main-start / top-end / sidebar-end"},'[data-layout*="slot[body]"]':{containerType:"size",display:"grid",gridArea:"main",gridRowStart:"top-end",gridTemplateRows:"min-content 1fr min-content"},'[data-layout*="slot[body.top]"]':{gridArea:"1 / 1 / 2 / -1","& > *":{...y.transition.fadeIn}},'[data-layout*="slot[body.safeSceneArea]"]':{gridArea:"1 / 1 / 3 / -1","@container style(--inspect: on)":{background:"hsl(from lime h s l / 50%)"}},'[data-layout*="slot[body.bottom]"]':{alignItems:"end",display:"grid",gap:t(2),gridArea:"3 / 1 / 4 / -1",gridTemplateColumns:"minmax(0, auto) minmax(60px, 1fr)",justifyContent:"start",position:"relative",'&:has([data-layout="slot[body.viewControls]"]:empty)':{gap:0,gridTemplateColumns:"repeat(2, auto)"}},'[data-layout="slot[body.toolbar]"]':{animation:`${o} auto linear both`,animationTimeline:"scroll(self inline)",display:"flex",margin:t(-2),overflowX:"scroll",overscrollBehavior:"contain",padding:t(2),scrollbarWidth:"none","&::after":{content:'""'}},'[data-layout="slot[body.toolControls]"]':{insetBlockEnd:`calc(100% + ${t(6)})`,position:"absolute","& > *":{...y.transition.fadeIn,transitionDuration:"300ms"}},'[data-layout="slot[body.viewControls]"]':{},'[data-layout="slot[body.logo]"], [data-layout="slot[body.sideEffects]"]':{insetBlockEnd:`calc(100% + ${t(2)})`,position:"absolute"},'[data-layout="slot[body.sideEffects]"]':{insetInline:0,[`.${d.root}`]:{inset:"unset",insetBlockEnd:0,position:"absolute"}},'[data-layout*="slot[sidebar]"]':{display:"grid",gridArea:"top-start / sidebar-start / main-end / sidebar-end",gridTemplateRows:"minmax(0, auto)"},'[data-layout*="slot[footer]"]':{display:"grid",gap:"var(--phx-layout-gap)",gridArea:"bottom-start / full-start / bottom-end / full-end"},'&:has([data-header*="fixed"])':{'[data-layout*="slot[header]"]':{gridArea:"full-start / full-start / top-end / full-end"},'[data-layout*="slot[body]"]':{gridRowStart:"main-start"},'[data-layout*="slot[sidebar]"]':{gridRow:"main-start / main-end"}},'&:has([data-header*="floating"])':{'[data-layout*="slot[header]"]':{gridColumnEnd:"main-end"}},[`&:has([data-sidebar*="${D}"])`]:{'[data-layout*="slot[sidebar]"]':{alignContent:"end",gridRow:"main-start / main-end"}},[`&:has([data-header*="floating"]):has([data-sidebar*="${D}"])`]:{'[data-layout*="slot[header]"]':{gridColumnEnd:"sidebar-end"},'[data-layout*="slot[sidebar]"]':{gridRowStart:"top-end"}},[`&:has([data-sidebar*="${P}"])`]:{'[data-layout*="slot[sidebar]"]':{alignContent:"stretch"}},[`&:has([data-sidebar*="${A}"])`]:{"--phx-layout-gap":0,"--phx-layout-sidebar-track-size":0,'[data-layout*="slot[sidebar]"]':{overflow:"hidden"}}}]}),H=i("div")({gridArea:"1 / 1 / -1 / -1"});export const DesktopLayout=()=>{let e=u(null),r=u(null),{palette:d,shape:i,spacing:p}=n(),{sidebarWidth:y="clamp(360px, 30cqi, 400px)"}=s({props:{},name:j}),{background:g=d.background.paper,border:S=0,borderRadius:L=i.sidebarBorderRadius??i.borderRadius,filter:M=`
42
- drop-shadow(0 1px 1.5px hsl(from ${d.common.black} h s l / 12%))
43
- drop-shadow(0 1px 0.5px hsl(from ${d.common.black} h s l / 14%))
44
- drop-shadow(0 2px 0.5px hsl(from ${d.common.black} h s l / 20%))
45
- `,padding:W=p(2.5),scrollableIndicatorBackground:q=`linear-gradient(
46
- 180deg,
47
- hsl(from black h s l / 12%),
48
- hsl(from black h s l / 0%) 8px
49
- )`}=s({props:{},name:C}),{hasMiniSidebar:N,hasSplitSidebar:V}=R.useSidebarContent(),X=w(),{accessInfo:G}=c(),J=h(),{isPreview:K,isHidden:O}=v(),Q=!O&&!K,U=!J,{setAnimating:Y}=k(),{containerRef:Z,safeAreaRef:_,update:aa}=B({enabled:Q,hasMiniSidebar:N&&!X}),at=b(()=>{Y(!0)},[Y]),ao=b(()=>{Y(!1),aa()},[Y,aa]),ae=Q&&U,ar=x(e,{disabled:!ae}),ad=x(r,{disabled:!ae});f(r,{disabled:!ae});let ai={background:g,border:S,borderRadius:L,filter:M,isHeaderEmpty:ar,isContentEmpty:ad,padding:W,scrollableIndicatorBackground:q,width:y};return a(o,{children:t(l,{mode:"wait",children:[!O&&K&&a($,{},"preview-layout"),Q&&t(z,{layoutId:"ui-layout",layout:!0,ownerState:{sidebarWidth:y},"data-layout":m({state:{initial:!J,fullscreen:J}}),onLayoutAnimationStart:at,onLayoutAnimationComplete:ao,children:[a(H,{ref:Z}),a("header",{"data-layout":"slot[header]",children:a(R.DesktopHeader,{})}),t("main",{"data-layout":"slot[body]",children:[a("div",{"data-layout":"slot[body.top] interactive",children:a(R.DesktopCallToAction,{})}),a("div",{ref:_,"data-layout":"slot[body.safeSceneArea]"}),t("div",{"data-layout":"slot[body.bottom] interactive",children:[a("div",{"data-layout":"slot[body.toolbar]",children:a(R.DesktopToolbar,{})}),a("div",{"data-layout":"slot[body.toolControls]",children:!J&&a(R.DesktopToolControls,{})}),a("div",{"data-layout":"slot[body.viewControls]",children:a(R.DesktopViewControls,{})}),a("div",{"data-layout":"slot[body.logo]",children:a(R.DesktopPoweredBy,{})}),a("div",{"data-layout":"slot[body.sideEffects]",children:a(R.DesktopSnackbarsRoot,{})})]})]}),a("aside",{"data-layout":"slot[sidebar]",children:t(F.Root,{ownerState:ai,"data-sidebar":m({variant:{[`${D}`]:N,[`${T}`]:V},state:{[`${I}`]:U,[`${A}`]:!U,[`${P}`]:X}}),inert:U?void 0:"",children:[a(F.Tabs,{ownerState:ai,"data-sidebar":"slot[tabs]",children:a(R.DesktopSidebarTabs,{})}),a(F.Header,{ref:e,ownerState:ai,"data-sidebar":"slot[header]",children:a(R.DesktopSidebarBackButton,{})}),a(F.Body,{ownerState:ai,"data-sidebar":"slot[body]",children:a(F.Content,{ref:r,ownerState:ai,"data-sidebar":"slot[content]",children:a(R.DesktopSidebarContent,{})})}),a(F.Footer,{ownerState:ai,"data-sidebar":"slot[footer]",children:a(R.DesktopSidebarFooter,{})}),a(E,{})]})}),t("footer",{"data-layout":"slot[footer] interactive",children:[G.viewMode&&!J&&a(R.DesktopReadonlyBanner,{}),a(R.DesktopFooter,{})]})]},"interface-layout")]})})};
34
+ `,inset:0,isolation:"isolate",pointerEvents:"none",position:"absolute","@container style(--inspect: on)":{'& > *, & > * > *, [data-layout*="slot[body.footer]"] > *':{outline:"2px solid hsl(from tomato h s l / 50%)"}},'[data-layout*="interactive"]':{"& > *":{pointerEvents:"auto"}},'[data-layout*="slot[header]"]':{gridArea:"top-start / main-start / top-end / sidebar-end"},'[data-layout*="slot[body]"]':{containerType:"size",display:"grid",gridArea:"main",gridRowStart:"top-end",gridTemplateRows:"min-content 1fr min-content"},'[data-layout*="slot[body.top]"]':{gridArea:"1 / 1 / 2 / -1","& > *":{...y.transition.fadeIn}},'[data-layout*="slot[body.safeSceneArea]"]':{gridArea:"1 / 1 / 3 / -1","@container style(--inspect: on)":{background:"hsl(from lime h s l / 50%)"}},'[data-layout*="slot[body.bottom]"]':{alignItems:"end",display:"grid",gap:a(2),gridArea:"3 / 1 / 4 / -1",gridTemplateColumns:"minmax(0, auto) minmax(60px, 1fr)",justifyContent:"start",position:"relative",'&:has([data-layout="slot[body.viewControls]"]:empty)':{gap:0,gridTemplateColumns:"repeat(2, auto)"}},'[data-layout="slot[body.toolbar]"]':{animation:`${o} auto linear both`,animationTimeline:"scroll(self inline)",display:"flex",margin:a(-2),overflowX:"scroll",overscrollBehavior:"contain",padding:a(2),scrollbarWidth:"none","&::after":{content:'""'}},'[data-layout="slot[body.toolControls]"]':{insetBlockEnd:`calc(100% + ${a(6)})`,position:"absolute","& > *":{...y.transition.fadeIn,transitionDuration:"300ms"}},'[data-layout="slot[body.viewControls]"]':{},'[data-layout="slot[body.logo]"], [data-layout="slot[body.sideEffects]"]':{insetBlockEnd:`calc(100% + ${a(2)})`,position:"absolute"},'[data-layout="slot[body.sideEffects]"]':{insetInline:0,[`.${i.root}`]:{inset:"unset",insetBlockEnd:0,position:"absolute"}},'[data-layout*="slot[sidebar]"]':{display:"grid",gridArea:"top-start / sidebar-start / main-end / sidebar-end",gridTemplateRows:"minmax(0, auto)"},'[data-layout*="slot[footer]"]':{display:"grid",gap:"var(--phx-layout-gap)",gridArea:"bottom-start / full-start / bottom-end / full-end"},'&:has([data-header*="fixed"])':{'[data-layout*="slot[header]"]':{gridArea:"full-start / full-start / top-end / full-end"},'[data-layout*="slot[body]"]':{gridRowStart:"main-start"},'[data-layout*="slot[sidebar]"]':{gridRow:"main-start / main-end"}},'&:has([data-header*="floating"])':{'[data-layout*="slot[header]"]':{gridColumnEnd:"main-end"}},[`&:has([data-sidebar*="${g.Minimalist}"])`]:{'[data-layout*="slot[sidebar]"]':{alignContent:"end",gridRow:"main-start / main-end"}},[`&:has([data-header*="floating"]):has([data-sidebar*="${g.Minimalist}"])`]:{'[data-layout*="slot[header]"]':{gridColumnEnd:"sidebar-end"},'[data-layout*="slot[sidebar]"]':{gridRowStart:"top-end"}},[`&:has([data-sidebar*="${g.Assistant}"])`]:{'[data-layout*="slot[sidebar]"]':{alignContent:"stretch"}},[`&:has([data-sidebar*="${g.Hidden}"])`]:{"--phx-layout-gap":0,"--phx-layout-sidebar-track-size":0,'[data-layout*="slot[sidebar]"]':{overflow:"hidden"}}}]}),D=r("div")({gridArea:"1 / 1 / -1 / -1"});export const DesktopLayout=()=>{let{sidebarWidth:e="clamp(360px, 30cqi, 400px)"}=d({props:{},name:w}),{hasMiniSidebar:i}=x.useSidebarContent(),r=f(),{accessInfo:s}=u(),y=m(),{isPreview:c,isHidden:g}=h(),A=!g&&!c,{setAnimating:E}=b(),{containerRef:S,safeAreaRef:T,update:$}=k({enabled:A,hasMiniSidebar:i&&!r}),j=n(()=>{E(!0)},[E]),R=n(()=>{E(!1),$()},[E,$]);return t(o,{children:a(l,{mode:"wait",children:[!g&&c&&t(v,{},"preview-layout"),A&&a(C,{layoutId:"ui-layout",layout:!0,ownerState:{sidebarWidth:e},"data-layout":p({state:{initial:!y,fullscreen:y}}),onLayoutAnimationStart:j,onLayoutAnimationComplete:R,children:[t(D,{ref:S}),t("header",{"data-layout":"slot[header]",children:t(x.DesktopHeader,{})}),a("main",{"data-layout":"slot[body]",children:[t("div",{"data-layout":"slot[body.top] interactive",children:t(x.DesktopCallToAction,{})}),t("div",{ref:T,"data-layout":"slot[body.safeSceneArea]"}),a("div",{"data-layout":"slot[body.bottom] interactive",children:[t("div",{"data-layout":"slot[body.toolbar]",children:t(x.DesktopToolbar,{})}),t("div",{"data-layout":"slot[body.toolControls]",children:!y&&t(x.DesktopToolControls,{})}),t("div",{"data-layout":"slot[body.viewControls]",children:t(x.DesktopViewControls,{})}),t("div",{"data-layout":"slot[body.logo]",children:t(x.DesktopPoweredBy,{})}),t("div",{"data-layout":"slot[body.sideEffects]",children:t(x.DesktopSnackbarsRoot,{})})]})]}),t("aside",{"data-layout":"slot[sidebar]",children:t(x.DesktopSidebar,{width:e})}),a("footer",{"data-layout":"slot[footer] interactive",children:[s.viewMode&&!y&&t(x.DesktopReadonlyBanner,{}),t(x.DesktopFooter,{})]})]},"interface-layout")]})})};
@@ -1,10 +1,10 @@
1
1
  import type { Localizable } from '@salsita-ai/common/utils';
2
2
  export interface TopNavigationStep {
3
- navigationStates: string[];
3
+ readonly navigationStates: readonly string[];
4
4
  label: Localizable;
5
5
  }
6
6
  export interface StepsNavigationComponentProps {
7
- steps: TopNavigationStep[];
7
+ steps: readonly TopNavigationStep[];
8
8
  }
9
9
  declare const StepsNavigationComponent: (props: StepsNavigationComponentProps) => import("react/jsx-runtime").JSX.Element;
10
10
  /**
@@ -1,9 +1,9 @@
1
1
  import type { Localizable } from '@salsita-ai/common/utils';
2
2
  export interface TopNavigationStep {
3
- navigationStates: string[];
3
+ readonly navigationStates: readonly string[];
4
4
  label: Localizable;
5
5
  }
6
6
  export interface StepsNavigationComponentProps {
7
- steps: TopNavigationStep[];
7
+ steps: readonly TopNavigationStep[];
8
8
  }
9
9
  export declare const StepsNavigation: import("react").MemoExoticComponent<(props: StepsNavigationComponentProps) => import("react/jsx-runtime").JSX.Element>;
@@ -572,9 +572,9 @@ export type DimensionIndicatorState = {
572
572
  */
573
573
  readonly labelFontStyle?: 'normal' | 'italic'
574
574
  /**
575
- * Font weight, which can be a numeric value, 'normal', or 'bold'.
575
+ * Font weight: a number, or a keyword such as 'normal' or 'bold'.
576
576
  */
577
- readonly labelFontWeight?: number | 'normal' | 'bold'
577
+ readonly labelFontWeight?: number | string
578
578
  /**
579
579
  * Spacing between letters. Default is 0.
580
580
  */
@@ -131,7 +131,7 @@ export type EditableAngleIndicatorComponentState = AngleIndicatorBaseState &
131
131
  /** The instance name of the angleDimension component that will be used to update the angle. */
132
132
  readonly targetDimension: string
133
133
  /** An array of fixable violations. They will be ignored in the violation hint. */
134
- readonly fixableViolations?: string[]
134
+ readonly fixableViolations?: readonly string[]
135
135
  /** The label of the input field. */
136
136
  readonly inputLabel?: Localizable
137
137
  /** The title of the modal. */
@@ -330,7 +330,7 @@ export type EditableDistanceDimensionIndicatorComponentState = DimensionIndicato
330
330
  /**
331
331
  * An array of fixable violations. They will be ignored in the violation hint.
332
332
  */
333
- readonly fixableViolations?: string[]
333
+ readonly fixableViolations?: readonly string[]
334
334
  /**
335
335
  * The label of the input field.
336
336
  */