@mochabug/adapt-vue 1.0.0-rc9 → 1.0.1-rc.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/esm/AdaptCap.js +69 -0
- package/dist/esm/index.js +90 -58
- package/dist/types/AdaptCap.d.ts +64 -0
- package/dist/types/index.d.ts +82 -43
- package/package.json +3 -3
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { AdaptCapElement } from "@mochabug/adapt-web";
|
|
2
|
+
import { defineComponent, h, ref, watchEffect, } from "vue";
|
|
3
|
+
// Re-export for direct use
|
|
4
|
+
export { AdaptCapWidget, } from "@mochabug/adapt-web";
|
|
5
|
+
// Ensure custom element is registered
|
|
6
|
+
void AdaptCapElement;
|
|
7
|
+
/**
|
|
8
|
+
* Vue component for Cap.js proof-of-work challenges.
|
|
9
|
+
* Renders `<adapt-cap>` custom element and syncs non-serializable properties via ref.
|
|
10
|
+
*/
|
|
11
|
+
export const AdaptCap = defineComponent({
|
|
12
|
+
name: "AdaptCap",
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
props: {
|
|
15
|
+
automationId: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
client: {
|
|
20
|
+
type: Object,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
workerCount: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: undefined,
|
|
26
|
+
},
|
|
27
|
+
i18n: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: undefined,
|
|
30
|
+
},
|
|
31
|
+
darkMode: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
emits: {
|
|
37
|
+
solve: (_token, _expires) => true,
|
|
38
|
+
error: (_error) => true,
|
|
39
|
+
},
|
|
40
|
+
setup(props, { emit, attrs }) {
|
|
41
|
+
const elementRef = ref(null);
|
|
42
|
+
const syncProperties = () => {
|
|
43
|
+
const el = elementRef.value;
|
|
44
|
+
if (!el)
|
|
45
|
+
return;
|
|
46
|
+
el.client = props.client;
|
|
47
|
+
el.i18n = props.i18n;
|
|
48
|
+
el.onSolveCallback = (token, expires) => {
|
|
49
|
+
emit("solve", token, expires);
|
|
50
|
+
};
|
|
51
|
+
el.onErrorCallback = (error) => {
|
|
52
|
+
emit("error", error);
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
watchEffect(() => {
|
|
56
|
+
syncProperties();
|
|
57
|
+
});
|
|
58
|
+
return () => h("adapt-cap", {
|
|
59
|
+
ref: elementRef,
|
|
60
|
+
"automation-id": props.automationId,
|
|
61
|
+
"dark-mode": props.darkMode ? "" : undefined,
|
|
62
|
+
"worker-count": props.workerCount !== undefined
|
|
63
|
+
? String(props.workerCount)
|
|
64
|
+
: undefined,
|
|
65
|
+
...attrs,
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
export default AdaptCap;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,116 +1,148 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineComponent, h,
|
|
1
|
+
import { AdaptAutomationElement, } from "@mochabug/adapt-web";
|
|
2
|
+
import { defineComponent, h, ref, watchEffect } from "vue";
|
|
3
3
|
// Re-export everything from web
|
|
4
4
|
export * from "@mochabug/adapt-web";
|
|
5
|
+
// Export standalone Cap widget component
|
|
6
|
+
export { AdaptCap } from "./AdaptCap.js";
|
|
7
|
+
// Ensure custom element is registered
|
|
8
|
+
void AdaptAutomationElement;
|
|
5
9
|
/**
|
|
6
10
|
* Vue component for embedding Adapt automations.
|
|
11
|
+
* Renders `<adapt-automation>` custom element and syncs non-serializable properties via ref.
|
|
7
12
|
*/
|
|
8
13
|
export const Adapt = defineComponent({
|
|
9
14
|
name: "Adapt",
|
|
10
15
|
inheritAttrs: false,
|
|
11
16
|
props: {
|
|
12
|
-
/** Automation ID to connect to */
|
|
13
17
|
id: {
|
|
14
18
|
type: String,
|
|
15
19
|
required: true,
|
|
16
20
|
},
|
|
17
|
-
/** Pre-created session token from server-side session creation */
|
|
18
21
|
sessionToken: {
|
|
19
22
|
type: String,
|
|
20
23
|
default: undefined,
|
|
21
24
|
},
|
|
22
|
-
/** Authentication token for starting new sessions */
|
|
23
25
|
authToken: {
|
|
24
26
|
type: String,
|
|
25
27
|
default: undefined,
|
|
26
28
|
},
|
|
27
|
-
/** The transmitter to start from (optional) */
|
|
28
29
|
transmitter: {
|
|
29
30
|
type: String,
|
|
30
31
|
default: undefined,
|
|
31
32
|
},
|
|
32
|
-
/** Initial signals to pass to the transmitter */
|
|
33
33
|
signals: {
|
|
34
34
|
type: Object,
|
|
35
35
|
default: undefined,
|
|
36
36
|
},
|
|
37
|
-
/** Token to inherit an existing session */
|
|
38
37
|
inheritToken: {
|
|
39
38
|
type: String,
|
|
40
39
|
default: undefined,
|
|
41
40
|
},
|
|
42
|
-
/** Auto-parse inherit token from URL */
|
|
43
41
|
inheritFrom: {
|
|
44
42
|
type: Object,
|
|
45
43
|
default: undefined,
|
|
46
44
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
default: "side-by-side",
|
|
45
|
+
forkDisplay: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: undefined,
|
|
51
48
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
default: 50,
|
|
49
|
+
darkMode: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
56
52
|
},
|
|
57
|
-
|
|
58
|
-
dialogBackdropClose: {
|
|
53
|
+
autoResizing: {
|
|
59
54
|
type: Boolean,
|
|
60
55
|
default: false,
|
|
61
56
|
},
|
|
62
|
-
/** Custom CSS class names for internal elements */
|
|
63
57
|
classNames: {
|
|
64
58
|
type: Object,
|
|
65
59
|
default: undefined,
|
|
66
60
|
},
|
|
61
|
+
styles: {
|
|
62
|
+
type: Object,
|
|
63
|
+
default: undefined,
|
|
64
|
+
},
|
|
65
|
+
challengeToken: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: undefined,
|
|
68
|
+
},
|
|
69
|
+
requiresChallenge: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
73
|
+
capWidgetOptions: {
|
|
74
|
+
type: Object,
|
|
75
|
+
default: undefined,
|
|
76
|
+
},
|
|
77
|
+
persist: {
|
|
78
|
+
type: [Boolean, Object],
|
|
79
|
+
default: undefined,
|
|
80
|
+
},
|
|
81
|
+
text: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: undefined,
|
|
84
|
+
},
|
|
67
85
|
},
|
|
68
86
|
emits: {
|
|
69
|
-
/** Emitted when session status changes */
|
|
70
87
|
session: (_status, _fork) => true,
|
|
71
|
-
/** Emitted when automation produces output */
|
|
72
88
|
output: (_output) => true,
|
|
89
|
+
forkActive: (_active) => true,
|
|
73
90
|
},
|
|
74
91
|
setup(props, { emit, attrs }) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
onOutput: (output) => {
|
|
99
|
-
emit("output", output);
|
|
100
|
-
},
|
|
101
|
-
});
|
|
92
|
+
const elementRef = ref(null);
|
|
93
|
+
// Sync non-serializable properties when element is mounted
|
|
94
|
+
const syncProperties = () => {
|
|
95
|
+
const el = elementRef.value;
|
|
96
|
+
if (!el)
|
|
97
|
+
return;
|
|
98
|
+
el.signals = props.signals;
|
|
99
|
+
el.capWidgetOptions = props.capWidgetOptions;
|
|
100
|
+
el.inheritFrom = props.inheritFrom;
|
|
101
|
+
el.classNames = props.classNames;
|
|
102
|
+
el.styles = props.styles;
|
|
103
|
+
el.persistOptions =
|
|
104
|
+
typeof props.persist === "object" ? props.persist : undefined;
|
|
105
|
+
el.text = props.text;
|
|
106
|
+
el.onSessionCallback = (status, fork) => {
|
|
107
|
+
emit("session", status, fork);
|
|
108
|
+
};
|
|
109
|
+
el.onOutputCallback = (output) => {
|
|
110
|
+
emit("output", output);
|
|
111
|
+
};
|
|
112
|
+
el.onForkActiveCallback = (active) => {
|
|
113
|
+
emit("forkActive", active);
|
|
114
|
+
};
|
|
102
115
|
};
|
|
103
|
-
|
|
104
|
-
|
|
116
|
+
watchEffect(() => {
|
|
117
|
+
syncProperties();
|
|
105
118
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
119
|
+
return () => h("adapt-automation", {
|
|
120
|
+
ref: elementRef,
|
|
121
|
+
"automation-id": props.id,
|
|
122
|
+
"session-token": props.sessionToken,
|
|
123
|
+
"auth-token": props.authToken,
|
|
124
|
+
transmitter: props.transmitter,
|
|
125
|
+
"challenge-token": props.challengeToken,
|
|
126
|
+
"requires-challenge": props.requiresChallenge ? "" : undefined,
|
|
127
|
+
"inherit-token": props.inheritToken,
|
|
128
|
+
"fork-display-mode": props.forkDisplay?.mode,
|
|
129
|
+
"side-by-side-split": props.forkDisplay?.mode === "side-by-side" &&
|
|
130
|
+
props.forkDisplay.split !== undefined
|
|
131
|
+
? String(props.forkDisplay.split)
|
|
132
|
+
: undefined,
|
|
133
|
+
"dialog-backdrop-close": props.forkDisplay?.mode === "dialog" &&
|
|
134
|
+
props.forkDisplay.backdropClose !== false
|
|
135
|
+
? ""
|
|
136
|
+
: undefined,
|
|
137
|
+
"dialog-resize-to-content": props.forkDisplay?.mode === "dialog" &&
|
|
138
|
+
props.forkDisplay.resizeToContent !== false
|
|
139
|
+
? ""
|
|
140
|
+
: undefined,
|
|
141
|
+
"dark-mode": props.darkMode ? "" : undefined,
|
|
142
|
+
"auto-resizing": props.autoResizing ? "" : undefined,
|
|
143
|
+
persist: props.persist ? "" : undefined,
|
|
144
|
+
...attrs,
|
|
111
145
|
});
|
|
112
|
-
watch(() => props.id, createClient);
|
|
113
|
-
return () => h("div", { id: containerId, ...attrs });
|
|
114
146
|
},
|
|
115
147
|
});
|
|
116
148
|
export default Adapt;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { AutomationClient } from "@mochabug/adapt-core";
|
|
2
|
+
import { type CapWidgetI18n } from "@mochabug/adapt-web";
|
|
3
|
+
import { type PropType } from "vue";
|
|
4
|
+
export { AdaptCapWidget, type AdaptCapWidgetOptions, } from "@mochabug/adapt-web";
|
|
5
|
+
/**
|
|
6
|
+
* Vue component for Cap.js proof-of-work challenges.
|
|
7
|
+
* Renders `<adapt-cap>` custom element and syncs non-serializable properties via ref.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AdaptCap: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
automationId: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
client: {
|
|
15
|
+
type: PropType<AutomationClient>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
workerCount: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
i18n: {
|
|
23
|
+
type: PropType<CapWidgetI18n>;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
darkMode: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
solve: (_token: string, _expires: Date) => true;
|
|
34
|
+
error: (_error: Error) => true;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
36
|
+
automationId: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
client: {
|
|
41
|
+
type: PropType<AutomationClient>;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
workerCount: {
|
|
45
|
+
type: NumberConstructor;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
i18n: {
|
|
49
|
+
type: PropType<CapWidgetI18n>;
|
|
50
|
+
default: undefined;
|
|
51
|
+
};
|
|
52
|
+
darkMode: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
}>> & Readonly<{
|
|
57
|
+
onSolve?: ((_token: string, _expires: Date) => any) | undefined;
|
|
58
|
+
onError?: ((_error: Error) => any) | undefined;
|
|
59
|
+
}>, {
|
|
60
|
+
workerCount: number;
|
|
61
|
+
i18n: CapWidgetI18n;
|
|
62
|
+
darkMode: boolean;
|
|
63
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
64
|
+
export default AdaptCap;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,43 +1,38 @@
|
|
|
1
|
-
import { type AdaptWebClientOptions, type Output, type SignalValue, type StatusJson } from "@mochabug/adapt-web";
|
|
1
|
+
import { type AdaptWebClientOptions, type ForkDisplay, type Output, type PersistOptions, type SignalValue, type StatusJson, type StatusText } from "@mochabug/adapt-web";
|
|
2
2
|
import { type PropType } from "vue";
|
|
3
3
|
export * from "@mochabug/adapt-web";
|
|
4
|
+
export { AdaptCap } from "./AdaptCap.js";
|
|
4
5
|
/**
|
|
5
6
|
* Vue component for embedding Adapt automations.
|
|
7
|
+
* Renders `<adapt-automation>` custom element and syncs non-serializable properties via ref.
|
|
6
8
|
*/
|
|
7
9
|
export declare const Adapt: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
-
/** Automation ID to connect to */
|
|
9
10
|
id: {
|
|
10
11
|
type: StringConstructor;
|
|
11
12
|
required: true;
|
|
12
13
|
};
|
|
13
|
-
/** Pre-created session token from server-side session creation */
|
|
14
14
|
sessionToken: {
|
|
15
15
|
type: StringConstructor;
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
|
-
/** Authentication token for starting new sessions */
|
|
19
18
|
authToken: {
|
|
20
19
|
type: StringConstructor;
|
|
21
20
|
default: undefined;
|
|
22
21
|
};
|
|
23
|
-
/** The transmitter to start from (optional) */
|
|
24
22
|
transmitter: {
|
|
25
23
|
type: StringConstructor;
|
|
26
24
|
default: undefined;
|
|
27
25
|
};
|
|
28
|
-
/** Initial signals to pass to the transmitter */
|
|
29
26
|
signals: {
|
|
30
27
|
type: PropType<{
|
|
31
28
|
[key: string]: SignalValue;
|
|
32
29
|
}>;
|
|
33
30
|
default: undefined;
|
|
34
31
|
};
|
|
35
|
-
/** Token to inherit an existing session */
|
|
36
32
|
inheritToken: {
|
|
37
33
|
type: StringConstructor;
|
|
38
34
|
default: undefined;
|
|
39
35
|
};
|
|
40
|
-
/** Auto-parse inherit token from URL */
|
|
41
36
|
inheritFrom: {
|
|
42
37
|
type: PropType<{
|
|
43
38
|
hash: string;
|
|
@@ -46,67 +41,79 @@ export declare const Adapt: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
46
41
|
}>;
|
|
47
42
|
default: undefined;
|
|
48
43
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
default: string;
|
|
44
|
+
forkDisplay: {
|
|
45
|
+
type: PropType<ForkDisplay>;
|
|
46
|
+
default: undefined;
|
|
53
47
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
default: number;
|
|
48
|
+
darkMode: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
58
51
|
};
|
|
59
|
-
|
|
60
|
-
dialogBackdropClose: {
|
|
52
|
+
autoResizing: {
|
|
61
53
|
type: BooleanConstructor;
|
|
62
54
|
default: boolean;
|
|
63
55
|
};
|
|
64
|
-
/** Custom CSS class names for internal elements */
|
|
65
56
|
classNames: {
|
|
66
57
|
type: PropType<AdaptWebClientOptions["classNames"]>;
|
|
67
58
|
default: undefined;
|
|
68
59
|
};
|
|
60
|
+
styles: {
|
|
61
|
+
type: PropType<Partial<CSSStyleDeclaration>>;
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
64
|
+
challengeToken: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
requiresChallenge: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
capWidgetOptions: {
|
|
73
|
+
type: PropType<AdaptWebClientOptions["capWidgetOptions"]>;
|
|
74
|
+
default: undefined;
|
|
75
|
+
};
|
|
76
|
+
persist: {
|
|
77
|
+
type: PropType<boolean | PersistOptions>;
|
|
78
|
+
default: undefined;
|
|
79
|
+
};
|
|
80
|
+
text: {
|
|
81
|
+
type: PropType<StatusText>;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
69
84
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
70
85
|
[key: string]: any;
|
|
71
86
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
72
|
-
/** Emitted when session status changes */
|
|
73
87
|
session: (_status: StatusJson, _fork?: string) => true;
|
|
74
|
-
/** Emitted when automation produces output */
|
|
75
88
|
output: (_output: Output) => true;
|
|
89
|
+
forkActive: (_active: boolean) => true;
|
|
76
90
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
77
|
-
/** Automation ID to connect to */
|
|
78
91
|
id: {
|
|
79
92
|
type: StringConstructor;
|
|
80
93
|
required: true;
|
|
81
94
|
};
|
|
82
|
-
/** Pre-created session token from server-side session creation */
|
|
83
95
|
sessionToken: {
|
|
84
96
|
type: StringConstructor;
|
|
85
97
|
default: undefined;
|
|
86
98
|
};
|
|
87
|
-
/** Authentication token for starting new sessions */
|
|
88
99
|
authToken: {
|
|
89
100
|
type: StringConstructor;
|
|
90
101
|
default: undefined;
|
|
91
102
|
};
|
|
92
|
-
/** The transmitter to start from (optional) */
|
|
93
103
|
transmitter: {
|
|
94
104
|
type: StringConstructor;
|
|
95
105
|
default: undefined;
|
|
96
106
|
};
|
|
97
|
-
/** Initial signals to pass to the transmitter */
|
|
98
107
|
signals: {
|
|
99
108
|
type: PropType<{
|
|
100
109
|
[key: string]: SignalValue;
|
|
101
110
|
}>;
|
|
102
111
|
default: undefined;
|
|
103
112
|
};
|
|
104
|
-
/** Token to inherit an existing session */
|
|
105
113
|
inheritToken: {
|
|
106
114
|
type: StringConstructor;
|
|
107
115
|
default: undefined;
|
|
108
116
|
};
|
|
109
|
-
/** Auto-parse inherit token from URL */
|
|
110
117
|
inheritFrom: {
|
|
111
118
|
type: PropType<{
|
|
112
119
|
hash: string;
|
|
@@ -115,30 +122,52 @@ export declare const Adapt: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
115
122
|
}>;
|
|
116
123
|
default: undefined;
|
|
117
124
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
default: string;
|
|
125
|
+
forkDisplay: {
|
|
126
|
+
type: PropType<ForkDisplay>;
|
|
127
|
+
default: undefined;
|
|
122
128
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
default: number;
|
|
129
|
+
darkMode: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
default: boolean;
|
|
127
132
|
};
|
|
128
|
-
|
|
129
|
-
dialogBackdropClose: {
|
|
133
|
+
autoResizing: {
|
|
130
134
|
type: BooleanConstructor;
|
|
131
135
|
default: boolean;
|
|
132
136
|
};
|
|
133
|
-
/** Custom CSS class names for internal elements */
|
|
134
137
|
classNames: {
|
|
135
138
|
type: PropType<AdaptWebClientOptions["classNames"]>;
|
|
136
139
|
default: undefined;
|
|
137
140
|
};
|
|
141
|
+
styles: {
|
|
142
|
+
type: PropType<Partial<CSSStyleDeclaration>>;
|
|
143
|
+
default: undefined;
|
|
144
|
+
};
|
|
145
|
+
challengeToken: {
|
|
146
|
+
type: StringConstructor;
|
|
147
|
+
default: undefined;
|
|
148
|
+
};
|
|
149
|
+
requiresChallenge: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
default: boolean;
|
|
152
|
+
};
|
|
153
|
+
capWidgetOptions: {
|
|
154
|
+
type: PropType<AdaptWebClientOptions["capWidgetOptions"]>;
|
|
155
|
+
default: undefined;
|
|
156
|
+
};
|
|
157
|
+
persist: {
|
|
158
|
+
type: PropType<boolean | PersistOptions>;
|
|
159
|
+
default: undefined;
|
|
160
|
+
};
|
|
161
|
+
text: {
|
|
162
|
+
type: PropType<StatusText>;
|
|
163
|
+
default: undefined;
|
|
164
|
+
};
|
|
138
165
|
}>> & Readonly<{
|
|
139
|
-
onSession?: ((_status: StatusJson, _fork?: string | undefined) => any) | undefined;
|
|
140
166
|
onOutput?: ((_output: Output) => any) | undefined;
|
|
167
|
+
onSession?: ((_status: StatusJson, _fork?: string | undefined) => any) | undefined;
|
|
168
|
+
onForkActive?: ((_active: boolean) => any) | undefined;
|
|
141
169
|
}>, {
|
|
170
|
+
darkMode: boolean;
|
|
142
171
|
classNames: {
|
|
143
172
|
root?: string;
|
|
144
173
|
wrapper?: string;
|
|
@@ -152,7 +181,13 @@ export declare const Adapt: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
152
181
|
dialogClose?: string;
|
|
153
182
|
dragHandle?: string;
|
|
154
183
|
expandButton?: string;
|
|
184
|
+
statusMessage?: string;
|
|
185
|
+
statusCard?: string;
|
|
186
|
+
toolbar?: string;
|
|
187
|
+
toolbarTitle?: string;
|
|
188
|
+
toolbarButton?: string;
|
|
155
189
|
} | undefined;
|
|
190
|
+
capWidgetOptions: import("@mochabug/adapt-web").CapWidgetOptions | undefined;
|
|
156
191
|
sessionToken: string;
|
|
157
192
|
authToken: string;
|
|
158
193
|
transmitter: string;
|
|
@@ -165,8 +200,12 @@ export declare const Adapt: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
165
200
|
} | {
|
|
166
201
|
param: string;
|
|
167
202
|
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
203
|
+
forkDisplay: ForkDisplay;
|
|
204
|
+
autoResizing: boolean;
|
|
205
|
+
styles: Partial<CSSStyleDeclaration>;
|
|
206
|
+
challengeToken: string;
|
|
207
|
+
requiresChallenge: boolean;
|
|
208
|
+
persist: boolean | PersistOptions;
|
|
209
|
+
text: StatusText;
|
|
171
210
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
172
211
|
export default Adapt;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mochabug/adapt-vue",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.1-rc.0",
|
|
4
4
|
"description": "Vue component for Adapt automation platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"typescript": "^5.9.3",
|
|
36
|
-
"vue": "^3.5.
|
|
36
|
+
"vue": "^3.5.29"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@mochabug/adapt-web": "
|
|
39
|
+
"@mochabug/adapt-web": "^1.0.1-rc.0"
|
|
40
40
|
}
|
|
41
41
|
}
|