@singapore-editor/lsp-plugin 0.2.13 → 0.2.15

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.
Files changed (63) hide show
  1. package/dist/codeActions.js.map +1 -1
  2. package/dist/colorAlpha.js.map +1 -1
  3. package/dist/completion.js.map +1 -1
  4. package/dist/completionCommit.js.map +1 -1
  5. package/dist/completionController.js.map +1 -1
  6. package/dist/completionProviders.js.map +1 -1
  7. package/dist/definitionLinkController.d.ts.map +1 -1
  8. package/dist/definitionLinkController.js +4 -2
  9. package/dist/definitionLinkController.js.map +1 -1
  10. package/dist/definitionNavigation.js +4 -4
  11. package/dist/definitionNavigation.js.map +1 -1
  12. package/dist/diagnosticNotes.js.map +1 -1
  13. package/dist/diagnosticProjection.js.map +1 -1
  14. package/dist/diagnostics.js.map +1 -1
  15. package/dist/diagnosticsPresenter.js.map +1 -1
  16. package/dist/document.js.map +1 -1
  17. package/dist/documentHighlightController.js.map +1 -1
  18. package/dist/documentSnapshot.js.map +1 -1
  19. package/dist/documentSync.js +2 -2
  20. package/dist/documentSync.js.map +1 -1
  21. package/dist/documentSyncController.js.map +1 -1
  22. package/dist/formatOnType.js.map +1 -1
  23. package/dist/formatting.js.map +1 -1
  24. package/dist/fuzzyMatch.js.map +1 -1
  25. package/dist/hoverParticipant.js.map +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +2 -2
  29. package/dist/keyCommands.js.map +1 -1
  30. package/dist/lane.js.map +1 -1
  31. package/dist/lspConnection.d.ts +16 -0
  32. package/dist/lspConnection.d.ts.map +1 -1
  33. package/dist/lspConnection.js +51 -3
  34. package/dist/lspConnection.js.map +1 -1
  35. package/dist/lspConnectionPool.d.ts.map +1 -1
  36. package/dist/lspConnectionPool.js +33 -5
  37. package/dist/lspConnectionPool.js.map +1 -1
  38. package/dist/minimalEdits.js.map +1 -1
  39. package/dist/paths.d.ts +13 -0
  40. package/dist/paths.d.ts.map +1 -1
  41. package/dist/paths.js +44 -2
  42. package/dist/paths.js.map +1 -1
  43. package/dist/plugin.d.ts +6 -1
  44. package/dist/plugin.d.ts.map +1 -1
  45. package/dist/plugin.js +1 -0
  46. package/dist/plugin.js.map +1 -1
  47. package/dist/plugin.styles.js.map +1 -1
  48. package/dist/pullDiagnostics.js.map +1 -1
  49. package/dist/renameWidget.js.map +1 -1
  50. package/dist/retainedSource.js.map +1 -1
  51. package/dist/semanticTokenDecoder.js.map +1 -1
  52. package/dist/semanticTokens.js.map +1 -1
  53. package/dist/serverSet.js.map +1 -1
  54. package/dist/signatureHelp.js.map +1 -1
  55. package/dist/signatureHelpController.js.map +1 -1
  56. package/dist/sourceConnection.js.map +1 -1
  57. package/dist/sourceText.js.map +1 -1
  58. package/dist/types.js.map +1 -1
  59. package/dist/viewDocumentSnapshot.js.map +1 -1
  60. package/dist/workspaceEdit.js.map +1 -1
  61. package/dist/workspaceEditProvenance.js.map +1 -1
  62. package/dist/workspaceTextEdits.js.map +1 -1
  63. package/package.json +7 -7
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["import type { TooltipAction } from '@singapore-editor/plugin-ui/tooltip'\nimport type { LanguageServerDocument } from './document'\nimport type { DocumentLogicalRevisionScope } from '@singapore-editor/core/document'\nimport type {\n EditorDisposable,\n EditorPlugin,\n EditorTextAnchor,\n EditorViewSnapshot,\n} from '@singapore-editor/core/extensions'\nimport type {\n LspClient,\n LspNotificationHandler,\n LspServerRequestHandler,\n LspWebSocketTransportOptions,\n} from '@singapore-editor/lsp'\nimport type * as lsp from 'vscode-languageserver-protocol'\n\nimport type { LanguageServerConnectionContext } from './connectionContext'\nimport type { LanguageServerDocumentSyncController } from './documentSyncController'\nimport type { LspConnectionProvider, LspReconnectOptions } from './lspConnection'\nimport type { ParsedWorkspaceEdit } from './workspaceEdit'\nimport type { WorkspaceTextDocumentProvenance } from './workspaceTextEdits'\nexport type { LanguageServerConnectionContext } from './connectionContext'\nimport type {\n LanguageServerSemanticTokensFactory,\n LanguageServerSemanticTokensOptions,\n} from './semanticTokens'\n\nexport type LanguageServerStatus = 'idle' | 'loading' | 'ready' | 'error'\n\nexport const LANGUAGE_SERVER_FEATURE_IDS = [\n 'completion',\n 'hover',\n 'navigation',\n 'signatureHelp',\n 'diagnostics',\n 'codeActions',\n 'formatting',\n 'rename',\n 'documentHighlights',\n 'semanticTokens',\n] as const\n\nexport type LanguageServerFeatureId = (typeof LANGUAGE_SERVER_FEATURE_IDS)[number]\n\nexport type LanguageServerFeatureRanks = Partial<Readonly<Record<LanguageServerFeatureId, number>>>\n\nexport type LanguageServerReadyNotification = {\n readonly method: string\n readonly params: unknown\n}\n\nexport type LanguageServerDiagnosticCounts = {\n readonly error: number\n readonly warning: number\n readonly information: number\n readonly hint: number\n readonly total: number\n}\n\n/**\n * How far a summary's diagnostics can be trusted, so an empty list is never mistaken for a clean\n * file. `awaiting`: a first result is being asked for. `refreshing`: a result is shown and a newer\n * one is being asked for. `current`: nothing is pending. `silent`: the server has said nothing and\n * nothing is pending — a push-only server may never publish, so this never waits. `unavailable`:\n * the connection is gone and what was shown was cleared.\n */\nexport type LanguageServerDiagnosticsFreshness =\n | 'awaiting'\n | 'refreshing'\n | 'current'\n | 'silent'\n | 'unavailable'\n\nexport type LanguageServerDiagnosticSummary = {\n readonly uri: lsp.DocumentUri | null\n readonly version: number | null\n readonly diagnostics: readonly lsp.Diagnostic[]\n readonly counts: LanguageServerDiagnosticCounts\n readonly freshness: LanguageServerDiagnosticsFreshness\n}\n\nexport type LanguageServerDiagnosticMarkerEvent = {\n readonly direction: 'next' | 'previous'\n readonly diagnostic: lsp.Diagnostic\n readonly documentUri: lsp.DocumentUri\n readonly textVersion: number\n readonly anchor: EditorTextAnchor\n}\n\nexport type LanguageServerDiagnosticMarkerClaim =\n | { readonly kind: 'claimed'; dispose(): void }\n | { readonly kind: 'ignored' }\n\nexport type LanguageServerDefinitionTarget = {\n readonly uri: lsp.DocumentUri\n readonly path: string\n readonly range: lsp.Range\n}\n\nexport type LanguageServerNavigationKind =\n | 'definition'\n | 'references'\n | 'implementation'\n | 'typeDefinition'\n\nexport type LanguageServerNavigationOpenMode = 'default' | 'peek' | 'aside'\n\nexport type LanguageServerNavigationOptions = {\n readonly kind: LanguageServerNavigationKind\n readonly openMode: LanguageServerNavigationOpenMode\n}\n\nexport type LanguageServerReferencesResult = {\n readonly uri: lsp.DocumentUri\n readonly targets: readonly LanguageServerDefinitionTarget[]\n}\n\nexport type LanguageServerDocumentSnapshot = Pick<\n EditorViewSnapshot,\n | 'documentId'\n | 'languageId'\n | 'textSnapshot'\n | 'textVersion'\n | 'documentSyncPoint'\n | 'changesSinceDocumentSyncPoint'\n | 'lineStarts'\n | 'lineStartsView'\n>\n\nexport type LanguageServerDocumentSyncOptions = {\n /** Projects a live path transition before deferred view publication catches up. */\n readonly controller?: LanguageServerDocumentSyncController\n /** Resolves opaque editor identities to protocol URIs. Returning null disables synchronization. */\n uriForDocument?(snapshot: LanguageServerDocumentSnapshot): lsp.DocumentUri | null\n /**\n * The language id sent to the server when the editor and protocol use different names.\n * Returning undefined keeps the editor's id.\n */\n languageIdForDocument?(languageId: string, uri: lsp.DocumentUri): string | undefined\n shouldSyncLanguageId?(languageId: string, snapshot: LanguageServerDocumentSnapshot): boolean\n shouldSyncUri?(uri: lsp.DocumentUri, snapshot: LanguageServerDocumentSnapshot): boolean\n}\n\nexport type { WorkspaceTextDocumentProvenance } from './workspaceTextEdits'\n\nexport type WorkspaceEditOriginGuard = {\n readonly documents: readonly WorkspaceTextDocumentProvenance[]\n isCurrent(uri: string): boolean\n}\n\nexport type ApplyWorkspaceEditRequest = {\n readonly guard: WorkspaceEditOriginGuard\n readonly label: string\n readonly logicalRevisionScope: DocumentLogicalRevisionScope\n readonly originUri: string\n readonly originVersion: number\n readonly plan: ParsedWorkspaceEdit\n readonly serverId: string\n readonly signal: AbortSignal\n readonly source: 'code-action' | 'rename'\n}\n\nexport type ApplyWorkspaceEditResult =\n | { readonly status: 'applied' }\n | { readonly status: 'cancelled' }\n | { readonly code: string; readonly message: string; readonly status: 'failed' }\n | { readonly code: string; readonly message: string; readonly status: 'rolled-back' }\n | {\n readonly affectedPaths: readonly string[]\n readonly code: string\n readonly message: string\n readonly status: 'recovery-required'\n }\n\nexport type OnApplyWorkspaceEdit = (\n request: ApplyWorkspaceEditRequest,\n) => Promise<ApplyWorkspaceEditResult>\n\nexport type LanguageServerLaneHostOptions = {\n readonly onApplyWorkspaceEdit?: OnApplyWorkspaceEdit\n}\n\nexport type LanguageServerRenamePrompt = {\n readonly anchor: DOMRect\n readonly currentName: string\n readonly signal: AbortSignal\n}\n\nexport type LanguageServerDiagnosticActionContext = {\n readonly documentUri: lsp.DocumentUri\n readonly textVersion: number\n readonly diagnostic: lsp.Diagnostic\n}\n\nexport type LanguageServerDiagnosticActions = (\n context: LanguageServerDiagnosticActionContext,\n) => readonly TooltipAction[]\n\nexport type LanguageServerPluginOptions = LanguageServerLaneHostOptions & {\n readonly rootUri?: lsp.DocumentUri | null\n readonly initializationOptions?: unknown\n readonly timeoutMs?: number\n /**\n * Merged over `defaultClientCapabilities()`, so a host declares only what it adds. Build a\n * semantic-tokens block with `semanticTokensClientCapability()` from `@singapore-editor/lsp` rather than\n * by hand: it refuses the flags this editor cannot honour, each of which a real server acts on.\n */\n readonly capabilities?: lsp.ClientCapabilities\n /** At least one real server branches on this. The value is the host's to pick. */\n readonly clientInfo?: lsp.InitializeParams['clientInfo']\n /**\n * Merged around the plugin's own handlers. An entry for `textDocument/publishDiagnostics` runs\n * after the plugin's and cannot displace it, because the diagnostics feature hangs off it.\n */\n readonly notificationHandlers?: Readonly<Record<string, LspNotificationHandler<LspClient>>>\n /**\n * Answers requests the server sends the client, such as a server asking the host for files.\n * A method the plugin answers itself (`workspace/diagnostic/refresh`) stays the plugin's.\n */\n readonly serverRequestHandlers?: Readonly<Record<string, LspServerRequestHandler<LspClient>>>\n /** Which documents reach the server, and under what language id. */\n readonly documentSync?: LanguageServerDocumentSyncOptions\n readonly webSocketRoute: string | URL\n readonly webSocketTransportOptions?: LspWebSocketTransportOptions\n /**\n * Borrows the connection rather than owning one per view, so a file switch that rebuilds the view\n * does not also rebuild the websocket and re-run `initialize`. The route and options above still\n * describe the connection — the provider is handed them and builds from them the first time it\n * sees a key. See `LspConnectionProvider`.\n */\n readonly connectionProvider?: LspConnectionProvider\n /**\n * Turns on the semantic token layer, and is how the host gets hold of one: a layer needs a\n * viewport, a snapshot and a lifecycle, so the contribution creates it and hands it over through\n * `onLayer`. Supplying nothing creates no layer and fires no demand signal.\n */\n readonly semanticTokens?: LanguageServerSemanticTokensOptions\n /**\n * Hands the host the connection the moment it exists, which is the only way to reach the\n * `LspClient` — and therefore the only way to issue a request, override the timeout for one, or\n * cancel one. Returning a disposable ties the host's own controller to the connection's life.\n */\n onConnectionCreated?(context: LanguageServerConnectionContext): EditorDisposable | void\n /** The same context again, once `initialize` has come back and server capabilities are known. */\n onConnected?(context: LanguageServerConnectionContext): void\n readonly onStatusChange?: (status: LanguageServerStatus) => void\n readonly onDiagnostics?: (summary: LanguageServerDiagnosticSummary) => void\n readonly getDiagnosticActions?: LanguageServerDiagnosticActions\n readonly onDidNavigateDiagnostic?: (\n event: LanguageServerDiagnosticMarkerEvent,\n ) => LanguageServerDiagnosticMarkerClaim\n readonly onInteractiveReady?: () => void\n readonly onRequestError?: (serverId: string, method: string, error: unknown) => void\n /** Reports the selected destination when Ctrl/Cmd-hover renders a jumpable link. */\n readonly onDefinitionLinkHover?: (target: LanguageServerDefinitionTarget) => void | (() => void)\n readonly onOpenDefinition?: (\n target: LanguageServerDefinitionTarget,\n options?: LanguageServerNavigationOptions,\n ) => void | boolean\n readonly onOpenReferences?: (result: LanguageServerReferencesResult) => void | boolean\n readonly onError?: (error: unknown) => void\n}\n\nexport type LanguageServerLaneOptions = LanguageServerLaneHostOptions & {\n readonly id: string\n readonly features: LanguageServerFeatureRanks\n readonly rootUri?: lsp.DocumentUri | null\n readonly initializationOptions?: unknown\n readonly timeoutMs?: number\n readonly capabilities?: lsp.ClientCapabilities\n readonly clientInfo?: lsp.InitializeParams['clientInfo']\n readonly notificationHandlers?: Readonly<Record<string, LspNotificationHandler<LspClient>>>\n readonly serverRequestHandlers?: Readonly<Record<string, LspServerRequestHandler<LspClient>>>\n readonly webSocketRoute: string | URL\n readonly webSocketTransportOptions?: LspWebSocketTransportOptions\n readonly connectionProvider?: LspConnectionProvider\n /** Reconnects after the server goes away on its own; off unless given. */\n readonly reconnect?: LspReconnectOptions\n readonly readyNotifications?: readonly LanguageServerReadyNotification[]\n onConnectionCreated?(context: LanguageServerConnectionContext): EditorDisposable | void\n onConnected?(context: LanguageServerConnectionContext): void\n readonly onStatusChange?: (status: LanguageServerStatus) => void\n readonly onDiagnostics?: (summary: LanguageServerDiagnosticSummary) => void\n readonly onInteractiveReady?: () => void\n readonly onRequestError?: (method: string, error: unknown) => void\n readonly onError?: (error: unknown) => void\n}\n\nexport type LanguageServerSetPluginOptions = Pick<\n LanguageServerPluginOptions,\n | 'onDiagnostics'\n | 'onDidNavigateDiagnostic'\n | 'getDiagnosticActions'\n | 'onInteractiveReady'\n | 'onRequestError'\n | 'onDefinitionLinkHover'\n | 'onOpenDefinition'\n | 'onOpenReferences'\n | 'onError'\n> & {\n readonly semanticTokens?: LanguageServerSemanticTokensFactory\n} & (\n | {\n readonly lanes: readonly LanguageServerLaneOptions[]\n readonly document?: never\n readonly documentSync?: LanguageServerDocumentSyncOptions\n readonly onApplyWorkspaceEdit?: OnApplyWorkspaceEdit\n }\n | {\n readonly document: LanguageServerDocument\n readonly lanes?: never\n readonly documentSync?: never\n readonly onApplyWorkspaceEdit?: never\n }\n )\n\nexport type LanguageServerDocumentPluginOptions = Omit<\n Extract<LanguageServerSetPluginOptions, { readonly document: LanguageServerDocument }>,\n 'lanes' | 'document'\n> & {\n readonly document: LanguageServerDocument\n readonly webSocketRoute?: never\n}\n\nexport type LanguageServerPlugin = EditorPlugin\n"],"mappings":";AA8BA,IAAa,8BAA8B;CACzC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"mappings":";AA8BA,IAAa,8BAA8B;CACzC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"viewDocumentSnapshot.js","names":[],"sources":["../src/viewDocumentSnapshot.ts"],"sourcesContent":["import type { LanguageServerDocumentSnapshot } from './types'\nimport type { LspTextDocumentSnapshot } from '@singapore-editor/lsp'\n\n/** The view's text and line-start index as an LSP document snapshot, so nothing rescans the text. */\nexport function viewDocumentSnapshot(\n snapshot: LanguageServerDocumentSnapshot,\n): LspTextDocumentSnapshot {\n return {\n textSnapshot: snapshot.textSnapshot,\n lineStarts: snapshot.lineStartsView,\n }\n}\n"],"mappings":";;AAIA,SAAgB,qBACd,UACyB;CACzB,OAAO;EACL,cAAc,SAAS;EACvB,YAAY,SAAS;CACvB;AACF"}
1
+ {"version":3,"file":"viewDocumentSnapshot.js","names":[],"sources":["../src/viewDocumentSnapshot.ts"],"mappings":";;AAIA,SAAgB,qBACd,UACyB;CACzB,OAAO;EACL,cAAc,SAAS;EACvB,YAAY,SAAS;CACvB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceEdit.js","names":[],"sources":["../src/workspaceEdit.ts"],"sourcesContent":["export type ParsedWorkspaceEdit = {\n readonly annotations: ReadonlyMap<string, WorkspaceEditAnnotation>\n readonly operations: readonly WorkspaceEditOperation[]\n}\n\nexport type WorkspaceEditAnnotation = {\n readonly description?: string\n readonly label: string\n readonly needsConfirmation: boolean\n}\n\nexport type ParsedWorkspacePosition = {\n readonly character: number\n readonly line: number\n}\n\nexport type ParsedWorkspaceTextEdit = {\n readonly annotationId?: string\n readonly newText: string\n readonly range: {\n readonly end: ParsedWorkspacePosition\n readonly start: ParsedWorkspacePosition\n }\n}\n\nexport type WorkspaceEditOperation =\n | {\n readonly annotationId?: string\n readonly edits: readonly ParsedWorkspaceTextEdit[]\n readonly kind: 'text-document'\n readonly uri: string\n readonly version: number | null\n }\n | {\n readonly annotationId?: string\n readonly ignoreIfExists: boolean\n readonly kind: 'create'\n readonly overwrite: boolean\n readonly uri: string\n }\n | {\n readonly annotationId?: string\n readonly ignoreIfExists: boolean\n readonly kind: 'rename'\n readonly newUri: string\n readonly oldUri: string\n readonly overwrite: boolean\n }\n | {\n readonly annotationId?: string\n readonly ignoreIfNotExists: boolean\n readonly kind: 'delete'\n readonly recursive: boolean\n readonly uri: string\n }\n\nexport type WorkspaceEditFailure = {\n readonly code: WorkspaceEditFailureCode\n readonly editIndex?: number\n readonly operationIndex?: number\n readonly reason: string\n}\n\nexport type WorkspaceEditFailureCode =\n | 'ambiguous-inserts'\n | 'invalid-annotation'\n | 'invalid-position'\n | 'invalid-workspace-edit'\n | 'overlapping-edits'\n | 'reversed-range'\n | 'snapshot-drift'\n | 'unsupported-snippet'\n | 'version-mismatch'\n\nexport type ParseWorkspaceEditResult = ParseResult<ParsedWorkspaceEdit>\n\ntype ParseResult<T> =\n | { readonly ok: true; readonly value: T }\n | { readonly error: WorkspaceEditFailure; readonly ok: false }\n\ntype UnknownRecord = Readonly<Record<string, unknown>>\n\nconst EMPTY_OPERATIONS: readonly WorkspaceEditOperation[] = Object.freeze([])\n\nexport function parseWorkspaceEdit(input: unknown): ParseWorkspaceEditResult {\n if (input === null || input === undefined) return emptyWorkspaceEdit()\n if (!isRecord(input)) return invalidWorkspaceEdit('WorkspaceEdit must be an object')\n\n const annotations = parseAnnotations(input)\n if (!annotations.ok) return annotations\n\n const hasChanges = hasOwn(input, 'changes')\n const hasDocumentChanges = hasOwn(input, 'documentChanges')\n if (hasChanges && hasDocumentChanges) {\n return invalidWorkspaceEdit('WorkspaceEdit cannot contain both changes and documentChanges')\n }\n if (hasDocumentChanges) return parseDocumentChanges(input.documentChanges, annotations.value)\n if (hasChanges) return parseLegacyChanges(input.changes, annotations.value)\n return workspaceEditResult(annotations.value, EMPTY_OPERATIONS)\n}\n\nfunction parseAnnotations(\n input: UnknownRecord,\n): ParseResult<ReadonlyMap<string, WorkspaceEditAnnotation>> {\n if (!hasOwn(input, 'changeAnnotations')) return parsed(new Map())\n if (!isRecord(input.changeAnnotations)) {\n return failed('invalid-annotation', 'changeAnnotations must be an object')\n }\n\n const annotations = new Map<string, WorkspaceEditAnnotation>()\n for (const [id, value] of Object.entries(input.changeAnnotations)) {\n const annotation = parseAnnotation(value)\n if (!annotation.ok) return annotation\n annotations.set(id, annotation.value)\n }\n return parsed(annotations)\n}\n\nfunction parseAnnotation(input: unknown): ParseResult<WorkspaceEditAnnotation> {\n if (!isRecord(input) || typeof input.label !== 'string') {\n return failed('invalid-annotation', 'Every change annotation must have a string label')\n }\n if (hasOwn(input, 'needsConfirmation') && typeof input.needsConfirmation !== 'boolean') {\n return failed('invalid-annotation', 'Annotation needsConfirmation must be a boolean')\n }\n if (hasOwn(input, 'description') && typeof input.description !== 'string') {\n return failed('invalid-annotation', 'Annotation description must be a string')\n }\n\n const annotation: WorkspaceEditAnnotation = Object.freeze({\n ...(typeof input.description === 'string' ? { description: input.description } : {}),\n label: input.label,\n needsConfirmation: input.needsConfirmation === true,\n })\n return parsed(annotation)\n}\n\nfunction parseDocumentChanges(\n input: unknown,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n): ParseWorkspaceEditResult {\n if (!Array.isArray(input)) return invalidWorkspaceEdit('documentChanges must be an array')\n\n const operations: WorkspaceEditOperation[] = []\n for (let operationIndex = 0; operationIndex < input.length; operationIndex += 1) {\n const operation = parseOperation(input[operationIndex], annotations, operationIndex)\n if (!operation.ok) return operation\n operations.push(operation.value)\n }\n return workspaceEditResult(annotations, Object.freeze(operations))\n}\n\nfunction parseLegacyChanges(\n input: unknown,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n): ParseWorkspaceEditResult {\n if (!isRecord(input)) return invalidWorkspaceEdit('changes must be an object')\n\n const operations: WorkspaceEditOperation[] = []\n const entries = Object.entries(input).sort(([left], [right]) => compareCodeUnits(left, right))\n for (let operationIndex = 0; operationIndex < entries.length; operationIndex += 1) {\n const [uri, value] = entries[operationIndex]!\n const edits = parseTextEdits(value, annotations, operationIndex)\n if (!edits.ok) return edits\n operations.push(\n Object.freeze({ edits: edits.value, kind: 'text-document', uri, version: null }),\n )\n }\n return workspaceEditResult(annotations, Object.freeze(operations))\n}\n\nfunction parseOperation(\n input: unknown,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operationIndex: number,\n): ParseResult<WorkspaceEditOperation> {\n if (!isRecord(input)) {\n return invalidOperation(operationIndex, 'WorkspaceEdit operation must be an object')\n }\n if (!hasOwn(input, 'kind')) return parseTextDocumentOperation(input, annotations, operationIndex)\n if (input.kind === 'create') return parseCreateOperation(input, annotations, operationIndex)\n if (input.kind === 'rename') return parseRenameOperation(input, annotations, operationIndex)\n if (input.kind === 'delete') return parseDeleteOperation(input, annotations, operationIndex)\n return invalidOperation(operationIndex, 'WorkspaceEdit contains an unknown resource operation')\n}\n\nfunction parseTextDocumentOperation(\n input: UnknownRecord,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operationIndex: number,\n): ParseResult<WorkspaceEditOperation> {\n if (!isRecord(input.textDocument) || typeof input.textDocument.uri !== 'string') {\n return invalidOperation(operationIndex, 'Text document operation must have a string URI')\n }\n\n const version = input.textDocument.version\n if (version !== null && !Number.isInteger(version)) {\n return invalidOperation(operationIndex, 'Text document version must be an integer or null')\n }\n\n const annotationId = parseAnnotationReference(input, annotations, operationIndex)\n if (!annotationId.ok) return annotationId\n const edits = parseTextEdits(input.edits, annotations, operationIndex)\n if (!edits.ok) return edits\n\n return parsed(\n Object.freeze({\n ...optionalAnnotationId(annotationId.value),\n edits: edits.value,\n kind: 'text-document' as const,\n uri: input.textDocument.uri,\n version: version as number | null,\n }),\n )\n}\n\nfunction parseCreateOperation(\n input: UnknownRecord,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operationIndex: number,\n): ParseResult<WorkspaceEditOperation> {\n if (typeof input.uri !== 'string') {\n return invalidOperation(operationIndex, 'Create operation must have a string URI')\n }\n const annotationId = parseAnnotationReference(input, annotations, operationIndex)\n if (!annotationId.ok) return annotationId\n const options = parseResourceOptions(input.options, operationIndex)\n if (!options.ok) return options\n const overwrite = resourceBoolean(options.value, 'overwrite', operationIndex)\n if (!overwrite.ok) return overwrite\n const ignoreIfExists = resourceBoolean(options.value, 'ignoreIfExists', operationIndex)\n if (!ignoreIfExists.ok) return ignoreIfExists\n\n return parsed(\n Object.freeze({\n ...optionalAnnotationId(annotationId.value),\n ignoreIfExists: ignoreIfExists.value,\n kind: 'create' as const,\n overwrite: overwrite.value,\n uri: input.uri,\n }),\n )\n}\n\nfunction parseRenameOperation(\n input: UnknownRecord,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operationIndex: number,\n): ParseResult<WorkspaceEditOperation> {\n if (typeof input.oldUri !== 'string' || typeof input.newUri !== 'string') {\n return invalidOperation(operationIndex, 'Rename operation must have string oldUri and newUri')\n }\n const annotationId = parseAnnotationReference(input, annotations, operationIndex)\n if (!annotationId.ok) return annotationId\n const options = parseResourceOptions(input.options, operationIndex)\n if (!options.ok) return options\n const overwrite = resourceBoolean(options.value, 'overwrite', operationIndex)\n if (!overwrite.ok) return overwrite\n const ignoreIfExists = resourceBoolean(options.value, 'ignoreIfExists', operationIndex)\n if (!ignoreIfExists.ok) return ignoreIfExists\n\n return parsed(\n Object.freeze({\n ...optionalAnnotationId(annotationId.value),\n ignoreIfExists: ignoreIfExists.value,\n kind: 'rename' as const,\n newUri: input.newUri,\n oldUri: input.oldUri,\n overwrite: overwrite.value,\n }),\n )\n}\n\nfunction parseDeleteOperation(\n input: UnknownRecord,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operationIndex: number,\n): ParseResult<WorkspaceEditOperation> {\n if (typeof input.uri !== 'string') {\n return invalidOperation(operationIndex, 'Delete operation must have a string URI')\n }\n const annotationId = parseAnnotationReference(input, annotations, operationIndex)\n if (!annotationId.ok) return annotationId\n const options = parseResourceOptions(input.options, operationIndex)\n if (!options.ok) return options\n const recursive = resourceBoolean(options.value, 'recursive', operationIndex)\n if (!recursive.ok) return recursive\n const ignoreIfNotExists = resourceBoolean(options.value, 'ignoreIfNotExists', operationIndex)\n if (!ignoreIfNotExists.ok) return ignoreIfNotExists\n\n return parsed(\n Object.freeze({\n ...optionalAnnotationId(annotationId.value),\n ignoreIfNotExists: ignoreIfNotExists.value,\n kind: 'delete' as const,\n recursive: recursive.value,\n uri: input.uri,\n }),\n )\n}\n\nfunction parseResourceOptions(\n input: unknown,\n operationIndex: number,\n): ParseResult<UnknownRecord | undefined> {\n if (input === undefined) return parsed(undefined)\n if (isRecord(input)) return parsed(input)\n return invalidOperation(operationIndex, 'Resource operation options must be an object')\n}\n\nfunction resourceBoolean(\n options: UnknownRecord | undefined,\n key: string,\n operationIndex: number,\n): ParseResult<boolean> {\n if (!options || !hasOwn(options, key)) return parsed(false)\n if (typeof options[key] === 'boolean') return parsed(options[key])\n return invalidOperation(operationIndex, `Resource option ${key} must be a boolean`)\n}\n\nfunction parseTextEdits(\n input: unknown,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operationIndex: number,\n): ParseResult<readonly ParsedWorkspaceTextEdit[]> {\n if (!Array.isArray(input)) {\n return invalidOperation(operationIndex, 'Text document edits must be an array')\n }\n\n const edits: ParsedWorkspaceTextEdit[] = []\n for (let editIndex = 0; editIndex < input.length; editIndex += 1) {\n const edit = parseTextEdit(input[editIndex], annotations, operationIndex, editIndex)\n if (!edit.ok) return edit\n edits.push(edit.value)\n }\n return parsed(Object.freeze(edits))\n}\n\nfunction parseTextEdit(\n input: unknown,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operationIndex: number,\n editIndex: number,\n): ParseResult<ParsedWorkspaceTextEdit> {\n if (!isRecord(input)) {\n return invalidTextEdit(operationIndex, editIndex, 'Text edit must be an object')\n }\n if (hasOwn(input, 'snippet')) {\n return failed('unsupported-snippet', 'Snippet text edits are unsupported', {\n editIndex,\n operationIndex,\n })\n }\n if (typeof input.newText !== 'string') {\n return invalidTextEdit(operationIndex, editIndex, 'Text edit newText must be a string')\n }\n if (!isRecord(input.range)) {\n return invalidPosition(operationIndex, editIndex, 'Text edit range must be an object')\n }\n\n const start = parsePosition(input.range.start, operationIndex, editIndex)\n if (!start.ok) return start\n const end = parsePosition(input.range.end, operationIndex, editIndex)\n if (!end.ok) return end\n const annotationId = parseAnnotationReference(input, annotations, operationIndex, editIndex)\n if (!annotationId.ok) return annotationId\n\n return parsed(\n Object.freeze({\n ...optionalAnnotationId(annotationId.value),\n newText: input.newText,\n range: Object.freeze({ end: end.value, start: start.value }),\n }),\n )\n}\n\nfunction parsePosition(\n input: unknown,\n operationIndex: number,\n editIndex: number,\n): ParseResult<ParsedWorkspacePosition> {\n if (!isRecord(input)) {\n return invalidPosition(operationIndex, editIndex, 'Position must be an object')\n }\n if (!isNonNegativeInteger(input.line) || !isNonNegativeInteger(input.character)) {\n return invalidPosition(\n operationIndex,\n editIndex,\n 'Position line and character must be non-negative integers',\n )\n }\n return parsed(Object.freeze({ character: input.character, line: input.line }))\n}\n\nfunction parseAnnotationReference(\n input: UnknownRecord,\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operationIndex: number,\n editIndex?: number,\n): ParseResult<string | undefined> {\n if (!hasOwn(input, 'annotationId')) return parsed(undefined)\n if (typeof input.annotationId !== 'string') {\n return failed('invalid-annotation', 'annotationId must be a string', {\n editIndex,\n operationIndex,\n })\n }\n if (annotations.has(input.annotationId)) return parsed(input.annotationId)\n return failed('invalid-annotation', `Unknown change annotation ${input.annotationId}`, {\n editIndex,\n operationIndex,\n })\n}\n\nfunction optionalAnnotationId(annotationId: string | undefined): {\n readonly annotationId?: string\n} {\n if (annotationId === undefined) return {}\n return { annotationId }\n}\n\nfunction emptyWorkspaceEdit(): ParseWorkspaceEditResult {\n return workspaceEditResult(new Map(), EMPTY_OPERATIONS)\n}\n\nfunction workspaceEditResult(\n annotations: ReadonlyMap<string, WorkspaceEditAnnotation>,\n operations: readonly WorkspaceEditOperation[],\n): ParseWorkspaceEditResult {\n return parsed(Object.freeze({ annotations, operations }))\n}\n\nfunction invalidWorkspaceEdit(reason: string): ParseWorkspaceEditResult {\n return failed('invalid-workspace-edit', reason)\n}\n\nfunction invalidOperation(operationIndex: number, reason: string): ParseResult<never> {\n return failed('invalid-workspace-edit', reason, { operationIndex })\n}\n\nfunction invalidTextEdit(\n operationIndex: number,\n editIndex: number,\n reason: string,\n): ParseResult<never> {\n return failed('invalid-workspace-edit', reason, { editIndex, operationIndex })\n}\n\nfunction invalidPosition(\n operationIndex: number,\n editIndex: number,\n reason: string,\n): ParseResult<never> {\n return failed('invalid-position', reason, { editIndex, operationIndex })\n}\n\nfunction parsed<T>(value: T): ParseResult<T> {\n return { ok: true, value }\n}\n\nfunction failed(\n code: WorkspaceEditFailureCode,\n reason: string,\n indices: { readonly editIndex?: number; readonly operationIndex?: number } = {},\n): ParseResult<never> {\n return {\n error: Object.freeze({ code, reason, ...definedIndices(indices) }),\n ok: false,\n }\n}\n\nfunction definedIndices(indices: {\n readonly editIndex?: number\n readonly operationIndex?: number\n}): { readonly editIndex?: number; readonly operationIndex?: number } {\n return {\n ...(indices.operationIndex === undefined ? {} : { operationIndex: indices.operationIndex }),\n ...(indices.editIndex === undefined ? {} : { editIndex: indices.editIndex }),\n }\n}\n\nfunction isRecord(value: unknown): value is UnknownRecord {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nfunction hasOwn(value: UnknownRecord, key: string): boolean {\n return Object.prototype.hasOwnProperty.call(value, key)\n}\n\nfunction isNonNegativeInteger(value: unknown): value is number {\n return Number.isInteger(value) && Number(value) >= 0\n}\n\nfunction compareCodeUnits(left: string, right: string): number {\n if (left < right) return -1\n if (left > right) return 1\n return 0\n}\n\nexport { prepareWorkspaceTextReplay } from './workspaceTextEdits'\nexport type {\n PreparedWorkspaceTextEdit,\n PreparedWorkspaceTextSegment,\n PreparedWorkspaceTextStep,\n PrepareWorkspaceTextReplayResult,\n WorkspaceTextDocumentProvenance,\n WorkspaceTextReplayInput,\n WorkspaceTextReplaySegmentInput,\n WorkspaceTextReplayTarget,\n} from './workspaceTextEdits'\n"],"mappings":";;AAkFA,IAAM,mBAAsD,OAAO,OAAO,CAAC,CAAC;AAE5E,SAAgB,mBAAmB,OAA0C;CAC3E,IAAI,UAAU,QAAQ,UAAU,KAAA,GAAW,OAAO,mBAAmB;CACrE,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO,qBAAqB,iCAAiC;CAEnF,MAAM,cAAc,iBAAiB,KAAK;CAC1C,IAAI,CAAC,YAAY,IAAI,OAAO;CAE5B,MAAM,aAAa,OAAO,OAAO,SAAS;CAC1C,MAAM,qBAAqB,OAAO,OAAO,iBAAiB;CAC1D,IAAI,cAAc,oBAChB,OAAO,qBAAqB,+DAA+D;CAE7F,IAAI,oBAAoB,OAAO,qBAAqB,MAAM,iBAAiB,YAAY,KAAK;CAC5F,IAAI,YAAY,OAAO,mBAAmB,MAAM,SAAS,YAAY,KAAK;CAC1E,OAAO,oBAAoB,YAAY,OAAO,gBAAgB;AAChE;AAEA,SAAS,iBACP,OAC2D;CAC3D,IAAI,CAAC,OAAO,OAAO,mBAAmB,GAAG,OAAO,uBAAO,IAAI,IAAI,CAAC;CAChE,IAAI,CAAC,SAAS,MAAM,iBAAiB,GACnC,OAAO,OAAO,sBAAsB,qCAAqC;CAG3E,MAAM,8BAAc,IAAI,IAAqC;CAC7D,KAAK,MAAM,CAAC,IAAI,UAAU,OAAO,QAAQ,MAAM,iBAAiB,GAAG;EACjE,MAAM,aAAa,gBAAgB,KAAK;EACxC,IAAI,CAAC,WAAW,IAAI,OAAO;EAC3B,YAAY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oB;CACpB,OAAO,OAAO,0BAA0B,QAAQ;EAAE;EAAW;CAAe,CAAC;AAC/E;AAEA,SAAS,gBACP,gBACA,WACA,QACoB;CACpB,OAAO,OAAO,oBAAoB,QAAQ;EAAE;EAAW;CAAe,CAAC;AACzE;AAEA,SAAS,OAAU,OAA0B;CAC3C,OAAO;EAAE,IAAI;EAAM;CAAM;AAC3B;AAEA,SAAS,OACP,MACA,QACA,UAA6E,CAAC,GAC1D;CACpB,OAAO;EACL,OAAO,OAAO,OAAO;GAAE;GAAM;GAAQ,GAAG,eAAe,OAAO;EAAE,CAAC;EACjE,IAAI;CACN;AACF;AAEA,SAAS,eAAe,SAG8C;CACpE,OAAO;EACL,GAAI,QAAQ,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,QAAQ,eAAe;EACzF,GAAI,QAAQ,cAAc,KAAA,IAAY,CAAC,IAAI,EAAE,WAAW,QAAQ,UAAU;CAC5E;AACF;AAEA,SAAS,SAAS,OAAwC;CACxD,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,OAAO,OAAsB,KAAsB;CAC1D,OAAO,OAAO,UAAU,eAAe,KAAK,OAAO,GAAG;AACxD;AAEA,SAAS,qBAAqB,OAAiC;CAC7D,OAAO,OAAO,UAAU,KAAK,KAAK,OAAO,KAAK,KAAK;AACrD;AAEA,SAAS,iBAAiB,MAAc,OAAuB;CAC7D,IAAI,OAAO,OAAO,OAAO;CACzB,IAAI,OAAO,OAAO,OAAO;CACzB,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceEditProvenance.js","names":[],"sources":["../src/workspaceEditProvenance.ts"],"sourcesContent":["import type { ActiveDocument } from './pluginTypes'\nimport type { WorkspaceEditOriginGuard, WorkspaceTextDocumentProvenance } from './types'\nimport type { ParsedWorkspaceEdit } from './workspaceEdit'\n\nexport function currentWorkspaceEditOrigin(\n guard: WorkspaceEditOriginGuard,\n active: ActiveDocument,\n plan: ParsedWorkspaceEdit,\n): WorkspaceTextDocumentProvenance | null {\n const origin = guard.documents.find((document) => document.uri === active.uri)\n if (\n !origin ||\n origin.sourceRevision !== active.sourceRevision ||\n origin.sourceSegment !== active.sourceSegment\n )\n return null\n if (!guard.isCurrent(active.uri)) return null\n\n const affectedUris = new Set(\n plan.operations.flatMap((operation) =>\n operation.kind === 'rename' ? [operation.oldUri, operation.newUri] : [operation.uri],\n ),\n )\n for (const document of guard.documents) {\n if (!affectedUris.has(document.uri)) continue\n if (!guard.isCurrent(document.uri)) return null\n }\n return origin\n}\n"],"mappings":";AAIA,SAAgB,2BACd,OACA,QACA,MACwC;CACxC,MAAM,SAAS,MAAM,UAAU,MAAM,aAAa,SAAS,QAAQ,OAAO,GAAG;CAC7E,IACE,CAAC,UACD,OAAO,mBAAmB,OAAO,kBACjC,OAAO,kBAAkB,OAAO,eAEhC,OAAO;CACT,IAAI,CAAC,MAAM,UAAU,OAAO,GAAG,GAAG,OAAO;CAEzC,MAAM,eAAe,IAAI,IACvB,KAAK,WAAW,SAAS,cACvB,UAAU,SAAS,WAAW,CAAC,UAAU,QAAQ,UAAU,MAAM,IAAI,CAAC,UAAU,GAAG,CACrF,CACF;CACA,KAAK,MAAM,YAAY,MAAM,WAAW;EACtC,IAAI,CAAC,aAAa,IAAI,SAAS,GAAG,GAAG;EACrC,IAAI,CAAC,MAAM,UAAU,SAAS,GAAG,GAAG,OAAO;CAC7C;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"workspaceEditProvenance.js","names":[],"sources":["../src/workspaceEditProvenance.ts"],"mappings":";AAIA,SAAgB,2BACd,OACA,QACA,MACwC;CACxC,MAAM,SAAS,MAAM,UAAU,MAAM,aAAa,SAAS,QAAQ,OAAO,GAAG;CAC7E,IACE,CAAC,UACD,OAAO,mBAAmB,OAAO,kBACjC,OAAO,kBAAkB,OAAO,eAEhC,OAAO;CACT,IAAI,CAAC,MAAM,UAAU,OAAO,GAAG,GAAG,OAAO;CAEzC,MAAM,eAAe,IAAI,IACvB,KAAK,WAAW,SAAS,cACvB,UAAU,SAAS,WAAW,CAAC,UAAU,QAAQ,UAAU,MAAM,IAAI,CAAC,UAAU,GAAG,CACrF,CACF;CACA,KAAK,MAAM,YAAY,MAAM,WAAW;EACtC,IAAI,CAAC,aAAa,IAAI,SAAS,GAAG,GAAG;EACrC,IAAI,CAAC,MAAM,UAAU,SAAS,GAAG,GAAG,OAAO;CAC7C;CACA,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceTextEdits.js","names":[],"sources":["../src/workspaceTextEdits.ts"],"sourcesContent":["import {\n applyBatchToPieceTable,\n createDocumentTextSnapshot,\n diffPieceTableSnapshots,\n offsetToPoint,\n pieceTableSnapshotsHaveSameText,\n pointToOffset,\n prepareDocumentTransactionSequence,\n readPieceTableTextRange,\n} from '@singapore-editor/core/document'\nimport type {\n DocumentLogicalRevisionScope,\n DocumentSyncPoint,\n DocumentTextSnapshot,\n EditorTextBuffer,\n PieceTableSnapshot,\n PreparedDocumentTransactionSequence,\n TextEdit,\n TextSnapshot,\n} from '@singapore-editor/core/document'\n\nimport type { LspTextSnapshot } from '@singapore-editor/lsp'\n\nimport type {\n ParsedWorkspacePosition,\n ParsedWorkspaceTextEdit,\n WorkspaceEditFailure,\n WorkspaceEditFailureCode,\n WorkspaceEditOperation,\n} from './workspaceEdit'\n\nexport type WorkspaceTextDocumentProvenance = {\n readonly textSnapshot: LspTextSnapshot\n readonly uri: string\n readonly version: number\n readonly sourceRevision: number\n readonly sourceSegment: object\n}\n\nexport type WorkspaceTextReplaySegmentInput = {\n readonly operations: readonly {\n readonly operation: Extract<WorkspaceEditOperation, { kind: 'text-document' }>\n readonly operationIndex: number\n }[]\n readonly segmentIndex: number\n readonly uri: string\n}\n\nexport type WorkspaceTextReplayTarget = {\n readonly buffer: EditorTextBuffer\n readonly expectedRevision: number\n readonly initialSnapshot: DocumentTextSnapshot\n readonly initialSyncPoint: DocumentSyncPoint\n}\n\nexport type WorkspaceTextReplayInput = {\n readonly logicalRevisionScope: DocumentLogicalRevisionScope\n readonly provenance: readonly WorkspaceTextDocumentProvenance[]\n readonly segments: readonly WorkspaceTextReplaySegmentInput[]\n readonly target: WorkspaceTextReplayTarget\n}\n\nexport type PreparedWorkspaceTextEdit = TextEdit & {\n readonly annotationId?: string\n}\n\nexport type PreparedWorkspaceTextStep = {\n readonly edits: readonly PreparedWorkspaceTextEdit[]\n readonly operationIndex: number\n readonly snapshotAfter: PieceTableSnapshot\n readonly snapshotBefore: PieceTableSnapshot\n readonly uri: string\n}\n\nexport type PreparedWorkspaceTextSegment = {\n readonly logicalRevisionCount: number\n readonly segmentIndex: number\n readonly sequenceSegmentIndex: number | null\n readonly simulatedVersionAfter: number | null\n readonly simulatedVersionBefore: number | null\n readonly snapshotAfter: PieceTableSnapshot\n readonly snapshotBefore: PieceTableSnapshot\n readonly steps: readonly PreparedWorkspaceTextStep[]\n readonly uri: string\n}\n\nexport type PrepareWorkspaceTextReplayResult =\n | {\n readonly ok: true\n readonly segments: readonly PreparedWorkspaceTextSegment[]\n readonly sequence: PreparedDocumentTransactionSequence | null\n }\n | { readonly error: WorkspaceEditFailure; readonly ok: false }\n\ntype ReplayState = {\n snapshot: PieceTableSnapshot\n textSnapshot: TextSnapshot\n uri: string | null\n version: number | null\n versionUri: string | null\n sourcePoint: Pick<DocumentSyncPoint, 'revision' | 'segment'> | null\n}\n\ntype SimulatedWorkspaceTextSegment = Omit<PreparedWorkspaceTextSegment, 'sequenceSegmentIndex'>\n\ntype SimulateSegmentResult =\n | { readonly ok: true; readonly segment: SimulatedWorkspaceTextSegment }\n | { readonly error: WorkspaceEditFailure; readonly ok: false }\n\ntype SimulateStepResult =\n | {\n readonly effective: boolean\n readonly ok: true\n readonly step: PreparedWorkspaceTextStep\n }\n | { readonly error: WorkspaceEditFailure; readonly ok: false }\n\ntype ConvertedWorkspaceTextBatch = {\n readonly applicationEdits: readonly TextEdit[]\n readonly preparedEdits: readonly PreparedWorkspaceTextEdit[]\n}\n\ntype ConvertWorkspaceTextBatchResult =\n | { readonly ok: true; readonly value: ConvertedWorkspaceTextBatch }\n | { readonly error: WorkspaceEditFailure; readonly ok: false }\n\ntype SnapPreparedTextEditsResult =\n | { readonly ok: true; readonly value: readonly PreparedWorkspaceTextEdit[] }\n | { readonly error: WorkspaceEditFailure; readonly ok: false }\n\ntype IndexedPreparedWorkspaceTextEdit = {\n readonly edit: PreparedWorkspaceTextEdit\n readonly editIndex: number\n}\n\ntype BoundaryCounts = {\n readonly ends: ReadonlyMap<number, number>\n readonly starts: ReadonlyMap<number, number>\n}\n\nexport function prepareWorkspaceTextReplay(\n input: WorkspaceTextReplayInput,\n): PrepareWorkspaceTextReplayResult {\n const targetFailure = targetGuardFailure(input.target)\n if (targetFailure) return { error: targetFailure, ok: false }\n\n const state = initialReplayState(input)\n const simulated: SimulatedWorkspaceTextSegment[] = []\n for (const segment of input.segments) {\n const result = simulateSegment(input, state, segment)\n if (!result.ok) return result\n simulated.push(result.segment)\n }\n\n const effective = simulated.filter((segment) => segment.logicalRevisionCount > 0)\n if (effective.length === 0) {\n return {\n ok: true,\n segments: bindNoOpSegments(simulated, input.target.initialSnapshot.snapshot),\n sequence: null,\n }\n }\n\n const sequence = prepareDocumentTransactionSequence(\n input.target.buffer,\n effective.map((segment) => sequenceInput(input.logicalRevisionScope, segment)),\n )\n if (!sequenceMatchesTarget(sequence, input.target)) {\n return replayFailed('snapshot-drift', 'Target buffer changed before replay was bound')\n }\n\n return {\n ok: true,\n segments: bindPreparedSegments(simulated, sequence),\n sequence,\n }\n}\n\nfunction targetGuardFailure(target: WorkspaceTextReplayTarget): WorkspaceEditFailure | null {\n if (target.buffer.getRevision() !== target.expectedRevision) {\n return failure('snapshot-drift', 'Target buffer revision does not match the replay guard')\n }\n if (target.buffer.getSnapshot() !== target.initialSnapshot.snapshot) {\n return failure('snapshot-drift', 'Target buffer snapshot does not match the replay guard')\n }\n const point = target.buffer.getDocumentSyncPoint()\n const captured = target.initialSyncPoint\n if (\n point.segment !== captured.segment ||\n point.revision !== captured.revision ||\n point.textVersion !== captured.textVersion\n ) {\n return failure('snapshot-drift', 'Target source point does not match the replay guard')\n }\n return null\n}\n\nfunction initialReplayState(input: WorkspaceTextReplayInput): ReplayState {\n const uri = input.segments[0]?.uri ?? null\n const provenance = uri\n ? exactProvenance(input.provenance, uri, input.target.initialSyncPoint)\n : null\n const version = validProvenanceVersion(provenance) ? provenance.version : null\n return {\n snapshot: input.target.initialSnapshot.snapshot,\n textSnapshot: input.target.initialSnapshot,\n uri,\n version,\n versionUri: version === null ? null : uri,\n sourcePoint: input.target.initialSyncPoint,\n }\n}\n\nfunction simulateSegment(\n input: WorkspaceTextReplayInput,\n state: ReplayState,\n segment: WorkspaceTextReplaySegmentInput,\n): SimulateSegmentResult {\n enterSegmentUri(input.provenance, state, segment.uri)\n const snapshotBefore = state.snapshot\n const textSnapshotBefore = state.textSnapshot\n const sourcePointBefore = state.sourcePoint\n const simulatedVersionBefore = state.version\n const steps: PreparedWorkspaceTextStep[] = []\n let logicalRevisionCount = 0\n\n for (const entry of segment.operations) {\n const result = simulateStep(input.provenance, state, segment, entry)\n if (!result.ok) return result\n if (result.effective) logicalRevisionCount += 1\n steps.push(result.step)\n }\n\n canonicalizeSegmentSnapshot(state, steps, snapshotBefore, textSnapshotBefore, sourcePointBefore)\n return {\n ok: true,\n segment: Object.freeze({\n logicalRevisionCount,\n segmentIndex: segment.segmentIndex,\n simulatedVersionAfter: state.version,\n simulatedVersionBefore,\n snapshotAfter: state.snapshot,\n snapshotBefore,\n steps: Object.freeze(steps),\n uri: segment.uri,\n }),\n }\n}\n\nfunction enterSegmentUri(\n provenance: readonly WorkspaceTextDocumentProvenance[],\n state: ReplayState,\n uri: string,\n): void {\n if (state.uri === uri) return\n state.uri = uri\n state.versionUri = null\n\n const mapped = exactProvenance(provenance, uri, state.sourcePoint)\n if (!validProvenanceVersion(mapped)) return\n if (state.version !== null && state.version !== mapped.version) return\n state.version = mapped.version\n state.versionUri = uri\n}\n\nfunction simulateStep(\n provenance: readonly WorkspaceTextDocumentProvenance[],\n state: ReplayState,\n segment: WorkspaceTextReplaySegmentInput,\n entry: WorkspaceTextReplaySegmentInput['operations'][number],\n): SimulateStepResult {\n if (entry.operation.uri !== segment.uri) {\n return replayFailed(\n 'invalid-workspace-edit',\n 'Text operation URI does not match its replay segment',\n entry.operationIndex,\n )\n }\n\n const versionFailure = validateOperationVersion(provenance, state, entry)\n if (versionFailure) return { error: versionFailure, ok: false }\n const converted = convertWorkspaceTextBatch(\n state.snapshot,\n entry.operation.edits,\n entry.operationIndex,\n )\n if (!converted.ok) return converted\n\n const snapshotBefore = state.snapshot\n const candidate = applyBatchToPieceTable(snapshotBefore, converted.value.applicationEdits)\n const effective = !pieceTableSnapshotsHaveSameText(snapshotBefore, candidate)\n state.snapshot = effective ? candidate : snapshotBefore\n if (effective) {\n state.textSnapshot = createDocumentTextSnapshot(state.snapshot)\n state.sourcePoint = null\n }\n\n const versionAdvanceFailure = advanceSimulatedVersion(state, effective, entry.operationIndex)\n if (versionAdvanceFailure) return { error: versionAdvanceFailure, ok: false }\n return {\n effective,\n ok: true,\n step: Object.freeze({\n edits: converted.value.preparedEdits,\n operationIndex: entry.operationIndex,\n snapshotAfter: state.snapshot,\n snapshotBefore,\n uri: segment.uri,\n }),\n }\n}\n\nfunction validateOperationVersion(\n provenance: readonly WorkspaceTextDocumentProvenance[],\n state: ReplayState,\n entry: WorkspaceTextReplaySegmentInput['operations'][number],\n): WorkspaceEditFailure | null {\n const declared = entry.operation.version\n if (declared === null) return null\n if (!Number.isSafeInteger(declared)) {\n return failure('version-mismatch', 'Text document version must be a safe integer', {\n operationIndex: entry.operationIndex,\n })\n }\n\n const lineageFailure = establishVersionLineage(provenance, state, entry)\n if (lineageFailure) return lineageFailure\n if (state.version === declared) return null\n return failure('version-mismatch', 'Text document version does not match replay provenance', {\n operationIndex: entry.operationIndex,\n })\n}\n\nfunction establishVersionLineage(\n provenance: readonly WorkspaceTextDocumentProvenance[],\n state: ReplayState,\n entry: WorkspaceTextReplaySegmentInput['operations'][number],\n): WorkspaceEditFailure | null {\n if (state.versionUri === entry.operation.uri && state.version !== null) return null\n\n const mapped = exactProvenance(provenance, entry.operation.uri, state.sourcePoint)\n if (!validProvenanceVersion(mapped)) {\n return failure('version-mismatch', 'No exact lane provenance exists for this text snapshot', {\n operationIndex: entry.operationIndex,\n })\n }\n if (state.version !== null && state.version !== mapped.version) {\n return failure('version-mismatch', 'URI provenance does not continue the simulated version', {\n operationIndex: entry.operationIndex,\n })\n }\n\n state.version = mapped.version\n state.versionUri = entry.operation.uri\n return null\n}\n\nfunction advanceSimulatedVersion(\n state: ReplayState,\n effective: boolean,\n operationIndex: number,\n): WorkspaceEditFailure | null {\n if (!effective || state.version === null) return null\n if (!Number.isSafeInteger(state.version + 1)) {\n return failure('version-mismatch', 'Simulated text document version overflowed', {\n operationIndex,\n })\n }\n state.version += 1\n return null\n}\n\nfunction convertWorkspaceTextBatch(\n snapshot: PieceTableSnapshot,\n edits: readonly ParsedWorkspaceTextEdit[],\n operationIndex: number,\n): ConvertWorkspaceTextBatchResult {\n const converted: IndexedPreparedWorkspaceTextEdit[] = []\n for (let editIndex = 0; editIndex < edits.length; editIndex += 1) {\n const result = convertWorkspaceTextEdit(snapshot, edits[editIndex]!, operationIndex, editIndex)\n if (!result.ok) return result\n converted.push({ edit: result.value, editIndex })\n }\n\n const sorted = converted.sort(compareIndexedEdits)\n const conflict = textBatchConflict(sorted, operationIndex)\n if (conflict) return { error: conflict, ok: false }\n\n const effective = sorted.filter(({ edit }) => edit.from !== edit.to || edit.text.length > 0)\n const snapped = snapPreparedTextEdits(snapshot, effective, operationIndex)\n if (!snapped.ok) return snapped\n\n return {\n ok: true,\n value: Object.freeze({\n applicationEdits: Object.freeze(snapped.value.map(textEditWithoutAnnotation)),\n preparedEdits: snapped.value,\n }),\n }\n}\n\nfunction convertWorkspaceTextEdit(\n snapshot: PieceTableSnapshot,\n edit: ParsedWorkspaceTextEdit,\n operationIndex: number,\n editIndex: number,\n):\n | { readonly ok: true; readonly value: PreparedWorkspaceTextEdit }\n | { readonly error: WorkspaceEditFailure; readonly ok: false } {\n const from = strictPositionOffset(snapshot, edit.range.start)\n if (from === null) return invalidPosition(operationIndex, editIndex, 'Invalid range start')\n const to = strictPositionOffset(snapshot, edit.range.end)\n if (to === null) return invalidPosition(operationIndex, editIndex, 'Invalid range end')\n if (from > to) {\n return replayFailed('reversed-range', 'Text edit range is reversed', operationIndex, editIndex)\n }\n\n return {\n ok: true,\n value: Object.freeze({\n ...(edit.annotationId === undefined ? {} : { annotationId: edit.annotationId }),\n from,\n text: normalizeInsertedText(edit.newText),\n to,\n }),\n }\n}\n\nfunction strictPositionOffset(\n snapshot: PieceTableSnapshot,\n position: ParsedWorkspacePosition,\n): number | null {\n if (!Number.isInteger(position.line) || position.line < 0) return null\n if (!Number.isInteger(position.character) || position.character < 0) return null\n\n const offset = pointToOffset(snapshot, { column: position.character, row: position.line })\n const roundTrip = offsetToPoint(snapshot, offset)\n if (roundTrip.row !== position.line || roundTrip.column !== position.character) return null\n return offset\n}\n\nfunction textBatchConflict(\n edits: readonly IndexedPreparedWorkspaceTextEdit[],\n operationIndex: number,\n): WorkspaceEditFailure | null {\n let previous: IndexedPreparedWorkspaceTextEdit | null = null\n for (const current of edits) {\n const conflict = conflictWithPrevious(previous, current, operationIndex)\n if (conflict) return conflict\n if (!previous || current.edit.to > previous.edit.to) previous = current\n }\n return null\n}\n\nfunction conflictWithPrevious(\n previous: IndexedPreparedWorkspaceTextEdit | null,\n current: IndexedPreparedWorkspaceTextEdit,\n operationIndex: number,\n): WorkspaceEditFailure | null {\n if (!previous) return null\n const previousIsInsert = previous.edit.from === previous.edit.to\n const currentIsInsert = current.edit.from === current.edit.to\n if (previousIsInsert && currentIsInsert && previous.edit.from === current.edit.from) {\n return failure('ambiguous-inserts', 'Coincident inserts have no defined protocol order', {\n editIndex: current.editIndex,\n operationIndex,\n })\n }\n if (current.edit.from >= previous.edit.to) return null\n return failure('overlapping-edits', 'Text edit ranges overlap', {\n editIndex: current.editIndex,\n operationIndex,\n })\n}\n\nfunction snapPreparedTextEdits(\n snapshot: PieceTableSnapshot,\n edits: readonly IndexedPreparedWorkspaceTextEdit[],\n operationIndex: number,\n): SnapPreparedTextEditsResult {\n const boundaries = batchBoundaryCounts(edits)\n const snapped = edits.map(({ edit, editIndex }) => ({\n edit: snapPreparedTextEdit(snapshot, edit, boundaries),\n editIndex,\n }))\n return mergeSnappedPreparedTextEdits(snapped, operationIndex)\n}\n\nfunction mergeSnappedPreparedTextEdits(\n edits: readonly IndexedPreparedWorkspaceTextEdit[],\n operationIndex: number,\n): SnapPreparedTextEditsResult {\n const merged: PreparedWorkspaceTextEdit[] = []\n for (const current of edits) {\n const previous = merged.at(-1)\n if (!previous || current.edit.from >= previous.to) {\n merged.push(current.edit)\n continue\n }\n if (previous.annotationId !== current.edit.annotationId) {\n return replayFailed(\n 'overlapping-edits',\n 'Surrogate snapping cannot merge edits with different annotation ids',\n operationIndex,\n current.editIndex,\n )\n }\n\n merged[merged.length - 1] = Object.freeze({\n ...(previous.annotationId === undefined ? {} : { annotationId: previous.annotationId }),\n from: previous.from,\n text: previous.text + current.edit.text,\n to: Math.max(previous.to, current.edit.to),\n })\n }\n return { ok: true, value: Object.freeze(merged) }\n}\n\nfunction snapPreparedTextEdit(\n snapshot: PieceTableSnapshot,\n edit: PreparedWorkspaceTextEdit,\n boundaries: BoundaryCounts,\n): PreparedWorkspaceTextEdit {\n const snapStart = orphansSurrogateAtStart(snapshot, edit, boundaries)\n const snapEnd = orphansSurrogateAtEnd(snapshot, edit, boundaries)\n if (!snapStart && !snapEnd) return edit\n\n const collapsed = edit.from === edit.to\n let from = edit.from\n let to = edit.to\n if (collapsed || snapStart) from -= 1\n if (collapsed) to -= 1\n if (!collapsed && snapEnd) to += 1\n return Object.freeze({ ...edit, from, to })\n}\n\nfunction orphansSurrogateAtStart(\n snapshot: PieceTableSnapshot,\n edit: PreparedWorkspaceTextEdit,\n boundaries: BoundaryCounts,\n): boolean {\n if (!splitsSurrogatePair(snapshot, edit.from)) return false\n if ((boundaries.ends.get(edit.from) ?? 0) > 0) return false\n return !isLowSurrogate(edit.text.charCodeAt(0))\n}\n\nfunction orphansSurrogateAtEnd(\n snapshot: PieceTableSnapshot,\n edit: PreparedWorkspaceTextEdit,\n boundaries: BoundaryCounts,\n): boolean {\n if (!splitsSurrogatePair(snapshot, edit.to)) return false\n if ((boundaries.starts.get(edit.to) ?? 0) > 0) return false\n return !isHighSurrogate(edit.text.charCodeAt(edit.text.length - 1))\n}\n\nfunction splitsSurrogatePair(snapshot: PieceTableSnapshot, offset: number): boolean {\n if (offset <= 0 || offset >= snapshot.length) return false\n const pair = readPieceTableTextRange(snapshot, offset - 1, offset + 1)\n return isHighSurrogate(pair.charCodeAt(0)) && isLowSurrogate(pair.charCodeAt(1))\n}\n\nfunction batchBoundaryCounts(edits: readonly IndexedPreparedWorkspaceTextEdit[]): BoundaryCounts {\n const starts = new Map<number, number>()\n const ends = new Map<number, number>()\n for (const { edit } of edits) {\n if (edit.from === edit.to) continue\n starts.set(edit.from, (starts.get(edit.from) ?? 0) + 1)\n ends.set(edit.to, (ends.get(edit.to) ?? 0) + 1)\n }\n return { ends, starts }\n}\n\nfunction canonicalizeSegmentSnapshot(\n state: ReplayState,\n steps: PreparedWorkspaceTextStep[],\n snapshotBefore: PieceTableSnapshot,\n textSnapshotBefore: TextSnapshot,\n sourcePointBefore: ReplayState['sourcePoint'],\n): void {\n if (!pieceTableSnapshotsHaveSameText(snapshotBefore, state.snapshot)) return\n state.snapshot = snapshotBefore\n state.textSnapshot = textSnapshotBefore\n state.sourcePoint = sourcePointBefore\n\n const last = steps.at(-1)\n if (!last) return\n steps[steps.length - 1] = Object.freeze({ ...last, snapshotAfter: snapshotBefore })\n}\n\nfunction sequenceInput(\n logicalRevisionScope: DocumentLogicalRevisionScope,\n segment: SimulatedWorkspaceTextSegment,\n) {\n const edit = diffPieceTableSnapshots(segment.snapshotBefore, segment.snapshotAfter)\n return {\n edits: edit ? [edit] : [],\n logicalRevisionCount: segment.logicalRevisionCount,\n logicalRevisionScope,\n }\n}\n\nfunction sequenceMatchesTarget(\n sequence: PreparedDocumentTransactionSequence,\n target: WorkspaceTextReplayTarget,\n): boolean {\n return (\n sequence.expectedRevision === target.expectedRevision &&\n sequence.snapshotBefore === target.initialSnapshot.snapshot\n )\n}\n\nfunction bindNoOpSegments(\n simulated: readonly SimulatedWorkspaceTextSegment[],\n snapshot: PieceTableSnapshot,\n): readonly PreparedWorkspaceTextSegment[] {\n return Object.freeze(simulated.map((segment) => bindSegment(segment, null, snapshot, snapshot)))\n}\n\nfunction bindPreparedSegments(\n simulated: readonly SimulatedWorkspaceTextSegment[],\n sequence: PreparedDocumentTransactionSequence,\n): readonly PreparedWorkspaceTextSegment[] {\n const bound: PreparedWorkspaceTextSegment[] = []\n let sequenceSegmentIndex = 0\n let snapshot = sequence.snapshotBefore\n for (const segment of simulated) {\n if (segment.logicalRevisionCount === 0) {\n bound.push(bindSegment(segment, null, snapshot, snapshot))\n continue\n }\n\n const prepared = sequence.segments[sequenceSegmentIndex]!\n bound.push(\n bindSegment(segment, sequenceSegmentIndex, prepared.snapshotBefore, prepared.snapshotAfter),\n )\n snapshot = prepared.snapshotAfter\n sequenceSegmentIndex += 1\n }\n return Object.freeze(bound)\n}\n\nfunction bindSegment(\n segment: SimulatedWorkspaceTextSegment,\n sequenceSegmentIndex: number | null,\n snapshotBefore: PieceTableSnapshot,\n snapshotAfter: PieceTableSnapshot,\n): PreparedWorkspaceTextSegment {\n return Object.freeze({\n ...segment,\n sequenceSegmentIndex,\n snapshotAfter,\n snapshotBefore,\n steps: bindStepBoundaries(segment.steps, snapshotBefore, snapshotAfter),\n })\n}\n\nfunction bindStepBoundaries(\n steps: readonly PreparedWorkspaceTextStep[],\n snapshotBefore: PieceTableSnapshot,\n snapshotAfter: PieceTableSnapshot,\n): readonly PreparedWorkspaceTextStep[] {\n if (steps.length === 0) return steps\n const lastIndex = steps.length - 1\n return Object.freeze(\n steps.map((step, index) =>\n Object.freeze({\n ...step,\n snapshotAfter: index === lastIndex ? snapshotAfter : step.snapshotAfter,\n snapshotBefore: index === 0 ? snapshotBefore : step.snapshotBefore,\n }),\n ),\n )\n}\n\nfunction exactProvenance(\n provenance: readonly WorkspaceTextDocumentProvenance[],\n uri: string,\n point: ReplayState['sourcePoint'],\n): WorkspaceTextDocumentProvenance | null {\n if (!point) return null\n return (\n provenance.find(\n (entry) =>\n entry.uri === uri &&\n entry.sourceRevision === point.revision &&\n entry.sourceSegment === point.segment,\n ) ?? null\n )\n}\n\nfunction validProvenanceVersion(\n provenance: WorkspaceTextDocumentProvenance | null,\n): provenance is WorkspaceTextDocumentProvenance {\n return provenance !== null && Number.isSafeInteger(provenance.version)\n}\n\nfunction textEditWithoutAnnotation(edit: PreparedWorkspaceTextEdit): TextEdit {\n return Object.freeze({ from: edit.from, text: edit.text, to: edit.to })\n}\n\nfunction compareIndexedEdits(\n left: IndexedPreparedWorkspaceTextEdit,\n right: IndexedPreparedWorkspaceTextEdit,\n): number {\n return left.edit.from - right.edit.from || left.edit.to - right.edit.to\n}\n\nfunction normalizeInsertedText(text: string): string {\n return /[\\r\\u2028\\u2029]/.test(text) ? text.replace(/\\r\\n|[\\r\\u2028\\u2029]/g, '\\n') : text\n}\n\nfunction isHighSurrogate(code: number): boolean {\n return code >= 0xd800 && code <= 0xdbff\n}\n\nfunction isLowSurrogate(code: number): boolean {\n return code >= 0xdc00 && code <= 0xdfff\n}\n\nfunction invalidPosition(\n operationIndex: number,\n editIndex: number,\n reason: string,\n): { readonly error: WorkspaceEditFailure; readonly ok: false } {\n return replayFailed('invalid-position', reason, operationIndex, editIndex)\n}\n\nfunction replayFailed(\n code: WorkspaceEditFailureCode,\n reason: string,\n operationIndex?: number,\n editIndex?: number,\n): { readonly error: WorkspaceEditFailure; readonly ok: false } {\n return {\n error: failure(code, reason, { editIndex, operationIndex }),\n ok: false,\n }\n}\n\nfunction failure(\n code: WorkspaceEditFailureCode,\n reason: string,\n indices: { readonly editIndex?: number; readonly operationIndex?: number } = {},\n): WorkspaceEditFailure {\n return Object.freeze({\n code,\n reason,\n ...(indices.operationIndex === undefined ? {} : { operationIndex: indices.operationIndex }),\n ...(indices.editIndex === undefined ? {} : { editIndex: indices.editIndex }),\n })\n}\n"],"mappings":";;AA4IA,SAAgB,2BACd,OACkC;CAClC,MAAM,gBAAgB,mBAAmB,MAAM,MAAM;CACrD,IAAI,eAAe,OAAO;EAAE,OAAO;EAAe,IAAI;CAAM;CAE5D,MAAM,QAAQ,mBAAmB,KAAK;CACtC,MAAM,YAA6C,CAAC;CACpD,KAAK,MAAM,WAAW,MAAM,UAAU;EACpC,MAAM,SAAS,gBAAgB,OAAO,OAAO,OAAO;EACpD,IAAI,CAAC,OAAO,IAAI,OAAO;EACvB,UAAU,KAAK,OAAO,OAAO;CAC/B;CAEA,MAAM,YAAY,UAAU,QAAQ,YAAY,QAAQ,uBAAuB,CAAC;CAChF,IAAI,UAAU,WAAW,GACvB,OAAO;EACL,IAAI;EACJ,UAAU,iBAAiB,WAAW,MAAM,OAAO,gBAAgB,QAAQ;EAC3E,UAAU;CACZ;CAGF,MAAM,WAAW,mCACf,MAAM,OAAO,QACb,UAAU,KAAK,YAAY,cAAc,MAAM,sBAAsB,OAAO,CAAC,CAC/E;CACA,IAAI,CAAC,sBAAsB,UAAU,MAAM,MAAM,GAC/C,OAAO,aAAa,kBAAkB,+CAA+C;CAGvF,OAAO;EACL,IAAI;EACJ,UAAU,qBAAqB,WAAW,QAAQ;EAClD;CACF;AACF;AAEA,SAAS,mBAAmB,QAAgE;CAC1F,IAAI,OAAO,OAAO,YAAY,MAAM,OAAO,kBACzC,OAAO,QAAQ,kBAAkB,wDAAwD;CAE3F,IAAI,OAAO,OAAO,YAAY,MAAM,OAAO,gBAAgB,UACzD,OA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L,OAAO,QAAQ,MAAM,QAAQ;GAAE;GAAW;EAAe,CAAC;EAC1D,IAAI;CACN;AACF;AAEA,SAAS,QACP,MACA,QACA,UAA6E,CAAC,GACxD;CACtB,OAAO,OAAO,OAAO;EACnB;EACA;EACA,GAAI,QAAQ,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,QAAQ,eAAe;EACzF,GAAI,QAAQ,cAAc,KAAA,IAAY,CAAC,IAAI,EAAE,WAAW,QAAQ,UAAU;CAC5E,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singapore-editor/lsp-plugin",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "Language server diagnostics, completion, hover, and navigation for the Singapore editor.",
5
5
  "keywords": [
6
6
  "browser",
@@ -116,14 +116,14 @@
116
116
  "format:check": "oxfmt --check ."
117
117
  },
118
118
  "dependencies": {
119
- "@singapore-editor/lsp": "0.2.10",
120
- "@singapore-editor/plugin-ui": "0.2.12",
119
+ "@singapore-editor/lsp": "0.2.12",
120
+ "@singapore-editor/plugin-ui": "0.2.13",
121
121
  "vscode-languageserver-protocol": "^3.18.4"
122
122
  },
123
123
  "devDependencies": {
124
- "@singapore-editor/core": "0.2.12",
125
- "@singapore-editor/find": "0.2.12",
126
- "@singapore-editor/scope-lines": "0.2.12",
124
+ "@singapore-editor/core": "0.2.13",
125
+ "@singapore-editor/find": "0.2.13",
126
+ "@singapore-editor/scope-lines": "0.2.13",
127
127
  "happy-dom": "^20.14.5",
128
128
  "oxfmt": "0.70.0",
129
129
  "oxlint": "1.85.0",
@@ -131,6 +131,6 @@
131
131
  "vitest": "5.0.2"
132
132
  },
133
133
  "peerDependencies": {
134
- "@singapore-editor/core": "0.2.12"
134
+ "@singapore-editor/core": "0.2.13"
135
135
  }
136
136
  }