@aixnn/aixautots 0.5.2 → 0.5.3
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/README.md +23 -40
- package/dist/{chunk-MRQ7VJFJ.js → chunk-BSHHYM72.js} +2 -2
- package/dist/{chunk-PUPVZRKZ.js → chunk-IJVNII5N.js} +1 -1
- package/dist/{chunk-EHF2WQUR.js → chunk-O34SNDQB.js} +4 -4
- package/dist/{chunk-GKEPMDXO.js → chunk-OXIM6EYO.js} +1 -1
- package/dist/{chunk-AIUOLJZA.js → chunk-SVK2AY3J.js} +2 -2
- package/dist/{chunk-PCYERBNZ.js → chunk-TATL3HTE.js} +11 -64
- package/dist/{chunk-SUKFJ73W.js → chunk-UINEPEIE.js} +2 -2
- package/dist/{chunk-H7MHGYF3.js → chunk-V4MXFPDX.js} +3 -3
- package/dist/{chunk-6YUAACW6.js → chunk-XNKC6HU3.js} +3 -3
- package/dist/{chunk-536WVCTB.js → chunk-YOT7HZBU.js} +5 -5
- package/dist/core/index.js +4 -4
- package/dist/device-session-W7I3WQXF.js +2 -0
- package/dist/react/index.js +6 -6
- package/dist/ui/billing.js +6 -6
- package/dist/ui/device-create.js +7 -7
- package/dist/ui/device-mirror.js +7 -7
- package/dist/ui/devices.js +9 -9
- package/dist/ui/editor.js +7 -7
- package/dist/ui/index.js +20 -31
- package/dist/ui/inspector.js +6 -6
- package/dist/ui/market.js +6 -6
- package/dist/ui/script-studio.js +7 -7
- package/dist/ui/scripts.js +6 -6
- package/dist/ui/tasks.js +9 -9
- package/package.json +1 -2
- package/styles.css +1 -1
- package/tailwind-preset.cjs +3 -3
- package/dist/ScriptStudio-DaCqOF5H.d.ts +0 -43
- package/dist/agent-runner-V60B0is1.d.ts +0 -57
- package/dist/automation-queue-8HqRJV_K.d.ts +0 -72
- package/dist/config-Bm1hmXhD.d.ts +0 -1380
- package/dist/coords-LPR_MPyp.d.ts +0 -22
- package/dist/core/index.d.ts +0 -135
- package/dist/device-normalize-BaThgnH7.d.ts +0 -43
- package/dist/device-session-KZVGLPOI.js +0 -2
- package/dist/i18n/index.d.ts +0 -30
- package/dist/mirror-session-C_1vFkRV.d.ts +0 -108
- package/dist/nav/index.d.ts +0 -19
- package/dist/react/index.d.ts +0 -487
- package/dist/script-debugger-Cw5jVRoz.d.ts +0 -114
- package/dist/task-agent-runner-eD9-SCJz.d.ts +0 -160
- package/dist/types-C2WXVcam.d.ts +0 -1005
- package/dist/ui/billing.d.ts +0 -48
- package/dist/ui/device-create.d.ts +0 -55
- package/dist/ui/device-mirror.d.ts +0 -42
- package/dist/ui/devices.d.ts +0 -223
- package/dist/ui/editor.d.ts +0 -64
- package/dist/ui/index.d.ts +0 -104
- package/dist/ui/inspector.d.ts +0 -5
- package/dist/ui/market.d.ts +0 -10
- package/dist/ui/mirror.d.ts +0 -52
- package/dist/ui/primitives/index.d.ts +0 -101
- package/dist/ui/script-studio.d.ts +0 -85
- package/dist/ui/scripts.d.ts +0 -18
- package/dist/ui/tasks.d.ts +0 -10
- package/dist/use-script-run-Diay7ibY.d.ts +0 -50
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { ButtonHTMLAttributes, InputHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
4
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
-
import { VariantProps } from 'class-variance-authority';
|
|
6
|
-
|
|
7
|
-
/** Tailwind-aware className combiner (clsx + tailwind-merge). */
|
|
8
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
9
|
-
|
|
10
|
-
declare function Dialog({ open, onClose, title, description, children, maxWidth, }: {
|
|
11
|
-
open: boolean;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
title?: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
maxWidth?: string;
|
|
17
|
-
}): react.JSX.Element;
|
|
18
|
-
|
|
19
|
-
interface DrawerProps {
|
|
20
|
-
open: boolean;
|
|
21
|
-
onClose: () => void;
|
|
22
|
-
title?: React.ReactNode;
|
|
23
|
-
children: React.ReactNode;
|
|
24
|
-
/** 抽屉宽度类名,默认 `max-w-lg`。 */
|
|
25
|
-
widthClass?: string;
|
|
26
|
-
}
|
|
27
|
-
declare function Drawer({ open, onClose, title, children, widthClass }: DrawerProps): react.JSX.Element;
|
|
28
|
-
|
|
29
|
-
type ToastKind = 'success' | 'error' | 'info';
|
|
30
|
-
interface ToastItem {
|
|
31
|
-
id: number;
|
|
32
|
-
kind: ToastKind;
|
|
33
|
-
message: string;
|
|
34
|
-
}
|
|
35
|
-
interface ToastApi {
|
|
36
|
-
success: (message: string) => number;
|
|
37
|
-
error: (message: string) => number;
|
|
38
|
-
info: (message: string) => number;
|
|
39
|
-
}
|
|
40
|
-
/** 在组件内持有 toast 队列。返回 `{ toasts, toast, dismiss }`。 */
|
|
41
|
-
declare function useToast(): {
|
|
42
|
-
toasts: ToastItem[];
|
|
43
|
-
toast: ToastApi;
|
|
44
|
-
dismiss: (id: number) => void;
|
|
45
|
-
};
|
|
46
|
-
/** 固定右上角的 toast 容器;放在组件树根部即可。 */
|
|
47
|
-
declare function ToastViewport({ toasts, onDismiss, }: {
|
|
48
|
-
toasts: ToastItem[];
|
|
49
|
-
onDismiss: (id: number) => void;
|
|
50
|
-
}): react.JSX.Element | null;
|
|
51
|
-
|
|
52
|
-
declare const buttonVariants: (props?: ({
|
|
53
|
-
variant?: "primary" | "secondary" | "destructive" | "ghost" | null | undefined;
|
|
54
|
-
size?: "icon" | "xs" | "sm" | "md" | null | undefined;
|
|
55
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
56
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
57
|
-
}
|
|
58
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
59
|
-
|
|
60
|
-
interface SelectOption {
|
|
61
|
-
value: string;
|
|
62
|
-
label: string;
|
|
63
|
-
}
|
|
64
|
-
interface SelectProps {
|
|
65
|
-
value: string;
|
|
66
|
-
onChange: (value: string) => void;
|
|
67
|
-
options: SelectOption[];
|
|
68
|
-
placeholder?: string;
|
|
69
|
-
className?: string;
|
|
70
|
-
disabled?: boolean;
|
|
71
|
-
}
|
|
72
|
-
declare function Select({ value, onChange, options, placeholder, className, disabled, }: SelectProps): react.JSX.Element;
|
|
73
|
-
|
|
74
|
-
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
75
|
-
icon?: React.ReactNode;
|
|
76
|
-
error?: string;
|
|
77
|
-
}
|
|
78
|
-
declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
|
|
79
|
-
|
|
80
|
-
declare const badgeVariants: (props?: ({
|
|
81
|
-
variant?: "muted" | "success" | "info" | "destructive" | "warning" | null | undefined;
|
|
82
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
83
|
-
interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
84
|
-
}
|
|
85
|
-
declare function Badge({ className, variant, ...props }: BadgeProps): react.JSX.Element;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* 轻量锚定 Popover(无 Radix 依赖)。`trigger` 渲染锚点并拿到 `toggle`;`children`
|
|
89
|
-
* 渲染浮层并拿到 `close`。点外部 / Esc 关闭。
|
|
90
|
-
*/
|
|
91
|
-
declare function Popover({ trigger, children, align, className, }: {
|
|
92
|
-
trigger: (p: {
|
|
93
|
-
open: boolean;
|
|
94
|
-
toggle: () => void;
|
|
95
|
-
}) => ReactNode;
|
|
96
|
-
children: (close: () => void) => ReactNode;
|
|
97
|
-
align?: 'start' | 'end';
|
|
98
|
-
className?: string;
|
|
99
|
-
}): react.JSX.Element;
|
|
100
|
-
|
|
101
|
-
export { Badge, type BadgeProps, Button, type ButtonProps, Dialog, Drawer, type DrawerProps, Input, type InputProps, Popover, Select, type SelectProps, type ToastApi, type ToastItem, type ToastKind, ToastViewport, cn, useToast };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export { b as ScriptStudio, S as ScriptStudioProps, a as ScriptStudioSlotContext } from '../ScriptStudio-DaCqOF5H.js';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { PointerEvent } from 'react';
|
|
4
|
-
import { S as ScriptRunStatus, a as StepEvent, L as LogEntry, b as LogLevel } from '../use-script-run-Diay7ibY.js';
|
|
5
|
-
|
|
6
|
-
type CodeLanguage = 'js' | 'ts';
|
|
7
|
-
interface CodeEditorProps {
|
|
8
|
-
value: string;
|
|
9
|
-
onChange: (v: string) => void;
|
|
10
|
-
height?: string;
|
|
11
|
-
/** 语法高亮模式;默认 ts。 */
|
|
12
|
-
language?: CodeLanguage;
|
|
13
|
-
/** 选区变化回调,回传主选区的选中文本(段落运行用)。 */
|
|
14
|
-
onSelect?: (selectedText: string) => void;
|
|
15
|
-
}
|
|
16
|
-
/** Code view/editor (CodeMirror — bundled, so it works offline in Tauri). */
|
|
17
|
-
declare function CodeEditor({ value, onChange, height, language, onSelect, }: CodeEditorProps): react.JSX.Element;
|
|
18
|
-
|
|
19
|
-
interface ScriptParamEditorProps {
|
|
20
|
-
variables: Record<string, unknown>;
|
|
21
|
-
onChange: (variables: Record<string, unknown>) => void;
|
|
22
|
-
}
|
|
23
|
-
declare function ScriptParamEditor({ variables, onChange }: ScriptParamEditorProps): react.JSX.Element;
|
|
24
|
-
|
|
25
|
-
interface RunPanelProps {
|
|
26
|
-
status: ScriptRunStatus;
|
|
27
|
-
progress: number;
|
|
28
|
-
steps: StepEvent[];
|
|
29
|
-
logs: LogEntry[];
|
|
30
|
-
error: string | null;
|
|
31
|
-
onStart: () => void;
|
|
32
|
-
onStop: () => void;
|
|
33
|
-
onPause: () => void;
|
|
34
|
-
onResume: () => void;
|
|
35
|
-
onClearLogs: () => void;
|
|
36
|
-
canStart: boolean;
|
|
37
|
-
/** Shown when `canStart` is false (e.g. 未选设备 / 新脚本未保存). */
|
|
38
|
-
startHint?: string;
|
|
39
|
-
/** Drag handle for the resizable dock — rendered as the toolbar's top edge. */
|
|
40
|
-
onResizeStart?: (e: PointerEvent) => void;
|
|
41
|
-
}
|
|
42
|
-
declare function RunPanel({ status, progress, steps, logs, error, onStart, onStop, onPause, onResume, onClearLogs, canStart, startHint, onResizeStart, }: RunPanelProps): react.JSX.Element;
|
|
43
|
-
|
|
44
|
-
interface LogConsoleProps {
|
|
45
|
-
logs: LogEntry[];
|
|
46
|
-
/** Levels to show; entries of other levels are hidden. */
|
|
47
|
-
levels: Set<LogLevel>;
|
|
48
|
-
/** Case-insensitive substring filter over message + device. */
|
|
49
|
-
query: string;
|
|
50
|
-
/** Soft-wrap long lines instead of horizontal scroll. */
|
|
51
|
-
wrap: boolean;
|
|
52
|
-
/** Keep the view pinned to the newest line as logs stream in. */
|
|
53
|
-
autoScroll: boolean;
|
|
54
|
-
}
|
|
55
|
-
declare function LogConsole({ logs, levels, query, wrap, autoScroll }: LogConsoleProps): react.JSX.Element;
|
|
56
|
-
|
|
57
|
-
interface TimelineStepProps {
|
|
58
|
-
event: StepEvent;
|
|
59
|
-
isLast?: boolean;
|
|
60
|
-
}
|
|
61
|
-
declare function TimelineStep({ event, isLast }: TimelineStepProps): react.JSX.Element;
|
|
62
|
-
|
|
63
|
-
interface StudioDevice {
|
|
64
|
-
/** Addressing id (active transport's external_id) — passed to fleet/device ops. */
|
|
65
|
-
id: string;
|
|
66
|
-
name: string;
|
|
67
|
-
/** Concrete platform: 'ios' | 'android' | 'macos' | 'windows' | …. */
|
|
68
|
-
platform: string;
|
|
69
|
-
online: boolean;
|
|
70
|
-
}
|
|
71
|
-
interface DeviceSelectProps {
|
|
72
|
-
value: string | null;
|
|
73
|
-
onChange: (id: string | null) => void;
|
|
74
|
-
/** Receives the resolved device list (online-first) so the host can read the
|
|
75
|
-
* selected device's platform without re-fetching. */
|
|
76
|
-
onDevices?: (devices: StudioDevice[]) => void;
|
|
77
|
-
disabled?: boolean;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* 运行设备下拉:列出全部设备(在线优先),选中即经 `onChange` 回传给宿主。
|
|
81
|
-
* 数据走 SDK `useDevices` hook(无 app store 依赖)。
|
|
82
|
-
*/
|
|
83
|
-
declare function DeviceSelect({ value, onChange, onDevices, disabled }: DeviceSelectProps): react.JSX.Element;
|
|
84
|
-
|
|
85
|
-
export { CodeEditor, type CodeEditorProps, type CodeLanguage, DeviceSelect, type DeviceSelectProps, LogConsole, type LogConsoleProps, RunPanel, type RunPanelProps, ScriptParamEditor, type ScriptParamEditorProps, type StudioDevice, TimelineStep, type TimelineStepProps };
|
package/dist/ui/scripts.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { f as ScriptSummary } from '../types-C2WXVcam.js';
|
|
3
|
-
|
|
4
|
-
declare function ScriptsPage(): react.JSX.Element;
|
|
5
|
-
|
|
6
|
-
interface ScriptCardProps {
|
|
7
|
-
script: ScriptSummary;
|
|
8
|
-
onDelete: (id: string) => void;
|
|
9
|
-
onDuplicate: (id: string) => void;
|
|
10
|
-
}
|
|
11
|
-
declare function ScriptCard({ script, onDelete, onDuplicate }: ScriptCardProps): react.JSX.Element;
|
|
12
|
-
|
|
13
|
-
interface CreateTemplateCardProps {
|
|
14
|
-
onClick: () => void;
|
|
15
|
-
}
|
|
16
|
-
declare function CreateTemplateCard({ onClick }: CreateTemplateCardProps): react.JSX.Element;
|
|
17
|
-
|
|
18
|
-
export { CreateTemplateCard, ScriptCard, ScriptsPage };
|
package/dist/ui/tasks.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
interface TasksPageProps {
|
|
4
|
-
/** Render the page header actions (Refresh + New task) into a host slot.
|
|
5
|
-
* When omitted the page renders its own inline action row above the list. */
|
|
6
|
-
renderHeaderActions?: (actions: React.ReactNode) => React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare function TasksPage(_props?: TasksPageProps): react.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { TasksPage, type TasksPageProps };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/** Run lifecycle status (mirrors the frontend runner store). */
|
|
2
|
-
type ScriptRunStatus = 'idle' | 'running' | 'paused' | 'completed' | 'failed';
|
|
3
|
-
/** Severity of a console line — drives the Logcat-style colour + level filter. */
|
|
4
|
-
type LogLevel = 'system' | 'error' | 'warn' | 'info' | 'debug';
|
|
5
|
-
/** One structured console line (colour by level, tag the device, filter/search). */
|
|
6
|
-
interface LogEntry {
|
|
7
|
-
/** ISO timestamp. */
|
|
8
|
-
ts: string;
|
|
9
|
-
level: LogLevel;
|
|
10
|
-
/** Originating device (per-device transitions), if any. */
|
|
11
|
-
device?: string;
|
|
12
|
-
msg: string;
|
|
13
|
-
}
|
|
14
|
-
/** A step/timeline event (kept for API parity with the frontend runner; the
|
|
15
|
-
* fleet backend has no step stream, so this stays empty in practice). */
|
|
16
|
-
interface StepEvent {
|
|
17
|
-
step_index: number;
|
|
18
|
-
step_type: string;
|
|
19
|
-
status: 'pending' | 'running' | 'success' | 'failed';
|
|
20
|
-
description?: string;
|
|
21
|
-
error?: string;
|
|
22
|
-
screenshot?: string;
|
|
23
|
-
timestamp: string;
|
|
24
|
-
}
|
|
25
|
-
interface UseScriptRun {
|
|
26
|
-
runId: string | null;
|
|
27
|
-
status: ScriptRunStatus;
|
|
28
|
-
progress: number;
|
|
29
|
-
steps: StepEvent[];
|
|
30
|
-
logs: LogEntry[];
|
|
31
|
-
error: string | null;
|
|
32
|
-
/** Submit a persisted script (fetched by id) to the selected devices. */
|
|
33
|
-
startRun(scriptId: string, deviceIds: string[]): Promise<void>;
|
|
34
|
-
/** Submit an inline script body (full file or a selected segment). */
|
|
35
|
-
runCode(code: string, language: string, variables: Record<string, unknown>, deviceIds: string[], platform?: string): Promise<void>;
|
|
36
|
-
stopRun(): Promise<void>;
|
|
37
|
-
pauseRun(): Promise<void>;
|
|
38
|
-
resumeRun(): Promise<void>;
|
|
39
|
-
clearLogs(): void;
|
|
40
|
-
reset(): void;
|
|
41
|
-
}
|
|
42
|
-
/** Single-device (or small fleet) script run with a Logcat-style console.
|
|
43
|
-
*
|
|
44
|
-
* Ports the frontend `useRunnerStore` engine into the SDK: it submits a script
|
|
45
|
-
* body via `fleet.start`, polls `fleet.get`, and turns every per-device status
|
|
46
|
-
* TRANSITION (and captured `output`) into a console `LogEntry`. Behaviourally
|
|
47
|
-
* identical to the store's `startWithBody`/`runCode`/`stop`/`pause`/`resume`. */
|
|
48
|
-
declare function useScriptRun(pollMs?: number): UseScriptRun;
|
|
49
|
-
|
|
50
|
-
export { type LogEntry as L, type ScriptRunStatus as S, type UseScriptRun as U, type StepEvent as a, type LogLevel as b, useScriptRun as u };
|