Skip to content

Commit

Permalink
Merge pull request #494 from conwnet/master
Browse files Browse the repository at this point in the history
release 0.13.0
  • Loading branch information
conwnet authored Apr 16, 2023
2 parents 0d4e69a + f00d3a7 commit 3c8207a
Show file tree
Hide file tree
Showing 18 changed files with 408 additions and 240 deletions.
2 changes: 1 addition & 1 deletion extensions/github1s/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@
"node-polyfill-webpack-plugin": "^1.1.4",
"ts-loader": "^9.2.8",
"typescript": "^4.6.3",
"webpack": "^5.72.0",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.2"
}
}
48 changes: 24 additions & 24 deletions extensions/github1s/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ acorn-import-assertions@^1.7.6:
resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9"
integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==

acorn@^8.4.1, acorn@^8.5.0:
version "8.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30"
integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==
acorn@^8.5.0, acorn@^8.7.1:
version "8.8.2"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a"
integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==

ajv-keywords@^3.5.2:
version "3.5.2"
Expand Down Expand Up @@ -738,10 +738,10 @@ elliptic@^6.5.3:
minimalistic-assert "^1.0.1"
minimalistic-crypto-utils "^1.0.1"

enhanced-resolve@^5.0.0, enhanced-resolve@^5.9.2:
version "5.9.3"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88"
integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==
enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0:
version "5.12.0"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634"
integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==
dependencies:
graceful-fs "^4.2.4"
tapable "^2.2.0"
Expand Down Expand Up @@ -1251,10 +1251,10 @@ js-base64@^3.7.2:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

json-parse-better-errors@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==
json-parse-even-better-errors@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==

json-schema-traverse@^0.4.1:
version "0.4.1"
Expand Down Expand Up @@ -2019,10 +2019,10 @@ vm-browserify@^1.1.2:
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==

watchpack@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25"
integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==
watchpack@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"
integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==
dependencies:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
Expand Down Expand Up @@ -2063,34 +2063,34 @@ webpack-sources@^3.2.3:
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==

webpack@^5.72.0:
version "5.72.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.72.0.tgz#f8bc40d9c6bb489a4b7a8a685101d6022b8b6e28"
integrity sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==
webpack@^5.76.0:
version "5.76.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.0.tgz#f9fb9fb8c4a7dbdcd0d56a98e56b8a942ee2692c"
integrity sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==
dependencies:
"@types/eslint-scope" "^3.7.3"
"@types/estree" "^0.0.51"
"@webassemblyjs/ast" "1.11.1"
"@webassemblyjs/wasm-edit" "1.11.1"
"@webassemblyjs/wasm-parser" "1.11.1"
acorn "^8.4.1"
acorn "^8.7.1"
acorn-import-assertions "^1.7.6"
browserslist "^4.14.5"
chrome-trace-event "^1.0.2"
enhanced-resolve "^5.9.2"
enhanced-resolve "^5.10.0"
es-module-lexer "^0.9.0"
eslint-scope "5.1.1"
events "^3.2.0"
glob-to-regexp "^0.4.1"
graceful-fs "^4.2.9"
json-parse-better-errors "^1.0.2"
json-parse-even-better-errors "^2.3.1"
loader-runner "^4.2.0"
mime-types "^2.1.27"
neo-async "^2.6.2"
schema-utils "^3.1.0"
tapable "^2.1.1"
terser-webpack-plugin "^5.1.3"
watchpack "^2.3.1"
watchpack "^2.4.0"
webpack-sources "^3.2.3"

