CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-slate-hyperscript

A hyperscript helper for creating Slate documents with JSX-like syntax.

90

1.15x
Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "This criteria evaluates how effectively the engineer uses slate-hyperscript to create Slate editor test fixtures with selections positioned correctly within nested document structures. The focus is on proper usage of the token resolution system and JSX syntax for embedding selections in complex hierarchies.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "JSX function import",
      "description": "Uses the jsx function from slate-hyperscript (either default import or createHyperscript) to enable JSX syntax for creating editor structures",
      "max_score": 10
    },
    {
      "name": "Editor tag usage",
      "description": "Uses the <editor> tag to create the top-level editor instance with proper children structure",
      "max_score": 10
    },
    {
      "name": "Element tag usage",
      "description": "Uses <element> tags to create nested document structures with appropriate type attributes (e.g., type='document', type='section', type='paragraph')",
      "max_score": 15
    },
    {
      "name": "Cursor token usage",
      "description": "Uses <cursor /> tokens embedded directly within text content to create collapsed selections at specific character positions",
      "max_score": 20
    },
    {
      "name": "Anchor/focus token usage",
      "description": "Uses <anchor /> and <focus /> tokens together to create range selections, placing them at appropriate positions within the text or between elements",
      "max_score": 20
    },
    {
      "name": "Token placement accuracy",
      "description": "Correctly positions selection tokens within nested structures to achieve the desired selection positions (start, middle, end, cross-element) as specified by the configuration",
      "max_score": 15
    },
    {
      "name": "Nesting depth handling",
      "description": "Creates document structures with appropriate nesting depth (simple, nested, deep) using properly nested <element> tags, demonstrating understanding of token resolution across multiple levels",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-slate-hyperscript

tile.json