scordi-extension 1.14.5 → 1.14.7

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 (73) hide show
  1. package/dist/assets/loading-page-1924caaa.js +51 -0
  2. package/dist/blocks/WaitForConditionBlock.d.ts +176 -0
  3. package/dist/blocks/WaitForConditionBlock.d.ts.map +1 -0
  4. package/dist/blocks/index.cjs +4 -0
  5. package/dist/blocks/index.d.ts +136 -0
  6. package/dist/blocks/index.d.ts.map +1 -1
  7. package/dist/blocks/index.js +7839 -0
  8. package/dist/blocks/logo.png +0 -0
  9. package/dist/logo.png +0 -0
  10. package/dist/manifest.json +55 -0
  11. package/dist/public/logo.png +0 -0
  12. package/dist/sdk/index.cjs +1 -0
  13. package/dist/sdk/index.js +3 -2
  14. package/dist/sdk/types.d.ts +1 -1
  15. package/dist/sdk/types.d.ts.map +1 -1
  16. package/dist/service-worker-loader.js +3 -0
  17. package/dist/src/blocks/AiParseDataBlock.ts.js +101 -0
  18. package/dist/src/blocks/ClearValueFormBlock.ts.js +55 -0
  19. package/dist/src/blocks/DataExtractBlock.ts.js +28 -0
  20. package/dist/src/blocks/ElementExistsBlock.ts.js +26 -0
  21. package/dist/src/blocks/EventClickBlock.ts.js +143 -0
  22. package/dist/src/blocks/FetchApiBlock.ts.js +50 -0
  23. package/dist/src/blocks/GetAttributeValueBlock.ts.js +33 -0
  24. package/dist/src/blocks/GetElementDataBlock.ts.js +114 -0
  25. package/dist/src/blocks/GetTextBlock.ts.js +152 -0
  26. package/dist/src/blocks/GetValueFormBlock.ts.js +52 -0
  27. package/dist/src/blocks/KeypressBlock.ts.js +89 -0
  28. package/dist/src/blocks/SaveAssetsBlock.ts.js +35 -0
  29. package/dist/src/blocks/ScrollBlock.ts.js +111 -0
  30. package/dist/src/blocks/SetValueFormBlock.ts.js +56 -0
  31. package/dist/src/blocks/WaitBlock.ts.js +24 -0
  32. package/dist/src/blocks/WaitForConditionBlock.ts.js +187 -0
  33. package/dist/src/blocks/index.ts.js +174 -0
  34. package/dist/src/blocks/types.ts.js +11 -0
  35. package/dist/src/content/components/ConfirmationUI.tsx.js +236 -0
  36. package/dist/src/content/elements/finders/CssSelector.ts.js +51 -0
  37. package/dist/src/content/elements/finders/ElementSelector.ts.js +20 -0
  38. package/dist/src/content/elements/finders/IframeSelector.ts.js +32 -0
  39. package/dist/src/content/elements/finders/ShadowDOMSelector.ts.js +38 -0
  40. package/dist/src/content/elements/finders/XPathFinder.ts.js +32 -0
  41. package/dist/src/content/elements/index.ts.js +26 -0
  42. package/dist/src/content/elements/utils/CSSSelectorGenerator.ts.js +72 -0
  43. package/dist/src/content/elements/utils/XPathGenerator.ts.js +62 -0
  44. package/dist/src/content/handler/ExternalMessageHandler.ts.js +78 -0
  45. package/dist/src/content/handler/InternalMessageHandler.ts.js +18 -0
  46. package/dist/src/content/kernel/MessageKernel.ts.js +83 -0
  47. package/dist/src/content/main.tsx-loader.js +22 -0
  48. package/dist/src/content/main.tsx.js +27 -0
  49. package/dist/src/content/utils/index.ts.js +1 -0
  50. package/dist/src/content/utils/synchronizedLock.ts.js +35 -0
  51. package/dist/src/popup/index.html +12 -0
  52. package/dist/src/types/internal-messages.ts.js +15 -0
  53. package/dist/vendor/.vite-deps-chunk-2TUXWMP5.js__v--9054997c.js +45 -0
  54. package/dist/vendor/.vite-deps-chunk-2TUXWMP5.js__v--e2a1f584.js +45 -0
  55. package/dist/vendor/.vite-deps-chunk-EL3BNLGW.js__v--e2a1f584.js +975 -0
  56. package/dist/vendor/.vite-deps-chunk-QIBDMRD4.js__v--9054997c.js +4158 -0
  57. package/dist/vendor/.vite-deps-chunk-QIBDMRD4.js__v--e2a1f584.js +4158 -0
  58. package/dist/vendor/.vite-deps-chunk-XHY3JSIG.js__v--e2a1f584.js +280 -0
  59. package/dist/vendor/.vite-deps-jsonata.js__v--d602c657.js +5761 -0
  60. package/dist/vendor/.vite-deps-jsonata.js__v--e2a1f584.js +5761 -0
  61. package/dist/vendor/.vite-deps-react-dom.js__v--e2a1f584.js +6 -0
  62. package/dist/vendor/.vite-deps-react-dom_client.js__v--e2a1f584.js +18108 -0
  63. package/dist/vendor/.vite-deps-react.js__v--e2a1f584.js +5 -0
  64. package/dist/vendor/.vite-deps-react_jsx-dev-runtime.js__v--e2a1f584.js +281 -0
  65. package/dist/vendor/.vite-deps-zod.js__v--9e0f4cc1.js +219 -0
  66. package/dist/vendor/.vite-deps-zod.js__v--e2a1f584.js +219 -0
  67. package/dist/vendor/crx-client-port.js +66 -0
  68. package/dist/vendor/crx-client-preamble.js +4 -0
  69. package/dist/vendor/react-refresh.js +670 -0
  70. package/dist/vendor/vite-client.js +1134 -0
  71. package/dist/vendor/vite-dist-client-env.mjs.js +24 -0
  72. package/dist/vendor/webcomponents-custom-elements.js +47 -0
  73. package/package.json +4 -4
