@khanacademy/perseus 30.0.0 → 30.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.
@@ -7,18 +7,15 @@ import { PerseusI18nContext } from "./components/i18n-context";
7
7
  import { DependenciesContext } from "./dependencies";
8
8
  import Renderer from "./renderer";
9
9
  import type { PerseusRenderer } from "./perseus-types";
10
- import type { APIOptions, PerseusDependenciesV2 } from "./types";
10
+ import type { PerseusDependenciesV2, SharedRendererProps } from "./types";
11
11
  import type { KeypadAPI } from "@khanacademy/math-input";
12
12
  import type { KeypadContextRendererInterface } from "@khanacademy/perseus-core";
13
- import type { LinterContextProps } from "@khanacademy/perseus-linter";
14
- type Props = Partial<React.ContextType<typeof DependenciesContext>> & {
15
- apiOptions: APIOptions;
13
+ type Props = Partial<React.ContextType<typeof DependenciesContext>> & SharedRendererProps & {
16
14
  json: PerseusRenderer | ReadonlyArray<PerseusRenderer>;
17
15
  /**
18
16
  * @deprecated Does nothing
19
17
  */
20
18
  useNewStyles: boolean;
21
- linterContext: LinterContextProps;
22
19
  legacyPerseusLint?: ReadonlyArray<string>;
23
20
  keypadElement?: KeypadAPI | null | undefined;
24
21
  dependencies: PerseusDependenciesV2;
package/dist/es/index.js CHANGED
@@ -247,7 +247,10 @@ const mockStrings = {
247
247
  somethingWrong: "Something went wrong.",
248
248
  videoWrapper: "Khan Academy video wrapper",
249
249
  mathInputTitle: "mathematics keyboard",
250
- mathInputDescription: "Use keyboard/mouse to interact with math-based input fields"
250
+ mathInputDescription: "Use keyboard/mouse to interact with math-based input fields",
251
+ sin: "sin",
252
+ cos: "cos",
253
+ tan: "tan"
251
254
  };
252
255
 
253
256
  /**
@@ -328,7 +331,7 @@ class InnerMathInput extends React.Component {
328
331
  const {
329
332
  locale
330
333
  } = this.context;
331
- const customKeyTranslator = _extends({}, getKeyTranslator(locale), {
334
+ const customKeyTranslator = _extends({}, getKeyTranslator(locale, this.context.strings), {
332
335
  // If there's something in the input that can become part of a
333
336
  // fraction, typing "/" puts it in the numerator. If not, typing
334
337
  // "/" does nothing. In that case, enter a \frac.
@@ -447,7 +450,7 @@ class InnerMathInput extends React.Component {
447
450
  const {
448
451
  locale
449
452
  } = this.context;
450
- const translator = getKeyTranslator(locale)[key];
453
+ const translator = getKeyTranslator(locale, this.context.strings)[key];
451
454
  const mathField = this.mathField();
452
455
  if (mathField) {
453
456
  if (translator) {
@@ -44273,7 +44276,7 @@ const init = function init(options) {
44273
44276
 
44274
44277
  // This file is processed by a Rollup plugin (replace) to inject the production
44275
44278
  const libName = "@khanacademy/perseus";
44276
- const libVersion = "30.0.0";
44279
+ const libVersion = "30.0.1";
44277
44280
  addLibraryVersionToPerseusDebug(libName, libVersion);
44278
44281
 
44279
44282
  const apiVersion = {