app-v3-scripts-editor 1.13.1 → 1.14.2

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 (26) hide show
  1. package/dist/app-v3-scripts-editor.css +1 -1
  2. package/dist/app-v3-scripts-editor.es.js +35257 -34273
  3. package/dist/app-v3-scripts-editor.umd.js +154 -153
  4. package/dist/src/lib/components/Blocks/Agent/block.d.ts +3 -0
  5. package/dist/src/lib/components/Blocks/Agent/components/DraggableItem.d.ts +5 -0
  6. package/dist/src/lib/components/Blocks/Agent/components/DraggableList.d.ts +10 -0
  7. package/dist/src/lib/components/Blocks/Agent/components/FormListDraggable.d.ts +9 -0
  8. package/dist/src/lib/components/Blocks/Agent/components/ListCondition.d.ts +4 -0
  9. package/dist/src/lib/components/Blocks/Agent/components/PromptLibraryModal.d.ts +8 -0
  10. package/dist/src/lib/components/Blocks/Agent/components/index.css.d.ts +15 -0
  11. package/dist/src/lib/components/Blocks/Agent/index.css.d.ts +20 -0
  12. package/dist/src/lib/components/Blocks/Agent/index.d.ts +4 -0
  13. package/dist/src/lib/components/Blocks/Agent/index.settings.d.ts +4 -0
  14. package/dist/src/lib/components/Blocks/Agent/node.d.ts +3 -0
  15. package/dist/src/lib/components/Blocks/Agent/settings/AddConditionButton.d.ts +9 -0
  16. package/dist/src/lib/components/Blocks/Agent/settings/AddVariableButton.d.ts +6 -0
  17. package/dist/src/lib/components/Blocks/Agent/settings/AgentIntent.d.ts +8 -0
  18. package/dist/src/lib/components/Blocks/Agent/settings/FormAddCondition.d.ts +11 -0
  19. package/dist/src/lib/components/Blocks/Agent/settings/index.css.d.ts +10 -0
  20. package/dist/src/lib/components/Blocks/Agent/types.d.ts +22 -0
  21. package/dist/src/lib/components/Scripts/components/resource-cms/variable/CreateButton.d.ts +5 -1
  22. package/dist/src/lib/constants/block-types.d.ts +1 -0
  23. package/dist/src/lib/constants/initial-script.d.ts +10 -0
  24. package/dist/src/lib/constants/node-types.d.ts +1 -0
  25. package/dist/src/lib/styles/colors.d.ts +6 -0
  26. package/package.json +4 -1
