@lvce-editor/settings-view 2.2.0 → 2.4.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.
- package/dist/settingsViewWorkerMain.js +153 -43
- package/package.json +5 -2
|
@@ -1138,6 +1138,7 @@ const create$1 = (id, uri, x, y, width, height) => {
|
|
|
1138
1138
|
itemHeight: 100,
|
|
1139
1139
|
items: [],
|
|
1140
1140
|
maxLineY: 0,
|
|
1141
|
+
minContentWidth: 300,
|
|
1141
1142
|
minLineY: 0,
|
|
1142
1143
|
modifiedSettings: {},
|
|
1143
1144
|
preferences: {},
|
|
@@ -1146,6 +1147,8 @@ const create$1 = (id, uri, x, y, width, height) => {
|
|
|
1146
1147
|
scrollBarThumbTop: 0,
|
|
1147
1148
|
scrollOffset: 0,
|
|
1148
1149
|
searchValue: '',
|
|
1150
|
+
sideBarMinWidth: 100,
|
|
1151
|
+
sideBarWidth: 0,
|
|
1149
1152
|
tabs: [],
|
|
1150
1153
|
uri,
|
|
1151
1154
|
visibleItems: [],
|
|
@@ -1157,15 +1160,15 @@ const create$1 = (id, uri, x, y, width, height) => {
|
|
|
1157
1160
|
};
|
|
1158
1161
|
|
|
1159
1162
|
const isEqual$4 = (oldState, newState) => {
|
|
1160
|
-
return oldState.
|
|
1163
|
+
return oldState.sideBarWidth === newState.sideBarWidth && oldState.scrollBarThumbHeight === newState.scrollBarThumbHeight && oldState.scrollBarThumbTop === newState.scrollBarThumbTop;
|
|
1161
1164
|
};
|
|
1162
1165
|
|
|
1163
1166
|
const isEqual$3 = (oldState, newState) => {
|
|
1164
|
-
return oldState.
|
|
1167
|
+
return oldState.focus === newState.focus;
|
|
1165
1168
|
};
|
|
1166
1169
|
|
|
1167
1170
|
const isEqual$2 = (oldState, newState) => {
|
|
1168
|
-
return
|
|
1171
|
+
return oldState.filteredItems === newState.filteredItems && oldState.deltaY === newState.deltaY;
|
|
1169
1172
|
};
|
|
1170
1173
|
|
|
1171
1174
|
const isEqual$1 = (oldState, newState) => {
|
|
@@ -1176,25 +1179,20 @@ const RenderItems = 1;
|
|
|
1176
1179
|
const RenderFocus = 2;
|
|
1177
1180
|
const RenderValue = 3;
|
|
1178
1181
|
const RenderSettingValues = 10;
|
|
1179
|
-
const RenderScrollOffset = 11;
|
|
1180
1182
|
const RenderFocusContext = 12;
|
|
1183
|
+
const RenderCss = 13;
|
|
1181
1184
|
|
|
1182
1185
|
const isEqual = (oldState, newState) => {
|
|
1183
1186
|
return newState.inputSource === User || oldState.searchValue === newState.searchValue;
|
|
1184
1187
|
};
|
|
1185
1188
|
|
|
1186
|
-
const modules = [isEqual$
|
|
1187
|
-
const numbers = [RenderItems, RenderValue, RenderSettingValues,
|
|
1189
|
+
const modules = [isEqual$2, isEqual, isEqual$1, isEqual$3, isEqual$3, isEqual$4];
|
|
1190
|
+
const numbers = [RenderItems, RenderValue, RenderSettingValues, RenderFocus, RenderFocusContext, RenderCss];
|
|
1188
1191
|
|
|
1189
1192
|
const diff = (oldState, newState) => {
|
|
1190
1193
|
const diffResult = [];
|
|
1191
1194
|
for (let i = 0; i < modules.length; i++) {
|
|
1192
1195
|
const fn = modules[i];
|
|
1193
|
-
|
|
1194
|
-
// TODO enable this
|
|
1195
|
-
if (numbers[i] === RenderScrollOffset) {
|
|
1196
|
-
continue;
|
|
1197
|
-
}
|
|
1198
1196
|
if (!fn(oldState, newState)) {
|
|
1199
1197
|
diffResult.push(numbers[i]);
|
|
1200
1198
|
}
|
|
@@ -1313,7 +1311,7 @@ const Features = 'Features';
|
|
|
1313
1311
|
const FeaturesList = 'FeaturesList';
|
|
1314
1312
|
const FeatureWebView = 'FeatureWebView';
|
|
1315
1313
|
const FileIcon = 'FileIcon';
|
|
1316
|
-
const Filter = 'Filter';
|
|
1314
|
+
const Filter$1 = 'Filter';
|
|
1317
1315
|
const FilterBadge = 'FilterBadge';
|
|
1318
1316
|
const FindWidget = 'FindWidget';
|
|
1319
1317
|
const FindWidgetFind = 'FindWidgetFind';
|
|
@@ -1549,7 +1547,7 @@ const ClassNames = {
|
|
|
1549
1547
|
Features,
|
|
1550
1548
|
FeaturesList,
|
|
1551
1549
|
FileIcon,
|
|
1552
|
-
Filter,
|
|
1550
|
+
Filter: Filter$1,
|
|
1553
1551
|
FilterBadge,
|
|
1554
1552
|
FindWidget,
|
|
1555
1553
|
FindWidgetFind,
|
|
@@ -1731,6 +1729,10 @@ const getName = () => {
|
|
|
1731
1729
|
return 'Settings';
|
|
1732
1730
|
};
|
|
1733
1731
|
|
|
1732
|
+
const handleClickFilterButton = state => {
|
|
1733
|
+
return state;
|
|
1734
|
+
};
|
|
1735
|
+
|
|
1734
1736
|
const getSelectedTabId = tabs => {
|
|
1735
1737
|
for (const tab of tabs) {
|
|
1736
1738
|
if (tab.selected) {
|
|
@@ -1916,6 +1918,28 @@ const handleInputFocus = state => {
|
|
|
1916
1918
|
};
|
|
1917
1919
|
};
|
|
1918
1920
|
|
|
1921
|
+
const handleResizerPointerDown = (state, eventX, eventY) => {
|
|
1922
|
+
return state;
|
|
1923
|
+
};
|
|
1924
|
+
|
|
1925
|
+
const handleResizerPointerMove = (state, eventX, eventY) => {
|
|
1926
|
+
const {
|
|
1927
|
+
minContentWidth,
|
|
1928
|
+
sideBarMinWidth,
|
|
1929
|
+
width
|
|
1930
|
+
} = state;
|
|
1931
|
+
const maxSideBarWidth = width - minContentWidth;
|
|
1932
|
+
const newWidth = Math.max(sideBarMinWidth, Math.min(eventX, maxSideBarWidth));
|
|
1933
|
+
return {
|
|
1934
|
+
...state,
|
|
1935
|
+
sideBarWidth: newWidth
|
|
1936
|
+
};
|
|
1937
|
+
};
|
|
1938
|
+
|
|
1939
|
+
const handleResizerPointerUp = (state, eventX, eventY) => {
|
|
1940
|
+
return state;
|
|
1941
|
+
};
|
|
1942
|
+
|
|
1919
1943
|
const handleScroll = (state, scrollTop, inputSource = User) => {
|
|
1920
1944
|
return {
|
|
1921
1945
|
...state,
|
|
@@ -2063,11 +2087,19 @@ const getModifiedSettings = preferences => {
|
|
|
2063
2087
|
return modifiedSettings;
|
|
2064
2088
|
};
|
|
2065
2089
|
|
|
2090
|
+
const ClientX = 'event.clientX';
|
|
2091
|
+
const ClientY = 'event.clientY';
|
|
2092
|
+
const DeltaY = 'event.deltaY';
|
|
2093
|
+
const TargetName = 'event.target.name';
|
|
2094
|
+
const TargetValue = 'event.target.value';
|
|
2095
|
+
|
|
2066
2096
|
const Script = 2;
|
|
2067
2097
|
|
|
2068
2098
|
const DebugWorker = 55;
|
|
2069
2099
|
const RendererWorker$1 = 1;
|
|
2070
2100
|
|
|
2101
|
+
const SetCss = 'Viewlet.setCss';
|
|
2102
|
+
|
|
2071
2103
|
const rpcs = Object.create(null);
|
|
2072
2104
|
const set$2 = (id, rpc) => {
|
|
2073
2105
|
rpcs[id] = rpc;
|
|
@@ -2543,6 +2575,7 @@ const getPreferences = async () => {
|
|
|
2543
2575
|
const ApplicationsTab = 'applications';
|
|
2544
2576
|
const Clear$1 = 'Clear';
|
|
2545
2577
|
const ExtensionsTab = 'extensions';
|
|
2578
|
+
const Filter = 'Filter';
|
|
2546
2579
|
const FeaturesTab = 'features';
|
|
2547
2580
|
const SecurityTab = 'security';
|
|
2548
2581
|
const SettingsSearch = 'SettingsSearch';
|
|
@@ -2853,6 +2886,9 @@ const autoUpdatesDescription = () => {
|
|
|
2853
2886
|
const clear = () => {
|
|
2854
2887
|
return i18nString(Clear);
|
|
2855
2888
|
};
|
|
2889
|
+
const filter = () => {
|
|
2890
|
+
return 'Filter';
|
|
2891
|
+
};
|
|
2856
2892
|
const extensionRecommendations = () => {
|
|
2857
2893
|
return i18nString(ExtensionRecommendations);
|
|
2858
2894
|
};
|
|
@@ -4696,6 +4732,13 @@ const getSavedSearchValue = savedState => {
|
|
|
4696
4732
|
return '';
|
|
4697
4733
|
};
|
|
4698
4734
|
|
|
4735
|
+
const getSavedSideBarWidth = savedState => {
|
|
4736
|
+
if (savedState && typeof savedState === 'object' && 'sideBarWidth' in savedState && typeof savedState.sideBarWidth === 'number') {
|
|
4737
|
+
return savedState.sideBarWidth;
|
|
4738
|
+
}
|
|
4739
|
+
return 200;
|
|
4740
|
+
};
|
|
4741
|
+
|
|
4699
4742
|
const getSavedTabId = savedState => {
|
|
4700
4743
|
if (savedState && typeof savedState === 'object' && 'selectedTab' in savedState && typeof savedState.selectedTab === 'string') {
|
|
4701
4744
|
return savedState.selectedTab;
|
|
@@ -4712,6 +4755,7 @@ const restoreState = savedState => {
|
|
|
4712
4755
|
minLineY: 0,
|
|
4713
4756
|
scrollOffset: 0,
|
|
4714
4757
|
searchValue: '',
|
|
4758
|
+
sideBarWidth: 200,
|
|
4715
4759
|
tabId: ''
|
|
4716
4760
|
};
|
|
4717
4761
|
}
|
|
@@ -4720,6 +4764,7 @@ const restoreState = savedState => {
|
|
|
4720
4764
|
const tabId = getSavedTabId(savedState);
|
|
4721
4765
|
const searchValue = getSavedSearchValue(savedState);
|
|
4722
4766
|
const scrollOffset = getSavedScrollOffset(savedState);
|
|
4767
|
+
const sideBarWidth = getSavedSideBarWidth(savedState);
|
|
4723
4768
|
const history = getSavedHistory(savedState);
|
|
4724
4769
|
const historyIndex = getSavedHistoryIndex(savedState, history);
|
|
4725
4770
|
return {
|
|
@@ -4729,6 +4774,7 @@ const restoreState = savedState => {
|
|
|
4729
4774
|
minLineY,
|
|
4730
4775
|
scrollOffset,
|
|
4731
4776
|
searchValue,
|
|
4777
|
+
sideBarWidth,
|
|
4732
4778
|
tabId
|
|
4733
4779
|
};
|
|
4734
4780
|
};
|
|
@@ -4739,6 +4785,7 @@ const loadContent = async (state, savedState) => {
|
|
|
4739
4785
|
historyIndex,
|
|
4740
4786
|
scrollOffset,
|
|
4741
4787
|
searchValue,
|
|
4788
|
+
sideBarWidth,
|
|
4742
4789
|
tabId
|
|
4743
4790
|
} = restoreState(savedState);
|
|
4744
4791
|
const tabs = getTabs();
|
|
@@ -4778,11 +4825,41 @@ const loadContent = async (state, savedState) => {
|
|
|
4778
4825
|
scrollBarThumbTop: thumbTop,
|
|
4779
4826
|
scrollOffset,
|
|
4780
4827
|
searchValue,
|
|
4828
|
+
sideBarWidth,
|
|
4781
4829
|
tabs: newTabs,
|
|
4782
4830
|
visibleItems
|
|
4783
4831
|
};
|
|
4784
4832
|
};
|
|
4785
4833
|
|
|
4834
|
+
const getCss = (sideBarWidth, scrollBarThumbHeight, scrollBarThumbTop) => {
|
|
4835
|
+
const rounded = Math.round(sideBarWidth);
|
|
4836
|
+
return `
|
|
4837
|
+
.Settings {
|
|
4838
|
+
--SettingsSideBarWidth: ${rounded}px;
|
|
4839
|
+
--ScrollBarThumbHeight: ${scrollBarThumbHeight}px;
|
|
4840
|
+
--ScrollBarThumbTop: ${scrollBarThumbTop}px;
|
|
4841
|
+
}
|
|
4842
|
+
.SettingsResizer {
|
|
4843
|
+
background: yellow;
|
|
4844
|
+
}
|
|
4845
|
+
|
|
4846
|
+
.SettingsSideBar{
|
|
4847
|
+
width: var(--SettingsSideBarWidth);
|
|
4848
|
+
}
|
|
4849
|
+
`;
|
|
4850
|
+
};
|
|
4851
|
+
|
|
4852
|
+
const renderCss = (oldState, newState) => {
|
|
4853
|
+
const {
|
|
4854
|
+
id,
|
|
4855
|
+
scrollBarThumbHeight,
|
|
4856
|
+
scrollBarThumbTop,
|
|
4857
|
+
sideBarWidth
|
|
4858
|
+
} = newState;
|
|
4859
|
+
const css = getCss(sideBarWidth, scrollBarThumbHeight, scrollBarThumbTop);
|
|
4860
|
+
return [SetCss, id, css];
|
|
4861
|
+
};
|
|
4862
|
+
|
|
4786
4863
|
const renderFocus = (oldState, newState) => {
|
|
4787
4864
|
const {
|
|
4788
4865
|
id
|
|
@@ -4808,6 +4885,8 @@ const Label = 'Label';
|
|
|
4808
4885
|
const MaskIcon = 'MaskIcon';
|
|
4809
4886
|
const MaskIconClearAll = 'MaskIconClearAll';
|
|
4810
4887
|
const ModifiedIndicator = 'ModifiedIndicator';
|
|
4888
|
+
const Resizer = 'Resizer';
|
|
4889
|
+
const ResizerHighlight = 'ResizerHighlight';
|
|
4811
4890
|
const SearchFieldButton = 'SearchFieldButton';
|
|
4812
4891
|
const Select = 'Select';
|
|
4813
4892
|
const Settings = 'Settings';
|
|
@@ -4845,6 +4924,7 @@ const getSettingsInputBadgeDom = (filteredSettingsCount, hasSearchValue) => {
|
|
|
4845
4924
|
|
|
4846
4925
|
// TODo use numeric ids
|
|
4847
4926
|
const HandleClickClear = 'handleClickClear';
|
|
4927
|
+
const HandleClickFilterButton = 'handleClickFilterButton';
|
|
4848
4928
|
const HandleClickTab = 'handleClickTab';
|
|
4849
4929
|
const HandleInput = 'handleInput';
|
|
4850
4930
|
const HandleSettingInput = 'handleSettingInput';
|
|
@@ -4852,6 +4932,9 @@ const HandleSettingChecked = 'handleSettingChecked';
|
|
|
4852
4932
|
const HandleWheel = 'handleWheel';
|
|
4853
4933
|
const HandleSettingSelect = 'handleSettingSelect';
|
|
4854
4934
|
const HandleInputFocus = 'handleInputFocus';
|
|
4935
|
+
const HandleResizerPointerDown = 'handleResizerPointerDown';
|
|
4936
|
+
const HandleResizerPointerMove = 'handleResizerPointerMove';
|
|
4937
|
+
const HandleResizerPointerUp = 'handleResizerPointerUp';
|
|
4855
4938
|
|
|
4856
4939
|
const enabledClass = SearchFieldButton;
|
|
4857
4940
|
const disabledClass = mergeClassNames(enabledClass, 'SearchFieldButtonDisabled');
|
|
@@ -4876,6 +4959,14 @@ const getSettingsInputButtonsDom = hasSearchValue => {
|
|
|
4876
4959
|
name: Clear$1,
|
|
4877
4960
|
onClick: HandleClickClear,
|
|
4878
4961
|
type: Button
|
|
4962
|
+
}, {
|
|
4963
|
+
ariaLabel: filter(),
|
|
4964
|
+
childCount: 1,
|
|
4965
|
+
className: SearchFieldButton,
|
|
4966
|
+
disabled: false,
|
|
4967
|
+
name: Filter,
|
|
4968
|
+
onClick: HandleClickFilterButton,
|
|
4969
|
+
type: Button
|
|
4879
4970
|
}, icon];
|
|
4880
4971
|
};
|
|
4881
4972
|
|
|
@@ -4912,6 +5003,19 @@ const getSettingsHeaderDom = (filteredSettingsCount, hasSearchValue) => {
|
|
|
4912
5003
|
}, ...getSettingsInputDom(), ...getSettingsInputBadgeDom(filteredSettingsCount, hasSearchValue), ...getSettingsInputButtonsDom(hasSearchValue)];
|
|
4913
5004
|
};
|
|
4914
5005
|
|
|
5006
|
+
const getResizerVirtualDom = () => {
|
|
5007
|
+
return [{
|
|
5008
|
+
childCount: 1,
|
|
5009
|
+
className: mergeClassNames(Resizer, 'SettingsResizer'),
|
|
5010
|
+
onPointerDown: HandleResizerPointerDown,
|
|
5011
|
+
type: Div
|
|
5012
|
+
}, {
|
|
5013
|
+
childCount: 0,
|
|
5014
|
+
className: ResizerHighlight,
|
|
5015
|
+
type: Div
|
|
5016
|
+
}];
|
|
5017
|
+
};
|
|
5018
|
+
|
|
4915
5019
|
const getContentHeadingDom = headerText => {
|
|
4916
5020
|
return [{
|
|
4917
5021
|
childCount: 1,
|
|
@@ -4925,12 +5029,10 @@ const parentNode$1 = {
|
|
|
4925
5029
|
className: mergeClassNames(SettingsScrollBar, SettingsScrollBarSmall),
|
|
4926
5030
|
type: Div
|
|
4927
5031
|
};
|
|
4928
|
-
const getScrollBarDom = (
|
|
5032
|
+
const getScrollBarDom = () => {
|
|
4929
5033
|
return [parentNode$1, {
|
|
4930
5034
|
childCount: 0,
|
|
4931
5035
|
className: SettingsScrollBarThumb,
|
|
4932
|
-
height: `${thumbHeight}px`,
|
|
4933
|
-
top: `${thumbTop}px`,
|
|
4934
5036
|
type: Div
|
|
4935
5037
|
}];
|
|
4936
5038
|
};
|
|
@@ -5241,7 +5343,7 @@ const getSettingsItemsDom = (items, searchValue) => {
|
|
|
5241
5343
|
}, ...items.flatMap(getItemVirtualDom)];
|
|
5242
5344
|
};
|
|
5243
5345
|
|
|
5244
|
-
const getSettingsContentDom = (visibleItems, tabs, searchValue
|
|
5346
|
+
const getSettingsContentDom = (visibleItems, tabs, searchValue) => {
|
|
5245
5347
|
const selectedTab = tabs.find(tab => tab.selected);
|
|
5246
5348
|
const headerText = selectedTab ? selectedTab.label : settingsContent();
|
|
5247
5349
|
return [{
|
|
@@ -5253,7 +5355,7 @@ const getSettingsContentDom = (visibleItems, tabs, searchValue, thumbHeight, thu
|
|
|
5253
5355
|
childCount: 2,
|
|
5254
5356
|
className: SettingsItemWrapper,
|
|
5255
5357
|
type: Div
|
|
5256
|
-
}, ...getSettingsItemsDom(visibleItems, searchValue), ...getScrollBarDom(
|
|
5358
|
+
}, ...getSettingsItemsDom(visibleItems, searchValue), ...getScrollBarDom()];
|
|
5257
5359
|
};
|
|
5258
5360
|
|
|
5259
5361
|
const getTabClassName = tab => {
|
|
@@ -5291,12 +5393,12 @@ const getSettingsSideBarDom = tabs => {
|
|
|
5291
5393
|
}, ...getSettingsTabsDom(tabs)];
|
|
5292
5394
|
};
|
|
5293
5395
|
|
|
5294
|
-
const getSettingsMainDom = (tabs, visibleItems, totalItemCount, searchValue
|
|
5396
|
+
const getSettingsMainDom = (tabs, visibleItems, totalItemCount, searchValue) => {
|
|
5295
5397
|
return [{
|
|
5296
|
-
childCount:
|
|
5398
|
+
childCount: 3,
|
|
5297
5399
|
className: SettingsMain,
|
|
5298
5400
|
type: Div
|
|
5299
|
-
}, ...getSettingsSideBarDom(tabs), ...getSettingsContentDom(visibleItems, tabs, searchValue
|
|
5401
|
+
}, ...getSettingsSideBarDom(tabs), ...getResizerVirtualDom(), ...getSettingsContentDom(visibleItems, tabs, searchValue)];
|
|
5300
5402
|
};
|
|
5301
5403
|
|
|
5302
5404
|
const parentNode = {
|
|
@@ -5307,15 +5409,13 @@ const parentNode = {
|
|
|
5307
5409
|
const getSettingsDom = state => {
|
|
5308
5410
|
const {
|
|
5309
5411
|
filteredItems,
|
|
5310
|
-
scrollBarThumbHeight,
|
|
5311
|
-
scrollBarThumbTop,
|
|
5312
5412
|
searchValue,
|
|
5313
5413
|
tabs,
|
|
5314
5414
|
visibleItems
|
|
5315
5415
|
} = state;
|
|
5316
5416
|
const hasSearchValue = searchValue.trim().length > 0;
|
|
5317
5417
|
const filteredItemsCount = filteredItems.length;
|
|
5318
|
-
return [parentNode, ...getSettingsHeaderDom(filteredItemsCount, hasSearchValue), ...getSettingsMainDom(tabs, visibleItems, filteredItemsCount, searchValue
|
|
5418
|
+
return [parentNode, ...getSettingsHeaderDom(filteredItemsCount, hasSearchValue), ...getSettingsMainDom(tabs, visibleItems, filteredItemsCount, searchValue)];
|
|
5319
5419
|
};
|
|
5320
5420
|
|
|
5321
5421
|
const renderItems = (oldState, newState) => {
|
|
@@ -5323,16 +5423,6 @@ const renderItems = (oldState, newState) => {
|
|
|
5323
5423
|
return ['Viewlet.setDom2', newState.id, dom];
|
|
5324
5424
|
};
|
|
5325
5425
|
|
|
5326
|
-
const renderScrollOffset = (oldState, newState) => {
|
|
5327
|
-
const {
|
|
5328
|
-
id,
|
|
5329
|
-
scrollOffset
|
|
5330
|
-
} = newState;
|
|
5331
|
-
const selector = '.SettingsContent';
|
|
5332
|
-
const property = 'scrollTop';
|
|
5333
|
-
return ['Viewlet.setProperty', id, selector, property, scrollOffset];
|
|
5334
|
-
};
|
|
5335
|
-
|
|
5336
5426
|
const enabledTypes = [Number$1, String, Color];
|
|
5337
5427
|
const renderSettingValues = (oldState, newState) => {
|
|
5338
5428
|
const {
|
|
@@ -5361,14 +5451,14 @@ const renderValue = (oldState, newState) => {
|
|
|
5361
5451
|
|
|
5362
5452
|
const getRenderer = diffType => {
|
|
5363
5453
|
switch (diffType) {
|
|
5454
|
+
case RenderCss:
|
|
5455
|
+
return renderCss;
|
|
5364
5456
|
case RenderFocus:
|
|
5365
5457
|
return renderFocus;
|
|
5366
5458
|
case RenderFocusContext:
|
|
5367
5459
|
return renderFocusContext;
|
|
5368
5460
|
case RenderItems:
|
|
5369
5461
|
return renderItems;
|
|
5370
|
-
case RenderScrollOffset:
|
|
5371
|
-
return renderScrollOffset;
|
|
5372
5462
|
case RenderSettingValues:
|
|
5373
5463
|
return renderSettingValues;
|
|
5374
5464
|
case RenderValue:
|
|
@@ -5404,19 +5494,22 @@ const renderActions = () => {
|
|
|
5404
5494
|
const renderEventListeners = () => {
|
|
5405
5495
|
return [{
|
|
5406
5496
|
name: HandleClickTab,
|
|
5407
|
-
params: ['handleClickTab',
|
|
5497
|
+
params: ['handleClickTab', TargetName]
|
|
5408
5498
|
}, {
|
|
5409
5499
|
name: HandleInput,
|
|
5410
|
-
params: ['handleInput',
|
|
5500
|
+
params: ['handleInput', TargetValue]
|
|
5411
5501
|
}, {
|
|
5412
5502
|
name: HandleClickClear,
|
|
5413
5503
|
params: ['clear']
|
|
5504
|
+
}, {
|
|
5505
|
+
name: HandleClickFilterButton,
|
|
5506
|
+
params: ['handleClickFilterButton']
|
|
5414
5507
|
}, {
|
|
5415
5508
|
name: HandleSettingInput,
|
|
5416
|
-
params: ['handleSettingInput',
|
|
5509
|
+
params: ['handleSettingInput', TargetName, TargetValue]
|
|
5417
5510
|
}, {
|
|
5418
5511
|
name: HandleSettingChecked,
|
|
5419
|
-
params: ['handleSettingChecked',
|
|
5512
|
+
params: ['handleSettingChecked', TargetName, TargetValue]
|
|
5420
5513
|
},
|
|
5421
5514
|
// {
|
|
5422
5515
|
// name: DomEventListenerFunctions.HandleScroll,
|
|
@@ -5425,14 +5518,25 @@ const renderEventListeners = () => {
|
|
|
5425
5518
|
// },
|
|
5426
5519
|
{
|
|
5427
5520
|
name: HandleWheel,
|
|
5428
|
-
params: ['handleWheel',
|
|
5521
|
+
params: ['handleWheel', DeltaY],
|
|
5429
5522
|
passive: true
|
|
5430
5523
|
}, {
|
|
5431
5524
|
name: HandleSettingSelect,
|
|
5432
|
-
params: ['handleSettingSelect',
|
|
5525
|
+
params: ['handleSettingSelect', TargetName, TargetValue]
|
|
5433
5526
|
}, {
|
|
5434
5527
|
name: HandleInputFocus,
|
|
5435
5528
|
params: ['handleInputFocus']
|
|
5529
|
+
}, {
|
|
5530
|
+
name: HandleResizerPointerDown,
|
|
5531
|
+
params: ['handleResizerPointerDown', ClientX, ClientY],
|
|
5532
|
+
// @ts-ignore
|
|
5533
|
+
trackPointerEvents: [HandleResizerPointerMove, HandleResizerPointerUp]
|
|
5534
|
+
}, {
|
|
5535
|
+
name: HandleResizerPointerMove,
|
|
5536
|
+
params: ['handleResizerPointerMove', ClientX, ClientY]
|
|
5537
|
+
}, {
|
|
5538
|
+
name: HandleResizerPointerUp,
|
|
5539
|
+
params: ['handleResizerPointerUp', ClientX, ClientY]
|
|
5436
5540
|
}];
|
|
5437
5541
|
};
|
|
5438
5542
|
|
|
@@ -5443,6 +5547,7 @@ const saveState = state => {
|
|
|
5443
5547
|
historyIndex,
|
|
5444
5548
|
scrollOffset,
|
|
5445
5549
|
searchValue,
|
|
5550
|
+
sideBarWidth,
|
|
5446
5551
|
tabs
|
|
5447
5552
|
} = state;
|
|
5448
5553
|
const selectedTab = getSelectedTabId(tabs);
|
|
@@ -5455,7 +5560,8 @@ const saveState = state => {
|
|
|
5455
5560
|
minLineY: 0,
|
|
5456
5561
|
scrollOffset,
|
|
5457
5562
|
searchValue,
|
|
5458
|
-
selectedTab
|
|
5563
|
+
selectedTab,
|
|
5564
|
+
sideBarWidth
|
|
5459
5565
|
};
|
|
5460
5566
|
};
|
|
5461
5567
|
|
|
@@ -5516,10 +5622,14 @@ const commandMap = {
|
|
|
5516
5622
|
'Settings.getCommandIds': getCommandIds,
|
|
5517
5623
|
'Settings.getKeyBindings': getKeyBindings$1,
|
|
5518
5624
|
'Settings.getName': getName,
|
|
5625
|
+
'Settings.handleClickFilterButton': wrapCommand(handleClickFilterButton),
|
|
5519
5626
|
'Settings.handleClickTab': wrapCommand(handleClickTab),
|
|
5520
5627
|
'Settings.handleInput': wrapCommand(handleInput),
|
|
5521
5628
|
'Settings.handleInputBlur': wrapCommand(handleInputBlur),
|
|
5522
5629
|
'Settings.handleInputFocus': wrapCommand(handleInputFocus),
|
|
5630
|
+
'Settings.handleResizerPointerDown': wrapCommand(handleResizerPointerDown),
|
|
5631
|
+
'Settings.handleResizerPointerMove': wrapCommand(handleResizerPointerMove),
|
|
5632
|
+
'Settings.handleResizerPointerUp': wrapCommand(handleResizerPointerUp),
|
|
5523
5633
|
'Settings.handleScroll': wrapCommand(handleScroll),
|
|
5524
5634
|
'Settings.handleSettingChecked': wrapCommand(handleSettingChecked),
|
|
5525
5635
|
'Settings.handleSettingInput': wrapCommand(handleSettingInput),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/settings-view",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Explorer Worker",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,5 +9,8 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"author": "Lvce Editor",
|
|
11
11
|
"type": "module",
|
|
12
|
-
"main": "dist/settingsViewWorkerMain.js"
|
|
12
|
+
"main": "dist/settingsViewWorkerMain.js",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@lvce-editor/constants": "^2.4.0"
|
|
15
|
+
}
|
|
13
16
|
}
|