Skip to content

Generate Examples -- Continued #2272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 211 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
7ca39b3
feat: add tailwindcss dependencies to cursorless-org-docs
trillium Jun 8, 2025
d2ad48a
chore: Duplicate tailwind.config from cursorless-org
trillium Jun 8, 2025
36e7471
feat: Create postcss for cursorless-org-docs
trillium Jun 8, 2025
44641c8
feat: Create tailwind plugin for docusaurus in cursorless-org-docs
trillium Jun 8, 2025
9beb4b4
feat: Add tailwind directives to custom.css
trillium Jun 8, 2025
24b37cb
chore: Add tailwind-config as plugin in docusaurus.config
trillium Jun 8, 2025
d7b7634
fix: Remove extraneous objects from talewind.config
trillium Jun 9, 2025
1e17213
chore: Update pnpm-lock
trillium Jun 9, 2025
292a339
chore: Bring #940 to current monorepo structure
SimeonC Mar 20, 2023
e597365
chore: Move generate-examples to packages folder
trillium Mar 25, 2024
b0727b6
chore: mkdir test-case-component, pnpm init
trillium Mar 27, 2024
4e03335
chore: Add description for test-case-component/package.json
trillium Mar 27, 2024
38d4f02
chore: Move generate-examples/src to test-case-examples/src
trillium Mar 27, 2024
fd5e31e
fix: Update fixturesDir to point correctly
trillium Mar 25, 2024
c6ccbfb
fix: Use command.spokenForm from data obj
trillium Mar 25, 2024
92c4489
fix: SelectionParser.parse error for UntypedTarget
trillium Mar 25, 2024
81203d5
feat: Add originalData to loadFixture.ts
trillium Mar 25, 2024
a916c8c
chore: Add description to package.json
trillium Mar 25, 2024
c562cd4
chore: Bring dependencies from old package.json
trillium Mar 27, 2024
e63a24b
chore: Bring scripts from old package.json
trillium Mar 27, 2024
b8c912e
chore: Update package.json name
trillium Mar 27, 2024
40c42fe
chore: Update version to 0.0.1
trillium Mar 27, 2024
66c7f95
chore: Add type: module to package.json
trillium Mar 27, 2024
8872696
chore: Create basic tsconfig.json for test-case-component
trillium Mar 27, 2024
fc539be
chore: Copy jest config from pkgs/cheatsheet
trillium Mar 27, 2024
48a5012
chore: Run `pnpm -w fix:meta` for test-case-component
trillium Mar 27, 2024
f65c2e4
chore: Delete generate-examples folder
trillium Mar 27, 2024
22cd6f0
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Mar 27, 2024
1214efe
chore: Follow pattern for files in /src and not /src/lib
trillium Mar 27, 2024
81ada0e
chore: Add dependencies for /test-case-component in /cursorless-org
trillium Jun 7, 2025
d92b2aa
wip: Add test-case-component path referecnce
trillium Apr 9, 2024
9927b77
feat: Match tsconfig to cheatsheet/tsconfig as example
trillium Apr 9, 2024
2c83f61
fix: Remove /lib/ from export in index.ts
trillium Apr 9, 2024
be7519a
wip: Basic scaffold for TestCaseComponentPage
trillium Apr 9, 2024
a9b8e5e
chore: Remove buildSpokenForm as it is no longer needed
trillium Apr 9, 2024
2d2d9b2
chore: Remove package-lock, holdover from previous file structure
trillium Apr 9, 2024
63fc000
chore: Update build script to be compliant with monorepo
trillium Apr 9, 2024
f89c6ce
chore: Update dependencies, add js-yaml
trillium Apr 9, 2024
7bccebe
chore: Add jest as dev dependency for package/test-case-component
trillium Apr 9, 2024
6819b26
wip: Get yml to pass as props for selected files
trillium Apr 9, 2024
147df36
wip: Create inital component to render shiki code blocks
trillium Apr 9, 2024
f2a6d63
wip: Update test-case-componet to import shiki
trillium Apr 9, 2024
db3e827
fixup: lib redo
trillium Apr 9, 2024
dbd0f38
wip: Change title in /component-sheet
trillium May 8, 2024
9e2990b
wip: Add key prop to data.map ShikiComponent
trillium May 8, 2024
9b5bf93
wip: Change css variable names to be in line with new shiki
trillium May 8, 2024
1f53815
wip: Add loadFixture to export
trillium May 9, 2024
8d28d12
chore: Update shiki, move to dev dependencies
trillium May 9, 2024
4fff1e0
feat: Create css files for test-case-component
trillium May 9, 2024
8fdf129
feat: Create css vars theme
trillium May 9, 2024
5212670
feat: Remove fs parts of loadFixture
trillium May 9, 2024
cdbfa43
chore: Switch from IThemedToken to ThemedToken
trillium May 9, 2024
63fb887
wip: Remove filepath from error state in loadFixtures
trillium May 9, 2024
bf4413b
feat: Update component sheet to import yaml files
trillium May 9, 2024
3b11db8
feat: Create ShikiComponent
trillium May 9, 2024
add08ae
feat: Create test-case-componet page scaffolding
trillium May 9, 2024
6f819c9
wip: Drop console log in loadFixture
trillium May 10, 2024
a5fb51d
feat: Add ternary logic for data.decorations
trillium May 10, 2024
f74fec8
wip: Pull in Lang type from old Shiki
trillium May 10, 2024
40bcceb
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] May 10, 2024
55ee6ef
fix: Add export statement to types file
trillium May 10, 2024
d781570
feat: Add filename property to yaml object, use as key
trillium May 11, 2024
58f46a1
feat: Remove `loaded` step in yaml file data acquisition
trillium May 11, 2024
8831e28
fix: Remove duplicate file reference
trillium May 12, 2024
5de6d12
fix: Use BundledLanguage type from Shiki
trillium May 12, 2024
e9b9a81
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] May 12, 2024
896436c
fix: Define Lang from BundledLanguage
trillium May 12, 2024
d8be0a1
feat: Add `upgrade` to exports from cursorless-engine
trillium May 12, 2024
68d9364
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] May 12, 2024
8a91634
feat: Add cursorless-engine dependency to cursorless-org
trillium May 12, 2024
632cd5e
chore: Move non-local imports to top of file
trillium May 12, 2024
192cdc0
feat: Import upgrade, add upgrade to data loading step
trillium May 12, 2024
dfd27c2
feat: Drop loaded prop, add TestCaseFixture[] type in test-case-compo…
trillium May 13, 2024
664fec4
chore: Refresh pnpm-lock.yaml during rebase
trillium Jun 9, 2025
0e5b2e5
chore: Refresh pnpm-lock.yaml during rebase
trillium Jun 9, 2025
0a20994
chore: Run `pnpm -w fix:meta` for test-case-component
trillium Oct 3, 2024
3b5fb11
chore: Resolve import issue with importing "@cursorless/common"
trillium Oct 3, 2024
0b1de4c
chore: import { TestCaseFixture } --> import type { TestCaseFixture }
trillium Oct 3, 2024
ce199ab
feat: Small styling tweaks for ShikiComponent in styles.css
trillium Oct 3, 2024
56df008
wip: Stop using `upgrade` for the moment
trillium Oct 3, 2024
671406f
feat: Drop duplicate data.during in ShikiComponent
trillium Oct 3, 2024
1eb2e9a
chore: Delete buildDictionary file
trillium Jul 24, 2024
b9c705d
feat: Migrate to current cursorless type PositionPlainObject
trillium Oct 3, 2024
8011d7b
feat: Change var names to adhere to camal case eslint reqs
trillium Oct 3, 2024
7f510a0
feat: Add dependency escape-goat to test-case-component
trillium Jun 9, 2025
e27d8c0
feat: use htmlEscape for html-escaping in test-case-component
trillium Oct 3, 2024
6639e03
feat: Change pendingDeleteBackground color to make current colors
trillium Oct 3, 2024
3cf10b0
feat: Create referencedBackground class in styles
trillium Oct 3, 2024
4b67544
feat: Rename decorations --> flashes
trillium Oct 3, 2024
964e98f
feat: Rename component-shiki shikiComponent
trillium Oct 3, 2024
1d2ece9
feat: Use @cursorless/common type PositionPlainObject in loadFixture
trillium Oct 3, 2024
0e00ae1
feat: Add "@cursorless/common" as dev deps for cursorless-org
trillium Oct 4, 2024
cfe62b1
feat: Add type TestCaseFixture to loadFixture
trillium Oct 4, 2024
6628f8d
feat: refactor out getStage functions for readability
trillium Oct 4, 2024
c23d6c4
feat: use getStage helper funcs in loadFixture
trillium Oct 4, 2024
1cbeea7
chore: Switch console.log --> console.error in error catch
trillium Oct 4, 2024
2015216
feat: Create interface loadFixtureProps
trillium Oct 4, 2024
98525d2
feat: Refactor argument object for getState funcs
trillium Oct 4, 2024
9c3eeaf
feat: Update getDuring arg type to TestCaseFixture
trillium Oct 4, 2024
7d4212d
wip: Add handle clipboard todo note
trillium Oct 4, 2024
b2729c0
wip: Reorder before, during, after functions
trillium Oct 4, 2024
35cd660
chore: Drop usued type loaded in App props
trillium Oct 8, 2024
61520ee
feat: Type App { data } to list of TestCaseFixture
trillium Oct 8, 2024
3bd3bba
chore: Move and rename test-case-component-page to TestCaseComponentPage
trillium Oct 22, 2024
f754215
chore: Add jsdoc comment to generateHtml
trillium Oct 22, 2024
10ae782
chore: Remove unused and empty generateHtml file
trillium Oct 22, 2024
0db64a1
chore: Refresh pnpm-lock.yaml during rebase
trillium Jun 9, 2025
98942fa
chore: Add types/js-yaml dev dep to cursorless-org
trillium Apr 5, 2025
4c963ac
chore: Add @cursorless/test-case-component, common as deps for curso…
trillium Jun 9, 2025
21ce504
style: Darken code background color
trillium Apr 7, 2025
9ec5b8c
style: Remove top border from .command
trillium Apr 8, 2025
f1f4328
feat: Create background color styles from
trillium Apr 8, 2025
75dd717
feat: Upgrade shiki to ^3.2.2 in test-case-component
trillium Apr 12, 2025
1cefad5
wip: Move temp test-case allow list to its own file
trillium Apr 17, 2025
54e388f
feat: Wrap yaml load in an error boundary
trillium Apr 17, 2025
8a2c9e5
feat: Remove any failed loads before passing data obj
trillium Apr 17, 2025
917fec4
chore: Add references to test-case-component tsconfig
trillium Apr 17, 2025
8bc2214
wip: Play with CSS styles shiki code block
trillium Apr 17, 2025
169e9c0
feat: Removed depricated code in leiu of shiki
trillium Apr 17, 2025
51490c8
refactor: Switch from arrow to function declaration in TestCaseCompon…
trillium Apr 17, 2025
5d59754
feat: Create Before, During, After components for shikiComponent
trillium Apr 17, 2025
c7a5251
refactor: Wrap JSON data in a details element in shikiComponent
trillium Apr 17, 2025
daf829b
feat: Use Before, During, After components in shikiComponent
trillium Apr 17, 2025
1d1a185
refactor: Switch to component function declaration in shikiComponent
trillium Apr 17, 2025
469afa8
feat: Create helpers file for creating shiki decoration objects
trillium Apr 17, 2025
b74efe0
wip: Adapt old generateHtml to use Shiki
trillium Apr 17, 2025
fb7fdcc
wip: Adapt old loadFixture to use Shiki
trillium Apr 17, 2025
f42d1f2
chore: Refresh pnpm-lock.yaml during rebase
trillium Jun 9, 2025
cd47a4f
fix: Update import name in loadFixture
trillium Apr 17, 2025
9f89a7a
refactor: Rename loadFixture to loadTestCaseFixture
trillium Apr 17, 2025
42491b1
wip: Restore more allowList examples for demo
trillium Apr 17, 2025
3e75862
wip: Add additional dir for test case rendering
trillium Apr 29, 2025
9984817
feat: Create TestCaseComponentProps type
trillium Apr 29, 2025
5c71193
wip: Add more filenames to allowList
trillium Apr 29, 2025
c54eccd
fix: Update display line numbers to start at 0
trillium Apr 29, 2025
2e021c6
feat: Create thatMark and sourceMark classes
trillium Apr 29, 2025
f304e7e
refactor: Change class names to drop word Background
trillium Apr 29, 2025
92fb4fa
feat: Update helper class names function object
trillium Apr 29, 2025
0ef7c4a
feat: Create addContentRangeDecorations helper function
trillium Apr 29, 2025
c8fbd04
feat: Update getThatMark function
trillium Apr 29, 2025
91feb72
chore: Remove console.log statements
trillium Apr 29, 2025
8b43aff
feat: Update types in helpers.ts
trillium Apr 29, 2025
dea04b6
wip: Add continue statement to resolve flashes out of bounds error
trillium Apr 29, 2025
e1ccb07
feat: Additional type updates in helper.ts
trillium Apr 29, 2025
6ef0ae1
chore: Remove unused variable in getMarkDecorations
trillium Apr 29, 2025
7b9a08a
feat: Update return type of createDecorations
trillium Apr 29, 2025
26eb4fc
feat: Update returned array order of createDecorations
trillium Apr 29, 2025
e46239b
feat: Update prop types of TestCaseComponentPage
trillium Apr 29, 2025
52f6cfc
feat: Add fallback if rendering with error for TestCaseComponentPage
trillium Apr 29, 2025
74e32a2
feat: Update types in shikiComponent
trillium Apr 29, 2025
95830f5
chore: Remove console.log statement in shikiComponent
trillium Apr 29, 2025
9381f9e
feat: Update tailwind classes in shikiComponent children
trillium Apr 29, 2025
1cae875
feat: Create types in loadTestCaseFixture
trillium Apr 29, 2025
9bf2243
refactor: Restrucutre html generation method in loadTestCaseFixture
trillium Apr 29, 2025
b241c0f
feat: Update types in generateHtml
trillium Apr 29, 2025
16d4968
feat: Update html generation method in generateHtml
trillium Apr 29, 2025
a78ec7e
chore: Add dependency shiki-magic-move
trillium Jun 9, 2025
f76782e
feat: Add animated code block to shikiComponent
trillium May 20, 2025
398596e
feat: Add `debug` prop to test case component functions
trillium May 20, 2025
4f2ada0
feat: Create component-sheet-debug page
trillium May 20, 2025
c1951eb
style: Update CSS for .selection, .decoration
trillium May 20, 2025
d77b331
style: Update shiki-background to be tailwind-gray-900
trillium May 20, 2025
c0ab571
feat: Add dependency clsx to test-case-component
trillium Jun 1, 2025
16fc284
feat: Add additional languages to highlighter
trillium Jun 1, 2025
291d763
chore: Refine console warnings in generateHtml
trillium Jun 1, 2025
862acdc
style: Decrease display time and step three of shikiComponent
trillium Jun 1, 2025
c957aad
chore: Delete unused generateHtml.spec.ts file
trillium Jun 2, 2025
b3fbcf7
refactor(helpers): Reorganize and add helper to their own utility files
trillium Jun 2, 2025
8459447
feat: Create mergeOverlappingDecorations helper function
trillium Jun 2, 2025
2b27fd5
fix: Correct console.warn message in getThatMarks
trillium Jun 2, 2025
9fa757a
chore: Create folder for test-case exmaple files
trillium Jun 2, 2025
c56ec76
refactor: Use test case example folder in component-sheet
trillium Jun 2, 2025
b042b38
refactor: Move types into single file in test-case-component
trillium Jun 2, 2025
3f44f13
fix: Typo getSlections -> getSelections
trillium Jun 2, 2025
9eaaed3
refactor: Move decorations related helpers to /decorations
trillium Jun 2, 2025
beb1eb3
refactor: Move createHighlighter functions to own file
trillium Jun 2, 2025
b15f8a3
refactor: Replace HTMLGenerator to closure-based factory function
trillium Jun 2, 2025
d4f2f1a
chore: Add JSDoc comments
trillium Jun 2, 2025
6cd9859
refactor: Extract and type utility functions in generateHtml
trillium Jun 2, 2025
384a055
refactor: Separate out functions from generateHtml
trillium Jun 2, 2025
f3c8cd6
refactor: Rename testCaseState to snapshot in getDecorations
trillium Jun 2, 2025
dfcae0c
refactor: Create getDuringSnapshot function
trillium Jun 2, 2025
0151bd1
style: Create selectionLeft and selectionRight styles
trillium Jun 3, 2025
ca0b43e
feat: Stop advancing if user presses one of the Carousel buttons
trillium Jun 3, 2025
0f54caf
refactor: Add stepName to snapshot type for easier debugging
trillium Jun 3, 2025
9a429aa
feat: Remove badly designed error handling code
trillium Jun 3, 2025
ec4cfc6
feat: Update mergeOverlappingDecorations to handle 0 width decoration
trillium Jun 3, 2025
ae15398
feat: Allow decorations with class 'full' to pass overlap
trillium Jun 3, 2025
ac62b67
fix: Remove thatMark, sourceMark from during phase
trillium Jun 3, 2025
339e4f3
feat: Allow zero width thatMarks and sourceMark to pass
trillium Jun 3, 2025
9663799
refactor: Move import and process logic into standalone function
trillium Jun 3, 2025
24e29e8
refactor: Render JSON data element based on debug var in shikiComponent
trillium Jun 3, 2025
e185dde
feat: Add dependency test-case-component to cursorless-org-docs
trillium Jun 4, 2025
4a0cbe1
refactor: Move to using ShikiComponentList, no fs access
trillium Jun 5, 2025
6096aab
feat: add convert-fixtures script for fixtures to .ts
trillium Jun 5, 2025
6a32290
fix: Correct prop name in SliderButton path element to camel case
trillium Jun 5, 2025
ac0fae1
feat: Add default false debug param to generateHtml
trillium Jun 5, 2025
c5c20ef
feat: Create ShikiComponentList component
trillium Jun 5, 2025
43486d9
refactor: Ensure stepName is present in all calls of generate
trillium Jun 5, 2025
73d5bc9
feat: Create script for generating .ts json fixtures
trillium Jun 5, 2025
f81f142
chore: Refresh pnpm-lock.yaml during rebase
trillium Jun 9, 2025
61f2c40
feat: Create DisplayComponent in cursorless-org-docs
trillium Jun 6, 2025
0e57d2d
build: Expand Tailwind content search to include test-case-component
trillium Jun 9, 2025
08669ab
feat: Add inital src/data in test-case-component
trillium Jun 9, 2025
ac55f63
feat: Add DisplayComponent to typescript.mdx
trillium Jun 9, 2025
cbe249a
refactor: Update type imports for portability loadTestCaseFixture
trillium Jun 9, 2025
cfa03df
fix: Add srOnly param to SliderButton in shikiComponent
trillium Jun 9, 2025
2010979
style: Update shikiComponent classes
trillium Jun 9, 2025
4b3e3de
feat: Sim link .css files
trillium Jun 9, 2025
b5649f2
style: Add css imports shiki.css, shiki-component-styles.css
trillium Jun 9, 2025
2ba6642
feat: Add exports /data and /shikiComponentList to test-case-component
trillium Jun 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions data/example-files/bringAirAndBatAndCapToAfterItemEach.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
languageId: typescript
command:
version: 6
spokenForm: bring air and bat and cap after item each
action:
name: replaceWithTarget
source:
type: list
elements:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: a}
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: b}
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
destination:
type: primitive
insertionMode: after
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: collectionItem}
mark: {type: decoratedSymbol, symbolColor: default, character: e}
usePrePhraseSnapshot: false
initialState:
documentContents: |
a
b
c

