A hyperscript helper for creating Slate documents with JSX-like syntax.
90
{
"context": "This criteria evaluates how well the engineer uses slate-hyperscript to create nested document structures. The focus is on proper usage of JSX syntax, element nesting, custom element properties, and selection positioning within nested contexts.",
"type": "weighted_checklist",
"checklist": [
{
"name": "JSX Factory Import",
"description": "Correctly imports and configures the JSX factory from slate-hyperscript (either the default `jsx` or creates a custom one with `createHyperscript`)",
"max_score": 10
},
{
"name": "Editor Tag Usage",
"description": "Uses the `<editor>` JSX tag correctly as the top-level container in all three functions",
"max_score": 10
},
{
"name": "Element Tag Nesting",
"description": "Properly nests `<element>` tags to create the multi-level document hierarchy with correct parent-child relationships in createNestedDocument()",
"max_score": 15
},
{
"name": "Element Type Properties",
"description": "Sets the `type` attribute on element tags to specify element types (e.g., type=\"document\", type=\"section\", type=\"paragraph\")",
"max_score": 10
},
{
"name": "Element ID Attributes",
"description": "Correctly applies custom attributes like `id` to elements in createNestedDocument() (e.g., id=\"intro\", id=\"content\", id=\"main\")",
"max_score": 10
},
{
"name": "Text Content Handling",
"description": "Properly includes text content within element tags, allowing slate-hyperscript to automatically convert strings to text nodes",
"max_score": 10
},
{
"name": "Cursor Tag Usage",
"description": "Uses the `<cursor />` JSX tag to position a collapsed selection within nested text content in createDocumentWithSelection()",
"max_score": 15
},
{
"name": "Complex List Nesting",
"description": "Creates proper nested list structures with list-item elements containing both text and child list elements in createNestedList()",
"max_score": 15
},
{
"name": "Custom List Attributes",
"description": "Applies the listType attribute to list elements (listType=\"ordered\" and listType=\"unordered\") in createNestedList()",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-slate-hyperscriptdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10