@lvce-editor/test-worker 4.0.0 → 4.2.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/api.d.ts CHANGED
@@ -150,6 +150,8 @@ declare const setExcludeValue: (value: string) => Promise<void>;
150
150
  declare const replaceAll: () => Promise<void>;
151
151
  declare const setIncludeValue: (value: string) => Promise<void>;
152
152
  declare const clearSearchResults: () => Promise<void>;
153
+ declare const openDetails: () => Promise<void>;
154
+ declare const collapseDetails: () => Promise<void>;
153
155
  declare const dismissItem: () => Promise<void>;
154
156
  declare const focusFirst$3: () => Promise<void>;
155
157
  declare const focusIndex$2: (index: number) => Promise<void>;
@@ -255,7 +257,7 @@ declare namespace QuickPick {
255
257
  export { executeCommand, focusIndex$1 as focusIndex, focusNext$5 as focusNext, focusPrevious$3 as focusPrevious, handleInput$1 as handleInput, open$3 as open, selectIndex$1 as selectIndex, selectItem$1 as selectItem, setValue$1 as setValue };
256
258
  }
257
259
  declare namespace Search {
258
- export { clearSearchResults, dismissItem, focusFirst$3 as focusFirst, focusIndex$2 as focusIndex, focusNext$6 as focusNext, focusNextPage, focusPrevious$4 as focusPrevious, focusPreviousPage, handleWheel$1 as handleWheel, replaceAll, selectIndex$2 as selectIndex, setExcludeValue, setIncludeValue, setReplaceValue, setValue$2 as setValue, toggleMatchCase, toggleMatchWholeWord, togglePreserveCase, toggleReplace, toggleSearchDetails, toggleUseRegularExpression };
260
+ export { clearSearchResults, collapseDetails, dismissItem, focusFirst$3 as focusFirst, focusIndex$2 as focusIndex, focusNext$6 as focusNext, focusNextPage, focusPrevious$4 as focusPrevious, focusPreviousPage, handleWheel$1 as handleWheel, openDetails, replaceAll, selectIndex$2 as selectIndex, setExcludeValue, setIncludeValue, setReplaceValue, setValue$2 as setValue, toggleMatchCase, toggleMatchWholeWord, togglePreserveCase, toggleReplace, toggleSearchDetails, toggleUseRegularExpression };
259
261
  }
260
262
  declare namespace Settings {
261
263
  export { update };
@@ -2156,6 +2156,12 @@ const setIncludeValue = async value => {
2156
2156
  const clearSearchResults = async () => {
2157
2157
  await invoke('Search.clearSearchResults');
2158
2158
  };
2159
+ const openDetails = async () => {
2160
+ await invoke('Search.openDetails');
2161
+ };
2162
+ const collapseDetails = async () => {
2163
+ await invoke('Search.collapseDetails');
2164
+ };
2159
2165
  const dismissItem = async () => {
2160
2166
  await invoke('Search.dismissItem');
2161
2167
  };
@@ -2205,6 +2211,7 @@ const toggleReplace = async () => {
2205
2211
  const TestFrameWorkComponentSearch = {
2206
2212
  __proto__: null,
2207
2213
  clearSearchResults,
2214
+ collapseDetails,
2208
2215
  dismissItem,
2209
2216
  focusFirst: focusFirst$1,
2210
2217
  focusIndex: focusIndex$1,
@@ -2213,6 +2220,7 @@ const TestFrameWorkComponentSearch = {
2213
2220
  focusPrevious: focusPrevious$1,
2214
2221
  focusPreviousPage,
2215
2222
  handleWheel,
2223
+ openDetails,
2216
2224
  replaceAll,
2217
2225
  selectIndex,
2218
2226
  setExcludeValue,
@@ -2355,6 +2363,16 @@ const getPortTuple = () => {
2355
2363
  };
2356
2364
  };
2357
2365
 
2366
+ const getWebViewInfo = async webViewId => {
2367
+ const info = await invoke('WebView.getWebViewInfo2', webViewId);
2368
+ return info;
2369
+ };
2370
+
2371
+ // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
2372
+ const setWebViewPort = async (uid, port, origin, portType) => {
2373
+ await invokeAndTransfer('WebView.setPort', uid, port, origin, portType);
2374
+ };
2375
+
2358
2376
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
2359
2377
  const waitForFirstEventEvent = async port => {
2360
2378
  const {
@@ -2373,10 +2391,9 @@ const createPortIpc = async webViewId => {
2373
2391
  } = getPortTuple();
2374
2392
  const firstEventPromise = waitForFirstEventEvent(port1);
2375
2393
  // TODO ask extension host worker about webview uid
2376
-
2377
- const info = await invoke('WebView.getWebViewInfo', webViewId);
2394
+ const info = await getWebViewInfo(webViewId);
2378
2395
  const portType = 'test';
2379
- await invokeAndTransfer('WebView.setPort', info.uid, port2, info.origin, portType);
2396
+ await setWebViewPort(info.uid, port2, info.origin, portType);
2380
2397
 
2381
2398
  // await SendPortToWebView.sendPortToWebView(webViewId, port2)
2382
2399
  const firstEvent = await firstEventPromise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "4.0.0",
3
+ "version": "4.2.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",