@salsita-ai/sdk 0.50.0-develop.da8d27f5d7 → 0.50.0-develop.db8514eccf

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 (298) hide show
  1. package/README.md +19 -11
  2. package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
  3. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  4. package/dist/application-spec/errors/diagnostic-messages.d.ts +6 -0
  5. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  6. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  7. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  8. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  9. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -0
  10. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +11 -8
  11. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +3 -1
  12. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +70 -66
  13. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  14. package/dist/application-spec/generate-application/code/templates/domain-spec.js +5 -5
  15. package/dist/application-spec/generate-application/code/templates/domain.js +2 -2
  16. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +11 -0
  17. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +8 -0
  18. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  19. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  20. package/dist/application-spec/generate-application/code/templates/globals.js +1 -0
  21. package/dist/application-spec/generate-application/code/templates/index.d.ts +7 -6
  22. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  23. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +2 -0
  24. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -0
  25. package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.d.ts → skills/phoenix-create-configurator-skill.d.ts} +1 -1
  26. package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.js → skills/phoenix-create-configurator-skill.js} +43 -13
  27. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +54 -0
  28. package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.js → skills/phoenix-review-skill.js} +7 -5
  29. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -0
  30. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +1 -0
  31. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
  32. package/dist/application-spec/generate-application/code/templates/{common → skills}/sdk-content.d.ts +52 -3
  33. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +82 -0
  34. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +2 -0
  35. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  36. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +14 -0
  37. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.js +1 -0
  38. package/dist/application-spec/generate-application/runtime/sections/index.d.ts +1 -0
  39. package/dist/application-spec/generate-application/runtime/sections/index.js +1 -1
  40. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +3 -1
  41. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  42. package/dist/application-spec/parse-application-files/merge/index.d.ts +1 -0
  43. package/dist/application-spec/parse-application-files/merge/index.js +1 -1
  44. package/dist/application-spec/parse-application-files/merge/merged-actions.d.ts +11 -0
  45. package/dist/application-spec/parse-application-files/merge/merged-actions.js +1 -0
  46. package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +2 -0
  47. package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
  48. package/dist/application-spec/parse-application-files/raw-spec/index.d.ts +1 -0
  49. package/dist/application-spec/parse-application-files/raw-spec/index.js +1 -1
  50. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +18 -0
  51. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -0
  52. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +14 -2
  53. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  54. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +2 -0
  55. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  56. package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
  57. package/dist/application-spec/parse-application-files/spec/application/application-spec.js +1 -1
  58. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +4 -2
  59. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  60. package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
  61. package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
  62. package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.d.ts +23 -0
  63. package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.js +1 -0
  64. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +10 -0
  65. package/dist/application-spec/parse-application-files/spec/model/names/action-name.js +1 -0
  66. package/dist/application-spec/parse-application-files/spec/model/names/index.d.ts +1 -0
  67. package/dist/application-spec/parse-application-files/spec/model/names/index.js +1 -1
  68. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +35 -0
  69. package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -0
  70. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +3 -14
  71. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
  72. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +12 -3
  73. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  74. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -3
  75. package/dist/application-spec/parse-application-files/spec/sections/index.d.ts +1 -0
  76. package/dist/application-spec/parse-application-files/spec/sections/index.js +1 -1
  77. package/dist/client/phoenix-api.d.ts +5 -1
  78. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +2 -1
  79. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
  80. package/dist/configurator/application-runtime/extensions/selectors.d.ts +2 -1
  81. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  82. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +168 -0
  83. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -0
  84. package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/browser-details.d.ts +1 -1
  85. package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +1 -0
  86. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
  87. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
  88. package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/graphql-tools.d.ts +20 -16
  89. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -0
  90. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +4 -0
  91. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  92. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +16 -1
  93. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  94. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
  95. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
  96. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -0
  97. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  98. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -0
  99. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  100. package/dist/configurator/common/frontend-analytics.d.ts +21 -21
  101. package/dist/configurator/index.d.ts +0 -1
  102. package/dist/configurator/index.js +1 -1
  103. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  104. package/dist/configurator/scene/scene-analytics/scene-analytics.d.ts +2 -2
  105. package/dist/configurator/ui/assistant/AssistantChips.d.ts +11 -0
  106. package/dist/configurator/ui/assistant/AssistantChips.js +1 -0
  107. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
  108. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -0
  109. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -0
  110. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -0
  111. package/dist/configurator/ui/assistant/AssistantPanel.d.ts +11 -0
  112. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -0
  113. package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -0
  114. package/dist/configurator/ui/assistant/AssistantThread.js +1 -0
  115. package/dist/configurator/ui/assistant/assistant-failure.d.ts +18 -0
  116. package/dist/configurator/ui/assistant/assistant-failure.js +1 -0
  117. package/dist/configurator/ui/assistant/index.d.ts +2 -0
  118. package/dist/configurator/ui/assistant/index.js +1 -0
  119. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +6 -0
  120. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -0
  121. package/dist/configurator/ui/assistant/theme.d.ts +2 -0
  122. package/dist/configurator/ui/assistant/theme.js +1 -0
  123. package/dist/configurator/ui/assistant/thread-items.d.ts +37 -0
  124. package/dist/configurator/ui/assistant/thread-items.js +1 -0
  125. package/dist/configurator/ui/assistant/tool-chip.d.ts +37 -0
  126. package/dist/configurator/ui/assistant/tool-chip.js +1 -0
  127. package/dist/configurator/ui/assistant/use-follow-stream.d.ts +17 -0
  128. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -0
  129. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.d.ts +5 -0
  130. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
  131. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -5
  132. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.d.ts +2 -0
  133. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  134. package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
  135. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +10 -0
  136. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -0
  137. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +1 -0
  138. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  139. package/dist/docs/index.json +12 -2
  140. package/dist/docs/layouts/toolbar.mdx +6 -0
  141. package/dist/docs/other-features/domain-actions.mdx +418 -0
  142. package/dist/docs/other-features/side-effects.mdx +26 -0
  143. package/dist/docs/phoenix/admin.mdx +2 -2
  144. package/dist/docs/phoenix/best-practices.mdx +1 -0
  145. package/dist/docs/phoenix/finalization.mdx +1 -1
  146. package/dist/docs/phoenix/integration/headless-mode-external.mdx +5 -5
  147. package/dist/docs/phoenix/integration/widget-mode-external.mdx +5 -5
  148. package/dist/docs/phoenix/migrations.mdx +45 -5
  149. package/dist/docs/phoenix/phoenix-cli.mdx +139 -20
  150. package/dist/docs/phoenix/project-structure.mdx +7 -3
  151. package/dist/docs/phoenix/sdk-builder-workflow.mdx +12 -8
  152. package/dist/domain/actions/action-factory.d.ts +10 -0
  153. package/dist/domain/actions/action-factory.js +1 -0
  154. package/dist/domain/actions/prepare-action-implementations.d.ts +15 -0
  155. package/dist/domain/actions/prepare-action-implementations.js +5 -0
  156. package/dist/domain/application/application-config.d.ts +3 -1
  157. package/dist/domain/application/assistant-mutations.d.ts +15 -14
  158. package/dist/domain/application/assistant-mutations.js +1 -1
  159. package/dist/domain/components/updates.d.ts +16 -0
  160. package/dist/domain/core/action.d.ts +67 -0
  161. package/dist/domain/core/action.js +1 -0
  162. package/dist/domain/core/domain-factory.d.ts +4 -0
  163. package/dist/domain/core/index.d.ts +1 -0
  164. package/dist/domain/domain-builder.d.ts +7 -0
  165. package/dist/domain/domain-builder.js +1 -1
  166. package/dist/domain/domain-context/action-system/action-system.d.ts +40 -0
  167. package/dist/domain/domain-context/action-system/action-system.js +1 -0
  168. package/dist/domain/domain-context/domain-context-systems.d.ts +5 -2
  169. package/dist/domain/domain-context/index.d.ts +2 -1
  170. package/dist/domain/domain-context/index.js +1 -1
  171. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  172. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  173. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +4 -0
  174. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  175. package/dist/domain/domain-runtime/domain-runtime.d.ts +12 -0
  176. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  177. package/dist/domain/domain-runtime/spec/types.d.ts +15 -1
  178. package/dist/domain/index.d.ts +2 -0
  179. package/dist/domain/index.js +1 -1
  180. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +6 -0
  181. package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.d.ts +44 -0
  182. package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.js +1 -0
  183. package/dist/domain/system-components/phoenix-layout-elements/index.d.ts +1 -0
  184. package/dist/domain/system-components/phoenix-layout-elements/index.js +1 -1
  185. package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.d.ts +2 -1
  186. package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.js +1 -1
  187. package/dist/editor/Editor.js +1 -1
  188. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  189. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  190. package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -3
  191. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  192. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  193. package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
  194. package/dist/editor/variants/VariantAnswerFooter.js +1 -0
  195. package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
  196. package/dist/editor/variants/VariantPreviewHandler.js +1 -0
  197. package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
  198. package/dist/editor/variants/variant-preview-styles.js +1 -0
  199. package/dist/i18n/locales/cs/messages.js +1 -1
  200. package/dist/i18n/locales/da/messages.js +1 -1
  201. package/dist/i18n/locales/de/messages.js +1 -1
  202. package/dist/i18n/locales/de-AT/messages.js +1 -1
  203. package/dist/i18n/locales/en/messages.js +1 -1
  204. package/dist/i18n/locales/en-AU/messages.js +1 -1
  205. package/dist/i18n/locales/en-GB/messages.js +1 -1
  206. package/dist/i18n/locales/es/messages.js +1 -1
  207. package/dist/i18n/locales/fr/messages.js +1 -1
  208. package/dist/i18n/locales/hu/messages.js +1 -1
  209. package/dist/i18n/locales/it/messages.js +1 -1
  210. package/dist/i18n/locales/nl/messages.js +1 -1
  211. package/dist/i18n/locales/pl/messages.js +1 -1
  212. package/dist/i18n/locales/pt/messages.js +1 -1
  213. package/dist/i18n/locales/ro/messages.js +1 -1
  214. package/dist/i18n/locales/sk/messages.js +1 -1
  215. package/dist/i18n/locales/tr/messages.js +1 -1
  216. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +6 -0
  217. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  218. package/dist/phoenix/application-spec/generate-assistant-prompt.d.ts +4 -3
  219. package/dist/phoenix/application-spec/generate-assistant-prompt.js +1 -1
  220. package/dist/phoenix/cli.js +1 -1
  221. package/dist/phoenix/commands/build.d.ts +5 -0
  222. package/dist/phoenix/commands/build.js +1 -1
  223. package/dist/phoenix/commands/deploy.js +2 -2
  224. package/dist/phoenix/commands/dev.js +5 -5
  225. package/dist/phoenix/commands/feedback.d.ts +2 -1
  226. package/dist/phoenix/commands/feedback.js +1 -1
  227. package/dist/phoenix/commands/index.d.ts +1 -0
  228. package/dist/phoenix/commands/index.js +1 -1
  229. package/dist/phoenix/commands/login.d.ts +24 -6
  230. package/dist/phoenix/commands/login.js +2 -2
  231. package/dist/phoenix/commands/story-dev.js +2 -2
  232. package/dist/phoenix/commands/variants.d.ts +35 -0
  233. package/dist/phoenix/commands/variants.js +1 -0
  234. package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
  235. package/dist/phoenix/editor-server/commands-router.js +1 -1
  236. package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
  237. package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
  238. package/dist/phoenix/editor-server/editor-server.js +1 -1
  239. package/dist/phoenix/editor-server/protocol.d.ts +1 -0
  240. package/dist/phoenix/editor-server/spec-router.js +1 -1
  241. package/dist/phoenix/editor-server/trpc.d.ts +3 -0
  242. package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
  243. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  244. package/dist/phoenix/services/index.d.ts +5 -0
  245. package/dist/phoenix/services/index.js +1 -1
  246. package/dist/phoenix/services/phoenix-application.d.ts +21 -0
  247. package/dist/phoenix/services/phoenix-application.js +1 -0
  248. package/dist/phoenix/services/phoenix-store.d.ts +48 -0
  249. package/dist/phoenix/services/phoenix-store.js +1 -0
  250. package/dist/phoenix/services/phx-banner-plugin.d.ts +32 -0
  251. package/dist/phoenix/services/phx-banner-plugin.js +1 -0
  252. package/dist/phoenix/services/phx-licenses-plugin.d.ts +55 -0
  253. package/dist/phoenix/services/phx-licenses-plugin.js +8 -0
  254. package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
  255. package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
  256. package/dist/phoenix/services/variant-file-session.d.ts +36 -0
  257. package/dist/phoenix/services/variant-file-session.js +1 -0
  258. package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
  259. package/dist/phoenix/services/variant-preview-service.js +1 -0
  260. package/dist/phoenix/services/vite-config.d.ts +2 -0
  261. package/dist/phoenix/services/vite-config.js +1 -1
  262. package/dist/phoenix/utils/index.d.ts +1 -0
  263. package/dist/phoenix/utils/index.js +1 -1
  264. package/dist/phoenix/utils/read-git-commit.d.ts +14 -0
  265. package/dist/phoenix/utils/read-git-commit.js +1 -0
  266. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +2 -2
  267. package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
  268. package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
  269. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +12 -0
  270. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -0
  271. package/dist/ui-sdk/common/use-viewport-size.d.ts +4 -1
  272. package/dist/ui-sdk/common/use-viewport-size.js +1 -1
  273. package/dist/ui-sdk/components/mobile-controls/index.d.ts +1 -1
  274. package/dist/ui-sdk/theme/types.d.ts +4 -0
  275. package/package.json +5 -8
  276. package/schema/domain-spec.json +24 -0
  277. package/dist/application-spec/generate-application/code/templates/agents-md.js +0 -2
  278. package/dist/application-spec/generate-application/code/templates/common/sdk-content.js +0 -67
  279. package/dist/application-spec/generate-application/code/templates/phoenix-cli-skill.js +0 -1
  280. package/dist/application-spec/generate-application/code/templates/phoenix-feedback-skill.js +0 -31
  281. package/dist/application-spec/generate-application/code/templates/phoenix-skill.js +0 -1
  282. package/dist/configurator/assistant/browser-details.js +0 -1
  283. package/dist/configurator/assistant/graphql-tools.js +0 -1
  284. package/dist/configurator/assistant/index.d.ts +0 -1
  285. package/dist/configurator/assistant/index.js +0 -1
  286. package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -20
  287. package/dist/configurator/assistant/use-assistant-chat.js +0 -1
  288. package/dist/extras/assistant/AssistantChat.d.ts +0 -6
  289. package/dist/extras/assistant/AssistantChat.js +0 -1
  290. package/dist/extras/assistant/index.d.ts +0 -1
  291. package/dist/extras/assistant/index.js +0 -1
  292. /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.d.ts +0 -0
  293. /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.js +0 -0
  294. /package/dist/application-spec/generate-application/code/templates/{agents-md.d.ts → skills/agents-md.d.ts} +0 -0
  295. /package/dist/application-spec/generate-application/code/templates/{phoenix-cli-skill.d.ts → skills/phoenix-cli-skill.d.ts} +0 -0
  296. /package/dist/application-spec/generate-application/code/templates/{phoenix-feedback-skill.d.ts → skills/phoenix-feedback-skill.d.ts} +0 -0
  297. /package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.d.ts → skills/phoenix-review-skill.d.ts} +0 -0
  298. /package/dist/application-spec/generate-application/code/templates/{phoenix-skill.d.ts → skills/phoenix-skill.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import{resolve as e}from"path";import t from"promise-queue";import{Subject as i,buffer as s,debounceTime as r}from"rxjs";import{createServer as o,normalizePath as n}from"vite";import{watch as l}from"#package/watch";import{ApplicationSpecBuilder as c}from"../application-spec/application-spec-builder.js";import{logDiagnostics as a}from"../application-spec/metrics/index.js";import{syncTemplateFiles as h}from"../application-spec/template-files.js";import{buildWebhooks as u}from"../webhooks/index.js";import{getViteDevConfig as p}from"./vite-config.js";let g=["spec/**/*.{yaml,yml}","src/**/*.{ts,tsx,yaml,yml,json,html,css}","templates/*.html",".env",".env.generated"],b=["src/locales/**/*.{ts,tsx}",".phoenix/**"];export class ApplicationSpecProjectWatcher{watcher=null;subscription=null;rebuildQueue=new t(1,1/0);changeSubject$=new i;viteServer;pubsub;logger;onRebuilt;onViteServerChange;builder;useServer;isShuttingDown=!1;constructor(e){this.viteServer=e.viteServer,this.pubsub=e.pubsub,this.logger=e.logger,this.onRebuilt=e.onRebuilt,this.onViteServerChange=e.onViteServerChange,this.builder=new c({logger:e.logger,sdkVersion:e.sdkVersion,projectSlug:e.projectSlug,environmentSlug:e.environmentSlug,cliUseWorkspace:e.cliUseWorkspace,name:e.name,description:e.description,enableEditor:e.enableEditor,inlineTemplates:e.inlineTemplates}),this.useServer=e.useServer}start(){this.setupFileWatcher(),this.setupRebuildSubscription()}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){this.watcher=l(g,{ignored:b,cwd:process.cwd(),persistent:!0,ignoreInitial:!1}),this.watcher.on("all",(e,t)=>{("change"===e||"add"===e||"unlink"===e)&&(this.logger.info(`
2
- 📝 Detected ${e}: ${t}`),this.changeSubject$.next(t))})}setupRebuildSubscription(){let e=this.changeSubject$.pipe(r(10));this.subscription=this.changeSubject$.pipe(s(e)).subscribe(e=>{let t=new Set(e),i=t.has(".env");this.rebuildQueue.add(async()=>{this.isShuttingDown||(this.logger.info(`
1
+ import{resolve as e}from"path";import t from"promise-queue";import{Subject as i,buffer as s,debounceTime as r}from"rxjs";import{createServer as o,normalizePath as n}from"vite";import{watch as l}from"#package/watch";import{ApplicationSpecBuilder as h}from"../application-spec/application-spec-builder.js";import{logDiagnostics as a}from"../application-spec/metrics/index.js";import{syncTemplateFiles as c}from"../application-spec/template-files.js";import{buildWebhooks as u}from"../webhooks/index.js";import{getViteDevConfig as p}from"./vite-config.js";let g=["spec/**/*.{yaml,yml}","src/**/*.{ts,tsx,yaml,yml,json,html,css}","templates/*.html",".env",".env.generated"],d=["src/locales/**/*.{ts,tsx}",".phoenix/**"];export class ApplicationSpecProjectWatcher{watcher=null;subscription=null;rebuildQueue=new t(1,1/0);changeSubject$=new i;viteServer=null;pubsub;logger;onRebuilt;onViteServerChange;builder;useServer;isShuttingDown=!1;suspended=!1;heldChanges=new Set;constructor(e){this.pubsub=e.pubsub,this.logger=e.logger,this.onRebuilt=e.onRebuilt,this.onViteServerChange=e.onViteServerChange,this.builder=new h({logger:e.logger,sdkVersion:e.sdkVersion,projectSlug:e.projectSlug,environmentSlug:e.environmentSlug,cliUseWorkspace:e.cliUseWorkspace,name:e.name,description:e.description,enableEditor:e.enableEditor,inlineTemplates:e.inlineTemplates}),this.useServer=e.useServer}start(e){this.viteServer=e,this.setupFileWatcher(),this.setupRebuildSubscription()}applyVariantFiles(e){this.rebuildQueue.add(async()=>{this.isShuttingDown||await this.rebuild(new Set(e.map(e=>e.fileName)),!1,!0)})}suspend(){this.suspended=!0}resume(){for(let e of(this.suspended=!1,this.heldChanges))this.changeSubject$.next(e);this.heldChanges.clear()}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){this.watcher=l(g,{ignored:d,cwd:process.cwd(),persistent:!0,ignoreInitial:!1}),this.watcher.on("all",(e,t)=>{if("change"===e||"add"===e||"unlink"===e){if(this.suspended)return void this.heldChanges.add(t);this.logger.info(`
2
+ 📝 Detected ${e}: ${t}`),this.changeSubject$.next(t)}})}setupRebuildSubscription(){let e=this.changeSubject$.pipe(r(10));this.subscription=this.changeSubject$.pipe(s(e)).subscribe(e=>{let t=new Set(e),i=t.has(".env");this.rebuildQueue.add(async()=>{this.isShuttingDown||(this.logger.info(`
3
3
  🔨 Rebuilding spec files...
4
- `),await this.rebuild(t,i))})})}async rebuild(t,i){try{let s=await h();if(this.isShuttingDown)return;let r=await this.builder.build();if(this.isShuttingDown)return;if(a(r.diagnostics,this.logger),!r.ok){for(let e of r.errors)this.logger.error(`[${e.code}] ${e.message}${e.file?` (${e.file})`:""}`);this.pubsub.specFile$.next({rawProjectFiles:r.rawProjectFiles,projectRoot:process.cwd()});return}this.onRebuilt?.();let{application:l,changedFiles:c}=r,g=this.viteServer.moduleGraph,b=Date.now(),w=new Set,d=process.cwd(),f=e=>{let t=g.getModulesByFile(n(e));if(t)for(let e of t)g.invalidateModule(e,w,b,!0)};for(let i of t)f(e(d,i));for(let t of c)f(e(d,`.phoenix/${t.path}`));if(this.pubsub.specFile$.next({rawProjectFiles:l.rawProjectFiles,projectRoot:process.cwd(),configurationSchemaHash:l.applicationSpec.configurator.configurationSchema.hash}),this.isShuttingDown)return;if(i){if(await this.viteServer.close(),this.isShuttingDown)return;let e=await p({templateFiles:s});if(this.isShuttingDown)return;let t=await o(e);if(this.isShuttingDown||(await t.listen(),this.isShuttingDown))return void await t.close();this.viteServer=t,this.onViteServerChange?.(t),this.logger.success("Vite server restarted (env changed)")}if(this.useServer){if(this.logger.step("Building webhooks"),await u({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js",preserveExistingOutput:!0}),this.isShuttingDown)return;this.logger.success("Webhooks rebuilt successfully")}this.logger.success("Project files rebuilt successfully")}catch(e){this.logger.error(`Build failed: ${e instanceof Error?e.message:String(e)}`,e)}}}
4
+ `),await this.rebuild(t,i,!1))})})}async rebuild(t,i,s){try{let r=this.viteServer;if(!r)throw Error("Cannot rebuild the project: the watcher has no Vite server yet, because it was not started. Start the watcher before applying files");let l=await c();if(this.isShuttingDown)return;let h=await this.builder.build({compile:!s});if(this.isShuttingDown)return;if(a(h.diagnostics,this.logger),!h.ok){for(let e of h.errors)this.logger.error(`[${e.code}] ${e.message}${e.file?` (${e.file})`:""}`);this.pubsub.specFile$.next({rawProjectFiles:h.rawProjectFiles,projectRoot:process.cwd()});return}this.onRebuilt?.();let{application:g,changedFiles:d}=h,w=r.moduleGraph,b=Date.now(),f=new Set,m=process.cwd(),S=e=>{let t=w.getModulesByFile(n(e));if(t)for(let e of t)w.invalidateModule(e,f,b,!0)};for(let i of t)S(e(m,i));for(let t of d)S(e(m,`.phoenix/${t.path}`));if(this.pubsub.specFile$.next({rawProjectFiles:g.rawProjectFiles,projectRoot:process.cwd(),configurationSchemaHash:g.applicationSpec.configurator.configurationSchema.hash}),this.isShuttingDown)return;if(i){if(await r.close(),this.isShuttingDown)return;let e=await p({templateFiles:l});if(this.isShuttingDown)return;let t=await o(e);if(this.isShuttingDown||(await t.listen(),this.isShuttingDown))return void await t.close();this.viteServer=t,this.onViteServerChange?.(t),this.logger.success("Vite server restarted (env changed)")}if(this.useServer&&!s){if(this.logger.step("Building webhooks"),await u({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js",preserveExistingOutput:!0}),this.isShuttingDown)return;this.logger.success("Webhooks rebuilt successfully")}this.logger.success("Project files rebuilt successfully")}catch(e){this.logger.error(`Build failed: ${e instanceof Error?e.message:String(e)}`,e)}}}
@@ -1,5 +1,9 @@
1
1
  export type { BrowserConsoleEvent, DataRequest, DataResult, EditorContextData, EditorLifecycleStatus, EditorStateData, MockTemplateUpdateEvent, SceneRequest, SceneResult, ScreenshotRequest, ScreenshotResult, SpecUpdateEvent, StateRequest, StateResult, StateSection, } from './phoenix-pubsub.js';
2
2
  export { PhoenixPubSub } from './phoenix-pubsub.js';
3
+ export { PhoenixStore } from './phoenix-store.js';
4
+ export { PhoenixApplication } from './phoenix-application.js';
5
+ export { VariantFileSession } from './variant-file-session.js';
6
+ export { VariantPreviewService } from './variant-preview-service.js';
3
7
  export { MockTemplateWatcher, type MockTemplateWatcherConfig } from './mock-template-watcher.js';
4
8
  export { ApplicationSpecProjectWatcher, type ApplicationSpecProjectWatcherConfig, } from './application-spec-project-watcher.js';
5
9
  export { ApplicationSpecStoryWatcher, type ApplicationSpecStoryWatcherConfig, } from './application-spec-story-watcher.js';
@@ -11,6 +15,7 @@ export { patchConsole, type PatchConsoleOptions } from './console-capture.js';
11
15
  export { WebhookTunnelMonitor, type TunnelEvent, type TunnelRequestEntry, type TunnelRequestSummary, type TunnelStatus, type TunnelStatusState, } from './webhook-tunnel-monitor.js';
12
16
  export { compileWithSwc, watchWithSwc } from './swc.js';
13
17
  export { STORY_DEV_MARKER_PATH, readActiveStoryDevMarker, type StoryDevMarker } from './story-dev-marker.js';
18
+ export { composeDefaultBanner } from './phx-banner-plugin.js';
14
19
  export { getViteBuildConfigs, getViteDevConfig, setViteLogSink, type ViteLogSink, type ViteLogSinkOptions, } from './vite-config.js';
15
20
  export { getServerCredentials, removeServerCredentials, saveServerCredentials } from './cli-credentials.js';
16
21
  export { createSourceArchive, extractSourceArchive } from './source-archive.js';
@@ -1 +1 @@
1
- export{PhoenixPubSub}from"./phoenix-pubsub.js";export{MockTemplateWatcher}from"./mock-template-watcher.js";export{ApplicationSpecProjectWatcher}from"./application-spec-project-watcher.js";export{ApplicationSpecStoryWatcher}from"./application-spec-story-watcher.js";export{LinguiWatcher}from"./lingui-watcher.js";export{loadMockTemplates,parseMockTemplateYaml}from"./spec-files.js";export{LOG_STREAMS,LogBus}from"./log-bus.js";export{createBusLogger}from"./bus-logger.js";export{patchConsole}from"./console-capture.js";export{WebhookTunnelMonitor}from"./webhook-tunnel-monitor.js";export{compileWithSwc,watchWithSwc}from"./swc.js";export{STORY_DEV_MARKER_PATH,readActiveStoryDevMarker}from"./story-dev-marker.js";export{getViteBuildConfigs,getViteDevConfig,setViteLogSink}from"./vite-config.js";export{getServerCredentials,removeServerCredentials,saveServerCredentials}from"./cli-credentials.js";export{createSourceArchive,extractSourceArchive}from"./source-archive.js";export{resolveSignedInDevelopmentEnvironment}from"./signed-in-development-environment.js";export{DEFAULT_PHOENIX_REGION,PHOENIX_REGIONS,PUBLIC_PHOENIX_REGIONS,getRegionServerUrl,getRegionStudioUrl}from"./phoenix-regions.js";
1
+ export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{PhoenixApplication}from"./phoenix-application.js";export{VariantFileSession}from"./variant-file-session.js";export{VariantPreviewService}from"./variant-preview-service.js";export{MockTemplateWatcher}from"./mock-template-watcher.js";export{ApplicationSpecProjectWatcher}from"./application-spec-project-watcher.js";export{ApplicationSpecStoryWatcher}from"./application-spec-story-watcher.js";export{LinguiWatcher}from"./lingui-watcher.js";export{loadMockTemplates,parseMockTemplateYaml}from"./spec-files.js";export{LOG_STREAMS,LogBus}from"./log-bus.js";export{createBusLogger}from"./bus-logger.js";export{patchConsole}from"./console-capture.js";export{WebhookTunnelMonitor}from"./webhook-tunnel-monitor.js";export{compileWithSwc,watchWithSwc}from"./swc.js";export{STORY_DEV_MARKER_PATH,readActiveStoryDevMarker}from"./story-dev-marker.js";export{composeDefaultBanner}from"./phx-banner-plugin.js";export{getViteBuildConfigs,getViteDevConfig,setViteLogSink}from"./vite-config.js";export{getServerCredentials,removeServerCredentials,saveServerCredentials}from"./cli-credentials.js";export{createSourceArchive,extractSourceArchive}from"./source-archive.js";export{resolveSignedInDevelopmentEnvironment}from"./signed-in-development-environment.js";export{DEFAULT_PHOENIX_REGION,PHOENIX_REGIONS,PUBLIC_PHOENIX_REGIONS,getRegionServerUrl,getRegionStudioUrl}from"./phoenix-regions.js";
@@ -0,0 +1,21 @@
1
+ import type { PhoenixPubSub } from './phoenix-pubsub.js';
2
+ import type { PhoenixStore } from './phoenix-store.js';
3
+ import type { VariantPreviewService } from './variant-preview-service.js';
4
+ export interface PhoenixApplicationProps {
5
+ readonly store: PhoenixStore;
6
+ readonly pubsub: PhoenixPubSub;
7
+ /** Absent in a session that cannot rewrite project files, such as story-dev. */
8
+ readonly variantPreviews: VariantPreviewService | undefined;
9
+ }
10
+ /**
11
+ * One running dev session: its state, its event bus and the services built on them. The command that
12
+ * starts the session composes it once and hands it to the transports, so the editor server's routers get
13
+ * their services from here instead of from callbacks threaded through the command.
14
+ */
15
+ export declare class PhoenixApplication {
16
+ readonly store: PhoenixStore;
17
+ readonly pubsub: PhoenixPubSub;
18
+ readonly variantPreviews: VariantPreviewService | undefined;
19
+ constructor(props: PhoenixApplicationProps);
20
+ close(): Promise<void>;
21
+ }
@@ -0,0 +1 @@
1
+ export class PhoenixApplication{store;pubsub;variantPreviews;constructor(s){this.store=s.store,this.pubsub=s.pubsub,this.variantPreviews=s.variantPreviews}async close(){await this.variantPreviews?.dispose()}}
@@ -0,0 +1,48 @@
1
+ import { BehaviorSubject } from 'rxjs';
2
+ /**
3
+ * A frontend file script or standalone HTML proposal served from `.phoenix/variants/`.
4
+ */
5
+ export interface VariantPreviewOption {
6
+ /** File name without its suffix; the answer names the picked option by it. */
7
+ readonly id: string;
8
+ readonly kind: 'script' | 'page';
9
+ readonly label: string;
10
+ /** What sets this option apart from the others; may be empty. */
11
+ readonly description: string;
12
+ /** Address of the option's file on the dev server, with a version query that changes when the file does. */
13
+ readonly url: string;
14
+ }
15
+ /** CLI → browser request to show the options over the configurator and collect the builder's answer. */
16
+ export interface VariantPreviewRequest {
17
+ readonly requestId: string;
18
+ readonly title: string;
19
+ /** A line under the title saying what differs between the options; may be empty. */
20
+ readonly description: string;
21
+ readonly variants: readonly VariantPreviewOption[];
22
+ }
23
+ /** Browser → CLI answer; `choice` is the picked option id, or `null` for Original. */
24
+ export interface VariantPreviewResult {
25
+ readonly requestId: string;
26
+ readonly choice: string | null;
27
+ }
28
+ /** An answer no command was waiting for, kept with the request it answers until a command claims it. */
29
+ export interface UnclaimedVariantPreviewResult {
30
+ readonly request: VariantPreviewRequest;
31
+ readonly result: VariantPreviewResult;
32
+ }
33
+ /** Where the variant comparison of a dev session stands. Written by VariantPreviewService only. */
34
+ export interface VariantPreviewState {
35
+ /** The comparison the editor shows, or `null` when none is open. */
36
+ readonly open: VariantPreviewRequest | null;
37
+ /** The option whose edits are in the source files right now; `null` is the baseline. */
38
+ readonly activeChoice: string | null;
39
+ /** An answer given after the command that asked had stopped waiting. */
40
+ readonly unclaimed: UnclaimedVariantPreviewResult | null;
41
+ }
42
+ /**
43
+ * The state of one dev session. It holds values and no logic: services read and write it, and the
44
+ * editor server reaches it only through them. Events that carry no state stay on PhoenixPubSub.
45
+ */
46
+ export declare class PhoenixStore {
47
+ readonly variantPreview$: BehaviorSubject<VariantPreviewState>;
48
+ }
@@ -0,0 +1 @@
1
+ import{BehaviorSubject as e}from"rxjs";export class PhoenixStore{variantPreview$=new e({open:null,activeChoice:null,unclaimed:null})}
@@ -0,0 +1,32 @@
1
+ import type { Plugin } from 'vite';
2
+ export interface BannerBundleChunk {
3
+ readonly type: 'chunk';
4
+ readonly fileName: string;
5
+ code: string;
6
+ }
7
+ export interface BannerBundleAsset {
8
+ readonly type: 'asset';
9
+ readonly fileName: string;
10
+ source: string | Uint8Array;
11
+ }
12
+ export type BannerBundleItem = BannerBundleChunk | BannerBundleAsset;
13
+ export type BannerBundle = Record<string, BannerBundleItem>;
14
+ /** What the comment at the top of every frontend JavaScript file is composed from. */
15
+ export interface BannerCommentProps {
16
+ /** Version of the SDK running the build, named in the Salsita notice. */
17
+ readonly sdkVersion: string;
18
+ /** The caller's `--banner` text, or the default line when the option is not given. It is public in every bundle. */
19
+ readonly banner: string | undefined;
20
+ }
21
+ /** What `phoenix build` knows about the application on its own, for the banner line used when `--banner` is not given. */
22
+ export interface DefaultBannerProps {
23
+ /** `applicationVersion` of the application spec. */
24
+ readonly applicationVersion: string | undefined;
25
+ /** Commit checked out in the project; undefined when the build does not run in a git checkout. */
26
+ readonly commit: string | undefined;
27
+ }
28
+ export declare const composeDefaultBanner: (props: DefaultBannerProps) => string | undefined;
29
+ export declare const composeBannerComment: (props: BannerCommentProps) => string;
30
+ export declare const prependBannerToBundle: (bundle: BannerBundle, comment: string) => void;
31
+ /** Must be the last plugin of a build config: whatever prepends to a bundle after it takes byte 0 from the comment. */
32
+ export declare const phxBannerPlugin: (props: BannerCommentProps) => Plugin;
@@ -0,0 +1 @@
1
+ import{THIRD_PARTY_LICENSES_FILE_NAME as e}from"./phx-licenses-plugin.js";let n=/\r\n|[\n\r\u2028\u2029]/,o=e=>e.split(n).map(e=>e.trim()).filter(e=>e.length>0).map(e=>` * ${e.replaceAll("*/","*\\/")}`);export const composeDefaultBanner=e=>{let n=[...void 0===e.applicationVersion?[]:[`App version: ${e.applicationVersion}`],...void 0===e.commit?[]:[`Commit: ${e.commit}`]];return 0===n.length?void 0:n.join("; ")};export const composeBannerComment=n=>["/*!",...o(n.banner??""),...o(`Built with Salsita SDK ${n.sdkVersion}. Copyright (c) Salsita s.r.o. All rights reserved.`),...o(`Third-party licences: ${e}`)," */",""].join("\n");export const prependBannerToBundle=(e,n)=>{for(let o of Object.values(e))o.fileName.endsWith(".js")&&("chunk"===o.type?o.code=`${n}${o.code}`:"string"==typeof o.source?o.source=`${n}${o.source}`:o.source=Buffer.concat([Buffer.from(n),o.source]))};export const phxBannerPlugin=e=>{let n=composeBannerComment(e);return{name:"vite:phx-banner",enforce:"post",generateBundle(e,o){prependBannerToBundle(o,n)}}};
@@ -0,0 +1,55 @@
1
+ import type { Plugin } from 'vite';
2
+ /** Name of the licences file the frontend build writes next to its bundles; the banner comment points to it. */
3
+ export declare const THIRD_PARTY_LICENSES_FILE_NAME = "THIRD-PARTY-LICENSES.txt";
4
+ /** A third-party package whose code ended up in a frontend bundle, as it is listed in the licences file. */
5
+ export interface LicensedPackage {
6
+ readonly name: string;
7
+ readonly version: string;
8
+ /** Licence declared in the package's `package.json`; `UNKNOWN` when it declares none. */
9
+ readonly license: string;
10
+ /** Content of the package's licence file; undefined when the package ships none. */
11
+ readonly text: string | undefined;
12
+ }
13
+ /**
14
+ * Packages found so far by one `phoenix build`. Its frontend builds share one collection, so the licences file each
15
+ * of them writes into the common output folder is cumulative and the last one is complete.
16
+ */
17
+ export interface LicenseCollection {
18
+ /** Listed packages by `name@version`. */
19
+ readonly packages: Map<string, LicensedPackage>;
20
+ /** Resolution cache by module directory, so a package's files are read once per build command. */
21
+ readonly packageByDirectory: Map<string, LicensedPackage | undefined>;
22
+ }
23
+ export interface LicensesBundleChunk {
24
+ readonly type: 'chunk';
25
+ readonly modules: Readonly<Record<string, {
26
+ readonly renderedLength: number;
27
+ }>>;
28
+ }
29
+ export interface LicensesBundleAsset {
30
+ readonly type: 'asset';
31
+ }
32
+ export type LicensesBundle = Record<string, LicensesBundleChunk | LicensesBundleAsset>;
33
+ /**
34
+ * Finds the package a bundled module belongs to: the nearest named `package.json` above the module's real path that
35
+ * is still under a `node_modules` folder. Project source, workspace-linked packages and virtual modules have none.
36
+ */
37
+ export declare const resolvePackageForModule: (id: string) => LicensedPackage | undefined;
38
+ export declare const createLicenseCollection: () => LicenseCollection;
39
+ /**
40
+ * Adds the packages behind every module that left code or styles in the bundle; tree-shaken modules are not listed.
41
+ *
42
+ * Known gap: only Rollup modules are seen. What a stylesheet pulls in itself (CSS `@import`, Sass `@use`, files behind
43
+ * `url()`) is inlined or emitted by Vite's CSS handling without becoming a module, so those packages are not listed.
44
+ */
45
+ export declare const addBundlePackages: (bundle: LicensesBundle, collection: LicenseCollection) => void;
46
+ export declare const formatLicenses: (packages: readonly LicensedPackage[]) => string;
47
+ /**
48
+ * Lists the third-party packages bundled into the frontend output. Create one instance per `phoenix build` and add it
49
+ * to every frontend build config, so all of them contribute to the one file.
50
+ *
51
+ * Known gap: packages used only inside a web worker are not listed. Vite bundles a worker in a build of its own that
52
+ * runs `worker.plugins` instead of these; registering the plugin there would make every worker build emit a partial
53
+ * file under the same name.
54
+ */
55
+ export declare const phxLicensesPlugin: () => Plugin;
@@ -0,0 +1,8 @@
1
+ import{readFileSync as e,readdirSync as t,realpathSync as s}from"fs";import{dirname as n,isAbsolute as r,join as a}from"path";import{z as i}from"zod";export const THIRD_PARTY_LICENSES_FILE_NAME="THIRD-PARTY-LICENSES.txt";let c=/[\\/]node_modules[\\/]/,o=[/^license/i,/^licence/i,/^copying/i],l="-".repeat(80),p=/\.(css|scss|sass|less|styl|stylus|pcss|postcss|sss)(\?|$)/,u=i.object({name:i.string().min(1),version:i.string().min(1),license:i.unknown(),licenses:i.unknown()}),f=i.object({type:i.string().min(1)}),m=s=>{let n,r;try{n=e(a(s,"package.json"),"utf-8")}catch{return}try{r=JSON.parse(n)}catch{return}let c=u.safeParse(r);if(c.success)return{name:c.data.name,version:c.data.version,license:(e=>{if("string"==typeof e.license&&e.license.length>0)return e.license;let t=i.array(f).safeParse(Array.isArray(e.licenses)?e.licenses:[e.license]);return t.success&&0!==t.data.length?t.data.map(e=>e.type).join(" OR "):"UNKNOWN"})(c.data),text:(s=>{let n=t(s,{withFileTypes:!0}).filter(e=>e.isFile()).map(e=>e.name).sort();for(let t of o){let r=n.find(e=>t.test(e));if(void 0!==r)return e(a(s,r),"utf-8").trim()}})(s)}},d=(e,t)=>e.name!==t.name?e.name<t.name?-1:1:e.version.localeCompare(t.version,"en",{numeric:!0});export const resolvePackageForModule=e=>{let t=e.replace(/[?#].*$/,"");if(e.startsWith("\0")||!r(t))return;let a=n((e=>{try{return s(e)}catch{return e}})(t));for(;c.test(a);){let e=m(a);if(void 0!==e)return e;a=n(a)}};export const createLicenseCollection=()=>({packages:new Map,packageByDirectory:new Map});export const addBundlePackages=(e,t)=>{for(let s of Object.values(e))if("chunk"===s.type)for(let[e,r]of Object.entries(s.modules)){if(0===r.renderedLength&&!p.test(e))continue;let s=n(e);t.packageByDirectory.has(s)||t.packageByDirectory.set(s,resolvePackageForModule(e));let a=t.packageByDirectory.get(s);if(void 0===a)continue;let i=`${a.name}@${a.version}`;t.packages.has(i)||t.packages.set(i,a)}};export const formatLicenses=e=>["Third-party software bundled into the JavaScript files in this folder, with the licence of each package.",...[...e].sort(d).map(e=>{let t=`${e.name} ${e.version}
2
+ License: ${e.license}`;return void 0===e.text?t:`${t}
3
+
4
+ ${e.text}`})].join(`
5
+
6
+ ${l}
7
+
8
+ `).concat("\n");export const phxLicensesPlugin=()=>{let e=createLicenseCollection();return{name:"vite:phx-licenses",enforce:"post",generateBundle(t,s){addBundlePackages(s,e),this.emitFile({type:"asset",fileName:"THIRD-PARTY-LICENSES.txt",source:formatLicenses([...e.packages.values()])})}}};
@@ -0,0 +1,9 @@
1
+ import type { Plugin } from 'vite';
2
+ export declare const isVariantPreviewFile: (root: string, file: string) => boolean;
3
+ /**
4
+ * Option files live under Vite's root and have no HMR boundary, so a change to one would reload the
5
+ * configurator behind the comparison. Listing the folder in `server.watch.ignored` would stop that too, but
6
+ * Vite would then never drop its cached transform, and a rewritten option or helper would be served stale.
7
+ * Answering the hot update with no modules keeps the invalidation and skips only the reload.
8
+ */
9
+ export declare const phxVariantPreviewsPlugin: () => Plugin;
@@ -0,0 +1 @@
1
+ import{toPosixPath as i}from"../utils/path.js";export const isVariantPreviewFile=(t,e)=>i(e).startsWith(`${i(t).replace(/\/+$/,"")}/variants/`);export const phxVariantPreviewsPlugin=()=>({name:"phx:variant-previews",hotUpdate({file:i}){return isVariantPreviewFile(this.environment.config.root,i)?[]:void 0}});
@@ -0,0 +1,36 @@
1
+ import type { Logger } from '../utils/index.js';
2
+ /** A baseline-relative edit collected by an option script; null removes the file. */
3
+ export interface VariantFileEdit {
4
+ readonly fileName: string;
5
+ readonly content: string | null;
6
+ }
7
+ /** Owns the baseline, file transactions and recovery for one live comparison. */
8
+ export declare class VariantFileSession {
9
+ private readonly props;
10
+ private readonly queue;
11
+ private readonly applied;
12
+ private readonly baseline;
13
+ private readonly contract;
14
+ private settled;
15
+ private constructor();
16
+ static create(props: {
17
+ readonly projectRoot: string;
18
+ readonly logger: Logger;
19
+ readonly onFilesChanged: (files: readonly VariantFileEdit[]) => void;
20
+ }): Promise<VariantFileSession>;
21
+ /**
22
+ * Restores the baseline a comparison left behind when its dev session ended without closing it. A file
23
+ * edited since then is left as it is, so the edit survives and the next dev session can still start.
24
+ */
25
+ static recover(projectRoot: string, logger: Logger): Promise<void>;
26
+ private static resolveFile;
27
+ getFiles(): readonly VariantFileEdit[];
28
+ apply(edits: readonly VariantFileEdit[]): Promise<void>;
29
+ finish(keep: boolean): Promise<void>;
30
+ /**
31
+ * Moves the files from what is applied now to `target`. A file edited outside the comparison is never
32
+ * overwritten: a switch is refused, so the builder sees why, while the end of the comparison keeps that
33
+ * file as it is and restores the others, so the comparison can always be closed.
34
+ */
35
+ private writeTarget;
36
+ }
@@ -0,0 +1 @@
1
+ import{mkdir as e,readFile as t,realpath as i,rename as a,rm as r,writeFile as s}from"node:fs/promises";import{dirname as o,join as n,relative as l,resolve as p,sep as c}from"node:path";import h from"promise-queue";import{z as d}from"zod";import{RawProjectFiles as f,RuntimeReferenceStore as m,TextFile as w,buildPhoenixDefinitions as u,isTextFile as g,parseApplicationFiles as v}from"#package/application-spec";import{getAllPhxDefinitions as y}from"#package/domain";import{readApplicationFiles as b}from"../application-spec/application-spec-file-reader.js";import{generateAssistantPrompt as S}from"../application-spec/generate-assistant-prompt.js";import{swcEvalExpressionParser as F,swcModuleAnalyzer as N}from"../application-spec/swc-module-analyzer.js";let j=".phoenix/variant-recovery.json",k=d.array(d.object({fileName:d.string(),original:d.string().nullable(),applied:d.string().nullable(),previous:d.string().nullable().optional()})),E=e=>!e.includes("\\")&&!e.split("/").some(e=>".."===e||"."===e||""===e)&&(/^spec\/(?!admin\/).+\.yaml$/.test(e)||/^src\/(?:components|transformers|handlers|elements|_[^/]+)\/.+\.tsx?$/.test(e)),M=e=>`Left ${e} as it is: it was edited outside the variant comparison, so restoring the baseline would overwrite that edit. Review the file and remove what the option added to it`,$=async e=>{try{return await t(e,"utf8")}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return null;throw e}},C=async(t,i)=>{if(null===i)return void await r(t,{force:!0});await e(o(t),{recursive:!0});let n=`${t}.variant-${crypto.randomUUID()}`;try{await s(n,i),await a(n,t)}finally{await r(n,{force:!0})}},R=(e,t)=>{let i=v({rawProjectFiles:e,phxDefinitions:u(y())},{analyzer:N,evalExpressionParser:F,referenceStore:new m,logger:t});if(!i.ok)throw Error(`Cannot apply variant: ${i.errors.map(e=>`[${e.code}] ${e.message}`).join("\n")}`);let{configurator:a,admin:r,appMetadata:s,infra:o,dataSpec:n}=i.value.applicationSpec,l=i.value.categorizedFiles,p=new Set([...l.webhooks,...l.expressions,...l.actions,...l.invariants,...l.migrations,...l.adminMigrations,...l.adminExpressions,...l.adminInvariants,...l.handlers.filter(e=>"pinned"===e.webhookMembership||"named-handler"===e.webhookMembership),...l.components.filter(e=>"pinned"===e.webhookMembership),...l.adminComponents.filter(e=>"pinned"===e.webhookMembership)].flatMap(e=>[e.file.name,...e.deps]));return JSON.stringify({webhookFiles:e.files.filter(g).filter(e=>p.has(e.name)).sort((e,t)=>e.name.localeCompare(t.name)),appMetadata:s,infra:o,dataSpec:n,model:a.latestModel,schema:a.configurationSchema,dataSchemas:a.dataSchemas,adminModel:r.latestModel,adminSchema:r.configurationSchema,assistant:a.assistant?.sdl,assistantSettings:a.assistantServerSettings,assistantPrompt:a.assistant?S(a.assistant):null},(e,t)=>t instanceof Map?[...t.entries()]:t)};export class VariantFileSession{props;queue=new h(1,1/0);applied=new Map;baseline=new Map;contract;settled=!1;constructor(e){for(let t of(this.props=e,e.rawFiles.files))g(t)&&E(t.name)&&this.baseline.set(t.name,t.content);this.contract=R(e.rawFiles,e.logger)}static async create(e){await VariantFileSession.recover(e.projectRoot,e.logger);let t=await b({projectRoot:e.projectRoot,envs:{}});return new VariantFileSession({...e,rawFiles:t})}static async recover(e,t){let i=await $(n(e,j));if(null!==i){for(let a of k.parse(JSON.parse(i))){let i=await VariantFileSession.resolveFile(e,a.fileName),r=await $(i);if(r!==a.applied&&r!==a.original&&r!==a.previous){t.warn(M(a.fileName));continue}await C(i,a.original)}await r(n(e,j),{force:!0})}}static async resolveFile(e,t){if(!E(t))throw Error(`Cannot override ${t}: variants support frontend spec and TypeScript files only. Keep server code, dependencies, environment files and assets unchanged`);let a=await i(e),r=p(a,t),s=r;for(;;)try{let e=await i(s),r=l(a,e);if(".."===r||r.startsWith(`..${c}`))throw Error(`Cannot override ${t}: its symbolic link leaves the project`);if(e!==s)throw Error(`Cannot override ${t}: it uses a symbolic link. Variant edits require regular files so restoration preserves the original file`);break}catch(e){if(!(e instanceof Error&&"code"in e&&"ENOENT"===e.code))throw e;s=o(s)}return r}getFiles(){return[...this.baseline].map(([e,t])=>({fileName:e,content:t}))}apply(e){return this.queue.add(async()=>{if(this.settled)throw Error("This variant comparison has already ended");let t=new Map;for(let i of e){if(await VariantFileSession.resolveFile(this.props.projectRoot,i.fileName),t.has(i.fileName))throw Error(`Cannot apply variant: ${i.fileName} is specified twice`);t.set(i.fileName,i.content)}if(t.size>0){let e=this.props.rawFiles.files.filter(e=>!t.has(e.name));for(let[i,a]of t)null!==a&&e.push(w(i,a));if(R(f(e),this.props.logger)!==this.contract)throw Error("Cannot apply variant: it changes the model, schemas, data or deployment settings. Variants must need no server preparation")}await this.writeTarget(t,"refuse")})}finish(e){return this.queue.add(async()=>{this.settled||(e||await this.writeTarget(new Map,"keep"),await r(n(this.props.projectRoot,j),{force:!0}),this.settled=!0)})}async writeTarget(t,i){let a=new Set([...this.applied.keys(),...t.keys()]);if(0===a.size)return;let r=new Map;for(let e of a){let t=await VariantFileSession.resolveFile(this.props.projectRoot,e),a=this.applied.has(e)?this.applied.get(e):this.baseline.get(e)??null;if(await $(t)===a){r.set(e,t);continue}if("refuse"===i)throw Error(`Cannot switch variant: ${e} was edited outside the preview, and switching would overwrite that edit. Choose the option that is shown, or close the comparison with \`phoenix variants --close\`, which keeps the edit`);this.props.logger.warn(M(e))}let s=[...r.keys()].map(e=>({fileName:e,original:this.baseline.get(e)??null,previous:this.applied.has(e)?this.applied.get(e)??null:this.baseline.get(e)??null,applied:t.has(e)?t.get(e)??null:this.baseline.get(e)??null}));await e(n(this.props.projectRoot,".phoenix"),{recursive:!0}),await C(n(this.props.projectRoot,j),JSON.stringify(s));let o=new Map(this.applied);try{for(let e of s){let t=r.get(e.fileName);void 0!==t&&await C(t,e.applied)}}catch(e){for(let[e,t]of r)await C(t,o.has(e)?o.get(e)??null:this.baseline.get(e)??null);throw await C(n(this.props.projectRoot,j),JSON.stringify([...o].map(([e,t])=>({fileName:e,original:this.baseline.get(e)??null,applied:t})))),e}for(let[e,i]of(this.applied.clear(),t))this.applied.set(e,i);this.props.onFilesChanged(s.map(e=>({fileName:e.fileName,content:e.applied})))}}
@@ -0,0 +1,80 @@
1
+ import { Observable } from 'rxjs';
2
+ import type { Logger } from '../utils/index.js';
3
+ import type { ApplicationSpecProjectWatcher } from './application-spec-project-watcher.js';
4
+ import type { PhoenixStore, VariantPreviewOption, VariantPreviewRequest, VariantPreviewResult } from './phoenix-store.js';
5
+ import { type VariantFileEdit } from './variant-file-session.js';
6
+ /** What a command asks the editor to show, and how long it waits for the answer. */
7
+ export interface VariantPreviewInput {
8
+ readonly title: string;
9
+ readonly description: string;
10
+ readonly variants: readonly VariantPreviewOption[];
11
+ readonly timeoutMs: number;
12
+ }
13
+ /** How a wait for the builder's answer ended. `waiting` leaves the comparison open. */
14
+ export type VariantPreviewOutcome = ({
15
+ readonly status: 'settled';
16
+ } & VariantPreviewResult) | {
17
+ readonly status: 'closed';
18
+ } | {
19
+ readonly status: 'waiting';
20
+ };
21
+ /** The files of one option, as the editor collected them from its script. */
22
+ export interface VariantFilesInput {
23
+ readonly requestId: string;
24
+ readonly choice: string | null;
25
+ readonly files: readonly VariantFileEdit[];
26
+ }
27
+ export interface VariantPreviewServiceProps {
28
+ readonly projectRoot: string;
29
+ }
30
+ export interface VariantPreviewServiceContext {
31
+ readonly store: PhoenixStore;
32
+ readonly logger: Logger;
33
+ readonly projectWatcher: Pick<ApplicationSpecProjectWatcher, 'suspend' | 'resume' | 'applyVariantFiles'>;
34
+ }
35
+ /**
36
+ * Owns the variant comparison of a dev session: which one is open, the file session that rewrites and
37
+ * restores the source files for it, and the answer. Its state lives in the store; every operation that
38
+ * changes it runs one at a time.
39
+ */
40
+ export declare class VariantPreviewService {
41
+ private readonly props;
42
+ private readonly context;
43
+ private readonly queue;
44
+ private readonly result$;
45
+ private readonly closed$;
46
+ private session;
47
+ private editors;
48
+ /**
49
+ * The comparison an editor has to show, or `null`. A subscriber counts as a connected editor, and gets
50
+ * the open comparison at once, so a reloaded browser tab shows it again.
51
+ */
52
+ readonly request$: Observable<VariantPreviewRequest | null>;
53
+ constructor(props: VariantPreviewServiceProps, context: VariantPreviewServiceContext);
54
+ /** True while option edits may be in the source files, so nothing else should write or deploy them. */
55
+ get isOpen(): boolean;
56
+ /**
57
+ * Opens the comparison in the editor and waits for the builder's answer. A wait that times out leaves
58
+ * it open, and a later call with the same options attaches to it again.
59
+ */
60
+ open(input: VariantPreviewInput): Promise<VariantPreviewOutcome>;
61
+ getBaseline(requestId: string): {
62
+ readonly files: readonly VariantFileEdit[];
63
+ readonly choice: string | null;
64
+ };
65
+ applyFiles(input: VariantFilesInput): Promise<void>;
66
+ submit(result: VariantPreviewResult): Promise<void>;
67
+ /** Closes whichever comparison is open without an answer, for a command that gives up on it. */
68
+ close(): Promise<{
69
+ readonly closed: boolean;
70
+ }>;
71
+ claim(requestId: string): void;
72
+ /** Restores the baseline when the dev session ends with a comparison still open. */
73
+ dispose(): Promise<void>;
74
+ private get state();
75
+ private setState;
76
+ /** Takes a comparison off the screen without an answer and ends the wait of the command that opened it. */
77
+ private forget;
78
+ private startSession;
79
+ private endSession;
80
+ }
@@ -0,0 +1 @@
1
+ import e from"promise-queue";import{Observable as t,Subject as s,distinctUntilChanged as i,filter as r,firstValueFrom as o,map as n,merge as a,of as h,timeout as l}from"rxjs";import{VariantFileSession as c}from"./variant-file-session.js";export class VariantPreviewService{props;context;queue=new e(1,1/0);result$=new s;closed$=new s;session=null;editors=0;request$=new t(e=>{this.editors+=1;let t=this.context.store.variantPreview$.pipe(n(e=>e.open),i()).subscribe(e);return()=>{this.editors-=1,t.unsubscribe()}});constructor(e,t){this.props=e,this.context=t}get isOpen(){return null!==this.session}async open(e){return(await this.queue.add(async()=>{let t=t=>JSON.stringify(t.variants)===JSON.stringify(e.variants),{open:s,unclaimed:i}=this.state;if(i&&t(i.request))return{outcome:Promise.resolve({status:"settled",...i.result})};if(0===this.editors)throw Error("No editor connected. Open the configurator in a browser");let c=s&&t(s)?s:{requestId:crypto.randomUUID(),title:e.title,description:e.description,variants:e.variants};if(c!==s)try{await this.endSession(!1),await this.startSession()}catch(e){throw this.forget(s),e}let u=o(a(this.result$.pipe(r(e=>e.requestId===c.requestId),n(e=>({status:"settled",...e}))),this.closed$.pipe(r(e=>e===c.requestId),n(()=>({status:"closed"})))).pipe(l({first:e.timeoutMs,with:()=>h({status:"waiting"})})));return c!==s&&(this.setState({open:c,activeChoice:null,unclaimed:null}),s&&this.closed$.next(s.requestId)),{outcome:u}})).outcome}getBaseline(e){if(this.state.open?.requestId!==e||!this.session)throw Error("This variant preview is no longer open");return{files:this.session.getFiles(),choice:this.state.activeChoice}}applyFiles(e){return this.queue.add(async()=>{let{open:t}=this.state;if(t?.requestId!==e.requestId||!this.session)throw Error("This variant preview is no longer open");let s=t.variants.find(t=>t.id===e.choice);if(null!==e.choice&&!s)throw Error("This option does not belong to the open variant preview");if(null===e.choice&&e.files.length>0)throw Error("The baseline cannot contain variant edits");if(s?.kind==="page"&&e.files.length>0)throw Error("HTML previews cannot override project files");await this.session.apply(e.files),this.setState({activeChoice:e.choice})})}submit(e){return this.queue.add(async()=>{let{open:t,activeChoice:s}=this.state;if(t?.requestId!==e.requestId)throw Error("This preview is no longer open. The agent closed it or replaced it with another one");if(!this.session||s!==e.choice||null!==e.choice&&!t.variants.some(t=>t.id===e.choice))throw Error("Apply this option before choosing it");await this.endSession(!0),this.setState({open:null,activeChoice:null,unclaimed:{request:t,result:e}}),this.result$.next(e)})}close(){return this.queue.add(async()=>{let{open:e}=this.state;try{await this.endSession(!1)}finally{this.forget(e)}return{closed:null!==e}})}claim(e){this.state.unclaimed?.result.requestId===e&&this.setState({unclaimed:null})}dispose(){return this.queue.add(()=>this.endSession(!1))}get state(){return this.context.store.variantPreview$.value}setState(e){this.context.store.variantPreview$.next({...this.state,...e})}forget(e){this.setState({open:null,activeChoice:null,unclaimed:null}),e&&this.closed$.next(e.requestId)}async startSession(){let{projectWatcher:e,logger:t}=this.context;e.suspend();try{this.session=await c.create({projectRoot:this.props.projectRoot,logger:t,onFilesChanged:t=>e.applyVariantFiles(t)})}catch(t){throw e.resume(),t}}async endSession(e){if(this.session)try{await this.session.finish(e)}finally{this.session=null,this.context.projectWatcher.resume()}}}
@@ -17,4 +17,6 @@ export declare const getViteDevConfig: (options?: {
17
17
  export declare const getViteBuildConfigs: (options: {
18
18
  enableEditor?: boolean;
19
19
  templateFiles: readonly string[];
20
+ sdkVersion: string;
21
+ banner: string | undefined;
20
22
  }) => Promise<InlineConfig[]>;
@@ -1 +1 @@
1
- import{lingui as e}from"@lingui/vite-plugin";import i from"@vitejs/plugin-react";import{mkdir as t,readFile as n,writeFile as r}from"fs/promises";import o from"lodash-es/camelCase.js";import{createRequire as a}from"node:module";import{dirname as s,resolve as m}from"path";import{createLogger as l}from"vite";import d from"vite-plugin-css-injected-by-js";import{isUsingLocalSdk as f}from"../utils/package-info.js";import{loadFrontendConfigModule as c}from"./frontend-config.js";import{phxCspNoncePlugin as p}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as g}from"./phx-global-isolation-plugin.js";let u=null;export const setViteLogSink=(e,i={})=>{u={sink:e,echo:i.echo??!1}};let h=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],S=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async t=>{var n,r;let o,d,p=f(),y=c(),O=y.readRuntimeConfig(),b=y.frontendBuildConfig,D=Object.fromEntries((t?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...u&&{customLogger:(n=u.sink,r=u.echo,o=l(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...u.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...p&&{entries:["index.html","admin.html",...t?.templateFiles??[]],force:!0}},...p&&{resolve:{alias:(d=a(m(process.cwd(),"package.json")),h.flatMap(e=>{try{let i=s(d.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[i({babel:{plugins:["macros"]}}),e(),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=y.readRuntimeConfig(),t=y.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},g({getDeploymentId:()=>S(y.readRuntimeConfig())})],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(O),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(b.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(b.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...D}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async a=>{let l=c(),f=l.readRuntimeConfig(),u=l.frontendBuildConfig,h=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:a.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(c=>({plugins:[i({babel:{plugins:["macros"]}}),e(),d({useStrictCSP:!0}),p(),g({getDeploymentId:()=>S(l.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!c.htmlFiles.length)return;let e="iife"===c.format?`${c.name}.iife.js`:`${c.name}.js`;for(let i of c.htmlFiles){if(c.main&&a.enableEditor&&"./index.html"===i)continue;let o=m("./.phoenix",i),l=m("./.phoenix/dist/frontend",i);await t(s(l),{recursive:!0});let d=(await n(o,"utf-8")).replace(c.mainScriptPath,e);await r(l,d,"utf-8")}}}],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:c.entryFile,name:o(c.name),formats:[c.format],fileName:()=>"iife"===c.format?`${c.name}.iife.js`:`${c.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${c.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(u.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(u.gltfDecoder)}}));return a.enableEditor?[...h,{plugins:[i({babel:{plugins:["macros"]}}),e(),d({useStrictCSP:!0}),p()],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(u.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(u.gltfDecoder)}}]:h};
1
+ import{lingui as e}from"@lingui/vite-plugin";import i from"@vitejs/plugin-react";import{mkdir as t,readFile as n,writeFile as r}from"fs/promises";import o from"lodash-es/camelCase.js";import{createRequire as a}from"node:module";import{dirname as s,resolve as m}from"path";import{createLogger as l}from"vite";import p from"vite-plugin-css-injected-by-js";import{isUsingLocalSdk as d}from"../utils/package-info.js";import{loadFrontendConfigModule as f}from"./frontend-config.js";import{phxBannerPlugin as c}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as g}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as u}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as h}from"./phx-licenses-plugin.js";import{phxVariantPreviewsPlugin as S}from"./phx-variant-previews-plugin.js";let b=null;export const setViteLogSink=(e,i={})=>{b={sink:e,echo:i.echo??!1}};let y=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],O=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async t=>{var n,r;let o,p,c=d(),g=f(),h=g.readRuntimeConfig(),x=g.frontendBuildConfig,D=Object.fromEntries((t?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...b&&{customLogger:(n=b.sink,r=b.echo,o=l(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...b.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...c&&{entries:["index.html","admin.html",...t?.templateFiles??[]],force:!0}},...c&&{resolve:{alias:(p=a(m(process.cwd(),"package.json")),y.flatMap(e=>{try{let i=s(p.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[i({babel:{plugins:["macros"]}}),e(),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=g.readRuntimeConfig(),t=g.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},u({getDeploymentId:()=>O(g.readRuntimeConfig())}),S()],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(h),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(x.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(x.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...D}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async a=>{let l=f(),d=l.readRuntimeConfig(),S=l.frontendBuildConfig,b=h(),y=c({sdkVersion:a.sdkVersion,banner:a.banner}),x=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:a.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(f=>({plugins:[i({babel:{plugins:["macros"]}}),e(),p({useStrictCSP:!0}),g(),u({getDeploymentId:()=>O(l.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!f.htmlFiles.length)return;let e="iife"===f.format?`${f.name}.iife.js`:`${f.name}.js`;for(let i of f.htmlFiles){if(f.main&&a.enableEditor&&"./index.html"===i)continue;let o=m("./.phoenix",i),l=m("./.phoenix/dist/frontend",i);await t(s(l),{recursive:!0});let p=(await n(o,"utf-8")).replace(f.mainScriptPath,e);await r(l,p,"utf-8")}}},b,y],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:f.entryFile,name:o(f.name),formats:[f.format],fileName:()=>"iife"===f.format?`${f.name}.iife.js`:`${f.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${f.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(d),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}));return a.enableEditor?[...x,{plugins:[i({babel:{plugins:["macros"]}}),e(),p({useStrictCSP:!0}),g(),b,y],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(d),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}]:x};
@@ -7,5 +7,6 @@ export { FileLogger } from './file-logger.js';
7
7
  export { type Logger, type CreateLoggerOptions, createLogger } from './logger.js';
8
8
  export { addWorkspaceOverrides, ensureWorkspaceInstallSettings, getLocalOverrides, getSdkPackages, getWorkspaceDir, hasLocalOverrides, readPackageJson, removeWorkspaceOverrides, } from './package-info.js';
9
9
  export { toPascalCase } from './pascal-case.js';
10
+ export { readGitCommit } from './read-git-commit.js';
10
11
  export { type RunCommandProps, runCommand } from './run-command.js';
11
12
  export { type FileUploadInfo, type UploadLinksData, uploadFilesWithPresignedUrls, readUploadLinks, } from './upload-utils.js';
@@ -1 +1 @@
1
- export{askQuestion}from"./ask-question.js";export{checkBundleSizeBudgets}from"./check-bundle-size-budgets.js";export{formatEnvContent,formatEnvLine}from"./env-file.js";export{parseChangelog,getLatestVersion,getVersion,paginateVersions,getVersionNumbers}from"./changelog-parser.js";export{createDirectoryFromYaml,exists,scanFolderForFiles,syncChangedFiles,syncExistingFolders,validateFolders,writeFileIfNotExists,writeFilesIfNotExists,writeRawFiles}from"./file-system.js";export{FileLogger}from"./file-logger.js";export{createLogger}from"./logger.js";export{addWorkspaceOverrides,ensureWorkspaceInstallSettings,getLocalOverrides,getSdkPackages,getWorkspaceDir,hasLocalOverrides,readPackageJson,removeWorkspaceOverrides}from"./package-info.js";export{toPascalCase}from"./pascal-case.js";export{runCommand}from"./run-command.js";export{uploadFilesWithPresignedUrls,readUploadLinks}from"./upload-utils.js";
1
+ export{askQuestion}from"./ask-question.js";export{checkBundleSizeBudgets}from"./check-bundle-size-budgets.js";export{formatEnvContent,formatEnvLine}from"./env-file.js";export{parseChangelog,getLatestVersion,getVersion,paginateVersions,getVersionNumbers}from"./changelog-parser.js";export{createDirectoryFromYaml,exists,scanFolderForFiles,syncChangedFiles,syncExistingFolders,validateFolders,writeFileIfNotExists,writeFilesIfNotExists,writeRawFiles}from"./file-system.js";export{FileLogger}from"./file-logger.js";export{createLogger}from"./logger.js";export{addWorkspaceOverrides,ensureWorkspaceInstallSettings,getLocalOverrides,getSdkPackages,getWorkspaceDir,hasLocalOverrides,readPackageJson,removeWorkspaceOverrides}from"./package-info.js";export{toPascalCase}from"./pascal-case.js";export{readGitCommit}from"./read-git-commit.js";export{runCommand}from"./run-command.js";export{uploadFilesWithPresignedUrls,readUploadLinks}from"./upload-utils.js";
@@ -0,0 +1,14 @@
1
+ export interface ReadGitCommitProps {
2
+ readonly directory: string;
3
+ /**
4
+ * A file of the project, relative to `directory`, that its repository tracks. git looks for a repository in every
5
+ * parent folder, so sources unpacked inside an unrelated checkout would otherwise report that checkout's commit.
6
+ */
7
+ readonly trackedFile: string;
8
+ }
9
+ /**
10
+ * Full SHA of the commit checked out in the project's own repository. Undefined when git cannot read one: no
11
+ * checkout, git missing or refusing the repository, no commit yet, or the project is not tracked by the repository
12
+ * around it. That is normal for a build from uploaded sources.
13
+ */
14
+ export declare const readGitCommit: (props: ReadGitCommitProps) => Promise<string | undefined>;
@@ -0,0 +1 @@
1
+ import{execFile as t}from"node:child_process";import{promisify as e}from"node:util";let r=e(t),i=/^[0-9a-f]{40,64}$/;export const readGitCommit=async t=>{let e={cwd:t.directory,timeout:5e3,windowsHide:!0};try{await r("git",["ls-files","--error-unmatch","--",t.trackedFile],e);let{stdout:o}=await r("git",["rev-parse","HEAD"],e),a=o.trim();return i.test(a)?a:void 0}catch{return}};
@@ -11,8 +11,8 @@ export declare class AnalyticsService {
11
11
  constructor(_debug: boolean);
12
12
  push: (event: AnalyticsEvent) => void;
13
13
  }
14
- declare const Initialized: (userId: string, configuratorName: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").InitEvent;
15
- declare const ConfigurationLoaded: (configurationId: string, revisionId: string, mode: 'read' | 'owner') => import("../../../../domain/domain-context/analytics-system/analytics-contracts").DataLoadedEvent;
14
+ declare const Initialized: (userId: string, configuratorName: string) => import("#package/domain").InitEvent;
15
+ declare const ConfigurationLoaded: (configurationId: string, revisionId: string, mode: 'read' | 'owner') => import("#package/domain").DataLoadedEvent;
16
16
  export declare const CommonAnalyticsFactory: {
17
17
  Initialized: typeof Initialized;
18
18
  ConfigurationLoaded: typeof ConfigurationLoaded;
@@ -1,26 +1,26 @@
1
1
  import type { MultilingualString } from '@salsita-ai/common/utils';
2
2
  import { type DomainEntity, type DomainEntityId, type EntityId, type EntityRecipe } from '#package/domain';
3
- declare const EntityChildrenListActionButtonClicked: (id: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
4
- declare const EntityChildrenListItemClicked: (id: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
5
- declare const AngleDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
6
- declare const AngleDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
7
- declare const GenericDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
8
- declare const GenericDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
9
- declare const DistanceDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
10
- declare const DistanceDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
11
- declare const SizeDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
12
- declare const OffsetDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
13
- declare const AttributeSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: string | number | boolean) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
14
- declare const DimensionSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
15
- declare const SwatchSelected: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
16
- declare const ColorPickerChanged: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
17
- declare const TextValueChanged: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
18
- declare const MultilingualTextValueChanged: (instanceName: string, id: EntityId, value: MultilingualString) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
19
- declare const RecipesSelected: (recipes: ReadonlyArray<DomainEntity<string>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
20
- declare const RecipeReplacementSelected: (oldId: DomainEntityId<string>, recipes: ReadonlyArray<DomainEntity<string>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
21
- declare const ChildEntitySelected: (selectorType: string) => (id: EntityId, recipes: ReadonlyArray<EntityRecipe<DomainEntity<string>>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
22
- declare const EntityChildrenListDeleteButtonClicked: (id: EntityId) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
23
- declare const EntityDeleteButtonClicked: (id: EntityId) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
3
+ declare const EntityChildrenListActionButtonClicked: (id: string) => import("#package/domain").UserActionEvent;
4
+ declare const EntityChildrenListItemClicked: (id: string) => import("#package/domain").UserActionEvent;
5
+ declare const AngleDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
6
+ declare const AngleDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
7
+ declare const GenericDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
8
+ declare const GenericDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
9
+ declare const DistanceDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
10
+ declare const DistanceDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
11
+ declare const SizeDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
12
+ declare const OffsetDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
13
+ declare const AttributeSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: string | number | boolean) => import("#package/domain").UserActionEvent;
14
+ declare const DimensionSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
15
+ declare const SwatchSelected: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
16
+ declare const ColorPickerChanged: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
17
+ declare const TextValueChanged: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
18
+ declare const MultilingualTextValueChanged: (instanceName: string, id: EntityId, value: MultilingualString) => import("#package/domain").UserActionEvent;
19
+ declare const RecipesSelected: (recipes: ReadonlyArray<DomainEntity<string>>) => import("#package/domain").UserActionEvent;
20
+ declare const RecipeReplacementSelected: (oldId: DomainEntityId<string>, recipes: ReadonlyArray<DomainEntity<string>>) => import("#package/domain").UserActionEvent;
21
+ declare const ChildEntitySelected: (selectorType: string) => (id: EntityId, recipes: ReadonlyArray<EntityRecipe<DomainEntity<string>>>) => import("#package/domain").UserActionEvent;
22
+ declare const EntityChildrenListDeleteButtonClicked: (id: EntityId) => import("#package/domain").UserActionEvent;
23
+ declare const EntityDeleteButtonClicked: (id: EntityId) => import("#package/domain").UserActionEvent;
24
24
  export declare const DomainControlsAnalytics: {
25
25
  ColorPickerChanged: typeof ColorPickerChanged;
26
26
  EntityChildrenListActionButtonClicked: typeof EntityChildrenListActionButtonClicked;
@@ -9,6 +9,6 @@ interface PublishedDataValueProviderProps extends PublishedDataValue {
9
9
  }
10
10
  export declare const PublishedDataValueProvider: (props: PublishedDataValueProviderProps) => import("react/jsx-runtime").JSX.Element;
11
11
  export declare const useProvidedPublishedData: () => PublishedDataValue;
12
- export declare const usePublishedData: () => Record<string, unknown> & import("../../../../domain/admin-domain/__generated/application-types").PublishedData;
12
+ export declare const usePublishedData: () => PublishedDataValue['publishedData'];
13
13
  export type UsePublishedData<PUBLISHED_DATA extends CommonAdminPublishedData> = () => PUBLISHED_DATA;
14
14
  export {};