whatwg-url@^5.0.0:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lib": "lib"
},
"devDependencies": {
"@github1s/vscode-web": "0.8.0",
"@github1s/vscode-web": "0.9.0",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"chokidar": "^3.5.3",
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ const resolvePlatformState = (): [Platform, string] => {
];

(window as any).vscodeWeb = {
commands: vscodeCommands,
allowEditorLabelOverride: true,
additionalBuiltinExtensions: ['ms-vscode.anycode'],
webviewEndpoint: staticAssetsPrefix + '/vscode/vs/workbench/contrib/webview/browser/pre',
commands: vscodeCommands,
productConfiguration: createProductConfiguration(platform),
initialColorTheme: { themeType: 'dark' as any },
builtinExtensions: window.github1sExtensions || [],
Expand Down
2 changes: 1 addition & 1 deletion vscode-web/.VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.75.1
1.77.3
8 changes: 4 additions & 4 deletions vscode-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@github1s/vscode-web",
"version": "0.8.0",
"version": "0.9.0",
"description": "VS Code web for GitHub1s",
"author": "github1s",
"license": "MIT",
Expand Down Expand Up @@ -33,12 +33,12 @@
"jschardet": "3.0.0",
"tas-client-umd": "0.1.6",
"vscode-oniguruma": "1.7.0",
"vscode-textmate": "8.0.0",
"xterm": "5.2.0-beta.21",
"vscode-textmate": "9.0.0",
"xterm": "5.2.0-beta.30",
"xterm-addon-canvas": "0.4.0-beta.7",
"xterm-addon-search": "0.11.0",
"xterm-addon-unicode11": "0.5.0",
"xterm-addon-webgl": "0.15.0-beta.4"
"xterm-addon-webgl": "0.15.0-beta.7"
},
"devDependencies": {
"@types/trusted-types": "^2.0.0",
Expand Down
64 changes: 43 additions & 21 deletions vscode-web/src/vs/editor/common/config/editorOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export interface IEditorOptions {
* The aria label for the editor's textarea (when it is focused).
*/
ariaLabel?: string;
/**
* Control whether a screen reader announces inline suggestion content immediately.
*/
screenReaderAnnounceInlineSuggestion?: boolean;
/**
* The `tabindex` property of the editor's textarea
*/
Expand Down Expand Up @@ -698,6 +702,11 @@ export interface IEditorOptions {
* When enabled, this shows a preview of the drop location and triggers an `onDropIntoEditor` event.
*/
dropIntoEditor?: IDropIntoEditorOptions;

/**
* Controls whether the editor receives tabs or defers them to the workbench for navigation.
*/
tabFocusMode?: boolean;
}

/**
Expand Down Expand Up @@ -2649,7 +2658,10 @@ export interface IEditorStickyScrollOptions {
* Maximum number of sticky lines to show
*/
maxLineCount?: number;

/**
* Model to choose for sticky scroll by default
*/
defaultModel?: 'outlineModel' | 'foldingProviderModel' | 'indentationModel';
}

/**
Expand All @@ -2660,21 +2672,27 @@ export type EditorStickyScrollOptions = Readonly<Required<IEditorStickyScrollOpt
class EditorStickyScroll extends BaseEditorOption<EditorOption.stickyScroll, IEditorStickyScrollOptions, EditorStickyScrollOptions> {

constructor() {
const defaults: EditorStickyScrollOptions = { enabled: false, maxLineCount: 5 };
const defaults: EditorStickyScrollOptions = { enabled: false, maxLineCount: 5, defaultModel: 'outlineModel' };
super(
EditorOption.stickyScroll, 'stickyScroll', defaults,
{
'editor.stickyScroll.enabled': {
type: 'boolean',
default: defaults.enabled,
description: nls.localize('editor.stickyScroll', "Shows the nested current scopes during the scroll at the top of the editor.")
description: nls.localize('editor.stickyScroll.enabled', "Shows the nested current scopes during the scroll at the top of the editor.")
},
'editor.stickyScroll.maxLineCount': {
type: 'number',
default: defaults.maxLineCount,
minimum: 1,
maximum: 10,
description: nls.localize('editor.stickyScroll.', "Defines the maximum number of sticky lines to show.")
description: nls.localize('editor.stickyScroll.maxLineCount', "Defines the maximum number of sticky lines to show.")
},
'editor.stickyScroll.defaultModel': {
type: 'string',
enum: ['outlineModel', 'foldingProviderModel', 'indentationModel'],
default: defaults.defaultModel,
description: nls.localize('editor.stickyScroll.defaultModel', "Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")
},
}
);
Expand All @@ -2688,6 +2706,7 @@ class EditorStickyScroll extends BaseEditorOption<EditorOption.stickyScroll, IEd
return {
enabled: boolean(input.enabled, this.defaultValue.enabled),
maxLineCount: EditorIntOption.clampedInt(input.maxLineCount, this.defaultValue.maxLineCount, 1, 10),
defaultModel: stringSet<'outlineModel' | 'foldingProviderModel' | 'indentationModel'>(input.defaultModel, this.defaultValue.defaultModel, ['outlineModel', 'foldingProviderModel', 'indentationModel']),
};
}
}
Expand Down Expand Up @@ -3786,6 +3805,8 @@ export interface IInlineSuggestOptions {
mode?: 'prefix' | 'subword' | 'subwordSmart';

showToolbar?: 'always' | 'onHover';

suppressSuggestions?: boolean;
}

/**
Expand All @@ -3802,6 +3823,7 @@ class InlineEditorSuggest extends BaseEditorOption<EditorOption.inlineSuggest, I
enabled: true,
mode: 'subwordSmart',
showToolbar: 'onHover',
suppressSuggestions: true,
};

super(
Expand All @@ -3822,6 +3844,11 @@ class InlineEditorSuggest extends BaseEditorOption<EditorOption.inlineSuggest, I
],
description: nls.localize('inlineSuggest.showToolbar', "Controls when to show the inline suggestion toolbar."),
},
'editor.inlineSuggest.suppressSuggestions': {
type: 'boolean',
default: defaults.suppressSuggestions,
description: nls.localize('inlineSuggest.suppressSuggestions', "Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")
},
}
);
}
Expand All @@ -3835,6 +3862,7 @@ class InlineEditorSuggest extends BaseEditorOption<EditorOption.inlineSuggest, I
enabled: boolean(input.enabled, this.defaultValue.enabled),
mode: stringSet(input.mode, this.defaultValue.mode, ['prefix', 'subword', 'subwordSmart']),
showToolbar: stringSet(input.showToolbar, this.defaultValue.showToolbar, ['always', 'onHover']),
suppressSuggestions: boolean(input.suppressSuggestions, this.defaultValue.suppressSuggestions),
};
}
}
Expand Down Expand Up @@ -4569,22 +4597,6 @@ class SmartSelect extends BaseEditorOption<EditorOption.smartSelect, ISmartSelec

//#endregion

//#region tabFocusMode

class EditorTabFocusMode extends ComputedEditorOption<EditorOption.tabFocusMode, boolean> {

constructor() {
super(EditorOption.tabFocusMode);
}

public compute(env: IEnvironmentalOptions, options: IComputedEditorOptions, _: boolean): boolean {
const readOnly = options.get(EditorOption.readOnly);
return (readOnly ? true : env.tabFocusMode);
}
}

//#endregion

//#region wrappingIndent

/**
Expand Down Expand Up @@ -4765,6 +4777,7 @@ export const enum EditorOption {
accessibilityPageSize,
ariaLabel,
autoClosingBrackets,
screenReaderAnnounceInlineSuggestion,
autoClosingDelete,
autoClosingOvertype,
autoClosingQuotes,
Expand Down Expand Up @@ -4929,6 +4942,13 @@ export const EditorOptions = {
ariaLabel: register(new EditorStringOption(
EditorOption.ariaLabel, 'ariaLabel', nls.localize('editorViewAccessibleLabel', "Editor content")
)),
screenReaderAnnounceInlineSuggestion: register(new EditorBooleanOption(
EditorOption.screenReaderAnnounceInlineSuggestion, 'screenReaderAnnounceInlineSuggestion', false,
{
description: nls.localize('screenReaderAnnounceInlineSuggestion', "Control whether inline suggestions are announced by a screen reader. Note that this does not work on macOS with VoiceOver."),
tags: ['accessibility']
}
)),
autoClosingBrackets: register(new EditorStringEnumOption(
EditorOption.autoClosingBrackets, 'autoClosingBrackets',
'languageDefined' as 'always' | 'languageDefined' | 'beforeWhitespace' | 'never',
Expand Down Expand Up @@ -5621,7 +5641,9 @@ export const EditorOptions = {
// Leave these at the end (because they have dependencies!)
editorClassName: register(new EditorClassName()),
pixelRatio: register(new EditorPixelRatio()),
tabFocusMode: register(new EditorTabFocusMode()),
tabFocusMode: register(new EditorBooleanOption(EditorOption.tabFocusMode, 'tabFocusMode', false,
{ markdownDescription: nls.localize('tabFocusMode', "Controls whether the editor receives tabs or defers them to the workbench for navigation.") }
)),
layoutInfo: register(new EditorLayoutInfoComputer()),
wrappingInfo: register(new EditorWrappingInfoComputer()),
wrappingIndent: register(new WrappingIndentOption()),
Expand Down
Loading

1 comment on commit 3c8207a

@vercel
Copy link

@vercel vercel bot commented on 3c8207a Apr 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.