@lvce-editor/extension-detail-view 3.34.0 → 3.35.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.
|
@@ -1472,15 +1472,15 @@ const getFeatureDetailsWebView = extension => {
|
|
|
1472
1472
|
const Changelog$1 = 'Changelog';
|
|
1473
1473
|
const Commands = 'Commands';
|
|
1474
1474
|
const Details = 'Details';
|
|
1475
|
+
const Disable = 'Disable';
|
|
1475
1476
|
const Features$1 = 'Features';
|
|
1476
1477
|
const JsonValidation = 'JsonValidation';
|
|
1477
1478
|
const ProgrammingLanguages = 'ProgrammingLanguages';
|
|
1479
|
+
const SetColorTheme = 'SetColorTheme';
|
|
1478
1480
|
const Settings = 'Settings';
|
|
1479
|
-
const WebViews = 'WebViews';
|
|
1480
1481
|
const Theme = 'Theme';
|
|
1481
|
-
const SetColorTheme = 'SetColorTheme';
|
|
1482
|
-
const Disable = 'Disable';
|
|
1483
1482
|
const Uninstall = 'Uninstall';
|
|
1483
|
+
const WebViews = 'WebViews';
|
|
1484
1484
|
|
|
1485
1485
|
const getFeatureDetailsHandler = featureName => {
|
|
1486
1486
|
switch (featureName) {
|
|
@@ -2519,9 +2519,7 @@ const getDetailsVirtualDom = (sanitizedReadmeHtml, displaySize, extensionId, ext
|
|
|
2519
2519
|
return dom;
|
|
2520
2520
|
};
|
|
2521
2521
|
|
|
2522
|
-
const getCommandTableEntries =
|
|
2523
|
-
const commands = extension.commands || [];
|
|
2524
|
-
const rows = commands.map(getCommandTableEntry);
|
|
2522
|
+
const getCommandTableEntries = rows => {
|
|
2525
2523
|
const id$1 = id();
|
|
2526
2524
|
const label$1 = label();
|
|
2527
2525
|
return {
|
|
@@ -2613,9 +2611,9 @@ const getTableVirtualDom = tableInfo => {
|
|
|
2613
2611
|
};
|
|
2614
2612
|
|
|
2615
2613
|
// TODO have typed view-model
|
|
2616
|
-
const getFeatureCommandsVirtualDom =
|
|
2614
|
+
const getFeatureCommandsVirtualDom = commands$1 => {
|
|
2617
2615
|
const heading = commands();
|
|
2618
|
-
const tableInfo = getCommandTableEntries(
|
|
2616
|
+
const tableInfo = getCommandTableEntries(commands$1);
|
|
2619
2617
|
return [{
|
|
2620
2618
|
type: VirtualDomElements.Div,
|
|
2621
2619
|
className: FeatureContent,
|
|
@@ -2623,9 +2621,7 @@ const getFeatureCommandsVirtualDom = extension => {
|
|
|
2623
2621
|
}, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
2624
2622
|
};
|
|
2625
2623
|
|
|
2626
|
-
const getJsonValidationTableEntries =
|
|
2627
|
-
const validations = extension.jsonValidation || [];
|
|
2628
|
-
const rows = validations.map(getJsonValidationTableEntry);
|
|
2624
|
+
const getJsonValidationTableEntries = rows => {
|
|
2629
2625
|
return {
|
|
2630
2626
|
headings: [fileMatch(), schema()],
|
|
2631
2627
|
rows
|
|
@@ -2637,9 +2633,9 @@ const parentNode = {
|
|
|
2637
2633
|
className: FeatureContent,
|
|
2638
2634
|
childCount: 2
|
|
2639
2635
|
};
|
|
2640
|
-
const getFeatureJsonValidationVirtualDom =
|
|
2636
|
+
const getFeatureJsonValidationVirtualDom = jsonValidation$1 => {
|
|
2641
2637
|
const heading = jsonValidation();
|
|
2642
|
-
const tableInfo = getJsonValidationTableEntries(
|
|
2638
|
+
const tableInfo = getJsonValidationTableEntries(jsonValidation$1);
|
|
2643
2639
|
return [parentNode, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
2644
2640
|
};
|
|
2645
2641
|
|
|
@@ -2665,9 +2661,7 @@ const getFeatureProgrammingLanguagesVirtualDom = () => {
|
|
|
2665
2661
|
}, ...getFeatureContentHeadingVirtualDom(heading)];
|
|
2666
2662
|
};
|
|
2667
2663
|
|
|
2668
|
-
const getSettingsTableEntries =
|
|
2669
|
-
const settings = extension.settings || [];
|
|
2670
|
-
const rows = settings.map(getSettingsTableEntry);
|
|
2664
|
+
const getSettingsTableEntries = rows => {
|
|
2671
2665
|
const textId = id();
|
|
2672
2666
|
const textLabel = label();
|
|
2673
2667
|
return {
|
|
@@ -2676,9 +2670,9 @@ const getSettingsTableEntries = extension => {
|
|
|
2676
2670
|
};
|
|
2677
2671
|
};
|
|
2678
2672
|
|
|
2679
|
-
const getFeatureSettingsVirtualDom =
|
|
2673
|
+
const getFeatureSettingsVirtualDom = rows => {
|
|
2680
2674
|
const heading = settings();
|
|
2681
|
-
const tableInfo = getSettingsTableEntries(
|
|
2675
|
+
const tableInfo = getSettingsTableEntries(rows);
|
|
2682
2676
|
return [{
|
|
2683
2677
|
type: VirtualDomElements.Div,
|
|
2684
2678
|
className: FeatureContent,
|
|
@@ -2746,8 +2740,7 @@ const getWebViewVirtualDom = webView => {
|
|
|
2746
2740
|
}, item, heading, text(textId), pre, text(id$1), item, heading, text(textSelector), pre, text(selectorString), item, heading, text(textContentSecurityPolicy), pre, text(contentSecurityPolicyString), item, heading, text(textElements), pre, text(elementsString)];
|
|
2747
2741
|
};
|
|
2748
2742
|
|
|
2749
|
-
const getFeatureWebViewsVirtualDom =
|
|
2750
|
-
const webViews$1 = getWebViews(extension);
|
|
2743
|
+
const getFeatureWebViewsVirtualDom = webViews$1 => {
|
|
2751
2744
|
const heading = webViews();
|
|
2752
2745
|
return [{
|
|
2753
2746
|
type: VirtualDomElements.Div,
|
|
@@ -2759,20 +2752,20 @@ const getFeatureWebViewsVirtualDom = extension => {
|
|
|
2759
2752
|
}, ...webViews$1.flatMap(getWebViewVirtualDom)];
|
|
2760
2753
|
};
|
|
2761
2754
|
|
|
2762
|
-
const getFeatureContentVirtualDom = (
|
|
2755
|
+
const getFeatureContentVirtualDom = (themesDom, selectedFeature, commands, jsonValidation, settings, webViews) => {
|
|
2763
2756
|
switch (selectedFeature) {
|
|
2764
2757
|
case Theme:
|
|
2765
2758
|
return getFeatureThemesVirtualDom(themesDom);
|
|
2766
2759
|
case Commands:
|
|
2767
|
-
return getFeatureCommandsVirtualDom(
|
|
2760
|
+
return getFeatureCommandsVirtualDom(commands);
|
|
2768
2761
|
case JsonValidation:
|
|
2769
|
-
return getFeatureJsonValidationVirtualDom(
|
|
2762
|
+
return getFeatureJsonValidationVirtualDom(jsonValidation);
|
|
2770
2763
|
case ProgrammingLanguages:
|
|
2771
2764
|
return getFeatureProgrammingLanguagesVirtualDom();
|
|
2772
2765
|
case Settings:
|
|
2773
|
-
return getFeatureSettingsVirtualDom(
|
|
2766
|
+
return getFeatureSettingsVirtualDom(settings);
|
|
2774
2767
|
case WebViews:
|
|
2775
|
-
return getFeatureWebViewsVirtualDom(
|
|
2768
|
+
return getFeatureWebViewsVirtualDom(webViews);
|
|
2776
2769
|
default:
|
|
2777
2770
|
return getFeatureNotImplementedVirtualDom();
|
|
2778
2771
|
}
|
|
@@ -2804,7 +2797,7 @@ const getFeatureListVirtualDom = features => {
|
|
|
2804
2797
|
}, ...features.flatMap(getFeatureListItemVirtualDom)];
|
|
2805
2798
|
};
|
|
2806
2799
|
|
|
2807
|
-
const getFeaturesVirtualDom = (features, themesDom, selectedFeature,
|
|
2800
|
+
const getFeaturesVirtualDom = (features, themesDom, selectedFeature, commands, jsonValidation, settings, webViews) => {
|
|
2808
2801
|
if (features.length === 0) {
|
|
2809
2802
|
const none$1 = none();
|
|
2810
2803
|
return [{
|
|
@@ -2821,15 +2814,15 @@ const getFeaturesVirtualDom = (features, themesDom, selectedFeature, extension)
|
|
|
2821
2814
|
type: VirtualDomElements.Div,
|
|
2822
2815
|
className: mergeClassNames(Sash, SashVertical),
|
|
2823
2816
|
childCount: 0
|
|
2824
|
-
}, ...getFeatureContentVirtualDom(
|
|
2817
|
+
}, ...getFeatureContentVirtualDom(themesDom, selectedFeature, commands, jsonValidation, settings, webViews)];
|
|
2825
2818
|
};
|
|
2826
2819
|
|
|
2827
|
-
const getExtensionDetailContentVirtualDom = (sanitizedReadmeHtml, themesDom, selectedTab, features, displaySize, extensionId, extensionVersion, selectedFeature,
|
|
2820
|
+
const getExtensionDetailContentVirtualDom = (sanitizedReadmeHtml, themesDom, selectedTab, features, displaySize, extensionId, extensionVersion, selectedFeature, width, scrollToTopButtonEnabled, categories, resources, breakpoint, commands, jsonValidation, settings, webViews, extensionUri) => {
|
|
2828
2821
|
switch (selectedTab) {
|
|
2829
2822
|
case Details:
|
|
2830
|
-
return getDetailsVirtualDom(sanitizedReadmeHtml, displaySize, extensionId, extensionVersion, width,
|
|
2823
|
+
return getDetailsVirtualDom(sanitizedReadmeHtml, displaySize, extensionId, extensionVersion, width, extensionUri, scrollToTopButtonEnabled, categories, resources, breakpoint);
|
|
2831
2824
|
case Features$1:
|
|
2832
|
-
return getFeaturesVirtualDom(features, themesDom, selectedFeature,
|
|
2825
|
+
return getFeaturesVirtualDom(features, themesDom, selectedFeature, commands, jsonValidation, settings, webViews);
|
|
2833
2826
|
case Changelog$1:
|
|
2834
2827
|
return getChangelogVirtualDom();
|
|
2835
2828
|
default:
|
|
@@ -3001,7 +2994,6 @@ const getExtensionDetailVirtualDom = (newState, selectedTab) => {
|
|
|
3001
2994
|
displaySize,
|
|
3002
2995
|
themesMarkdownDom,
|
|
3003
2996
|
selectedFeature,
|
|
3004
|
-
extension,
|
|
3005
2997
|
sizeValue,
|
|
3006
2998
|
isBuiltin,
|
|
3007
2999
|
categories,
|
|
@@ -3017,8 +3009,14 @@ const getExtensionDetailVirtualDom = (newState, selectedTab) => {
|
|
|
3017
3009
|
detailsVirtualDom,
|
|
3018
3010
|
features,
|
|
3019
3011
|
extensionId,
|
|
3020
|
-
extensionVersion
|
|
3012
|
+
extensionVersion,
|
|
3013
|
+
commands,
|
|
3014
|
+
jsonValidation,
|
|
3015
|
+
settings,
|
|
3016
|
+
webViews,
|
|
3017
|
+
extension
|
|
3021
3018
|
} = newState;
|
|
3019
|
+
const extensionUri = extension.uri || extension.path || '';
|
|
3022
3020
|
const width = newState?.width || 500;
|
|
3023
3021
|
const tabs = getTabs(selectedTab);
|
|
3024
3022
|
const sizeClass = getClassNames(sizeValue);
|
|
@@ -3028,7 +3026,7 @@ const getExtensionDetailVirtualDom = (newState, selectedTab) => {
|
|
|
3028
3026
|
type: VirtualDomElements.Div,
|
|
3029
3027
|
className: mergeClassNames(Viewlet, ExtensionDetail, sizeClass),
|
|
3030
3028
|
childCount: 3
|
|
3031
|
-
}, ...getExtensionDetailHeaderVirtualDom(name, iconSrc, description, badge, buttonDefs, settingsButtonEnabled), ...getTabsVirtualDom(tabs), ...getExtensionDetailContentVirtualDom(detailsVirtualDom, themesMarkdownDom, selectedTab, features, displaySize, extensionId, extensionVersion, selectedFeature,
|
|
3029
|
+
}, ...getExtensionDetailHeaderVirtualDom(name, iconSrc, description, badge, buttonDefs, settingsButtonEnabled), ...getTabsVirtualDom(tabs), ...getExtensionDetailContentVirtualDom(detailsVirtualDom, themesMarkdownDom, selectedTab, features, displaySize, extensionId, extensionVersion, selectedFeature, width, scrollToTopButtonEnabled, categories, resources, showAdditionalDetailsBreakpoint, commands, jsonValidation, settings, webViews, extensionUri)];
|
|
3032
3030
|
return dom;
|
|
3033
3031
|
};
|
|
3034
3032
|
|