scordi-extension 1.15.7 → 1.15.9
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/blocks/AiParseDataBlock.d.ts +4 -0
- package/dist/blocks/AiParseDataBlock.d.ts.map +1 -1
- package/dist/blocks/CaptureNetworkBlock.d.ts +75 -0
- package/dist/blocks/CaptureNetworkBlock.d.ts.map +1 -0
- package/dist/blocks/index.d.ts +38 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/sdk/EightGClient.d.ts +3 -0
- package/dist/sdk/EightGClient.d.ts.map +1 -1
- package/dist/sdk/index.cjs +3 -3
- package/dist/sdk/index.js +1595 -1535
- package/dist/src/blocks/AiParseDataBlock.ts.js +16 -6
- package/dist/src/blocks/CaptureNetworkBlock.ts.js +55 -0
- package/dist/src/blocks/ClearValueFormBlock.ts.js +1 -1
- package/dist/src/blocks/DataExtractBlock.ts.js +6 -6
- package/dist/src/blocks/ElementExistsBlock.ts.js +1 -1
- package/dist/src/blocks/EventClickBlock.ts.js +1 -1
- package/dist/src/blocks/FetchApiBlock.ts.js +1 -1
- package/dist/src/blocks/GetAttributeValueBlock.ts.js +1 -1
- package/dist/src/blocks/GetElementDataBlock.ts.js +1 -1
- package/dist/src/blocks/GetTextBlock.ts.js +1 -1
- package/dist/src/blocks/GetValueFormBlock.ts.js +1 -1
- package/dist/src/blocks/KeypressBlock.ts.js +1 -1
- package/dist/src/blocks/NavigateBlock.ts.js +1 -1
- package/dist/src/blocks/SaveAssetsBlock.ts.js +1 -1
- package/dist/src/blocks/ScrollBlock.ts.js +1 -1
- package/dist/src/blocks/SetValueFormBlock.ts.js +1 -1
- package/dist/src/blocks/WaitBlock.ts.js +1 -1
- package/dist/src/blocks/WaitForConditionBlock.ts.js +1 -1
- package/dist/src/blocks/index.ts.js +9 -1
- package/dist/src/blocks/types.ts.js +1 -1
- package/dist/src/content/components/ConfirmationUI.tsx.js +3 -3
- package/dist/src/content/components/ExecutionStatusUI.tsx.js +223 -0
- package/dist/src/content/handler/InternalMessageHandler.ts.js +23 -1
- package/dist/src/content/main.tsx.js +22 -11
- package/dist/src/sdk/types.ts.js +149 -0
- package/dist/src/types/internal-messages.ts.js +9 -0
- package/dist/types/internal-messages.d.ts +27 -2
- package/dist/types/internal-messages.d.ts.map +1 -1
- package/dist/vendor/.vite-deps-chunk-2TUXWMP5.js__v--7cce5f32.js +45 -0
- package/dist/vendor/.vite-deps-chunk-2TUXWMP5.js__v--8598b0e0.js +45 -0
- package/dist/vendor/.vite-deps-chunk-2TUXWMP5.js__v--a79cb78d.js +45 -0
- package/dist/vendor/.vite-deps-chunk-2TUXWMP5.js__v--e1405dc4.js +45 -0
- package/dist/vendor/.vite-deps-chunk-EL3BNLGW.js__v--7cce5f32.js +975 -0
- package/dist/vendor/.vite-deps-chunk-EL3BNLGW.js__v--8598b0e0.js +975 -0
- package/dist/vendor/.vite-deps-chunk-EL3BNLGW.js__v--a79cb78d.js +975 -0
- package/dist/vendor/.vite-deps-chunk-EL3BNLGW.js__v--e1405dc4.js +975 -0
- package/dist/vendor/.vite-deps-chunk-QIBDMRD4.js__v--8598b0e0.js +4158 -0
- package/dist/vendor/.vite-deps-chunk-QIBDMRD4.js__v--a79cb78d.js +4158 -0
- package/dist/vendor/.vite-deps-chunk-UW5CEYRC.js__v--7cce5f32.js +4154 -0
- package/dist/vendor/.vite-deps-chunk-UW5CEYRC.js__v--e1405dc4.js +4154 -0
- package/dist/vendor/.vite-deps-chunk-XHY3JSIG.js__v--7cce5f32.js +280 -0
- package/dist/vendor/.vite-deps-chunk-XHY3JSIG.js__v--8598b0e0.js +280 -0
- package/dist/vendor/.vite-deps-chunk-XHY3JSIG.js__v--a79cb78d.js +280 -0
- package/dist/vendor/.vite-deps-chunk-XHY3JSIG.js__v--e1405dc4.js +280 -0
- package/dist/vendor/.vite-deps-jsonata.js__v--1f855851.js +5761 -0
- package/dist/vendor/.vite-deps-jsonata.js__v--7cce5f32.js +5761 -0
- package/dist/vendor/.vite-deps-jsonata.js__v--8598b0e0.js +5761 -0
- package/dist/vendor/.vite-deps-jsonata.js__v--aa4cf553.js +5761 -0
- package/dist/vendor/.vite-deps-react-dom.js__v--7cce5f32.js +6 -0
- package/dist/vendor/.vite-deps-react-dom.js__v--8598b0e0.js +6 -0
- package/dist/vendor/.vite-deps-react-dom.js__v--87af57af.js +6 -0
- package/dist/vendor/.vite-deps-react-dom.js__v--9967e564.js +6 -0
- package/dist/vendor/.vite-deps-react-dom_client.js__v--05e7db8c.js +18108 -0
- package/dist/vendor/.vite-deps-react-dom_client.js__v--7cce5f32.js +18108 -0
- package/dist/vendor/.vite-deps-react-dom_client.js__v--8598b0e0.js +18108 -0
- package/dist/vendor/.vite-deps-react-dom_client.js__v--f80719e9.js +18108 -0
- package/dist/vendor/.vite-deps-react.js__v--7cce5f32.js +5 -0
- package/dist/vendor/.vite-deps-react.js__v--8598b0e0.js +5 -0
- package/dist/vendor/.vite-deps-react.js__v--87af57af.js +5 -0
- package/dist/vendor/.vite-deps-react.js__v--9967e564.js +5 -0
- package/dist/vendor/.vite-deps-react_jsx-dev-runtime.js__v--7cce5f32.js +281 -0
- package/dist/vendor/.vite-deps-react_jsx-dev-runtime.js__v--8598b0e0.js +281 -0
- package/dist/vendor/.vite-deps-react_jsx-dev-runtime.js__v--87af57af.js +281 -0
- package/dist/vendor/.vite-deps-react_jsx-dev-runtime.js__v--9967e564.js +281 -0
- package/dist/vendor/.vite-deps-zod.js__v--6548a37a.js +222 -0
- package/dist/vendor/.vite-deps-zod.js__v--706a718e.js +219 -0
- package/dist/vendor/.vite-deps-zod.js__v--7cce5f32.js +222 -0
- package/dist/vendor/.vite-deps-zod.js__v--8598b0e0.js +219 -0
- package/dist/vendor/vite-client.js +1 -1
- package/package.json +5 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
|
+
import { CurrencyInfoSchema } from "/src/sdk/types.ts.js";
|
|
2
3
|
const ObjectSchemaDefinitionSchema = z.object({
|
|
3
4
|
type: z.literal("object"),
|
|
4
5
|
shape: z.record(z.string(), z.any())
|
|
@@ -17,7 +18,9 @@ export const AiParseDataBlockSchema = z.object({
|
|
|
17
18
|
schemaDefinition: SchemaDefinitionSchema,
|
|
18
19
|
prompt: z.string().optional(),
|
|
19
20
|
model: z.string().optional(),
|
|
20
|
-
apiKey: z.string().min(1, "
|
|
21
|
+
apiKey: z.string().min(1, "AI API key is required"),
|
|
22
|
+
// 필수
|
|
23
|
+
provider: z.enum(["openai", "anthropic"])
|
|
21
24
|
// 필수
|
|
22
25
|
});
|
|
23
26
|
export function validateAiParseDataBlock(data) {
|
|
@@ -29,8 +32,9 @@ export async function handlerAiParseData(data) {
|
|
|
29
32
|
sourceData,
|
|
30
33
|
schemaDefinition,
|
|
31
34
|
prompt,
|
|
32
|
-
model
|
|
33
|
-
apiKey
|
|
35
|
+
model,
|
|
36
|
+
apiKey,
|
|
37
|
+
provider
|
|
34
38
|
} = data;
|
|
35
39
|
if (sourceData === void 0 || sourceData === null) {
|
|
36
40
|
throw new Error("sourceData is required for ai-parse-data block");
|
|
@@ -45,8 +49,8 @@ export async function handlerAiParseData(data) {
|
|
|
45
49
|
schemaDefinition,
|
|
46
50
|
prompt,
|
|
47
51
|
model,
|
|
48
|
-
apiKey
|
|
49
|
-
|
|
52
|
+
apiKey,
|
|
53
|
+
provider
|
|
50
54
|
}
|
|
51
55
|
});
|
|
52
56
|
if (response.$isError) {
|
|
@@ -97,5 +101,11 @@ export const Schema = {
|
|
|
97
101
|
type: "object",
|
|
98
102
|
shape,
|
|
99
103
|
...options
|
|
104
|
+
}),
|
|
105
|
+
currency: (options) => ({
|
|
106
|
+
type: "currency",
|
|
107
|
+
shape: CurrencyInfoSchema,
|
|
108
|
+
description: options?.description || "Currency information with code, symbol, format, amount, and text",
|
|
109
|
+
optional: options?.optional
|
|
100
110
|
})
|
|
101
111
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
|
+
export const CaptureNetworkBlockSchema = z.object({
|
|
3
|
+
name: z.literal("capture-network"),
|
|
4
|
+
targetUrl: z.string().url(),
|
|
5
|
+
waitForLoadComplete: z.boolean().optional(),
|
|
6
|
+
timeout: z.number().min(0).optional(),
|
|
7
|
+
includeRequestHeaders: z.boolean().optional(),
|
|
8
|
+
includeResponseHeaders: z.boolean().optional(),
|
|
9
|
+
includeResponseBody: z.boolean().optional(),
|
|
10
|
+
urlFilter: z.string().optional(),
|
|
11
|
+
resourceTypes: z.array(z.string()).optional()
|
|
12
|
+
});
|
|
13
|
+
export function validateCaptureNetworkBlock(data) {
|
|
14
|
+
return CaptureNetworkBlockSchema.parse(data);
|
|
15
|
+
}
|
|
16
|
+
export async function handlerCaptureNetwork(data) {
|
|
17
|
+
try {
|
|
18
|
+
console.log("[CaptureNetworkBlock] Capturing network requests for URL:", data.targetUrl);
|
|
19
|
+
const response = await chrome.runtime.sendMessage({
|
|
20
|
+
type: "CDP_CAPTURE_NETWORK",
|
|
21
|
+
data: {
|
|
22
|
+
targetUrl: data.targetUrl,
|
|
23
|
+
waitForLoadComplete: data.waitForLoadComplete ?? true,
|
|
24
|
+
timeout: data.timeout || 3e4,
|
|
25
|
+
includeRequestHeaders: data.includeRequestHeaders ?? false,
|
|
26
|
+
includeResponseHeaders: data.includeResponseHeaders ?? false,
|
|
27
|
+
includeResponseBody: data.includeResponseBody ?? false,
|
|
28
|
+
urlFilter: data.urlFilter,
|
|
29
|
+
resourceTypes: data.resourceTypes
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
if (response.$isError) {
|
|
33
|
+
return {
|
|
34
|
+
hasError: true,
|
|
35
|
+
message: response.message || "Network capture failed",
|
|
36
|
+
data: void 0
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
console.log(
|
|
40
|
+
"[CaptureNetworkBlock] Network capture successful, captured:",
|
|
41
|
+
response.data.summary.totalRequests,
|
|
42
|
+
"requests"
|
|
43
|
+
);
|
|
44
|
+
return {
|
|
45
|
+
data: response.data
|
|
46
|
+
};
|
|
47
|
+
} catch (error) {
|
|
48
|
+
console.error("[CaptureNetworkBlock] Network capture error:", error);
|
|
49
|
+
return {
|
|
50
|
+
hasError: true,
|
|
51
|
+
message: error instanceof Error ? error.message : "Unknown error in network capture",
|
|
52
|
+
data: void 0
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
3
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
4
4
|
export const ClearValueFormsBlockSchema = BaseBlockSchema.extend({
|
|
5
5
|
name: z.literal("clear-value-form"),
|
|
6
6
|
type: z.enum(["text-field", "select", "checkbox"]).optional()
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
2
|
-
import __vite__cjsImport1_jsonata from "/vendor/.vite-deps-jsonata.js__v--
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
|
+
import __vite__cjsImport1_jsonata from "/vendor/.vite-deps-jsonata.js__v--7cce5f32.js"; const jsonata = __vite__cjsImport1_jsonata.__esModule ? __vite__cjsImport1_jsonata.default : __vite__cjsImport1_jsonata;
|
|
3
3
|
export const DataExtractBlockSchema = z.object({
|
|
4
4
|
name: z.literal("data-extract"),
|
|
5
|
-
code: z.string()
|
|
5
|
+
code: z.string(),
|
|
6
|
+
inputData: z.any().optional()
|
|
6
7
|
});
|
|
7
8
|
export function validateDataExtractBlock(data) {
|
|
8
9
|
return DataExtractBlockSchema.parse(data);
|
|
9
10
|
}
|
|
10
|
-
export async function handlerDataExtract(data
|
|
11
|
+
export async function handlerDataExtract(data) {
|
|
11
12
|
try {
|
|
12
13
|
console.log("[DataExtractBlock] Executing JSONata query:", data.code);
|
|
13
|
-
console.log("[DataExtractBlock] Context:", context);
|
|
14
14
|
const expression = jsonata(data.code);
|
|
15
|
-
const result = await expression.evaluate(
|
|
15
|
+
const result = await expression.evaluate(data.inputData);
|
|
16
16
|
console.log("[DataExtractBlock] Data extraction successful");
|
|
17
17
|
return {
|
|
18
18
|
data: result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
3
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
4
4
|
export const ElementExistsBlockSchema = BaseBlockSchema.extend({
|
|
5
5
|
name: z.literal("element-exists")
|
|
6
6
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
3
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
4
4
|
export const EventClickBlockSchema = BaseBlockSchema.extend({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
3
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
4
4
|
export const GetAttributeValueBlockSchema = BaseBlockSchema.extend({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
3
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
4
4
|
import { CSSSelectorGenerator } from "/src/content/elements/utils/CSSSelectorGenerator.ts.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
3
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
4
4
|
export const GetTextBlockSchema = BaseBlockSchema.extend({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
3
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
4
4
|
export const GetValueFormsBlockSchema = BaseBlockSchema.extend({
|
|
5
5
|
name: z.literal("get-value-form"),
|
|
6
6
|
type: z.enum(["text-field", "select", "checkbox"]).optional()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
3
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
4
4
|
export const SaveAssetsBlockSchema = BaseBlockSchema.extend({
|
|
5
5
|
name: z.literal("save-assets")
|
|
6
6
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
3
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
4
4
|
export const ScrollBlockSchema = BaseBlockSchema.extend({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findElement } from "/src/content/elements/index.ts.js";
|
|
2
2
|
import { BaseBlockSchema } from "/src/blocks/types.ts.js";
|
|
3
|
-
import z from "/vendor/.vite-deps-zod.js__v--
|
|
3
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
4
4
|
export const SetValueFormsBlockSchema = BaseBlockSchema.extend({
|
|
5
5
|
name: z.literal("set-value-form"),
|
|
6
6
|
setValue: z.string(),
|
|
@@ -17,6 +17,7 @@ export { ScrollBlockSchema } from "/src/blocks/ScrollBlock.ts.js";
|
|
|
17
17
|
export { AiParseDataBlockSchema } from "/src/blocks/AiParseDataBlock.ts.js";
|
|
18
18
|
export { FetchApiBlockSchema } from "/src/blocks/FetchApiBlock.ts.js";
|
|
19
19
|
export { DataExtractBlockSchema } from "/src/blocks/DataExtractBlock.ts.js";
|
|
20
|
+
export { CaptureNetworkBlockSchema } from "/src/blocks/CaptureNetworkBlock.ts.js";
|
|
20
21
|
import { handlerGetText, validateGetTextBlock } from "/src/blocks/GetTextBlock.ts.js";
|
|
21
22
|
import {
|
|
22
23
|
handlerGetAttributeValue,
|
|
@@ -55,6 +56,7 @@ import { handlerScroll, validateScrollBlock } from "/src/blocks/ScrollBlock.ts.j
|
|
|
55
56
|
import { handlerAiParseData, validateAiParseDataBlock } from "/src/blocks/AiParseDataBlock.ts.js";
|
|
56
57
|
import { handlerFetchApi, validateFetchApiBlock } from "/src/blocks/FetchApiBlock.ts.js";
|
|
57
58
|
import { handlerDataExtract, validateDataExtractBlock } from "/src/blocks/DataExtractBlock.ts.js";
|
|
59
|
+
import { handlerCaptureNetwork, validateCaptureNetworkBlock } from "/src/blocks/CaptureNetworkBlock.ts.js";
|
|
58
60
|
import { GetTextBlockSchema as GetTextBlockSchema2 } from "/src/blocks/GetTextBlock.ts.js";
|
|
59
61
|
import { GetAttributeValueBlockSchema as GetAttributeValueBlockSchema2 } from "/src/blocks/GetAttributeValueBlock.ts.js";
|
|
60
62
|
import { GetValueFormsBlockSchema as GetValueFormsBlockSchema2 } from "/src/blocks/GetValueFormBlock.ts.js";
|
|
@@ -72,6 +74,7 @@ import { ScrollBlockSchema as ScrollBlockSchema2 } from "/src/blocks/ScrollBlock
|
|
|
72
74
|
import { AiParseDataBlockSchema as AiParseDataBlockSchema2 } from "/src/blocks/AiParseDataBlock.ts.js";
|
|
73
75
|
import { FetchApiBlockSchema as FetchApiBlockSchema2 } from "/src/blocks/FetchApiBlock.ts.js";
|
|
74
76
|
import { DataExtractBlockSchema as DataExtractBlockSchema2 } from "/src/blocks/DataExtractBlock.ts.js";
|
|
77
|
+
import { CaptureNetworkBlockSchema as CaptureNetworkBlockSchema2 } from "/src/blocks/CaptureNetworkBlock.ts.js";
|
|
75
78
|
export const AllBlockSchemas = {
|
|
76
79
|
"get-text": GetTextBlockSchema2,
|
|
77
80
|
"attribute-value": GetAttributeValueBlockSchema2,
|
|
@@ -89,7 +92,8 @@ export const AllBlockSchemas = {
|
|
|
89
92
|
"scroll": ScrollBlockSchema2,
|
|
90
93
|
"ai-parse-data": AiParseDataBlockSchema2,
|
|
91
94
|
"fetch-api": FetchApiBlockSchema2,
|
|
92
|
-
"data-extract": DataExtractBlockSchema2
|
|
95
|
+
"data-extract": DataExtractBlockSchema2,
|
|
96
|
+
"capture-network": CaptureNetworkBlockSchema2
|
|
93
97
|
};
|
|
94
98
|
export class BlockHandler {
|
|
95
99
|
// Implementation
|
|
@@ -164,6 +168,10 @@ export class BlockHandler {
|
|
|
164
168
|
const validatedBlock = validateDataExtractBlock(block);
|
|
165
169
|
return await handlerDataExtract(validatedBlock);
|
|
166
170
|
}
|
|
171
|
+
case "capture-network": {
|
|
172
|
+
const validatedBlock = validateCaptureNetworkBlock(block);
|
|
173
|
+
return await handlerCaptureNetwork(validatedBlock);
|
|
174
|
+
}
|
|
167
175
|
default:
|
|
168
176
|
return {
|
|
169
177
|
hasError: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createHotContext as __vite__createHotContext } from "/vendor/vite-client.js";import.meta.hot = __vite__createHotContext("/src/content/components/ConfirmationUI.tsx.js");import __vite__cjsImport0_react_jsxDevRuntime from "/vendor/.vite-deps-react_jsx-dev-runtime.js__v--
|
|
1
|
+
import { createHotContext as __vite__createHotContext } from "/vendor/vite-client.js";import.meta.hot = __vite__createHotContext("/src/content/components/ConfirmationUI.tsx.js");import __vite__cjsImport0_react_jsxDevRuntime from "/vendor/.vite-deps-react_jsx-dev-runtime.js__v--7cce5f32.js"; const jsxDEV = __vite__cjsImport0_react_jsxDevRuntime["jsxDEV"];
|
|
2
2
|
import * as RefreshRuntime from "/vendor/react-refresh.js";
|
|
3
3
|
const inWebWorker = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
|
|
4
4
|
let prevRefreshReg;
|
|
@@ -15,8 +15,8 @@ if (import.meta.hot && !inWebWorker) {
|
|
|
15
15
|
window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;
|
|
16
16
|
}
|
|
17
17
|
var _s = $RefreshSig$(), _s2 = $RefreshSig$();
|
|
18
|
-
import __vite__cjsImport3_react from "/vendor/.vite-deps-react.js__v--
|
|
19
|
-
import __vite__cjsImport4_reactDom from "/vendor/.vite-deps-react-dom.js__v--
|
|
18
|
+
import __vite__cjsImport3_react from "/vendor/.vite-deps-react.js__v--7cce5f32.js"; const useEffect = __vite__cjsImport3_react["useEffect"]; const useState = __vite__cjsImport3_react["useState"];
|
|
19
|
+
import __vite__cjsImport4_reactDom from "/vendor/.vite-deps-react-dom.js__v--7cce5f32.js"; const createPortal = __vite__cjsImport4_reactDom["createPortal"];
|
|
20
20
|
const positionStyles = {
|
|
21
21
|
"top-left": {
|
|
22
22
|
top: "20px",
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { createHotContext as __vite__createHotContext } from "/vendor/vite-client.js";import.meta.hot = __vite__createHotContext("/src/content/components/ExecutionStatusUI.tsx.js");import __vite__cjsImport0_react_jsxDevRuntime from "/vendor/.vite-deps-react_jsx-dev-runtime.js__v--7cce5f32.js"; const Fragment = __vite__cjsImport0_react_jsxDevRuntime["Fragment"]; const jsxDEV = __vite__cjsImport0_react_jsxDevRuntime["jsxDEV"];
|
|
2
|
+
import * as RefreshRuntime from "/vendor/react-refresh.js";
|
|
3
|
+
const inWebWorker = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
|
|
4
|
+
let prevRefreshReg;
|
|
5
|
+
let prevRefreshSig;
|
|
6
|
+
if (import.meta.hot && !inWebWorker) {
|
|
7
|
+
if (!window.$RefreshReg$) {
|
|
8
|
+
throw new Error(
|
|
9
|
+
"@vitejs/plugin-react can't detect preamble. Something is wrong."
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
prevRefreshReg = window.$RefreshReg$;
|
|
13
|
+
prevRefreshSig = window.$RefreshSig$;
|
|
14
|
+
window.$RefreshReg$ = RefreshRuntime.getRefreshReg("/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx");
|
|
15
|
+
window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;
|
|
16
|
+
}
|
|
17
|
+
var _s = $RefreshSig$(), _s2 = $RefreshSig$();
|
|
18
|
+
import __vite__cjsImport3_react from "/vendor/.vite-deps-react.js__v--7cce5f32.js"; const useEffect = __vite__cjsImport3_react["useEffect"]; const useState = __vite__cjsImport3_react["useState"];
|
|
19
|
+
import __vite__cjsImport4_reactDom from "/vendor/.vite-deps-react-dom.js__v--7cce5f32.js"; const createPortal = __vite__cjsImport4_reactDom["createPortal"];
|
|
20
|
+
export function ExecutionStatusUI({ visible, message = "실행 중" }) {
|
|
21
|
+
_s();
|
|
22
|
+
const [isAnimating, setIsAnimating] = useState(false);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (visible) {
|
|
25
|
+
setTimeout(() => setIsAnimating(true), 10);
|
|
26
|
+
} else {
|
|
27
|
+
setIsAnimating(false);
|
|
28
|
+
}
|
|
29
|
+
}, [visible]);
|
|
30
|
+
if (!visible) return null;
|
|
31
|
+
const containerStyle = {
|
|
32
|
+
position: "fixed",
|
|
33
|
+
top: "20px",
|
|
34
|
+
left: "20px",
|
|
35
|
+
zIndex: 2147483647,
|
|
36
|
+
backgroundColor: "#ffffff",
|
|
37
|
+
border: "2px solid #818cf8",
|
|
38
|
+
borderRadius: "12px",
|
|
39
|
+
padding: "16px 20px",
|
|
40
|
+
boxShadow: "0 10px 25px rgba(0, 0, 0, 0.2)",
|
|
41
|
+
display: "flex",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
gap: "12px",
|
|
44
|
+
minWidth: "200px",
|
|
45
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
46
|
+
transform: isAnimating ? "scale(1)" : "scale(0.9)",
|
|
47
|
+
opacity: isAnimating ? 1 : 0,
|
|
48
|
+
transition: "transform 0.2s ease-out, opacity 0.2s ease-out"
|
|
49
|
+
};
|
|
50
|
+
const catContainerStyle = {
|
|
51
|
+
position: "relative",
|
|
52
|
+
width: "40px",
|
|
53
|
+
height: "30px",
|
|
54
|
+
overflow: "hidden"
|
|
55
|
+
};
|
|
56
|
+
const catStyle = {
|
|
57
|
+
fontSize: "24px",
|
|
58
|
+
animation: "walkCat 2s ease-in-out infinite"
|
|
59
|
+
};
|
|
60
|
+
const messageStyle = {
|
|
61
|
+
margin: 0,
|
|
62
|
+
fontSize: "14px",
|
|
63
|
+
fontWeight: 600,
|
|
64
|
+
color: "#1f2937",
|
|
65
|
+
display: "flex",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
gap: "4px"
|
|
68
|
+
};
|
|
69
|
+
const dotsStyle = {
|
|
70
|
+
display: "inline-block",
|
|
71
|
+
width: "20px"
|
|
72
|
+
};
|
|
73
|
+
return createPortal(
|
|
74
|
+
/* @__PURE__ */ jsxDEV(Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ jsxDEV("style", { children: `
|
|
76
|
+
@keyframes walkCat {
|
|
77
|
+
0%, 100% {
|
|
78
|
+
transform: translateX(0px);
|
|
79
|
+
}
|
|
80
|
+
50% {
|
|
81
|
+
transform: translateX(10px);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes dotBlink {
|
|
86
|
+
0%, 20% {
|
|
87
|
+
opacity: 0;
|
|
88
|
+
}
|
|
89
|
+
40% {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
}
|
|
92
|
+
100% {
|
|
93
|
+
opacity: 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.dot-1 {
|
|
98
|
+
animation: dotBlink 1.5s infinite;
|
|
99
|
+
animation-delay: 0s;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.dot-2 {
|
|
103
|
+
animation: dotBlink 1.5s infinite;
|
|
104
|
+
animation-delay: 0.3s;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.dot-3 {
|
|
108
|
+
animation: dotBlink 1.5s infinite;
|
|
109
|
+
animation-delay: 0.6s;
|
|
110
|
+
}
|
|
111
|
+
` }, void 0, false, {
|
|
112
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
113
|
+
lineNumber: 94,
|
|
114
|
+
columnNumber: 7
|
|
115
|
+
}, this),
|
|
116
|
+
/* @__PURE__ */ jsxDEV("div", { style: containerStyle, onClick: (e) => e.stopPropagation(), children: [
|
|
117
|
+
/* @__PURE__ */ jsxDEV("div", { style: catContainerStyle, children: /* @__PURE__ */ jsxDEV("span", { style: catStyle, children: "🐱" }, void 0, false, {
|
|
118
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
119
|
+
lineNumber: 135,
|
|
120
|
+
columnNumber: 11
|
|
121
|
+
}, this) }, void 0, false, {
|
|
122
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
123
|
+
lineNumber: 134,
|
|
124
|
+
columnNumber: 9
|
|
125
|
+
}, this),
|
|
126
|
+
/* @__PURE__ */ jsxDEV("p", { style: messageStyle, children: [
|
|
127
|
+
message,
|
|
128
|
+
/* @__PURE__ */ jsxDEV("span", { style: dotsStyle, children: [
|
|
129
|
+
/* @__PURE__ */ jsxDEV("span", { className: "dot-1", children: "." }, void 0, false, {
|
|
130
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
131
|
+
lineNumber: 140,
|
|
132
|
+
columnNumber: 13
|
|
133
|
+
}, this),
|
|
134
|
+
/* @__PURE__ */ jsxDEV("span", { className: "dot-2", children: "." }, void 0, false, {
|
|
135
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
136
|
+
lineNumber: 141,
|
|
137
|
+
columnNumber: 13
|
|
138
|
+
}, this),
|
|
139
|
+
/* @__PURE__ */ jsxDEV("span", { className: "dot-3", children: "." }, void 0, false, {
|
|
140
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
141
|
+
lineNumber: 142,
|
|
142
|
+
columnNumber: 13
|
|
143
|
+
}, this)
|
|
144
|
+
] }, void 0, true, {
|
|
145
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
146
|
+
lineNumber: 139,
|
|
147
|
+
columnNumber: 11
|
|
148
|
+
}, this)
|
|
149
|
+
] }, void 0, true, {
|
|
150
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
151
|
+
lineNumber: 137,
|
|
152
|
+
columnNumber: 9
|
|
153
|
+
}, this)
|
|
154
|
+
] }, void 0, true, {
|
|
155
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
156
|
+
lineNumber: 133,
|
|
157
|
+
columnNumber: 7
|
|
158
|
+
}, this)
|
|
159
|
+
] }, void 0, true, {
|
|
160
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
161
|
+
lineNumber: 93,
|
|
162
|
+
columnNumber: 5
|
|
163
|
+
}, this),
|
|
164
|
+
document.body
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
_s(ExecutionStatusUI, "U13FD0PO4FR4rREA5Sq0cx8yDCA=");
|
|
168
|
+
_c = ExecutionStatusUI;
|
|
169
|
+
export function ExecutionStatusUIContainer() {
|
|
170
|
+
_s2();
|
|
171
|
+
const [uiState, setUiState] = useState({
|
|
172
|
+
visible: false,
|
|
173
|
+
message: "실행 중"
|
|
174
|
+
});
|
|
175
|
+
useEffect(() => {
|
|
176
|
+
const handleShow = (event) => {
|
|
177
|
+
const customEvent = event;
|
|
178
|
+
const { message } = customEvent.detail || {};
|
|
179
|
+
console.log("[ExecutionStatusUI] Show event received:", { message });
|
|
180
|
+
setUiState({
|
|
181
|
+
visible: true,
|
|
182
|
+
message: message || "실행 중"
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
const handleHide = () => {
|
|
186
|
+
console.log("[ExecutionStatusUI] Hide event received");
|
|
187
|
+
setUiState((prev) => ({
|
|
188
|
+
...prev,
|
|
189
|
+
visible: false
|
|
190
|
+
}));
|
|
191
|
+
};
|
|
192
|
+
window.addEventListener("8g-show-execution-status", handleShow);
|
|
193
|
+
window.addEventListener("8g-hide-execution-status", handleHide);
|
|
194
|
+
return () => {
|
|
195
|
+
window.removeEventListener("8g-show-execution-status", handleShow);
|
|
196
|
+
window.removeEventListener("8g-hide-execution-status", handleHide);
|
|
197
|
+
};
|
|
198
|
+
}, []);
|
|
199
|
+
return /* @__PURE__ */ jsxDEV(ExecutionStatusUI, { visible: uiState.visible, message: uiState.message }, void 0, false, {
|
|
200
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
201
|
+
lineNumber: 193,
|
|
202
|
+
columnNumber: 10
|
|
203
|
+
}, this);
|
|
204
|
+
}
|
|
205
|
+
_s2(ExecutionStatusUIContainer, "HftpdxRipQgSZG00FebLnFqwyKI=");
|
|
206
|
+
_c2 = ExecutionStatusUIContainer;
|
|
207
|
+
var _c, _c2;
|
|
208
|
+
$RefreshReg$(_c, "ExecutionStatusUI");
|
|
209
|
+
$RefreshReg$(_c2, "ExecutionStatusUIContainer");
|
|
210
|
+
if (import.meta.hot && !inWebWorker) {
|
|
211
|
+
window.$RefreshReg$ = prevRefreshReg;
|
|
212
|
+
window.$RefreshSig$ = prevRefreshSig;
|
|
213
|
+
}
|
|
214
|
+
if (import.meta.hot && !inWebWorker) {
|
|
215
|
+
RefreshRuntime.__hmr_import(import.meta.url).then((currentExports) => {
|
|
216
|
+
RefreshRuntime.registerExportsForReactRefresh("/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx", currentExports);
|
|
217
|
+
import.meta.hot.accept((nextExports) => {
|
|
218
|
+
if (!nextExports) return;
|
|
219
|
+
const invalidateMessage = RefreshRuntime.validateRefreshBoundaryAndEnqueueUpdate("/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx", currentExports, nextExports);
|
|
220
|
+
if (invalidateMessage) import.meta.hot.invalidate(invalidateMessage);
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
isExecuteBlockMessage,
|
|
3
|
+
isShowExecutionStatusMessage,
|
|
4
|
+
isHideExecutionStatusMessage
|
|
5
|
+
} from "/src/types/internal-messages.ts.js";
|
|
2
6
|
export class InternalMessageHandler {
|
|
3
7
|
constructor(kernel) {
|
|
4
8
|
this.kernel = kernel;
|
|
@@ -12,6 +16,24 @@ export class InternalMessageHandler {
|
|
|
12
16
|
this.kernel.handleRuntimeMessage(message).then((result) => sendResponse(result)).catch((error) => sendResponse(this.kernel.createErrorResponse("", error)));
|
|
13
17
|
return true;
|
|
14
18
|
}
|
|
19
|
+
if (isShowExecutionStatusMessage(message)) {
|
|
20
|
+
console.log("[InternalMessageHandler] Show execution status:", message.data);
|
|
21
|
+
window.dispatchEvent(
|
|
22
|
+
new CustomEvent("8g-show-execution-status", {
|
|
23
|
+
detail: {
|
|
24
|
+
message: message.data.message || "워크플로우 실행 중"
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
sendResponse({ success: true });
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
if (isHideExecutionStatusMessage(message)) {
|
|
32
|
+
console.log("[InternalMessageHandler] Hide execution status");
|
|
33
|
+
window.dispatchEvent(new CustomEvent("8g-hide-execution-status"));
|
|
34
|
+
sendResponse({ success: true });
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
15
37
|
return false;
|
|
16
38
|
});
|
|
17
39
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import __vite__cjsImport0_react_jsxDevRuntime from "/vendor/.vite-deps-react_jsx-dev-runtime.js__v--
|
|
2
|
-
import __vite__cjsImport1_reactDom_client from "/vendor/.vite-deps-react-dom_client.js__v--
|
|
1
|
+
import __vite__cjsImport0_react_jsxDevRuntime from "/vendor/.vite-deps-react_jsx-dev-runtime.js__v--7cce5f32.js"; const jsxDEV = __vite__cjsImport0_react_jsxDevRuntime["jsxDEV"];
|
|
2
|
+
import __vite__cjsImport1_reactDom_client from "/vendor/.vite-deps-react-dom_client.js__v--7cce5f32.js"; const createRoot = __vite__cjsImport1_reactDom_client["createRoot"];
|
|
3
3
|
import { MessageKernel } from "/src/content/kernel/MessageKernel.ts.js";
|
|
4
4
|
import { InternalMessageHandler } from "/src/content/handler/InternalMessageHandler.ts.js";
|
|
5
5
|
import { ExternalMessageHandler } from "/src/content/handler/ExternalMessageHandler.ts.js";
|
|
6
6
|
import { ConfirmationUIContainer } from "/src/content/components/ConfirmationUI.tsx.js";
|
|
7
|
+
import { ExecutionStatusUIContainer } from "/src/content/components/ExecutionStatusUI.tsx.js";
|
|
7
8
|
(() => {
|
|
8
9
|
if (window.is8gExtensionInjected) return;
|
|
9
10
|
window.is8gExtensionInjected = true;
|
|
@@ -16,17 +17,27 @@ import { ConfirmationUIContainer } from "/src/content/components/ConfirmationUI.
|
|
|
16
17
|
const isTopFrame = window.self === window.top;
|
|
17
18
|
if (isTopFrame) {
|
|
18
19
|
const initUI = () => {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
document.body.appendChild(
|
|
23
|
-
const
|
|
24
|
-
|
|
20
|
+
const confirmationRoot = document.createElement("div");
|
|
21
|
+
confirmationRoot.id = "8g-confirmation-ui-root";
|
|
22
|
+
confirmationRoot.style.cssText = "all: initial; position: fixed; z-index: 2147483647;";
|
|
23
|
+
document.body.appendChild(confirmationRoot);
|
|
24
|
+
const confirmationReactRoot = createRoot(confirmationRoot);
|
|
25
|
+
confirmationReactRoot.render(/* @__PURE__ */ jsxDEV(ConfirmationUIContainer, {}, void 0, false, {
|
|
25
26
|
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/main.tsx",
|
|
26
|
-
lineNumber:
|
|
27
|
-
columnNumber:
|
|
27
|
+
lineNumber: 40,
|
|
28
|
+
columnNumber: 36
|
|
28
29
|
}, this));
|
|
29
|
-
|
|
30
|
+
const executionStatusRoot = document.createElement("div");
|
|
31
|
+
executionStatusRoot.id = "8g-execution-status-ui-root";
|
|
32
|
+
executionStatusRoot.style.cssText = "all: initial; position: fixed; z-index: 2147483647;";
|
|
33
|
+
document.body.appendChild(executionStatusRoot);
|
|
34
|
+
const executionStatusReactRoot = createRoot(executionStatusRoot);
|
|
35
|
+
executionStatusReactRoot.render(/* @__PURE__ */ jsxDEV(ExecutionStatusUIContainer, {}, void 0, false, {
|
|
36
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/main.tsx",
|
|
37
|
+
lineNumber: 49,
|
|
38
|
+
columnNumber: 39
|
|
39
|
+
}, this));
|
|
40
|
+
console.log("[8G Extension] UI Components mounted (top frame only)");
|
|
30
41
|
};
|
|
31
42
|
if (document.body) {
|
|
32
43
|
initUI();
|