@lvce-editor/extension-detail-view 4.16.0 → 4.18.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,7 +41,8 @@ const LastReleased = 'Last Released';
42
41
  const LastUpdated = 'Last Updated';
43
42
  const License = 'License';
44
43
  const Marketplace = 'Marketplace';
45
- const None$3 = 'None';
44
+ const Name = 'Name';
45
+ const None$4 = 'None';
46
46
  const NoReadmeFound = 'No Readme Found.';
47
47
  const OpenImageInNewTab = 'Open Image in New Tab';
48
48
  const OpenInNewTab = 'Open 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
  };
@@ -102,7 +106,7 @@ const features$1 = () => {
102
106
  return i18nString(Features$2);
103
107
  };
104
108
  const none = () => {
105
- return i18nString(None$3);
109
+ return i18nString(None$4);
106
110
  };
107
111
  const openInNewTab = () => {
108
112
  return i18nString(OpenInNewTab);
@@ -288,7 +292,7 @@ const featureActivationEventsEnabled = extension => {
288
292
  return Array.isArray(extension.activation);
289
293
  };
290
294
 
291
- const None$2 = 'none';
295
+ const None$3 = 'none';
292
296
  const Panel = 'panel';
293
297
  const Tab = 'tab';
294
298
  const TabList = 'tablist';
@@ -324,6 +328,8 @@ const TargetName = 'event.target.name';
324
328
 
325
329
  const ExtensionDetailReadme = 20;
326
330
 
331
+ const None$2 = 0;
332
+
327
333
  const DebugWorker = 55;
328
334
  const ExtensionHostWorker = 44;
329
335
  const FileSystemWorker$1 = 209;
@@ -2810,7 +2816,7 @@ const getScrollToTopVirtualDom = scrollToTopButtonEnabled => {
2810
2816
  type: Div,
2811
2817
  className: 'MaskIcon MaskIconChevronUp',
2812
2818
  childCount: 0,
2813
- role: None$2
2819
+ role: None$3
2814
2820
  }];
2815
2821
  };
2816
2822
 
@@ -3462,6 +3468,34 @@ const dispose = uid => {
3462
3468
  dispose$1(uid);
3463
3469
  };
3464
3470
 
3471
+ const getMenuEntriesReadmeLink = props => {
3472
+ return [{
3473
+ id: 'copyLink',
3474
+ label: copyLink(),
3475
+ flags: None$2,
3476
+ command: 'ExtensionDetail.copyLink',
3477
+ args: []
3478
+ }];
3479
+ };
3480
+ const getMenuEntriesReadme$1 = props => {
3481
+ if (props.href) {
3482
+ return getMenuEntriesReadmeLink();
3483
+ }
3484
+ return [{
3485
+ id: 'copy',
3486
+ label: copy$1(),
3487
+ flags: None$2,
3488
+ command: 'ExtensionDetail.copyReadmeText',
3489
+ args: []
3490
+ }];
3491
+ };
3492
+
3493
+ // TODO maybe add props object as second property with properties like imagesrc, linksrc, nodeName
3494
+
3495
+ const getMenuEntries2 = (state, props) => {
3496
+ return getMenuEntriesReadme$1(props);
3497
+ };
3498
+
3465
3499
  const None = 0;
3466
3500
 
3467
3501
  const getCopyMenuEntry = () => ({
@@ -3505,11 +3539,26 @@ const getLinkMenuEntries = props => {
3505
3539
 
3506
3540
  const getMenuEntries = props => [...getLinkMenuEntries(props), ...getImageMenuEntries(props), getCopyMenuEntry()];
3507
3541
 
3508
- const ExtensionDetailIconContextMenu = 4091;
3542
+ const ExtensionDetailIconContextMenu$2 = 4091;
3543
+ const getMenuIds = () => {
3544
+ return [ExtensionDetailReadme, ExtensionDetailIconContextMenu$2];
3545
+ };
3546
+
3547
+ const getMenuEntriesReadme = () => [{
3548
+ id: 'copy',
3549
+ label: copy$1(),
3550
+ flags: None$2,
3551
+ command: 'ExtensionDetail.copyReadmeText',
3552
+ args: []
3553
+ }];
3509
3554
 
3555
+ const ExtensionDetailIconContextMenu$1 = 4091;
3510
3556
  const getMenus = () => {
3511
3557
  return [{
3512
- id: ExtensionDetailIconContextMenu,
3558
+ id: ExtensionDetailReadme,
3559
+ entries: getMenuEntriesReadme()
3560
+ }, {
3561
+ id: ExtensionDetailIconContextMenu$1,
3513
3562
  entries: [{
3514
3563
  id: 'openImageInNewTab',
3515
3564
  label: openImageInNewTab$1(),
@@ -3777,6 +3826,8 @@ const show = async (menuId, x, y) => {
3777
3826
  await showContextMenu(x, y, menuId);
3778
3827
  };
3779
3828
 
3829
+ const ExtensionDetailIconContextMenu = 4091;
3830
+
3780
3831
  const handleImageContextMenu = async (state, eventX, eventY) => {
3781
3832
  await show(ExtensionDetailIconContextMenu, eventX, eventY);
3782
3833
  return state;
@@ -5274,7 +5325,9 @@ const commandMap = {
5274
5325
  'ExtensionDetail.dispose': dispose,
5275
5326
  'ExtensionDetail.getCommandIds': getCommandIds,
5276
5327
  'ExtensionDetail.getMenuEntries': getMenuEntries,
5328
+ 'ExtensionDetail.getMenuEntries2': wrapGetter(getMenuEntries2),
5277
5329
  'ExtensionDetail.getMenus': getMenus,
5330
+ 'ExtensionDetail.getMenuIds': getMenuIds,
5278
5331
  'ExtensionDetail.handleClickCategory': wrapCommand(handleClickCategory),
5279
5332
  'ExtensionDetail.handleReadmeContextMenu': wrapCommand(handleReadmeContextMenu),
5280
5333
  '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.16.0",
3
+ "version": "4.18.0",
4
4
  "description": "Extension Detail View Worker",
5
5
  "repository": {
6
6
  "type": "git",