@lvce-editor/settings-view 1.17.0 → 1.19.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.
@@ -1085,7 +1085,7 @@ const KeyCode = {
1085
1085
  const mergeClassNames = (...classNames) => {
1086
1086
  return classNames.filter(Boolean).join(' ');
1087
1087
  };
1088
- const Button$1 = 1;
1088
+ const Button = 1;
1089
1089
  const Div = 4;
1090
1090
  const H1 = 5;
1091
1091
  const Input = 6;
@@ -1100,7 +1100,7 @@ const Label = 66;
1100
1100
  const VirtualDomElements = {
1101
1101
  __proto__: null,
1102
1102
  Aside,
1103
- Button: Button$1,
1103
+ Button,
1104
1104
  Div,
1105
1105
  H1,
1106
1106
  H3,
@@ -1327,7 +1327,24 @@ const handleSettingChecked = (state, name, value, source = User) => {
1327
1327
  return handleSettingUpdate(state, name, value, source);
1328
1328
  };
1329
1329
 
1330
+ const Enum = 1;
1331
+ const String = 2;
1332
+ const Boolean$1 = 3;
1333
+ const Number$1 = 5;
1334
+ const Color = 6;
1335
+ const Url = 7;
1336
+
1330
1337
  const handleSettingInput = (state, name, value, inputSource = User) => {
1338
+ const {
1339
+ items
1340
+ } = state;
1341
+
1342
+ // TODO maybe have separate input functions for number and string inputs
1343
+ const settingItem = items.find(item => item.id === name);
1344
+ if (settingItem && settingItem.type === Number$1) {
1345
+ const numberValue = value === '' ? '' : Number(value);
1346
+ return handleSettingUpdate(state, name, numberValue, inputSource);
1347
+ }
1331
1348
  return handleSettingUpdate(state, name, value, inputSource);
1332
1349
  };
1333
1350
 
@@ -1723,13 +1740,6 @@ const TextEditorTab = 'text-editor';
1723
1740
  const WindowTab = 'window';
1724
1741
  const WorkbenchTab = 'workbench';
1725
1742
 
1726
- const Enum = 1;
1727
- const String = 2;
1728
- const Boolean$1 = 3;
1729
- const Number$1 = 5;
1730
- const Color = 6;
1731
- const Url = 7;
1732
-
1733
1743
  const emptyObject = {};
1734
1744
  const RE_PLACEHOLDER = /\{(PH\d+)\}/g;
1735
1745
  const i18nString = (key, placeholders = emptyObject) => {
@@ -2816,375 +2826,391 @@ const unknownSettingType = () => {
2816
2826
  return i18nString(UnknownSettingType);
2817
2827
  };
2818
2828
 
2819
- const getSettingItems = async () => {
2829
+ const getSettingItemsApplications = () => {
2830
+ return [{
2831
+ id: 'telemetry',
2832
+ heading: telemetry(),
2833
+ description: telemetryDescription(),
2834
+ type: Boolean$1,
2835
+ value: 'true',
2836
+ category: ApplicationsTab
2837
+ }, {
2838
+ id: 'updates',
2839
+ heading: autoUpdates(),
2840
+ description: autoUpdatesDescription(),
2841
+ type: Boolean$1,
2842
+ value: 'true',
2843
+ category: ApplicationsTab
2844
+ }];
2845
+ };
2846
+
2847
+ const getSettingItemsEditor = () => {
2820
2848
  return [{
2821
- id: 'Editor.fontSize',
2849
+ id: 'editor.fontSize',
2822
2850
  heading: fontSize(),
2823
2851
  description: fontSizeDescription(),
2824
2852
  type: Number$1,
2825
2853
  value: 15,
2826
2854
  category: TextEditorTab
2827
2855
  }, {
2828
- id: 'Editor.fontFamily',
2856
+ id: 'editor.fontFamily',
2829
2857
  heading: fontFamily(),
2830
2858
  description: fontFamilyDescription(),
2831
2859
  type: String,
2832
2860
  value: 'Fira Code',
2833
2861
  category: TextEditorTab
2834
- },
2835
- // Text Editor Settings
2836
- {
2837
- id: 'Editor.wordWrap',
2862
+ }, {
2863
+ id: 'editor.wordWrap',
2838
2864
  heading: wordWrap(),
2839
2865
  description: wordWrapDescription(),
2840
2866
  type: Enum,
2841
2867
  value: 'off',
2842
2868
  category: TextEditorTab,
2843
2869
  options: [{
2844
- id: 'on',
2870
+ id: 'editor.on',
2845
2871
  label: 'On' // i18n
2846
2872
  }, {
2847
- id: 'off',
2873
+ id: 'editor.off',
2848
2874
  label: 'off' // i18n
2849
2875
  }]
2850
2876
  }, {
2851
- id: 'Editor.lineNumbers',
2877
+ id: 'editor.lineNumbers',
2852
2878
  heading: lineNumbers(),
2853
2879
  description: lineNumbersDescription(),
2854
2880
  type: Enum,
2855
2881
  value: 'on',
2856
2882
  category: TextEditorTab,
2857
2883
  options: [{
2858
- id: 'on',
2884
+ id: 'editor.on',
2859
2885
  label: 'On' // i18n
2860
2886
  }, {
2861
- id: 'off',
2887
+ id: 'editor.off',
2862
2888
  label: 'off' // i18n
2863
2889
  }]
2864
2890
  }, {
2865
- id: 'Editor.minimap',
2891
+ id: 'editor.minimap',
2866
2892
  heading: minimap(),
2867
2893
  description: minimapDescription(),
2868
2894
  type: Boolean$1,
2869
2895
  value: 'true',
2870
2896
  category: TextEditorTab
2871
2897
  }, {
2872
- id: 'Editor.scrollBeyondLastLine',
2898
+ id: 'editor.scrollBeyondLastLine',
2873
2899
  heading: scrollBeyondLastLine(),
2874
2900
  description: scrollBeyondLastLineDescription(),
2875
2901
  type: Boolean$1,
2876
2902
  value: 'false',
2877
2903
  category: TextEditorTab
2878
2904
  }, {
2879
- id: 'Editor.smoothScrolling',
2905
+ id: 'editor.smoothScrolling',
2880
2906
  heading: smoothScrolling(),
2881
2907
  description: smoothScrollingDescription(),
2882
2908
  type: Boolean$1,
2883
2909
  value: 'true',
2884
2910
  category: TextEditorTab
2885
2911
  }, {
2886
- id: 'Editor.cursorBlinking',
2912
+ id: 'editor.cursorBlinking',
2887
2913
  heading: cursorBlinking(),
2888
2914
  description: cursorBlinkingDescription(),
2889
2915
  type: String,
2890
2916
  value: 'blink',
2891
2917
  category: TextEditorTab
2892
2918
  }, {
2893
- id: 'Editor.cursorStyle',
2919
+ id: 'editor.cursorStyle',
2894
2920
  heading: cursorStyle(),
2895
2921
  description: cursorStyleDescription(),
2896
2922
  type: String,
2897
2923
  value: 'line',
2898
2924
  category: TextEditorTab
2899
2925
  }, {
2900
- id: 'Editor.cursorWidth',
2926
+ id: 'editor.cursorWidth',
2901
2927
  heading: cursorWidth(),
2902
2928
  description: cursorWidthDescription(),
2903
2929
  type: Number$1,
2904
2930
  value: '0',
2905
2931
  category: TextEditorTab
2906
2932
  }, {
2907
- id: 'Editor.tabSize',
2933
+ id: 'editor.tabSize',
2908
2934
  heading: tabSize(),
2909
2935
  description: tabSizeDescription(),
2910
2936
  type: Number$1,
2911
2937
  value: '4',
2912
2938
  category: TextEditorTab
2913
2939
  }, {
2914
- id: 'Editor.insertSpaces',
2940
+ id: 'editor.insertSpaces',
2915
2941
  heading: insertSpaces(),
2916
2942
  description: insertSpacesDescription(),
2917
2943
  type: Boolean$1,
2918
2944
  value: 'true',
2919
2945
  category: TextEditorTab
2920
2946
  }, {
2921
- id: 'Editor.detectIndentation',
2947
+ id: 'editor.detectIndentation',
2922
2948
  heading: detectIndentation(),
2923
2949
  description: detectIndentationDescription(),
2924
2950
  type: Boolean$1,
2925
2951
  value: 'true',
2926
2952
  category: TextEditorTab
2927
2953
  }, {
2928
- id: 'Editor.trimAutoWhitespace',
2954
+ id: 'editor.trimAutoWhitespace',
2929
2955
  heading: trimAutoWhitespace(),
2930
2956
  description: trimAutoWhitespaceDescription(),
2931
2957
  type: Boolean$1,
2932
2958
  value: 'true',
2933
2959
  category: TextEditorTab
2934
2960
  }, {
2935
- id: 'Editor.largeFileOptimizations',
2961
+ id: 'editor.largeFileOptimizations',
2936
2962
  heading: largeFileOptimizations(),
2937
2963
  description: largeFileOptimizationsDescription(),
2938
2964
  type: Boolean$1,
2939
2965
  value: 'true',
2940
2966
  category: TextEditorTab
2941
2967
  }, {
2942
- id: 'Editor.renderWhitespace',
2968
+ id: 'editor.renderWhitespace',
2943
2969
  heading: renderWhitespace(),
2944
2970
  description: renderWhitespaceDescription(),
2945
2971
  type: String,
2946
2972
  value: 'selection',
2947
2973
  category: TextEditorTab
2948
2974
  }, {
2949
- id: 'Editor.renderControlCharacters',
2975
+ id: 'editor.renderControlCharacters',
2950
2976
  heading: renderControlCharacters(),
2951
2977
  description: renderControlCharactersDescription(),
2952
2978
  type: Boolean$1,
2953
2979
  value: 'false',
2954
2980
  category: TextEditorTab
2955
2981
  }, {
2956
- id: 'Editor.renderLineHighlight',
2982
+ id: 'editor.renderLineHighlight',
2957
2983
  heading: renderLineHighlight(),
2958
2984
  description: renderLineHighlightDescription(),
2959
2985
  type: String,
2960
2986
  value: 'line',
2961
2987
  category: TextEditorTab
2962
2988
  }, {
2963
- id: 'Editor.codeLens',
2989
+ id: 'editor.codeLens',
2964
2990
  heading: codeLens(),
2965
2991
  description: codeLensDescription(),
2966
2992
  type: Boolean$1,
2967
2993
  value: 'true',
2968
2994
  category: TextEditorTab
2969
2995
  }, {
2970
- id: 'Editor.folding',
2996
+ id: 'editor.folding',
2971
2997
  heading: folding(),
2972
2998
  description: foldingDescription(),
2973
2999
  type: Boolean$1,
2974
3000
  value: 'true',
2975
3001
  category: TextEditorTab
2976
3002
  }, {
2977
- id: 'Editor.showFoldingControls',
3003
+ id: 'editor.showFoldingControls',
2978
3004
  heading: showFoldingControls(),
2979
3005
  description: showFoldingControlsDescription(),
2980
3006
  type: String,
2981
3007
  value: 'mouseover',
2982
3008
  category: TextEditorTab
2983
3009
  }, {
2984
- id: 'Editor.unfoldOnClickAfterEnd',
3010
+ id: 'editor.unfoldOnClickAfterEnd',
2985
3011
  heading: unfoldOnClickAfterEnd(),
2986
3012
  description: unfoldOnClickAfterEndDescription(),
2987
3013
  type: Boolean$1,
2988
3014
  value: 'false',
2989
3015
  category: TextEditorTab
2990
3016
  }, {
2991
- id: 'Editor.links',
3017
+ id: 'editor.links',
2992
3018
  heading: links(),
2993
3019
  description: linksDescription(),
2994
3020
  type: Boolean$1,
2995
3021
  value: 'true',
2996
3022
  category: TextEditorTab
2997
3023
  }, {
2998
- id: 'colorDecorators',
3024
+ id: 'editor.colorDecorators',
2999
3025
  heading: colorDecorators(),
3000
3026
  description: colorDecoratorsDescription(),
3001
3027
  type: Boolean$1,
3002
3028
  value: 'true',
3003
3029
  category: TextEditorTab
3004
3030
  }, {
3005
- id: 'lightbulb',
3031
+ id: 'editor.lightbulb',
3006
3032
  heading: lightbulb(),
3007
3033
  description: lightbulbDescription(),
3008
3034
  type: Boolean$1,
3009
3035
  value: 'true',
3010
3036
  category: TextEditorTab
3011
3037
  }, {
3012
- id: 'codeActionsOnSave',
3038
+ id: 'editor.codeActionsOnSave',
3013
3039
  heading: codeActionsOnSave(),
3014
3040
  description: codeActionsOnSaveDescription(),
3015
3041
  type: Boolean$1,
3016
3042
  value: 'false',
3017
3043
  category: TextEditorTab
3018
3044
  }, {
3019
- id: 'formatOnPaste',
3045
+ id: 'editor.formatOnPaste',
3020
3046
  heading: formatOnPaste(),
3021
3047
  description: formatOnPasteDescription(),
3022
3048
  type: Boolean$1,
3023
3049
  value: 'false',
3024
3050
  category: TextEditorTab
3025
3051
  }, {
3026
- id: 'formatOnType',
3052
+ id: 'editor.formatOnType',
3027
3053
  heading: formatOnType(),
3028
3054
  description: formatOnTypeDescription(),
3029
3055
  type: Boolean$1,
3030
3056
  value: 'false',
3031
3057
  category: TextEditorTab
3032
3058
  }, {
3033
- id: 'acceptSuggestionOnCommitCharacter',
3059
+ id: 'editor.acceptSuggestionOnCommitCharacter',
3034
3060
  heading: acceptSuggestionOnCommitCharacter(),
3035
3061
  description: acceptSuggestionOnCommitCharacterDescription(),
3036
3062
  type: Boolean$1,
3037
3063
  value: 'true',
3038
3064
  category: TextEditorTab
3039
3065
  }, {
3040
- id: 'acceptSuggestionOnEnter',
3066
+ id: 'editor.acceptSuggestionOnEnter',
3041
3067
  heading: acceptSuggestionOnEnter(),
3042
3068
  description: acceptSuggestionOnEnterDescription(),
3043
3069
  type: String,
3044
3070
  value: 'on',
3045
3071
  category: TextEditorTab
3046
3072
  }, {
3047
- id: 'tabCompletion',
3073
+ id: 'editor.tabCompletion',
3048
3074
  heading: tabCompletion(),
3049
3075
  description: tabCompletionDescription(),
3050
3076
  type: String,
3051
3077
  value: 'on',
3052
3078
  category: TextEditorTab
3053
3079
  }, {
3054
- id: 'wordBasedSuggestions',
3080
+ id: 'editor.wordBasedSuggestions',
3055
3081
  heading: wordBasedSuggestions(),
3056
3082
  description: wordBasedSuggestionsDescription(),
3057
3083
  type: Boolean$1,
3058
3084
  value: 'true',
3059
3085
  category: TextEditorTab
3060
3086
  }, {
3061
- id: 'suggestOnTriggerCharacters',
3087
+ id: 'editor.suggestOnTriggerCharacters',
3062
3088
  heading: suggestOnTriggerCharacters(),
3063
3089
  description: suggestOnTriggerCharactersDescription(),
3064
3090
  type: Boolean$1,
3065
3091
  value: 'true',
3066
3092
  category: TextEditorTab
3067
3093
  }, {
3068
- id: 'quickSuggestions',
3094
+ id: 'editor.quickSuggestions',
3069
3095
  heading: quickSuggestions(),
3070
3096
  description: quickSuggestionsDescription(),
3071
3097
  type: Boolean$1,
3072
3098
  value: 'true',
3073
3099
  category: TextEditorTab
3074
3100
  }, {
3075
- id: 'parameterHints',
3101
+ id: 'editor.parameterHints',
3076
3102
  heading: parameterHints(),
3077
3103
  description: parameterHintsDescription(),
3078
3104
  type: Boolean$1,
3079
3105
  value: 'true',
3080
3106
  category: TextEditorTab
3081
3107
  }, {
3082
- id: 'autoClosingBrackets',
3108
+ id: 'editor.autoClosingBrackets',
3083
3109
  heading: autoClosingBrackets(),
3084
3110
  description: autoClosingBracketsDescription(),
3085
3111
  type: String,
3086
3112
  value: 'always',
3087
3113
  category: TextEditorTab
3088
3114
  }, {
3089
- id: 'autoClosingQuotes',
3115
+ id: 'editor.autoClosingQuotes',
3090
3116
  heading: autoClosingQuotes(),
3091
3117
  description: autoClosingQuotesDescription(),
3092
3118
  type: String,
3093
3119
  value: 'always',
3094
3120
  category: TextEditorTab
3095
3121
  }, {
3096
- id: 'autoClosingOvertype',
3122
+ id: 'editor.autoClosingOvertype',
3097
3123
  heading: autoClosingOvertype(),
3098
3124
  description: autoClosingOvertypeDescription(),
3099
3125
  type: String,
3100
3126
  value: 'auto',
3101
3127
  category: TextEditorTab
3102
3128
  }, {
3103
- id: 'autoClosingDelete',
3129
+ id: 'editor.autoClosingDelete',
3104
3130
  heading: autoClosingDelete(),
3105
3131
  description: autoClosingDeleteDescription(),
3106
3132
  type: String,
3107
3133
  value: 'auto',
3108
3134
  category: TextEditorTab
3109
3135
  }, {
3110
- id: 'autoSurround',
3136
+ id: 'editor.autoSurround',
3111
3137
  heading: autoSurround(),
3112
3138
  description: autoSurroundDescription(),
3113
3139
  type: String,
3114
3140
  value: 'quotes',
3115
3141
  category: TextEditorTab
3116
3142
  }, {
3117
- id: 'bracketPairColorization',
3143
+ id: 'editor.bracketPairColorization',
3118
3144
  heading: bracketPairColorization(),
3119
3145
  description: bracketPairColorizationDescription(),
3120
3146
  type: Boolean$1,
3121
3147
  value: 'true',
3122
3148
  category: TextEditorTab
3123
3149
  }, {
3124
- id: 'guides',
3150
+ id: 'editor.guides',
3125
3151
  heading: guides(),
3126
3152
  description: guidesDescription(),
3127
3153
  type: Boolean$1,
3128
3154
  value: 'true',
3129
3155
  category: TextEditorTab
3130
3156
  }, {
3131
- id: 'dragAndDrop',
3157
+ id: 'editor.dragAndDrop',
3132
3158
  heading: dragAndDrop(),
3133
3159
  description: dragAndDropDescription(),
3134
3160
  type: Boolean$1,
3135
3161
  value: 'true',
3136
3162
  category: TextEditorTab
3137
3163
  }, {
3138
- id: 'copyWithSyntaxHighlighting',
3164
+ id: 'editor.copyWithSyntaxHighlighting',
3139
3165
  heading: copyWithSyntaxHighlighting(),
3140
3166
  description: copyWithSyntaxHighlightingDescription(),
3141
3167
  type: Boolean$1,
3142
3168
  value: 'true',
3143
3169
  category: TextEditorTab
3144
3170
  }, {
3145
- id: 'multiCursorModifier',
3171
+ id: 'editor.multiCursorModifier',
3146
3172
  heading: multiCursorModifier(),
3147
3173
  description: multiCursorModifierDescription(),
3148
3174
  type: String,
3149
3175
  value: 'alt',
3150
3176
  category: TextEditorTab
3151
3177
  }, {
3152
- id: 'multiCursorPaste',
3178
+ id: 'editor.multiCursorPaste',
3153
3179
  heading: multiCursorPaste(),
3154
3180
  description: multiCursorPasteDescription(),
3155
3181
  type: String,
3156
3182
  value: 'full',
3157
3183
  category: TextEditorTab
3158
3184
  }, {
3159
- id: 'occurrencesHighlight',
3185
+ id: 'editor.occurrencesHighlight',
3160
3186
  heading: occurrencesHighlight(),
3161
3187
  description: occurrencesHighlightDescription(),
3162
3188
  type: Boolean$1,
3163
3189
  value: 'true',
3164
3190
  category: TextEditorTab
3165
3191
  }, {
3166
- id: 'selectionHighlight',
3192
+ id: 'editor.selectionHighlight',
3167
3193
  heading: selectionHighlight(),
3168
3194
  description: selectionHighlightDescription(),
3169
3195
  type: Boolean$1,
3170
3196
  value: 'true',
3171
3197
  category: TextEditorTab
3172
3198
  }, {
3173
- id: 'semanticHighlighting',
3199
+ id: 'editor.semanticHighlighting',
3174
3200
  heading: semanticHighlighting(),
3175
3201
  description: semanticHighlightingDescription(),
3176
3202
  type: Boolean$1,
3177
3203
  value: 'true',
3178
3204
  category: TextEditorTab
3179
3205
  }, {
3180
- id: 'tokenColorCustomizations',
3206
+ id: 'editor.tokenColorCustomizations',
3181
3207
  heading: tokenColorCustomizations(),
3182
3208
  description: tokenColorCustomizationsDescription(),
3183
3209
  type: String,
3184
3210
  value: '{}',
3185
3211
  category: TextEditorTab
3186
3212
  }, {
3187
- id: 'workbenchColorCustomizations',
3213
+ id: 'editor.workbenchColorCustomizations',
3188
3214
  heading: workbenchColorCustomizations(),
3189
3215
  description: workbenchColorCustomizationsDescription(),
3190
3216
  type: String,
@@ -3198,491 +3224,483 @@ const getSettingItems = async () => {
3198
3224
  value: '{}',
3199
3225
  category: TextEditorTab
3200
3226
  }, {
3201
- id: 'diffEditor',
3227
+ id: 'editor.diffEditor',
3202
3228
  heading: diffEditor(),
3203
3229
  description: diffEditorDescription(),
3204
3230
  type: Boolean$1,
3205
3231
  value: 'true',
3206
3232
  category: TextEditorTab
3207
3233
  }, {
3208
- id: 'diffWordWrap',
3234
+ id: 'editor.diffWordWrap',
3209
3235
  heading: diffWordWrap(),
3210
3236
  description: diffWordWrapDescription(),
3211
3237
  type: String,
3212
3238
  value: 'inherit',
3213
3239
  category: TextEditorTab
3214
3240
  }, {
3215
- id: 'diffCodeLens',
3241
+ id: 'editor.diffCodeLens',
3216
3242
  heading: diffCodeLens(),
3217
3243
  description: diffCodeLensDescription(),
3218
3244
  type: Boolean$1,
3219
3245
  value: 'true',
3220
3246
  category: TextEditorTab
3221
3247
  }, {
3222
- id: 'diffRenderSideBySide',
3248
+ id: 'editor.diffRenderSideBySide',
3223
3249
  heading: diffRenderSideBySide(),
3224
3250
  description: diffRenderSideBySideDescription(),
3225
3251
  type: Boolean$1,
3226
3252
  value: 'true',
3227
3253
  category: TextEditorTab
3228
3254
  }, {
3229
- id: 'diffIgnoreTrimWhitespace',
3255
+ id: 'editor.diffIgnoreTrimWhitespace',
3230
3256
  heading: diffIgnoreTrimWhitespace(),
3231
3257
  description: diffIgnoreTrimWhitespaceDescription(),
3232
3258
  type: Boolean$1,
3233
3259
  value: 'false',
3234
3260
  category: TextEditorTab
3235
3261
  }, {
3236
- id: 'diffRenderIndicators',
3262
+ id: 'editor.diffRenderIndicators',
3237
3263
  heading: diffRenderIndicators(),
3238
3264
  description: diffRenderIndicatorsDescription(),
3239
3265
  type: Boolean$1,
3240
3266
  value: 'true',
3241
3267
  category: TextEditorTab
3242
3268
  }, {
3243
- id: 'diffRenderOverviewRuler',
3269
+ id: 'editor.diffRenderOverviewRuler',
3244
3270
  heading: diffRenderOverviewRuler(),
3245
3271
  description: diffRenderOverviewRulerDescription(),
3246
3272
  type: Boolean$1,
3247
3273
  value: 'true',
3248
3274
  category: TextEditorTab
3249
3275
  }, {
3250
- id: 'diffRenderMarginRevertIcon',
3276
+ id: 'editor.diffRenderMarginRevertIcon',
3251
3277
  heading: diffRenderMarginRevertIcon(),
3252
3278
  description: diffRenderMarginRevertIconDescription(),
3253
3279
  type: Boolean$1,
3254
3280
  value: 'true',
3255
3281
  category: TextEditorTab
3256
- },
3257
- // Additional Text Editor Settings
3258
- {
3259
- id: 'insertMode',
3282
+ }, {
3283
+ id: 'editor.insertMode',
3260
3284
  heading: insertMode(),
3261
3285
  description: insertModeDescription(),
3262
3286
  type: Boolean$1,
3263
3287
  value: 'true',
3264
3288
  category: TextEditorTab
3265
3289
  }, {
3266
- id: 'overwriteMode',
3290
+ id: 'editor.overwriteMode',
3267
3291
  heading: overwriteMode(),
3268
3292
  description: overwriteModeDescription(),
3269
3293
  type: Boolean$1,
3270
3294
  value: 'false',
3271
3295
  category: TextEditorTab
3272
3296
  }, {
3273
- id: 'readOnly',
3297
+ id: 'editor.readOnly',
3274
3298
  heading: readOnly(),
3275
3299
  description: readOnlyDescription(),
3276
3300
  type: Boolean$1,
3277
3301
  value: 'false',
3278
3302
  category: TextEditorTab
3279
3303
  }, {
3280
- id: 'accessibilitySupport',
3304
+ id: 'editor.accessibilitySupport',
3281
3305
  heading: accessibilitySupport(),
3282
3306
  description: accessibilitySupportDescription(),
3283
3307
  type: String,
3284
3308
  value: 'auto',
3285
3309
  category: TextEditorTab
3286
3310
  }, {
3287
- id: 'autoIndent',
3311
+ id: 'editor.autoIndent',
3288
3312
  heading: autoIndent(),
3289
3313
  description: autoIndentDescription(),
3290
3314
  type: Boolean$1,
3291
3315
  value: 'true',
3292
3316
  category: TextEditorTab
3293
3317
  }, {
3294
- id: 'bracketMatching',
3318
+ id: 'editor.bracketMatching',
3295
3319
  heading: bracketMatching(),
3296
3320
  description: bracketMatchingDescription(),
3297
3321
  type: Boolean$1,
3298
3322
  value: 'true',
3299
3323
  category: TextEditorTab
3300
3324
  }, {
3301
- id: 'centeredLayout',
3325
+ id: 'editor.centeredLayout',
3302
3326
  heading: centeredLayout(),
3303
3327
  description: centeredLayoutDescription(),
3304
3328
  type: Boolean$1,
3305
3329
  value: 'false',
3306
3330
  category: TextEditorTab
3307
3331
  }, {
3308
- id: 'columnSelection',
3332
+ id: 'editor.columnSelection',
3309
3333
  heading: columnSelection(),
3310
3334
  description: columnSelectionDescription(),
3311
3335
  type: Boolean$1,
3312
3336
  value: 'false',
3313
3337
  category: TextEditorTab
3314
3338
  }, {
3315
- id: 'contextmenu',
3339
+ id: 'editor.contextmenu',
3316
3340
  heading: contextmenu(),
3317
3341
  description: contextmenuDescription(),
3318
3342
  type: Boolean$1,
3319
3343
  value: 'true',
3320
3344
  category: TextEditorTab
3321
3345
  }, {
3322
- id: 'cursorSmoothCaretAnimation',
3346
+ id: 'editor.cursorSmoothCaretAnimation',
3323
3347
  heading: cursorSmoothCaretAnimation(),
3324
3348
  description: cursorSmoothCaretAnimationDescription(),
3325
3349
  type: String,
3326
3350
  value: 'off',
3327
3351
  category: TextEditorTab
3328
3352
  }, {
3329
- id: 'cursorSurroundingLines',
3353
+ id: 'editor.cursorSurroundingLines',
3330
3354
  heading: cursorSurroundingLines(),
3331
3355
  description: cursorSurroundingLinesDescription(),
3332
3356
  type: Number$1,
3333
3357
  value: '3',
3334
3358
  category: TextEditorTab
3335
3359
  }, {
3336
- id: 'cursorSurroundingLinesStyle',
3360
+ id: 'editor.cursorSurroundingLinesStyle',
3337
3361
  heading: cursorSurroundingLinesStyle(),
3338
3362
  description: cursorSurroundingLinesStyleDescription(),
3339
3363
  type: String,
3340
3364
  value: 'all',
3341
3365
  category: TextEditorTab
3342
3366
  }, {
3343
- id: 'disableMonospaceOptimizations',
3367
+ id: 'editor.disableMonospaceOptimizations',
3344
3368
  heading: disableMonospaceOptimizations(),
3345
3369
  description: disableMonospaceOptimizationsDescription(),
3346
3370
  type: Boolean$1,
3347
3371
  value: 'false',
3348
3372
  category: TextEditorTab
3349
3373
  }, {
3350
- id: 'emptySelectionClipboard',
3374
+ id: 'editor.emptySelectionClipboard',
3351
3375
  heading: emptySelectionClipboard(),
3352
3376
  description: emptySelectionClipboardDescription(),
3353
3377
  type: Boolean$1,
3354
3378
  value: 'true',
3355
3379
  category: TextEditorTab
3356
3380
  }, {
3357
- id: 'extraEditorClassName',
3381
+ id: 'editor.extraEditorClassName',
3358
3382
  heading: extraEditorClassName(),
3359
3383
  description: extraEditorClassNameDescription(),
3360
3384
  type: String,
3361
3385
  value: '',
3362
3386
  category: TextEditorTab
3363
3387
  }, {
3364
- id: 'fastScrollSensitivity',
3388
+ id: 'editor.fastScrollSensitivity',
3365
3389
  heading: fastScrollSensitivity(),
3366
3390
  description: fastScrollSensitivityDescription(),
3367
3391
  type: Number$1,
3368
3392
  value: '5',
3369
3393
  category: TextEditorTab
3370
3394
  }, {
3371
- id: 'find',
3395
+ id: 'editor.find',
3372
3396
  heading: find(),
3373
3397
  description: findDescription(),
3374
3398
  type: Boolean$1,
3375
3399
  value: 'true',
3376
3400
  category: TextEditorTab
3377
3401
  }, {
3378
- id: 'fixedOverflowWidgets',
3402
+ id: 'editor.fixedOverflowWidgets',
3379
3403
  heading: fixedOverflowWidgets(),
3380
3404
  description: fixedOverflowWidgetsDescription(),
3381
3405
  type: Boolean$1,
3382
3406
  value: 'false',
3383
3407
  category: TextEditorTab
3384
3408
  }, {
3385
- id: 'foldingStrategy',
3409
+ id: 'editor.foldingStrategy',
3386
3410
  heading: foldingStrategy(),
3387
3411
  description: foldingStrategyDescription(),
3388
3412
  type: String,
3389
3413
  value: 'auto',
3390
3414
  category: TextEditorTab
3391
3415
  }, {
3392
- id: 'fontLigatures',
3416
+ id: 'editor.fontLigatures',
3393
3417
  heading: fontLigatures(),
3394
3418
  description: fontLigaturesDescription(),
3395
3419
  type: Boolean$1,
3396
3420
  value: 'false',
3397
3421
  category: TextEditorTab
3398
3422
  }, {
3399
- id: 'glyphMargin',
3423
+ id: 'editor.glyphMargin',
3400
3424
  heading: glyphMargin(),
3401
3425
  description: glyphMarginDescription(),
3402
3426
  type: Boolean$1,
3403
3427
  value: 'true',
3404
3428
  category: TextEditorTab
3405
3429
  }, {
3406
- id: 'gotoLocation',
3430
+ id: 'editor.gotoLocation',
3407
3431
  heading: gotoLocation(),
3408
3432
  description: gotoLocationDescription(),
3409
3433
  type: String,
3410
3434
  value: 'mouse',
3411
3435
  category: TextEditorTab
3412
3436
  }, {
3413
- id: 'hideCursorInOverviewRuler',
3437
+ id: 'editor.hideCursorInOverviewRuler',
3414
3438
  heading: hideCursorInOverviewRuler(),
3415
3439
  description: hideCursorInOverviewRulerDescription(),
3416
3440
  type: Boolean$1,
3417
3441
  value: 'false',
3418
3442
  category: TextEditorTab
3419
3443
  }, {
3420
- id: 'hover',
3444
+ id: 'editor.hover',
3421
3445
  heading: hover(),
3422
3446
  description: hoverDescription(),
3423
3447
  type: Boolean$1,
3424
3448
  value: 'true',
3425
3449
  category: TextEditorTab
3426
3450
  }, {
3427
- id: 'inDiffEditor',
3451
+ id: 'editor.inDiffEditor',
3428
3452
  heading: inDiffEditor(),
3429
3453
  description: inDiffEditorDescription(),
3430
3454
  type: Boolean$1,
3431
3455
  value: 'false',
3432
3456
  category: TextEditorTab
3433
3457
  }, {
3434
- id: 'letterSpacing',
3458
+ id: 'editor.letterSpacing',
3435
3459
  heading: letterSpacing(),
3436
3460
  description: letterSpacingDescription(),
3437
3461
  type: Number$1,
3438
3462
  value: '0',
3439
3463
  category: TextEditorTab
3440
3464
  }, {
3441
- id: 'lightbulbEnabled',
3465
+ id: 'editor.lightbulbEnabled',
3442
3466
  heading: lightbulbEnabled(),
3443
3467
  description: lightbulbEnabledDescription(),
3444
3468
  type: Boolean$1,
3445
3469
  value: 'true',
3446
3470
  category: TextEditorTab
3447
3471
  }, {
3448
- id: 'lineDecorationsWidth',
3472
+ id: 'editor.lineDecorationsWidth',
3449
3473
  heading: lineDecorationsWidth(),
3450
3474
  description: lineDecorationsWidthDescription(),
3451
3475
  type: Number$1,
3452
3476
  value: '10',
3453
3477
  category: TextEditorTab
3454
3478
  }, {
3455
- id: 'lineHeight',
3479
+ id: 'editor.lineHeight',
3456
3480
  heading: lineHeight(),
3457
3481
  description: lineHeightDescription(),
3458
3482
  type: Number$1,
3459
3483
  value: '0',
3460
3484
  category: TextEditorTab
3461
3485
  }, {
3462
- id: 'matchBrackets',
3486
+ id: 'editor.matchBrackets',
3463
3487
  heading: matchBrackets(),
3464
3488
  description: matchBracketsDescription(),
3465
3489
  type: Boolean$1,
3466
3490
  value: 'true',
3467
3491
  category: TextEditorTab
3468
3492
  }, {
3469
- id: 'minimapEnabled',
3493
+ id: 'editor.minimapEnabled',
3470
3494
  heading: minimapEnabled(),
3471
3495
  description: minimapEnabledDescription(),
3472
3496
  type: Boolean$1,
3473
3497
  value: 'true',
3474
3498
  category: TextEditorTab
3475
3499
  }, {
3476
- id: 'mouseWheelScrollSensitivity',
3500
+ id: 'editor.mouseWheelScrollSensitivity',
3477
3501
  heading: mouseWheelScrollSensitivity(),
3478
3502
  description: mouseWheelScrollSensitivityDescription(),
3479
3503
  type: Number$1,
3480
3504
  value: '1',
3481
3505
  category: TextEditorTab
3482
3506
  }, {
3483
- id: 'mouseWheelZoom',
3507
+ id: 'editor.mouseWheelZoom',
3484
3508
  heading: mouseWheelZoom(),
3485
3509
  description: mouseWheelZoomDescription(),
3486
3510
  type: Boolean$1,
3487
3511
  value: 'false',
3488
3512
  category: TextEditorTab
3489
3513
  }, {
3490
- id: 'multiCursorMergeOverlapping',
3514
+ id: 'editor.multiCursorMergeOverlapping',
3491
3515
  heading: multiCursorMergeOverlapping(),
3492
3516
  description: multiCursorMergeOverlappingDescription(),
3493
3517
  type: Boolean$1,
3494
3518
  value: 'true',
3495
3519
  category: TextEditorTab
3496
3520
  }, {
3497
- id: 'overviewRulerBorder',
3521
+ id: 'editor.overviewRulerBorder',
3498
3522
  heading: overviewRulerBorder(),
3499
3523
  description: overviewRulerBorderDescription(),
3500
3524
  type: Boolean$1,
3501
3525
  value: 'true',
3502
3526
  category: TextEditorTab
3503
3527
  }, {
3504
- id: 'overviewRulerLanes',
3528
+ id: 'editor.overviewRulerLanes',
3505
3529
  heading: overviewRulerLanes(),
3506
3530
  description: overviewRulerLanesDescription(),
3507
3531
  type: Number$1,
3508
3532
  value: '3',
3509
3533
  category: TextEditorTab
3510
3534
  }, {
3511
- id: 'peekWidgetDefaultFocus',
3535
+ id: 'editor.peekWidgetDefaultFocus',
3512
3536
  heading: peekWidgetDefaultFocus(),
3513
3537
  description: peekWidgetDefaultFocusDescription(),
3514
3538
  type: String,
3515
3539
  value: 'editor',
3516
3540
  category: TextEditorTab
3517
3541
  }, {
3518
- id: 'quickSuggestionsDelay',
3542
+ id: 'editor.quickSuggestionsDelay',
3519
3543
  heading: quickSuggestionsDelay(),
3520
3544
  description: quickSuggestionsDelayDescription(),
3521
3545
  type: Number$1,
3522
3546
  value: '10',
3523
3547
  category: TextEditorTab
3524
3548
  }, {
3525
- id: 'renderFinalNewline',
3549
+ id: 'editor.renderFinalNewline',
3526
3550
  heading: renderFinalNewline(),
3527
3551
  description: renderFinalNewlineDescription(),
3528
3552
  type: Boolean$1,
3529
3553
  value: 'true',
3530
3554
  category: TextEditorTab
3531
3555
  }, {
3532
- id: 'renderValidationDecorations',
3556
+ id: 'editor.renderValidationDecorations',
3533
3557
  heading: renderValidationDecorations(),
3534
3558
  description: renderValidationDecorationsDescription(),
3535
3559
  type: Boolean$1,
3536
3560
  value: 'true',
3537
3561
  category: TextEditorTab
3538
3562
  }, {
3539
- id: 'revealHorizontalRightPadding',
3563
+ id: 'editor.revealHorizontalRightPadding',
3540
3564
  heading: revealHorizontalRightPadding(),
3541
3565
  description: revealHorizontalRightPaddingDescription(),
3542
3566
  type: Number$1,
3543
3567
  value: '30',
3544
3568
  category: TextEditorTab
3545
3569
  }, {
3546
- id: 'roundedSelection',
3570
+ id: 'editor.roundedSelection',
3547
3571
  heading: roundedSelection(),
3548
3572
  description: roundedSelectionDescription(),
3549
3573
  type: Boolean$1,
3550
3574
  value: 'true',
3551
3575
  category: TextEditorTab
3552
3576
  }, {
3553
- id: 'rulers',
3577
+ id: 'editor.rulers',
3554
3578
  heading: rulers(),
3555
3579
  description: rulersDescription(),
3556
3580
  type: String,
3557
3581
  value: '[]',
3558
3582
  category: TextEditorTab
3559
3583
  }, {
3560
- id: 'scrollBeyondLastColumn',
3584
+ id: 'editor.scrollBeyondLastColumn',
3561
3585
  heading: scrollBeyondLastColumn(),
3562
3586
  description: scrollBeyondLastColumnDescription(),
3563
3587
  type: Number$1,
3564
3588
  value: '5',
3565
3589
  category: TextEditorTab
3566
3590
  }, {
3567
- id: 'scrollbar',
3591
+ id: 'editor.scrollbar',
3568
3592
  heading: scrollbar(),
3569
3593
  description: scrollbarDescription(),
3570
3594
  type: String,
3571
3595
  value: 'auto',
3572
3596
  category: TextEditorTab
3573
3597
  }, {
3574
- id: 'scrollPredominantAxis',
3598
+ id: 'editor.scrollPredominantAxis',
3575
3599
  heading: scrollPredominantAxis(),
3576
3600
  description: scrollPredominantAxisDescription(),
3577
3601
  type: Boolean$1,
3578
3602
  value: 'true',
3579
3603
  category: TextEditorTab
3580
3604
  }, {
3581
- id: 'selectionClipboard',
3605
+ id: 'editor.selectionClipboard',
3582
3606
  heading: selectionClipboard(),
3583
3607
  description: selectionClipboardDescription(),
3584
3608
  type: Boolean$1,
3585
3609
  value: 'true',
3586
3610
  category: TextEditorTab
3587
3611
  }, {
3588
- id: 'Editor.background',
3612
+ id: 'editor.background',
3589
3613
  heading: 'Editor background',
3590
3614
  description: 'Editor background color',
3591
3615
  type: Color,
3592
3616
  value: '#567567',
3593
3617
  category: TextEditorTab
3594
3618
  }, {
3595
- id: 'showUnused',
3619
+ id: 'editor.showUnused',
3596
3620
  heading: showUnused(),
3597
3621
  description: showUnusedDescription(),
3598
3622
  type: Boolean$1,
3599
3623
  value: 'true',
3600
3624
  category: TextEditorTab
3601
3625
  }, {
3602
- id: 'snippetSuggestions',
3626
+ id: 'editor.snippetSuggestions',
3603
3627
  heading: snippetSuggestions(),
3604
3628
  description: snippetSuggestionsDescription(),
3605
3629
  type: String,
3606
3630
  value: 'bottom',
3607
3631
  category: TextEditorTab
3608
3632
  }, {
3609
- id: 'suggest',
3633
+ id: 'editor.suggest',
3610
3634
  heading: suggest(),
3611
3635
  description: suggestDescription(),
3612
3636
  type: Boolean$1,
3613
3637
  value: 'true',
3614
3638
  category: TextEditorTab
3615
3639
  }, {
3616
- id: 'suggestFontSize',
3640
+ id: 'editor.suggestFontSize',
3617
3641
  heading: suggestFontSize(),
3618
3642
  description: suggestFontSizeDescription(),
3619
3643
  type: Number$1,
3620
3644
  value: '0',
3621
3645
  category: TextEditorTab
3622
3646
  }, {
3623
- id: 'suggestLineHeight',
3647
+ id: 'editor.suggestLineHeight',
3624
3648
  heading: suggestLineHeight(),
3625
3649
  description: suggestLineHeightDescription(),
3626
3650
  type: Number$1,
3627
3651
  value: '0',
3628
3652
  category: TextEditorTab
3629
3653
  }, {
3630
- id: 'suggestSelection',
3654
+ id: 'editor.suggestSelection',
3631
3655
  heading: suggestSelection(),
3632
3656
  description: suggestSelectionDescription(),
3633
3657
  type: String,
3634
3658
  value: 'recentlyUsed',
3635
3659
  category: TextEditorTab
3636
3660
  }, {
3637
- id: 'useTabStops',
3661
+ id: 'editor.useTabStops',
3638
3662
  heading: useTabStops(),
3639
3663
  description: useTabStopsDescription(),
3640
3664
  type: Boolean$1,
3641
3665
  value: 'true',
3642
3666
  category: TextEditorTab
3643
3667
  }, {
3644
- id: 'wordSeparators',
3668
+ id: 'editor.wordSeparators',
3645
3669
  heading: wordSeparators(),
3646
3670
  description: wordSeparatorsDescription(),
3647
3671
  type: String,
3648
3672
  value: '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?',
3649
3673
  category: TextEditorTab
3650
3674
  }, {
3651
- id: 'wrappingIndent',
3675
+ id: 'editor.wrappingIndent',
3652
3676
  heading: wrappingIndent(),
3653
3677
  description: wrappingIndentDescription(),
3654
3678
  type: String,
3655
3679
  value: 'same',
3656
3680
  category: TextEditorTab
3681
+ }];
3682
+ };
3683
+
3684
+ const getSettingItemsExtensions = () => {
3685
+ return [{
3686
+ id: 'extensionsAutoUpdate',
3687
+ heading: autoUpdateExtensions(),
3688
+ description: autoUpdateExtensionsDescription(),
3689
+ type: Boolean$1,
3690
+ value: 'true',
3691
+ category: ExtensionsTab
3657
3692
  }, {
3658
- id: 'theme',
3659
- heading: theme(),
3660
- description: themeDescription(),
3661
- type: String,
3662
- value: 'Dark',
3663
- category: WorkbenchTab
3664
- }, {
3665
- id: 'sidebarPosition',
3666
- heading: sidebarPosition(),
3667
- description: sidebarPositionDescription(),
3668
- type: String,
3669
- value: 'Left',
3670
- category: WorkbenchTab
3671
- }, {
3672
- id: 'windowTitle',
3673
- heading: windowTitle(),
3674
- description: windowTitleDescription(),
3675
- type: String,
3676
- value: 'Settings View',
3677
- category: WindowTab
3678
- }, {
3679
- id: 'windowSize',
3680
- heading: windowSize(),
3681
- description: windowSizeDescription(),
3682
- type: String,
3683
- value: '1024x768',
3684
- category: WindowTab
3685
- }, {
3693
+ id: 'extensionRecommendations',
3694
+ heading: extensionRecommendations(),
3695
+ description: extensionRecommendationsDescription(),
3696
+ type: Boolean$1,
3697
+ value: 'true',
3698
+ category: ExtensionsTab
3699
+ }];
3700
+ };
3701
+
3702
+ const getSettingItemsFeatures = () => {
3703
+ return [{
3686
3704
  id: 'autoSave',
3687
3705
  heading: autoSave(),
3688
3706
  description: autoSaveDescription(),
@@ -3696,21 +3714,11 @@ const getSettingItems = async () => {
3696
3714
  type: Boolean$1,
3697
3715
  value: 'false',
3698
3716
  category: FeaturesTab
3699
- }, {
3700
- id: 'telemetry',
3701
- heading: telemetry(),
3702
- description: telemetryDescription(),
3703
- type: Boolean$1,
3704
- value: 'true',
3705
- category: ApplicationsTab
3706
- }, {
3707
- id: 'updates',
3708
- heading: autoUpdates(),
3709
- description: autoUpdatesDescription(),
3710
- type: Boolean$1,
3711
- value: 'true',
3712
- category: ApplicationsTab
3713
- }, {
3717
+ }];
3718
+ };
3719
+
3720
+ const getSettingItemsSecurity = () => {
3721
+ return [{
3714
3722
  id: 'encryption',
3715
3723
  heading: fileEncryption(),
3716
3724
  description: fileEncryptionDescription(),
@@ -3724,23 +3732,49 @@ const getSettingItems = async () => {
3724
3732
  type: Boolean$1,
3725
3733
  value: 'false',
3726
3734
  category: SecurityTab
3735
+ }];
3736
+ };
3737
+
3738
+ const getSettingItemsWindow = () => {
3739
+ return [{
3740
+ id: 'windowTitle',
3741
+ heading: windowTitle(),
3742
+ description: windowTitleDescription(),
3743
+ type: String,
3744
+ value: 'Settings View',
3745
+ category: WindowTab
3727
3746
  }, {
3728
- id: 'extensionsAutoUpdate',
3729
- heading: autoUpdateExtensions(),
3730
- description: autoUpdateExtensionsDescription(),
3731
- type: Boolean$1,
3732
- value: 'true',
3733
- category: ExtensionsTab
3747
+ id: 'windowSize',
3748
+ heading: windowSize(),
3749
+ description: windowSizeDescription(),
3750
+ type: String,
3751
+ value: '1024x768',
3752
+ category: WindowTab
3753
+ }];
3754
+ };
3755
+
3756
+ const getSettingItemsWorkbench = () => {
3757
+ return [{
3758
+ id: 'theme',
3759
+ heading: theme(),
3760
+ description: themeDescription(),
3761
+ type: String,
3762
+ value: 'Dark',
3763
+ category: WorkbenchTab
3734
3764
  }, {
3735
- id: 'extensionRecommendations',
3736
- heading: extensionRecommendations(),
3737
- description: extensionRecommendationsDescription(),
3738
- type: Boolean$1,
3739
- value: 'true',
3740
- category: ExtensionsTab
3765
+ id: 'sidebarPosition',
3766
+ heading: sidebarPosition(),
3767
+ description: sidebarPositionDescription(),
3768
+ type: String,
3769
+ value: 'Left',
3770
+ category: WorkbenchTab
3741
3771
  }];
3742
3772
  };
3743
3773
 
3774
+ const getSettingItems = async () => {
3775
+ return [...getSettingItemsEditor(), ...getSettingItemsWorkbench(), ...getSettingItemsWindow(), ...getSettingItemsFeatures(), ...getSettingItemsApplications(), ...getSettingItemsSecurity(), ...getSettingItemsExtensions()];
3776
+ };
3777
+
3744
3778
  const getTabs = () => {
3745
3779
  const tabs = [{
3746
3780
  id: TextEditorTab,
@@ -3831,17 +3865,9 @@ const getSavedTabId = savedState => {
3831
3865
  return '';
3832
3866
  };
3833
3867
 
3834
- const getSavedWorkspacePath = savedState => {
3835
- if (savedState && typeof savedState === 'object' && 'workspacePath' in savedState && typeof savedState.workspacePath === 'string') {
3836
- return savedState.workspacePath;
3837
- }
3838
- return '';
3839
- };
3840
-
3841
3868
  const restoreState = savedState => {
3842
3869
  if (!savedState) {
3843
3870
  return {
3844
- root: '',
3845
3871
  minLineY: 0,
3846
3872
  deltaY: 0,
3847
3873
  tabId: '',
@@ -3851,7 +3877,6 @@ const restoreState = savedState => {
3851
3877
  historyIndex: -1
3852
3878
  };
3853
3879
  }
3854
- const root = getSavedWorkspacePath(savedState);
3855
3880
  const minLineY = getSavedMinLineY(savedState);
3856
3881
  const deltaY = getSavedDeltaY(savedState);
3857
3882
  const tabId = getSavedTabId(savedState);
@@ -3860,7 +3885,6 @@ const restoreState = savedState => {
3860
3885
  const history = getSavedHistory(savedState);
3861
3886
  const historyIndex = getSavedHistoryIndex(savedState, history);
3862
3887
  return {
3863
- root,
3864
3888
  minLineY,
3865
3889
  deltaY,
3866
3890
  tabId,
@@ -3917,11 +3941,8 @@ const {
3917
3941
  Viewlet
3918
3942
  } = ClassNames;
3919
3943
  const Badge = 'Badge';
3920
- const Button = 'Button';
3921
3944
  const CheckBox = 'CheckBox';
3922
- const Disabled = 'Disabled';
3923
3945
  const InputBox = 'InputBox';
3924
- const InputButton = 'InputButton';
3925
3946
  const MaskIcon = 'MaskIcon';
3926
3947
  const MaskIconClearAll = 'MaskIconClearAll';
3927
3948
  const ModifiedIndicator = 'ModifiedIndicator';
@@ -3965,33 +3986,37 @@ const HandleScroll = 'handleScroll';
3965
3986
  const HandleSettingSelect = 'handleSettingSelect';
3966
3987
  const HandleInputFocus = 'handleInputFocus';
3967
3988
 
3968
- const getButtonClassName = hasSearchValue => {
3989
+ const enabledClass = SearchFieldButton;
3990
+ const disabledClass = mergeClassNames(enabledClass, 'SearchFieldButtonDisabled');
3991
+ const getClearButtonClassName = hasSearchValue => {
3969
3992
  if (hasSearchValue) {
3970
- return mergeClassNames(Button, InputButton, SearchFieldButton);
3993
+ return enabledClass;
3971
3994
  }
3972
- return mergeClassNames(Button, InputButton, SearchFieldButton, Disabled);
3995
+ return disabledClass;
3996
+ };
3997
+
3998
+ const icon = {
3999
+ type: VirtualDomElements.Div,
4000
+ className: mergeClassNames(MaskIcon, MaskIconClearAll),
4001
+ childCount: 0
3973
4002
  };
3974
4003
  const getSettingsInputButtonsDom = hasSearchValue => {
3975
4004
  return [{
3976
4005
  type: VirtualDomElements.Button,
3977
- className: getButtonClassName(hasSearchValue),
4006
+ className: getClearButtonClassName(hasSearchValue),
3978
4007
  childCount: 1,
3979
4008
  ariaLabel: clear(),
3980
4009
  name: Clear$1,
3981
4010
  disabled: !hasSearchValue,
3982
4011
  onClick: HandleClickClear
3983
- }, {
3984
- type: VirtualDomElements.Div,
3985
- className: mergeClassNames(MaskIcon, MaskIconClearAll),
3986
- childCount: 0
3987
- }];
4012
+ }, icon];
3988
4013
  };
3989
4014
 
3990
4015
  const getSettingsInputDom = () => {
3991
4016
  const placeholder = searchSettings();
3992
4017
  return [{
3993
4018
  type: VirtualDomElements.Input,
3994
- className: mergeClassNames(InputBox, SettingsSearchInput),
4019
+ className: mergeClassNames(InputBox, SettingsSearchInput, 'MultilineInputBox'),
3995
4020
  placeholder,
3996
4021
  childCount: 0,
3997
4022
  name: SettingsSearch,
@@ -4004,7 +4029,6 @@ const getChildCount = hasSearchValue => {
4004
4029
  return hasSearchValue ? 3 : 2;
4005
4030
  };
4006
4031
  const getSettingsHeaderDom = (filteredSettingsCount, hasSearchValue) => {
4007
- const badgeDom = getSettingsInputBadgeDom(filteredSettingsCount, hasSearchValue);
4008
4032
  const childCount = getChildCount(hasSearchValue);
4009
4033
  return [{
4010
4034
  type: VirtualDomElements.Div,
@@ -4012,9 +4036,9 @@ const getSettingsHeaderDom = (filteredSettingsCount, hasSearchValue) => {
4012
4036
  childCount: 1
4013
4037
  }, {
4014
4038
  type: VirtualDomElements.Div,
4015
- className: SettingsInputWrapper,
4039
+ className: mergeClassNames(SettingsInputWrapper, 'SearchField'),
4016
4040
  childCount
4017
- }, ...getSettingsInputDom(), ...getSettingsInputButtonsDom(hasSearchValue), ...badgeDom];
4041
+ }, ...getSettingsInputDom(), ...getSettingsInputBadgeDom(filteredSettingsCount, hasSearchValue), ...getSettingsInputButtonsDom(hasSearchValue)];
4018
4042
  };
4019
4043
 
4020
4044
  const getInputId = id => {
@@ -4058,11 +4082,12 @@ const getItemCheckBoxVirtualDom = item => {
4058
4082
  }, text(description)];
4059
4083
  };
4060
4084
 
4085
+ const parent = {
4086
+ type: VirtualDomElements.H3,
4087
+ childCount: 1
4088
+ };
4061
4089
  const getItemHeadingDom = heading => {
4062
- return [{
4063
- type: VirtualDomElements.H3,
4064
- childCount: 1
4065
- }, text(heading)];
4090
+ return [parent, text(heading)];
4066
4091
  };
4067
4092
 
4068
4093
  const getItemLabelDom = (domId, label) => {
@@ -4350,10 +4375,10 @@ const getSettingsDom = state => {
4350
4375
  const {
4351
4376
  tabs,
4352
4377
  filteredItems,
4353
- searchValue,
4354
- filteredItemsCount
4378
+ searchValue
4355
4379
  } = state;
4356
4380
  const hasSearchValue = searchValue.trim().length > 0;
4381
+ const filteredItemsCount = filteredItems.length;
4357
4382
  return [{
4358
4383
  type: VirtualDomElements.Div,
4359
4384
  childCount: 2,
@@ -4380,13 +4405,17 @@ const enabledTypes = [Number$1, String, Color];
4380
4405
  const renderSettingValues = (oldState, newState) => {
4381
4406
  const {
4382
4407
  filteredItems,
4383
- id
4408
+ id,
4409
+ preferences
4384
4410
  } = newState;
4385
- const numericSettings = filteredItems.filter(item => enabledTypes.includes(item.type));
4386
- const inputValues = numericSettings.map(item => ({
4387
- name: item.id,
4388
- value: item.value
4389
- }));
4411
+ const enabledSettings = filteredItems.filter(item => enabledTypes.includes(item.type));
4412
+ const inputValues = enabledSettings.map(item => {
4413
+ const value = preferences[item.id] || item.value;
4414
+ return {
4415
+ name: item.id,
4416
+ value
4417
+ };
4418
+ });
4390
4419
  return ['Viewlet.setInputValues', id, inputValues];
4391
4420
  };
4392
4421
 
@@ -4480,8 +4509,6 @@ const saveState = state => {
4480
4509
  } = state;
4481
4510
  const selectedTab = getSelectedTabId(tabs);
4482
4511
  return {
4483
- expandedPaths: [],
4484
- root: '',
4485
4512
  minLineY: 0,
4486
4513
  maxLineY: 0,
4487
4514
  deltaY: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/settings-view",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",