@lvce-editor/output-view 2.6.0 → 2.7.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.
@@ -1028,6 +1028,7 @@ const createMockRpc = ({
1028
1028
  return mockRpc;
1029
1029
  };
1030
1030
 
1031
+ const Log = 'log';
1031
1032
  const ToolBar = 'toolbar';
1032
1033
 
1033
1034
  const Button = 1;
@@ -2010,6 +2011,8 @@ const getLineDom = parts => {
2010
2011
  return [lineNode, ...children];
2011
2012
  };
2012
2013
 
2014
+ const Focusable = 0;
2015
+
2013
2016
  const getContentDom = (lines, error) => {
2014
2017
  if (error) {
2015
2018
  return [];
@@ -2017,23 +2020,30 @@ const getContentDom = (lines, error) => {
2017
2020
  return [{
2018
2021
  childCount: lines.length,
2019
2022
  className: OutputContent,
2020
- role: 'log',
2021
- tabIndex: 0,
2023
+ role: Log,
2024
+ tabIndex: Focusable,
2022
2025
  type: Div
2023
2026
  }, ...lines.flatMap(getLineDom)];
2024
2027
  };
2025
2028
 
2026
2029
  const LogFileNotFound = 1;
2027
2030
 
2031
+ const messageNode = {
2032
+ childCount: 1,
2033
+ className: Message,
2034
+ tabIndex: Focusable,
2035
+ type: Div
2036
+ };
2028
2037
  const getLogFileNotFoundDom = () => {
2029
- return [{
2030
- childCount: 1,
2031
- className: Message,
2032
- tabIndex: 0,
2033
- type: Div
2034
- }, text(logFileNotFound())];
2038
+ return [messageNode, text(logFileNotFound())];
2035
2039
  };
2036
2040
 
2041
+ const errorNode = {
2042
+ childCount: 1,
2043
+ className: Error$1,
2044
+ tabIndex: Focusable,
2045
+ type: Div
2046
+ };
2037
2047
  const getErrorDom = (errorCode, error) => {
2038
2048
  if (!error) {
2039
2049
  return [];
@@ -2041,12 +2051,7 @@ const getErrorDom = (errorCode, error) => {
2041
2051
  if (errorCode === LogFileNotFound) {
2042
2052
  return getLogFileNotFoundDom();
2043
2053
  }
2044
- return [{
2045
- childCount: 1,
2046
- className: Error$1,
2047
- tabIndex: 0,
2048
- type: Div
2049
- }, text(error)];
2054
+ return [errorNode, text(error)];
2050
2055
  };
2051
2056
 
2052
2057
  const getOutputVirtualDom = (lines, errorCode, error) => {
@@ -2131,13 +2136,14 @@ const getActionButtonsVirtualDom = buttons => {
2131
2136
  return buttons.flatMap(getActionButtonVirtualDom);
2132
2137
  };
2133
2138
 
2139
+ const filterNode = {
2140
+ childCount: 1,
2141
+ className: Filter,
2142
+ type: Div
2143
+ };
2134
2144
  const getFilterVirtualDom = () => {
2135
2145
  const placeholder = filter();
2136
- return [{
2137
- childCount: 1,
2138
- className: Filter,
2139
- type: Div
2140
- }, {
2146
+ return [filterNode, {
2141
2147
  childCount: 0,
2142
2148
  className: mergeClassNames(InputBox, FilterInput),
2143
2149
  name: Filter$2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/output-view",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "Output View Worker",
5
5
  "repository": {
6
6
  "type": "git",