diff --git a/ace-ext.d.ts b/ace-ext.d.ts index 3d69867334f..6c00007088b 100644 --- a/ace-ext.d.ts +++ b/ace-ext.d.ts @@ -765,7 +765,9 @@ declare module "ace-code/src/ext/textarea" { setDefaultValues(path: string, optionHash: { [key: string]: any; }): void; - setMessages(value: any): void; + setMessages(value: any, options?: { + placeholders?: "dollarSigns" | "curlyBrackets"; + }): void; nls(key: string, defaultString: string, params?: { [x: string]: any; }): any; @@ -792,7 +794,7 @@ declare module "ace-code/src/ext/textarea" { string ], onLoad: (module: any) => void) => void; setModuleLoader: (moduleName: any, onLoad: any) => void; - version: "1.34.2"; + version: "1.35.0"; }; edit: (el: string | (HTMLElement & { env?: any; @@ -804,7 +806,7 @@ declare module "ace-code/src/ext/textarea" { EditSession: typeof ace.EditSession; UndoManager: typeof ace.UndoManager; VirtualRenderer: typeof ace.VirtualRenderer; - version: "1.34.2"; + version: "1.35.0"; transformTextarea: (element: any, options: any) => ace.Editor; defaultOptions: { mode: string; diff --git a/ace-internal.d.ts b/ace-internal.d.ts index 2d2ce5b41a8..b2d590022a2 100644 --- a/ace-internal.d.ts +++ b/ace-internal.d.ts @@ -43,9 +43,6 @@ export namespace Ace { sharedPopups: boolean, useStrictCSP: boolean | null } - //setOption(name: K, value: T[K]): void; - // - // getOption(name: K): T[K]; export interface Config { get(key: K): ConfigOptions[K]; @@ -1342,12 +1339,7 @@ declare module "./src/edit_session" { $occurMatchingLines?: any, $useEmacsStyleLineStart?: boolean, $selectLongWords?: boolean, - curOp?: { - command: {}, - args: string, - scrollTop: number, - [key: string]: any; - }, + curOp?: any, getSelectionMarkers(): any[], } diff --git a/ace-lib.d.ts b/ace-lib.d.ts index 18189a11237..7bc3734edf9 100644 --- a/ace-lib.d.ts +++ b/ace-lib.d.ts @@ -196,8 +196,11 @@ declare module "ace-code/src/lib/app_config" { }): void; /** * @param {any} value + * @param {{placeholders?: "dollarSigns" | "curlyBrackets"}} [options] */ - setMessages(value: any): void; + setMessages(value: any, options?: { + placeholders?: "dollarSigns" | "curlyBrackets"; + }): void; /** * @param {string} key * @param {string} defaultString diff --git a/ace-modes.d.ts b/ace-modes.d.ts index 3b3b85ec165..c1ac60c84a9 100644 --- a/ace-modes.d.ts +++ b/ace-modes.d.ts @@ -1561,4 +1561,4 @@ declare module "ace-code/src/mode/zig_highlight_rules" { declare module "ace-code/src/mode/zig" { export const Mode: new () => import("ace-code").Ace.SyntaxMode; -} \ No newline at end of file +} diff --git a/ace-modules.d.ts b/ace-modules.d.ts index 2c34bd7f825..6bd6394efa7 100644 --- a/ace-modules.d.ts +++ b/ace-modules.d.ts @@ -343,11 +343,6 @@ declare module "ace-code/src/anchor" { * @returns {Document} **/ getDocument(): Document; - /** - * Internal function called when `"change"` event fired. - * @param {import("ace-code").Ace.Delta} delta - */ - onChange(delta: import("ace-code").Ace.Delta): void; /** * Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped. * @param {Number} row The row index to move the anchor to @@ -394,7 +389,9 @@ declare module "ace-code/src/config" { setDefaultValues(path: string, optionHash: { [key: string]: any; }): void; - setMessages(value: any): void; + setMessages(value: any, options?: { + placeholders?: "dollarSigns" | "curlyBrackets"; + }): void; nls(key: string, defaultString: string, params?: { [x: string]: any; }): any; @@ -449,7 +446,7 @@ declare module "ace-code/src/config" { string ], onLoad: (module: any) => void) => void; setModuleLoader: (moduleName: any, onLoad: any) => void; - version: "1.34.2"; + version: "1.35.0"; }; export = _exports; import AppConfig_1 = require("ace-code/src/lib/app_config"); @@ -832,11 +829,6 @@ declare module "ace-code/src/scrollbar" { scrollTop: number; scrollHeight: number; width: number; - /** - * Emitted when the scroll bar, well, scrolls. - * @event scroll - **/ - onScroll(): void; /** * Returns the width of the scroll bar. * @returns {Number} @@ -877,11 +869,6 @@ declare module "ace-code/src/scrollbar" { constructor(parent: Element, renderer: any); scrollLeft: number; height: any; - /** - * Emitted when the scroll bar, well, scrolls. - * @event scroll - **/ - onScroll(): void; /** * Returns the height of the scroll bar. * @returns {Number} @@ -955,10 +942,6 @@ declare module "ace-code/src/scrollbar_custom" { parent: any; width: number; renderer: any; - /** - * Emitted when the scroll thumb dragged or scrollbar canvas clicked. - **/ - onMouseDown(eType: any, e: any): void; getHeight(): number; /** * Returns new top for scroll thumb @@ -1011,10 +994,6 @@ declare module "ace-code/src/scrollbar_custom" { scrollWidth: number; height: number; renderer: any; - /** - * Emitted when the scroll thumb dragged or scrollbar canvas clicked. - **/ - onMouseDown(eType: any, e: any): void; /** * Returns the height of the scroll bar. * @returns {Number} @@ -1183,7 +1162,6 @@ declare module "ace-code/src/virtual_renderer" { **/ setSession(session: EditSession): void; session: import("ace-code/src/edit_session").EditSession; - onChangeNewLineMode(): void; /** * Triggers a partial update of the text, from the range given by the two parameters. * @param {Number} firstRow The first row to update @@ -1191,7 +1169,6 @@ declare module "ace-code/src/virtual_renderer" { * @param {boolean} [force] **/ updateLines(firstRow: number, lastRow: number, force?: boolean): void; - onChangeTabSize(): void; /** * Triggers a full update of the text, for all the rows. **/ @@ -1206,23 +1183,8 @@ declare module "ace-code/src/virtual_renderer" { * Updates the font size. **/ updateFontSize(): void; - /** - * [Triggers a resize of the editor.]{: #VirtualRenderer.onResize} - * @param {Boolean} [force] If `true`, recomputes the size, even if the height and width haven't changed - * @param {Number} [gutterWidth] The width of the gutter in pixels - * @param {Number} [width] The width of the editor in pixels - * @param {Number} [height] The hiehgt of the editor, in pixels - - **/ - onResize(force?: boolean, gutterWidth?: number, width?: number, height?: number): number; resizing: number; gutterWidth: any; - /** - * - * @param {number} width - - */ - onGutterResize(width: number): void; /** * Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen. @@ -2168,12 +2130,6 @@ declare module "ace-code/src/tooltip" { lastT: number; idleTime: number; lastEvent: import("ace-code/src/mouse/mouse_event").MouseEvent; - onMouseOut(e: any): void; - /** - * @param {MouseEvent} e - * @param {Editor} editor - */ - onMouseMove(e: MouseEvent, editor: Editor): void; waitForHover(): void; /** * @param {Editor} editor @@ -2459,18 +2415,6 @@ declare module "ace-code/src/keyboard/keybinding" { */ getKeyboardHandler(): KeyboardHandler; getStatusText(): string; - /** - * @param {any} e - * @param {number} hashId - * @param {number} keyCode - * @return {boolean} - */ - onCommandKey(e: any, hashId: number, keyCode: number): boolean; - /** - * @param {string} text - * @return {boolean} - */ - onTextInput(text: string): boolean; } } declare module "ace-code/src/search" { @@ -2630,6 +2574,13 @@ declare module "ace-code/src/commands/command_manager" { * @returns {boolean} */ exec(command: string | string[] | import("ace-code").Ace.Command, editor: Editor, args: any): boolean; + /** + * + * @param {string | import("ace-code").Ace.Command} command + * @param {Editor} editor + * @returns {boolean} + */ + canExecute(command: string | import("ace-code").Ace.Command, editor: Editor): boolean; /** * @param {Editor} editor * @returns {boolean} @@ -2770,10 +2721,6 @@ declare module "ace-code/src/line_widgets" { * @return {LineWidget[]} */ getWidgetsAtRow(row: number): LineWidget[]; - /** - * @param {LineWidget} w - */ - onWidgetChanged(w: LineWidget): void; firstRow: number; lastRow: number; lineWidgets: import("ace-code").Ace.LineWidget[]; @@ -2991,63 +2938,11 @@ declare module "ace-code/src/editor" { * Blurs the current `textInput`. **/ blur(): void; - /** - * Emitted once the editor comes into focus. - **/ - onFocus(e: any): void; - /** - * Emitted once the editor has been blurred. - **/ - onBlur(e: any): void; - /** - * Emitted whenever the document is changed. - * @param {import("ace-code").Ace.Delta} delta Contains a single property, `data`, which has the delta of changes - **/ - onDocumentChange(delta: import("ace-code").Ace.Delta): void; - onTokenizerUpdate(e: any): void; - onScrollTopChange(): void; - onScrollLeftChange(): void; - /** - * Emitted when the selection changes. - **/ - onCursorChange(): void; - /** - * - * @param e - */ - onSelectionChange(e: any): void; - onChangeFrontMarker(): void; - onChangeBackMarker(): void; - onChangeBreakpoint(): void; - onChangeAnnotation(): void; - /** - * @param e - */ - onChangeMode(e: any): void; - onChangeWrapLimit(): void; - onChangeWrapMode(): void; - /** - */ - onChangeFold(): void; /** * Returns the string of text currently highlighted. * @returns {String} **/ getCopyText(): string; - /** - * Called whenever a text "copy" happens. - **/ - onCopy(): void; - /** - * Called whenever a text "cut" happens. - **/ - onCut(): void; - /** - * Called whenever a text "paste" happens. - * @param {String} text The pasted text - * @param {any} event - **/ - onPaste(text: string, event: any): void; /** * * @param {string | string[]} command @@ -3062,19 +2957,11 @@ declare module "ace-code/src/editor" { **/ insert(text: string, pasted?: boolean): void; autoIndent(): void; - /** - * - * @param text - * @param composition - * @returns {*} - */ - onTextInput(text: any, composition: any): any; /** * @param {string} [text] * @param {any} [composition] */ applyComposition(text?: string, composition?: any): void; - onCommandKey(e: any, hashId: any, keyCode: any): boolean; /** * Pass in `true` to enable overwrites in your session, or `false` to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emits the `changeOverwrite` event. * @param {Boolean} overwrite Defines whether or not to set overwrites @@ -3392,9 +3279,6 @@ declare module "ace-code/src/editor" { **/ copyLinesDown(): void; inVirtualSelectionMode: boolean; - onCompositionStart(compositionState: any): void; - onCompositionUpdate(text: any): void; - onCompositionEnd(): void; /** * {:VirtualRenderer.getFirstVisibleRow} * @@ -4215,7 +4099,6 @@ declare module "ace-code/src/autocomplete" { changeListener(e: any): void; mousedownListener(e: any): void; mousewheelListener(e: any): void; - onLayoutChange(): void; changeTimer: { (timeout: any): void; delay(timeout: any): void; @@ -4304,7 +4187,6 @@ declare module "ace-code/src/autocomplete" { showDocTooltip(item: any): void; tooltipNode: HTMLDivElement; hideDocTooltip(): void; - onTooltipClick(e: any): void; destroy(): void; commands: { Up: (editor: any) => void; @@ -4768,7 +4650,6 @@ declare module "ace-code/src/bidihandler" { * @param {Number} [splitIndex] the wrapped screen line index [ optional] **/ isBidiRow(screenRow: number, docRow?: number, splitIndex?: number): any; - onChange(delta: any): void; getDocumentRow(): number; getSplitIndex(): number; updateRowLine(docRow: any, splitIndex: any): void; @@ -5216,12 +5097,6 @@ declare module "ace-code/src/edit_session" { **/ getDocument(): Document; resetCaches(): void; - onChangeFold(e: any): void; - /** - * - * @param {Delta} delta - */ - onChange(delta: Delta): void; mergeUndoDeltas: boolean; /** * Sets the session text. @@ -5467,10 +5342,6 @@ declare module "ace-code/src/edit_session" { * Returns `true` if workers are being used. **/ getUseWorker(): boolean; - /** - * Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer.start ()`]] to all the rows; it also emits the `'tokenizerUpdate'` event. - **/ - onReloadTokenizer(e: any): void; /** * Sets a new text mode for the `EditSession`. This method also emits the `'changeMode'` event. If a [[BackgroundTokenizer `BackgroundTokenizer`]] is set, the `'tokenizerUpdate'` event is also emitted. * @param {SyntaxMode | string} mode Set a new text mode @@ -5817,12 +5688,7 @@ declare module "ace-code/src/edit_session" { gutterRenderer?: any; selectionMarkerCount?: number; multiSelect?: any; - curOp?: { - [key: string]: any; - command: {}; - args: string; - scrollTop: number; - }; + curOp?: any; getSelectionMarkers(): any[]; } export namespace EditSession { @@ -5868,12 +5734,7 @@ declare module "ace-code/src/edit_session" { gutterRenderer?: any; selectionMarkerCount?: number; multiSelect?: any; - curOp?: { - command: {}; - args: string; - scrollTop: number; - [key: string]: any; - }; + curOp?: any; getSelectionMarkers(): any[]; } } @@ -6184,25 +6045,11 @@ declare module "ace-code/src/placeholder" { * **/ hideOtherMarkers(): void; - /** - * PlaceHolder@onUpdate(e) - * - * Emitted when the place holder updates. - * @param {import("ace-code").Ace.Delta} delta - */ - onUpdate(delta: import("ace-code").Ace.Delta): void; /** * @param {import("ace-code").Ace.Delta} delta */ updateAnchors(delta: import("ace-code").Ace.Delta): void; updateMarkers(): void; - /** - * PlaceHolder@onCursorChange(e) - * - * Emitted when the cursor changes. - * @param {any} [event] - */ - onCursorChange(event?: any): void; /** * PlaceHolder.detach() * @@ -6339,11 +6186,6 @@ declare module "ace-code/src/incremental_search" { */ removeChar(c: any): false | Range; next(options: any): false | Range; - onMouseDown(evt: any): boolean; - /** - * @param {string} text - */ - onPaste(text: string): void; convertNeedleToRegExp(): false | Range; convertNeedleToString(): false | Range; statusMessage(found: any): void; diff --git a/ace.d.ts b/ace.d.ts index 85f7d26a0ed..8d02039e35b 100644 --- a/ace.d.ts +++ b/ace.d.ts @@ -46,9 +46,6 @@ declare module "ace-code" { sharedPopups: boolean; useStrictCSP: boolean | null; } - //setOption(name: K, value: T[K]): void; - // - // getOption(name: K): T[K]; export interface Config { get(key: K): ConfigOptions[K]; set(key: K, value: ConfigOptions[K]): void; @@ -329,6 +326,7 @@ declare module "ace-code" { enableKeyboardAccessibility: boolean; enableCodeLens: boolean; textInputAriaLabel: string; + enableMobileMenu: boolean; } interface EventsBase { [key: string]: any; @@ -954,7 +952,9 @@ declare module "ace-code" { setDefaultValues(path: string, optionHash: { [key: string]: any; }): void; - setMessages(value: any): void; + setMessages(value: any, options?: { + placeholders?: "dollarSigns" | "curlyBrackets"; + }): void; nls(key: string, defaultString: string, params?: { [x: string]: any; }): any; @@ -981,7 +981,7 @@ declare module "ace-code" { string ], onLoad: (module: any) => void) => void; setModuleLoader: (moduleName: any, onLoad: any) => void; - version: "1.34.2"; + version: "1.35.0"; }; export function edit(el: string | (HTMLElement & { env?: any; @@ -998,6 +998,6 @@ declare module "ace-code" { import UndoManager = UndoManager_2.UndoManager; import Renderer_1 = require("ace-code/src/virtual_renderer"); import Renderer = Renderer_1.VirtualRenderer; - export var version: "1.34.2"; + export var version: "1.35.0"; export { Range, Editor, EditSession, UndoManager, Renderer as VirtualRenderer }; } diff --git a/src/anchor.js b/src/anchor.js index b5d112c9a6d..c6e994242bd 100644 --- a/src/anchor.js +++ b/src/anchor.js @@ -46,6 +46,7 @@ class Anchor { /** * Internal function called when `"change"` event fired. * @param {import("../ace-internal").Ace.Delta} delta + * @internal */ onChange(delta) { if (delta.start.row == delta.end.row && delta.start.row != this.row) diff --git a/src/autocomplete.js b/src/autocomplete.js index 4d6ff2af084..de0fc9267e6 100644 --- a/src/autocomplete.js +++ b/src/autocomplete.js @@ -256,6 +256,10 @@ class Autocomplete { }); this.$elements = null; } + + /** + * @internal + */ onLayoutChange() { if (!this.popup.isOpen) return this.unObserveLayoutChanges(); this.$updatePopupPosition(); @@ -706,7 +710,11 @@ class Autocomplete { if (el.parentNode) el.parentNode.removeChild(el); } - + + /** + * @param e + * @internal + */ onTooltipClick(e) { var a = e.target; while (a && a != this.tooltipNode) { diff --git a/src/bidihandler.js b/src/bidihandler.js index 003822fcafd..6dbfbb83b17 100644 --- a/src/bidihandler.js +++ b/src/bidihandler.js @@ -59,6 +59,10 @@ class BidiHandler { return this.bidiMap.bidiLevels; } + /** + * @param {import("../ace-internal").Ace.Delta} delta + * @internal + */ onChange(delta) { if (!this.seenBidi) { if (delta.action == "insert" && bidiRE.test(delta.lines.join("\n"))) { diff --git a/src/edit_session.js b/src/edit_session.js index 9cb28439f8b..718105762f6 100644 --- a/src/edit_session.js +++ b/src/edit_session.js @@ -152,6 +152,10 @@ class EditSession { this.bgTokenizer.start(0); } + /** + * @param e + * @internal + */ onChangeFold(e) { var fold = e.data; this.$resetRowCache(fold.start.row); @@ -160,6 +164,7 @@ class EditSession { /** * * @param {Delta} delta + * @internal */ onChange(delta) { this.$modified = true; @@ -774,6 +779,7 @@ class EditSession { /** * Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer.start ()`]] to all the rows; it also emits the `'tokenizerUpdate'` event. + * @internal **/ onReloadTokenizer(e) { var rows = e.data; diff --git a/src/editor.js b/src/editor.js index c587dbd3c8b..c9d2bf7a6d4 100644 --- a/src/editor.js +++ b/src/editor.js @@ -585,6 +585,7 @@ class Editor { /** * Emitted once the editor comes into focus. + * @internal **/ onFocus(e) { if (this.$isFocused) @@ -597,6 +598,7 @@ class Editor { /** * Emitted once the editor has been blurred. + * @internal **/ onBlur(e) { if (!this.$isFocused) @@ -618,6 +620,7 @@ class Editor { /** * Emitted whenever the document is changed. * @param {import("../ace-internal").Ace.Delta} delta Contains a single property, `data`, which has the delta of changes + * @internal **/ onDocumentChange(delta) { // Rerender and emit "change" event. @@ -631,22 +634,31 @@ class Editor { this.$cursorChange(); } + /** + * @internal + */ onTokenizerUpdate(e) { var rows = e.data; this.renderer.updateLines(rows.first, rows.last); } - + /** + * @internal + */ onScrollTopChange() { this.renderer.scrollToY(this.session.getScrollTop()); } + /** + * @internal + */ onScrollLeftChange() { this.renderer.scrollToX(this.session.getScrollLeft()); } /** * Emitted when the selection changes. + * @internal **/ onCursorChange() { this.$cursorChange(); @@ -684,8 +696,8 @@ class Editor { } /** - * * @param e + * @internal */ onSelectionChange(e) { var session = this.session; @@ -739,43 +751,60 @@ class Editor { return re; } - + /** + * @internal + */ onChangeFrontMarker() { this.renderer.updateFrontMarkers(); } + /** + * @internal + */ onChangeBackMarker() { this.renderer.updateBackMarkers(); } - - + + /** + * @internal + */ onChangeBreakpoint() { this.renderer.updateBreakpoints(); } + /** + * @internal + */ onChangeAnnotation() { this.renderer.setAnnotations(this.session.getAnnotations()); } /** * @param e + * @internal */ onChangeMode (e) { this.renderer.updateText(); this._emit("changeMode", e); } - + /** + * @internal + */ onChangeWrapLimit() { this.renderer.updateFull(); } + /** + * @internal + */ onChangeWrapMode() { this.renderer.onResize(true); } /** + * @internal */ onChangeFold() { // Update the active line marker as due to folding changes the current @@ -821,6 +850,7 @@ class Editor { /** * Called whenever a text "copy" happens. + * @internal **/ onCopy() { this.commands.exec("copy", this); @@ -828,6 +858,7 @@ class Editor { /** * Called whenever a text "cut" happens. + * @internal **/ onCut() { this.commands.exec("cut", this); @@ -838,6 +869,7 @@ class Editor { * Called whenever a text "paste" happens. * @param {String} text The pasted text * @param {any} event + * @internal **/ onPaste(text, event) { var e = {text: text, event: event}; @@ -1020,6 +1052,7 @@ class Editor { * @param text * @param composition * @returns {*} + * @internal */ onTextInput(text, composition) { if (!composition) @@ -1061,6 +1094,9 @@ class Editor { } } + /** + * @internal + */ onCommandKey(e, hashId, keyCode) { return this.keyBinding.onCommandKey(e, hashId, keyCode); } @@ -1952,14 +1988,23 @@ class Editor { }; } + /** + * @internal + */ onCompositionStart(compositionState) { this.renderer.showComposition(compositionState); } + /** + * @internal + */ onCompositionUpdate(text) { this.renderer.setCompositionText(text); } + /** + * @internal + */ onCompositionEnd() { this.renderer.hideComposition(); } diff --git a/src/incremental_search.js b/src/incremental_search.js index 58ba6725414..89c2194fa74 100644 --- a/src/incremental_search.js +++ b/src/incremental_search.js @@ -207,6 +207,9 @@ class IncrementalSearch extends Search { }); } + /** + * @internal + */ onMouseDown(evt) { // when mouse interaction happens then we quit incremental search this.deactivate(); @@ -215,6 +218,7 @@ class IncrementalSearch extends Search { /** * @param {string} text + * @internal */ onPaste(text) { this.addString(text); diff --git a/src/keyboard/keybinding.js b/src/keyboard/keybinding.js index 5de3ab8251c..ab1f663f1e9 100644 --- a/src/keyboard/keybinding.js +++ b/src/keyboard/keybinding.js @@ -140,6 +140,7 @@ class KeyBinding { * @param {number} hashId * @param {number} keyCode * @return {boolean} + * @internal */ onCommandKey(e, hashId, keyCode) { var keyString = keyUtil.keyCodeToString(keyCode); @@ -149,6 +150,7 @@ class KeyBinding { /** * @param {string} text * @return {boolean} + * @internal */ onTextInput(text) { return this.$callKeyboardHandlers(-1, text); diff --git a/src/line_widgets.js b/src/line_widgets.js index 8d781db79a8..4ff0825d1fe 100644 --- a/src/line_widgets.js +++ b/src/line_widgets.js @@ -315,6 +315,7 @@ class LineWidgets { /** * @param {LineWidget} w + * @internal */ onWidgetChanged(w) { this.session._changedWidgets.push(w); diff --git a/src/placeholder.js b/src/placeholder.js index a3e84f76e78..99c6f4b6f19 100644 --- a/src/placeholder.js +++ b/src/placeholder.js @@ -106,6 +106,7 @@ class PlaceHolder { * * Emitted when the place holder updates. * @param {import("../ace-internal").Ace.Delta} delta + * @internal */ onUpdate(delta) { if (this.$updating) @@ -174,6 +175,7 @@ class PlaceHolder { * * Emitted when the cursor changes. * @param {any} [event] + * @internal */ onCursorChange(event) { if (this.$updating || !this.session) return; diff --git a/src/scrollbar.js b/src/scrollbar.js index 70cc2cc02af..a2037bfb733 100644 --- a/src/scrollbar.js +++ b/src/scrollbar.js @@ -76,6 +76,7 @@ class VScrollBar extends Scrollbar { /** * Emitted when the scroll bar, well, scrolls. * @event scroll + * @internal **/ onScroll() { @@ -171,6 +172,7 @@ class HScrollBar extends Scrollbar { /** * Emitted when the scroll bar, well, scrolls. * @event scroll + * @internal **/ onScroll() { if (!this.skipEvent) { diff --git a/src/scrollbar_custom.js b/src/scrollbar_custom.js index 095d2038ba8..f270ebf1bbe 100644 --- a/src/scrollbar_custom.js +++ b/src/scrollbar_custom.js @@ -105,6 +105,7 @@ class VScrollBar extends ScrollBar { /** * Emitted when the scroll thumb dragged or scrollbar canvas clicked. + * @internal **/ onMouseDown(eType, e) { if (eType !== "mousedown") return; @@ -241,6 +242,7 @@ class HScrollBar extends ScrollBar { /** * Emitted when the scroll thumb dragged or scrollbar canvas clicked. + * @internal **/ onMouseDown(eType, e) { if (eType !== "mousedown") return; diff --git a/src/snippets.js b/src/snippets.js index 263434e0f67..39be8335cd6 100644 --- a/src/snippets.js +++ b/src/snippets.js @@ -818,7 +818,9 @@ class TabstopManager { this.session = null; this.editor = null; } - + /** + * @internal + */ onChange(delta) { var isRemove = delta.action[0] == "r"; var selectedTabstop = this.selectedTabstop || {}; @@ -862,10 +864,16 @@ class TabstopManager { } this.$inChange = false; } + /** + * @internal + */ onAfterExec(e) { if (e.command && !e.command.readOnly) this.updateLinkedFields(); } + /** + * @internal + */ onChangeSelection() { if (!this.editor) return; @@ -882,6 +890,9 @@ class TabstopManager { } this.detach(); } + /** + * @internal + */ onChangeSession() { this.detach(); } diff --git a/src/tooltip.js b/src/tooltip.js index fc62ae7a52a..4590728a1be 100644 --- a/src/tooltip.js +++ b/src/tooltip.js @@ -241,6 +241,7 @@ class HoverTooltip extends Tooltip { /** * @param {MouseEvent} e * @param {Editor} editor + * @internal */ onMouseMove(e, editor) { this.lastEvent = e; @@ -397,6 +398,9 @@ class HoverTooltip extends Tooltip { window.removeEventListener("mousedown", this.hide, true); } + /** + * @internal + */ onMouseOut(e) { if (this.timeout) { clearTimeout(this.timeout); diff --git a/src/virtual_renderer.js b/src/virtual_renderer.js index 40d5a927cd6..c26b31e5727 100644 --- a/src/virtual_renderer.js +++ b/src/virtual_renderer.js @@ -264,12 +264,18 @@ class VirtualRenderer { this.$loop.schedule(this.CHANGE_LINES); } + /** + * @internal + */ onChangeNewLineMode() { this.$loop.schedule(this.CHANGE_TEXT); this.$textLayer.$updateEolChar(); this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR); } - + + /** + * @internal + */ onChangeTabSize() { this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); this.$textLayer.onChangeTabSize(); @@ -313,7 +319,7 @@ class VirtualRenderer { * @param {Number} [gutterWidth] The width of the gutter in pixels * @param {Number} [width] The width of the editor in pixels * @param {Number} [height] The hiehgt of the editor, in pixels - + * @internal **/ onResize(force, gutterWidth, width, height) { if (this.resizing > 2) @@ -431,7 +437,7 @@ class VirtualRenderer { /** * * @param {number} width - + * @internal */ onGutterResize(width) { var gutterWidth = this.$showGutter ? width : 0; diff --git a/tool/ace_declaration_generator.js b/tool/ace_declaration_generator.js index a6f3d1dbeb0..ae27873abb9 100644 --- a/tool/ace_declaration_generator.js +++ b/tool/ace_declaration_generator.js @@ -285,9 +285,10 @@ function fixDeclaration(content, aceNamespacePath) { || ts.isPropertySignature(node)) { const isPrivate = node.modifiers?.some( modifier => modifier.kind === ts.SyntaxKind.PrivateKeyword); + const startsWithDollar = ts.isIdentifier(node.name) && /^[$_]/.test(node.name.text); - if (isPrivate || startsWithDollar) { + if (isPrivate || startsWithDollar || hasInternalTag(node)) { return ts.factory.createNotEmittedStatement(node); } } @@ -321,6 +322,14 @@ function fixDeclaration(content, aceNamespacePath) { checkFinalDeclaration(finalDeclarations); } +function hasInternalTag(node) { + const sourceFile = node.getSourceFile(); + if (!sourceFile) return false; + + const jsDocs = ts.getJSDocTags(node).filter(tag => tag.tagName.text === 'internal'); + return jsDocs.length > 0; +} + function createMinimalLanguageServiceHost() { return { files: {},