@khanacademy/perseus 19.1.3 → 19.1.5
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/graphie.d.ts +9 -1
- package/dist/es/index.js +275 -174
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +289 -158
- package/dist/index.js.map +1 -1
- package/dist/interactive2/interactive-util.d.ts +2 -2
- package/dist/interactive2/movable-point-options.d.ts +5 -4
- package/dist/interactive2/movable.d.ts +98 -2
- package/dist/interactive2/types.d.ts +6 -0
- package/dist/util/graphie.d.ts +6 -1
- package/dist/widgets/expression.d.ts +4 -4
- package/package.json +3 -3
- package/src/components/graphie.tsx +9 -1
- package/src/interactive2/__tests__/movable-mock.ts +43 -30
- package/src/interactive2/interactive-util.test.ts +93 -0
- package/src/interactive2/interactive-util.ts +19 -15
- package/src/interactive2/movable-helper-methods.ts +7 -2
- package/src/interactive2/movable-line.ts +1 -12
- package/src/interactive2/movable-point-options.ts +31 -19
- package/src/interactive2/movable-point.tsx +1 -9
- package/src/interactive2/movable-polygon.ts +1 -9
- package/src/interactive2/movable.test.ts +249 -0
- package/src/interactive2/movable.ts +313 -150
- package/src/interactive2/types.ts +15 -0
- package/src/interactive2.ts +1 -1
- package/src/util/graphie.ts +13 -1
- package/src/util/interactive.ts +4 -2
- package/tsconfig-build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 19.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#964](https://github.com/Khan/perseus/pull/964) [`d8fbc251`](https://github.com/Khan/perseus/commit/d8fbc25170bd671ad984893553f79f44e3a0d048) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Refactor Movable to be an ES6 class
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`d8fbc251`](https://github.com/Khan/perseus/commit/d8fbc25170bd671ad984893553f79f44e3a0d048), [`ba44dd40`](https://github.com/Khan/perseus/commit/ba44dd405272b066615099c8bd30033715305939)]:
|
|
10
|
+
- @khanacademy/kmath@0.1.11
|
|
11
|
+
- @khanacademy/math-input@17.0.4
|
|
12
|
+
|
|
13
|
+
## 19.1.4
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#958](https://github.com/Khan/perseus/pull/958) [`729b419a`](https://github.com/Khan/perseus/commit/729b419a5c31eaa6ac4da996a0683a2fdffc5997) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Add tests for normalizeOptions function (used by Movable)
|
|
18
|
+
|
|
19
|
+
* [#960](https://github.com/Khan/perseus/pull/960) [`ce0227c1`](https://github.com/Khan/perseus/commit/ce0227c1d7b432b6a9484c32542ddf23d27b1e95) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Add tests for Movable pseudo-class
|
|
20
|
+
|
|
21
|
+
* Updated dependencies [[`a4a4dc44`](https://github.com/Khan/perseus/commit/a4a4dc447037eaea83423dc21a15076435c4b638)]:
|
|
22
|
+
- @khanacademy/math-input@17.0.3
|
|
23
|
+
|
|
3
24
|
## 19.1.3
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -32,6 +32,9 @@ type DefaultProps = {
|
|
|
32
32
|
};
|
|
33
33
|
interface Movable {
|
|
34
34
|
remove(): void;
|
|
35
|
+
props: unknown;
|
|
36
|
+
modify(graphie: GraphieDrawingContext): "reordered" | undefined;
|
|
37
|
+
toFront(): void;
|
|
35
38
|
}
|
|
36
39
|
declare class Graphie extends React.Component<Props> {
|
|
37
40
|
graphieDivRef: React.RefObject<HTMLDivElement>;
|
|
@@ -56,7 +59,12 @@ declare class Graphie extends React.Component<Props> {
|
|
|
56
59
|
_scale: () => Coord;
|
|
57
60
|
_setupGraphie: () => void;
|
|
58
61
|
_removeMovables: () => void;
|
|
59
|
-
_renderMovables: (children: ReadonlyArray<any>, arg2:
|
|
62
|
+
_renderMovables: (children: ReadonlyArray<any>, arg2: {
|
|
63
|
+
nextKey: number;
|
|
64
|
+
graphie: GraphieDrawingContext;
|
|
65
|
+
oldMovables: Record<string, Movable>;
|
|
66
|
+
newMovables: Record<string, Movable>;
|
|
67
|
+
}) => React.ReactElement;
|
|
60
68
|
_updateMovables: () => void;
|
|
61
69
|
render(): React.ReactNode;
|
|
62
70
|
}
|