@lvce-editor/extension-detail-view 4.17.0 → 5.0.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.
@@ -19,18 +19,17 @@ const ContentSecurityPolicy = 'ContentSecurityPolicy';
19
19
  const Copy = 'Copy';
20
20
  const CopyImage = 'Copy Image';
21
21
  const CopyImageUrl = 'Copy Image Url';
22
+ const CopyLink = 'Copy Link';
22
23
  const Details$1 = 'Details';
23
24
  const Disable$1 = 'Disable';
24
25
  const Elements = 'Elements';
25
26
  const EmptyCommandsArray = 'The extension contributes an empty commands array.';
26
27
  const Enable$1 = 'Enable';
27
28
  const Features$2 = 'Features';
28
- const FileMatch = 'File Match';
29
- const Id = 'ID';
30
- const Name = 'Name';
31
29
  const FileExtensions = 'File Extensions';
30
+ const FileMatch = 'File Match';
32
31
  const Grammar = 'Grammar';
33
- const Snippets = 'Snippets';
32
+ const Id = 'ID';
34
33
  const Identifier = 'Identifier';
35
34
  const ImportTime = 'Import Time: ';
36
35
  const Installation = 'Installation';
@@ -42,6 +41,7 @@ const LastReleased = 'Last Released';
42
41
  const LastUpdated = 'Last Updated';
43
42
  const License = 'License';
44
43
  const Marketplace = 'Marketplace';
44
+ const Name = 'Name';
45
45
  const None$4 = 'None';
46
46
  const NoReadmeFound = 'No Readme Found.';
47
47
  const OpenImageInNewTab = 'Open Image in New Tab';
@@ -61,6 +61,7 @@ const Selector = 'Selector';
61
61
  const SetColorTheme$1 = 'Set Color Theme';
62
62
  const Settings$1 = 'Settings';
63
63
  const Size = 'Size';
64
+ const Snippets = 'Snippets';
64
65
  const StringMustNotBeEmpty = 'String must not be empty';
65
66
  const Theme$1 = 'Theme';
66
67
  const Uninstall$1 = 'Uninstall';
