cognikit 1.0.2 → 1.1.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.
Files changed (124) hide show
  1. package/dist/builders/classification/index.d.ts +24 -0
  2. package/dist/builders/fill-blanks/index.d.ts +48 -0
  3. package/dist/client.js +2574 -2666
  4. package/dist/client.js.map +4 -4
  5. package/dist/core/builders/index.d.ts +48 -0
  6. package/dist/core/index.d.ts +2 -1
  7. package/dist/core/{BaseInteraction.d.ts → interactions/index.d.ts} +11 -12
  8. package/dist/engines/index.d.ts +0 -1
  9. package/dist/engines/tables/index.d.ts +40 -2
  10. package/dist/engines/tables/{implementation/utils.d.ts → utils.d.ts} +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.js +2570 -2662
  13. package/dist/index.js.map +4 -4
  14. package/dist/interactions/adjacency-table/index.d.ts +6 -7
  15. package/dist/interactions/classification-matrix/index.d.ts +7 -6
  16. package/dist/interactions/fill-blanks/index.d.ts +36 -2
  17. package/dist/interactions/index.d.ts +0 -2
  18. package/dist/interactions/list-recall/index.d.ts +27 -1
  19. package/dist/interactions/lookup-table/index.d.ts +6 -7
  20. package/dist/interactions/mark-the-words/index.d.ts +34 -2
  21. package/dist/interactions/mcq-mrq/index.d.ts +37 -2
  22. package/dist/interactions/nary-choice-table/index.d.ts +7 -13
  23. package/dist/interactions/open-classification/index.d.ts +9 -6
  24. package/dist/interactions/rank-order/index.d.ts +49 -2
  25. package/dist/interactions/registry.d.ts +5 -5
  26. package/dist/interactions/sequential-classification/index.d.ts +8 -6
  27. package/dist/interactions/simultaneous-association/index.d.ts +7 -12
  28. package/dist/{shared/managers → managers}/AnimationsManager.d.ts +6 -1
  29. package/dist/managers/DragAndDropManager.d.ts +37 -0
  30. package/dist/{core/utilities/ProgressTracker.d.ts → managers/ProgressManager.d.ts} +8 -8
  31. package/dist/managers/ScoringManager.d.ts +73 -0
  32. package/dist/managers/index.d.ts +4 -0
  33. package/dist/shared/config.d.ts +1 -1
  34. package/dist/shared/index.d.ts +0 -2
  35. package/dist/shared/utils.d.ts +2 -1
  36. package/dist/shell/builders/index.d.ts +29 -0
  37. package/dist/shell/index.d.ts +2 -1
  38. package/dist/shell/{simple-shell/script.d.ts → interactions/index.d.ts} +8 -7
  39. package/dist/types/Builders.d.ts +17 -0
  40. package/dist/types/Data.d.ts +49 -9
  41. package/dist/types/Global.d.ts +2 -23
  42. package/dist/types/Grading.d.ts +2 -0
  43. package/dist/types/Input.d.ts +12 -16
  44. package/dist/types/Interactions.d.ts +10 -14
  45. package/dist/types/Tables.d.ts +2 -2
  46. package/dist/ui/{misc/block.d.ts → block/index.d.ts} +1 -1
  47. package/dist/ui/{misc/chip/chip.d.ts → chip/index.d.ts} +8 -4
  48. package/dist/ui/{misc/dialog.d.ts → dialog/index.d.ts} +0 -1
  49. package/dist/ui/index.d.ts +4 -1
  50. package/dist/ui/input/index.d.ts +22 -1
  51. package/dist/ui/{misc/media.d.ts → media/index.d.ts} +1 -1
  52. package/package.json +1 -1
  53. package/public/app.js +5874 -8649
  54. package/public/app.js.map +4 -4
  55. package/public/assets/images/landscape.jpg +0 -0
  56. package/public/assets/images/mountains.jpg +0 -0
  57. package/public/builders.html +87 -0
  58. package/public/examples/data.ts +167 -0
  59. package/public/index.html +1008 -779
  60. package/dist/core/utilities/index.d.ts +0 -1
  61. package/dist/engines/tables/implementation/graders.d.ts +0 -23
  62. package/dist/engines/tables/implementation/index.d.ts +0 -4
  63. package/dist/engines/tables/implementation/parsers.d.ts +0 -36
  64. package/dist/engines/tables/implementation/validators.d.ts +0 -9
  65. package/dist/engines/tables/script.d.ts +0 -37
  66. package/dist/engines/text/implementation/graders.d.ts +0 -69
  67. package/dist/engines/text/implementation/index.d.ts +0 -3
  68. package/dist/engines/text/implementation/parsers.d.ts +0 -9
  69. package/dist/engines/text/implementation/validators.d.ts +0 -41
  70. package/dist/engines/text/index.d.ts +0 -2
  71. package/dist/engines/text/script.d.ts +0 -56
  72. package/dist/interactions/categorize-the-words/index.d.ts +0 -2
  73. package/dist/interactions/categorize-the-words/sequential.d.ts +0 -33
  74. package/dist/interactions/categorize-the-words/static.d.ts +0 -22
  75. package/dist/interactions/fill-blanks/sequential.d.ts +0 -32
  76. package/dist/interactions/fill-blanks/static.d.ts +0 -23
  77. package/dist/interactions/list-recall/script.d.ts +0 -25
  78. package/dist/interactions/mark-the-words/sequential.d.ts +0 -34
  79. package/dist/interactions/mark-the-words/static.d.ts +0 -40
  80. package/dist/interactions/mcq-mrq/implementation/grader.d.ts +0 -20
  81. package/dist/interactions/mcq-mrq/implementation/index.d.ts +0 -3
  82. package/dist/interactions/mcq-mrq/implementation/parser.d.ts +0 -21
  83. package/dist/interactions/mcq-mrq/implementation/validator.d.ts +0 -17
  84. package/dist/interactions/mcq-mrq/script.d.ts +0 -37
  85. package/dist/interactions/rank-order/implementation/grader.d.ts +0 -15
  86. package/dist/interactions/rank-order/implementation/index.d.ts +0 -3
  87. package/dist/interactions/rank-order/implementation/parser.d.ts +0 -25
  88. package/dist/interactions/rank-order/implementation/validator.d.ts +0 -3
  89. package/dist/interactions/rank-order/script.d.ts +0 -39
  90. package/dist/interactions/shared/association-implementation/grader.d.ts +0 -3
  91. package/dist/interactions/shared/association-implementation/index.d.ts +0 -1
  92. package/dist/interactions/shared/association-implementation/validator.d.ts +0 -0
  93. package/dist/interactions/shared/classification-implementation/grader.d.ts +0 -3
  94. package/dist/interactions/shared/classification-implementation/index.d.ts +0 -1
  95. package/dist/interactions/shared/classification-implementation/parser.d.ts +0 -11
  96. package/dist/interactions/shared/classification-implementation/validator.d.ts +0 -3
  97. package/dist/interactions/text-transformation/index.d.ts +0 -2
  98. package/dist/interactions/text-transformation/sequential.d.ts +0 -37
  99. package/dist/interactions/text-transformation/static.d.ts +0 -47
  100. package/dist/shared/dsl.d.ts +0 -9
  101. package/dist/shared/managers/index.d.ts +0 -3
  102. package/dist/shared/types.d.ts +0 -25
  103. package/dist/shell/simple-shell/index.d.ts +0 -1
  104. package/dist/types/Text.d.ts +0 -125
  105. package/dist/ui/input/input/index.d.ts +0 -1
  106. package/dist/ui/input/input/input.d.ts +0 -22
  107. package/dist/ui/misc/chip/index.d.ts +0 -1
  108. package/dist/ui/misc/index.d.ts +0 -4
  109. package/public/assets/images/pointing-hand.svg +0 -1
  110. package/public/examples/chip.html +0 -495
  111. package/public/scalable-bare.html +0 -432
  112. package/public/tables-demo.html +0 -534
  113. package/public/text-interactions-demo.html +0 -604
  114. /package/dist/{interactions/list-recall/implementation → builders/list}/index.d.ts +0 -0
  115. /package/dist/{core/utilities/ScoringTracker.d.ts → builders/matching/inde.d.ts} +0 -0
  116. /package/dist/{ui/input/color → builders/ordering}/index.d.ts +0 -0
  117. /package/dist/{ui/input/letter → builders/tables}/index.d.ts +0 -0
  118. /package/dist/{interactions/list-recall/implementation/grader.d.ts → builders/text/index.d.ts} +0 -0
  119. /package/dist/interactions/{list-recall/implementation/parser.d.ts → exp/CategorizeTheWords.d.ts} +0 -0
  120. /package/dist/interactions/{list-recall/implementation/validator.d.ts → exp/DndFillBlanks.d.ts} +0 -0
  121. /package/dist/interactions/{shared/association-implementation/parser.d.ts → exp/TextTransformation.d.ts} +0 -0
  122. /package/dist/{shared/managers → managers}/SoundManager.d.ts +0 -0
  123. /package/dist/ui/{input/color/color-picker.d.ts → exp/color/index.d.ts} +0 -0
  124. /package/dist/ui/{input/letter/letter-picker.d.ts → exp/letter/index.d.ts} +0 -0
