-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retain changesets in StateField (#31)
- Loading branch information
Showing
4 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
import { type ChangeSet, StateEffect } from "@codemirror/state"; | ||
import type { SimpleChangeSpec } from "./types.js"; | ||
import { StateEffect } from "@codemirror/state"; | ||
import type { AddSuggestionsState } from "./types.js"; | ||
|
||
// Effects to tell StateEffect what to do with GhostText | ||
export const addSuggestions = StateEffect.define<{ | ||
reverseChangeSet: ChangeSet; | ||
suggestions: SimpleChangeSpec[]; | ||
}>(); | ||
export const addSuggestions = StateEffect.define<AddSuggestionsState>(); | ||
export const acceptSuggestion = StateEffect.define<null>(); | ||
export const clearSuggestion = StateEffect.define<null>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters