@lessonkit/react 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -4
- package/block-catalog.v3.json +1679 -0
- package/block-contract.v3.json +110 -0
- package/dist/index.cjs +2981 -746
- package/dist/index.d.cts +220 -28
- package/dist/index.d.ts +220 -28
- package/dist/index.js +3063 -828
- package/package.json +13 -9
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://lessonkit.dev/schemas/block-contract.v3.json",
|
|
4
|
+
"title": "LessonKit Block Catalog v3",
|
|
5
|
+
"description": "Runtime block catalog for @lessonkit/react including compounds and Tier C/D content blocks.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "entries"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": 3 },
|
|
11
|
+
"entries": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"items": { "$ref": "#/$defs/blockCatalogEntry" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"$defs": {
|
|
18
|
+
"blockPropSpec": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["name", "type", "required", "description"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"name": { "type": "string", "minLength": 1 },
|
|
24
|
+
"type": { "type": "string", "minLength": 1 },
|
|
25
|
+
"required": { "type": "boolean" },
|
|
26
|
+
"description": { "type": "string", "minLength": 1 }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"blockCatalogEntry": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["type", "category", "description", "props", "requiredIds", "a11y", "theming", "telemetry"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"type": { "type": "string", "minLength": 1 },
|
|
35
|
+
"aliases": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string", "minLength": 1 }
|
|
38
|
+
},
|
|
39
|
+
"h5pMachineName": { "type": "string", "minLength": 1 },
|
|
40
|
+
"h5pAlias": { "type": "string", "minLength": 1 },
|
|
41
|
+
"assessmentContract": { "type": "boolean", "const": true },
|
|
42
|
+
"compoundContract": { "type": "boolean", "const": true },
|
|
43
|
+
"allowedChildTypes": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "type": "string", "minLength": 1 }
|
|
46
|
+
},
|
|
47
|
+
"maxNestingDepth": { "type": "integer", "minimum": 0 },
|
|
48
|
+
"category": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"enum": ["container", "content", "assessment", "chrome"]
|
|
51
|
+
},
|
|
52
|
+
"description": { "type": "string", "minLength": 1 },
|
|
53
|
+
"props": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": { "$ref": "#/$defs/blockPropSpec" }
|
|
56
|
+
},
|
|
57
|
+
"requiredIds": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": { "type": "string" }
|
|
60
|
+
},
|
|
61
|
+
"optionalIds": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": { "type": "string", "minLength": 1 }
|
|
64
|
+
},
|
|
65
|
+
"parentConstraints": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": { "type": "string", "minLength": 1 }
|
|
68
|
+
},
|
|
69
|
+
"a11y": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["element", "ariaLabel", "keyboard", "notes"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"element": { "type": "string", "minLength": 1 },
|
|
75
|
+
"ariaLabel": { "type": "string", "minLength": 1 },
|
|
76
|
+
"keyboard": { "type": "string", "minLength": 1 },
|
|
77
|
+
"liveRegions": { "type": "string" },
|
|
78
|
+
"notes": { "type": "string", "minLength": 1 }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"theming": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["surface", "stylingNotes"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"surface": { "const": "global-inherit" },
|
|
87
|
+
"dataAttributes": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": { "type": "string", "minLength": 1 }
|
|
90
|
+
},
|
|
91
|
+
"stylingNotes": { "type": "string", "minLength": 1 }
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"telemetry": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["emits"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"emits": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"items": { "type": "string" }
|
|
102
|
+
},
|
|
103
|
+
"requiresActiveLesson": { "type": "boolean" },
|
|
104
|
+
"manualTracking": { "type": "string", "minLength": 1 }
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|