const values = [e]
selections:
- anchor: {line: 5, character: 0}
active: {line: 5, character: 0}
marks:
default.a:
start: {line: 0, character: 0}
end: {line: 0, character: 1}
default.b:
start: {line: 1, character: 0}
end: {line: 1, character: 1}
default.c:
start: {line: 2, character: 0}
end: {line: 2, character: 1}
default.e:
start: {line: 4, character: 16}
end: {line: 4, character: 17}
finalState:
documentContents: |
a
b
c

const values = [e, a, b, c]
selections:
- anchor: {line: 5, character: 0}
active: {line: 5, character: 0}
thatMark:
- type: UntypedTarget
contentRange:
start: {line: 4, character: 19}
end: {line: 4, character: 26}
isReversed: false
hasExplicitRange: true
sourceMark:
- type: UntypedTarget
contentRange:
start: {line: 0, character: 0}
end: {line: 0, character: 1}
isReversed: false
hasExplicitRange: true
- type: UntypedTarget
contentRange:
start: {line: 1, character: 0}
end: {line: 1, character: 1}
isReversed: false
hasExplicitRange: true
- type: UntypedTarget
contentRange:
start: {line: 2, character: 0}
end: {line: 2, character: 1}
isReversed: false
hasExplicitRange: true
46 changes: 46 additions & 0 deletions data/example-files/bringAirToEndOfAir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
languageId: plaintext
command:
version: 6
spokenForm: bring air to end of air
action:
name: replaceWithTarget
source:
type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: a}
destination:
type: primitive
insertionMode: to
target:
type: primitive
modifiers:
- {type: endOf}
mark: {type: decoratedSymbol, symbolColor: default, character: a}
usePrePhraseSnapshot: true
initialState:
documentContents: a
selections:
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
marks:
default.a:
start: {line: 0, character: 0}
end: {line: 0, character: 1}
finalState:
documentContents: aa
selections:
- anchor: {line: 0, character: 2}
active: {line: 0, character: 2}
thatMark:
- type: UntypedTarget
contentRange:
start: {line: 0, character: 1}
end: {line: 0, character: 2}
isReversed: false
hasExplicitRange: true
sourceMark:
- type: UntypedTarget
contentRange:
start: {line: 0, character: 0}
end: {line: 0, character: 1}
isReversed: false
hasExplicitRange: true
1 change: 1 addition & 0 deletions packages/cursorless-engine/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ export * from "./testUtil/plainObjectToTarget";
export * from "./util/getPartialTargetDescriptors";
export * from "./util/getPrimitiveTargets";
export * from "./util/grammarHelpers";
export * from "./scripts/transformRecordedTests/transformations/upgrade";
3 changes: 3 additions & 0 deletions packages/cursorless-org-docs/docusaurus.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ const config: Config = {
},
],
],
plugins: [
"./src/plugins/tailwind-config.js",
],

