@midscene/visualizer 0.28.2 → 0.28.3-beta-20250910131004.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.mjs → blackboard/index.mjs} +3 -3
- package/dist/es/component/{playground/ConfigSelector.mjs → config-selector/index.mjs} +2 -3
- package/dist/es/component/{playground/ContextPreview.mjs → context-preview/index.mjs} +3 -4
- package/dist/es/component/{env-config.mjs → env-config/index.mjs} +1 -1
- package/dist/es/component/{github-star.mjs → github-star/index.mjs} +1 -1
- package/dist/es/component/history-selector/index.css +132 -0
- package/dist/es/component/{playground/HistorySelector.mjs → history-selector/index.mjs} +1 -1
- package/dist/es/component/index.mjs +1 -0
- package/dist/es/component/{logo.mjs → logo/index.mjs} +1 -1
- package/dist/es/component/{misc.mjs → misc/index.mjs} +42 -2
- package/dist/es/component/{player.mjs → player/index.mjs} +8 -8
- package/dist/es/component/playground/index.css +35 -161
- package/dist/es/component/playground/index.mjs +8 -0
- package/dist/es/component/playground-result/index.css +35 -0
- package/dist/es/component/{playground/PlaygroundResult.mjs → playground-result/index.mjs} +7 -5
- package/dist/es/component/prompt-input/index.css +330 -0
- package/dist/es/component/{playground/PromptInput.mjs → prompt-input/index.mjs} +9 -9
- package/dist/es/component/{playground/ServiceModeControl.mjs → service-mode-control/index.mjs} +4 -5
- package/dist/es/component/{shiny-text.mjs → shiny-text/index.mjs} +1 -1
- package/dist/es/component/universal-playground/index.css +341 -0
- package/dist/es/component/universal-playground/index.mjs +273 -0
- package/dist/es/component/universal-playground/providers/context-provider.mjs +52 -0
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +107 -0
- package/dist/es/hooks/usePlaygroundExecution.mjs +168 -0
- package/dist/es/hooks/usePlaygroundState.mjs +176 -0
- package/dist/es/icons/avatar.mjs +28 -0
- package/dist/es/index.mjs +22 -18
- package/dist/es/{component/playground/playground-constants.mjs → utils/constants.mjs} +23 -43
- package/dist/es/{component/playground → utils}/playground-utils.mjs +1 -1
- package/dist/es/{component → utils}/replay-scripts.mjs +1 -2
- package/dist/lib/component/{blackboard.js → blackboard/index.js} +5 -5
- package/dist/lib/component/{playground/ConfigSelector.js → config-selector/index.js} +6 -7
- package/dist/lib/component/{playground/ContextPreview.js → context-preview/index.js} +8 -9
- package/dist/lib/component/{env-config.js → env-config/index.js} +1 -1
- package/dist/lib/component/{github-star.js → github-star/index.js} +1 -1
- package/dist/lib/component/history-selector/index.css +132 -0
- package/dist/lib/component/{playground/HistorySelector.js → history-selector/index.js} +1 -1
- package/dist/lib/component/index.js +60 -0
- package/dist/lib/component/{logo.js → logo/index.js} +1 -1
- package/dist/lib/component/{misc.js → misc/index.js} +60 -1
- package/dist/lib/component/{player.js → player/index.js} +23 -23
- package/dist/lib/component/playground/index.css +35 -161
- package/dist/lib/component/playground/index.js +113 -0
- package/dist/lib/component/playground-result/index.css +35 -0
- package/dist/lib/component/{playground/PlaygroundResult.js → playground-result/index.js} +12 -10
- package/dist/lib/component/prompt-input/index.css +330 -0
- package/dist/lib/component/{playground/PromptInput.js → prompt-input/index.js} +37 -37
- package/dist/lib/component/{playground/ServiceModeControl.js → service-mode-control/index.js} +8 -9
- package/dist/lib/component/{shiny-text.js → shiny-text/index.js} +1 -1
- package/dist/lib/component/universal-playground/index.css +341 -0
- package/dist/lib/component/universal-playground/index.js +321 -0
- package/dist/lib/component/universal-playground/providers/context-provider.js +95 -0
- package/dist/lib/component/universal-playground/providers/storage-provider.js +147 -0
- package/dist/lib/hooks/usePlaygroundExecution.js +202 -0
- package/dist/lib/hooks/usePlaygroundState.js +210 -0
- package/dist/lib/icons/avatar.js +62 -0
- package/dist/lib/index.js +66 -34
- package/dist/lib/{component/playground/playground-constants.js → utils/constants.js} +31 -64
- package/dist/lib/{component/playground → utils}/playground-utils.js +1 -1
- package/dist/lib/{component → utils}/replay-scripts.js +3 -4
- package/dist/types/component/{blackboard.d.ts → blackboard/index.d.ts} +2 -2
- package/dist/types/component/{playground/ConfigSelector.d.ts → config-selector/index.d.ts} +0 -1
- package/dist/types/component/{playground/ContextPreview.d.ts → context-preview/index.d.ts} +0 -1
- package/dist/types/component/{github-star.d.ts → github-star/index.d.ts} +1 -1
- package/dist/types/component/{playground/HistorySelector.d.ts → history-selector/index.d.ts} +1 -1
- package/dist/types/component/index.d.ts +1 -0
- package/dist/types/component/{logo.d.ts → logo/index.d.ts} +1 -1
- package/dist/types/component/misc/index.d.ts +6 -0
- package/dist/types/component/{player.d.ts → player/index.d.ts} +2 -2
- package/dist/types/component/playground/index.d.ts +7 -0
- package/dist/types/component/{playground/PlaygroundResult.d.ts → playground-result/index.d.ts} +3 -4
- package/dist/types/component/{playground/PromptInput.d.ts → prompt-input/index.d.ts} +3 -2
- package/dist/types/component/{playground/ServiceModeControl.d.ts → service-mode-control/index.d.ts} +0 -1
- package/dist/types/component/{shiny-text.d.ts → shiny-text/index.d.ts} +1 -1
- package/dist/types/component/universal-playground/index.d.ts +4 -0
- package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
- package/dist/types/component/universal-playground/providers/storage-provider.d.ts +33 -0
- package/dist/types/hooks/usePlaygroundExecution.d.ts +10 -0
- package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
- package/dist/types/index.d.ts +15 -10
- package/dist/types/types.d.ts +164 -0
- package/dist/types/{component/playground/playground-constants.d.ts → utils/constants.d.ts} +3 -5
- package/dist/types/{component → utils}/replay-scripts.d.ts +0 -1
- package/package.json +5 -5
- package/dist/es/blank_polyfill.mjs +0 -2
- package/dist/es/component/describer.css +0 -25
- package/dist/es/component/playground/playground-types.mjs +0 -0
- package/dist/es/init.mjs +0 -10
- package/dist/lib/blank_polyfill.js +0 -36
- package/dist/lib/component/describer.css +0 -25
- package/dist/lib/component/playground/playground-types.js +0 -18
- package/dist/lib/init.js +0 -44
- package/dist/types/blank_polyfill.d.ts +0 -2
- package/dist/types/component/misc.d.ts +0 -2
- package/dist/types/component/playground/playground-types.d.ts +0 -19
- package/dist/types/component/playground/types.d.ts +0 -72
- package/dist/types/init.d.ts +0 -1
- /package/dist/es/component/{blackboard.css → blackboard/index.css} +0 -0
- /package/dist/es/component/{playground/FormField.mjs → form-field/index.mjs} +0 -0
- /package/dist/es/component/{github-star.css → github-star/index.css} +0 -0
- /package/dist/es/component/{logo.css → logo/index.css} +0 -0
- /package/dist/es/component/{player.css → player/index.css} +0 -0
- /package/dist/es/component/{playground-demo-ui-context.json → playground/playground-demo-ui-context.json} +0 -0
- /package/dist/es/component/{shiny-text.css → shiny-text/index.css} +0 -0
- /package/dist/es/{component/playground → hooks}/useServerValid.mjs +0 -0
- /package/dist/es/{component/store → store}/history.mjs +0 -0
- /package/dist/es/{component/store → store}/store.mjs +0 -0
- /package/dist/es/{component/playground/types.mjs → types.mjs} +0 -0
- /package/dist/es/{component → utils}/color.mjs +0 -0
- /package/dist/es/{utils.mjs → utils/index.mjs} +0 -0
- /package/dist/es/{component → utils}/pixi-loader.mjs +0 -0
- /package/dist/lib/component/{blackboard.css → blackboard/index.css} +0 -0
- /package/dist/lib/component/{playground/FormField.js → form-field/index.js} +0 -0
- /package/dist/lib/component/{github-star.css → github-star/index.css} +0 -0
- /package/dist/lib/component/{logo.css → logo/index.css} +0 -0
- /package/dist/lib/component/{player.css → player/index.css} +0 -0
- /package/dist/lib/component/{playground-demo-ui-context.json → playground/playground-demo-ui-context.json} +0 -0
- /package/dist/lib/component/{shiny-text.css → shiny-text/index.css} +0 -0
- /package/dist/lib/{component/playground → hooks}/useServerValid.js +0 -0
- /package/dist/lib/{component/store → store}/history.js +0 -0
- /package/dist/lib/{component/store → store}/store.js +0 -0
- /package/dist/lib/{component/playground/types.js → types.js} +0 -0
- /package/dist/lib/{component → utils}/color.js +0 -0
- /package/dist/lib/{utils.js → utils/index.js} +0 -0
- /package/dist/lib/{component → utils}/pixi-loader.js +0 -0
- /package/dist/types/component/{env-config.d.ts → env-config/index.d.ts} +0 -0
- /package/dist/types/component/{playground/FormField.d.ts → form-field/index.d.ts} +0 -0
- /package/dist/types/{component/playground → hooks}/useServerValid.d.ts +0 -0
- /package/dist/types/{component/store → store}/history.d.ts +0 -0
- /package/dist/types/{component/store → store}/store.d.ts +0 -0
- /package/dist/types/{component → utils}/color.d.ts +0 -0
- /package/dist/types/{utils.d.ts → utils/index.d.ts} +0 -0
- /package/dist/types/{component → utils}/pixi-loader.d.ts +0 -0
- /package/dist/types/{component/playground → utils}/playground-utils.d.ts +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import './component/playground/index.less';
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
2
|
+
import './component/universal-playground/index.less';
|
|
3
|
+
export { type AnimationScript, type ReplayScriptsInfo, allScriptsFromDump, generateAnimationScripts, } from './utils/replay-scripts';
|
|
4
|
+
export { useEnvConfig } from './store/store';
|
|
5
|
+
export { colorForName, highlightColorForType, globalThemeConfig, } from './utils/color';
|
|
5
6
|
export { EnvConfig } from './component/env-config';
|
|
6
7
|
export { Logo } from './component/logo';
|
|
7
8
|
export { iconForStatus, timeCostStrElement } from './component/misc';
|
|
8
|
-
export { useServerValid } from './
|
|
9
|
-
export { PlaygroundResultView } from './component/playground
|
|
10
|
-
export type { PlaygroundResult } from './
|
|
11
|
-
export { ServiceModeControl } from './component/
|
|
12
|
-
export { ContextPreview } from './component/
|
|
13
|
-
export { PromptInput } from './component/
|
|
9
|
+
export { useServerValid } from './hooks/useServerValid';
|
|
10
|
+
export { PlaygroundResultView } from './component/playground-result';
|
|
11
|
+
export type { PlaygroundResult } from './types';
|
|
12
|
+
export { ServiceModeControl } from './component/service-mode-control';
|
|
13
|
+
export { ContextPreview } from './component/context-preview';
|
|
14
|
+
export { PromptInput } from './component/prompt-input';
|
|
14
15
|
export { Player } from './component/player';
|
|
15
16
|
export { Blackboard } from './component/blackboard';
|
|
16
17
|
export { GithubStar } from './component/github-star';
|
|
17
|
-
export { actionNameForType, staticAgentFromContext, getPlaceholderForType, } from './
|
|
18
|
+
export { actionNameForType, staticAgentFromContext, getPlaceholderForType, } from './utils/playground-utils';
|
|
18
19
|
export { timeStr, filterBase64Value } from './utils';
|
|
19
20
|
export { default as ShinyText } from './component/shiny-text';
|
|
21
|
+
export { UniversalPlayground, default as UniversalPlaygroundDefault, } from './component/universal-playground';
|
|
22
|
+
export type { UniversalPlaygroundProps, PlaygroundSDKLike, StorageProvider, ContextProvider, UniversalPlaygroundConfig, PlaygroundBranding, InfoListItem, FormValue, ExecutionOptions, ProgressCallback, } from './types';
|
|
23
|
+
export { LocalStorageProvider, MemoryStorageProvider, NoOpStorageProvider, } from './component/universal-playground/providers/storage-provider';
|
|
24
|
+
export { BaseContextProvider, AgentContextProvider, StaticContextProvider, NoOpContextProvider, } from './component/universal-playground/providers/context-provider';
|
|
@@ -0,0 +1,164 @@
|
|
|
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
|
+
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import './index.less';
|
|
3
|
-
export declare const errorMessageServerNotReady: React.JSX.Element;
|
|
4
|
-
export declare const serverLaunchTip: (notReadyMessage?: React.ReactNode | string) => React.JSX.Element;
|
|
5
|
-
export declare const emptyResultTip: React.JSX.Element;
|
|
1
|
+
import type { InfoListItem, PlaygroundResult } from '../types';
|
|
6
2
|
export declare const trackingTip = "limit popup to current tab";
|
|
7
3
|
export declare const deepThinkTip = "deep think";
|
|
8
4
|
export declare const screenshotIncludedTip = "include screenshot in request";
|
|
@@ -74,3 +70,5 @@ export declare const apiMetadata: {
|
|
|
74
70
|
};
|
|
75
71
|
};
|
|
76
72
|
export declare const defaultMainButtons: string[];
|
|
73
|
+
export declare const WELCOME_MESSAGE_TEMPLATE: Omit<InfoListItem, 'id' | 'timestamp'>;
|
|
74
|
+
export declare const BLANK_RESULT: PlaygroundResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/visualizer",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3-beta-20250910131004.0",
|
|
4
4
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
5
5
|
"homepage": "https://midscenejs.com/",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"antd": "^5.21.6",
|
|
71
71
|
"buffer": "6.0.3",
|
|
72
72
|
"dayjs": "^1.11.11",
|
|
73
|
-
"@midscene/core": "0.28.
|
|
74
|
-
"@midscene/playground": "0.28.
|
|
75
|
-
"@midscene/shared": "0.28.
|
|
76
|
-
"@midscene/web": "0.28.
|
|
73
|
+
"@midscene/core": "0.28.3-beta-20250910131004.0",
|
|
74
|
+
"@midscene/playground": "0.28.3-beta-20250910131004.0",
|
|
75
|
+
"@midscene/shared": "0.28.3-beta-20250910131004.0",
|
|
76
|
+
"@midscene/web": "0.28.3-beta-20250910131004.0"
|
|
77
77
|
},
|
|
78
78
|
"license": "MIT",
|
|
79
79
|
"scripts": {
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.image-describer {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.image-describer .describe-text {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
color: #fff;
|
|
8
|
-
background: #000;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 30px;
|
|
11
|
-
padding: 10px;
|
|
12
|
-
font-size: 12px;
|
|
13
|
-
position: absolute;
|
|
14
|
-
bottom: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.image-describer .describe-text.success {
|
|
19
|
-
background: #047704;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.image-describer .describe-text.error {
|
|
23
|
-
background: #870707;
|
|
24
|
-
}
|
|
25
|
-
|
|
File without changes
|
package/dist/es/init.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: definition[key]
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
})();
|
|
11
|
-
(()=>{
|
|
12
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
-
})();
|
|
14
|
-
(()=>{
|
|
15
|
-
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
-
value: 'Module'
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
var __webpack_exports__ = {};
|
|
25
|
-
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
AsyncLocalStorage: ()=>AsyncLocalStorage
|
|
28
|
-
});
|
|
29
|
-
const AsyncLocalStorage = {};
|
|
30
|
-
exports.AsyncLocalStorage = __webpack_exports__.AsyncLocalStorage;
|
|
31
|
-
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
32
|
-
"AsyncLocalStorage"
|
|
33
|
-
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
34
|
-
Object.defineProperty(exports, '__esModule', {
|
|
35
|
-
value: true
|
|
36
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.image-describer {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.image-describer .describe-text {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
color: #fff;
|
|
8
|
-
background: #000;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 30px;
|
|
11
|
-
padding: 10px;
|
|
12
|
-
font-size: 12px;
|
|
13
|
-
position: absolute;
|
|
14
|
-
bottom: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.image-describer .describe-text.success {
|
|
19
|
-
background: #047704;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.image-describer .describe-text.error {
|
|
23
|
-
background: #870707;
|
|
24
|
-
}
|
|
25
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.r = (exports1)=>{
|
|
5
|
-
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
-
value: 'Module'
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
-
value: true
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
})();
|
|
13
|
-
var __webpack_exports__ = {};
|
|
14
|
-
__webpack_require__.r(__webpack_exports__);
|
|
15
|
-
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
16
|
-
Object.defineProperty(exports, '__esModule', {
|
|
17
|
-
value: true
|
|
18
|
-
});
|
package/dist/lib/init.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: definition[key]
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
})();
|
|
11
|
-
(()=>{
|
|
12
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
-
})();
|
|
14
|
-
(()=>{
|
|
15
|
-
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
-
value: 'Module'
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
var __webpack_exports__ = {};
|
|
25
|
-
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
setSideEffect: ()=>setSideEffect
|
|
28
|
-
});
|
|
29
|
-
const external_buffer_namespaceObject = require("buffer");
|
|
30
|
-
var _window;
|
|
31
|
-
(_window = window).global || (_window.global = window);
|
|
32
|
-
window.Buffer = external_buffer_namespaceObject.Buffer;
|
|
33
|
-
let sideEffect = 0;
|
|
34
|
-
const setSideEffect = ()=>{
|
|
35
|
-
sideEffect++;
|
|
36
|
-
return sideEffect;
|
|
37
|
-
};
|
|
38
|
-
exports.setSideEffect = __webpack_exports__.setSideEffect;
|
|
39
|
-
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
40
|
-
"setSideEffect"
|
|
41
|
-
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
42
|
-
Object.defineProperty(exports, '__esModule', {
|
|
43
|
-
value: true
|
|
44
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { GroupedActionDump, WebUIContext } from '@midscene/core';
|
|
2
|
-
import type { PlaygroundAgent } from '@midscene/playground';
|
|
3
|
-
export interface PlaygroundResult {
|
|
4
|
-
result: any;
|
|
5
|
-
dump?: GroupedActionDump | null;
|
|
6
|
-
reportHTML?: string | null;
|
|
7
|
-
error: string | null;
|
|
8
|
-
}
|
|
9
|
-
export interface PlaygroundProps {
|
|
10
|
-
getAgent: (forceSameTabNavigation?: boolean) => PlaygroundAgent | null;
|
|
11
|
-
hideLogo?: boolean;
|
|
12
|
-
showContextPreview?: boolean;
|
|
13
|
-
dryMode?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface StaticPlaygroundProps {
|
|
16
|
-
context: WebUIContext | null;
|
|
17
|
-
}
|
|
18
|
-
export type ServiceModeType = 'Server' | 'In-Browser' | 'In-Browser-Extension';
|
|
19
|
-
export type RunType = 'aiAction' | 'aiQuery' | 'aiAssert' | 'aiTap' | 'aiDoubleClick' | 'aiHover' | 'aiInput' | 'aiRightClick' | 'aiKeyboardPress' | 'aiScroll' | 'aiLocate' | 'aiBoolean' | 'aiNumber' | 'aiString' | 'aiAsk' | 'aiWaitFor';
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { DeviceAction } from '@midscene/core';
|
|
2
|
-
export interface ZodType {
|
|
3
|
-
_def?: {
|
|
4
|
-
typeName: 'ZodOptional' | 'ZodDefault' | 'ZodNullable' | 'ZodObject' | 'ZodEnum' | 'ZodNumber' | 'ZodString' | 'ZodBoolean';
|
|
5
|
-
innerType?: ZodType;
|
|
6
|
-
defaultValue?: () => unknown;
|
|
7
|
-
shape?: () => Record<string, ZodType>;
|
|
8
|
-
values?: string[];
|
|
9
|
-
description?: string;
|
|
10
|
-
};
|
|
11
|
-
description?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ZodObjectSchema extends ZodType {
|
|
14
|
-
shape: Record<string, ZodType>;
|
|
15
|
-
parse: (data: unknown) => unknown;
|
|
16
|
-
}
|
|
17
|
-
export interface ZodEnumSchema extends ZodType {
|
|
18
|
-
_def: {
|
|
19
|
-
typeName: 'ZodEnum';
|
|
20
|
-
values: string[];
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export interface ZodNumberSchema extends ZodType {
|
|
24
|
-
_def: {
|
|
25
|
-
typeName: 'ZodNumber';
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export interface ZodBooleanSchema extends ZodType {
|
|
29
|
-
_def: {
|
|
30
|
-
typeName: 'ZodBoolean';
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export interface ZodRuntimeAccess extends ZodType {
|
|
34
|
-
shape?: Record<string, ZodType>;
|
|
35
|
-
description?: string;
|
|
36
|
-
typeName?: string;
|
|
37
|
-
type?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface ActionSpaceItem extends Omit<DeviceAction<any>, 'paramSchema'> {
|
|
40
|
-
paramSchema?: ZodObjectSchema;
|
|
41
|
-
}
|
|
42
|
-
export interface FormParams {
|
|
43
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
44
|
-
}
|
|
45
|
-
export declare const VALIDATION_CONSTANTS: {
|
|
46
|
-
readonly ZOD_TYPES: {
|
|
47
|
-
readonly OPTIONAL: "ZodOptional";
|
|
48
|
-
readonly DEFAULT: "ZodDefault";
|
|
49
|
-
readonly NULLABLE: "ZodNullable";
|
|
50
|
-
readonly OBJECT: "ZodObject";
|
|
51
|
-
readonly ENUM: "ZodEnum";
|
|
52
|
-
readonly NUMBER: "ZodNumber";
|
|
53
|
-
readonly STRING: "ZodString";
|
|
54
|
-
readonly BOOLEAN: "ZodBoolean";
|
|
55
|
-
};
|
|
56
|
-
readonly FIELD_FLAGS: {
|
|
57
|
-
readonly LOCATION: "midscene_location_field_flag";
|
|
58
|
-
};
|
|
59
|
-
readonly DEFAULT_VALUES: {
|
|
60
|
-
readonly ACTION_TYPE: "aiAction";
|
|
61
|
-
readonly TIMEOUT_MS: 15000;
|
|
62
|
-
readonly CHECK_INTERVAL_MS: 3000;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
export declare const isZodObjectSchema: (schema: unknown) => schema is ZodObjectSchema;
|
|
66
|
-
export declare const isLocateField: (field: ZodType) => boolean;
|
|
67
|
-
export declare const unwrapZodType: (field: ZodType) => {
|
|
68
|
-
actualField: ZodType;
|
|
69
|
-
isOptional: boolean;
|
|
70
|
-
hasDefault: boolean;
|
|
71
|
-
};
|
|
72
|
-
export declare const extractDefaultValue: (field: ZodType) => unknown;
|
package/dist/types/init.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const setSideEffect: () => number;
|
|
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
|
|
File without changes
|
|
File without changes
|