@release0/js 1.1.7 → 1.1.9

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/README.md CHANGED
@@ -16,7 +16,7 @@ npm install @release0/js
16
16
 
17
17
  ```
18
18
  <script type="module">
19
- import Agent from 'https://cdn.jsdelivr.net/npm/@release0/js@1.1.7/dist/web.js'
19
+ import Agent from 'https://cdn.jsdelivr.net/npm/@release0/js@1.1.9/dist/web.js'
20
20
 
21
21
  Agent.initStandard({
22
22
  agent: 'my-agent-id',
@@ -34,7 +34,7 @@ There, you can change the container dimensions. Here is a code example:
34
34
 
35
35
  ```html
36
36
  <script type="module">
37
- import Agent from "https://cdn.jsdelivr.net/npm/@release0/js@1.1.7/dist/web.js";
37
+ import Agent from "https://cdn.jsdelivr.net/npm/@release0/js@1.1.9/dist/web.js";
38
38
 
39
39
  Agent.initStandard({
40
40
  agent: "my-agent-id",
@@ -54,7 +54,7 @@ Here is an example:
54
54
 
55
55
  ```html
56
56
  <script type="module">
57
- import Agent from "https://cdn.jsdelivr.net/npm/@release0/js@1.1.7/dist/web.js";
57
+ import Agent from "https://cdn.jsdelivr.net/npm/@release0/js@1.1.9/dist/web.js";
58
58
 
59
59
  Agent.initPopup({
60
60
  agent: "ag_herexisxyourxagentxid",
@@ -96,7 +96,7 @@ Here is an example:
96
96
 
97
97
  ```html
98
98
  <script type="module">
99
- import Agent from "https://cdn.jsdelivr.net/npm/@release0/js@1.1.7/dist/web.js";
99
+ import Agent from "https://cdn.jsdelivr.net/npm/@release0/js@1.1.9/dist/web.js";
100
100
 
101
101
  Agent.initBubble({
102
102
  agent: "ag_herexisxyourxagentxid",
package/dist/index.d.ts CHANGED
@@ -44,7 +44,7 @@ type CommandArgs = {
44
44
  type CommandData = CommandArgs & {
45
45
  isFromAgent: boolean;
46
46
  } & ({
47
- command: "open" | "toggle" | "close" | "hidePreviewMessage" | "unmount";
47
+ command: "open" | "toggle" | "close" | "hidePreviewMessage" | "unmount" | "reload" | "reset";
48
48
  } | ShowMessageCommandData | SetPrefilledVariablesCommandData | SetInputValueCommandData);
49
49
  type ShowMessageCommandData = {
50
50
  command: "showPreviewMessage";
@@ -67,6 +67,8 @@ declare const showPreviewMessage: (proactiveMessage: ShowMessageCommandData["mes
67
67
 
68
68
  declare const toggle: ({ id }?: CommandArgs) => void;
69
69
 
70
+ declare const reload: ({ id }?: CommandArgs) => void;
71
+
70
72
  declare const setInputValue: (value: string, { id }?: CommandArgs) => void;
71
73
 
72
74
  declare const unmount: ({ id }?: CommandArgs) => void;
@@ -131,4 +133,4 @@ type BubbleProps = AgentProps & BubbleParams & {
131
133
  onPreviewMessageDismissed?: () => void;
132
134
  };
133
135
 
134
- export { type AgentProps, type BubbleParams, type BubbleProps, type BubbleTheme, type ButtonTheme, type ChatWindowTheme, type CommandArgs, type CommandData, type PopupParams, type PopupProps, type PreviewMessageParams, type PreviewMessageTheme, type SetInputValueCommandData, type SetPrefilledVariablesCommandData, type ShowMessageCommandData, close, hidePreviewMessage, open, setInputValue, setPrefilledVariables, showPreviewMessage, toggle, unmount };
136
+ export { type AgentProps, type BubbleParams, type BubbleProps, type BubbleTheme, type ButtonTheme, type ChatWindowTheme, type CommandArgs, type CommandData, type PopupParams, type PopupProps, type PreviewMessageParams, type PreviewMessageTheme, type SetInputValueCommandData, type SetPrefilledVariablesCommandData, type ShowMessageCommandData, close, hidePreviewMessage, open, reload, setInputValue, setPrefilledVariables, showPreviewMessage, toggle, unmount };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var t=({id:o}={})=>{let e={isFromAgent:!0,command:"close",id:o};window.postMessage(e)};var a=({id:o}={})=>{let e={isFromAgent:!0,command:"open",id:o};window.postMessage(e)};var n=(o,{id:e}={})=>{let m={isFromAgent:!0,command:"showPreviewMessage",message:o,id:e};window.postMessage(m)};var d=({id:o}={})=>{let e={isFromAgent:!0,command:"toggle",id:o};window.postMessage(e)};var i=(o,{id:e}={})=>{let m={isFromAgent:!0,command:"setInputValue",value:o,id:e};window.postMessage(m)};var c=({id:o}={})=>{let e={isFromAgent:!0,command:"unmount",id:o};window.postMessage(e)};var f=(o,{id:e}={})=>{let m={isFromAgent:!0,command:"setPrefilledVariables",variables:o,id:e};window.postMessage(m)};var w=({id:o}={})=>{let e={isFromAgent:!0,command:"hidePreviewMessage",id:o};window.postMessage(e)};export{t as close,w as hidePreviewMessage,a as open,i as setInputValue,f as setPrefilledVariables,n as showPreviewMessage,d as toggle,c as unmount};
1
+ var t=({id:o}={})=>{let e={isFromAgent:!0,command:"close",id:o};window.postMessage(e)};var a=({id:o}={})=>{let e={isFromAgent:!0,command:"open",id:o};window.postMessage(e)};var n=(o,{id:e}={})=>{let m={isFromAgent:!0,command:"showPreviewMessage",message:o,id:e};window.postMessage(m)};var d=({id:o}={})=>{let e={isFromAgent:!0,command:"toggle",id:o};window.postMessage(e)};var i=({id:o}={})=>{let e={isFromAgent:!0,command:"reload",id:o};window.postMessage(e)};var c=(o,{id:e}={})=>{let m={isFromAgent:!0,command:"setInputValue",value:o,id:e};window.postMessage(m)};var u=({id:o}={})=>{let e={isFromAgent:!0,command:"unmount",id:o};window.postMessage(e)};var w=(o,{id:e}={})=>{let m={isFromAgent:!0,command:"setPrefilledVariables",variables:o,id:e};window.postMessage(m)};var x=({id:o}={})=>{let e={isFromAgent:!0,command:"hidePreviewMessage",id:o};window.postMessage(e)};export{t as close,x as hidePreviewMessage,a as open,i as reload,c as setInputValue,w as setPrefilledVariables,n as showPreviewMessage,d as toggle,u as unmount};