@khanacademy/perseus-editor 10.0.0 → 11.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.
@@ -0,0 +1 @@
1
+ export declare const clone: <T>(obj: T) => T;
@@ -563,12 +563,7 @@ declare const InteractiveGraph: {
563
563
  _lineStroke: () => {
564
564
  "stroke-width"?: number | undefined;
565
565
  };
566
- addLine: (arg1: string) => void; /**
567
- * The type of markings to display on the graph.
568
- * - graph: shows the axes and the grid lines
569
- * - grid: shows only the grid lines
570
- * - none: shows no markings
571
- */
566
+ addLine: (arg1: string) => void;
572
567
  removeLine: () => void;
573
568
  addLinearControls: () => void;
574
569
  removeLinearControls: () => void;
@@ -584,9 +579,7 @@ declare const InteractiveGraph: {
584
579
  removeLinearSystemControls: () => void;
585
580
  isCoordInTrash: (arg1: import("@khanacademy/perseus").Coord) => boolean;
586
581
  createPointForPointsType: (arg1: import("@khanacademy/perseus").Coord, arg2: number) => any;
587
- removePoint: (arg1: import("@khanacademy/perseus").Coord) => number | null | undefined; /**
588
- * The number of ticks to display on the ruler.
589
- */
582
+ removePoint: (arg1: import("@khanacademy/perseus").Coord) => number | null | undefined;
590
583
  createPointForPolygonType: (arg1: import("@khanacademy/perseus").Coord, arg2: number) => any;
591
584
  updateCoordsFromPoints: () => void;
592
585
  clearCoords: () => void;
@@ -595,14 +588,20 @@ declare const InteractiveGraph: {
595
588
  removePointControls: () => void;
596
589
  addSegmentControls: () => void;
597
590
  removeSegmentControls: () => void;
598
- addRayControls: () => void;
591
+ addRayControls: () => void; /**
592
+ * The locked figures to display in the graph area.
593
+ * Locked figures are graph elements (points, lines, line segmeents,
594
+ * etc.) that are locked in place and not interactive.
595
+ */
599
596
  removeRayControls: () => void;
600
597
  addPolygonControls: () => void;
601
598
  updatePolygon: () => void;
602
599
  removePolygonControls: () => void;
603
600
  addAngleControls: () => void;
604
601
  removeAngleControls: () => void;
605
- toggleShowSides: () => void;
602
+ toggleShowSides: () => void; /**
603
+ * The graph to display in the graph area.
604
+ */
606
605
  getUserInput(): import("@khanacademy/perseus").PerseusGraphType;
607
606
  simpleValidate(rubric: import("../../../perseus/src/widgets/interactive-graph").Rubric): import("@khanacademy/perseus").PerseusScore;
608
607
  focus: () => void;
@@ -2325,12 +2324,7 @@ declare const InteractiveGraph: {
2325
2324
  _lineStroke: () => {
2326
2325
  "stroke-width"?: number | undefined;
2327
2326
  };
2328
- addLine: (arg1: string) => void; /**
2329
- * The type of markings to display on the graph.
2330
- * - graph: shows the axes and the grid lines
2331
- * - grid: shows only the grid lines
2332
- * - none: shows no markings
2333
- */
2327
+ addLine: (arg1: string) => void;
2334
2328
  removeLine: () => void;
2335
2329
  addLinearControls: () => void;
2336
2330
  removeLinearControls: () => void;
@@ -2346,9 +2340,7 @@ declare const InteractiveGraph: {
2346
2340
  removeLinearSystemControls: () => void;
2347
2341
  isCoordInTrash: (arg1: import("@khanacademy/perseus").Coord) => boolean;
2348
2342
  createPointForPointsType: (arg1: import("@khanacademy/perseus").Coord, arg2: number) => any;
2349
- removePoint: (arg1: import("@khanacademy/perseus").Coord) => number | null | undefined; /**
2350
- * The number of ticks to display on the ruler.
2351
- */
2343
+ removePoint: (arg1: import("@khanacademy/perseus").Coord) => number | null | undefined;
2352
2344
  createPointForPolygonType: (arg1: import("@khanacademy/perseus").Coord, arg2: number) => any;
2353
2345
  updateCoordsFromPoints: () => void;
2354
2346
  clearCoords: () => void;
@@ -2357,14 +2349,20 @@ declare const InteractiveGraph: {
2357
2349
  removePointControls: () => void;
2358
2350
  addSegmentControls: () => void;
2359
2351
  removeSegmentControls: () => void;
2360
- addRayControls: () => void;
2352
+ addRayControls: () => void; /**
2353
+ * The locked figures to display in the graph area.
2354
+ * Locked figures are graph elements (points, lines, line segmeents,
2355
+ * etc.) that are locked in place and not interactive.
2356
+ */
2361
2357
  removeRayControls: () => void;
2362
2358
  addPolygonControls: () => void;
2363
2359
  updatePolygon: () => void;
2364
2360
  removePolygonControls: () => void;
2365
2361
  addAngleControls: () => void;
2366
2362
  removeAngleControls: () => void;
2367
- toggleShowSides: () => void;
2363
+ toggleShowSides: () => void; /**
2364
+ * The graph to display in the graph area.
2365
+ */
2368
2366
  getUserInput(): import("@khanacademy/perseus").PerseusGraphType;
2369
2367
  simpleValidate(rubric: import("../../../perseus/src/widgets/interactive-graph").Rubric): import("@khanacademy/perseus").PerseusScore;
2370
2368
  focus: () => void;
@@ -3621,9 +3619,6 @@ declare const InteractiveGraph: {
3621
3619
  markings: "grid" | "none" | "graph";
3622
3620
  showTooltips: boolean | undefined;
3623
3621
  showProtractor: boolean;
3624
- showRuler: boolean;
3625
- rulerLabel: string;
3626
- rulerTicks: number;
3627
3622
  graph: import("@khanacademy/perseus").PerseusGraphType;
3628
3623
  };
3629
3624
  getQuadraticCoefficients(coords: readonly import("@khanacademy/perseus").Coord[]): import("../../../perseus/src/util/geometry").QuadraticCoefficient;
@@ -5682,23 +5677,11 @@ export type Props = {
5682
5677
  * Whether to show the protractor on the graph.
5683
5678
  */
5684
5679
  showProtractor: boolean;
5685
- /**
5686
- * Whether to show the ruler on the graph.
5687
- */
5688
- showRuler: boolean;
5689
5680
  /**
5690
5681
  * Whether to show tooltips on the graph.
5691
5682
  * (Currently not used, but will be in the future.)
5692
5683
  */
5693
5684
  showTooltips: boolean;
5694
- /**
5695
- * The label to display on the ruler, if any.
5696
- */
5697
- rulerLabel: string;
5698
- /**
5699
- * The number of ticks to display on the ruler.
5700
- */
5701
- rulerTicks: number;
5702
5685
  /**
5703
5686
  * The current correct answer for the graph. Updated by this component
5704
5687
  * when the graph is changed.
@@ -5729,10 +5712,7 @@ type DefaultProps = {
5729
5712
  backgroundImage: Props["backgroundImage"];
5730
5713
  markings: Props["markings"];
5731
5714
  showProtractor: Props["showProtractor"];
5732
- showRuler: Props["showRuler"];
5733
5715
  showTooltips: Props["showTooltips"];
5734
- rulerLabel: Props["rulerLabel"];
5735
- rulerTicks: Props["rulerTicks"];
5736
5716
  correct: Props["correct"];
5737
5717
  };
5738
5718
  /**
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Perseus editors",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "10.0.0",
6
+ "version": "11.0.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -25,10 +25,10 @@
25
25
  "test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
26
26
  },
27
27
  "dependencies": {
28
- "@khanacademy/kas": "^0.3.10",
28
+ "@khanacademy/kas": "^0.3.11",
29
29
  "@khanacademy/kmath": "^0.1.13",
30
- "@khanacademy/math-input": "^20.0.1",
31
- "@khanacademy/perseus": "^26.1.0",
30
+ "@khanacademy/math-input": "^20.0.2",
31
+ "@khanacademy/perseus": "^27.0.1",
32
32
  "@khanacademy/perseus-core": "1.5.0"
33
33
  },
34
34
  "devDependencies": {
@@ -1,9 +0,0 @@
1
- import * as React from "react";
2
- import type { PerseusGraphType, Range, CollinearTuple } from "@khanacademy/perseus";
3
- type Props = PerseusGraphType & {
4
- range: [x: Range, y: Range];
5
- step: [x: number, y: number];
6
- onChange: (startCoords: CollinearTuple) => void;
7
- };
8
- declare const StartCoordSettings: (props: Props) => React.JSX.Element | null;
9
- export default StartCoordSettings;
@@ -1,33 +0,0 @@
1
- import PropTypes from "prop-types";
2
- import * as React from "react";
3
- declare const ALL: "all";
4
- declare const SOME: "some";
5
- type UnitExampleProps = any;
6
- type UnitInputEditorProps = any;
7
- declare class UnitInputEditor extends React.Component<UnitInputEditorProps> {
8
- parsed: boolean | null | undefined;
9
- groupId: string;
10
- original: any | null | undefined;
11
- static propTypes: {
12
- value: PropTypes.Requireable<string>;
13
- acceptingUnits: PropTypes.Requireable<(string | null | undefined)[]>;
14
- accepting: PropTypes.Requireable<"some" | "all">;
15
- sigfigs: PropTypes.Requireable<number>;
16
- onChange: PropTypes.Validator<(...args: any[]) => any>;
17
- };
18
- static widgetName: "unit-input";
19
- static defaultProps: UnitInputEditorProps;
20
- constructor(props: UnitExampleProps);
21
- UNSAFE_componentWillReceiveProps(nextProps: UnitInputEditorProps): void;
22
- change: (arg1: any, arg2: any, arg3: any) => any;
23
- handleAcceptingUnitsChange: (arg1: React.ChangeEvent<HTMLInputElement>) => void;
24
- handleSigfigChange: (arg1: number) => void;
25
- _checkSigfigValidity: (arg1: number) => boolean;
26
- _setAccepting: (arg1: typeof SOME | typeof ALL) => void;
27
- _doOriginal: (arg1: UnitExampleProps) => void;
28
- onChange: (arg1: React.ChangeEvent<HTMLInputElement>) => void;
29
- getSaveWarnings: () => ReadonlyArray<string>;
30
- serialize: () => any;
31
- render(): React.ReactNode;
32
- }
33
- export default UnitInputEditor;