@midscene/visualizer 0.28.1-beta-20250909063633.0 → 0.28.2-beta-20250909133629.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.
Files changed (133) hide show
  1. package/dist/es/browser.mjs +18 -0
  2. package/dist/es/component/{blackboard.mjs → blackboard/index.mjs} +3 -3
  3. package/dist/es/component/{playground/ConfigSelector.mjs → config-selector/index.mjs} +2 -3
  4. package/dist/es/component/{playground/ContextPreview.mjs → context-preview/index.mjs} +3 -4
  5. package/dist/es/component/{env-config.mjs → env-config/index.mjs} +1 -1
  6. package/dist/es/component/{github-star.mjs → github-star/index.mjs} +1 -1
  7. package/dist/es/component/history-selector/index.css +132 -0
  8. package/dist/es/component/{playground/HistorySelector.mjs → history-selector/index.mjs} +1 -1
  9. package/dist/es/component/index.mjs +1 -0
  10. package/dist/es/component/{logo.mjs → logo/index.mjs} +1 -1
  11. package/dist/es/component/{misc.mjs → misc/index.mjs} +42 -2
  12. package/dist/es/component/{player.mjs → player/index.mjs} +8 -8
  13. package/dist/es/component/playground/index.css +29 -161
  14. package/dist/es/component/playground/index.mjs +8 -0
  15. package/dist/es/component/playground-result/index.css +29 -0
  16. package/dist/es/component/{playground/PlaygroundResult.mjs → playground-result/index.mjs} +3 -4
  17. package/dist/es/component/prompt-input/index.css +330 -0
  18. package/dist/es/component/{playground/PromptInput.mjs → prompt-input/index.mjs} +9 -9
  19. package/dist/es/component/{playground/ServiceModeControl.mjs → service-mode-control/index.mjs} +4 -5
  20. package/dist/es/component/{shiny-text.mjs → shiny-text/index.mjs} +1 -1
  21. package/dist/es/component/universal-playground/index.css +341 -0
  22. package/dist/es/component/universal-playground/index.mjs +273 -0
  23. package/dist/es/component/universal-playground/providers/context-provider.mjs +52 -0
  24. package/dist/es/component/universal-playground/providers/storage-provider.mjs +107 -0
  25. package/dist/es/hooks/usePlaygroundExecution.mjs +170 -0
  26. package/dist/es/hooks/usePlaygroundState.mjs +173 -0
  27. package/dist/es/icons/avatar.mjs +14 -0
  28. package/dist/es/index.mjs +22 -18
  29. package/dist/es/{component/playground/types.mjs → types.mjs} +23 -1
  30. package/dist/es/{component/playground/playground-constants.mjs → utils/constants.mjs} +1 -2
  31. package/dist/es/{component/playground → utils}/playground-utils.mjs +1 -1
  32. package/dist/es/{component → utils}/replay-scripts.mjs +1 -2
  33. package/dist/lib/browser.js +132 -0
  34. package/dist/lib/component/{blackboard.js → blackboard/index.js} +5 -5
  35. package/dist/lib/component/{playground/ConfigSelector.js → config-selector/index.js} +6 -7
  36. package/dist/lib/component/{playground/ContextPreview.js → context-preview/index.js} +8 -9
  37. package/dist/lib/component/{env-config.js → env-config/index.js} +1 -1
  38. package/dist/lib/component/{github-star.js → github-star/index.js} +1 -1
  39. package/dist/lib/component/history-selector/index.css +132 -0
  40. package/dist/lib/component/{playground/HistorySelector.js → history-selector/index.js} +1 -1
  41. package/dist/lib/component/index.js +60 -0
  42. package/dist/lib/component/{logo.js → logo/index.js} +1 -1
  43. package/dist/lib/component/{misc.js → misc/index.js} +60 -1
  44. package/dist/lib/component/{player.js → player/index.js} +23 -23
  45. package/dist/lib/component/playground/index.css +29 -161
  46. package/dist/lib/component/playground/index.js +113 -0
  47. package/dist/lib/component/playground-result/index.css +29 -0
  48. package/dist/lib/component/{playground/PlaygroundResult.js → playground-result/index.js} +8 -9
  49. package/dist/lib/component/prompt-input/index.css +330 -0
  50. package/dist/lib/component/{playground/PromptInput.js → prompt-input/index.js} +37 -37
  51. package/dist/lib/component/{playground/ServiceModeControl.js → service-mode-control/index.js} +8 -9
  52. package/dist/lib/component/{shiny-text.js → shiny-text/index.js} +1 -1
  53. package/dist/lib/component/universal-playground/index.css +341 -0
  54. package/dist/lib/component/universal-playground/index.js +321 -0
  55. package/dist/lib/component/universal-playground/providers/context-provider.js +95 -0
  56. package/dist/lib/component/universal-playground/providers/storage-provider.js +147 -0
  57. package/dist/lib/hooks/usePlaygroundExecution.js +204 -0
  58. package/dist/lib/hooks/usePlaygroundState.js +207 -0
  59. package/dist/lib/{init.js → icons/avatar.js} +16 -12
  60. package/dist/lib/index.js +66 -34
  61. package/dist/lib/{component/playground/types.js → types.js} +28 -0
  62. package/dist/lib/{component/playground/playground-constants.js → utils/constants.js} +3 -4
  63. package/dist/lib/{component/playground → utils}/playground-utils.js +1 -1
  64. package/dist/lib/{component → utils}/replay-scripts.js +3 -4
  65. package/dist/types/browser.d.ts +19 -0
  66. package/dist/types/component/{blackboard.d.ts → blackboard/index.d.ts} +2 -2
  67. package/dist/types/component/{playground/ConfigSelector.d.ts → config-selector/index.d.ts} +0 -1
  68. package/dist/types/component/{playground/ContextPreview.d.ts → context-preview/index.d.ts} +0 -1
  69. package/dist/types/component/{github-star.d.ts → github-star/index.d.ts} +1 -1
  70. package/dist/types/component/{playground/HistorySelector.d.ts → history-selector/index.d.ts} +1 -1
  71. package/dist/types/component/index.d.ts +1 -0
  72. package/dist/types/component/{logo.d.ts → logo/index.d.ts} +1 -1
  73. package/dist/types/component/misc/index.d.ts +6 -0
  74. package/dist/types/component/{player.d.ts → player/index.d.ts} +2 -2
  75. package/dist/types/component/playground/index.d.ts +7 -0
  76. package/dist/types/component/{playground/PlaygroundResult.d.ts → playground-result/index.d.ts} +3 -4
  77. package/dist/types/component/{playground/PromptInput.d.ts → prompt-input/index.d.ts} +3 -2
  78. package/dist/types/component/{playground/ServiceModeControl.d.ts → service-mode-control/index.d.ts} +0 -1
  79. package/dist/types/component/{shiny-text.d.ts → shiny-text/index.d.ts} +1 -1
  80. package/dist/types/component/universal-playground/index.d.ts +4 -0
  81. package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
  82. package/dist/types/component/universal-playground/providers/storage-provider.d.ts +33 -0
  83. package/dist/types/hooks/usePlaygroundExecution.d.ts +10 -0
  84. package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
  85. package/dist/types/index.d.ts +15 -10
  86. package/dist/types/types.d.ts +166 -0
  87. package/dist/types/{component/playground/playground-constants.d.ts → utils/constants.d.ts} +0 -1
  88. package/dist/types/{component → utils}/replay-scripts.d.ts +0 -1
  89. package/package.json +10 -5
  90. package/dist/es/component/describer.css +0 -25
  91. package/dist/es/component/playground/playground-types.mjs +0 -0
  92. package/dist/es/init.mjs +0 -10
  93. package/dist/lib/component/describer.css +0 -25
  94. package/dist/lib/component/playground/playground-types.js +0 -18
  95. package/dist/types/component/misc.d.ts +0 -2
  96. package/dist/types/component/playground/playground-types.d.ts +0 -19
  97. package/dist/types/component/playground/types.d.ts +0 -72
  98. package/dist/types/init.d.ts +0 -1
  99. /package/dist/es/component/{blackboard.css → blackboard/index.css} +0 -0
  100. /package/dist/es/component/{playground/FormField.mjs → form-field/index.mjs} +0 -0
  101. /package/dist/es/component/{github-star.css → github-star/index.css} +0 -0
  102. /package/dist/es/component/{logo.css → logo/index.css} +0 -0
  103. /package/dist/es/component/{player.css → player/index.css} +0 -0
  104. /package/dist/es/component/{playground-demo-ui-context.json → playground/playground-demo-ui-context.json} +0 -0
  105. /package/dist/es/component/{shiny-text.css → shiny-text/index.css} +0 -0
  106. /package/dist/es/{component/playground → hooks}/useServerValid.mjs +0 -0
  107. /package/dist/es/{component/store → store}/history.mjs +0 -0
  108. /package/dist/es/{component/store → store}/store.mjs +0 -0
  109. /package/dist/es/{component → utils}/color.mjs +0 -0
  110. /package/dist/es/{utils.mjs → utils/index.mjs} +0 -0
  111. /package/dist/es/{component → utils}/pixi-loader.mjs +0 -0
  112. /package/dist/lib/component/{blackboard.css → blackboard/index.css} +0 -0
  113. /package/dist/lib/component/{playground/FormField.js → form-field/index.js} +0 -0
  114. /package/dist/lib/component/{github-star.css → github-star/index.css} +0 -0
  115. /package/dist/lib/component/{logo.css → logo/index.css} +0 -0
  116. /package/dist/lib/component/{player.css → player/index.css} +0 -0
  117. /package/dist/lib/component/{playground-demo-ui-context.json → playground/playground-demo-ui-context.json} +0 -0
  118. /package/dist/lib/component/{shiny-text.css → shiny-text/index.css} +0 -0
  119. /package/dist/lib/{component/playground → hooks}/useServerValid.js +0 -0
  120. /package/dist/lib/{component/store → store}/history.js +0 -0
  121. /package/dist/lib/{component/store → store}/store.js +0 -0
  122. /package/dist/lib/{component → utils}/color.js +0 -0
  123. /package/dist/lib/{utils.js → utils/index.js} +0 -0
  124. /package/dist/lib/{component → utils}/pixi-loader.js +0 -0
  125. /package/dist/types/component/{env-config.d.ts → env-config/index.d.ts} +0 -0
  126. /package/dist/types/component/{playground/FormField.d.ts → form-field/index.d.ts} +0 -0
  127. /package/dist/types/{component/playground → hooks}/useServerValid.d.ts +0 -0
  128. /package/dist/types/{component/store → store}/history.d.ts +0 -0
  129. /package/dist/types/{component/store → store}/store.d.ts +0 -0
  130. /package/dist/types/{component → utils}/color.d.ts +0 -0
  131. /package/dist/types/{utils.d.ts → utils/index.d.ts} +0 -0
  132. /package/dist/types/{component → utils}/pixi-loader.d.ts +0 -0
  133. /package/dist/types/{component/playground → utils}/playground-utils.d.ts +0 -0
