monaco-editor-core 0.53.0-dev-20250828.2 → 0.53.0-dev-20250830
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/esm/nls.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/common/lazy.js +13 -3
- package/esm/vs/base/common/lazy.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper.js.map +1 -1
- package/esm/vs/editor/common/model/mirrorTextModel.js.map +1 -1
- package/esm/vs/editor/common/model/textModelStringEdit.js.map +1 -1
- package/esm/vs/editor/common/model/textModelTokens.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/treeSitter/treeSitterTree.js.map +1 -1
- package/esm/vs/editor/common/model.js.map +1 -1
- package/esm/vs/editor/common/textModelEvents.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +19 -19
- package/monaco.d.ts +19 -19
- package/package.json +2 -2
- package/version.txt +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/textModelEvents.ts","vs/editor/common/textModelEvents.ts"],"names":[],"mappings":"AAiLA;;;GAGG;AACH,MAAM,OAAO,aAAa;IAA1B;QACiB,eAAU,uCAA+B;IAC1D,CAAC;CAAA;AAED;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IACrB,MAAM,CAAC,iBAAiB,CAAC,QAAgB,EAAE,aAAwC;QACzF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClD,OAAO,QAAQ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EAAE,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;YAC5D,4BAA4B,EAAE,CAAC,CAAC,4BAA4B,CAAC,MAAM,CAAC,CAAC,CAAC,4BAA4B,CAAC;SACnG,CAAC;IACH,CAAC;CACD","file":"textModelEvents.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { IRange } from './core/range.js';\nimport { Selection } from './core/selection.js';\nimport { IModelDecoration, InjectedTextOptions } from './model.js';\nimport { TextModelEditSource } from './textModelEditSource.js';\n\n/**\n * An event describing that the current language associated with a model has changed.\n */\nexport interface IModelLanguageChangedEvent {\n\t/**\n\t * Previous language\n\t */\n\treadonly oldLanguage: string;\n\t/**\n\t * New language\n\t */\n\treadonly newLanguage: string;\n\n\t/**\n\t * Source of the call that caused the event.\n\t */\n\treadonly source: string;\n}\n\n/**\n * An event describing that the language configuration associated with a model has changed.\n */\nexport interface IModelLanguageConfigurationChangedEvent {\n}\n\nexport interface IModelContentChange {\n\t/**\n\t * The old range that got replaced.\n\t */\n\treadonly range: IRange;\n\t/**\n\t * The offset of the range that got replaced.\n\t */\n\treadonly rangeOffset: number;\n\t/**\n\t * The length of the range that got replaced.\n\t */\n\treadonly rangeLength: number;\n\t/**\n\t * The new text for the range.\n\t */\n\treadonly text: string;\n}\n\n/**\n * An event describing a change in the text of a model.\n */\nexport interface IModelContentChangedEvent {\n\t/**\n\t * The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.\n\t */\n\treadonly changes: IModelContentChange[];\n\t/**\n\t * The (new) end-of-line character.\n\t */\n\treadonly eol: string;\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\treadonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\treadonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\treadonly isRedoing: boolean;\n\t/**\n\t * Flag that indicates that all decorations were lost with this edit.\n\t * The model has been reset to a new value.\n\t */\n\treadonly isFlush: boolean;\n\n\t/**\n\t * Flag that indicates that this event describes an eol change.\n\t */\n\treadonly isEolChange: boolean;\n\n\t/**\n\t * Detailed reason information for the change\n\t * @internal\n\t */\n\treadonly detailedReasons: TextModelEditSource[];\n\n\t/**\n\t * The sum of these lengths equals changes.length.\n\t * The length of this array must equal the length of detailedReasons.\n\t*/\n\treadonly detailedReasonsChangeLengths: number[];\n}\n\nexport interface ISerializedModelContentChangedEvent {\n\t/**\n\t * The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.\n\t */\n\treadonly changes: IModelContentChange[];\n\t/**\n\t * The (new) end-of-line character.\n\t */\n\treadonly eol: string;\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\treadonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\treadonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\treadonly isRedoing: boolean;\n\t/**\n\t * Flag that indicates that all decorations were lost with this edit.\n\t * The model has been reset to a new value.\n\t */\n\treadonly isFlush: boolean;\n\n\t/**\n\t * Flag that indicates that this event describes an eol change.\n\t */\n\treadonly isEolChange: boolean;\n}\n\n/**\n * An event describing that model decorations have changed.\n */\nexport interface IModelDecorationsChangedEvent {\n\treadonly affectsMinimap: boolean;\n\treadonly affectsOverviewRuler: boolean;\n\treadonly affectsGlyphMargin: boolean;\n\treadonly affectsLineNumber: boolean;\n}\n\n/**\n * An event describing that some ranges of lines have been tokenized (their tokens have changed).\n * @internal\n */\nexport interface IModelTokensChangedEvent {\n\treadonly semanticTokensApplied: boolean;\n\treadonly ranges: {\n\t\t/**\n\t\t * The start of the range (inclusive)\n\t\t */\n\t\treadonly fromLineNumber: number;\n\t\t/**\n\t\t * The end of the range (inclusive)\n\t\t */\n\t\treadonly toLineNumber: number;\n\t}[];\n}\n\nexport interface IModelOptionsChangedEvent {\n\treadonly tabSize: boolean;\n\treadonly indentSize: boolean;\n\treadonly insertSpaces: boolean;\n\treadonly trimAutoWhitespace: boolean;\n}\n\n/**\n * @internal\n */\nexport const enum RawContentChangedType {\n\tFlush = 1,\n\tLineChanged = 2,\n\tLinesDeleted = 3,\n\tLinesInserted = 4,\n\tEOLChanged = 5\n}\n\n/**\n * An event describing that a model has been reset to a new value.\n * @internal\n */\nexport class ModelRawFlush {\n\tpublic readonly changeType = RawContentChangedType.Flush;\n}\n\n/**\n * Represents text injected on a line\n * @internal\n */\nexport class LineInjectedText {\n\tpublic static applyInjectedText(lineText: string, injectedTexts: LineInjectedText[] | null): string {\n\t\tif (!injectedTexts || injectedTexts.length === 0) {\n\t\t\treturn lineText;\n\t\t}\n\t\tlet result = '';\n\t\tlet lastOriginalOffset = 0;\n\t\tfor (const injectedText of injectedTexts) {\n\t\t\tresult += lineText.substring(lastOriginalOffset, injectedText.column - 1);\n\t\t\tlastOriginalOffset = injectedText.column - 1;\n\t\t\tresult += injectedText.options.content;\n\t\t}\n\t\tresult += lineText.substring(lastOriginalOffset);\n\t\treturn result;\n\t}\n\n\tpublic static fromDecorations(decorations: IModelDecoration[]): LineInjectedText[] {\n\t\tconst result: LineInjectedText[] = [];\n\t\tfor (const decoration of decorations) {\n\t\t\tif (decoration.options.before && decoration.options.before.content.length > 0) {\n\t\t\t\tresult.push(new LineInjectedText(\n\t\t\t\t\tdecoration.ownerId,\n\t\t\t\t\tdecoration.range.startLineNumber,\n\t\t\t\t\tdecoration.range.startColumn,\n\t\t\t\t\tdecoration.options.before,\n\t\t\t\t\t0,\n\t\t\t\t));\n\t\t\t}\n\t\t\tif (decoration.options.after && decoration.options.after.content.length > 0) {\n\t\t\t\tresult.push(new LineInjectedText(\n\t\t\t\t\tdecoration.ownerId,\n\t\t\t\t\tdecoration.range.endLineNumber,\n\t\t\t\t\tdecoration.range.endColumn,\n\t\t\t\t\tdecoration.options.after,\n\t\t\t\t\t1,\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tresult.sort((a, b) => {\n\t\t\tif (a.lineNumber === b.lineNumber) {\n\t\t\t\tif (a.column === b.column) {\n\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t}\n\t\t\t\treturn a.column - b.column;\n\t\t\t}\n\t\t\treturn a.lineNumber - b.lineNumber;\n\t\t});\n\t\treturn result;\n\t}\n\n\tconstructor(\n\t\tpublic readonly ownerId: number,\n\t\tpublic readonly lineNumber: number,\n\t\tpublic readonly column: number,\n\t\tpublic readonly options: InjectedTextOptions,\n\t\tpublic readonly order: number\n\t) { }\n}\n\n/**\n * An event describing that a line has changed in a model.\n * @internal\n */\nexport class ModelRawLineChanged {\n\tpublic readonly changeType = RawContentChangedType.LineChanged;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\t/**\n\t * The new value of the line.\n\t */\n\tpublic readonly detail: string;\n\t/**\n\t * The injected text on the line.\n\t */\n\tpublic readonly injectedText: LineInjectedText[] | null;\n\n\tconstructor(lineNumber: number, detail: string, injectedText: LineInjectedText[] | null) {\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.detail = detail;\n\t\tthis.injectedText = injectedText;\n\t}\n}\n\n\n/**\n * An event describing that a line height has changed in the model.\n * @internal\n */\nexport class ModelLineHeightChanged {\n\t/**\n\t * Editor owner ID\n\t */\n\tpublic readonly ownerId: number;\n\t/**\n\t * The decoration ID that has changed.\n\t */\n\tpublic readonly decorationId: string;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\t/**\n\t * The line height on the line.\n\t */\n\tpublic readonly lineHeight: number | null;\n\n\tconstructor(ownerId: number, decorationId: string, lineNumber: number, lineHeight: number | null) {\n\t\tthis.ownerId = ownerId;\n\t\tthis.decorationId = decorationId;\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.lineHeight = lineHeight;\n\t}\n}\n\n/**\n * An event describing that a line height has changed in the model.\n * @internal\n */\nexport class ModelFontChanged {\n\t/**\n\t * Editor owner ID\n\t */\n\tpublic readonly ownerId: number;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\n\tconstructor(ownerId: number, lineNumber: number) {\n\t\tthis.ownerId = ownerId;\n\t\tthis.lineNumber = lineNumber;\n\t}\n}\n\n/**\n * An event describing that line(s) have been deleted in a model.\n * @internal\n */\nexport class ModelRawLinesDeleted {\n\tpublic readonly changeType = RawContentChangedType.LinesDeleted;\n\t/**\n\t * At what line the deletion began (inclusive).\n\t */\n\tpublic readonly fromLineNumber: number;\n\t/**\n\t * At what line the deletion stopped (inclusive).\n\t */\n\tpublic readonly toLineNumber: number;\n\n\tconstructor(fromLineNumber: number, toLineNumber: number) {\n\t\tthis.fromLineNumber = fromLineNumber;\n\t\tthis.toLineNumber = toLineNumber;\n\t}\n}\n\n/**\n * An event describing that line(s) have been inserted in a model.\n * @internal\n */\nexport class ModelRawLinesInserted {\n\tpublic readonly changeType = RawContentChangedType.LinesInserted;\n\t/**\n\t * Before what line did the insertion begin\n\t */\n\tpublic readonly fromLineNumber: number;\n\t/**\n\t * `toLineNumber` - `fromLineNumber` + 1 denotes the number of lines that were inserted\n\t */\n\tpublic readonly toLineNumber: number;\n\t/**\n\t * The text that was inserted\n\t */\n\tpublic readonly detail: string[];\n\t/**\n\t * The injected texts for every inserted line.\n\t */\n\tpublic readonly injectedTexts: (LineInjectedText[] | null)[];\n\n\tconstructor(fromLineNumber: number, toLineNumber: number, detail: string[], injectedTexts: (LineInjectedText[] | null)[]) {\n\t\tthis.injectedTexts = injectedTexts;\n\t\tthis.fromLineNumber = fromLineNumber;\n\t\tthis.toLineNumber = toLineNumber;\n\t\tthis.detail = detail;\n\t}\n}\n\n/**\n * An event describing that a model has had its EOL changed.\n * @internal\n */\nexport class ModelRawEOLChanged {\n\tpublic readonly changeType = RawContentChangedType.EOLChanged;\n}\n\n/**\n * @internal\n */\nexport type ModelRawChange = ModelRawFlush | ModelRawLineChanged | ModelRawLinesDeleted | ModelRawLinesInserted | ModelRawEOLChanged;\n\n/**\n * An event describing a change in the text of a model.\n * @internal\n */\nexport class ModelRawContentChangedEvent {\n\n\tpublic readonly changes: ModelRawChange[];\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\tpublic readonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\tpublic readonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\tpublic readonly isRedoing: boolean;\n\n\tpublic resultingSelection: Selection[] | null;\n\n\tconstructor(changes: ModelRawChange[], versionId: number, isUndoing: boolean, isRedoing: boolean) {\n\t\tthis.changes = changes;\n\t\tthis.versionId = versionId;\n\t\tthis.isUndoing = isUndoing;\n\t\tthis.isRedoing = isRedoing;\n\t\tthis.resultingSelection = null;\n\t}\n\n\tpublic containsEvent(type: RawContentChangedType): boolean {\n\t\tfor (let i = 0, len = this.changes.length; i < len; i++) {\n\t\t\tconst change = this.changes[i];\n\t\t\tif (change.changeType === type) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic static merge(a: ModelRawContentChangedEvent, b: ModelRawContentChangedEvent): ModelRawContentChangedEvent {\n\t\tconst changes = ([] as ModelRawChange[]).concat(a.changes).concat(b.changes);\n\t\tconst versionId = b.versionId;\n\t\tconst isUndoing = (a.isUndoing || b.isUndoing);\n\t\tconst isRedoing = (a.isRedoing || b.isRedoing);\n\t\treturn new ModelRawContentChangedEvent(changes, versionId, isUndoing, isRedoing);\n\t}\n}\n\n/**\n * An event describing a change in injected text.\n * @internal\n */\nexport class ModelInjectedTextChangedEvent {\n\n\tpublic readonly changes: ModelRawLineChanged[];\n\n\tconstructor(changes: ModelRawLineChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * An event describing a change of a line height.\n * @internal\n */\nexport class ModelLineHeightChangedEvent {\n\n\tpublic readonly changes: ModelLineHeightChanged[];\n\n\tconstructor(changes: ModelLineHeightChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * An event describing a change in fonts.\n * @internal\n */\nexport class ModelFontChangedEvent {\n\n\tpublic readonly changes: ModelFontChanged[];\n\n\tconstructor(changes: ModelFontChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * @internal\n */\nexport class InternalModelContentChangeEvent {\n\tconstructor(\n\t\tpublic readonly rawContentChangedEvent: ModelRawContentChangedEvent,\n\t\tpublic readonly contentChangedEvent: IModelContentChangedEvent,\n\t) { }\n\n\tpublic merge(other: InternalModelContentChangeEvent): InternalModelContentChangeEvent {\n\t\tconst rawContentChangedEvent = ModelRawContentChangedEvent.merge(this.rawContentChangedEvent, other.rawContentChangedEvent);\n\t\tconst contentChangedEvent = InternalModelContentChangeEvent._mergeChangeEvents(this.contentChangedEvent, other.contentChangedEvent);\n\t\treturn new InternalModelContentChangeEvent(rawContentChangedEvent, contentChangedEvent);\n\t}\n\n\tprivate static _mergeChangeEvents(a: IModelContentChangedEvent, b: IModelContentChangedEvent): IModelContentChangedEvent {\n\t\tconst changes = ([] as IModelContentChange[]).concat(a.changes).concat(b.changes);\n\t\tconst eol = b.eol;\n\t\tconst versionId = b.versionId;\n\t\tconst isUndoing = (a.isUndoing || b.isUndoing);\n\t\tconst isRedoing = (a.isRedoing || b.isRedoing);\n\t\tconst isFlush = (a.isFlush || b.isFlush);\n\t\tconst isEolChange = a.isEolChange && b.isEolChange; // both must be true to not confuse listeners who skip such edits\n\t\treturn {\n\t\t\tchanges: changes,\n\t\t\teol: eol,\n\t\t\tisEolChange: isEolChange,\n\t\t\tversionId: versionId,\n\t\t\tisUndoing: isUndoing,\n\t\t\tisRedoing: isRedoing,\n\t\t\tisFlush: isFlush,\n\t\t\tdetailedReasons: a.detailedReasons.concat(b.detailedReasons),\n\t\t\tdetailedReasonsChangeLengths: a.detailedReasonsChangeLengths.concat(b.detailedReasonsChangeLengths),\n\t\t};\n\t}\n}\n","\nimport { IRange } from './core/range.js';\nimport { Selection } from './core/selection.js';\nimport { IModelDecoration, InjectedTextOptions } from './model.js';\nimport { TextModelEditSource } from './textModelEditSource.js';\n\n/**\n * An event describing that the current language associated with a model has changed.\n */\nexport interface IModelLanguageChangedEvent {\n\t/**\n\t * Previous language\n\t */\n\treadonly oldLanguage: string;\n\t/**\n\t * New language\n\t */\n\treadonly newLanguage: string;\n\n\t/**\n\t * Source of the call that caused the event.\n\t */\n\treadonly source: string;\n}\n\n/**\n * An event describing that the language configuration associated with a model has changed.\n */\nexport interface IModelLanguageConfigurationChangedEvent {\n}\n\nexport interface IModelContentChange {\n\t/**\n\t * The old range that got replaced.\n\t */\n\treadonly range: IRange;\n\t/**\n\t * The offset of the range that got replaced.\n\t */\n\treadonly rangeOffset: number;\n\t/**\n\t * The length of the range that got replaced.\n\t */\n\treadonly rangeLength: number;\n\t/**\n\t * The new text for the range.\n\t */\n\treadonly text: string;\n}\n\n/**\n * An event describing a change in the text of a model.\n */\nexport interface IModelContentChangedEvent {\n\t/**\n\t * The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.\n\t */\n\treadonly changes: IModelContentChange[];\n\t/**\n\t * The (new) end-of-line character.\n\t */\n\treadonly eol: string;\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\treadonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\treadonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\treadonly isRedoing: boolean;\n\t/**\n\t * Flag that indicates that all decorations were lost with this edit.\n\t * The model has been reset to a new value.\n\t */\n\treadonly isFlush: boolean;\n\n\t/**\n\t * Flag that indicates that this event describes an eol change.\n\t */\n\treadonly isEolChange: boolean;\n\n\t/**\n\t * Detailed reason information for the change\n\t * @internal\n\t */\n\treadonly detailedReasons: TextModelEditSource[];\n\n\t/**\n\t * The sum of these lengths equals changes.length.\n\t * The length of this array must equal the length of detailedReasons.\n\t*/\n\treadonly detailedReasonsChangeLengths: number[];\n}\n\nexport interface ISerializedModelContentChangedEvent {\n\t/**\n\t * The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.\n\t */\n\treadonly changes: IModelContentChange[];\n\t/**\n\t * The (new) end-of-line character.\n\t */\n\treadonly eol: string;\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\treadonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\treadonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\treadonly isRedoing: boolean;\n\t/**\n\t * Flag that indicates that all decorations were lost with this edit.\n\t * The model has been reset to a new value.\n\t */\n\treadonly isFlush: boolean;\n\n\t/**\n\t * Flag that indicates that this event describes an eol change.\n\t */\n\treadonly isEolChange: boolean;\n}\n\n/**\n * An event describing that model decorations have changed.\n */\nexport interface IModelDecorationsChangedEvent {\n\treadonly affectsMinimap: boolean;\n\treadonly affectsOverviewRuler: boolean;\n\treadonly affectsGlyphMargin: boolean;\n\treadonly affectsLineNumber: boolean;\n}\n\n/**\n * An event describing that some ranges of lines have been tokenized (their tokens have changed).\n * @internal\n */\nexport interface IModelTokensChangedEvent {\n\treadonly semanticTokensApplied: boolean;\n\treadonly ranges: {\n\t\t/**\n\t\t * The start of the range (inclusive)\n\t\t */\n\t\treadonly fromLineNumber: number;\n\t\t/**\n\t\t * The end of the range (inclusive)\n\t\t */\n\t\treadonly toLineNumber: number;\n\t}[];\n}\n\nexport interface IModelOptionsChangedEvent {\n\treadonly tabSize: boolean;\n\treadonly indentSize: boolean;\n\treadonly insertSpaces: boolean;\n\treadonly trimAutoWhitespace: boolean;\n}\n\n/**\n * @internal\n */\nexport const enum RawContentChangedType {\n\tFlush = 1,\n\tLineChanged = 2,\n\tLinesDeleted = 3,\n\tLinesInserted = 4,\n\tEOLChanged = 5\n}\n\n/**\n * An event describing that a model has been reset to a new value.\n * @internal\n */\nexport class ModelRawFlush {\n\tpublic readonly changeType = RawContentChangedType.Flush;\n}\n\n/**\n * Represents text injected on a line\n * @internal\n */\nexport class LineInjectedText {\n\tpublic static applyInjectedText(lineText: string, injectedTexts: LineInjectedText[] | null): string {\n\t\tif (!injectedTexts || injectedTexts.length === 0) {\n\t\t\treturn lineText;\n\t\t}\n\t\tlet result = '';\n\t\tlet lastOriginalOffset = 0;\n\t\tfor (const injectedText of injectedTexts) {\n\t\t\tresult += lineText.substring(lastOriginalOffset, injectedText.column - 1);\n\t\t\tlastOriginalOffset = injectedText.column - 1;\n\t\t\tresult += injectedText.options.content;\n\t\t}\n\t\tresult += lineText.substring(lastOriginalOffset);\n\t\treturn result;\n\t}\n\n\tpublic static fromDecorations(decorations: IModelDecoration[]): LineInjectedText[] {\n\t\tconst result: LineInjectedText[] = [];\n\t\tfor (const decoration of decorations) {\n\t\t\tif (decoration.options.before && decoration.options.before.content.length > 0) {\n\t\t\t\tresult.push(new LineInjectedText(\n\t\t\t\t\tdecoration.ownerId,\n\t\t\t\t\tdecoration.range.startLineNumber,\n\t\t\t\t\tdecoration.range.startColumn,\n\t\t\t\t\tdecoration.options.before,\n\t\t\t\t\t0,\n\t\t\t\t));\n\t\t\t}\n\t\t\tif (decoration.options.after && decoration.options.after.content.length > 0) {\n\t\t\t\tresult.push(new LineInjectedText(\n\t\t\t\t\tdecoration.ownerId,\n\t\t\t\t\tdecoration.range.endLineNumber,\n\t\t\t\t\tdecoration.range.endColumn,\n\t\t\t\t\tdecoration.options.after,\n\t\t\t\t\t1,\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tresult.sort((a, b) => {\n\t\t\tif (a.lineNumber === b.lineNumber) {\n\t\t\t\tif (a.column === b.column) {\n\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t}\n\t\t\t\treturn a.column - b.column;\n\t\t\t}\n\t\t\treturn a.lineNumber - b.lineNumber;\n\t\t});\n\t\treturn result;\n\t}\n\n\tconstructor(\n\t\tpublic readonly ownerId: number,\n\t\tpublic readonly lineNumber: number,\n\t\tpublic readonly column: number,\n\t\tpublic readonly options: InjectedTextOptions,\n\t\tpublic readonly order: number\n\t) { }\n}\n\n/**\n * An event describing that a line has changed in a model.\n * @internal\n */\nexport class ModelRawLineChanged {\n\tpublic readonly changeType = RawContentChangedType.LineChanged;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\t/**\n\t * The new value of the line.\n\t */\n\tpublic readonly detail: string;\n\t/**\n\t * The injected text on the line.\n\t */\n\tpublic readonly injectedText: LineInjectedText[] | null;\n\n\tconstructor(lineNumber: number, detail: string, injectedText: LineInjectedText[] | null) {\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.detail = detail;\n\t\tthis.injectedText = injectedText;\n\t}\n}\n\n\n/**\n * An event describing that a line height has changed in the model.\n * @internal\n */\nexport class ModelLineHeightChanged {\n\t/**\n\t * Editor owner ID\n\t */\n\tpublic readonly ownerId: number;\n\t/**\n\t * The decoration ID that has changed.\n\t */\n\tpublic readonly decorationId: string;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\t/**\n\t * The line height on the line.\n\t */\n\tpublic readonly lineHeight: number | null;\n\n\tconstructor(ownerId: number, decorationId: string, lineNumber: number, lineHeight: number | null) {\n\t\tthis.ownerId = ownerId;\n\t\tthis.decorationId = decorationId;\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.lineHeight = lineHeight;\n\t}\n}\n\n/**\n * An event describing that a line height has changed in the model.\n * @internal\n */\nexport class ModelFontChanged {\n\t/**\n\t * Editor owner ID\n\t */\n\tpublic readonly ownerId: number;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\n\tconstructor(ownerId: number, lineNumber: number) {\n\t\tthis.ownerId = ownerId;\n\t\tthis.lineNumber = lineNumber;\n\t}\n}\n\n/**\n * An event describing that line(s) have been deleted in a model.\n * @internal\n */\nexport class ModelRawLinesDeleted {\n\tpublic readonly changeType = RawContentChangedType.LinesDeleted;\n\t/**\n\t * At what line the deletion began (inclusive).\n\t */\n\tpublic readonly fromLineNumber: number;\n\t/**\n\t * At what line the deletion stopped (inclusive).\n\t */\n\tpublic readonly toLineNumber: number;\n\n\tconstructor(fromLineNumber: number, toLineNumber: number) {\n\t\tthis.fromLineNumber = fromLineNumber;\n\t\tthis.toLineNumber = toLineNumber;\n\t}\n}\n\n/**\n * An event describing that line(s) have been inserted in a model.\n * @internal\n */\nexport class ModelRawLinesInserted {\n\tpublic readonly changeType = RawContentChangedType.LinesInserted;\n\t/**\n\t * Before what line did the insertion begin\n\t */\n\tpublic readonly fromLineNumber: number;\n\t/**\n\t * `toLineNumber` - `fromLineNumber` + 1 denotes the number of lines that were inserted\n\t */\n\tpublic readonly toLineNumber: number;\n\t/**\n\t * The text that was inserted\n\t */\n\tpublic readonly detail: string[];\n\t/**\n\t * The injected texts for every inserted line.\n\t */\n\tpublic readonly injectedTexts: (LineInjectedText[] | null)[];\n\n\tconstructor(fromLineNumber: number, toLineNumber: number, detail: string[], injectedTexts: (LineInjectedText[] | null)[]) {\n\t\tthis.injectedTexts = injectedTexts;\n\t\tthis.fromLineNumber = fromLineNumber;\n\t\tthis.toLineNumber = toLineNumber;\n\t\tthis.detail = detail;\n\t}\n}\n\n/**\n * An event describing that a model has had its EOL changed.\n * @internal\n */\nexport class ModelRawEOLChanged {\n\tpublic readonly changeType = RawContentChangedType.EOLChanged;\n}\n\n/**\n * @internal\n */\nexport type ModelRawChange = ModelRawFlush | ModelRawLineChanged | ModelRawLinesDeleted | ModelRawLinesInserted | ModelRawEOLChanged;\n\n/**\n * An event describing a change in the text of a model.\n * @internal\n */\nexport class ModelRawContentChangedEvent {\n\n\tpublic readonly changes: ModelRawChange[];\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\tpublic readonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\tpublic readonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\tpublic readonly isRedoing: boolean;\n\n\tpublic resultingSelection: Selection[] | null;\n\n\tconstructor(changes: ModelRawChange[], versionId: number, isUndoing: boolean, isRedoing: boolean) {\n\t\tthis.changes = changes;\n\t\tthis.versionId = versionId;\n\t\tthis.isUndoing = isUndoing;\n\t\tthis.isRedoing = isRedoing;\n\t\tthis.resultingSelection = null;\n\t}\n\n\tpublic containsEvent(type: RawContentChangedType): boolean {\n\t\tfor (let i = 0, len = this.changes.length; i < len; i++) {\n\t\t\tconst change = this.changes[i];\n\t\t\tif (change.changeType === type) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic static merge(a: ModelRawContentChangedEvent, b: ModelRawContentChangedEvent): ModelRawContentChangedEvent {\n\t\tconst changes = ([] as ModelRawChange[]).concat(a.changes).concat(b.changes);\n\t\tconst versionId = b.versionId;\n\t\tconst isUndoing = (a.isUndoing || b.isUndoing);\n\t\tconst isRedoing = (a.isRedoing || b.isRedoing);\n\t\treturn new ModelRawContentChangedEvent(changes, versionId, isUndoing, isRedoing);\n\t}\n}\n\n/**\n * An event describing a change in injected text.\n * @internal\n */\nexport class ModelInjectedTextChangedEvent {\n\n\tpublic readonly changes: ModelRawLineChanged[];\n\n\tconstructor(changes: ModelRawLineChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * An event describing a change of a line height.\n * @internal\n */\nexport class ModelLineHeightChangedEvent {\n\n\tpublic readonly changes: ModelLineHeightChanged[];\n\n\tconstructor(changes: ModelLineHeightChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * An event describing a change in fonts.\n * @internal\n */\nexport class ModelFontChangedEvent {\n\n\tpublic readonly changes: ModelFontChanged[];\n\n\tconstructor(changes: ModelFontChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * @internal\n */\nexport class InternalModelContentChangeEvent {\n\tconstructor(\n\t\tpublic readonly rawContentChangedEvent: ModelRawContentChangedEvent,\n\t\tpublic readonly contentChangedEvent: IModelContentChangedEvent,\n\t) { }\n\n\tpublic merge(other: InternalModelContentChangeEvent): InternalModelContentChangeEvent {\n\t\tconst rawContentChangedEvent = ModelRawContentChangedEvent.merge(this.rawContentChangedEvent, other.rawContentChangedEvent);\n\t\tconst contentChangedEvent = InternalModelContentChangeEvent._mergeChangeEvents(this.contentChangedEvent, other.contentChangedEvent);\n\t\treturn new InternalModelContentChangeEvent(rawContentChangedEvent, contentChangedEvent);\n\t}\n\n\tprivate static _mergeChangeEvents(a: IModelContentChangedEvent, b: IModelContentChangedEvent): IModelContentChangedEvent {\n\t\tconst changes = ([] as IModelContentChange[]).concat(a.changes).concat(b.changes);\n\t\tconst eol = b.eol;\n\t\tconst versionId = b.versionId;\n\t\tconst isUndoing = (a.isUndoing || b.isUndoing);\n\t\tconst isRedoing = (a.isRedoing || b.isRedoing);\n\t\tconst isFlush = (a.isFlush || b.isFlush);\n\t\tconst isEolChange = a.isEolChange && b.isEolChange; // both must be true to not confuse listeners who skip such edits\n\t\treturn {\n\t\t\tchanges: changes,\n\t\t\teol: eol,\n\t\t\tisEolChange: isEolChange,\n\t\t\tversionId: versionId,\n\t\t\tisUndoing: isUndoing,\n\t\t\tisRedoing: isRedoing,\n\t\t\tisFlush: isFlush,\n\t\t\tdetailedReasons: a.detailedReasons.concat(b.detailedReasons),\n\t\t\tdetailedReasonsChangeLengths: a.detailedReasonsChangeLengths.concat(b.detailedReasonsChangeLengths),\n\t\t};\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/textModelEvents.ts","vs/editor/common/textModelEvents.ts"],"names":[],"mappings":"AA8JA;;;GAGG;AACH,MAAM,OAAO,aAAa;IAA1B;QACiB,eAAU,uCAA+B;IAC1D,CAAC;CAAA;AAED;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IACrB,MAAM,CAAC,iBAAiB,CAAC,QAAgB,EAAE,aAAwC;QACzF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClD,OAAO,QAAQ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AAE,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;YAC5D,4BAA4B,EAAE,CAAC,CAAC,4BAA4B,CAAC,MAAM,CAAC,CAAC,CAAC,4BAA4B,CAAC;SACnG,CAAC;IACH,CAAC;CACD","file":"textModelEvents.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { Selection } from './core/selection.js';\nimport { IModelDecoration, InjectedTextOptions } from './model.js';\nimport { IModelContentChange } from './model/mirrorTextModel.js';\nimport { TextModelEditSource } from './textModelEditSource.js';\n\n/**\n * An event describing that the current language associated with a model has changed.\n */\nexport interface IModelLanguageChangedEvent {\n\t/**\n\t * Previous language\n\t */\n\treadonly oldLanguage: string;\n\t/**\n\t * New language\n\t */\n\treadonly newLanguage: string;\n\n\t/**\n\t * Source of the call that caused the event.\n\t */\n\treadonly source: string;\n}\n\n/**\n * An event describing that the language configuration associated with a model has changed.\n */\nexport interface IModelLanguageConfigurationChangedEvent {\n}\n\n/**\n * An event describing a change in the text of a model.\n */\nexport interface IModelContentChangedEvent {\n\t/**\n\t * The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.\n\t */\n\treadonly changes: IModelContentChange[];\n\t/**\n\t * The (new) end-of-line character.\n\t */\n\treadonly eol: string;\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\treadonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\treadonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\treadonly isRedoing: boolean;\n\t/**\n\t * Flag that indicates that all decorations were lost with this edit.\n\t * The model has been reset to a new value.\n\t */\n\treadonly isFlush: boolean;\n\n\t/**\n\t * Flag that indicates that this event describes an eol change.\n\t */\n\treadonly isEolChange: boolean;\n\n\t/**\n\t * Detailed reason information for the change\n\t * @internal\n\t */\n\treadonly detailedReasons: TextModelEditSource[];\n\n\t/**\n\t * The sum of these lengths equals changes.length.\n\t * The length of this array must equal the length of detailedReasons.\n\t*/\n\treadonly detailedReasonsChangeLengths: number[];\n}\n\nexport interface ISerializedModelContentChangedEvent {\n\t/**\n\t * The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.\n\t */\n\treadonly changes: IModelContentChange[];\n\t/**\n\t * The (new) end-of-line character.\n\t */\n\treadonly eol: string;\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\treadonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\treadonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\treadonly isRedoing: boolean;\n\t/**\n\t * Flag that indicates that all decorations were lost with this edit.\n\t * The model has been reset to a new value.\n\t */\n\treadonly isFlush: boolean;\n\n\t/**\n\t * Flag that indicates that this event describes an eol change.\n\t */\n\treadonly isEolChange: boolean;\n}\n\n/**\n * An event describing that model decorations have changed.\n */\nexport interface IModelDecorationsChangedEvent {\n\treadonly affectsMinimap: boolean;\n\treadonly affectsOverviewRuler: boolean;\n\treadonly affectsGlyphMargin: boolean;\n\treadonly affectsLineNumber: boolean;\n}\n\n/**\n * An event describing that some ranges of lines have been tokenized (their tokens have changed).\n * @internal\n */\nexport interface IModelTokensChangedEvent {\n\treadonly semanticTokensApplied: boolean;\n\treadonly ranges: {\n\t\t/**\n\t\t * The start of the range (inclusive)\n\t\t */\n\t\treadonly fromLineNumber: number;\n\t\t/**\n\t\t * The end of the range (inclusive)\n\t\t */\n\t\treadonly toLineNumber: number;\n\t}[];\n}\n\nexport interface IModelOptionsChangedEvent {\n\treadonly tabSize: boolean;\n\treadonly indentSize: boolean;\n\treadonly insertSpaces: boolean;\n\treadonly trimAutoWhitespace: boolean;\n}\n\n/**\n * @internal\n */\nexport const enum RawContentChangedType {\n\tFlush = 1,\n\tLineChanged = 2,\n\tLinesDeleted = 3,\n\tLinesInserted = 4,\n\tEOLChanged = 5\n}\n\n/**\n * An event describing that a model has been reset to a new value.\n * @internal\n */\nexport class ModelRawFlush {\n\tpublic readonly changeType = RawContentChangedType.Flush;\n}\n\n/**\n * Represents text injected on a line\n * @internal\n */\nexport class LineInjectedText {\n\tpublic static applyInjectedText(lineText: string, injectedTexts: LineInjectedText[] | null): string {\n\t\tif (!injectedTexts || injectedTexts.length === 0) {\n\t\t\treturn lineText;\n\t\t}\n\t\tlet result = '';\n\t\tlet lastOriginalOffset = 0;\n\t\tfor (const injectedText of injectedTexts) {\n\t\t\tresult += lineText.substring(lastOriginalOffset, injectedText.column - 1);\n\t\t\tlastOriginalOffset = injectedText.column - 1;\n\t\t\tresult += injectedText.options.content;\n\t\t}\n\t\tresult += lineText.substring(lastOriginalOffset);\n\t\treturn result;\n\t}\n\n\tpublic static fromDecorations(decorations: IModelDecoration[]): LineInjectedText[] {\n\t\tconst result: LineInjectedText[] = [];\n\t\tfor (const decoration of decorations) {\n\t\t\tif (decoration.options.before && decoration.options.before.content.length > 0) {\n\t\t\t\tresult.push(new LineInjectedText(\n\t\t\t\t\tdecoration.ownerId,\n\t\t\t\t\tdecoration.range.startLineNumber,\n\t\t\t\t\tdecoration.range.startColumn,\n\t\t\t\t\tdecoration.options.before,\n\t\t\t\t\t0,\n\t\t\t\t));\n\t\t\t}\n\t\t\tif (decoration.options.after && decoration.options.after.content.length > 0) {\n\t\t\t\tresult.push(new LineInjectedText(\n\t\t\t\t\tdecoration.ownerId,\n\t\t\t\t\tdecoration.range.endLineNumber,\n\t\t\t\t\tdecoration.range.endColumn,\n\t\t\t\t\tdecoration.options.after,\n\t\t\t\t\t1,\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tresult.sort((a, b) => {\n\t\t\tif (a.lineNumber === b.lineNumber) {\n\t\t\t\tif (a.column === b.column) {\n\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t}\n\t\t\t\treturn a.column - b.column;\n\t\t\t}\n\t\t\treturn a.lineNumber - b.lineNumber;\n\t\t});\n\t\treturn result;\n\t}\n\n\tconstructor(\n\t\tpublic readonly ownerId: number,\n\t\tpublic readonly lineNumber: number,\n\t\tpublic readonly column: number,\n\t\tpublic readonly options: InjectedTextOptions,\n\t\tpublic readonly order: number\n\t) { }\n}\n\n/**\n * An event describing that a line has changed in a model.\n * @internal\n */\nexport class ModelRawLineChanged {\n\tpublic readonly changeType = RawContentChangedType.LineChanged;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\t/**\n\t * The new value of the line.\n\t */\n\tpublic readonly detail: string;\n\t/**\n\t * The injected text on the line.\n\t */\n\tpublic readonly injectedText: LineInjectedText[] | null;\n\n\tconstructor(lineNumber: number, detail: string, injectedText: LineInjectedText[] | null) {\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.detail = detail;\n\t\tthis.injectedText = injectedText;\n\t}\n}\n\n\n/**\n * An event describing that a line height has changed in the model.\n * @internal\n */\nexport class ModelLineHeightChanged {\n\t/**\n\t * Editor owner ID\n\t */\n\tpublic readonly ownerId: number;\n\t/**\n\t * The decoration ID that has changed.\n\t */\n\tpublic readonly decorationId: string;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\t/**\n\t * The line height on the line.\n\t */\n\tpublic readonly lineHeight: number | null;\n\n\tconstructor(ownerId: number, decorationId: string, lineNumber: number, lineHeight: number | null) {\n\t\tthis.ownerId = ownerId;\n\t\tthis.decorationId = decorationId;\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.lineHeight = lineHeight;\n\t}\n}\n\n/**\n * An event describing that a line height has changed in the model.\n * @internal\n */\nexport class ModelFontChanged {\n\t/**\n\t * Editor owner ID\n\t */\n\tpublic readonly ownerId: number;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\n\tconstructor(ownerId: number, lineNumber: number) {\n\t\tthis.ownerId = ownerId;\n\t\tthis.lineNumber = lineNumber;\n\t}\n}\n\n/**\n * An event describing that line(s) have been deleted in a model.\n * @internal\n */\nexport class ModelRawLinesDeleted {\n\tpublic readonly changeType = RawContentChangedType.LinesDeleted;\n\t/**\n\t * At what line the deletion began (inclusive).\n\t */\n\tpublic readonly fromLineNumber: number;\n\t/**\n\t * At what line the deletion stopped (inclusive).\n\t */\n\tpublic readonly toLineNumber: number;\n\n\tconstructor(fromLineNumber: number, toLineNumber: number) {\n\t\tthis.fromLineNumber = fromLineNumber;\n\t\tthis.toLineNumber = toLineNumber;\n\t}\n}\n\n/**\n * An event describing that line(s) have been inserted in a model.\n * @internal\n */\nexport class ModelRawLinesInserted {\n\tpublic readonly changeType = RawContentChangedType.LinesInserted;\n\t/**\n\t * Before what line did the insertion begin\n\t */\n\tpublic readonly fromLineNumber: number;\n\t/**\n\t * `toLineNumber` - `fromLineNumber` + 1 denotes the number of lines that were inserted\n\t */\n\tpublic readonly toLineNumber: number;\n\t/**\n\t * The text that was inserted\n\t */\n\tpublic readonly detail: string[];\n\t/**\n\t * The injected texts for every inserted line.\n\t */\n\tpublic readonly injectedTexts: (LineInjectedText[] | null)[];\n\n\tconstructor(fromLineNumber: number, toLineNumber: number, detail: string[], injectedTexts: (LineInjectedText[] | null)[]) {\n\t\tthis.injectedTexts = injectedTexts;\n\t\tthis.fromLineNumber = fromLineNumber;\n\t\tthis.toLineNumber = toLineNumber;\n\t\tthis.detail = detail;\n\t}\n}\n\n/**\n * An event describing that a model has had its EOL changed.\n * @internal\n */\nexport class ModelRawEOLChanged {\n\tpublic readonly changeType = RawContentChangedType.EOLChanged;\n}\n\n/**\n * @internal\n */\nexport type ModelRawChange = ModelRawFlush | ModelRawLineChanged | ModelRawLinesDeleted | ModelRawLinesInserted | ModelRawEOLChanged;\n\n/**\n * An event describing a change in the text of a model.\n * @internal\n */\nexport class ModelRawContentChangedEvent {\n\n\tpublic readonly changes: ModelRawChange[];\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\tpublic readonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\tpublic readonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\tpublic readonly isRedoing: boolean;\n\n\tpublic resultingSelection: Selection[] | null;\n\n\tconstructor(changes: ModelRawChange[], versionId: number, isUndoing: boolean, isRedoing: boolean) {\n\t\tthis.changes = changes;\n\t\tthis.versionId = versionId;\n\t\tthis.isUndoing = isUndoing;\n\t\tthis.isRedoing = isRedoing;\n\t\tthis.resultingSelection = null;\n\t}\n\n\tpublic containsEvent(type: RawContentChangedType): boolean {\n\t\tfor (let i = 0, len = this.changes.length; i < len; i++) {\n\t\t\tconst change = this.changes[i];\n\t\t\tif (change.changeType === type) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic static merge(a: ModelRawContentChangedEvent, b: ModelRawContentChangedEvent): ModelRawContentChangedEvent {\n\t\tconst changes = ([] as ModelRawChange[]).concat(a.changes).concat(b.changes);\n\t\tconst versionId = b.versionId;\n\t\tconst isUndoing = (a.isUndoing || b.isUndoing);\n\t\tconst isRedoing = (a.isRedoing || b.isRedoing);\n\t\treturn new ModelRawContentChangedEvent(changes, versionId, isUndoing, isRedoing);\n\t}\n}\n\n/**\n * An event describing a change in injected text.\n * @internal\n */\nexport class ModelInjectedTextChangedEvent {\n\n\tpublic readonly changes: ModelRawLineChanged[];\n\n\tconstructor(changes: ModelRawLineChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * An event describing a change of a line height.\n * @internal\n */\nexport class ModelLineHeightChangedEvent {\n\n\tpublic readonly changes: ModelLineHeightChanged[];\n\n\tconstructor(changes: ModelLineHeightChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * An event describing a change in fonts.\n * @internal\n */\nexport class ModelFontChangedEvent {\n\n\tpublic readonly changes: ModelFontChanged[];\n\n\tconstructor(changes: ModelFontChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * @internal\n */\nexport class InternalModelContentChangeEvent {\n\tconstructor(\n\t\tpublic readonly rawContentChangedEvent: ModelRawContentChangedEvent,\n\t\tpublic readonly contentChangedEvent: IModelContentChangedEvent,\n\t) { }\n\n\tpublic merge(other: InternalModelContentChangeEvent): InternalModelContentChangeEvent {\n\t\tconst rawContentChangedEvent = ModelRawContentChangedEvent.merge(this.rawContentChangedEvent, other.rawContentChangedEvent);\n\t\tconst contentChangedEvent = InternalModelContentChangeEvent._mergeChangeEvents(this.contentChangedEvent, other.contentChangedEvent);\n\t\treturn new InternalModelContentChangeEvent(rawContentChangedEvent, contentChangedEvent);\n\t}\n\n\tprivate static _mergeChangeEvents(a: IModelContentChangedEvent, b: IModelContentChangedEvent): IModelContentChangedEvent {\n\t\tconst changes = ([] as IModelContentChange[]).concat(a.changes).concat(b.changes);\n\t\tconst eol = b.eol;\n\t\tconst versionId = b.versionId;\n\t\tconst isUndoing = (a.isUndoing || b.isUndoing);\n\t\tconst isRedoing = (a.isRedoing || b.isRedoing);\n\t\tconst isFlush = (a.isFlush || b.isFlush);\n\t\tconst isEolChange = a.isEolChange && b.isEolChange; // both must be true to not confuse listeners who skip such edits\n\t\treturn {\n\t\t\tchanges: changes,\n\t\t\teol: eol,\n\t\t\tisEolChange: isEolChange,\n\t\t\tversionId: versionId,\n\t\t\tisUndoing: isUndoing,\n\t\t\tisRedoing: isRedoing,\n\t\t\tisFlush: isFlush,\n\t\t\tdetailedReasons: a.detailedReasons.concat(b.detailedReasons),\n\t\t\tdetailedReasonsChangeLengths: a.detailedReasonsChangeLengths.concat(b.detailedReasonsChangeLengths),\n\t\t};\n\t}\n}\n","\nimport { Selection } from './core/selection.js';\nimport { IModelDecoration, InjectedTextOptions } from './model.js';\nimport { IModelContentChange } from './model/mirrorTextModel.js';\nimport { TextModelEditSource } from './textModelEditSource.js';\n\n/**\n * An event describing that the current language associated with a model has changed.\n */\nexport interface IModelLanguageChangedEvent {\n\t/**\n\t * Previous language\n\t */\n\treadonly oldLanguage: string;\n\t/**\n\t * New language\n\t */\n\treadonly newLanguage: string;\n\n\t/**\n\t * Source of the call that caused the event.\n\t */\n\treadonly source: string;\n}\n\n/**\n * An event describing that the language configuration associated with a model has changed.\n */\nexport interface IModelLanguageConfigurationChangedEvent {\n}\n\n/**\n * An event describing a change in the text of a model.\n */\nexport interface IModelContentChangedEvent {\n\t/**\n\t * The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.\n\t */\n\treadonly changes: IModelContentChange[];\n\t/**\n\t * The (new) end-of-line character.\n\t */\n\treadonly eol: string;\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\treadonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\treadonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\treadonly isRedoing: boolean;\n\t/**\n\t * Flag that indicates that all decorations were lost with this edit.\n\t * The model has been reset to a new value.\n\t */\n\treadonly isFlush: boolean;\n\n\t/**\n\t * Flag that indicates that this event describes an eol change.\n\t */\n\treadonly isEolChange: boolean;\n\n\t/**\n\t * Detailed reason information for the change\n\t * @internal\n\t */\n\treadonly detailedReasons: TextModelEditSource[];\n\n\t/**\n\t * The sum of these lengths equals changes.length.\n\t * The length of this array must equal the length of detailedReasons.\n\t*/\n\treadonly detailedReasonsChangeLengths: number[];\n}\n\nexport interface ISerializedModelContentChangedEvent {\n\t/**\n\t * The changes are ordered from the end of the document to the beginning, so they should be safe to apply in sequence.\n\t */\n\treadonly changes: IModelContentChange[];\n\t/**\n\t * The (new) end-of-line character.\n\t */\n\treadonly eol: string;\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\treadonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\treadonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\treadonly isRedoing: boolean;\n\t/**\n\t * Flag that indicates that all decorations were lost with this edit.\n\t * The model has been reset to a new value.\n\t */\n\treadonly isFlush: boolean;\n\n\t/**\n\t * Flag that indicates that this event describes an eol change.\n\t */\n\treadonly isEolChange: boolean;\n}\n\n/**\n * An event describing that model decorations have changed.\n */\nexport interface IModelDecorationsChangedEvent {\n\treadonly affectsMinimap: boolean;\n\treadonly affectsOverviewRuler: boolean;\n\treadonly affectsGlyphMargin: boolean;\n\treadonly affectsLineNumber: boolean;\n}\n\n/**\n * An event describing that some ranges of lines have been tokenized (their tokens have changed).\n * @internal\n */\nexport interface IModelTokensChangedEvent {\n\treadonly semanticTokensApplied: boolean;\n\treadonly ranges: {\n\t\t/**\n\t\t * The start of the range (inclusive)\n\t\t */\n\t\treadonly fromLineNumber: number;\n\t\t/**\n\t\t * The end of the range (inclusive)\n\t\t */\n\t\treadonly toLineNumber: number;\n\t}[];\n}\n\nexport interface IModelOptionsChangedEvent {\n\treadonly tabSize: boolean;\n\treadonly indentSize: boolean;\n\treadonly insertSpaces: boolean;\n\treadonly trimAutoWhitespace: boolean;\n}\n\n/**\n * @internal\n */\nexport const enum RawContentChangedType {\n\tFlush = 1,\n\tLineChanged = 2,\n\tLinesDeleted = 3,\n\tLinesInserted = 4,\n\tEOLChanged = 5\n}\n\n/**\n * An event describing that a model has been reset to a new value.\n * @internal\n */\nexport class ModelRawFlush {\n\tpublic readonly changeType = RawContentChangedType.Flush;\n}\n\n/**\n * Represents text injected on a line\n * @internal\n */\nexport class LineInjectedText {\n\tpublic static applyInjectedText(lineText: string, injectedTexts: LineInjectedText[] | null): string {\n\t\tif (!injectedTexts || injectedTexts.length === 0) {\n\t\t\treturn lineText;\n\t\t}\n\t\tlet result = '';\n\t\tlet lastOriginalOffset = 0;\n\t\tfor (const injectedText of injectedTexts) {\n\t\t\tresult += lineText.substring(lastOriginalOffset, injectedText.column - 1);\n\t\t\tlastOriginalOffset = injectedText.column - 1;\n\t\t\tresult += injectedText.options.content;\n\t\t}\n\t\tresult += lineText.substring(lastOriginalOffset);\n\t\treturn result;\n\t}\n\n\tpublic static fromDecorations(decorations: IModelDecoration[]): LineInjectedText[] {\n\t\tconst result: LineInjectedText[] = [];\n\t\tfor (const decoration of decorations) {\n\t\t\tif (decoration.options.before && decoration.options.before.content.length > 0) {\n\t\t\t\tresult.push(new LineInjectedText(\n\t\t\t\t\tdecoration.ownerId,\n\t\t\t\t\tdecoration.range.startLineNumber,\n\t\t\t\t\tdecoration.range.startColumn,\n\t\t\t\t\tdecoration.options.before,\n\t\t\t\t\t0,\n\t\t\t\t));\n\t\t\t}\n\t\t\tif (decoration.options.after && decoration.options.after.content.length > 0) {\n\t\t\t\tresult.push(new LineInjectedText(\n\t\t\t\t\tdecoration.ownerId,\n\t\t\t\t\tdecoration.range.endLineNumber,\n\t\t\t\t\tdecoration.range.endColumn,\n\t\t\t\t\tdecoration.options.after,\n\t\t\t\t\t1,\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tresult.sort((a, b) => {\n\t\t\tif (a.lineNumber === b.lineNumber) {\n\t\t\t\tif (a.column === b.column) {\n\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t}\n\t\t\t\treturn a.column - b.column;\n\t\t\t}\n\t\t\treturn a.lineNumber - b.lineNumber;\n\t\t});\n\t\treturn result;\n\t}\n\n\tconstructor(\n\t\tpublic readonly ownerId: number,\n\t\tpublic readonly lineNumber: number,\n\t\tpublic readonly column: number,\n\t\tpublic readonly options: InjectedTextOptions,\n\t\tpublic readonly order: number\n\t) { }\n}\n\n/**\n * An event describing that a line has changed in a model.\n * @internal\n */\nexport class ModelRawLineChanged {\n\tpublic readonly changeType = RawContentChangedType.LineChanged;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\t/**\n\t * The new value of the line.\n\t */\n\tpublic readonly detail: string;\n\t/**\n\t * The injected text on the line.\n\t */\n\tpublic readonly injectedText: LineInjectedText[] | null;\n\n\tconstructor(lineNumber: number, detail: string, injectedText: LineInjectedText[] | null) {\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.detail = detail;\n\t\tthis.injectedText = injectedText;\n\t}\n}\n\n\n/**\n * An event describing that a line height has changed in the model.\n * @internal\n */\nexport class ModelLineHeightChanged {\n\t/**\n\t * Editor owner ID\n\t */\n\tpublic readonly ownerId: number;\n\t/**\n\t * The decoration ID that has changed.\n\t */\n\tpublic readonly decorationId: string;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\t/**\n\t * The line height on the line.\n\t */\n\tpublic readonly lineHeight: number | null;\n\n\tconstructor(ownerId: number, decorationId: string, lineNumber: number, lineHeight: number | null) {\n\t\tthis.ownerId = ownerId;\n\t\tthis.decorationId = decorationId;\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.lineHeight = lineHeight;\n\t}\n}\n\n/**\n * An event describing that a line height has changed in the model.\n * @internal\n */\nexport class ModelFontChanged {\n\t/**\n\t * Editor owner ID\n\t */\n\tpublic readonly ownerId: number;\n\t/**\n\t * The line that has changed.\n\t */\n\tpublic readonly lineNumber: number;\n\n\tconstructor(ownerId: number, lineNumber: number) {\n\t\tthis.ownerId = ownerId;\n\t\tthis.lineNumber = lineNumber;\n\t}\n}\n\n/**\n * An event describing that line(s) have been deleted in a model.\n * @internal\n */\nexport class ModelRawLinesDeleted {\n\tpublic readonly changeType = RawContentChangedType.LinesDeleted;\n\t/**\n\t * At what line the deletion began (inclusive).\n\t */\n\tpublic readonly fromLineNumber: number;\n\t/**\n\t * At what line the deletion stopped (inclusive).\n\t */\n\tpublic readonly toLineNumber: number;\n\n\tconstructor(fromLineNumber: number, toLineNumber: number) {\n\t\tthis.fromLineNumber = fromLineNumber;\n\t\tthis.toLineNumber = toLineNumber;\n\t}\n}\n\n/**\n * An event describing that line(s) have been inserted in a model.\n * @internal\n */\nexport class ModelRawLinesInserted {\n\tpublic readonly changeType = RawContentChangedType.LinesInserted;\n\t/**\n\t * Before what line did the insertion begin\n\t */\n\tpublic readonly fromLineNumber: number;\n\t/**\n\t * `toLineNumber` - `fromLineNumber` + 1 denotes the number of lines that were inserted\n\t */\n\tpublic readonly toLineNumber: number;\n\t/**\n\t * The text that was inserted\n\t */\n\tpublic readonly detail: string[];\n\t/**\n\t * The injected texts for every inserted line.\n\t */\n\tpublic readonly injectedTexts: (LineInjectedText[] | null)[];\n\n\tconstructor(fromLineNumber: number, toLineNumber: number, detail: string[], injectedTexts: (LineInjectedText[] | null)[]) {\n\t\tthis.injectedTexts = injectedTexts;\n\t\tthis.fromLineNumber = fromLineNumber;\n\t\tthis.toLineNumber = toLineNumber;\n\t\tthis.detail = detail;\n\t}\n}\n\n/**\n * An event describing that a model has had its EOL changed.\n * @internal\n */\nexport class ModelRawEOLChanged {\n\tpublic readonly changeType = RawContentChangedType.EOLChanged;\n}\n\n/**\n * @internal\n */\nexport type ModelRawChange = ModelRawFlush | ModelRawLineChanged | ModelRawLinesDeleted | ModelRawLinesInserted | ModelRawEOLChanged;\n\n/**\n * An event describing a change in the text of a model.\n * @internal\n */\nexport class ModelRawContentChangedEvent {\n\n\tpublic readonly changes: ModelRawChange[];\n\t/**\n\t * The new version id the model has transitioned to.\n\t */\n\tpublic readonly versionId: number;\n\t/**\n\t * Flag that indicates that this event was generated while undoing.\n\t */\n\tpublic readonly isUndoing: boolean;\n\t/**\n\t * Flag that indicates that this event was generated while redoing.\n\t */\n\tpublic readonly isRedoing: boolean;\n\n\tpublic resultingSelection: Selection[] | null;\n\n\tconstructor(changes: ModelRawChange[], versionId: number, isUndoing: boolean, isRedoing: boolean) {\n\t\tthis.changes = changes;\n\t\tthis.versionId = versionId;\n\t\tthis.isUndoing = isUndoing;\n\t\tthis.isRedoing = isRedoing;\n\t\tthis.resultingSelection = null;\n\t}\n\n\tpublic containsEvent(type: RawContentChangedType): boolean {\n\t\tfor (let i = 0, len = this.changes.length; i < len; i++) {\n\t\t\tconst change = this.changes[i];\n\t\t\tif (change.changeType === type) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic static merge(a: ModelRawContentChangedEvent, b: ModelRawContentChangedEvent): ModelRawContentChangedEvent {\n\t\tconst changes = ([] as ModelRawChange[]).concat(a.changes).concat(b.changes);\n\t\tconst versionId = b.versionId;\n\t\tconst isUndoing = (a.isUndoing || b.isUndoing);\n\t\tconst isRedoing = (a.isRedoing || b.isRedoing);\n\t\treturn new ModelRawContentChangedEvent(changes, versionId, isUndoing, isRedoing);\n\t}\n}\n\n/**\n * An event describing a change in injected text.\n * @internal\n */\nexport class ModelInjectedTextChangedEvent {\n\n\tpublic readonly changes: ModelRawLineChanged[];\n\n\tconstructor(changes: ModelRawLineChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * An event describing a change of a line height.\n * @internal\n */\nexport class ModelLineHeightChangedEvent {\n\n\tpublic readonly changes: ModelLineHeightChanged[];\n\n\tconstructor(changes: ModelLineHeightChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * An event describing a change in fonts.\n * @internal\n */\nexport class ModelFontChangedEvent {\n\n\tpublic readonly changes: ModelFontChanged[];\n\n\tconstructor(changes: ModelFontChanged[]) {\n\t\tthis.changes = changes;\n\t}\n}\n\n/**\n * @internal\n */\nexport class InternalModelContentChangeEvent {\n\tconstructor(\n\t\tpublic readonly rawContentChangedEvent: ModelRawContentChangedEvent,\n\t\tpublic readonly contentChangedEvent: IModelContentChangedEvent,\n\t) { }\n\n\tpublic merge(other: InternalModelContentChangeEvent): InternalModelContentChangeEvent {\n\t\tconst rawContentChangedEvent = ModelRawContentChangedEvent.merge(this.rawContentChangedEvent, other.rawContentChangedEvent);\n\t\tconst contentChangedEvent = InternalModelContentChangeEvent._mergeChangeEvents(this.contentChangedEvent, other.contentChangedEvent);\n\t\treturn new InternalModelContentChangeEvent(rawContentChangedEvent, contentChangedEvent);\n\t}\n\n\tprivate static _mergeChangeEvents(a: IModelContentChangedEvent, b: IModelContentChangedEvent): IModelContentChangedEvent {\n\t\tconst changes = ([] as IModelContentChange[]).concat(a.changes).concat(b.changes);\n\t\tconst eol = b.eol;\n\t\tconst versionId = b.versionId;\n\t\tconst isUndoing = (a.isUndoing || b.isUndoing);\n\t\tconst isRedoing = (a.isRedoing || b.isRedoing);\n\t\tconst isFlush = (a.isFlush || b.isFlush);\n\t\tconst isEolChange = a.isEolChange && b.isEolChange; // both must be true to not confuse listeners who skip such edits\n\t\treturn {\n\t\t\tchanges: changes,\n\t\t\teol: eol,\n\t\t\tisEolChange: isEolChange,\n\t\t\tversionId: versionId,\n\t\t\tisUndoing: isUndoing,\n\t\t\tisRedoing: isRedoing,\n\t\t\tisFlush: isFlush,\n\t\t\tdetailedReasons: a.detailedReasons.concat(b.detailedReasons),\n\t\t\tdetailedReasonsChangeLengths: a.detailedReasonsChangeLengths.concat(b.detailedReasonsChangeLengths),\n\t\t};\n\t}\n}\n"]}
|
|
@@ -2959,25 +2959,6 @@ export namespace editor {
|
|
|
2959
2959
|
export interface IModelLanguageConfigurationChangedEvent {
|
|
2960
2960
|
}
|
|
2961
2961
|
|
|
2962
|
-
export interface IModelContentChange {
|
|
2963
|
-
/**
|
|
2964
|
-
* The old range that got replaced.
|
|
2965
|
-
*/
|
|
2966
|
-
readonly range: IRange;
|
|
2967
|
-
/**
|
|
2968
|
-
* The offset of the range that got replaced.
|
|
2969
|
-
*/
|
|
2970
|
-
readonly rangeOffset: number;
|
|
2971
|
-
/**
|
|
2972
|
-
* The length of the range that got replaced.
|
|
2973
|
-
*/
|
|
2974
|
-
readonly rangeLength: number;
|
|
2975
|
-
/**
|
|
2976
|
-
* The new text for the range.
|
|
2977
|
-
*/
|
|
2978
|
-
readonly text: string;
|
|
2979
|
-
}
|
|
2980
|
-
|
|
2981
2962
|
/**
|
|
2982
2963
|
* An event describing a change in the text of a model.
|
|
2983
2964
|
*/
|
|
@@ -3067,6 +3048,25 @@ export namespace editor {
|
|
|
3067
3048
|
readonly trimAutoWhitespace: boolean;
|
|
3068
3049
|
}
|
|
3069
3050
|
|
|
3051
|
+
export interface IModelContentChange {
|
|
3052
|
+
/**
|
|
3053
|
+
* The old range that got replaced.
|
|
3054
|
+
*/
|
|
3055
|
+
readonly range: IRange;
|
|
3056
|
+
/**
|
|
3057
|
+
* The offset of the range that got replaced.
|
|
3058
|
+
*/
|
|
3059
|
+
readonly rangeOffset: number;
|
|
3060
|
+
/**
|
|
3061
|
+
* The length of the range that got replaced.
|
|
3062
|
+
*/
|
|
3063
|
+
readonly rangeLength: number;
|
|
3064
|
+
/**
|
|
3065
|
+
* The new text for the range.
|
|
3066
|
+
*/
|
|
3067
|
+
readonly text: string;
|
|
3068
|
+
}
|
|
3069
|
+
|
|
3070
3070
|
/**
|
|
3071
3071
|
* Describes the reason the cursor has changed its position.
|
|
3072
3072
|
*/
|
package/monaco.d.ts
CHANGED
|
@@ -2961,25 +2961,6 @@ declare namespace monaco.editor {
|
|
|
2961
2961
|
export interface IModelLanguageConfigurationChangedEvent {
|
|
2962
2962
|
}
|
|
2963
2963
|
|
|
2964
|
-
export interface IModelContentChange {
|
|
2965
|
-
/**
|
|
2966
|
-
* The old range that got replaced.
|
|
2967
|
-
*/
|
|
2968
|
-
readonly range: IRange;
|
|
2969
|
-
/**
|
|
2970
|
-
* The offset of the range that got replaced.
|
|
2971
|
-
*/
|
|
2972
|
-
readonly rangeOffset: number;
|
|
2973
|
-
/**
|
|
2974
|
-
* The length of the range that got replaced.
|
|
2975
|
-
*/
|
|
2976
|
-
readonly rangeLength: number;
|
|
2977
|
-
/**
|
|
2978
|
-
* The new text for the range.
|
|
2979
|
-
*/
|
|
2980
|
-
readonly text: string;
|
|
2981
|
-
}
|
|
2982
|
-
|
|
2983
2964
|
/**
|
|
2984
2965
|
* An event describing a change in the text of a model.
|
|
2985
2966
|
*/
|
|
@@ -3069,6 +3050,25 @@ declare namespace monaco.editor {
|
|
|
3069
3050
|
readonly trimAutoWhitespace: boolean;
|
|
3070
3051
|
}
|
|
3071
3052
|
|
|
3053
|
+
export interface IModelContentChange {
|
|
3054
|
+
/**
|
|
3055
|
+
* The old range that got replaced.
|
|
3056
|
+
*/
|
|
3057
|
+
readonly range: IRange;
|
|
3058
|
+
/**
|
|
3059
|
+
* The offset of the range that got replaced.
|
|
3060
|
+
*/
|
|
3061
|
+
readonly rangeOffset: number;
|
|
3062
|
+
/**
|
|
3063
|
+
* The length of the range that got replaced.
|
|
3064
|
+
*/
|
|
3065
|
+
readonly rangeLength: number;
|
|
3066
|
+
/**
|
|
3067
|
+
* The new text for the range.
|
|
3068
|
+
*/
|
|
3069
|
+
readonly text: string;
|
|
3070
|
+
}
|
|
3071
|
+
|
|
3072
3072
|
/**
|
|
3073
3073
|
* Describes the reason the cursor has changed its position.
|
|
3074
3074
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monaco-editor-core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.53.0-dev-
|
|
4
|
+
"version": "0.53.0-dev-20250830",
|
|
5
5
|
"description": "A browser based code editor",
|
|
6
6
|
"author": "Microsoft Corporation",
|
|
7
7
|
"license": "MIT",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"bugs": {
|
|
15
15
|
"url": "https://github.com/microsoft/vscode/issues"
|
|
16
16
|
},
|
|
17
|
-
"vscodeCommitId": "
|
|
17
|
+
"vscodeCommitId": "8cda31cd1c15fdbb9d44b948316c10b035e88fec"
|
|
18
18
|
}
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
monaco-editor-core: https://github.com/microsoft/vscode/tree/
|
|
1
|
+
monaco-editor-core: https://github.com/microsoft/vscode/tree/a4d7907bd439b06b24e334bdf2ab597bcae658b5
|