@@ -77,6 +78,9 @@ const marketplace = () => {
77
78
  const categories = () => {
78
79
  return i18nString(Categories$1);
79
80
  };
81
+ const copyLink = () => {
82
+ return i18nString(CopyLink);
83
+ };
80
84
  const resources = () => {
81
85
  return i18nString(Resources$1);
82
86
  };
@@ -1922,7 +1926,7 @@ const send = (transport, method, ...params) => {
1922
1926
  const message = create$4(method, params);
1923
1927
  transport.send(message);
1924
1928
  };
1925
- const invoke$5 = (ipc, method, ...params) => {
1929
+ const invoke$6 = (ipc, method, ...params) => {
1926
1930
  return invokeHelper(ipc, method, params, false);
1927
1931
  };
1928
1932
  const invokeAndTransfer$4 = (ipc, method, ...params) => {
@@ -1961,7 +1965,7 @@ const createRpc = ipc => {
1961
1965
  send(ipc, method, ...params);
1962
1966
  },
1963
1967
  invoke(method, ...params) {
1964
- return invoke$5(ipc, method, ...params);
1968
+ return invoke$6(ipc, method, ...params);
1965
1969
  },
1966
1970
  invokeAndTransfer(method, ...params) {
1967
1971
  return invokeAndTransfer$4(ipc, method, ...params);
@@ -2071,22 +2075,22 @@ const createMockRpc = ({
2071
2075
  };
2072
2076
 
2073
2077
  const {
2074
- invoke: invoke$4,
2078
+ invoke: invoke$5,
2075
2079
  invokeAndTransfer: invokeAndTransfer$3,
2076
2080
  set: set$9,
2077
2081
  dispose: dispose$5
2078
2082
  } = create$7(ExtensionHostWorker);
2079
2083
  const executeReferenceProvider = async (id, offset) => {
2080
2084
  // @ts-ignore
2081
- return invoke$4('ExtensionHostReference.executeReferenceProvider', id, offset);
2085
+ return invoke$5('ExtensionHostReference.executeReferenceProvider', id, offset);
2082
2086
  };
2083
2087
  const executeFileReferenceProvider = async id => {
2084
2088
  // @ts-ignore
2085
- return invoke$4('ExtensionHostReference.executeFileReferenceProvider', id);
2089
+ return invoke$5('ExtensionHostReference.executeFileReferenceProvider', id);
2086
2090
  };
2087
2091
  const getRuntimeStatus$2 = async extensionId => {
2088
2092
  // @ts-ignore
2089
- return invoke$4('ExtensionHost.getRuntimeStatus', extensionId);
2093
+ return invoke$5('ExtensionHost.getRuntimeStatus', extensionId);
2090
2094
  };
2091
2095
  const registerMockRpc$3 = commandMap => {
2092
2096
  const mockRpc = createMockRpc({
@@ -2102,67 +2106,67 @@ const ExtensionHost = {
2102
2106
  executeFileReferenceProvider,
2103
2107
  executeReferenceProvider,
2104
2108
  getRuntimeStatus: getRuntimeStatus$2,
2105
- invoke: invoke$4,
2109
+ invoke: invoke$5,
2106
2110
  invokeAndTransfer: invokeAndTransfer$3,
2107
2111
  registerMockRpc: registerMockRpc$3,
2108
2112
  set: set$9
2109
2113
  };
2110
2114
 
2111
2115
  const {
2112
- invoke: invoke$3,
2116
+ invoke: invoke$4,
2113
2117
  invokeAndTransfer: invokeAndTransfer$2,
2114
2118
  set: set$8,
2115
2119
  dispose: dispose$4
2116
2120
  } = create$7(FileSystemWorker$1);
2117
2121
  const remove = async dirent => {
2118
- return invoke$3('FileSystem.remove', dirent);
2122
+ return invoke$4('FileSystem.remove', dirent);
2119
2123
  };
2120
2124
  const readDirWithFileTypes = async uri => {
2121
- return invoke$3('FileSystem.readDirWithFileTypes', uri);
2125
+ return invoke$4('FileSystem.readDirWithFileTypes', uri);
2122
2126
  };
2123
2127
  const getPathSeparator = async root => {
2124
2128
  // @ts-ignore
2125
- return invoke$3('FileSystem.getPathSeparator', root);
2129
+ return invoke$4('FileSystem.getPathSeparator', root);
2126
2130
  };
2127
2131
  const getRealPath = async path => {
2128
- return invoke$3('FileSystem.getRealPath', path);
2132
+ return invoke$4('FileSystem.getRealPath', path);
2129
2133
  };
2130
2134
  const stat = async dirent => {
2131
- return invoke$3('FileSystem.stat', dirent);
2135
+ return invoke$4('FileSystem.stat', dirent);
2132
2136
  };
2133
2137
  const createFile = async uri => {
2134
- return invoke$3('FileSystem.writeFile', uri, '');
2138
+ return invoke$4('FileSystem.writeFile', uri, '');
2135
2139
  };
2136
2140
  const readFile$3 = async uri => {
2137
- return invoke$3('FileSystem.readFile', uri);
2141
+ return invoke$4('FileSystem.readFile', uri);
2138
2142
  };
2139
2143
  const writeFile = async (uri, content) => {
2140
- return invoke$3('FileSystem.writeFile', uri, content);
2144
+ return invoke$4('FileSystem.writeFile', uri, content);
2141
2145
  };
2142
2146
  const mkdir = async uri => {
2143
- return invoke$3('FileSystem.mkdir', uri);
2147
+ return invoke$4('FileSystem.mkdir', uri);
2144
2148
  };
2145
2149
  const rename = async (oldUri, newUri) => {
2146
- return invoke$3('FileSystem.rename', oldUri, newUri);
2150
+ return invoke$4('FileSystem.rename', oldUri, newUri);
2147
2151
  };
2148
2152
  const copy = async (oldUri, newUri) => {
2149
- return invoke$3('FileSystem.copy', oldUri, newUri);
2153
+ return invoke$4('FileSystem.copy', oldUri, newUri);
2150
2154
  };
2151
2155
  const exists$1 = async uri => {
2152
2156
  // @ts-ignore
2153
- return invoke$3('FileSystem.exists', uri);
2157
+ return invoke$4('FileSystem.exists', uri);
2154
2158
  };
2155
2159
  const getFolderSize$2 = async uri => {
2156
2160
  // @ts-ignore
2157
- return invoke$3('FileSystem.getFolderSize', uri);
2161
+ return invoke$4('FileSystem.getFolderSize', uri);
2158
2162
  };
2159
2163
  const readFileAsBlob$1 = async uri => {
2160
2164
  // @ts-ignore
2161
- return invoke$3('FileSystem.readFileAsBlob', uri);
2165
+ return invoke$4('FileSystem.readFileAsBlob', uri);
2162
2166
  };
2163
2167
  const appendFile = async (uri, text) => {
2164
2168
  // @ts-ignore
2165
- return invoke$3('FileSystem.appendFile', uri, text);
2169
+ return invoke$4('FileSystem.appendFile', uri, text);
2166
2170
  };
2167
2171
  const registerMockRpc$2 = commandMap => {
2168
2172
  const mockRpc = createMockRpc({
@@ -2182,7 +2186,7 @@ const FileSystemWorker = {
2182
2186
  getFolderSize: getFolderSize$2,
2183
2187
  getPathSeparator,
2184
2188
  getRealPath,
2185
- invoke: invoke$3,
2189
+ invoke: invoke$4,
2186
2190
  invokeAndTransfer: invokeAndTransfer$2,
2187
2191
  mkdir,
2188
2192
  readDirWithFileTypes,
@@ -2197,18 +2201,18 @@ const FileSystemWorker = {
2197
2201
  };
2198
2202
 
2199
2203
  const {
2200
- invoke: invoke$2,
2204
+ invoke: invoke$3,
2201
2205
  invokeAndTransfer: invokeAndTransfer$1,
2202
2206
  set: set$7,
2203
2207
  dispose: dispose$3
2204
2208
  } = create$7(MarkdownWorker$1);
2205
2209
  const getVirtualDom$1 = async html => {
2206
2210
  // @ts-ignore
2207
- return invoke$2('Markdown.getVirtualDom', html);
2211
+ return invoke$3('Markdown.getVirtualDom', html);
2208
2212
  };
2209
2213
  const render$1 = async (markdown, options) => {
2210
2214
  // @ts-ignore
2211
- return invoke$2('Markdown.render', markdown, options);
2215
+ return invoke$3('Markdown.render', markdown, options);
2212
2216
  };
2213
2217
  const registerMockRpc$1 = commandMap => {
2214
2218
  const mockRpc = createMockRpc({
@@ -2222,7 +2226,7 @@ const MarkdownWorker = {
2222
2226
  __proto__: null,
2223
2227
  dispose: dispose$3,
2224
2228
  getVirtualDom: getVirtualDom$1,
2225
- invoke: invoke$2,
2229
+ invoke: invoke$3,
2226
2230
  invokeAndTransfer: invokeAndTransfer$1,
2227
2231
  registerMockRpc: registerMockRpc$1,
2228
2232
  render: render$1,
@@ -2230,51 +2234,51 @@ const MarkdownWorker = {
2230
2234
  };
2231
2235
 
2232
2236
  const {
2233
- invoke: invoke$1,
2237
+ invoke: invoke$2,
2234
2238
  invokeAndTransfer,
2235
2239
  set: set$6,
2236
2240
  dispose: dispose$2
2237
2241
  } = create$7(RendererWorker$1);
2238
2242
  const searchFileHtml = async uri => {
2239
- return invoke$1('ExtensionHost.searchFileWithHtml', uri);
2243
+ return invoke$2('ExtensionHost.searchFileWithHtml', uri);
2240
2244
  };
2241
2245
  const getFilePathElectron = async file => {
2242
- return invoke$1('FileSystemHandle.getFilePathElectron', file);
2246
+ return invoke$2('FileSystemHandle.getFilePathElectron', file);
2243
2247
  };
2244
2248
  const showContextMenu$1 = async (x, y, id, ...args) => {
2245
- return invoke$1('ContextMenu.show', x, y, id, ...args);
2249
+ return invoke$2('ContextMenu.show', x, y, id, ...args);
2246
2250
  };
2247
2251
  const getElectronVersion = async () => {
2248
- return invoke$1('Process.getElectronVersion');
2252
+ return invoke$2('Process.getElectronVersion');
2249
2253
  };
2250
2254
  const applyBulkReplacement = async bulkEdits => {
2251
- await invoke$1('BulkReplacement.applyBulkReplacement', bulkEdits);
2255
+ await invoke$2('BulkReplacement.applyBulkReplacement', bulkEdits);
2252
2256
  };
2253
2257
  const setColorTheme$2 = async id => {
2254
2258
  // @ts-ignore
2255
- return invoke$1(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
2259
+ return invoke$2(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
2256
2260
  };
2257
2261
  const getNodeVersion = async () => {
2258
- return invoke$1('Process.getNodeVersion');
2262
+ return invoke$2('Process.getNodeVersion');
2259
2263
  };
2260
2264
  const getChromeVersion = async () => {
2261
- return invoke$1('Process.getChromeVersion');
2265
+ return invoke$2('Process.getChromeVersion');
2262
2266
  };
2263
2267
  const getV8Version = async () => {
2264
- return invoke$1('Process.getV8Version');
2268
+ return invoke$2('Process.getV8Version');
2265
2269
  };
2266
2270
  const getFileHandles = async fileIds => {
2267
- const files = await invoke$1('FileSystemHandle.getFileHandles', fileIds);
2271
+ const files = await invoke$2('FileSystemHandle.getFileHandles', fileIds);
2268
2272
  return files;
2269
2273
  };
2270
2274
  const setWorkspacePath = async path => {
2271
- await invoke$1('Workspace.setPath', path);
2275
+ await invoke$2('Workspace.setPath', path);
2272
2276
  };
2273
2277
  const registerWebViewInterceptor = async (id, port) => {
2274
2278
  await invokeAndTransfer('WebView.registerInterceptor', id, port);
2275
2279
  };
2276
2280
  const unregisterWebViewInterceptor = async id => {
2277
- await invoke$1('WebView.unregisterInterceptor', id);
2281
+ await invoke$2('WebView.unregisterInterceptor', id);
2278
2282
  };
2279
2283
  const sendMessagePortToEditorWorker = async (port, rpcId) => {
2280
2284
  const command = 'HandleMessagePort.handleMessagePort';
@@ -2302,41 +2306,41 @@ const sendMessagePortToFileSystemWorker$2 = async (port, rpcId) => {
2302
2306
  await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
2303
2307
  };
2304
2308
  const readFile$2 = async uri => {
2305
- return invoke$1('FileSystem.readFile', uri);
2309
+ return invoke$2('FileSystem.readFile', uri);
2306
2310
  };
2307
2311
  const getWebViewSecret = async key => {
2308
2312
  // @ts-ignore
2309
- return invoke$1('WebView.getSecret', key);
2313
+ return invoke$2('WebView.getSecret', key);
2310
2314
  };
2311
2315
  const setWebViewPort = async (uid, port, origin, portType) => {
2312
2316
  return invokeAndTransfer('WebView.setPort', uid, port, origin, portType);
2313
2317
  };
2314
2318
  const setFocus = key => {
2315
- return invoke$1('Focus.setFocus', key);
2319
+ return invoke$2('Focus.setFocus', key);
2316
2320
  };
2317
2321
  const getFileIcon = async options => {
2318
- return invoke$1('IconTheme.getFileIcon', options);
2322
+ return invoke$2('IconTheme.getFileIcon', options);
2319
2323
  };
2320
2324
  const getColorThemeNames = async () => {
2321
- return invoke$1('ColorTheme.getColorThemeNames');
2325
+ return invoke$2('ColorTheme.getColorThemeNames');
2322
2326
  };
2323
2327
  const disableExtension$2 = async id => {
2324
2328
  // @ts-ignore
2325
- return invoke$1('ExtensionManagement.disable', id);
2329
+ return invoke$2('ExtensionManagement.disable', id);
2326
2330
  };
2327
2331
  const enableExtension$2 = async id => {
2328
2332
  // @ts-ignore
2329
- return invoke$1('ExtensionManagement.enable', id);
2333
+ return invoke$2('ExtensionManagement.enable', id);
2330
2334
  };
2331
2335
  const handleDebugChange = async params => {
2332
2336
  // @ts-ignore
2333
- return invoke$1('Run And Debug.handleChange', params);
2337
+ return invoke$2('Run And Debug.handleChange', params);
2334
2338
  };
2335
2339
  const getFolderIcon = async options => {
2336
- return invoke$1('IconTheme.getFolderIcon', options);
2340
+ return invoke$2('IconTheme.getFolderIcon', options);
2337
2341
  };
2338
2342
  const closeWidget = async widgetId => {
2339
- return invoke$1('Viewlet.closeWidget', widgetId);
2343
+ return invoke$2('Viewlet.closeWidget', widgetId);
2340
2344
  };
2341
2345
  const sendMessagePortToExtensionHostWorker$2 = async (port, rpcId = 0) => {
2342
2346
  const command = 'HandleMessagePort.handleMessagePort2';
@@ -2347,55 +2351,55 @@ const sendMessagePortToSearchProcess = async port => {
2347
2351
  };
2348
2352
  const confirm = async (message, options) => {
2349
2353
  // @ts-ignore
2350
- const result = await invoke$1('ConfirmPrompt.prompt', message, options);
2354
+ const result = await invoke$2('ConfirmPrompt.prompt', message, options);
2351
2355
  return result;
2352
2356
  };
2353
2357
  const getRecentlyOpened = async () => {
2354
- return invoke$1(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
2358
+ return invoke$2(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
2355
2359
  };
2356
2360
  const getKeyBindings = async () => {
2357
- return invoke$1('KeyBindingsInitial.getKeyBindings');
2361
+ return invoke$2('KeyBindingsInitial.getKeyBindings');
2358
2362
  };
2359
2363
  const writeClipBoardText$1 = async text => {
2360
- await invoke$1('ClipBoard.writeText', /* text */text);
2364
+ await invoke$2('ClipBoard.writeText', /* text */text);
2361
2365
  };
2362
2366
  const writeClipBoardImage$1 = async blob => {
2363
2367
  // @ts-ignore
2364
- await invoke$1('ClipBoard.writeImage', /* text */blob);
2368
+ await invoke$2('ClipBoard.writeImage', /* text */blob);
2365
2369
  };
2366
2370
  const searchFileMemory = async uri => {
2367
2371
  // @ts-ignore
2368
- return invoke$1('ExtensionHost.searchFileWithMemory', uri);
2372
+ return invoke$2('ExtensionHost.searchFileWithMemory', uri);
2369
2373
  };
2370
2374
  const searchFileFetch = async uri => {
2371
- return invoke$1('ExtensionHost.searchFileWithFetch', uri);
2375
+ return invoke$2('ExtensionHost.searchFileWithFetch', uri);
2372
2376
  };
2373
2377
  const showMessageBox = async options => {
2374
- return invoke$1('ElectronDialog.showMessageBox', options);
2378
+ return invoke$2('ElectronDialog.showMessageBox', options);
2375
2379
  };
2376
2380
  const handleDebugResumed = async params => {
2377
- await invoke$1('Run And Debug.handleResumed', params);
2381
+ await invoke$2('Run And Debug.handleResumed', params);
2378
2382
  };
2379
2383
  const openWidget = async name => {
2380
- await invoke$1('Viewlet.openWidget', name);
2384
+ await invoke$2('Viewlet.openWidget', name);
2381
2385
  };
2382
2386
  const getIcons = async requests => {
2383
- const icons = await invoke$1('IconTheme.getIcons', requests);
2387
+ const icons = await invoke$2('IconTheme.getIcons', requests);
2384
2388
  return icons;
2385
2389
  };
2386
2390
  const activateByEvent = event => {
2387
- return invoke$1('ExtensionHostManagement.activateByEvent', event);
2391
+ return invoke$2('ExtensionHostManagement.activateByEvent', event);
2388
2392
  };
2389
2393
  const setAdditionalFocus = focusKey => {
2390
2394
  // @ts-ignore
2391
- return invoke$1('Focus.setAdditionalFocus', focusKey);
2395
+ return invoke$2('Focus.setAdditionalFocus', focusKey);
2392
2396
  };
2393
2397
  const getActiveEditorId = () => {
2394
2398
  // @ts-ignore
2395
- return invoke$1('GetActiveEditor.getActiveEditorId');
2399
+ return invoke$2('GetActiveEditor.getActiveEditorId');
2396
2400
  };
2397
2401
  const getWorkspacePath = () => {
2398
- return invoke$1('Workspace.getPath');
2402
+ return invoke$2('Workspace.getPath');
2399
2403
  };
2400
2404
  const sendMessagePortToRendererProcess = async port => {
2401
2405
  const command = 'HandleMessagePort.handleMessagePort';
@@ -2403,20 +2407,20 @@ const sendMessagePortToRendererProcess = async port => {
2403
2407
  await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker);
2404
2408
  };
2405
2409
  const getPreference = async key => {
2406
- return await invoke$1('Preferences.get', key);
2410
+ return await invoke$2('Preferences.get', key);
2407
2411
  };
2408
2412
  const getAllExtensions$2 = async () => {
2409
- return invoke$1('ExtensionManagement.getAllExtensions');
2413
+ return invoke$2('ExtensionManagement.getAllExtensions');
2410
2414
  };
2411
2415
  const rerenderEditor = async key => {
2412
2416
  // @ts-ignore
2413
- return invoke$1('Editor.rerender', key);
2417
+ return invoke$2('Editor.rerender', key);
2414
2418
  };
2415
2419
  const handleDebugPaused = async params => {
2416
- await invoke$1('Run And Debug.handlePaused', params);
2420
+ await invoke$2('Run And Debug.handlePaused', params);
2417
2421
  };
2418
2422
  const openUri = async (uri, focus, options) => {
2419
- await invoke$1('Main.openUri', uri, focus, options);
2423
+ await invoke$2('Main.openUri', uri, focus, options);
2420
2424
  };
2421
2425
  const sendMessagePortToSyntaxHighlightingWorker = async port => {
2422
2426
  await invokeAndTransfer(
@@ -2424,76 +2428,76 @@ const sendMessagePortToSyntaxHighlightingWorker = async port => {
2424
2428
  'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
2425
2429
  };
2426
2430
  const handleDebugScriptParsed = async script => {
2427
- await invoke$1('Run And Debug.handleScriptParsed', script);
2431
+ await invoke$2('Run And Debug.handleScriptParsed', script);
2428
2432
  };
2429
2433
  const getWindowId = async () => {
2430
- return invoke$1('GetWindowId.getWindowId');
2434
+ return invoke$2('GetWindowId.getWindowId');
2431
2435
  };
2432
2436
  const getBlob = async uri => {
2433
2437
  // @ts-ignore
2434
- return invoke$1('FileSystem.getBlob', uri);
2438
+ return invoke$2('FileSystem.getBlob', uri);
2435
2439
  };
2436
2440
  const getExtensionCommands = async () => {
2437
- return invoke$1('ExtensionHost.getCommands');
2441
+ return invoke$2('ExtensionHost.getCommands');
2438
2442
  };
2439
2443
  const showErrorDialog = async errorInfo => {
2440
2444
  // @ts-ignore
2441
- await invoke$1('ErrorHandling.showErrorDialog', errorInfo);
2445
+ await invoke$2('ErrorHandling.showErrorDialog', errorInfo);
2442
2446
  };
2443
2447
  const getFolderSize$1 = async uri => {
2444
2448
  // @ts-ignore
2445
- return await invoke$1('FileSystem.getFolderSize', uri);
2449
+ return await invoke$2('FileSystem.getFolderSize', uri);
2446
2450
  };
2447
2451
  const getExtension$3 = async id => {
2448
2452
  // @ts-ignore
2449
- return invoke$1('ExtensionManagement.getExtension', id);
2453
+ return invoke$2('ExtensionManagement.getExtension', id);
2450
2454
  };
2451
2455
  const getMarkdownDom = async html => {
2452
2456
  // @ts-ignore
2453
- return invoke$1('Markdown.getVirtualDom', html);
2457
+ return invoke$2('Markdown.getVirtualDom', html);
2454
2458
  };
2455
2459
  const renderMarkdown$1 = async (markdown, options) => {
2456
2460
  // @ts-ignore
2457
- return invoke$1('Markdown.renderMarkdown', markdown, options);
2461
+ return invoke$2('Markdown.renderMarkdown', markdown, options);
2458
2462
  };
2459
2463
  const openNativeFolder$1 = async uri => {
2460
2464
  // @ts-ignore
2461
- await invoke$1('OpenNativeFolder.openNativeFolder', uri);
2465
+ await invoke$2('OpenNativeFolder.openNativeFolder', uri);
2462
2466
  };
2463
2467
  const uninstallExtension$1 = async id => {
2464
- return invoke$1('ExtensionManagement.uninstall', id);
2468
+ return invoke$2('ExtensionManagement.uninstall', id);
2465
2469
  };
2466
2470
  const installExtension = async id => {
2467
2471
  // @ts-ignore
2468
- return invoke$1('ExtensionManagement.install', id);
2472
+ return invoke$2('ExtensionManagement.install', id);
2469
2473
  };
2470
2474
  const openExtensionSearch$2 = async () => {
2471
2475
  // @ts-ignore
2472
- return invoke$1('SideBar.openViewlet', 'Extensions');
2476
+ return invoke$2('SideBar.openViewlet', 'Extensions');
2473
2477
  };
2474
2478
  const setExtensionsSearchValue$1 = async searchValue => {
2475
2479
  // @ts-ignore
2476
- return invoke$1('Extensions.handleInput', searchValue);
2480
+ return invoke$2('Extensions.handleInput', searchValue);
2477
2481
  };
2478
2482
  const openExternal = async uri => {
2479
2483
  // @ts-ignore
2480
- await invoke$1('Open.openExternal', uri);
2484
+ await invoke$2('Open.openExternal', uri);
2481
2485
  };
2482
2486
  const openUrl$2 = async uri => {
2483
2487
  // @ts-ignore
2484
- await invoke$1('Open.openUrl', uri);
2488
+ await invoke$2('Open.openUrl', uri);
2485
2489
  };
2486
2490
  const getAllPreferences = async () => {
2487
2491
  // @ts-ignore
2488
- return invoke$1('Preferences.getAll');
2492
+ return invoke$2('Preferences.getAll');
2489
2493
  };
2490
2494
  const showSaveFilePicker = async () => {
2491
2495
  // @ts-ignore
2492
- return invoke$1('FilePicker.showSaveFilePicker');
2496
+ return invoke$2('FilePicker.showSaveFilePicker');
2493
2497
  };
2494
2498
  const getLogsDir = async () => {
2495
2499
  // @ts-ignore
2496
- return invoke$1('PlatformPaths.getLogsDir');
2500
+ return invoke$2('PlatformPaths.getLogsDir');
2497
2501
  };
2498
2502
  const registerMockRpc = commandMap => {
2499
2503
  const mockRpc = createMockRpc({
@@ -2542,7 +2546,7 @@ const RendererWorker = {
2542
2546
  handleDebugResumed,
2543
2547
  handleDebugScriptParsed,
2544
2548
  installExtension,
2545
- invoke: invoke$1,
2549
+ invoke: invoke$2,
2546
2550
  invokeAndTransfer,
2547
2551
  openExtensionSearch: openExtensionSearch$2,
2548
2552
  openExternal,
@@ -3280,6 +3284,7 @@ const {
3280
3284
  enableExtension: enableExtension$1,
3281
3285
  getAllExtensions: getAllExtensions$1,
3282
3286
  getExtension: getExtension$2,
3287
+ invoke: invoke$1,
3283
3288
  openExtensionSearch: openExtensionSearch$1,
3284
3289
  openNativeFolder,
3285
3290
  openUrl: openUrl$1,
@@ -3341,6 +3346,11 @@ const copyImageUrl = async state => {
3341
3346
  return state;
3342
3347
  };
3343
3348
 
3349
+ const copyReadmeLink = async (state, href) => {
3350
+ await writeText(href);
3351
+ return state;
3352
+ };
3353
+
3344
3354
  const {
3345
3355
  get,
3346
3356
  set,
@@ -3464,6 +3474,34 @@ const dispose = uid => {
3464
3474
  dispose$1(uid);
3465
3475
  };
3466
3476
 
3477
+ const getMenuEntriesReadmeLink = props => {
3478
+ return [{
3479
+ id: 'copyLink',
3480
+ label: copyLink(),
3481
+ flags: None$2,
3482
+ command: 'ExtensionDetail.copyReadmeLink',
3483
+ args: [props.href]
3484
+ }];
3485
+ };
3486
+ const getMenuEntriesReadme$1 = props => {
3487
+ if (props.href) {
3488
+ return getMenuEntriesReadmeLink(props);
3489
+ }
3490
+ return [{
3491
+ id: 'copy',
3492
+ label: copy$1(),
3493
+ flags: None$2,
3494
+ command: 'ExtensionDetail.copyReadmeText',
3495
+ args: []
3496
+ }];
3497
+ };
3498
+
3499
+ // TODO maybe add props object as second property with properties like imagesrc, linksrc, nodeName
3500
+
3501
+ const getMenuEntries2 = (state, props) => {
3502
+ return getMenuEntriesReadme$1(props);
3503
+ };
3504
+
3467
3505
  const None = 0;
3468
3506
 
3469
3507
  const getCopyMenuEntry = () => ({
@@ -3507,6 +3545,11 @@ const getLinkMenuEntries = props => {
3507
3545
 
3508
3546
  const getMenuEntries = props => [...getLinkMenuEntries(props), ...getImageMenuEntries(props), getCopyMenuEntry()];
3509
3547
 
3548
+ const ExtensionDetailIconContextMenu$2 = 4091;
3549
+ const getMenuIds = () => {
3550
+ return [ExtensionDetailReadme, ExtensionDetailIconContextMenu$2];
3551
+ };
3552
+
3510
3553
  const getMenuEntriesReadme = () => [{
3511
3554
  id: 'copy',
3512
3555
  label: copy$1(),
@@ -3788,6 +3831,10 @@ const handleIconError = state => {
3788
3831
  const show = async (menuId, x, y) => {
3789
3832
  await showContextMenu(x, y, menuId);
3790
3833
  };
3834
+ const show2 = async (uid, menuId, x, y, args) => {
3835
+ // @ts-ignore
3836
+ await invoke$1('ContextMenu.show2', uid, menuId, x, y, args);
3837
+ };
3791
3838
 
3792
3839
  const ExtensionDetailIconContextMenu = 4091;
3793
3840
 
@@ -3811,7 +3858,15 @@ const handleReadmeClick = async (state, nodeName, href) => {
3811
3858
  };
3812
3859
 
3813
3860
  const handleReadmeContextMenu = async (state, x, y, nodeName, href) => {
3814
- await show(ExtensionDetailReadme, x, y);
3861
+ const {
3862
+ uid
3863
+ } = state;
3864
+ // TODO maybe also pass other args
3865
+ await show2(uid, ExtensionDetailReadme, x, y, {
3866
+ menuId: ExtensionDetailReadme,
3867
+ nodeName,
3868
+ href
3869
+ });
3815
3870
  // TODO
3816
3871
  return state;
3817
3872
  };
@@ -5283,12 +5338,15 @@ const saveState = state => {
5283
5338
  const commandMap = {
5284
5339
  'ExtensionDetail.copyImage': wrapCommand(copyImage),
5285
5340
  'ExtensionDetail.copyImageUrl': wrapCommand(copyImageUrl),
5341
+ 'ExtensionDetail.copyReadmeLink': wrapCommand(copyReadmeLink),
5286
5342
  'ExtensionDetail.create': create,
5287
5343
  'ExtensionDetail.diff2': diff2,
5288
5344
  'ExtensionDetail.dispose': dispose,
5289
5345
  'ExtensionDetail.getCommandIds': getCommandIds,
5290
5346
  'ExtensionDetail.getMenuEntries': getMenuEntries,
5347
+ 'ExtensionDetail.getMenuEntries2': wrapGetter(getMenuEntries2),
5291
5348
  'ExtensionDetail.getMenus': getMenus,
5349
+ 'ExtensionDetail.getMenuIds': getMenuIds,
5292
5350
  'ExtensionDetail.handleClickCategory': wrapCommand(handleClickCategory),
5293
5351
  'ExtensionDetail.handleReadmeContextMenu': wrapCommand(handleReadmeContextMenu),
5294
5352
  'ExtensionDetail.handleAdditionalDetailsContextMenu': wrapCommand(handleAdditionalDetailContextMenu),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-detail-view",
3
- "version": "4.17.0",
3
+ "version": "5.0.0",
4
4
  "description": "Extension Detail View Worker",
5
5
  "repository": {
6
6
  "type": "git",