@@ -0,0 +1,3 @@
1
+ import { BlockAgentProps } from './types';
2
+ declare const BlockAgent: ({ id, data, mini }: BlockAgentProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default BlockAgent;
@@ -0,0 +1,5 @@
1
+ import { AgentCondition } from '../types';
2
+ declare const SortableItem: React.FC<{
3
+ item: AgentCondition;
4
+ }>;
5
+ export default SortableItem;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface DraggableItem {
3
+ id: string;
4
+ content: string;
5
+ }
6
+ export interface DraggableListProps {
7
+ NODE_ID: string;
8
+ }
9
+ declare const DraggableList: React.FC<DraggableListProps>;
10
+ export default DraggableList;
@@ -0,0 +1,9 @@
1
+ import { UniqueIdentifier } from '@dnd-kit/core';
2
+ import { default as React, PropsWithChildren } from 'react';
3
+ type FormListDraggableContainerProps = {
4
+ id: UniqueIdentifier;
5
+ className?: string;
6
+ currentZoom?: number;
7
+ };
8
+ declare const FormListDraggableContainer: React.FC<PropsWithChildren<FormListDraggableContainerProps>>;
9
+ export default FormListDraggableContainer;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type ListConditionContainerProps = {};
3
+ declare const ListConditionContainer: React.FC<ListConditionContainerProps>;
4
+ export default ListConditionContainer;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { default as useDisclosure } from '../../../../hooks/use-disclosure';
3
+ type PromptLibraryModalContainerProps = {
4
+ disclosure: ReturnType<typeof useDisclosure>;
5
+ onSelectPrompt: (promptId: string) => void;
6
+ };
7
+ declare const PromptLibraryModalContainer: React.FC<PromptLibraryModalContainerProps>;
8
+ export default PromptLibraryModalContainer;
@@ -0,0 +1,15 @@
1
+ export declare const sortableItemContainer: string;
2
+ export declare const sortableItemContainerDragging: string;
3
+ export declare const draggableCard: Record<"default" | "dynamic", string>;
4
+ export declare const baseDraggableCard: string;
5
+ export declare const baseDraggableCardColors: Record<"default" | "dynamic", string>;
6
+ export declare const draggableCardDragging: string;
7
+ export declare const cardBody: string;
8
+ export declare const dragButton: string;
9
+ export declare const dragButtonHovered: string;
10
+ export declare const dragIcon: string;
11
+ export declare const itemText: string;
12
+ export declare const handle: string;
13
+ export declare const listCard: string;
14
+ export declare const listCardBody: string;
15
+ export declare const tabLabel: string;
@@ -0,0 +1,20 @@
1
+ export declare const wrapper: string;
2
+ export declare const listenCard: string;
3
+ export declare const listenCardBorder: {
4
+ default: string;
5
+ active: string;
6
+ };
7
+ export declare const listenCardBody: string;
8
+ export declare const listenHeaderLeft: string;
9
+ export declare const listenHeader: string;
10
+ export declare const listenTitle: string;
11
+ export declare const listenContent: string;
12
+ export declare const listenText: string;
13
+ export declare const intentItem: string;
14
+ export declare const modalRenderBase: string;
15
+ export declare const ModalRenderAgentCondition: string;
16
+ export declare const ModalNodeRenderAgentCondition: string;
17
+ export declare const TextAreaInput: string;
18
+ export declare const ButtonAddConditionPosition: string;
19
+ export declare const LabelPromptSetting: string;
20
+ export declare const IconLabel: string;
@@ -0,0 +1,4 @@
1
+ import { default as BlockAgent } from './block';
2
+ import { default as AgentNode } from './node';
3
+ export default AgentNode;
4
+ export { BlockAgent };
@@ -0,0 +1,4 @@
1
+ declare const AgentNodeSettings: ({ id }: {
2
+ id: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default AgentNodeSettings;
@@ -0,0 +1,3 @@
1
+ import { AgentNodeProps } from './types';
2
+ declare const AgentNode: React.FC<AgentNodeProps>;
3
+ export default AgentNode;
@@ -0,0 +1,9 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+ type AddConditionButtonProps = {
3
+ nodeId?: string;
4
+ isOuter?: boolean;
5
+ containerRenderID?: string;
6
+ onToggleModal?: (isOpen: boolean) => void;
7
+ };
8
+ declare const AddConditionButton: React.FC<PropsWithChildren<AddConditionButtonProps>>;
9
+ export default AddConditionButton;
@@ -0,0 +1,6 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+ type AddVariableButtonProps = {
3
+ nodeId?: string;
4
+ };
5
+ declare const AddVariableButton: React.FC<PropsWithChildren<AddVariableButtonProps>>;
6
+ export default AddVariableButton;
@@ -0,0 +1,8 @@
1
+ import { AgentCondition } from '../types';
2
+ interface AgentIntentProps {
3
+ field: any;
4
+ condition: AgentCondition;
5
+ onDelete: (conditionId: string) => void;
6
+ }
7
+ declare const AgentIntent: ({ field, condition, onDelete }: AgentIntentProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default AgentIntent;
@@ -0,0 +1,11 @@
1
+ import { AgentCondition } from '../types';
2
+ type FormAddAgentConditionProps = {
3
+ dataSubmit?: (data: AgentCondition) => void;
4
+ defaultValues?: AgentCondition;
5
+ onFormSubmit?: () => void;
6
+ };
7
+ export type FormAddAgentConditionMethods = {
8
+ onSubmit: () => void;
9
+ };
10
+ declare const FormAddAgentCondition: import('react').ForwardRefExoticComponent<FormAddAgentConditionProps & import('react').RefAttributes<FormAddAgentConditionMethods>>;
11
+ export default FormAddAgentCondition;
@@ -0,0 +1,10 @@
1
+ export declare const collapseRoot: string;
2
+ export declare const label: string;
3
+ export declare const leftGroup: string;
4
+ export declare const conversionTag: string;
5
+ export declare const targetIcon: string;
6
+ export declare const bodyContainer: string;
7
+ export declare const formItem: string;
8
+ export declare const starIcon: string;
9
+ export declare const renameContent: string;
10
+ export declare const actionsRow: string;
@@ -0,0 +1,22 @@
1
+ import { Node, NodeProps } from '@xyflow/react';
2
+ import { BlockTypeProps } from '../../../constants';
3
+ export interface AgentCondition {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ keywords: string[];
8
+ is_conversion: boolean;
9
+ }
10
+ export interface AgentNodeData extends Record<string, unknown> {
11
+ title?: string;
12
+ conditions?: AgentCondition[];
13
+ first_sentence?: string;
14
+ prompt?: string;
15
+ is_global_node: boolean;
16
+ using_knowledge: boolean;
17
+ switch_to_different_global_node: boolean;
18
+ exit_after_each_speech: boolean;
19
+ variables: any[];
20
+ }
21
+ export type BlockAgentProps = BlockTypeProps<AgentNodeData>;
22
+ export type AgentNodeProps = NodeProps<Node<AgentNodeData>>;
@@ -1,4 +1,8 @@
1
1
  import { default as React } from 'react';
2
- type CreateVariableButtonContainerProps = {};
2
+ import { default as useDisclosure } from '../../../../../hooks/use-disclosure';
3
+ type CreateVariableButtonContainerProps = {
4
+ disclosure: ReturnType<typeof useDisclosure>;
5
+ onSuccess?: () => void;
6
+ };
3
7
  declare const CreateVariableButtonContainer: React.FC<CreateVariableButtonContainerProps>;
4
8
  export default CreateVariableButtonContainer;
@@ -1,4 +1,5 @@
1
1
  export declare enum BlockType {
2
+ AGENT = "AGENT",
2
3
  START = "START",
3
4
  SPEAK = "SPEAK",
4
5
  LISTEN = "LISTEN",
@@ -1,6 +1,7 @@
1
1
  import { Node } from '@xyflow/react';
2
2
  import { SPEAK_TYPE, TRANSFER_TYPE } from './block-types';
3
3
  export declare const initialTitles: {
4
+ AGENT: string;
4
5
  SPEAK: string;
5
6
  START: string;
6
7
  LISTEN: string;
@@ -13,6 +14,15 @@ export declare const initialTitles: {
13
14
  AI_AGENT: string;
14
15
  };
15
16
  export declare const initialData: {
17
+ AGENT: {
18
+ conditions: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ keywords: any[];
23
+ is_conversion: boolean;
24
+ }[];
25
+ };
16
26
  START: {};
17
27
  SPEAK: {
18
28
  type: SPEAK_TYPE;
@@ -1,4 +1,5 @@
1
1
  export declare const nodeTypes: {
2
+ AGENT: import('react').FC<import('../components/Blocks/Agent/types').AgentNodeProps>;
2
3
  SPEAK: import('react').FC<import('../components/Blocks/Speak/types').SpeakNodeProps>;
3
4
  START: import('react').FC<import('../components/Blocks/Start/node').StartNodeProps>;
4
5
  LISTEN: import('react').FC<import('../components/Blocks/Listen/types').ListenNodeProps>;
@@ -19,6 +19,12 @@ declare const colors: {
19
19
  text: string;
20
20
  boxShadow: string;
21
21
  };
22
+ agentBlock: {
23
+ focus: string;
24
+ background: string;
25
+ boxShadow: string;
26
+ border: string;
27
+ };
22
28
  listenBlock: {
23
29
  focus: string;
24
30
  indicator: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.13.1",
4
+ "version": "1.14.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"
@@ -35,6 +35,9 @@
35
35
  "biome format --write --no-errors-on-unmatched"
36
36
  ]
37
37
  },
38
+ "publishConfig": {
39
+ "provenance": false
40
+ },
38
41
  "scripts": {
39
42
  "dev": "storybook dev -p 6006",
40
43
  "build": "storybook build",