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-2/

{
  "context": "This criteria evaluates how effectively an engineer uses slate-hyperscript's basic JSX tag creation functionality to construct Slate editor states. The focus is on proper use of the package's core JSX tags (editor, element, text, cursor, anchor, focus) and the jsx function.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses jsx function",
      "description": "Imports and uses the jsx function from slate-hyperscript as the JSX pragma or factory function",
      "max_score": 15
    },
    {
      "name": "Creates editor tag",
      "description": "Uses the <editor> JSX tag to create the top-level Editor object",
      "max_score": 15
    },
    {
      "name": "Creates element tags",
      "description": "Uses the <element> JSX tag to create Element nodes that contain text content",
      "max_score": 15
    },
    {
      "name": "Handles plain text",
      "description": "Correctly embeds plain text strings as children of elements, allowing slate-hyperscript to automatically convert them to text nodes",
      "max_score": 15
    },
    {
      "name": "Uses cursor token",
      "description": "Uses the <cursor /> JSX tag to create collapsed selections at specific offsets within text content",
      "max_score": 15
    },
    {
      "name": "Uses anchor/focus tokens",
      "description": "Uses the <anchor /> and <focus /> JSX tags together to create range selections spanning text content",
      "max_score": 15
    },
    {
      "name": "Applies text attributes",
      "description": "Uses the <text> JSX tag with attributes (bold, italic, etc.) to create formatted text nodes with marks",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-slate-hyperscript

tile.json