app-v3-scripts-editor 1.2.3 → 1.2.4

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.
@@ -1,9 +1,3 @@
1
- export interface BlockSpeakProps {
2
- message: string;
3
- errorMessage?: {
4
- message: string;
5
- description?: string;
6
- };
7
- }
8
- declare const BlockSpeak: ({ message, errorMessage }: BlockSpeakProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { BlockSpeakProps } from './types';
2
+ declare const BlockSpeak: ({ id, data }: BlockSpeakProps) => import("react/jsx-runtime").JSX.Element;
9
3
  export default BlockSpeak;
@@ -3,11 +3,9 @@ export declare const container: string;
3
3
  export declare const headContainer: string;
4
4
  export declare const icon: string;
5
5
  export declare const text: string;
6
- export declare const editBtn: string;
7
- export declare const editIcon: string;
8
6
  export declare const recordBtn: string;
9
- export declare const deleteBtn: string;
10
7
  export declare const deleteIcon: string;
11
8
  export declare const alertContainer: string;
12
9
  export declare const messageBox: string;
13
10
  export declare const settingsContainer: string;
11
+ export declare const alertGroup: string;
@@ -1 +1,3 @@
1
- export declare const SpeakNodeSettings: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const SpeakNodeSettings: ({ id }: {
2
+ id: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,3 @@
1
- export interface SpeakNodeData {
2
- label: string;
3
- blockType: string;
4
- }
5
- export interface SpeakNodeProps {
6
- data: SpeakNodeData;
7
- }
1
+ import { SpeakNodeProps } from './types';
8
2
  declare const SpeakNode: React.FC<SpeakNodeProps>;
9
3
  export default SpeakNode;
@@ -0,0 +1,26 @@
1
+ import { Node, NodeProps } from '@xyflow/react';
2
+ import { SPEAK_TYPE } from '../../../constants';
3
+ export interface SpeakNodeData extends Record<string, unknown> {
4
+ title: string;
5
+ type: SPEAK_TYPE;
6
+ record?: {
7
+ default_record: string;
8
+ transcript_with_timestamp?: string;
9
+ detect_gender: boolean;
10
+ male_record?: string;
11
+ female_record?: string;
12
+ transcript_original?: string;
13
+ transcript_personalize?: string;
14
+ };
15
+ machine?: {
16
+ content: string;
17
+ };
18
+ prompt?: {
19
+ content: string;
20
+ };
21
+ }
22
+ export interface BlockSpeakProps {
23
+ id: string;
24
+ data: SpeakNodeData;
25
+ }
26
+ export type SpeakNodeProps = NodeProps<Node<SpeakNodeData>>;
@@ -0,0 +1,6 @@
1
+ declare function useAlerts(id: string): {
2
+ infoAlerts: any[];
3
+ errorAlerts: any[];
4
+ hasAlert: boolean;
5
+ };
6
+ export default useAlerts;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface ConfirmDeleteButtonProps {
3
+ id: string;
4
+ deleteBtnColor?: string;
5
+ }
6
+ declare const ConfirmDeleteButton: React.FC<ConfirmDeleteButtonProps>;
7
+ export default ConfirmDeleteButton;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface EditBlockTitleButtonProps {
3
+ id: string;
4
+ color?: string;
5
+ }
6
+ declare const EditBlockTitleButton: React.FC<EditBlockTitleButtonProps>;
7
+ export default EditBlockTitleButton;
@@ -1,4 +1,25 @@
1
- import { BlockType } from './block-types';
1
+ import { BlockType, SPEAK_TYPE } from './block-types';
2
+ export declare const initialTitles: {
3
+ SPEAK: string;
4
+ START: string;
5
+ };
6
+ export declare const initialData: {
7
+ START: {};
8
+ SPEAK: {
9
+ type: SPEAK_TYPE;
10
+ record: {
11
+ default_record: any;
12
+ transcript_with_timestamp: any;
13
+ detect_gender: boolean;
14
+ male_record: any;
15
+ female_record: any;
16
+ transcript_original: any;
17
+ transcript_personalize: any;
18
+ };
19
+ machine: {};
20
+ prompt: {};
21
+ };
22
+ };
2
23
  export declare const initialNodes: {
3
24
  id: string;
4
25
  type: BlockType;
@@ -7,8 +28,7 @@ export declare const initialNodes: {
7
28
  y: number;
8
29
  };
9
30
  data: {
10
- label: string;
11
- blockType: BlockType;
31
+ title: string;
12
32
  };
13
33
  deletable: boolean;
14
34
  }[];
@@ -1,5 +1,5 @@
1
1
  export declare const nodeTypes: {
2
- SPEAK: import('react').FC<import('../components/Blocks/Speak/node').SpeakNodeProps>;
2
+ SPEAK: import('react').FC<import('../components/Blocks/Speak/types').SpeakNodeProps>;
3
3
  START: import('react').FC<import('../components/Blocks/Start/node').StartNodeProps>;
4
4
  };
5
5
  export default nodeTypes;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Hook to get real-time data of a node by ID in React Flow.
3
+ * Usage:
4
+ * const node = useSelectedNode(id);
5
+ */
6
+ export declare function useSelectedNode(id: string): import('@xyflow/react').Node;
7
+ export default useSelectedNode;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Hook to update a node's data by id in React Flow.
3
+ * Usage:
4
+ * const updateNode = useUpdateNode();
5
+ * updateNode(id, newData);
6
+ */
7
+ export declare function useUpdateNode(): (id: any, newData: any) => void;
8
+ export default useUpdateNode;
@@ -1,6 +1,7 @@
1
1
  declare const colors: {
2
2
  common: {
3
3
  red: string;
4
+ white: string;
4
5
  };
5
6
  sidebar: {
6
7
  background: 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.2.3",
4
+ "version": "1.2.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"