@midscene/visualizer 0.28.2-beta-20250909133629.0 → 0.28.2-beta-20250910021445.0
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/es/component/{blackboard/index.mjs → blackboard.mjs} +3 -3
- package/dist/es/component/describer.css +25 -0
- package/dist/es/component/{env-config/index.mjs → env-config.mjs} +1 -1
- package/dist/es/component/{github-star/index.mjs → github-star.mjs} +1 -1
- package/dist/es/component/{logo/index.mjs → logo.mjs} +1 -1
- package/dist/es/component/{misc/index.mjs → misc.mjs} +2 -42
- package/dist/es/component/{player/index.mjs → player.mjs} +8 -8
- package/dist/es/component/{config-selector/index.mjs → playground/ConfigSelector.mjs} +3 -2
- package/dist/es/component/{context-preview/index.mjs → playground/ContextPreview.mjs} +4 -3
- package/dist/es/component/{history-selector/index.mjs → playground/HistorySelector.mjs} +1 -1
- package/dist/es/component/{playground-result/index.mjs → playground/PlaygroundResult.mjs} +4 -3
- package/dist/es/component/{prompt-input/index.mjs → playground/PromptInput.mjs} +9 -9
- package/dist/es/component/{service-mode-control/index.mjs → playground/ServiceModeControl.mjs} +5 -4
- package/dist/es/component/playground/index.css +161 -29
- package/dist/es/{utils/constants.mjs → component/playground/playground-constants.mjs} +2 -1
- package/dist/es/component/playground/playground-types.mjs +0 -0
- package/dist/es/{utils → component/playground}/playground-utils.mjs +1 -1
- package/dist/es/{types.mjs → component/playground/types.mjs} +1 -23
- package/dist/es/{utils → component}/replay-scripts.mjs +2 -1
- package/dist/es/component/{shiny-text/index.mjs → shiny-text.mjs} +1 -1
- package/dist/es/index.mjs +18 -22
- package/dist/es/init.mjs +10 -0
- package/dist/lib/component/{blackboard/index.js → blackboard.js} +5 -5
- package/dist/lib/component/describer.css +25 -0
- package/dist/lib/component/{env-config/index.js → env-config.js} +1 -1
- package/dist/lib/component/{github-star/index.js → github-star.js} +1 -1
- package/dist/lib/component/{logo/index.js → logo.js} +1 -1
- package/dist/lib/component/{misc/index.js → misc.js} +1 -60
- package/dist/lib/component/{player/index.js → player.js} +23 -23
- package/dist/lib/component/{config-selector/index.js → playground/ConfigSelector.js} +7 -6
- package/dist/lib/component/{context-preview/index.js → playground/ContextPreview.js} +9 -8
- package/dist/lib/component/{history-selector/index.js → playground/HistorySelector.js} +1 -1
- package/dist/lib/component/{playground-result/index.js → playground/PlaygroundResult.js} +9 -8
- package/dist/lib/component/{prompt-input/index.js → playground/PromptInput.js} +37 -37
- package/dist/lib/component/{service-mode-control/index.js → playground/ServiceModeControl.js} +9 -8
- package/dist/lib/component/playground/index.css +161 -29
- package/dist/lib/{utils/constants.js → component/playground/playground-constants.js} +4 -3
- package/dist/lib/component/playground/playground-types.js +18 -0
- package/dist/lib/{utils → component/playground}/playground-utils.js +1 -1
- package/dist/lib/{types.js → component/playground/types.js} +0 -28
- package/dist/lib/{utils → component}/replay-scripts.js +4 -3
- package/dist/lib/component/{shiny-text/index.js → shiny-text.js} +1 -1
- package/dist/lib/index.js +34 -66
- package/dist/lib/{icons/avatar.js → init.js} +12 -16
- package/dist/types/component/{blackboard/index.d.ts → blackboard.d.ts} +2 -2
- package/dist/types/component/{github-star/index.d.ts → github-star.d.ts} +1 -1
- package/dist/types/component/{logo/index.d.ts → logo.d.ts} +1 -1
- package/dist/types/component/misc.d.ts +2 -0
- package/dist/types/component/{player/index.d.ts → player.d.ts} +2 -2
- package/dist/types/component/{config-selector/index.d.ts → playground/ConfigSelector.d.ts} +1 -0
- package/dist/types/component/{context-preview/index.d.ts → playground/ContextPreview.d.ts} +1 -0
- package/dist/types/component/{history-selector/index.d.ts → playground/HistorySelector.d.ts} +1 -1
- package/dist/types/component/{playground-result/index.d.ts → playground/PlaygroundResult.d.ts} +4 -3
- package/dist/types/component/{prompt-input/index.d.ts → playground/PromptInput.d.ts} +2 -3
- package/dist/types/component/{service-mode-control/index.d.ts → playground/ServiceModeControl.d.ts} +1 -0
- package/dist/types/{utils/constants.d.ts → component/playground/playground-constants.d.ts} +1 -0
- package/dist/types/component/playground/playground-types.d.ts +19 -0
- package/dist/types/component/playground/types.d.ts +72 -0
- package/dist/types/{utils → component}/replay-scripts.d.ts +1 -0
- package/dist/types/component/{shiny-text/index.d.ts → shiny-text.d.ts} +1 -1
- package/dist/types/index.d.ts +10 -15
- package/dist/types/init.d.ts +1 -0
- package/package.json +5 -10
- package/dist/es/browser.mjs +0 -18
- package/dist/es/component/history-selector/index.css +0 -132
- package/dist/es/component/index.mjs +0 -1
- package/dist/es/component/playground/index.mjs +0 -8
- package/dist/es/component/playground-result/index.css +0 -29
- package/dist/es/component/prompt-input/index.css +0 -330
- package/dist/es/component/universal-playground/index.css +0 -341
- package/dist/es/component/universal-playground/index.mjs +0 -273
- package/dist/es/component/universal-playground/providers/context-provider.mjs +0 -52
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +0 -107
- package/dist/es/hooks/usePlaygroundExecution.mjs +0 -170
- package/dist/es/hooks/usePlaygroundState.mjs +0 -173
- package/dist/es/icons/avatar.mjs +0 -14
- package/dist/lib/browser.js +0 -132
- package/dist/lib/component/history-selector/index.css +0 -132
- package/dist/lib/component/index.js +0 -60
- package/dist/lib/component/playground/index.js +0 -113
- package/dist/lib/component/playground-result/index.css +0 -29
- package/dist/lib/component/prompt-input/index.css +0 -330
- package/dist/lib/component/universal-playground/index.css +0 -341
- package/dist/lib/component/universal-playground/index.js +0 -321
- package/dist/lib/component/universal-playground/providers/context-provider.js +0 -95
- package/dist/lib/component/universal-playground/providers/storage-provider.js +0 -147
- package/dist/lib/hooks/usePlaygroundExecution.js +0 -204
- package/dist/lib/hooks/usePlaygroundState.js +0 -207
- package/dist/types/browser.d.ts +0 -19
- package/dist/types/component/index.d.ts +0 -1
- package/dist/types/component/misc/index.d.ts +0 -6
- package/dist/types/component/playground/index.d.ts +0 -7
- package/dist/types/component/universal-playground/index.d.ts +0 -4
- package/dist/types/component/universal-playground/providers/context-provider.d.ts +0 -37
- package/dist/types/component/universal-playground/providers/storage-provider.d.ts +0 -33
- package/dist/types/hooks/usePlaygroundExecution.d.ts +0 -10
- package/dist/types/hooks/usePlaygroundState.d.ts +0 -26
- package/dist/types/types.d.ts +0 -166
- /package/dist/es/component/{blackboard/index.css → blackboard.css} +0 -0
- /package/dist/es/{utils → component}/color.mjs +0 -0
- /package/dist/es/component/{github-star/index.css → github-star.css} +0 -0
- /package/dist/es/component/{logo/index.css → logo.css} +0 -0
- /package/dist/es/{utils → component}/pixi-loader.mjs +0 -0
- /package/dist/es/component/{player/index.css → player.css} +0 -0
- /package/dist/es/component/{form-field/index.mjs → playground/FormField.mjs} +0 -0
- /package/dist/es/{hooks → component/playground}/useServerValid.mjs +0 -0
- /package/dist/es/component/{playground/playground-demo-ui-context.json → playground-demo-ui-context.json} +0 -0
- /package/dist/es/component/{shiny-text/index.css → shiny-text.css} +0 -0
- /package/dist/es/{store → component/store}/history.mjs +0 -0
- /package/dist/es/{store → component/store}/store.mjs +0 -0
- /package/dist/es/{utils/index.mjs → utils.mjs} +0 -0
- /package/dist/lib/component/{blackboard/index.css → blackboard.css} +0 -0
- /package/dist/lib/{utils → component}/color.js +0 -0
- /package/dist/lib/component/{github-star/index.css → github-star.css} +0 -0
- /package/dist/lib/component/{logo/index.css → logo.css} +0 -0
- /package/dist/lib/{utils → component}/pixi-loader.js +0 -0
- /package/dist/lib/component/{player/index.css → player.css} +0 -0
- /package/dist/lib/component/{form-field/index.js → playground/FormField.js} +0 -0
- /package/dist/lib/{hooks → component/playground}/useServerValid.js +0 -0
- /package/dist/lib/component/{playground/playground-demo-ui-context.json → playground-demo-ui-context.json} +0 -0
- /package/dist/lib/component/{shiny-text/index.css → shiny-text.css} +0 -0
- /package/dist/lib/{store → component/store}/history.js +0 -0
- /package/dist/lib/{store → component/store}/store.js +0 -0
- /package/dist/lib/{utils/index.js → utils.js} +0 -0
- /package/dist/types/{utils → component}/color.d.ts +0 -0
- /package/dist/types/component/{env-config/index.d.ts → env-config.d.ts} +0 -0
- /package/dist/types/{utils → component}/pixi-loader.d.ts +0 -0
- /package/dist/types/component/{form-field/index.d.ts → playground/FormField.d.ts} +0 -0
- /package/dist/types/{utils → component/playground}/playground-utils.d.ts +0 -0
- /package/dist/types/{hooks → component/playground}/useServerValid.d.ts +0 -0
- /package/dist/types/{store → component/store}/history.d.ts +0 -0
- /package/dist/types/{store → component/store}/store.d.ts +0 -0
- /package/dist/types/{utils/index.d.ts → utils.d.ts} +0 -0
package/dist/types/types.d.ts
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import type { DeviceAction, UIContext } from '@midscene/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface ZodType {
|
|
4
|
-
_def?: {
|
|
5
|
-
typeName: 'ZodOptional' | 'ZodDefault' | 'ZodNullable' | 'ZodObject' | 'ZodEnum' | 'ZodNumber' | 'ZodString' | 'ZodBoolean';
|
|
6
|
-
innerType?: ZodType;
|
|
7
|
-
defaultValue?: () => unknown;
|
|
8
|
-
shape?: () => Record<string, ZodType>;
|
|
9
|
-
values?: string[];
|
|
10
|
-
description?: string;
|
|
11
|
-
};
|
|
12
|
-
description?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ZodObjectSchema extends ZodType {
|
|
15
|
-
shape: Record<string, ZodType>;
|
|
16
|
-
parse: (data: unknown) => unknown;
|
|
17
|
-
}
|
|
18
|
-
export interface ZodEnumSchema extends ZodType {
|
|
19
|
-
_def: {
|
|
20
|
-
typeName: 'ZodEnum';
|
|
21
|
-
values: string[];
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export interface ZodNumberSchema extends ZodType {
|
|
25
|
-
_def: {
|
|
26
|
-
typeName: 'ZodNumber';
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export interface ZodBooleanSchema extends ZodType {
|
|
30
|
-
_def: {
|
|
31
|
-
typeName: 'ZodBoolean';
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export interface ZodRuntimeAccess extends ZodType {
|
|
35
|
-
shape?: Record<string, ZodType>;
|
|
36
|
-
description?: string;
|
|
37
|
-
typeName?: string;
|
|
38
|
-
type?: string;
|
|
39
|
-
}
|
|
40
|
-
export interface ActionSpaceItem extends Omit<DeviceAction<any>, 'paramSchema'> {
|
|
41
|
-
paramSchema?: ZodObjectSchema;
|
|
42
|
-
}
|
|
43
|
-
export interface FormParams {
|
|
44
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
45
|
-
}
|
|
46
|
-
export declare const VALIDATION_CONSTANTS: {
|
|
47
|
-
readonly ZOD_TYPES: {
|
|
48
|
-
readonly OPTIONAL: "ZodOptional";
|
|
49
|
-
readonly DEFAULT: "ZodDefault";
|
|
50
|
-
readonly NULLABLE: "ZodNullable";
|
|
51
|
-
readonly OBJECT: "ZodObject";
|
|
52
|
-
readonly ENUM: "ZodEnum";
|
|
53
|
-
readonly NUMBER: "ZodNumber";
|
|
54
|
-
readonly STRING: "ZodString";
|
|
55
|
-
readonly BOOLEAN: "ZodBoolean";
|
|
56
|
-
};
|
|
57
|
-
readonly FIELD_FLAGS: {
|
|
58
|
-
readonly LOCATION: "midscene_location_field_flag";
|
|
59
|
-
};
|
|
60
|
-
readonly DEFAULT_VALUES: {
|
|
61
|
-
readonly ACTION_TYPE: "aiAction";
|
|
62
|
-
readonly TIMEOUT_MS: 15000;
|
|
63
|
-
readonly CHECK_INTERVAL_MS: 3000;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
export declare const isZodObjectSchema: (schema: unknown) => schema is ZodObjectSchema;
|
|
67
|
-
export declare const isLocateField: (field: ZodType) => boolean;
|
|
68
|
-
export declare const unwrapZodType: (field: ZodType) => {
|
|
69
|
-
actualField: ZodType;
|
|
70
|
-
isOptional: boolean;
|
|
71
|
-
hasDefault: boolean;
|
|
72
|
-
};
|
|
73
|
-
export declare const extractDefaultValue: (field: ZodType) => unknown;
|
|
74
|
-
import type { GroupedActionDump, WebUIContext } from '@midscene/core';
|
|
75
|
-
import type { PlaygroundAgent } from '@midscene/playground';
|
|
76
|
-
export interface PlaygroundResult {
|
|
77
|
-
result: any;
|
|
78
|
-
dump?: GroupedActionDump | null;
|
|
79
|
-
reportHTML?: string | null;
|
|
80
|
-
error: string | null;
|
|
81
|
-
}
|
|
82
|
-
export interface PlaygroundProps {
|
|
83
|
-
getAgent: (forceSameTabNavigation?: boolean) => PlaygroundAgent | null;
|
|
84
|
-
hideLogo?: boolean;
|
|
85
|
-
showContextPreview?: boolean;
|
|
86
|
-
dryMode?: boolean;
|
|
87
|
-
}
|
|
88
|
-
export interface StaticPlaygroundProps {
|
|
89
|
-
context: WebUIContext | null;
|
|
90
|
-
}
|
|
91
|
-
export type ServiceModeType = 'Server' | 'In-Browser' | 'In-Browser-Extension';
|
|
92
|
-
export type RunType = 'aiAction' | 'aiQuery' | 'aiAssert' | 'aiTap' | 'aiDoubleClick' | 'aiHover' | 'aiInput' | 'aiRightClick' | 'aiKeyboardPress' | 'aiScroll' | 'aiLocate' | 'aiBoolean' | 'aiNumber' | 'aiString' | 'aiAsk' | 'aiWaitFor';
|
|
93
|
-
export interface ReplayScriptsInfo {
|
|
94
|
-
scripts: any[];
|
|
95
|
-
width?: number;
|
|
96
|
-
height?: number;
|
|
97
|
-
sdkVersion?: string;
|
|
98
|
-
modelBriefs: string[];
|
|
99
|
-
}
|
|
100
|
-
export interface FormValue {
|
|
101
|
-
type: string;
|
|
102
|
-
prompt?: string;
|
|
103
|
-
params?: Record<string, unknown>;
|
|
104
|
-
}
|
|
105
|
-
export interface ExecutionOptions {
|
|
106
|
-
requestId?: string;
|
|
107
|
-
deepThink?: boolean;
|
|
108
|
-
screenshotIncluded?: boolean;
|
|
109
|
-
domIncluded?: boolean;
|
|
110
|
-
context?: string | object;
|
|
111
|
-
}
|
|
112
|
-
export type ProgressCallback = (step: string, status?: 'loading' | 'completed' | 'error') => void;
|
|
113
|
-
export interface PlaygroundSDKLike {
|
|
114
|
-
executeAction(actionType: string, value: FormValue, options: ExecutionOptions): Promise<unknown>;
|
|
115
|
-
getActionSpace(context?: any): Promise<DeviceAction<unknown>[]>;
|
|
116
|
-
onProgressUpdate?: (callback: ProgressCallback) => void;
|
|
117
|
-
cancelExecution?(requestId: string): Promise<void>;
|
|
118
|
-
overrideConfig?(config: any): Promise<void>;
|
|
119
|
-
checkStatus?(): Promise<boolean>;
|
|
120
|
-
}
|
|
121
|
-
export interface StorageProvider {
|
|
122
|
-
saveMessages?(messages: InfoListItem[]): Promise<void>;
|
|
123
|
-
loadMessages?(): Promise<InfoListItem[]>;
|
|
124
|
-
clearMessages?(): Promise<void>;
|
|
125
|
-
saveResult?(id: string, result: InfoListItem): Promise<void>;
|
|
126
|
-
}
|
|
127
|
-
export interface ContextProvider {
|
|
128
|
-
getUIContext?(): Promise<UIContext>;
|
|
129
|
-
refreshContext?(): Promise<UIContext>;
|
|
130
|
-
}
|
|
131
|
-
export interface InfoListItem {
|
|
132
|
-
id: string;
|
|
133
|
-
type: 'user' | 'system' | 'result' | 'progress' | 'separator';
|
|
134
|
-
content: string;
|
|
135
|
-
timestamp: Date;
|
|
136
|
-
result?: PlaygroundResult | null;
|
|
137
|
-
loading?: boolean;
|
|
138
|
-
replayScriptsInfo?: ReplayScriptsInfo | null;
|
|
139
|
-
replayCounter?: number;
|
|
140
|
-
loadingProgressText?: string;
|
|
141
|
-
verticalMode?: boolean;
|
|
142
|
-
}
|
|
143
|
-
export interface UniversalPlaygroundConfig {
|
|
144
|
-
showContextPreview?: boolean;
|
|
145
|
-
enablePersistence?: boolean;
|
|
146
|
-
layout?: 'vertical' | 'horizontal';
|
|
147
|
-
showVersionInfo?: boolean;
|
|
148
|
-
enableScrollToBottom?: boolean;
|
|
149
|
-
}
|
|
150
|
-
export interface PlaygroundBranding {
|
|
151
|
-
title?: string;
|
|
152
|
-
icon?: ComponentType<any>;
|
|
153
|
-
version?: string;
|
|
154
|
-
}
|
|
155
|
-
export interface UniversalPlaygroundProps {
|
|
156
|
-
playgroundSDK: PlaygroundSDKLike;
|
|
157
|
-
storage?: StorageProvider;
|
|
158
|
-
contextProvider?: ContextProvider;
|
|
159
|
-
config?: UniversalPlaygroundConfig;
|
|
160
|
-
branding?: PlaygroundBranding;
|
|
161
|
-
className?: string;
|
|
162
|
-
dryMode?: boolean;
|
|
163
|
-
showContextPreview?: boolean;
|
|
164
|
-
}
|
|
165
|
-
export declare const WELCOME_MESSAGE_TEMPLATE: Omit<InfoListItem, 'id' | 'timestamp'>;
|
|
166
|
-
export declare const BLANK_RESULT: PlaygroundResult;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|