@khanacademy/perseus-core 3.4.0 → 3.5.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.
@@ -0,0 +1,4 @@
1
+ import type { PerseusGrapherWidgetOptions } from "../../data-schema";
2
+ type GrapherPublicWidgetOptions = Pick<PerseusGrapherWidgetOptions, "availableTypes" | "graph">;
3
+ export default function getGrapherPublicWidgetOptions(options: PerseusGrapherWidgetOptions): GrapherPublicWidgetOptions;
4
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { PerseusIFrameWidgetOptions } from "../../data-schema";
2
+ export default function getIFramePublicWidgetOptions(options: PerseusIFrameWidgetOptions): PerseusIFrameWidgetOptions;
@@ -0,0 +1,4 @@
1
+ import type { PerseusInteractiveGraphWidgetOptions } from "@khanacademy/perseus-core";
2
+ type InteractiveGraphPublicWidgetOptions = Pick<PerseusInteractiveGraphWidgetOptions, "step" | "gridStep" | "snapStep" | "backgroundImage" | "markings" | "labels" | "showProtractor" | "showRuler" | "showTooltips" | "rulerLabel" | "rulerTicks" | "range" | "graph" | "lockedFigures" | "fullGraphAriaLabel" | "fullGraphAriaDescription">;
3
+ export default function getInteractiveGraphPublicWidgetOptions(options: PerseusInteractiveGraphWidgetOptions): InteractiveGraphPublicWidgetOptions;
4
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { PerseusMatrixWidgetOptions } from "@khanacademy/perseus-core";
2
+ type MatrixPublicWidgetOptions = Pick<PerseusMatrixWidgetOptions, "prefix" | "suffix" | "cursorPosition" | "matrixBoardSize" | "static">;
3
+ export default function getMatrixPublicWidgetOptions(options: PerseusMatrixWidgetOptions): MatrixPublicWidgetOptions;
4
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { PerseusPlotterWidgetOptions } from "@khanacademy/perseus-core";
2
+ /**
3
+ * For details on the individual options, see the
4
+ * PerseusPlotterWidgetOptions type
5
+ */
6
+ type PlotterPublicWidgetOptions = Omit<PerseusPlotterWidgetOptions, "correct">;
7
+ /**
8
+ * Given a PerseusPlotterWidgetOptions object, return a new object with only
9
+ * the public options that should be exposed to the client.
10
+ */
11
+ declare function getPlotterPublicWidgetOptions(options: PerseusPlotterWidgetOptions): PlotterPublicWidgetOptions;
12
+ export default getPlotterPublicWidgetOptions;
@@ -0,0 +1,26 @@
1
+ import type { PerseusRadioChoice, PerseusRadioWidgetOptions } from "@khanacademy/perseus-core";
2
+ /**
3
+ * For details on the individual options, see the
4
+ * PerseusRadioWidgetOptions type
5
+ */
6
+ type RadioPublicWidgetOptions = {
7
+ choices: ReadonlyArray<RadioChoicePublicData>;
8
+ hasNoneOfTheAbove?: PerseusRadioWidgetOptions["hasNoneOfTheAbove"];
9
+ countChoices?: PerseusRadioWidgetOptions["countChoices"];
10
+ randomize?: PerseusRadioWidgetOptions["randomize"];
11
+ multipleSelect?: PerseusRadioWidgetOptions["multipleSelect"];
12
+ deselectEnabled?: PerseusRadioWidgetOptions["deselectEnabled"];
13
+ onePerLine?: PerseusRadioWidgetOptions["onePerLine"];
14
+ displayCount?: PerseusRadioWidgetOptions["displayCount"];
15
+ noneOfTheAbove?: PerseusRadioWidgetOptions["noneOfTheAbove"];
16
+ };
17
+ /**
18
+ * Only the options from each Radio choice that should be exposed to the client.
19
+ */
20
+ type RadioChoicePublicData = Pick<PerseusRadioChoice, "content" | "isNoneOfTheAbove" | "widgets">;
21
+ /**
22
+ * Given a PerseusRadioWidgetOptions object, return a new object with only
23
+ * the public options that should be exposed to the client.
24
+ */
25
+ declare function getRadioPublicWidgetOptions(options: PerseusRadioWidgetOptions): RadioPublicWidgetOptions;
26
+ export default getRadioPublicWidgetOptions;
@@ -0,0 +1,4 @@
1
+ import type { PerseusTableWidgetOptions } from "@khanacademy/perseus-core";
2
+ type TablePublicWidgetOptions = Pick<PerseusTableWidgetOptions, "headers" | "rows" | "columns">;
3
+ export default function getTablePublicWidgetOptions(options: PerseusTableWidgetOptions): TablePublicWidgetOptions;
4
+ export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Shared Perseus infrastructure",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "3.4.0",
6
+ "version": "3.5.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },