@khanacademy/perseus 77.1.0 → 77.2.1
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/dist/components/gif-image.d.ts +38 -0
- package/dist/components/svg-image.d.ts +12 -0
- package/dist/es/index.css +2 -2
- package/dist/es/index.css.map +1 -1
- package/dist/es/index.js +24 -19
- package/dist/es/index.js.map +1 -1
- package/dist/es/strings.js +1 -1
- package/dist/es/strings.js.map +1 -1
- package/dist/hint-renderer.d.ts +15 -2
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +100 -7
- package/dist/index.js +24 -18
- package/dist/index.js.map +1 -1
- package/dist/renderer.d.ts +3 -3
- package/dist/strings.d.ts +50 -0
- package/dist/strings.js +1 -1
- package/dist/strings.js.map +1 -1
- package/dist/testing/test-dependencies.d.ts +0 -1
- package/dist/types.d.ts +2 -1
- package/dist/widget-ai-utils/categorizer/categorizer-ai-utils.d.ts +29 -0
- package/dist/widget-ai-utils/definition/definition-ai-utils.d.ts +8 -0
- package/dist/widget-ai-utils/dropdown/dropdown-ai-utils.d.ts +12 -0
- package/dist/widget-ai-utils/explanation/explanation-ai-utils.d.ts +12 -0
- package/dist/widget-ai-utils/expression/expression-ai-utils.d.ts +11 -0
- package/dist/widget-ai-utils/graded-group/graded-group-ai-utils.d.ts +15 -3
- package/dist/widget-ai-utils/graded-group-set/graded-group-set-ai-utils.d.ts +10 -0
- package/dist/widget-ai-utils/grapher/grapher-ai-utils.d.ts +35 -0
- package/dist/widget-ai-utils/group/group-ai-utils.d.ts +6 -0
- package/dist/widget-ai-utils/image/image-ai-utils.d.ts +16 -0
- package/dist/widget-ai-utils/input-number/input-number-ai-utils.d.ts +22 -0
- package/dist/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.d.ts +61 -22
- package/dist/widget-ai-utils/label-image/label-image-ai-utils.d.ts +63 -0
- package/dist/widget-ai-utils/matcher/matcher-ai-utils.d.ts +40 -0
- package/dist/widget-ai-utils/matrix/matrix-ai-utils.d.ts +23 -0
- package/dist/widget-ai-utils/number-line/number-line-ai-utils.d.ts +52 -0
- package/dist/widget-ai-utils/numeric-input/prompt-utils.d.ts +17 -0
- package/dist/widget-ai-utils/orderer/orderer-ai-utils.d.ts +23 -0
- package/dist/widget-ai-utils/prompt-types.d.ts +16 -2
- package/dist/widget-ai-utils/radio/radio-ai-utils.d.ts +38 -0
- package/dist/widget-ai-utils/sorter/sorter-ai-utils.d.ts +19 -0
- package/dist/widget-ai-utils/unsupported-widget.d.ts +6 -5
- package/dist/widgets/dropdown/dropdown.d.ts +1 -1
- package/dist/widgets/expression/expression.d.ts +2 -2
- package/dist/widgets/image/components/explore-image-modal-content.d.ts +1 -1
- package/dist/widgets/image/utils.d.ts +6 -0
- package/dist/widgets/interactive-graphs/graphs/exponential.d.ts +2 -2
- package/dist/widgets/interactive-graphs/graphs/logarithm.d.ts +12 -0
- package/dist/widgets/interactive-graphs/graphs/utils.d.ts +25 -0
- package/dist/widgets/interactive-graphs/interactive-graph-question-builder.d.ts +6 -0
- package/dist/widgets/interactive-graphs/interactive-graph.d.ts +5 -3
- package/dist/widgets/interactive-graphs/reducer/initialize-graph-state.d.ts +5 -1
- package/dist/widgets/interactive-graphs/reducer/interactive-graph-action.d.ts +4 -0
- package/dist/widgets/interactive-graphs/types.d.ts +7 -1
- package/dist/widgets/label-image/label-image.d.ts +1 -1
- package/dist/widgets/mock-widgets/mock-widget.d.ts +1 -1
- package/dist/widgets/numeric-input/numeric-input.class.d.ts +1 -1
- package/dist/widgets/numeric-input/numeric-input.d.ts +1 -1
- package/dist/widgets/table/table.d.ts +1 -1
- package/package.json +10 -9
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
* Main entry point
|
|
3
3
|
*/
|
|
4
4
|
export { default as init } from "./init";
|
|
5
|
-
export { ApiOptions
|
|
5
|
+
export { ApiOptions } from "./perseus-api";
|
|
6
|
+
/** @hidden */
|
|
7
|
+
export { ClassNames } from "./perseus-api";
|
|
8
|
+
/** @hidden */
|
|
6
9
|
export { libVersion } from "./version";
|
|
10
|
+
/** @hidden */
|
|
7
11
|
export { apiVersion } from "./perseus-version";
|
|
12
|
+
/** @hidden */
|
|
8
13
|
export { default as itemVersion } from "./item-version";
|
|
9
14
|
/**
|
|
10
15
|
* Renderers
|
|
@@ -18,17 +23,24 @@ export { default as Renderer } from "./renderer";
|
|
|
18
23
|
* Widgets
|
|
19
24
|
*/
|
|
20
25
|
export * as Widgets from "./widgets";
|
|
26
|
+
/** @hidden */
|
|
21
27
|
export { default as widgets } from "./all-widgets";
|
|
22
28
|
export { Expression } from "./widgets/expression";
|
|
23
29
|
export { default as InputNumber } from "./widgets/input-number";
|
|
24
30
|
export { default as NumericInput } from "./widgets/numeric-input";
|
|
25
31
|
export { default as Radio } from "./widgets/radio";
|
|
26
32
|
export { default as Categorizer } from "./widgets/categorizer";
|
|
33
|
+
/** @hidden */
|
|
27
34
|
export { default as InteractiveGraphWidget } from "./widgets/interactive-graphs/interactive-graph";
|
|
35
|
+
/** @hidden */
|
|
28
36
|
export { default as MatrixWidget } from "./widgets/matrix";
|
|
37
|
+
/** @hidden */
|
|
29
38
|
export { default as TableWidget } from "./widgets/table";
|
|
39
|
+
/** @hidden */
|
|
30
40
|
export { default as PlotterWidget } from "./widgets/plotter";
|
|
41
|
+
/** @hidden */
|
|
31
42
|
export { default as GrapherWidget } from "./widgets/grapher";
|
|
43
|
+
/** @hidden */
|
|
32
44
|
export declare const GrapherUtil: {
|
|
33
45
|
DEFAULT_GRAPHER_PROPS: any;
|
|
34
46
|
chooseType: <T>(list: ReadonlyArray<T>) => T | undefined;
|
|
@@ -39,49 +51,130 @@ export declare const GrapherUtil: {
|
|
|
39
51
|
/**
|
|
40
52
|
* Misc
|
|
41
53
|
*/
|
|
54
|
+
/** @hidden */
|
|
42
55
|
export * as components from "./components";
|
|
56
|
+
/** @hidden */
|
|
43
57
|
export { iconChevronDown, iconTrash } from "./icon-paths";
|
|
58
|
+
/** @hidden */
|
|
44
59
|
export { bodyXsmallBold } from "./styles/global-styles";
|
|
45
60
|
export * as Dependencies from "./dependencies";
|
|
61
|
+
/** @hidden */
|
|
46
62
|
export { Log } from "./logging/log";
|
|
47
63
|
export { default as JiptParagraphs } from "./jipt-paragraphs";
|
|
48
64
|
export { default as LoadingContext } from "./loading-context";
|
|
49
65
|
export { default as MathRenderingContext } from "./math-rendering-context";
|
|
50
66
|
export { default as PerseusMarkdown } from "./perseus-markdown";
|
|
67
|
+
/** @hidden */
|
|
51
68
|
export { interactiveSizes } from "./styles/constants";
|
|
69
|
+
/** @hidden */
|
|
52
70
|
export { displaySigFigs } from "./sigfigs";
|
|
53
71
|
export { DependenciesContext } from "./dependencies";
|
|
54
|
-
export { PerseusI18nContextProvider, PerseusI18nContext,
|
|
72
|
+
export { PerseusI18nContextProvider, PerseusI18nContext, } from "./components/i18n-context";
|
|
73
|
+
/** @hidden */
|
|
74
|
+
export { usePerseusI18n } from "./components/i18n-context";
|
|
55
75
|
/**
|
|
56
76
|
* Util
|
|
57
77
|
*/
|
|
58
78
|
export { default as Util } from "./util";
|
|
79
|
+
/** @hidden */
|
|
59
80
|
export { default as KhanColors } from "./util/colors";
|
|
81
|
+
/** @hidden */
|
|
60
82
|
export { default as preprocessTex } from "./util/tex-preprocess";
|
|
61
83
|
export { registerAllWidgetsForTesting } from "./util/register-all-widgets-for-testing";
|
|
84
|
+
/** @hidden */
|
|
62
85
|
export { containerSizeClass, getInteractiveBoxFromSizeClass, } from "./util/sizing-utils";
|
|
86
|
+
/** @hidden */
|
|
63
87
|
export { mathOnlyParser } from "./widgets/interactive-graphs/utils";
|
|
64
|
-
export { isWrongAnswerSupported, shouldHaveIndividualAnswer,
|
|
88
|
+
export { isWrongAnswerSupported, shouldHaveIndividualAnswer, getCorrectAnswerForWidgetId, getAnswerFromUserInput, getImagesWithoutAltData, } from "./util/extract-perseus-data";
|
|
89
|
+
/** @hidden */
|
|
90
|
+
export { isWidgetIdInContent, getValidWidgetIds, } from "./util/extract-perseus-data";
|
|
65
91
|
export { generateTestCategorizerWidget } from "./util/test-utils";
|
|
66
|
-
export { getWidgetTypeByWidgetId, getWidgetSubTypeByWidgetId,
|
|
92
|
+
export { getWidgetTypeByWidgetId, getWidgetSubTypeByWidgetId, } from "./widget-type-utils";
|
|
93
|
+
/** @hidden */
|
|
94
|
+
export { contentHasWidgetType, getWidgetFromWidgetMap, getWidgetsFromWidgetMap, } from "./widget-type-utils";
|
|
67
95
|
export { convertWidgetNameToEnum } from "./util/widget-enum-utils";
|
|
68
|
-
|
|
96
|
+
/** @hidden */
|
|
97
|
+
export { getAbsoluteValueCoords, getCircleCoords, getExponentialCoords, getLogarithmCoords, getLineCoords, getLinearSystemCoords, getPointCoords, getPolygonCoords, getSegmentCoords, getSinusoidCoords, getTangentCoords, getQuadraticCoords, getAngleCoords, } from "./widgets/interactive-graphs/reducer/initialize-graph-state";
|
|
69
98
|
export { default as UserInputManager, deriveUserInputFromSerializedState, } from "./user-input-manager";
|
|
99
|
+
/** @hidden */
|
|
70
100
|
export { parseDataFromJSONP } from "./util/graphie-utils";
|
|
71
|
-
export type {
|
|
101
|
+
export type {
|
|
102
|
+
/** @hidden */
|
|
103
|
+
GraphieData,
|
|
104
|
+
/** @hidden */
|
|
105
|
+
GraphieLabel,
|
|
106
|
+
/** @hidden */
|
|
107
|
+
GraphieRange, } from "./util/graphie-utils";
|
|
108
|
+
/** @hidden */
|
|
72
109
|
export { extractWidgetIds } from "./util/extract-widget-ids";
|
|
73
110
|
/**
|
|
74
111
|
* Mixins
|
|
75
112
|
*/
|
|
113
|
+
/** @hidden */
|
|
76
114
|
export * as Changeable from "./mixins/changeable";
|
|
115
|
+
/** @hidden */
|
|
77
116
|
export { default as EditorJsonify } from "./mixins/editor-jsonify";
|
|
117
|
+
/** @hidden */
|
|
78
118
|
export { excludeDenylistKeys } from "./mixins/widget-prop-denylist";
|
|
79
119
|
/**
|
|
80
120
|
* Types
|
|
81
121
|
*/
|
|
82
122
|
export type { ILogger, LogErrorOptions } from "./logging/log";
|
|
83
123
|
export type { ServerItemRenderer as ServerItemRendererComponent } from "./server-item-renderer";
|
|
84
|
-
export type { APIOptions,
|
|
124
|
+
export type { APIOptions,
|
|
125
|
+
/** @hidden */
|
|
126
|
+
APIOptionsWithDefaults,
|
|
127
|
+
/** @hidden */
|
|
128
|
+
ChangeHandler,
|
|
129
|
+
/** @hidden */
|
|
130
|
+
DeviceType,
|
|
131
|
+
/** @hidden */
|
|
132
|
+
DomInsertCheckFn,
|
|
133
|
+
/** @hidden */
|
|
134
|
+
EditorMode,
|
|
135
|
+
/** @hidden */
|
|
136
|
+
FocusPath, GenerateUrlArgs,
|
|
137
|
+
/** @hidden */
|
|
138
|
+
GraphieLabelElement,
|
|
139
|
+
/** @hidden */
|
|
140
|
+
ImageDict,
|
|
141
|
+
/** @hidden */
|
|
142
|
+
ImageUploader,
|
|
143
|
+
/** @hidden */
|
|
144
|
+
JiptLabelStore,
|
|
145
|
+
/** @hidden */
|
|
146
|
+
JiptRenderer, PerseusDependencies, PerseusDependenciesV2,
|
|
147
|
+
/** @hidden */
|
|
148
|
+
VideoData,
|
|
149
|
+
/** @hidden */
|
|
150
|
+
VideoKind,
|
|
151
|
+
/** @hidden */
|
|
152
|
+
WidgetExports,
|
|
153
|
+
/** @hidden */
|
|
154
|
+
SharedRendererProps, } from "./types";
|
|
155
|
+
/** @hidden */
|
|
85
156
|
export type { ParsedValue } from "./util";
|
|
157
|
+
/** @hidden */
|
|
86
158
|
export type { Coord } from "./interactive2/types";
|
|
87
159
|
export type { RendererPromptJSON, WidgetPromptJSON, } from "./widget-ai-utils/prompt-types";
|
|
160
|
+
export type { CategorizerPromptJSON } from "./widget-ai-utils/categorizer/categorizer-ai-utils";
|
|
161
|
+
export type { DefinitionPromptJSON } from "./widget-ai-utils/definition/definition-ai-utils";
|
|
162
|
+
export type { DropdownPromptJSON } from "./widget-ai-utils/dropdown/dropdown-ai-utils";
|
|
163
|
+
export type { ExplanationPromptJSON } from "./widget-ai-utils/explanation/explanation-ai-utils";
|
|
164
|
+
export type { ExpressionPromptJSON } from "./widget-ai-utils/expression/expression-ai-utils";
|
|
165
|
+
export type { GradedGroupPromptJSON } from "./widget-ai-utils/graded-group/graded-group-ai-utils";
|
|
166
|
+
export type { GradedGroupSetPromptJSON } from "./widget-ai-utils/graded-group-set/graded-group-set-ai-utils";
|
|
167
|
+
export type { GrapherPromptJSON } from "./widget-ai-utils/grapher/grapher-ai-utils";
|
|
168
|
+
export type { GroupPromptJSON } from "./widget-ai-utils/group/group-ai-utils";
|
|
169
|
+
export type { ImagePromptJSON } from "./widget-ai-utils/image/image-ai-utils";
|
|
170
|
+
export type { InputNumberPromptJSON } from "./widget-ai-utils/input-number/input-number-ai-utils";
|
|
171
|
+
export type { InteractiveGraphPromptJSON } from "./widget-ai-utils/interactive-graph/interactive-graph-ai-utils";
|
|
172
|
+
export type { LabelImagePromptJSON } from "./widget-ai-utils/label-image/label-image-ai-utils";
|
|
173
|
+
export type { MatcherPromptJSON } from "./widget-ai-utils/matcher/matcher-ai-utils";
|
|
174
|
+
export type { MatrixPromptJSON } from "./widget-ai-utils/matrix/matrix-ai-utils";
|
|
175
|
+
export type { NumberLinePromptJSON } from "./widget-ai-utils/number-line/number-line-ai-utils";
|
|
176
|
+
export type { NumericInputPromptJSON } from "./widget-ai-utils/numeric-input/prompt-utils";
|
|
177
|
+
export type { OrdererPromptJSON } from "./widget-ai-utils/orderer/orderer-ai-utils";
|
|
178
|
+
export type { RadioPromptJSON } from "./widget-ai-utils/radio/radio-ai-utils";
|
|
179
|
+
export type { SorterPromptJSON } from "./widget-ai-utils/sorter/sorter-ai-utils";
|
|
180
|
+
export type { UnsupportedWidgetPromptJSON } from "./widget-ai-utils/unsupported-widget";
|