@@ -0,0 +1,87 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <meta name="theme-color" content="#f7f9fc">
7
+ <title>CogniKit Builder Shell</title>
8
+ <style>
9
+ :root {
10
+ --edu-bg: 247 249 252;
11
+ --edu-card: 255 255 255;
12
+ --edu-ink: 31 41 55;
13
+ --edu-second-ink: 71 85 105;
14
+ --edu-third-ink: 100 116 139;
15
+ --edu-inverted-ink: 248 250 252;
16
+ --edu-success: 22 163 74;
17
+ --edu-error: 220 38 38;
18
+ --edu-warning: 255 222 33;
19
+ --edu-neutral: 14 165 233;
20
+ --edu-first-accent: 49 120 198;
21
+ --edu-second-accent: 245 158 11;
22
+ --edu-third-accent: 236 72 153;
23
+ --edu-border: 229 231 235;
24
+ --edu-muted: 243 244 246;
25
+ --edu-shadow-color: 0 0 0;
26
+ }
27
+
28
+ * {
29
+ box-sizing: border-box;
30
+ }
31
+
32
+ html,
33
+ body {
34
+ margin: 0;
35
+ width: 100%;
36
+ height: 100%;
37
+ }
38
+
39
+ body {
40
+ font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
41
+ background:
42
+ linear-gradient(180deg, rgb(var(--edu-bg)), rgb(var(--edu-muted) / 0.5));
43
+ color: rgb(var(--edu-ink));
44
+ overflow-x: hidden;
45
+ overflow-y: auto;
46
+ }
47
+
48
+ .page {
49
+ display: grid;
50
+ grid-template-rows: auto auto;
51
+ width: 100%;
52
+ min-height: 100dvh;
53
+ padding: 1.25rem;
54
+ gap: 1rem;
55
+ }
56
+
57
+ .demo-frame {
58
+ border: 1px solid rgb(var(--edu-border));
59
+ background: rgb(var(--edu-card));
60
+ }
61
+
62
+ edu-builder-window {
63
+ display: block;
64
+ width: 100%;
65
+ }
66
+
67
+ @media (max-width: 720px) {
68
+ .page {
69
+ padding: 0.75rem;
70
+ }
71
+
72
+ .page-title {
73
+ font-size: 1.3rem;
74
+ }
75
+ }
76
+ </style>
77
+ </head>
78
+ <body>
79
+ <main class="page">
80
+ <section class="demo-frame">
81
+ <edu-builder-window></edu-builder-window>
82
+ </section>
83
+ </main>
84
+
85
+ <script type="module" src="./app.js"></script>
86
+ </body>
87
+ </html>
@@ -0,0 +1,167 @@
1
+ const ASSETS = [
2
+ mcq: `
3
+ paris:\n type: image\n url: https://plus.unsplash.com/premium_photo-1718035557075-5111d9d906d2?q=80&w=1171&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\n dialog: true
4
+ exampleHtml:
5
+ type: html
6
+ content: <div style="padding:1rem;"><h3>Rich HTML Question</h3><p>What is <strong>2 + 2</strong>?</p><ul><li>Addition</li><li>Basic math</li></ul></div>
7
+ dialog: true
8
+
9
+ movements:\n type: video\n url: https://www.pexels.com/download/video/6548176\n dialog: false
10
+
11
+ laugh:\n type: audio\n url: https://www.soundjay.com/human/sounds/man-laughing-01.mp3\n dialog: true
12
+ `
13
+ ];
14
+
15
+ const CONFIGS = [
16
+ mcq: {
17
+ variant: "letter",
18
+ shuffle: true,
19
+ animationsEnabled: true,
20
+ prompt: "Complete the general knowledge quizz",
21
+ timer: 120,
22
+ attemptLimit: 3,
23
+ points: 100,
24
+ wallpaper: "mountains",
25
+ soundEnabled: true
26
+ },
27
+ nary: {
28
+ variant: "playful",
29
+ shuffle: true,
30
+ animationsEnabled: true,
31
+ prompt: "Set the correct matter state to each element",
32
+ timer: 220,
33
+ attemptLimit: 3,
34
+ points: 50,
35
+ wallpaper: "landscape",
36
+ soundEnabled: true
37
+ },
38
+ classificationMatrix: {
39
+ variant: "sign",
40
+ shuffle: true,
41
+ animationsEnabled: true,
42
+ prompt: "Add the correct attributes to the programming languages",
43
+ timer: 320,
44
+ attemptLimit: 6,
45
+ points: 40,
46
+ wallpaper: "https://images.unsplash.com/photo-1763568258474-7c2330c1a893?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
47
+ soundEnabled: true
48
+ }
49
+ ]
50
+
51
+ const data: Record<string, { data: any, assets: string | null, config: any }>> = [
52
+ nary: {
53
+ data: {
54
+ rows: [
55
+ "Ice",
56
+ "Iron",
57
+ "Diamond",
58
+ "Water",
59
+ "Mercury",
60
+ "Oil",
61
+ "Oxygen",
62
+ "Helium",
63
+ "Steam"
64
+ ],
65
+ cols: [
66
+ "solid",
67
+ "liquid",
68
+ "gas"
69
+ ],
70
+ answerKey: {
71
+ "solid": [
72
+ "Ice",
73
+ "Iron",
74
+ "Diamond"
75
+ ],
76
+ "liquid": [
77
+ "Water",
78
+ "Mercury",
79
+ "Oil"
80
+ ],
81
+ "gas": [
82
+ "Oxygen",
83
+ "Helium",
84
+ "Steam"
85
+ ]
86
+ }
87
+ }
88
+ assets: null,
89
+ config: CONFIGS["nary"]
90
+ },
91
+ classificationMatrix: {
92
+ data: {
93
+ rows: [
94
+ "Python",
95
+ "JavaScript",
96
+ "Ruby",
97
+ "C++",
98
+ "Rust",
99
+ "Go"
100
+ ],
101
+ cols: [
102
+ "interpreted",
103
+ "compiled",
104
+ "strongly_typed",
105
+ "weakly_typed"
106
+ ],
107
+ answerKey: {
108
+ "interpreted": [
109
+ "Python",
110
+ "JavaScript",
111
+ "Ruby"
112
+ ],
113
+ "compiled": [
114
+ "C++",
115
+ "Rust",
116
+ "Go"
117
+ ],
118
+ "strongly_typed": [
119
+ "Python",
120
+ "C++",
121
+ "Rust",
122
+ "Go"
123
+ ],
124
+ "weakly_typed": [
125
+ "JavaScript",
126
+ "Ruby"
127
+ ]
128
+ }
129
+ },
130
+ assets: null,
131
+ config: CONFIGS["classificationMatrix"]
132
+ },
133
+ MCQ: {
134
+ data: {
135
+ type: 'recognition',
136
+ items: [
137
+ {
138
+ question: '@:paris',
139
+ correctOptions: ['Paris'],
140
+ options: ['London', 'Berlin', 'Madrid']
141
+ },
142
+ {
143
+ question: 'Which of these are programming languages?',
144
+ correctOptions: ['Python', 'JavaScript', 'Java'],
145
+ options: ['HTML', 'CSS']
146
+ },
147
+ {
148
+ question: '@:exampleHtml',
149
+ correctOptions: ['4'],
150
+ options: ['3', '5', '6']
151
+ },
152
+ {
153
+ question: '@:movements',
154
+ correctOptions: ['Dancing'],
155
+ options: ['Sleeping', 'Cooking', 'Kissing']
156
+ },
157
+ {
158
+ question: '@:laugh',
159
+ correctOptions: ["laughing"],
160
+ options: ['Crying', 'Shouting']
161
+ }
162
+ ]
163
+ },
164
+ assets: ASSETS["mcq"],
165
+ config: CONFIGS["mcq"]
166
+ }
167
+ ]