@khanacademy/perseus 54.1.0 → 55.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.
Files changed (37) hide show
  1. package/LICENSE +18 -0
  2. package/dist/components/number-input.d.ts +9 -10
  3. package/dist/components/range-input.d.ts +5 -6
  4. package/dist/components/simple-keypad-input.d.ts +5 -0
  5. package/dist/components/stub-tag-editor.d.ts +3 -4
  6. package/dist/components/text-list-editor.d.ts +3 -4
  7. package/dist/es/index.css +16 -6
  8. package/dist/es/index.js +901 -985
  9. package/dist/es/index.js.map +1 -1
  10. package/dist/es/strings.js +40 -10
  11. package/dist/es/strings.js.map +1 -1
  12. package/dist/index.css +16 -6
  13. package/dist/index.js +1035 -1086
  14. package/dist/index.js.map +1 -1
  15. package/dist/mixins/changeable.d.ts +1 -2
  16. package/dist/perseus-api.d.ts +1 -56
  17. package/dist/shared-utils/add-library-version-to-perseus-debug.d.ts +9 -0
  18. package/dist/strings.d.ts +34 -4
  19. package/dist/strings.js +142 -97
  20. package/dist/strings.js.map +1 -1
  21. package/dist/widget-ai-utils/numeric-input/prompt-utils.d.ts +1 -1
  22. package/dist/widgets/dropdown/dropdown.d.ts +5 -4
  23. package/dist/widgets/interactive-graph.d.ts +4 -2
  24. package/dist/widgets/interactive-graphs/graphs/circle.d.ts +7 -0
  25. package/dist/widgets/interactive-graphs/graphs/components/movable-line.d.ts +6 -0
  26. package/dist/widgets/interactive-graphs/graphs/quadratic.d.ts +8 -0
  27. package/dist/widgets/interactive-graphs/graphs/sinusoid.d.ts +7 -0
  28. package/dist/widgets/interactive-graphs/interactive-graph-question-builder.d.ts +1 -1
  29. package/dist/widgets/interactive-graphs/stateful-mafs-graph.d.ts +6 -1
  30. package/dist/widgets/numeric-input/index.d.ts +1 -1
  31. package/dist/widgets/numeric-input/input-with-examples.d.ts +8 -0
  32. package/dist/widgets/numeric-input/numeric-input.class.d.ts +66 -0
  33. package/dist/widgets/numeric-input/numeric-input.d.ts +123 -77
  34. package/dist/widgets/numeric-input/utils.d.ts +25 -0
  35. package/package.json +120 -124
  36. package/dist/components/input-with-examples.d.ts +0 -51
  37. package/dist/components/tooltip.d.ts +0 -85
@@ -1,85 +0,0 @@
1
- import * as React from "react";
2
- export declare enum HorizontalDirection {
3
- Left = "left",
4
- Right = "right"
5
- }
6
- export declare enum VerticalDirection {
7
- Top = "top",
8
- Bottom = "bottom"
9
- }
10
- type Props = {
11
- show: boolean;
12
- className: string;
13
- arrowSize: number;
14
- borderColor: string;
15
- verticalPosition: VerticalDirection;
16
- horizontalPosition: HorizontalDirection;
17
- horizontalAlign: HorizontalDirection.Left;
18
- children: React.ReactNode;
19
- targetContainerStyle: any;
20
- };
21
- type DefaultProps = {
22
- className: Props["className"];
23
- arrowSize: Props["arrowSize"];
24
- borderColor: Props["borderColor"];
25
- verticalPosition: Props["verticalPosition"];
26
- horizontalPosition: Props["horizontalPosition"];
27
- horizontalAlign: Props["horizontalAlign"];
28
- targetContainerStyle: Props["targetContainerStyle"];
29
- };
30
- type State = {
31
- height: number | null;
32
- };
33
- /**
34
- * DEPRECATED! Use Wonder Blocks tooltip instead.
35
- *
36
- * A generic tooltip library for React.js
37
- *
38
- * ```
39
- * import Tooltip from "./tooltip";
40
- * <Tooltip
41
- * className="class-for-tooltip-contents"
42
- * horizontalPosition={HoriziontalDirection.Left}
43
- * horizontalAlign={HoriziontalDirection.Left}
44
- * verticalPosition={VerticalDirection.Top}
45
- * arrowSize={10} // arrow size in pixels
46
- * borderColor="#ccc" // color of the border for the tooltip
47
- * show={true} // whether the tooltip should currently be visible
48
- * targetContainerStyle={targetContainerStyle}
49
- * >
50
- * <TargetElementOfTheTooltip />
51
- * <TooltipContents1 />
52
- * <TooltipContents2 />
53
- * </Tooltip>
54
- * ```
55
- *
56
- * To show/hide the tooltip, the parent component should call the
57
- * `.show()` and `.hide()` methods of the tooltip when appropriate.
58
- * (These are usually set up as handlers of events on the target element.)
59
- *
60
- * Notes:
61
- * `className` should not specify a border; that is handled by `borderColor`
62
- * so that the arrow and tooltip match
63
- *
64
- * ```
65
- * __,,--``\\
66
- * _,,-''`` \\ ,
67
- * '----------_.------'-.___|\__
68
- * _.--''`` `)__ )__ @\__
69
- * ( .. ''---/___,,E/__,E'------`
70
- * `-''`''
71
- * Here be dragons.
72
- * ```
73
- */
74
- declare class Tooltip extends React.Component<Props, State> {
75
- tooltipContainerRef: React.RefObject<HTMLDivElement>;
76
- static defaultProps: DefaultProps;
77
- state: State;
78
- componentDidMount(): void;
79
- UNSAFE_componentWillReceiveProps(): void;
80
- componentDidUpdate(): void;
81
- _renderToolTipDiv(isTooltipAbove?: boolean): React.JSX.Element;
82
- _updateHeight(): void;
83
- render(): React.JSX.Element;
84
- }
85
- export default Tooltip;