@lvce-editor/extension-detail-view 4.17.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,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
  };
@@ -3464,6 +3468,34 @@ const dispose = uid => {
3464
3468
  dispose$1(uid);
3465
3469
  };
3466
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
+
3467
3499
  const None = 0;
3468
3500
 
3469
3501
  const getCopyMenuEntry = () => ({
@@ -3507,6 +3539,11 @@ const getLinkMenuEntries = props => {
3507
3539
 
3508
3540
  const getMenuEntries = props => [...getLinkMenuEntries(props), ...getImageMenuEntries(props), getCopyMenuEntry()];
3509
3541
 
3542
+ const ExtensionDetailIconContextMenu$2 = 4091;
3543
+ const getMenuIds = () => {
3544
+ return [ExtensionDetailReadme, ExtensionDetailIconContextMenu$2];
3545
+ };
3546
+
3510
3547
  const getMenuEntriesReadme = () => [{
3511
3548
  id: 'copy',
3512
3549
  label: copy$1(),
@@ -5288,7 +5325,9 @@ const commandMap = {
5288
5325
  'ExtensionDetail.dispose': dispose,
5289
5326
  'ExtensionDetail.getCommandIds': getCommandIds,
5290
5327
  'ExtensionDetail.getMenuEntries': getMenuEntries,
5328
+ 'ExtensionDetail.getMenuEntries2': wrapGetter(getMenuEntries2),
5291
5329
  'ExtensionDetail.getMenus': getMenus,
5330
+ 'ExtensionDetail.getMenuIds': getMenuIds,
5292
5331
  'ExtensionDetail.handleClickCategory': wrapCommand(handleClickCategory),
5293
5332
  'ExtensionDetail.handleReadmeContextMenu': wrapCommand(handleReadmeContextMenu),
5294
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.17.0",
3
+ "version": "4.18.0",
4
4
  "description": "Extension Detail View Worker",
5
5
  "repository": {
6
6
  "type": "git",