@@ -0,0 +1,51 @@
1
+ const VITE_URL = "http://localhost:5173";
2
+ document.body.innerHTML = `
3
+ <div
4
+ id="app"
5
+ style="
6
+ border: 1px solid #ddd;
7
+ padding: 20px;
8
+ border-radius: 5px;
9
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
10
+ "
11
+ >
12
+ <h1 style="color: #333">Vite Dev Mode</h1>
13
+ <p style="color: #666">
14
+ Cannot connect to the Vite Dev Server on <a href="${VITE_URL}">${VITE_URL}</a>
15
+ </p>
16
+ <p style="color: #666">
17
+ Double-check that Vite is working and reload the extension.
18
+ </p>
19
+ <p style="color: #666">
20
+ This page will close when the extension reloads.
21
+ </p>
22
+ <button
23
+ style="
24
+ padding: 10px 20px;
25
+ border: none;
26
+ background-color: #007bff;
27
+ color: #fff;
28
+ border-radius: 5px;
29
+ cursor: pointer;
30
+ "
31
+ >
32
+ Reload Extension
33
+ </button>
34
+ </div>`;
35
+ document.body.querySelector("button")?.addEventListener("click", () => {
36
+ chrome.runtime.reload();
37
+ });
38
+ let tries = 0;
39
+ let ready = false;
40
+ do {
41
+ try {
42
+ await fetch(VITE_URL);
43
+ ready = true;
44
+ } catch {
45
+ const timeout = Math.min(100 * Math.pow(2, ++tries), 5e3);
46
+ console.log(`[CRXJS] Vite Dev Server is not available on ${VITE_URL}`);
47
+ console.log(`[CRXJS] Retrying in ${timeout}ms...`);
48
+ await new Promise((resolve) => setTimeout(resolve, timeout));
49
+ }
50
+ } while (!ready);
51
+ location.reload();
@@ -0,0 +1,176 @@
1
+ import z from 'zod';
2
+ import { Block, BlockResult } from './types';
3
+ /**
4
+ * WaitForConditionBlock - 특정 조건 만족 또는 사용자 확인 대기
5
+ *
6
+ * 지원 기능:
7
+ * - 자동 조건: URL 패턴, 요소 존재, 쿠키 존재, 스토리지 키
8
+ * - 수동 확인: Floating UI의 확인 버튼 클릭
9
+ * - 모드: auto (자동만), manual (수동만), auto-or-manual (둘 중 하나)
10
+ */
11
+ export interface WaitForConditionBlock extends Omit<Block, 'selector' | 'findBy' | 'option'> {
12
+ readonly name: 'wait-for-condition';
13
+ conditions: {
14
+ urlPattern?: string;
15
+ elementExists?: {
16
+ selector: string;
17
+ findBy: 'cssSelector' | 'xpath';
18
+ };
19
+ cookieExists?: string;
20
+ storageKey?: {
21
+ type: 'localStorage' | 'sessionStorage';
22
+ key: string;
23
+ };
24
+ userConfirmation?: boolean;
25
+ message?: string;
26
+ buttonText?: string;
27
+ };
28
+ mode?: 'auto' | 'manual' | 'auto-or-manual';
29
+ pollingIntervalMs?: number;
30
+ timeoutMs?: number;
31
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
32
+ }
33
+ export declare const WaitForConditionBlockSchema: z.ZodObject<{
34
+ name: z.ZodLiteral<"wait-for-condition">;
35
+ conditions: z.ZodEffects<z.ZodObject<{
36
+ urlPattern: z.ZodOptional<z.ZodString>;
37
+ elementExists: z.ZodOptional<z.ZodObject<{
38
+ selector: z.ZodString;
39
+ findBy: z.ZodEnum<["cssSelector", "xpath"]>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ selector: string;
42
+ findBy: "cssSelector" | "xpath";
43
+ }, {
44
+ selector: string;
45
+ findBy: "cssSelector" | "xpath";
46
+ }>>;
47
+ cookieExists: z.ZodOptional<z.ZodString>;
48
+ storageKey: z.ZodOptional<z.ZodObject<{
49
+ type: z.ZodEnum<["localStorage", "sessionStorage"]>;
50
+ key: z.ZodString;
51
+ }, "strip", z.ZodTypeAny, {
52
+ type: "localStorage" | "sessionStorage";
53
+ key: string;
54
+ }, {
55
+ type: "localStorage" | "sessionStorage";
56
+ key: string;
57
+ }>>;
58
+ userConfirmation: z.ZodOptional<z.ZodBoolean>;
59
+ message: z.ZodOptional<z.ZodString>;
60
+ buttonText: z.ZodOptional<z.ZodString>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ message?: string | undefined;
63
+ urlPattern?: string | undefined;
64
+ elementExists?: {
65
+ selector: string;
66
+ findBy: "cssSelector" | "xpath";
67
+ } | undefined;
68
+ cookieExists?: string | undefined;
69
+ storageKey?: {
70
+ type: "localStorage" | "sessionStorage";
71
+ key: string;
72
+ } | undefined;
73
+ userConfirmation?: boolean | undefined;
74
+ buttonText?: string | undefined;
75
+ }, {
76
+ message?: string | undefined;
77
+ urlPattern?: string | undefined;
78
+ elementExists?: {
79
+ selector: string;
80
+ findBy: "cssSelector" | "xpath";
81
+ } | undefined;
82
+ cookieExists?: string | undefined;
83
+ storageKey?: {
84
+ type: "localStorage" | "sessionStorage";
85
+ key: string;
86
+ } | undefined;
87
+ userConfirmation?: boolean | undefined;
88
+ buttonText?: string | undefined;
89
+ }>, {
90
+ message?: string | undefined;
91
+ urlPattern?: string | undefined;
92
+ elementExists?: {
93
+ selector: string;
94
+ findBy: "cssSelector" | "xpath";
95
+ } | undefined;
96
+ cookieExists?: string | undefined;
97
+ storageKey?: {
98
+ type: "localStorage" | "sessionStorage";
99
+ key: string;
100
+ } | undefined;
101
+ userConfirmation?: boolean | undefined;
102
+ buttonText?: string | undefined;
103
+ }, {
104
+ message?: string | undefined;
105
+ urlPattern?: string | undefined;
106
+ elementExists?: {
107
+ selector: string;
108
+ findBy: "cssSelector" | "xpath";
109
+ } | undefined;
110
+ cookieExists?: string | undefined;
111
+ storageKey?: {
112
+ type: "localStorage" | "sessionStorage";
113
+ key: string;
114
+ } | undefined;
115
+ userConfirmation?: boolean | undefined;
116
+ buttonText?: string | undefined;
117
+ }>;
118
+ mode: z.ZodOptional<z.ZodEnum<["auto", "manual", "auto-or-manual"]>>;
119
+ pollingIntervalMs: z.ZodOptional<z.ZodNumber>;
120
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
121
+ position: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right"]>>;
122
+ }, "strip", z.ZodTypeAny, {
123
+ name: "wait-for-condition";
124
+ conditions: {
125
+ message?: string | undefined;
126
+ urlPattern?: string | undefined;
127
+ elementExists?: {
128
+ selector: string;
129
+ findBy: "cssSelector" | "xpath";
130
+ } | undefined;
131
+ cookieExists?: string | undefined;
132
+ storageKey?: {
133
+ type: "localStorage" | "sessionStorage";
134
+ key: string;
135
+ } | undefined;
136
+ userConfirmation?: boolean | undefined;
137
+ buttonText?: string | undefined;
138
+ };
139
+ mode?: "auto" | "manual" | "auto-or-manual" | undefined;
140
+ pollingIntervalMs?: number | undefined;
141
+ timeoutMs?: number | undefined;
142
+ position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
143
+ }, {
144
+ name: "wait-for-condition";
145
+ conditions: {
146
+ message?: string | undefined;
147
+ urlPattern?: string | undefined;
148
+ elementExists?: {
149
+ selector: string;
150
+ findBy: "cssSelector" | "xpath";
151
+ } | undefined;
152
+ cookieExists?: string | undefined;
153
+ storageKey?: {
154
+ type: "localStorage" | "sessionStorage";
155
+ key: string;
156
+ } | undefined;
157
+ userConfirmation?: boolean | undefined;
158
+ buttonText?: string | undefined;
159
+ };
160
+ mode?: "auto" | "manual" | "auto-or-manual" | undefined;
161
+ pollingIntervalMs?: number | undefined;
162
+ timeoutMs?: number | undefined;
163
+ position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
164
+ }>;
165
+ export declare function validateWaitForConditionBlock(data: unknown): WaitForConditionBlock;
166
+ export interface WaitForConditionResult {
167
+ success: boolean;
168
+ reason?: 'urlPattern' | 'elementExists' | 'cookieExists' | 'storageKey' | 'userConfirmation' | 'timeout' | 'tabClosed';
169
+ message?: string;
170
+ }
171
+ /**
172
+ * wait-for-condition block 핸들러
173
+ * content script에서 호출되며 floating UI와 연동
174
+ */
175
+ export declare function handlerWaitForCondition(data: WaitForConditionBlock): Promise<BlockResult<WaitForConditionResult>>;
176
+ //# sourceMappingURL=WaitForConditionBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WaitForConditionBlock.d.ts","sourceRoot":"","sources":["../../src/blocks/WaitForConditionBlock.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC1F,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,UAAU,EAAE;QAEV,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE;YACd,QAAQ,EAAE,MAAM,CAAC;YACjB,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC;SACjC,CAAC;QACF,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE;YACX,IAAI,EAAE,cAAc,GAAG,gBAAgB,CAAC;YACxC,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;QAGF,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,gBAAgB,CAAC;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;CACtE;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCtC,CAAC;AAEH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,OAAO,GAAG,qBAAqB,CAElF;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,YAAY,GAAG,eAAe,GAAG,cAAc,GAAG,YAAY,GAAG,kBAAkB,GAAG,SAAS,GAAG,WAAW,CAAC;IACvH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC,CAiM9C"}