@lvce-editor/extension-detail-view 3.14.0 → 3.15.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.
|
@@ -2066,6 +2066,26 @@ const getFeatureThemesVirtualDom = themesHtml => {
|
|
|
2066
2066
|
}, ...markdownDom];
|
|
2067
2067
|
};
|
|
2068
2068
|
|
|
2069
|
+
const toWebView = rawWebView => {
|
|
2070
|
+
const {
|
|
2071
|
+
id,
|
|
2072
|
+
selector,
|
|
2073
|
+
contentSecurityPolicy,
|
|
2074
|
+
elements
|
|
2075
|
+
} = rawWebView;
|
|
2076
|
+
return {
|
|
2077
|
+
id,
|
|
2078
|
+
selectorString: JSON.stringify(selector),
|
|
2079
|
+
contentSecurityPolicyString: JSON.stringify(contentSecurityPolicy),
|
|
2080
|
+
elementsString: JSON.stringify(elements, null, 2)
|
|
2081
|
+
};
|
|
2082
|
+
};
|
|
2083
|
+
|
|
2084
|
+
const getWebViews = extension => {
|
|
2085
|
+
const rawWebViews = extension.webViews || [];
|
|
2086
|
+
return rawWebViews.map(toWebView);
|
|
2087
|
+
};
|
|
2088
|
+
|
|
2069
2089
|
const heading$1 = {
|
|
2070
2090
|
type: H2$1,
|
|
2071
2091
|
className: DefinitionListItemHeading,
|
|
@@ -2081,14 +2101,12 @@ const item = {
|
|
|
2081
2101
|
className: DefinitionListItem,
|
|
2082
2102
|
childCount: 2
|
|
2083
2103
|
};
|
|
2084
|
-
|
|
2085
|
-
// TODO move json stringify to view model
|
|
2086
2104
|
const getWebViewVirtualDom = webView => {
|
|
2087
2105
|
const {
|
|
2088
2106
|
id: id$1,
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2107
|
+
selectorString,
|
|
2108
|
+
contentSecurityPolicyString,
|
|
2109
|
+
elementsString
|
|
2092
2110
|
} = webView;
|
|
2093
2111
|
const textId = id();
|
|
2094
2112
|
const textSelector = selector();
|
|
@@ -2098,11 +2116,11 @@ const getWebViewVirtualDom = webView => {
|
|
|
2098
2116
|
type: Div$1,
|
|
2099
2117
|
className: FeatureWebView,
|
|
2100
2118
|
childCount: 5
|
|
2101
|
-
}, item, heading$1, text(textId), pre, text(id$1), item, heading$1, text(textSelector), pre, text(
|
|
2119
|
+
}, item, heading$1, text(textId), pre, text(id$1), item, heading$1, text(textSelector), pre, text(selectorString), item, heading$1, text(textContentSecurityPolicy), pre, text(contentSecurityPolicyString), item, heading$1, text(textElements), pre, text(elementsString)];
|
|
2102
2120
|
};
|
|
2103
2121
|
|
|
2104
2122
|
const getFeatureWebViewsVirtualDom = extension => {
|
|
2105
|
-
const webViews$1 = extension
|
|
2123
|
+
const webViews$1 = getWebViews(extension);
|
|
2106
2124
|
const heading = webViews();
|
|
2107
2125
|
return [{
|
|
2108
2126
|
type: Div$1,
|