@@ -350,6 +350,85 @@ Numbered list.
350350** Attributes:**
351351- ` start ` - Starting number (optional, default: 1)
352352
353+ ### Task List Node (Checklist)
354+
355+ Interactive checklist with checkable items.
356+
357+ ``` json
358+ {
359+ "type" : " taskList" ,
360+ "attrs" : {
361+ "uid" : " uniqueId123"
362+ },
363+ "content" : [
364+ {
365+ "type" : " taskItem" ,
366+ "attrs" : {
367+ "checked" : true
368+ },
369+ "content" : [
370+ {
371+ "type" : " paragraph" ,
372+ "content" : [{"type" : " text" , "text" : " Completed task" }]
373+ }
374+ ]
375+ },
376+ {
377+ "type" : " taskItem" ,
378+ "attrs" : {
379+ "checked" : false
380+ },
381+ "content" : [
382+ {
383+ "type" : " paragraph" ,
384+ "content" : [{"type" : " text" , "text" : " Todo task" }]
385+ }
386+ ]
387+ }
388+ ]
389+ }
390+ ```
391+
392+ ** Attributes:**
393+ - ` uid ` - Unique identifier (optional, auto-generated)
394+
395+ ** Features:**
396+ - Interactive checkboxes
397+ - Can be nested for multi-level checklists
398+ - Supports checked/unchecked states
399+ - Can contain paragraphs and nested task lists
400+
401+ ### Task Item Node
402+
403+ Individual item in a task list (checklist).
404+
405+ ``` json
406+ {
407+ "type" : " taskItem" ,
408+ "attrs" : {
409+ "checked" : false
410+ },
411+ "content" : [
412+ {
413+ "type" : " paragraph" ,
414+ "content" : [{"type" : " text" , "text" : " Task description" }]
415+ },
416+ {
417+ "type" : " taskList" ,
418+ "content" : [... ] // Nested checklist
419+ }
420+ ]
421+ }
422+ ```
423+
424+ ** Attributes:**
425+ - ` checked ` - Whether the task is completed (required, boolean)
426+
427+ ** Content:**
428+ - Can contain paragraphs
429+ - Can contain nested ` taskList ` nodes for sub-tasks
430+ - Supports multi-level nesting
431+
353432### List Item Node
354433
355434Individual item in a list. Can contain paragraphs and nested lists.
@@ -611,6 +690,8 @@ Table header cell (`<th>` in HTML). Use for semantic table headers.
611690
612691## Nested Structures
613692
693+ ### Nested Lists
694+
614695Lists can be nested within list items:
615696
616697``` json
@@ -644,6 +725,83 @@ Lists can be nested within list items:
644725}
645726```
646727
728+ ### Nested Checklists
729+
730+ Task lists support multi-level nesting:
731+
732+ ``` json
733+ {
734+ "type" : " taskList" ,
735+ "attrs" : {"uid" : " mainList" },
736+ "content" : [
737+ {
738+ "type" : " taskItem" ,
739+ "attrs" : {"checked" : false },
740+ "content" : [
741+ {
742+ "type" : " paragraph" ,
743+ "content" : [{"type" : " text" , "text" : " Main task" }]
744+ },
745+ {
746+ "type" : " taskList" ,
747+ "attrs" : {"uid" : " nestedList" },
748+ "content" : [
749+ {
750+ "type" : " taskItem" ,
751+ "attrs" : {"checked" : true },
752+ "content" : [
753+ {
754+ "type" : " paragraph" ,
755+ "content" : [{"type" : " text" , "text" : " Subtask 1" }]
756+ }
757+ ]
758+ },
759+ {
760+ "type" : " taskItem" ,
761+ "attrs" : {"checked" : false },
762+ "content" : [
763+ {
764+ "type" : " paragraph" ,
765+ "content" : [{"type" : " text" , "text" : " Subtask 2" }]
766+ }
767+ ]
768+ }
769+ ]
770+ }
771+ ]
772+ }
773+ ]
774+ }
775+ ```
776+
777+ ** Using helpers for nested checklists:**
778+
779+ ``` python
780+ from vaiz import task_list, task_item, paragraph
781+
782+ content = [
783+ task_list(
784+ task_item(
785+ paragraph(" Phase 1: Planning" ),
786+ task_list(
787+ task_item(" Define requirements" , checked = True ),
788+ task_item(" Create wireframes" , checked = True ),
789+ task_item(" Review with stakeholders" , checked = False )
790+ ),
791+ checked = True
792+ ),
793+ task_item(
794+ paragraph(" Phase 2: Development" ),
795+ task_list(
796+ task_item(" Setup project" , checked = False ),
797+ task_item(" Implement features" , checked = False )
798+ ),
799+ checked = False
800+ )
801+ )
802+ ]
803+ ```
804+
647805## Complete Example
648806
649807``` json
@@ -722,7 +880,7 @@ Lists can be nested within list items:
722880Instead of manually constructing JSON, use the built-in helper functions:
723881
724882``` python
725- from vaiz import heading, paragraph, text, bullet_list, blockquote, link_text, table, table_row, table_header
883+ from vaiz import heading, paragraph, text, bullet_list, task_list, task_item, blockquote, link_text, table, table_row, table_header
726884
727885content = [
728886 heading(1 , " Project Documentation" ),
@@ -738,6 +896,11 @@ content = [
738896 " Easy to use" ,
739897 " Type-safe"
740898 ),
899+ heading(2 , " Todo" ),
900+ task_list(
901+ task_item(" Review code" , checked = True ),
902+ task_item(" Deploy to production" , checked = False )
903+ ),
741904 blockquote(
742905 paragraph(
743906 text(" Important: " , bold = True ),
@@ -1091,6 +1254,8 @@ client.replace_json_document(document_id, content)
10911254| ` bulletList ` | Unordered list | ` {"type": "bulletList", "content": [...]} ` |
10921255| ` orderedList ` | Numbered list | ` {"type": "orderedList", "content": [...]} ` |
10931256| ` listItem ` | List item | ` {"type": "listItem", "content": [...]} ` |
1257+ | ` taskList ` | Checklist with checkable items | ` {"type": "taskList", "attrs": {"uid": "..."}, "content": [...]} ` |
1258+ | ` taskItem ` | Checklist item with checkbox | ` {"type": "taskItem", "attrs": {"checked": false}, "content": [...]} ` |
10941259| ` blockquote ` | Blockquote for quotes/callouts | ` {"type": "blockquote", "content": [...]} ` |
10951260| ` details ` | Collapsible section | ` {"type": "details", "content": [...]} ` |
10961261| ` extension-table ` | Table with rows | ` {"type": "extension-table", "attrs": {"uid": "..."}, "content": [...]} ` |
0 commit comments