Skip to content

Commit 47036d1

Browse files
Merge with main
1 parent eaab731 commit 47036d1

File tree

7 files changed

+4836
-4839
lines changed

7 files changed

+4836
-4839
lines changed

packages/cursorless-org-docs/src/docs/user/languages/components/ScopeSupport.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import {
22
ScopeSupportFacetLevel,
33
languageScopeSupport,
4+
plaintextScopeSupportFacetInfos,
45
scopeSupportFacetInfos,
56
scopeSupportFacets,
6-
textualScopeSupportFacetInfos,
7+
type PlaintextScopeSupportFacet,
78
type ScopeSupportFacet,
8-
type TextualScopeSupportFacet,
99
} from "@cursorless/common";
1010
import * as React from "react";
1111
import {
@@ -19,14 +19,14 @@ interface Props {
1919

2020
function getSupport(languageId: string): FacetWrapper[] {
2121
if (languageId === "plaintext") {
22-
return Object.keys(textualScopeSupportFacetInfos)
22+
return Object.keys(plaintextScopeSupportFacetInfos)
2323
.sort()
2424
.map((f) => {
25-
const facet = f as TextualScopeSupportFacet;
25+
const facet = f as PlaintextScopeSupportFacet;
2626
return {
2727
facet,
2828
supportLevel: ScopeSupportFacetLevel.supported,
29-
info: textualScopeSupportFacetInfos[facet],
29+
info: plaintextScopeSupportFacetInfos[facet],
3030
};
3131
});
3232
}

packages/cursorless-org-docs/src/docs/user/languages/components/ScopeSupportForLevel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import {
22
groupBy,
33
serializeScopeType,
4+
type PlaintextScopeSupportFacet,
45
type ScopeSupportFacet,
56
type ScopeSupportFacetInfo,
67
type ScopeSupportFacetLevel,
7-
type TextualScopeSupportFacet,
88
} from "@cursorless/common";
99
import React, { useState, type JSX } from "react";
1010
import { prettifyFacet, prettifyScopeType } from "./util";
1111

1212
export interface FacetWrapper {
13-
facet: ScopeSupportFacet | TextualScopeSupportFacet;
13+
facet: ScopeSupportFacet | PlaintextScopeSupportFacet;
1414
supportLevel: ScopeSupportFacetLevel | undefined;
1515
info: ScopeSupportFacetInfo;
1616
}

packages/cursorless-org-docs/src/docs/user/languages/components/ScopeVisualizer.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {
22
Range,
33
serializeScopeType,
4+
type PlaintextScopeSupportFacet,
45
type ScopeSupportFacet,
56
type ScopeSupportFacetInfo,
6-
type TextualScopeSupportFacet,
77
} from "@cursorless/common";
88
import React, { useState } from "react";
99
import scopeTestsJson from "../../../../../static/scopeTests.json";
@@ -22,7 +22,7 @@ interface Scope {
2222
}
2323

2424
interface Facet {
25-
facet: ScopeSupportFacet | TextualScopeSupportFacet;
25+
facet: ScopeSupportFacet | PlaintextScopeSupportFacet;
2626
name: string;
2727
info: ScopeSupportFacetInfo;
2828
fixtures: Fixture[];
@@ -199,9 +199,6 @@ function getOverlap(a: Range, b: Range): Range | null {
199199
}
200200

201201
function getScopeFixtures(languageId: string): Scope[] {
202-
if (languageId === "plaintext") {
203-
languageId = "textual";
204-
}
205202
const languageIds = new Set<string>(
206203
scopeTests.imports[languageId] ?? [languageId],
207204
);

packages/cursorless-org-docs/src/docs/user/languages/components/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type {
22
ScopeSupportFacet,
3-
TextualScopeSupportFacet,
3+
PlaintextScopeSupportFacet,
44
} from "@cursorless/common";
55

66
export interface ScopeTestsJson {
@@ -10,7 +10,7 @@ export interface ScopeTestsJson {
1010

1111
export interface Fixture {
1212
name: string;
13-
facet: ScopeSupportFacet | TextualScopeSupportFacet;
13+
facet: ScopeSupportFacet | PlaintextScopeSupportFacet;
1414
languageId: string;
1515
code: string;
1616
scopes: Scope[];

packages/cursorless-org-docs/src/docs/user/languages/components/util.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import {
22
camelCaseToAllDown,
33
capitalize,
44
scopeSupportFacetInfos,
5-
textualScopeSupportFacetInfos,
5+
plaintextScopeSupportFacetInfos,
66
type ScopeSupportFacet,
77
type ScopeSupportFacetInfo,
8-
type TextualScopeSupportFacet,
8+
type PlaintextScopeSupportFacet,
99
} from "@cursorless/common";
1010

1111
export function prettifyFacet(
12-
facet: ScopeSupportFacet | TextualScopeSupportFacet,
12+
facet: ScopeSupportFacet | PlaintextScopeSupportFacet,
1313
keepScopeType: boolean,
1414
): string {
1515
let parts = facet.split(".").map(camelCaseToAllDown);
@@ -40,11 +40,11 @@ export function prettifyScopeType(scopeType: string): string {
4040

4141
export function getFacetInfo(
4242
languageId: string,
43-
facetId: ScopeSupportFacet | TextualScopeSupportFacet,
43+
facetId: ScopeSupportFacet | PlaintextScopeSupportFacet,
4444
): ScopeSupportFacetInfo {
4545
const facetInfo =
46-
languageId === "textual"
47-
? textualScopeSupportFacetInfos[facetId as TextualScopeSupportFacet]
46+
languageId === "plaintext"
47+
? plaintextScopeSupportFacetInfos[facetId as PlaintextScopeSupportFacet]
4848
: scopeSupportFacetInfos[facetId as ScopeSupportFacet];
4949

5050
if (facetInfo == null) {

0 commit comments

Comments
 (0)