From cc7d6b1f5f7920432663247b7884b10102e36b78 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Sat, 27 Jun 2026 23:08:02 +0200 Subject: [PATCH] Drop RangeSelector from the lexicon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lexicon has no startSelector/endSelector fields nor the backend APISelector structs, so a RangeSelector could not survive a hydration round-trip — the field would be silently dropped. Nothing produces or consumes it, so remove it until the contract can preserve it. --- lexicons/at/margin/note.json | 3 +-- web/src/types.ts | 9 +-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lexicons/at/margin/note.json b/lexicons/at/margin/note.json index 8621857..c6dcf7a 100644 --- a/lexicons/at/margin/note.json +++ b/lexicons/at/margin/note.json @@ -171,8 +171,7 @@ "TextPositionSelector", "CssSelector", "XPathSelector", - "FragmentSelector", - "RangeSelector" + "FragmentSelector" ] }, "exact": { diff --git a/web/src/types.ts b/web/src/types.ts index c4e9edc..f71d60c 100644 --- a/web/src/types.ts +++ b/web/src/types.ts @@ -47,19 +47,12 @@ export interface XPathSelector extends BaseSelector { value: string; } -export interface RangeSelector extends BaseSelector { - type: "RangeSelector"; - startSelector: Selector; - endSelector: Selector; -} - export type Selector = | TextQuoteSelector | TextPositionSelector | FragmentSelector | CssSelector - | XPathSelector - | RangeSelector; + | XPathSelector; /** Narrows a selector to a TextQuoteSelector if possible, for reading quote text. */ export function asTextQuote( -- 2.51.2