Skip to content

Commit 766d335

Browse files
authored
fix perseus-core export (#2093)
## Summary: During [this PR](https://github.com/Khan/perseus/pull/2086/files#diff-8d4fe7798595d9dba9e9dd4bb13ca9fddd009306492ac1e9c46cb2cb1c272380R83) my IDE mistakenly updated `perseus/index.ts` when it shouldn't have. These things were moved to `perseus-core` and shouldn't be exported from `perseus`. Issue: [LEMS-2737](https://khanacademy.atlassian.net/browse/LEMS-2737) [LEMS-2737]: https://khanacademy.atlassian.net/browse/LEMS-2737?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Author: handeyeco Reviewers: jeremywiebe Required Reviewers: Approved By: jeremywiebe Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x) Pull Request URL: #2093
1 parent bc3d955 commit 766d335

File tree

58 files changed

+103
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+103
-140
lines changed

.changeset/plenty-apes-jump.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@khanacademy/perseus": major
3+
"@khanacademy/perseus-dev-ui": patch
4+
"@khanacademy/perseus-editor": patch
5+
---
6+
7+
Remove exports from Perseus that were moved to Perseus-Core

data/find-questions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import fs from "fs";
1111
import path from "path";
1212

13-
import type {PerseusRenderer} from "@khanacademy/perseus";
13+
import type {PerseusRenderer} from "@khanacademy/perseus-core";
1414

1515
// ==========================
1616
// MODIFY THIS WHEN SEARCHING

dev/flipbook-model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import {cache} from "./cache";
55

6-
import type {PerseusRenderer} from "@khanacademy/perseus";
6+
import type {PerseusRenderer} from "@khanacademy/perseus-core";
77

88
export type FlipbookModel = {
99
questions: string;

dev/flipbook.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ import {
3939
} from "./flipbook-model";
4040
import {Header} from "./header";
4141

42+
import type {APIOptions, PerseusScore} from "../packages/perseus/src";
4243
import type {
43-
APIOptions,
44+
InteractiveGraphWidget,
4445
PerseusRenderer,
45-
PerseusScore,
4646
PerseusWidget,
47-
} from "../packages/perseus/src";
48-
import type {InteractiveGraphWidget} from "@khanacademy/perseus-core";
47+
} from "../packages/perseus-core/src/data-schema";
4948
import type {PropsFor} from "@khanacademy/wonder-blocks-core";
50-
5149
import "../packages/perseus/src/styles/perseus-renderer.less";
5250

5351
const exampleCommands = `

dev/gallery.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import * as numberLine from "../packages/perseus/src/widgets/number-line/number-
1919

2020
import {Header} from "./header";
2121

22-
import type {APIOptions, PerseusRenderer} from "../packages/perseus/src";
23-
22+
import type {APIOptions} from "../packages/perseus/src";
2423
import "../packages/perseus/src/styles/perseus-renderer.less";
24+
import type {PerseusRenderer} from "../packages/perseus-core/src/data-schema";
2525

2626
const questions: [PerseusRenderer, number][] = pairWithIndices([
2727
interactiveGraph.segmentQuestion,

packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1+
import {Renderer, type APIOptions, type DeviceType} from "@khanacademy/perseus";
12
import {
2-
Renderer,
3-
type APIOptions,
4-
type DeviceType,
53
type Hint,
64
type PerseusAnswerArea,
75
type PerseusRenderer,
8-
} from "@khanacademy/perseus";
6+
} from "@khanacademy/perseus-core";
97
import Button from "@khanacademy/wonder-blocks-button";
108
import {View} from "@khanacademy/wonder-blocks-core";
119
import IconButton from "@khanacademy/wonder-blocks-icon-button";

packages/perseus-editor/src/__stories__/editor.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {registerAllWidgetsAndEditorsForTesting} from "../util/register-all-widge
1010

1111
import {apiOptionsWithDefaults} from "./flags-for-api-options";
1212

13-
import type {PerseusRenderer} from "@khanacademy/perseus";
13+
import type {PerseusRenderer} from "@khanacademy/perseus-core";
1414

1515
registerAllWidgetsAndEditorsForTesting(); // SIDE_EFFECTY!!!! :cry:
1616

packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ import {registerAllWidgetsAndEditorsForTesting} from "../util/register-all-widge
2929
import EditorPageWithStorybookPreview from "./editor-page-with-storybook-preview";
3030
import {flags} from "./flags-for-api-options";
3131

32+
import type {DeviceType} from "@khanacademy/perseus";
3233
import type {
33-
DeviceType,
3434
Hint,
3535
PerseusAnswerArea,
3636
PerseusRenderer,
37-
} from "@khanacademy/perseus";
37+
} from "@khanacademy/perseus-core";
3838

3939
registerAllWidgetsAndEditorsForTesting(); // SIDE_EFFECTY!!!! :cry:
4040

packages/perseus-editor/src/__testdata__/input-number.testdata.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import type {PerseusRenderer, InputNumberWidget} from "@khanacademy/perseus";
1+
import type {
2+
PerseusRenderer,
3+
InputNumberWidget,
4+
} from "@khanacademy/perseus-core";
25

36
export const question1: PerseusRenderer = {
47
content:

packages/perseus-editor/src/components/__stories__/color-select.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from "react";
33
import ColorSelect from "../../widgets/interactive-graph-editor/locked-figures/color-select";
44
import {getDefaultFigureForType} from "../../widgets/interactive-graph-editor/locked-figures/util";
55

6-
import type {LockedFigureColor} from "@khanacademy/perseus";
6+
import type {LockedFigureColor} from "@khanacademy/perseus-core";
77
import type {Meta} from "@storybook/react";
88

99
export default {

0 commit comments

Comments
 (0)