@salsita-ai/sdk 0.50.0-develop.8f92f00b12 → 0.50.0-develop.9440e83ee3
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.
- package/dist/application-spec/errors/diagnostic-codes.d.ts +9 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +10 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +24 -22
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +33 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +12 -2
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +14 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +45 -4
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +6 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +4 -0
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
- package/dist/configurator/toolbar-actions/index.d.ts +1 -0
- package/dist/configurator/toolbar-actions/index.js +1 -1
- package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
- package/dist/configurator/ui/assistant/form/form-model.d.ts +1 -3
- package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/form/index.js +1 -1
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +3 -3
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
- package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
- package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
- package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
- package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +1 -1
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +5 -3
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +0 -9
- package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +14 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
- package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
- package/dist/configurator/ui/index.d.ts +1 -0
- package/dist/configurator/ui/index.js +1 -1
- package/dist/docs/index.json +18 -1
- package/dist/docs/layouts/custom-layout.mdx +1 -1
- package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +9 -8
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +1 -1
- package/dist/domain/application/assistant/assistant-manifest.d.ts +16 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +8 -1
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
- package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
- package/dist/domain/application/assistant/{assistant-form-elements.d.ts → form/assistant-form-elements.d.ts} +71 -23
- package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
- package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
- package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
- package/dist/domain/application/assistant/form/index.d.ts +4 -0
- package/dist/domain/application/assistant/form/index.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +2 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +2 -4
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/available-system-components.d.ts +1 -1
- package/dist/domain/available-system-components.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
- package/dist/domain/domain-context/store-system/store-system.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +4 -0
- package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +15 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
- package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +2 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +24 -0
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
- package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
- package/dist/domain/extensions/export-images/client-side-image.js +1 -0
- package/dist/domain/extensions/export-images/index.d.ts +3 -0
- package/dist/domain/extensions/export-images/index.js +1 -0
- package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
- package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
- package/dist/domain/extensions/index.d.ts +1 -2
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +2 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.d.ts +8 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -0
- package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
- package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
- package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
- package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
- package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +4 -2
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -1
- package/dist/react-sdk/web-component/create-web-component.js +1 -1
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
- package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
- package/dist/react-sdk/web-component/god-mode/index.js +1 -0
- package/dist/ui-sdk/theme/types.d.ts +5 -1
- package/package.json +13 -3
- package/schema/domain-spec.json +140 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
- package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
- package/dist/configurator/ui/assistant/form/form-element-definition.js +0 -1
- package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
- package/dist/domain/application/assistant/assistant-form-elements.js +0 -1
- package/dist/domain/application/assistant/get-assistant-form-value-attribute.d.ts +0 -6
- package/dist/domain/application/assistant/get-assistant-form-value-attribute.js +0 -1
- package/dist/domain/extensions/client-side-image.js +0 -1
- package/dist/domain/extensions/save-template-thumbnail.js +0 -1
- package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
- package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BehaviorSubject as e}from"rxjs";import{memoOnce as t}from"@salsita-ai/common/utils";import{
|
|
1
|
+
import{BehaviorSubject as e}from"rxjs";import{memoOnce as t}from"@salsita-ai/common/utils";import{ImplementationErrors as i,createDomainRuntimeSlices as n,findAssistantFormElementErrors as o,resolveIsDev as s}from"#package/domain";import{initializeAnalyticsService as r}from"../common-services/analytics/analytics-service.js";import{initializeI18n as a,initializeLogger as c}from"../common-services/initialize.js";import{createCommonServicesSelectors as l}from"../common-services/selectors.js";import{createDomainApplicationContextSelectors as m}from"../domain-application-context/index.js";import{createIntegrationActions as p,createIntegrationSelectors as u,initializeIntegration as g}from"../integration/index.js";import{createRoutingActions as d,createRoutingSelectors as S,initializeRouting as v}from"../routing/index.js";import{SessionService as x,createSessionRuntimeActions as f,createSessionRuntimeSelectors as C,initializeSessionRuntime as y}from"../session/index.js";export function createApplicationRuntimeSlices(e){let{config:A,bootConfig:b,getSubject:w,getConfiguratorExtensions:j}=e,R=s(A),h=c(A,R),E={analyticsService:r(A,h,R),i18n:a(A),logger:h},{initialize:I,selectors:z,actions:D}=n({config:A,services:E,getSubject:w,getExtensionSystems:e=>P[e].getInitializableSystems()}),T=I(),{assistant:L,elements:O}=T.spec.configurator,U=o(L?.formElements??[],O);if(U.length>0)throw new i(U);let k=p({setIntegration:e=>{let t=w(),i=e(t.value.integration);t.next({...t.value,integration:i})}}),G=u({getState:()=>w().value,actions:k}),$=g(),q=d({setRouting:e=>{let t=w(),i=e(t.value.routing);t.next({...t.value,routing:i})}}),B=S({getState:()=>w().value,actions:q,accessActions:D.access,loadedDataActions:D.loadedData,domainServicesSelectors:z.domainServices,overridesSelectors:z.overrides}),F=v(),H=l({getState:()=>w().value,environmentSelectors:z.environment,specSelectors:z.spec,accessSelectors:z.access,domainServicesSelectors:z.domainServices,webComponentOptions:b.webComponentOptions,webComponentApi:b.webComponentApi,getSessionService:()=>N(),routingSelectors:B}),J=f({setSessionRuntime:e=>{let t=w(),i=e(t.value.session);t.next({...t.value,session:i})}}),K=C({getState:()=>w().value,sessionContextSelectors:z.sessionContext}),M=y(),N=t(()=>new x({getLogger:()=>z.domainServices.getLogger(),getAnalyticsService:()=>z.domainServices.getAnalyticsService(),getUnauthenticatedClient:H.getUnauthenticatedClient,environmentSelectors:z.environment,sessionActions:J,setSessionContext:D.sessionContext.setSessionContext,sessionSelectors:K,specSelectors:z.spec})),P={configurator:m({applicationType:"configurator",commonServicesSelectors:H,domainServicesSelectors:z.domainServices,domainContextSelectors:z.domainContext.configurator,getApplicationRuntimeExtensions:j}),admin:m({applicationType:"admin",commonServicesSelectors:H,domainServicesSelectors:z.domainServices,domainContextSelectors:z.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})};return h.info(`Configurator Application loaded with deployment ID: ${A.deploymentId}!`),h.appendToGlobalContext({deploymentId:A.deploymentId}),{getState:()=>w().value,initialize:()=>({...T,integration:$,routing:F,session:M}),selectors:{...z,commonServices:H,integration:G,routing:B,session:K,domainApplicationContext:P},actions:{...D,integration:k,routing:q,session:J}}}export function createApplicationRuntime(t,i,n){return((t,i,n)=>{let o=null,s=null,r=()=>{if(!o)throw Error("Subject not yet initialized!");return o},{initialize:a,...c}=createApplicationRuntimeSlices({config:t,bootConfig:i,getSubject:r,getConfiguratorExtensions:()=>s});return s=n?n(c):[],c.selectors.domainApplicationContext.configurator.getSystems(),o=new e(a()),{...c,getState:()=>r().value,subscribe:e=>{let t=r().subscribe(()=>e());return()=>t.unsubscribe()}}})(t,i,n)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as o}from"react";import{FrontendAnalyticsFactory as
|
|
1
|
+
import{useCallback as o,useMemo as n}from"react";import{FrontendAnalyticsFactory as e,useAnalyticsService as t}from"../../application-runtime/index.js";import{useDomain as d,useEagerObservableValue as r}from"../common-hooks/index.js";export const useUndoRedo=()=>{let i=t(),{undoSystem:c}=d(),{canUndo:m,canRedo:p}=r(c.can$),u=o(()=>{c.canUndo()&&(i.push(e.UndoButtonClicked()),c.undo())},[i,c]),s=o(()=>{c.canRedo()&&(i.push(e.RedoButtonClicked()),c.redo())},[i,c]);return n(()=>({canUndo:m,canRedo:p,undo:u,redo:s}),[m,p,u,s])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{createRoot as t}from"react-dom/client";import{Subject as r,Subscription as o,filter as s,scan as i}from"rxjs";import{v4 as n}from"uuid";import{standardWebComponentEvents as a,standardWebComponentProperties as l}from"#package/domain";import{WebComponentApp as c}from"./WebComponentApp.js";import{createEventDispatcher as u,createStorage as p,createWebComponentApi as h}from"./create-web-component-api.js";import{createAttributeNameToPropertyMap as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{createRoot as t}from"react-dom/client";import{Subject as r,Subscription as o,filter as s,scan as i}from"rxjs";import{v4 as n}from"uuid";import{standardWebComponentEvents as a,standardWebComponentProperties as l}from"#package/domain";import{WebComponentApp as c}from"./WebComponentApp.js";import{createEventDispatcher as u,createStorage as p,createWebComponentApi as h}from"./create-web-component-api.js";import{registerGodModeTarget as b}from"./god-mode/index.js";import{createAttributeNameToPropertyMap as d,createEventTypeByDescriptorMap as m,deriveWebComponentContract as f}from"./web-component-contract.js";let y=Symbol("storagesByPropertyDescriptor"),g=Symbol("reactRoot"),v=Symbol("pendingDisconnection"),j=Symbol("setProperty"),S=Symbol("activeSubscriptions"),P=Symbol("propertiesWithStorages"),w=Symbol("container"),C=Symbol("applicationRuntime"),x=Symbol("webComponentApi"),A=Symbol("PreviousPropertyValues"),E=Symbol("Events"),O=Symbol("Uuid"),$=(e,t,r)=>{let o=t?.attributeParser;if(!o)throw Error("Attribute parser is not defined");try{let e=o(r);return{success:!0,data:e}}catch(t){return console.error(`Failed to parse attribute ${e}, ignoring`,t),{success:!1}}};export const createWebComponent=k=>{let{RootComponent:D,webComponentOptions:B,embeddedIntegration:M,applicationRuntimeFactory:W}=k,F=f(B),{properties:V,events:q}=F,N=d(V),R=m(q),T=class Salsita3dConfigurator extends HTMLElement{[y];[g];[v]=null;[S]=[];[P];[w];[C];[x];[A]=new Map;[E]=new r;[O]=n();get applicationRuntime(){return this[C]}static observedAttributes=Array.from(N.keys());[j](e,t,r){let o=t.schema.safeParse(r);if(!o.success)return void console.error(`Invalid value provided for property ${e}, ignoring`,o.error);let s=this[y].get(t);if(!s)return void console.error(`Subject not found for property descriptor of ${e}`);let i=s.isSet;s.isSet=!0,i&&s.subject.value===o.data||s.subject.next(o.data)}constructor(){super(),this[w]=this.attachShadow({mode:"closed"}),this[P]=Object.entries(V).map(([e,t])=>{if(Object.prototype.hasOwnProperty.call(this,e)){let r=t.schema.safeParse(this[e]);if(delete this[e],r.success)return{name:e,propertyDescriptor:t,storage:p(t,r.data)};console.error(`Failed to validate property ${e}, ignoring`,r.error)}if(t.attributeParser&&t.attributeNames){let r=t.attributeNames.map(e=>this.getAttribute(e)).find(e=>null!==e)??null;if(null!==r){let o=$(e,t,r);if(o.success){let r=t.schema.safeParse(o.data);if(r.success)return{name:e,propertyDescriptor:t,storage:p(t,r.data)};console.error(`Failed to validate attribute ${e}, ignoring`,r.error)}}}return{name:e,propertyDescriptor:t,storage:p(t,t.defaultValue)}}),this[y]=new Map(this[P].map(({propertyDescriptor:e,storage:t})=>[e,t])),this[x]=h({element:this,eventTypeByDescriptor:R,events:this[E],propertiesWithStorages:this[P],storagesByPropertyDescriptor:this[y]}),this[C]=W({webComponentOptions:F,webComponentApi:this[x]})}connectedCallback(){let r;if(null!==this[v]){this[v]=null,this[C].actions.webComponent.startNewGeneration();return}let n=this[C],p=this[x],h=u({element:this,eventTypeByDescriptor:R,storagesByPropertyDescriptor:this[y]},!0),d=this[P].map(({name:e,storage:t})=>t.subject.pipe(i((e,t)=>[e[1],t],[t.subject.value,t.subject.value]),s(([e,t])=>e!==t)).subscribe(([t,r])=>{h(a.propertyChanged,{name:e,oldValue:t,newValue:r})})),m=e=>{if(e)for(let[t,r]of Object.entries(e)){let e=this[P].find(({name:e})=>e===t);if(e){let{storage:o,propertyDescriptor:s}=e;this[A].has(t)||this[A].set(t,o.subject.value);let i=s.schema.safeParse(r);i.success?(o.subject.next(i.data),o.isSet=!0):console.error(`Failed to apply web component property override for "${t}":`,i.error)}}else{for(let[e,t]of this[A]){let r=this[P].find(({name:t})=>t===e);if(r){let{storage:e}=r;e.subject.next(t)}}this[A].clear()}},f=new o(n.subscribe(()=>{let e=n.selectors.overrides.getWebComponentProperties();e!==r&&(r=e,m(e))})),j=new o(b(this,n.actions.environment.setGodMode));this[S]=[...d,f,j],this[g]=t(this[w]),this[g].render(e(c,{runtime:n,container:this[w],children:e(D,{})}));let E=p.getPropertyValue(l.onAttached);if(E)try{E(this)}catch(e){console.error("Error in onAttached handler",e)}this.dispatchEvent(new CustomEvent("attached",{bubbles:!0}))}disconnectedCallback(){let e={};this[v]=e,queueMicrotask(()=>{this[v]===e&&(this[v]=null,this[S].forEach(e=>{e.unsubscribe()}),this[g]?.unmount(),this[g]=void 0)})}attributeChangedCallback(e,t,r){let o=N.get(e);if(!o)throw Error(`Property descriptor not found for attribute: ${e}, despite the attribute being observed`);if(null===r)return o.required?void console.error(`Cannot unset a required attribute ${e}, ignoring`):void this[j](e,o,o.defaultValue);let s=$(e,o,r);s.success&&this[j](e,o,s.data)}};return Object.entries(V).forEach(([e,t])=>{Object.defineProperty(T.prototype,e,{enumerable:!0,configurable:!1,get(){return this[y].get(t).subject.value},set(r){this[j](e,t,r)}})}),M&&(Object.defineProperty(T.prototype,"$events",{enumerable:!1,configurable:!1,get(){return this[E]}}),Object.defineProperty(T.prototype,"uuid",{enumerable:!1,configurable:!1,get(){return this[O]}})),T};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turns god mode on or off from the browser console, for the applications mounted on the page.
|
|
3
|
+
*
|
|
4
|
+
* - `window.__salsita.setGodMode(true)` switches every mounted application and remembers the value
|
|
5
|
+
* for the tab's session, so applications created later, and after a reload, start with it.
|
|
6
|
+
* - `window.__salsita.setGodMode(true, $0)` switches only the application whose custom element is
|
|
7
|
+
* given, here the one selected in the browser's element inspector.
|
|
8
|
+
* - `window.__salsita.setGodMode(false, 'my-configurator')` switches only the application whose
|
|
9
|
+
* custom element is the first match of the CSS selector.
|
|
10
|
+
*
|
|
11
|
+
* A targeted call is not remembered. A target that matches no mounted application changes
|
|
12
|
+
* nothing and logs an error.
|
|
13
|
+
*/
|
|
14
|
+
export type SetGodMode = (godMode: boolean, target?: Element | string) => void;
|
|
15
|
+
declare global {
|
|
16
|
+
interface Window {
|
|
17
|
+
__salsita: {
|
|
18
|
+
setGodMode: SetGodMode;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Makes a mounted application reachable through `window.__salsita.setGodMode` (see
|
|
24
|
+
* {@link SetGodMode}) and installs the global. Returns the function that removes the application
|
|
25
|
+
* again.
|
|
26
|
+
*
|
|
27
|
+
* @param element The application's custom element, which a targeted call names.
|
|
28
|
+
* @param setRuntimeGodMode Publishes the value to the application's own runtime.
|
|
29
|
+
*/
|
|
30
|
+
export declare const registerGodModeTarget: (element: Element, setRuntimeGodMode: (godMode: boolean) => void) => (() => void);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GOD_MODE_SESSION_STORAGE_KEY as e}from"#package/domain";let t=new Map,o=(o,n)=>{if(void 0===n){sessionStorage.setItem(e,o.toString()),t.forEach(e=>{e(o)});return}let i="string"==typeof n?document.querySelector(n):n,r=null===i?void 0:t.get(i);void 0===r?console.error("setGodMode: the target is not the element of a mounted application; nothing changed.",n):r(o)};export const registerGodModeTarget=(e,n)=>(t.set(e,n),window.__salsita={...window.__salsita,setGodMode:o},()=>{t.get(e)===n&&t.delete(e)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { registerGodModeTarget, type SetGodMode } from './god-mode-registry.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{registerGodModeTarget}from"./god-mode-registry.js";
|
|
@@ -44,7 +44,8 @@ declare module '@mui/material/styles' {
|
|
|
44
44
|
PhxChat: 'root';
|
|
45
45
|
PhxChatFooter: 'root' | 'formLayout' | 'input';
|
|
46
46
|
PhxChatMessage: 'base' | 'assistant' | 'user' | 'widget' | 'error' | 'helper';
|
|
47
|
-
PhxAssistantPanel: 'root' | 'header' | 'title' | 'closeButton' | 'thread' | 'greeting' | 'messages' | 'userMessage' | 'assistantMessage' | 'alert' | 'entityLink' | 'referenceLink' | 'referenceDetails' | 'image' | 'form' | 'formGroup' | 'formGroupLabel' | 'formOptions' | 'formOptionsLabel' | 'formOptionsRow' | 'formReply' | 'formText' | 'formTextInput' | 'formNumber' | 'formConfirm' | 'formConfirmButtons' | 'formConfirmButton' | 'formSubmit' | 'formNote' | 'chips' | 'activity' | 'activityIcon' | 'chip' | 'undoButton' | 'status' | 'separator' | 'earlierButton' | 'notice' | 'newReplyButton' | 'composer' | 'inputFrame' | 'input' | 'sendButton' | 'stopButton' | 'hint';
|
|
47
|
+
PhxAssistantPanel: 'root' | 'header' | 'title' | 'closeButton' | 'thread' | 'greeting' | 'messages' | 'userMessage' | 'assistantMessage' | 'alert' | 'entityLink' | 'referenceLink' | 'referenceDetails' | 'image' | 'screenshotsLink' | 'screenshots' | 'form' | 'formGroup' | 'formGroupLabel' | 'formOptions' | 'formOptionsLabel' | 'formOptionsRow' | 'formReply' | 'formCard' | 'formCardImage' | 'formCardLabel' | 'formCardDescription' | 'formCardCheck' | 'formSwatch' | 'formSwatchImage' | 'formSwatchCheck' | 'formText' | 'formTextInput' | 'formNumber' | 'formConfirm' | 'formConfirmButtons' | 'formConfirmButton' | 'formSubmit' | 'formNote' | 'chips' | 'activity' | 'activityIcon' | 'chip' | 'undoButton' | 'status' | 'separator' | 'earlierButton' | 'notice' | 'newReplyButton' | 'composer' | 'inputFrame' | 'input' | 'sendButton' | 'stopButton' | 'hint';
|
|
48
|
+
PhxExportingOverlay: 'root' | 'message';
|
|
48
49
|
PhxTopNavigation: 'root' | 'stepper' | 'step';
|
|
49
50
|
PhxListSelector: 'root';
|
|
50
51
|
PhxListSelectorItem: 'root' | 'radio' | 'title' | 'description' | 'formControlLabel';
|
|
@@ -113,6 +114,9 @@ declare module '@mui/material/styles' {
|
|
|
113
114
|
PhxAssistantPanel?: {
|
|
114
115
|
styleOverrides?: ComponentsOverrides<Theme>['PhxAssistantPanel'];
|
|
115
116
|
};
|
|
117
|
+
PhxExportingOverlay?: {
|
|
118
|
+
styleOverrides?: ComponentsOverrides<Theme>['PhxExportingOverlay'];
|
|
119
|
+
};
|
|
116
120
|
PhxPreviewLayout?: {
|
|
117
121
|
styleOverrides?: ComponentsOverrides<Theme>['PhxPreviewLayout'];
|
|
118
122
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salsita-ai/sdk",
|
|
3
|
-
"version": "0.50.0-develop.
|
|
3
|
+
"version": "0.50.0-develop.9440e83ee3",
|
|
4
4
|
"description": "TypeScript SDK and CLI for building, running, and deploying Phoenix configurator applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salsita",
|
|
@@ -207,6 +207,16 @@
|
|
|
207
207
|
"schema",
|
|
208
208
|
"CHANGELOG.md"
|
|
209
209
|
],
|
|
210
|
+
"nx": {
|
|
211
|
+
"targets": {
|
|
212
|
+
"build": {
|
|
213
|
+
"outputs": [
|
|
214
|
+
"{projectRoot}/dist",
|
|
215
|
+
"{projectRoot}/src/i18n/locales/*/messages.ts"
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
210
220
|
"dependencies": {
|
|
211
221
|
"@apidevtools/json-schema-ref-parser": "14.1.1",
|
|
212
222
|
"@aws-sdk/client-s3": "3.1054.0",
|
|
@@ -298,8 +308,8 @@
|
|
|
298
308
|
"yaml": "2.9.0",
|
|
299
309
|
"yargs": "17.7.2",
|
|
300
310
|
"zod": "3.25.76",
|
|
301
|
-
"@salsita-ai/common": "0.50.0-develop.
|
|
302
|
-
"@salsita-ai/contracts": "0.50.0-develop.
|
|
311
|
+
"@salsita-ai/common": "0.50.0-develop.9440e83ee3",
|
|
312
|
+
"@salsita-ai/contracts": "0.50.0-develop.9440e83ee3"
|
|
303
313
|
},
|
|
304
314
|
"devDependencies": {
|
|
305
315
|
"@clerk/clerk-react": "5.61.8",
|
package/schema/domain-spec.json
CHANGED
|
@@ -13959,6 +13959,53 @@
|
|
|
13959
13959
|
"required": ["exportState", "width", "height", "fileFormat", "toolState", "viewState", "navigationState"],
|
|
13960
13960
|
"additionalProperties": false
|
|
13961
13961
|
},
|
|
13962
|
+
"AgentScreenshotComponentState": {
|
|
13963
|
+
"type": "object",
|
|
13964
|
+
"tsType": "AgentScreenshotComponentState",
|
|
13965
|
+
"import": [
|
|
13966
|
+
{
|
|
13967
|
+
"module": "@salsita-ai/sdk/domain",
|
|
13968
|
+
"member": "AgentScreenshotComponentState"
|
|
13969
|
+
}
|
|
13970
|
+
],
|
|
13971
|
+
"properties": {
|
|
13972
|
+
"exportState": {
|
|
13973
|
+
"type": "string"
|
|
13974
|
+
},
|
|
13975
|
+
"width": {
|
|
13976
|
+
"type": "number"
|
|
13977
|
+
},
|
|
13978
|
+
"height": {
|
|
13979
|
+
"type": "number"
|
|
13980
|
+
},
|
|
13981
|
+
"fileFormat": {
|
|
13982
|
+
"type": "string",
|
|
13983
|
+
"enum": ["PNG", "JPEG"]
|
|
13984
|
+
},
|
|
13985
|
+
"backgroundColor": {
|
|
13986
|
+
"type": "string",
|
|
13987
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
13988
|
+
"tsType": "HexColor",
|
|
13989
|
+
"import": [
|
|
13990
|
+
{
|
|
13991
|
+
"module": "@salsita-ai/sdk/common/utils",
|
|
13992
|
+
"member": "HexColor"
|
|
13993
|
+
}
|
|
13994
|
+
]
|
|
13995
|
+
},
|
|
13996
|
+
"toolState": {
|
|
13997
|
+
"type": "string"
|
|
13998
|
+
},
|
|
13999
|
+
"viewState": {
|
|
14000
|
+
"type": "string"
|
|
14001
|
+
},
|
|
14002
|
+
"navigationState": {
|
|
14003
|
+
"type": "string"
|
|
14004
|
+
}
|
|
14005
|
+
},
|
|
14006
|
+
"required": ["exportState", "width", "height", "fileFormat", "toolState", "viewState", "navigationState"],
|
|
14007
|
+
"additionalProperties": false
|
|
14008
|
+
},
|
|
13962
14009
|
"ProjectedEntitiesComponentState": {
|
|
13963
14010
|
"type": "object",
|
|
13964
14011
|
"tsType": "ProjectedEntitiesComponentState",
|
|
@@ -44102,6 +44149,99 @@
|
|
|
44102
44149
|
]
|
|
44103
44150
|
}
|
|
44104
44151
|
},
|
|
44152
|
+
"agentScreenshot": {
|
|
44153
|
+
"type": "object",
|
|
44154
|
+
"additionalProperties": {
|
|
44155
|
+
"anyOf": [
|
|
44156
|
+
{
|
|
44157
|
+
"type": "object",
|
|
44158
|
+
"tsType": "AgentScreenshotComponentState",
|
|
44159
|
+
"import": [
|
|
44160
|
+
{
|
|
44161
|
+
"module": "@salsita-ai/sdk/domain",
|
|
44162
|
+
"member": "AgentScreenshotComponentState"
|
|
44163
|
+
}
|
|
44164
|
+
],
|
|
44165
|
+
"properties": {
|
|
44166
|
+
"exportState": {
|
|
44167
|
+
"$ref": "#/definitions/EnhancedStringRead"
|
|
44168
|
+
},
|
|
44169
|
+
"width": {
|
|
44170
|
+
"$ref": "#/definitions/EnhancedNumberRead"
|
|
44171
|
+
},
|
|
44172
|
+
"height": {
|
|
44173
|
+
"$ref": "#/definitions/EnhancedNumberRead"
|
|
44174
|
+
},
|
|
44175
|
+
"fileFormat": {
|
|
44176
|
+
"anyOf": [
|
|
44177
|
+
{
|
|
44178
|
+
"type": "string",
|
|
44179
|
+
"enum": ["PNG", "JPEG"]
|
|
44180
|
+
},
|
|
44181
|
+
{
|
|
44182
|
+
"$ref": "#/definitions/ReadEnhancement"
|
|
44183
|
+
}
|
|
44184
|
+
]
|
|
44185
|
+
},
|
|
44186
|
+
"backgroundColor": {
|
|
44187
|
+
"anyOf": [
|
|
44188
|
+
{
|
|
44189
|
+
"type": "string",
|
|
44190
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
44191
|
+
"tsType": "HexColor",
|
|
44192
|
+
"import": [
|
|
44193
|
+
{
|
|
44194
|
+
"module": "@salsita-ai/sdk/common/utils",
|
|
44195
|
+
"member": "HexColor"
|
|
44196
|
+
}
|
|
44197
|
+
]
|
|
44198
|
+
},
|
|
44199
|
+
{
|
|
44200
|
+
"$ref": "#/definitions/ReadEnhancement"
|
|
44201
|
+
}
|
|
44202
|
+
]
|
|
44203
|
+
},
|
|
44204
|
+
"toolState": {
|
|
44205
|
+
"$ref": "#/definitions/EnhancedStringRead"
|
|
44206
|
+
},
|
|
44207
|
+
"viewState": {
|
|
44208
|
+
"$ref": "#/definitions/EnhancedStringRead"
|
|
44209
|
+
},
|
|
44210
|
+
"navigationState": {
|
|
44211
|
+
"$ref": "#/definitions/EnhancedStringRead"
|
|
44212
|
+
},
|
|
44213
|
+
"$filter": {
|
|
44214
|
+
"$ref": "#/definitions/ComponentSystemFilter"
|
|
44215
|
+
}
|
|
44216
|
+
},
|
|
44217
|
+
"required": [
|
|
44218
|
+
"exportState",
|
|
44219
|
+
"width",
|
|
44220
|
+
"height",
|
|
44221
|
+
"fileFormat",
|
|
44222
|
+
"toolState",
|
|
44223
|
+
"viewState",
|
|
44224
|
+
"navigationState"
|
|
44225
|
+
],
|
|
44226
|
+
"additionalProperties": false
|
|
44227
|
+
},
|
|
44228
|
+
{
|
|
44229
|
+
"type": "object",
|
|
44230
|
+
"properties": {
|
|
44231
|
+
"$read": {
|
|
44232
|
+
"type": "string",
|
|
44233
|
+
"pattern": "^\\$?[a-z]\\w*$"
|
|
44234
|
+
},
|
|
44235
|
+
"$filter": {
|
|
44236
|
+
"$ref": "#/definitions/ComponentSystemFilter"
|
|
44237
|
+
}
|
|
44238
|
+
},
|
|
44239
|
+
"required": ["$read"],
|
|
44240
|
+
"additionalProperties": false
|
|
44241
|
+
}
|
|
44242
|
+
]
|
|
44243
|
+
}
|
|
44244
|
+
},
|
|
44105
44245
|
"projectedEntities": {
|
|
44106
44246
|
"type": "object",
|
|
44107
44247
|
"additionalProperties": {
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { FormElementDefinition } from './form-element-definition.js';
|
|
2
|
-
import { type FormRegistry } from './form-registry.js';
|
|
3
|
-
/** The elements of every assistant form: the built-ins the SDK prompt lists, with their components. */
|
|
4
|
-
export declare const BUILT_IN_FORM_ELEMENTS: readonly FormElementDefinition[];
|
|
5
|
-
/**
|
|
6
|
-
* The registry of the built-in elements, built on the first form rather than when the module loads:
|
|
7
|
-
* compiling validators while the bundle evaluates would break a configurator on a page whose CSP
|
|
8
|
-
* forbids eval, even one without an assistant.
|
|
9
|
-
*/
|
|
10
|
-
export declare const getBuiltInFormRegistry: () => FormRegistry;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let o;import{match as t}from"ts-pattern";import{ASSISTANT_BUILT_IN_FORM_ELEMENTS as e,extendedSchemaValidator as r}from"#package/domain";import{FormConfirm as i,FormGroup as m,FormNumber as n,FormOptions as p,FormReply as c,FormText as s}from"../form-elements/index.js";import{createFormRegistry as a}from"./form-registry.js";let h={group:m,choice:p,choices:p,reply:c,text:s,number:n,confirm:i};export const BUILT_IN_FORM_ELEMENTS=e.map(o=>{let e;return e=h[o.name],t(o.role).with("group","choice","choices",t=>({...o,role:t,component:e})).with("option",t=>({...o,role:t,component:e})).with("input",t=>({...o,role:t,component:e})).exhaustive()});export const getBuiltInFormRegistry=()=>o??=a(BUILT_IN_FORM_ELEMENTS,{schemaValidator:r});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{getAssistantFormValueAttribute as e}from"#package/domain";let t=new Set(`a abbr acronym address applet area article aside audio b base basefont bdi bdo big blink blockquote body br
|
|
2
|
-
button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl dt em
|
|
3
|
-
embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html
|
|
4
|
-
i iframe image img input ins kbd keygen label legend li link main map mark marquee math menu menuitem meta
|
|
5
|
-
meter nav nobr noembed noframes noscript object ol optgroup option output p param picture plaintext pre
|
|
6
|
-
progress q rb rp rt rtc ruby s samp script search section select slot small source span strike strong style
|
|
7
|
-
sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr
|
|
8
|
-
xmp`.split(/\s+/)),r=/^[a-z][a-z0-9-]*$/,a={type:"string"},o=t=>{let r=e(t);return Object.entries({label:a,...r?{value:r}:{},...t.attributes})},n=(e,t)=>{let r=e.get(t);if(r?.definition.role!==t)throw Error(`The form registry has no "${t}" element with the role "${t}". Forms wrap implicit content in it. Register the built-in "${t}".`);return r};export const createFormRegistry=(e,{schemaValidator:a})=>{let i=new Map;for(let n of e){if(!r.test(n.name)||t.has(n.name))throw Error(`The form element "${n.name}" cannot be registered: its name must be lowercase and must not be an HTML element name, so form markup is never read as HTML. Rename the element.`);if(i.has(n.name))throw Error(`The form element "${n.name}" is registered twice. Each tag names one element. Remove or rename one of them.`);let e=new Map(o(n).map(([e,t])=>[e,{attribute:t,validate:a.compile({type:t.type,...t.enum?{enum:t.enum}:{}})}]));i.set(n.name,{definition:n,attributes:e})}return{group:n(i,"group"),choice:n(i,"choice"),choices:n(i,"choices"),get:e=>i.get(e)}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const ASSISTANT_BUILT_IN_FORM_ELEMENTS=[{name:"group",role:"group",description:"Puts related questions together under its label.",attributes:{}},{name:"choice",role:"choice",description:"The user picks exactly one of its options.",attributes:{}},{name:"choices",role:"choices",description:"The user picks any number of its options.",attributes:{}},{name:"reply",role:"option",description:"A short answer shown as a button.",attributes:{}},{name:"text",role:"input",description:"A single line the user types.",attributes:{placeholder:{type:"string"}}},{name:"number",role:"input",description:"A number the user types, with a slider when both `min` and `max` are given. The answer carries the `unit`, as in `Length: 240 cm`.",attributes:{min:{type:"number"},max:{type:"number"},step:{type:"number"},unit:{type:"string"}},valueType:"number"},{name:"confirm",role:"input",description:"A yes or no question, shown as two buttons. It answers with the user's own words for yes and no, such as `Yes` or `Ano`, and alone in a form it sends on the click.",attributes:{},valueType:"none",quick:!0}];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { AssistantFormAttribute, AssistantFormElementDescriptor } from './assistant-form-elements.js';
|
|
2
|
-
/**
|
|
3
|
-
* The built-in `value` attribute an element takes, or `undefined` when it takes none: options and
|
|
4
|
-
* inputs take one, a string unless the element says otherwise.
|
|
5
|
-
*/
|
|
6
|
-
export declare const getAssistantFormValueAttribute: ({ role, valueType, }: AssistantFormElementDescriptor) => AssistantFormAttribute | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const getAssistantFormValueAttribute=({role:t,valueType:n})=>{if(("option"===t||"input"===t)&&"none"!==n)return{type:n??"string"}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as t,isSnapshotOfComponentType as e}from"../core/index.js";export const clientSideImageComponent=t.component("clientSideImage").withState({type:"object",tsType:"ClientSideImageComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ClientSideImageComponentState"}],properties:{exportState:{type:"string"},width:{type:"number"},height:{type:"number"},fileFormat:{type:"string",enum:["PNG","JPEG"]},backgroundColor:{type:"string",pattern:"^#[0-9a-fA-F]{6}$",tsType:"HexColor",import:[{module:"@salsita-ai/sdk/common/utils",member:"HexColor"}]},toolState:{type:"string"},viewState:{type:"string"},navigationState:{type:"string"}},required:["exportState","width","height","fileFormat","toolState","viewState","navigationState"],additionalProperties:!1}).build();export const isClientSideImageComponentSnapshot=e(clientSideImageComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as t,isSnapshotOfComponentType as e}from"../core/index.js";export const saveTemplateThumbnailComponent=t.component("saveTemplateThumbnail").withState({type:"object",tsType:"SaveTemplateThumbnailComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"SaveTemplateThumbnailComponentState"}],properties:{exportState:{type:"string"},width:{type:"number"},height:{type:"number"},fileFormat:{type:"string",enum:["PNG","JPEG"]},backgroundColor:{type:"string",pattern:"^#[0-9a-fA-F]{6}$",tsType:"HexColor",import:[{module:"@salsita-ai/sdk/common/utils",member:"HexColor"}]},toolState:{type:"string"},viewState:{type:"string"},navigationState:{type:"string"}},required:["exportState","width","height","fileFormat","toolState","viewState","navigationState"],additionalProperties:!1}).build();export const isSaveTemplateThumbnailComponentSnapshot=e(saveTemplateThumbnailComponent);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type EnvironmentActions } from '#package/domain';
|
|
2
|
-
declare global {
|
|
3
|
-
interface Window {
|
|
4
|
-
__salsita: {
|
|
5
|
-
setGodMode: (godMode: boolean) => void;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
interface Context {
|
|
10
|
-
readonly environmentActions: EnvironmentActions;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Installs the `window.__salsita.setGodMode` global toggle for the given registry. The
|
|
14
|
-
* toggle persists the value in session storage (so it survives reloads, see
|
|
15
|
-
* {@link resolveGodMode}) and publishes it to the runtime spec, where consumers read it
|
|
16
|
-
* via `useRuntimeSpecGodMode`.
|
|
17
|
-
*/
|
|
18
|
-
export declare const registerGodModeGlobal: (context: Context) => void;
|
|
19
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{GOD_MODE_SESSION_STORAGE_KEY as o}from"#package/domain";export const registerGodModeGlobal=e=>{window.__salsita={...window.__salsita,setGodMode:t=>{sessionStorage.setItem(o,t.toString()),e.environmentActions.setGodMode(t)}}};
|