@khanacademy/perseus 9.0.0 → 10.0.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/CHANGELOG.md +21 -0
- package/dist/components/info-tip.d.ts +2 -1
- package/dist/components/input-with-examples.d.ts +1 -1
- package/dist/components/sortable.d.ts +1 -1
- package/dist/es/index.css +3 -5
- package/dist/es/index.js +17 -16
- package/dist/es/index.js.map +1 -1
- package/dist/hint-renderer.d.ts +2 -1
- package/dist/hints-renderer.d.ts +2 -1
- package/dist/index.css +3 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/item-renderer.d.ts +2 -1
- package/dist/multi-items/multi-renderer.d.ts +2 -1
- package/dist/renderer.d.ts +3 -8
- package/dist/types.d.ts +1 -6
- package/dist/widget-container.d.ts +2 -1
- package/dist/widgets/expression.d.ts +8 -8
- package/dist/widgets/grapher.d.ts +2 -1
- package/dist/widgets/passage-ref.d.ts +2 -1
- package/package.json +2 -2
- package/src/__tests__/mock-asset-loading-widget.tsx +3 -2
- package/src/__tests__/renderer.test.tsx +0 -2
- package/src/__tests__/server-item-renderer.test.tsx +2 -4
- package/src/__tests__/widgets.test.ts +73 -0
- package/src/components/info-tip.tsx +3 -4
- package/src/components/input-with-examples.tsx +1 -1
- package/src/components/sortable.tsx +1 -1
- package/src/hint-renderer.tsx +2 -1
- package/src/hints-renderer.tsx +2 -9
- package/src/index.ts +0 -1
- package/src/item-renderer.tsx +2 -7
- package/src/multi-items/multi-renderer.tsx +2 -7
- package/src/renderer.tsx +3 -3
- package/src/server-item-renderer.tsx +0 -1
- package/src/types.ts +1 -8
- package/src/widget-container.tsx +2 -1
- package/src/widgets/__tests__/renderQuestion.tsx +3 -11
- package/src/widgets/expression.tsx +15 -7
- package/src/widgets/grapher.tsx +4 -12
- package/src/widgets/passage-ref.tsx +1 -1
- package/tsconfig-build.tsbuildinfo +1 -1
package/src/widgets/grapher.tsx
CHANGED
|
@@ -36,6 +36,7 @@ import type {ChangeableProps} from "../mixins/changeable";
|
|
|
36
36
|
import type {PerseusGrapherWidgetOptions} from "../perseus-types";
|
|
37
37
|
import type {PerseusScore, WidgetExports, WidgetProps} from "../types";
|
|
38
38
|
import type {GridDimensions} from "../util";
|
|
39
|
+
import type {PropsFor} from "@khanacademy/wonder-blocks-core";
|
|
39
40
|
|
|
40
41
|
// @ts-expect-error - TS2339 - Property 'MovablePoint' does not exist on type 'typeof Graphie'.
|
|
41
42
|
const MovablePoint = Graphie.MovablePoint;
|
|
@@ -473,18 +474,9 @@ class Grapher extends React.Component<Props> {
|
|
|
473
474
|
}
|
|
474
475
|
|
|
475
476
|
_calculateMobileTickStep(
|
|
476
|
-
gridStep:
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
>["gridStep"],
|
|
480
|
-
step: JSX.LibraryManagedAttributes<
|
|
481
|
-
typeof Graphie,
|
|
482
|
-
Required<React.ComponentProps<typeof Graphie>>
|
|
483
|
-
>["step"],
|
|
484
|
-
ranges: JSX.LibraryManagedAttributes<
|
|
485
|
-
typeof Graphie,
|
|
486
|
-
Required<React.ComponentProps<typeof Graphie>>
|
|
487
|
-
>["ranges"],
|
|
477
|
+
gridStep: NonNullable<PropsFor<typeof Graphie>["gridStep"]>,
|
|
478
|
+
step: NonNullable<PropsFor<typeof Graphie>["step"]>,
|
|
479
|
+
ranges: NonNullable<PropsFor<typeof Graphie>["ranges"]>,
|
|
488
480
|
): any {
|
|
489
481
|
const tickStep = Util.constrainedTickStepsFromTickSteps(step, ranges);
|
|
490
482
|
|
|
@@ -13,9 +13,9 @@ import type {
|
|
|
13
13
|
PerseusScore,
|
|
14
14
|
WidgetExports,
|
|
15
15
|
WidgetProps,
|
|
16
|
-
LinterContextProps,
|
|
17
16
|
} from "../types";
|
|
18
17
|
import type {Passage, Reference} from "./passage";
|
|
18
|
+
import type {LinterContextProps} from "@khanacademy/perseus-linter";
|
|
19
19
|
|
|
20
20
|
const EN_DASH = "\u2013";
|
|
21
21
|
|