themeConfig: {
navbar: {
Expand Down
4 changes: 4 additions & 0 deletions packages/cursorless-org-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"dependencies": {
"@algolia/client-search": "5.25.0",
"@cursorless/common": "workspace:*",
"@cursorless/test-case-component": "workspace:*",
"@docsearch/react": "3.9.0",
"@docusaurus/core": "3.8.0",
"@docusaurus/preset-classic": "3.8.0",
Expand All @@ -61,6 +62,9 @@
"@tsconfig/docusaurus": "2.0.3",
"@types/mdast": "4.0.4",
"@types/react": "19.1.6",
"@tailwindcss/postcss": "4.1.8",
"postcss": "8.4.47",
"tailwindcss": "3.4.14",
"typescript": "5.8.3",
"unified": "11.0.5"
}
Expand Down
6 changes: 6 additions & 0 deletions packages/cursorless-org-docs/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
6 changes: 6 additions & 0 deletions packages/cursorless-org-docs/src/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@tailwind components;
@tailwind base;
@tailwind utilities;

@import "./shiki.css";
@import "./shiki-component-styles.css";
/* From https://github.com/facebook/docusaurus/blob/cc0bceab9c1678303f6237f5526753edc1b12fc3/website/src/css/custom.css#L70-L86 */
.header-github-link:hover {
opacity: 0.6;
Expand Down
1 change: 1 addition & 0 deletions packages/cursorless-org-docs/src/css/shiki.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import { ShikiComponentList } from "@cursorless/test-case-component";

interface Props {
languageId: string;
}

export function DisplayComponent({ languageId }: Props) {
return (
<>
<ShikiComponentList language={languageId} />
</>
);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Language } from "./components/Language";
import { DisplayComponent } from "./components/DisplayComponent";

# Typescript

<Language languageId="typescript"></Language>
<DisplayComponent languageId="typescript"></DisplayComponent>
9 changes: 9 additions & 0 deletions packages/cursorless-org-docs/src/plugins/tailwind-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = function tailwindPlugin(context, options) {
return {
name: "tailwind-plugin",
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(require("tailwindcss"));
return postcssOptions;
},
};
};
14 changes: 14 additions & 0 deletions packages/cursorless-org-docs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { fontFamily as _fontFamily } from "tailwindcss/defaultTheme";

/** @type {import('tailwindcss').Config} */
// packages/test-case-component/src/components/ add dir
// just add this damn dir to the content array, this FILE is at packages/cursorless-org-docs/tailwind.config.js
export const content = [
"./src/**/*.{js,ts,jsx,tsx}",
"../test-case-component/src/components/**/*.{js,ts,jsx,tsx}",
];

export const corePlugins = {
preflight: false,
};
export const plugins = [];
4 changes: 4 additions & 0 deletions packages/cursorless-org/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/common": "workspace:*",
"@cursorless/cheatsheet": "workspace:*",
"@cursorless/cursorless-engine": "workspace:*",
"@cursorless/test-case-component": "workspace:*",
"@mdx-js/loader": "3.1.0",
"@mdx-js/react": "3.1.0",
"@next/mdx": "15.3.3",
Expand All @@ -40,6 +43,7 @@
},
"devDependencies": {
"@svgr/webpack": "8.1.0",
"@types/js-yaml": "^4.0.9",
"@types/mdx": "2.0.13",
"@types/node": "20.17.50",
"@types/react": "19.1.6",
Expand Down
88 changes: 88 additions & 0 deletions packages/cursorless-org/src/pages/allowList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
export const testSelectedFiles = [
"bringAirAndBatAndCapToAfterItemEach.yml",
"bringAirToEndOfAir.yml", // Shiki intersect error
"bringArgMadeAfterLook.yml",
"carveLineHarp.yml",
"chuckBlockAir.yml",
"chuckBlockAirUntilBatt.yml",
"chuckBlockAirUntilBatt.yml",
"chuckBlockBatt.yml",
"chuckBlockBatt2.yml", // Shiki intersect error
"chuckBlockBattUntilAir.yml",
"chuckFine.yml",
"chuckLineFine.yml",
"chuckLineFineBetweenRisk.yml",
"clearBlockFine.yml",
"clearFine.yml",
"clearLineFine.yml",
"cutFine.yml",
"puffVest.yml",

"bringAirAfterAir.yml",
"bringAirBeforeAir.yml",
"bringAirToEndOfAir.yml",
"bringAirToStartOfAir.yml",
"bringFineAfterLineVest.yml",
"callFineOnBatt.yml",
"cloneHarp2.yml",
"cloneUpHarp2.yml",
"customHarp.yml",
"drinkLine.yml",
"giveBat2.yml",
"giveDot.yml",
"giveDot2.yml",
"giveEndOfDot.yml",
"giveStartOfDot.yml",
"joinAir.yml",
"joinAir2.yml",
"joinAir3.yml",
"joinAir4.yml",
"joinBatPastEach.yml",
"joinTokenBattPastEach.yml",
"pasteAfterLineSpunAndAfterBlockLookAndBeforeLineSpun.yml",
"pasteAfterLineTrapAndAfterBlockTrap.yml",
"placeHelloAfterAir.yml",
"placeHelloToFine.yml",
"pourLine.yml",
"scoutAir.yml",
"scoutAllAir.yml",
"sortEveryItem.yml",
"sortEveryItem2.yml",
"_bringLineHarpAndWhale.yml",
"cloneArgue.yml",
"cloneHarp.yml",
"cloneToken.yml",
"cloneToken2.yml",
"cloneUpHarp.yml",
"pasteAfterArgueBat.yml",
"chuckBlockBatt2.yml",
"appendPostWhale.yml",
"appendPreWhale.yml",
"bringAirAndBatAndCap.yml",
"bringArgueFineAndZip.yml",
"bringVest.yml",
"cloneArgue2.yml",
"cloneToken3.yml",
"cloneToken4.yml",
"cloneUpArgue2.yml",
"cloneUpToken3.yml",
"cloneUpToken4.yml",
"dedentLine.yml",
"flashToken.yml",
"indentLine.yml",
"joinBlock.yml",
"joinFile.yml",
"joinLineThis.yml",
"joinThreeTokens.yml",
"joinTwoLines.yml",
"moveEveryArgMade.yml",
"moveVest.yml",
"parseTreeFile.yml",
"postVest.yml",
"preeVest.yml",
"roundWrapVest.yml",
"swapWithVest.yml",
"voidWrapAir.yml",
"dropToken.yml",
"floatToken.yml",
];
Loading
Loading