refactor!: Use navigation rulesets instead of ASTNode to control keyboard navigation. (#8992)

* feat: Add interfaces for keyboard navigation.

* feat: Add the Navigator.

* feat: Make core types conform to INavigable.

* feat: Require FlyoutItems elements to be INavigable.

* feat: Add navigation policies for built-in types.

* refactor: Convert Marker and LineCursor to operate on INavigables instead of ASTNodes.

* chore: Delete dead code in ASTNode.

* fix: Fix the tests.

* chore: Assuage the linter.

* fix: Fix advanced build/tests.

* chore: Restore ASTNode tests.

* refactor: Move isNavigable() validation into Navigator.

* refactor: Exercise navigation instead of ASTNode.

* chore: Rename astnode_test.js to navigation_test.js.

* chore: Enable the navigation tests.

* fix: Fix bug when retrieving the first child of an empty workspace.
This commit is contained in:
Aaron Dodson
2025-05-07 08:47:52 -07:00
committed by GitHub
parent a3b3ea72f2
commit acdad98653
37 changed files with 1941 additions and 1708 deletions

View File

@@ -341,6 +341,18 @@ export class FieldNumber extends FieldInput<number> {
options,
);
}
/**
* Returns this field's class.
*
* Used by keyboard navigation to look up the rules for navigating from this
* field.
*
* @returns This field's class.
*/
getClass() {
return FieldNumber;
}
}
fieldRegistry.register('field_number', FieldNumber);