@lessonkit/react 1.0.2 → 1.2.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.
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://lessonkit.dev/schemas/block-contract.v2.json",
4
+ "title": "LessonKit Block Catalog v2",
5
+ "description": "Runtime block catalog for @lessonkit/react including H5P-aligned assessments.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "entries"],
9
+ "properties": {
10
+ "schemaVersion": { "const": 2 },
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
+ "category": {
43
+ "type": "string",
44
+ "enum": ["container", "content", "assessment", "chrome"]
45
+ },
46
+ "description": { "type": "string", "minLength": 1 },
47
+ "props": {
48
+ "type": "array",
49
+ "items": { "$ref": "#/$defs/blockPropSpec" }
50
+ },
51
+ "requiredIds": {
52
+ "type": "array",
53
+ "items": { "type": "string" }
54
+ },
55
+ "optionalIds": {
56
+ "type": "array",
57
+ "items": { "type": "string", "minLength": 1 }
58
+ },
59
+ "parentConstraints": {
60
+ "type": "array",
61
+ "items": { "type": "string", "minLength": 1 }
62
+ },
63
+ "a11y": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["element", "ariaLabel", "keyboard", "notes"],
67
+ "properties": {
68
+ "element": { "type": "string", "minLength": 1 },
69
+ "ariaLabel": { "type": "string", "minLength": 1 },
70
+ "keyboard": { "type": "string", "minLength": 1 },
71
+ "liveRegions": { "type": "string" },
72
+ "notes": { "type": "string", "minLength": 1 }
73
+ }
74
+ },
75
+ "theming": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["surface", "stylingNotes"],
79
+ "properties": {
80
+ "surface": { "const": "global-inherit" },
81
+ "dataAttributes": {
82
+ "type": "array",
83
+ "items": { "type": "string", "minLength": 1 }
84
+ },
85
+ "stylingNotes": { "type": "string", "minLength": 1 }
86
+ }
87
+ },
88
+ "telemetry": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["emits"],
92
+ "properties": {
93
+ "emits": {
94
+ "type": "array",
95
+ "items": { "type": "string" }
96
+ },
97
+ "requiresActiveLesson": { "type": "boolean" },
98
+ "manualTracking": { "type": "string", "minLength": 1 }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
@@ -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
+ }