@lvce-editor/extension-detail-view 4.12.0 → 4.13.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.
@@ -446,6 +446,8 @@ const getActivationEventsVirtualDom = state => {
446
446
  const Text = 1;
447
447
  const Code = 2;
448
448
  const Link = 7;
449
+ const CodeList = 8;
450
+ const CheckMark = 9;
449
451
 
450
452
  const getCommandTableEntry = command => {
451
453
  // TODO watch out for command being null/undefined/number/string/array
@@ -507,6 +509,41 @@ const getTableHeadingVirtualDom = heading => {
507
509
  }, text(heading)];
508
510
  };
509
511
 
512
+ const getCheckedText = checked => {
513
+ if (checked) {
514
+ return 'yes';
515
+ }
516
+ return 'no';
517
+ };
518
+ const getCellCheckMarkVirtualDom = (value, props) => {
519
+ const {
520
+ checked
521
+ } = props;
522
+ const checkedText = getCheckedText(checked);
523
+ return [{
524
+ type: Td,
525
+ className: TableCell,
526
+ childCount: 1
527
+ }, text(checkedText)];
528
+ };
529
+
530
+ const getListItemDom = item => {
531
+ return [{
532
+ type: Code$2,
533
+ childCount: 1
534
+ }, text(item)];
535
+ };
536
+ const getCellCodeListVirtualDom = (value, props) => {
537
+ const {
538
+ listItems
539
+ } = props;
540
+ return [{
541
+ type: Td,
542
+ className: TableCell,
543
+ childCount: listItems.length
544
+ }, ...listItems.flatMap(getListItemDom)];
545
+ };
546
+
510
547
  const getCellCodeVirtualDom = (value, props) => {
511
548
  const tdClassName = props?.className ? `${TableCell} ${props.className}` : TableCell;
512
549
  return [{
@@ -559,6 +596,10 @@ const getCellRenderer = type => {
559
596
  return getCellTextVirtualDom;
560
597
  case Link:
561
598
  return getCellLinkVirtualDom;
599
+ case CodeList:
600
+ return getCellCodeListVirtualDom;
601
+ case CheckMark:
602
+ return getCellCheckMarkVirtualDom;
562
603
  default:
563
604
  throw new Error(`unexpected cell type ${type}`);
564
605
  }
@@ -836,7 +877,32 @@ const getJsonValidationVirtualDom = state => {
836
877
  };
837
878
 
838
879
  const getProgrammingLanguageTableEntry = programmingLanguage => {
839
- return [];
880
+ const {
881
+ id,
882
+ configuration,
883
+ extensions
884
+ } = programmingLanguage;
885
+ const name = ''; // TODO
886
+ const snippets = ''; // TODO
887
+ return [{
888
+ type: Text,
889
+ value: id
890
+ }, {
891
+ type: Text,
892
+ value: name
893
+ }, {
894
+ type: CodeList,
895
+ value: '',
896
+ listItems: extensions
897
+ }, {
898
+ type: CheckMark,
899
+ value: '',
900
+ checked: Boolean(configuration)
901
+ }, {
902
+ type: CheckMark,
903
+ value: '',
904
+ checked: Boolean(snippets)
905
+ }];
840
906
  };
841
907
 
842
908
  const getFeatureDetailsProgrammingLanguages = async extension => {
@@ -3022,7 +3088,7 @@ const getWebViewVirtualDom = webView => {
3022
3088
  return [{
3023
3089
  type: Div,
3024
3090
  className: FeatureWebView,
3025
- childCount: 5
3091
+ childCount: 4
3026
3092
  }, item, heading, text(textId), pre, text(id), item, heading, text(textSelector), pre, text(selectorString), item, heading, text(textContentSecurityPolicy), pre, text(contentSecurityPolicyString), item, heading, text(textElements), pre, text(elementsString)];
3027
3093
  };
3028
3094
 
@@ -3337,7 +3403,7 @@ const isEqual$2 = (oldState, newState) => {
3337
3403
  };
3338
3404
 
3339
3405
  const isEqual$1 = (oldState, newState) => {
3340
- return oldState.activationEvents === newState.activationEvents && oldState.badge === newState.badge && oldState.buttons === newState.buttons && oldState.categories === newState.categories && oldState.changelogVirtualDom === newState.changelogVirtualDom && oldState.commands === newState.commands && oldState.description === newState.description && oldState.detailsVirtualDom === newState.detailsVirtualDom && oldState.disabled === newState.disabled && oldState.displaySize === newState.displaySize && oldState.extensionId === newState.extensionId && oldState.extensionVersion === newState.extensionVersion && oldState.jsonValidation === newState.jsonValidation && oldState.selectedFeature === newState.selectedFeature && oldState.selectedTab === newState.selectedTab && oldState.settings === newState.settings && oldState.showSideBar === newState.showSideBar && oldState.sizeValue === newState.sizeValue && oldState.themesMarkdownDom === newState.themesMarkdownDom && oldState.webViews === newState.webViews;
3406
+ return oldState.activationEvents === newState.activationEvents && oldState.badge === newState.badge && oldState.buttons === newState.buttons && oldState.categories === newState.categories && oldState.changelogVirtualDom === newState.changelogVirtualDom && oldState.commands === newState.commands && oldState.description === newState.description && oldState.detailsVirtualDom === newState.detailsVirtualDom && oldState.disabled === newState.disabled && oldState.displaySize === newState.displaySize && oldState.extensionId === newState.extensionId && oldState.extensionVersion === newState.extensionVersion && oldState.features === newState.features && oldState.jsonValidation === newState.jsonValidation && oldState.selectedFeature === newState.selectedFeature && oldState.selectedTab === newState.selectedTab && oldState.settings === newState.settings && oldState.showSideBar === newState.showSideBar && oldState.sizeValue === newState.sizeValue && oldState.themesMarkdownDom === newState.themesMarkdownDom && oldState.webViews === newState.webViews;
3341
3407
  };
3342
3408
 
3343
3409
  const User = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-detail-view",
3
- "version": "4.12.0",
3
+ "version": "4.13.0",
4
4
  "description": "Extension Detail View Worker",
5
5
  "repository": {
6
6
  "type": "git",