@@ -0,0 +1,166 @@
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;
@@ -1,5 +1,4 @@
1
1
  import type React from 'react';
2
- import './index.less';
3
2
  export declare const errorMessageServerNotReady: React.JSX.Element;
4
3
  export declare const serverLaunchTip: (notReadyMessage?: React.ReactNode | string) => React.JSX.Element;
5
4
  export declare const emptyResultTip: React.JSX.Element;
@@ -1,4 +1,3 @@
1
- import './player.less';
2
1
  import type { ExecutionDump, ExecutionTask, GroupedActionDump, LocateResultElement, Rect, UIContext } from '@midscene/core';
3
2
  export interface CameraState {
4
3
  left: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/visualizer",
3
- "version": "0.28.1-beta-20250909063633.0",
3
+ "version": "0.28.2-beta-20250909133629.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",
@@ -11,6 +11,11 @@
11
11
  "types": "./dist/types/index.d.ts",
12
12
  "import": "./dist/es/index.mjs",
13
13
  "require": "./dist/es/index.js"
14
+ },
15
+ "./browser": {
16
+ "types": "./dist/types/browser.d.ts",
17
+ "import": "./dist/es/browser.mjs",
18
+ "require": "./dist/lib/browser.js"
14
19
  }
15
20
  },
16
21
  "files": [
@@ -70,10 +75,10 @@
70
75
  "antd": "^5.21.6",
71
76
  "buffer": "6.0.3",
72
77
  "dayjs": "^1.11.11",
73
- "@midscene/core": "0.28.1-beta-20250909063633.0",
74
- "@midscene/playground": "0.28.1-beta-20250909063633.0",
75
- "@midscene/web": "0.28.1-beta-20250909063633.0",
76
- "@midscene/shared": "0.28.1-beta-20250909063633.0"
78
+ "@midscene/core": "0.28.2-beta-20250909133629.0",
79
+ "@midscene/playground": "0.28.2-beta-20250909133629.0",
80
+ "@midscene/shared": "0.28.2-beta-20250909133629.0",
81
+ "@midscene/web": "0.28.2-beta-20250909133629.0"
77
82
  },
78
83
  "license": "MIT",
79
84
  "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,10 +0,0 @@
1
- import { Buffer } from "buffer";
2
- var _window;
3
- (_window = window).global || (_window.global = window);
4
- window.Buffer = Buffer;
5
- let sideEffect = 0;
6
- const setSideEffect = ()=>{
7
- sideEffect++;
8
- return sideEffect;
9
- };
10
- export { setSideEffect };
@@ -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
- });
@@ -1,2 +0,0 @@
1
- export declare function timeCostStrElement(timeCost?: number): import("react").JSX.Element;
2
- export declare const iconForStatus: (status: string) => import("react").JSX.Element;
@@ -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;
@@ -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