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

{
  "context": "This criteria evaluates how well the engineer understands and uses slate-hyperscript's text node merging behavior. The focus is on correctly using the jsx function, understanding when text nodes merge versus remain separate, and properly tracking explicit text elements using WeakSet or equivalent mechanism.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses jsx function",
      "description": "Implementation imports and uses the jsx function from slate-hyperscript as the JSX factory, either via default export or named import",
      "max_score": 15
    },
    {
      "name": "String-to-text conversion",
      "description": "Plain string children are correctly converted to text nodes with a 'text' property (e.g., 'hello' becomes { text: 'hello' })",
      "max_score": 20
    },
    {
      "name": "Adjacent string merging",
      "description": "Adjacent plain strings are correctly merged into a single text node, demonstrated by multiple consecutive strings combining their content",
      "max_score": 25
    },
    {
      "name": "Explicit text separation",
      "description": "Text nodes created with explicit <text> tags do NOT merge with adjacent content, remaining as separate nodes even when positioned next to each other",
      "max_score": 25
    },
    {
      "name": "WeakSet tracking",
      "description": "Uses WeakSet or equivalent mechanism to track explicitly created text nodes and prevent their merging, or relies on slate-hyperscript's built-in tracking",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-slate-hyperscript

tile.json