@khanacademy/perseus 15.0.0 → 16.0.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.
@@ -1,160 +0,0 @@
1
- import type {
2
- InputNumberWidget,
3
- LabelImageWidget,
4
- PerseusItem,
5
- PerseusRenderer,
6
- } from "../perseus-types";
7
-
8
- export const itemWithInput: PerseusItem = {
9
- question: {
10
- content:
11
- "Enter the number $$-42$$ in the box: [[\u2603 input-number 1]]",
12
- images: {},
13
- widgets: {
14
- "input-number 1": {
15
- type: "input-number",
16
- graded: true,
17
- options: {
18
- answerType: "number",
19
- value: "-42",
20
- simplify: "required",
21
- size: "normal",
22
- inexact: false,
23
- maxError: 0.1,
24
- },
25
- } as InputNumberWidget,
26
- },
27
- },
28
- hints: [
29
- {content: "Hint #1", images: {}, widgets: {}},
30
- {content: "Hint #2", images: {}, widgets: {}},
31
- {content: "Hint #3", images: {}, widgets: {}},
32
- ],
33
- answerArea: null,
34
- _multi: null,
35
- itemDataVersion: {major: 0, minor: 0},
36
- answer: null,
37
- };
38
-
39
- export const labelImageItem: PerseusItem = {
40
- answerArea: {
41
- calculator: false,
42
- chi2Table: false,
43
- periodicTable: false,
44
- tTable: false,
45
- zTable: false,
46
- },
47
- _multi: null,
48
- answer: null,
49
- hints: [],
50
- itemDataVersion: {major: 0, minor: 1},
51
- question: {
52
- content:
53
- "Catherine created a chart and a bar graph to show how many dogs of each breed the animal shelter placed into good homes last year. \n\nDog breed | Number of dogs \n:- | :-: \nBulldog | $32$ \nGreyhound | $72$ \nMastiff | $56$ \nCollie | $40$ \n\n**Label each bar on the bar graph.**\n\n[[☃ label-image 1]]\n\n\n\n",
54
- images: {
55
- "web+graphie://ka-perseus-graphie.s3.amazonaws.com/2f60b533892fe6cb9351f704ffdada8ae4bc655c":
56
- {height: 365, width: 503},
57
- "web+graphie://ka-perseus-graphie.s3.amazonaws.com/75f937c6ea133d655dd9f698a58182efd6cc85d4":
58
- {height: 293, width: 331},
59
- },
60
- widgets: {
61
- "label-image 1": {
62
- alignment: "default",
63
- graded: true,
64
- static: false,
65
- type: "label-image",
66
- version: {major: 0, minor: 0},
67
- options: {
68
- choices: ["Bulldog", "Greyhound", "Mastiff", "Collie"],
69
- hideChoicesFromInstructions: true,
70
- imageAlt:
71
- "A bar graph with four bar lines shows the horizontal axis labeled Dog breed and the vertical axis labeled Number of dogs. The vertical axis is labeled from the bottom of the axis to the top of the axis as follows: 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, and 80. The horizontal axis has, from left to right, four unlabeled bar lines as follows: the first unlabeled bar line extends to 56, the second unlabeled bar line extends to 72, the third unlabeled bar line extends to 40, and the fourth unlabeled bar line extends to 32.",
72
- imageHeight: 293,
73
- imageUrl:
74
- "web+graphie://ka-perseus-graphie.s3.amazonaws.com/64ace45942546183c3dc842cb0e9e4f64a312727",
75
- imageWidth: 331,
76
- markers: [
77
- {
78
- answers: ["Bulldog"],
79
- label: "The fourth unlabeled bar line.",
80
- x: 87.3,
81
- y: 90.2,
82
- },
83
- {
84
- answers: ["Collie"],
85
- label: "The third unlabeled bar line.",
86
- x: 67.7,
87
- y: 90.5,
88
- },
89
- {
90
- answers: ["Greyhound"],
91
- label: "The second unlabeled bar line.",
92
- x: 47.7,
93
- y: 90.2,
94
- },
95
- {
96
- answers: ["Mastiff"],
97
- label: "The first unlabeled bar line.",
98
- x: 27.8,
99
- y: 90.5,
100
- },
101
- ],
102
- multipleAnswers: false,
103
- static: false,
104
- },
105
- } as LabelImageWidget,
106
- },
107
- },
108
- };
109
-
110
- // Note that if this item is used, you _must_ first register the MockWidget
111
- export const mockedItem: PerseusItem = {
112
- // The mock widget type is not part of the PerseusWidget type union (and
113
- // we don't want to make it such to avoid polluting our production types
114
- // for test purposes) so we force TypeScript to accept it here.
115
- // @ts-expect-error - TS2352 - Conversion of type '{ content: string; images: {}; widgets: { "mock-widget 1": { graded: true; version: { major: number; minor: number; }; static: false; type: "mock-widget"; options: { static: false; smiling: boolean; }; alignment: string; }; "mock-widget 2": { ...; }; "mock-widget 3": { ...; }; "mock-widget 4": { ...; }; }; }' to type 'PerseusRenderer' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
116
- question: {
117
- content:
118
- "Mock widget ==> [[\u2603 mock-widget 1]] [[\u2603 mock-widget 2]] [[\u2603 mock-widget 3]] [[\u2603 mock-widget 4]]",
119
- images: {},
120
- widgets: {
121
- "mock-widget 1": {
122
- graded: true,
123
- version: {major: 0, minor: 0},
124
- static: false,
125
- type: "mock-widget",
126
- options: {static: false, smiling: true},
127
- alignment: "default",
128
- },
129
- "mock-widget 2": {
130
- graded: true,
131
- version: {major: 0, minor: 0},
132
- static: false,
133
- type: "mock-widget",
134
- options: {static: false, smiling: false},
135
- alignment: "default",
136
- },
137
- "mock-widget 3": {
138
- graded: true,
139
- version: {major: 0, minor: 0},
140
- static: false,
141
- type: "mock-widget",
142
- options: {static: false, smiling: true},
143
- alignment: "default",
144
- },
145
- "mock-widget 4": {
146
- graded: true,
147
- version: {major: 0, minor: 0},
148
- static: false,
149
- type: "mock-widget",
150
- options: {static: false, smiling: false},
151
- alignment: "default",
152
- },
153
- },
154
- } as PerseusRenderer,
155
- hints: [],
156
- answerArea: null,
157
- _multi: null,
158
- itemDataVersion: {major: 0, minor: 0},
159
- answer: null,
160
- };