@khanacademy/perseus-editor 35.2.2 → 35.4.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 (93) hide show
  1. package/dist/all-editors.d.ts +5 -5
  2. package/dist/components/a11y-context.d.ts +24 -0
  3. package/dist/components/issues-panel.d.ts +38 -6
  4. package/dist/components/show-me-issue.d.ts +8 -3
  5. package/dist/editor-page.d.ts +11 -7
  6. package/dist/es/index.css +4 -4
  7. package/dist/es/index.js +58 -52
  8. package/dist/es/index.js.map +1 -1
  9. package/dist/index.css +4 -4
  10. package/dist/index.js +57 -52
  11. package/dist/index.js.map +1 -1
  12. package/dist/item-editor.d.ts +9 -5
  13. package/dist/preview/a11y/map-axe-results.d.ts +13 -0
  14. package/dist/preview/a11y/overlays.d.ts +22 -0
  15. package/dist/preview/message-types.d.ts +75 -4
  16. package/dist/preview/use-preview-controller.d.ts +21 -0
  17. package/dist/preview/use-preview-presenter.d.ts +19 -1
  18. package/dist/preview-with-iframe.d.ts +15 -0
  19. package/dist/util/derive-device-api-options.d.ts +14 -0
  20. package/dist/util/derive-question-preview-content.d.ts +23 -0
  21. package/dist/widgets/categorizer-editor/index.d.ts +1 -0
  22. package/dist/widgets/cs-program-editor/index.d.ts +1 -0
  23. package/dist/widgets/{definition-editor.d.ts → definition-editor/definition-editor.d.ts} +1 -1
  24. package/dist/widgets/definition-editor/index.d.ts +1 -0
  25. package/dist/widgets/deprecated-standin-editor/index.d.ts +1 -0
  26. package/dist/widgets/dropdown-editor/index.d.ts +1 -0
  27. package/dist/widgets/explanation-editor/index.d.ts +1 -0
  28. package/dist/widgets/expression-editor/index.d.ts +1 -0
  29. package/dist/widgets/free-response-editor/index.d.ts +1 -0
  30. package/dist/widgets/{graded-group-editor.d.ts → graded-group-editor/graded-group-editor.d.ts} +1 -1
  31. package/dist/widgets/graded-group-editor/index.d.ts +1 -0
  32. package/dist/widgets/graded-group-set-editor/index.d.ts +1 -0
  33. package/dist/widgets/grapher-editor/index.d.ts +1 -0
  34. package/dist/widgets/{group-editor.d.ts → group-editor/group-editor.d.ts} +1 -1
  35. package/dist/widgets/group-editor/index.d.ts +1 -0
  36. package/dist/widgets/iframe-editor/index.d.ts +1 -0
  37. package/dist/widgets/image-editor/index.d.ts +1 -0
  38. package/dist/widgets/input-number-editor/index.d.ts +1 -0
  39. package/dist/widgets/{input-number-editor.d.ts → input-number-editor/input-number-editor.d.ts} +1 -1
  40. package/dist/widgets/interaction-editor/index.d.ts +1 -2
  41. package/dist/widgets/interactive-graph-editor/index.d.ts +1 -0
  42. package/dist/widgets/interactive-graph-editor/interactive-graph-editor.d.ts +30 -43
  43. package/dist/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.d.ts +2 -2
  44. package/dist/widgets/interactive-graph-editor/locked-figures/line-stroke-select.d.ts +15 -5
  45. package/dist/widgets/interactive-graph-editor/locked-figures/polygon-swatch.d.ts +2 -2
  46. package/dist/widgets/interactive-graph-editor/locked-figures/util.d.ts +2 -2
  47. package/dist/widgets/label-image-editor/index.d.ts +1 -0
  48. package/dist/widgets/matcher-editor/index.d.ts +1 -0
  49. package/dist/widgets/matrix-editor/index.d.ts +1 -0
  50. package/dist/widgets/measurer-editor/index.d.ts +1 -0
  51. package/dist/widgets/number-line-editor/index.d.ts +1 -0
  52. package/dist/widgets/numeric-input-editor/index.d.ts +1 -0
  53. package/dist/widgets/orderer-editor/index.d.ts +1 -0
  54. package/dist/widgets/phet-simulation-editor/index.d.ts +1 -0
  55. package/dist/widgets/plotter-editor/index.d.ts +1 -0
  56. package/dist/widgets/python-program-editor/index.d.ts +1 -0
  57. package/dist/widgets/radio-editor/index.d.ts +1 -0
  58. package/dist/widgets/radio-editor/radio-editor.mockData.d.ts +80 -0
  59. package/dist/widgets/sorter-editor/index.d.ts +1 -0
  60. package/dist/widgets/storybook-constants.d.ts +1 -0
  61. package/dist/widgets/table-editor/index.d.ts +1 -0
  62. package/dist/widgets/video-editor/index.d.ts +1 -0
  63. package/package.json +44 -44
  64. package/dist/util/a11y-checker.d.ts +0 -1
  65. /package/dist/{util → preview/a11y}/a11y-issues-list.d.ts +0 -0
  66. /package/dist/widgets/{categorizer-editor.d.ts → categorizer-editor/categorizer-editor.d.ts} +0 -0
  67. /package/dist/widgets/{cs-program-editor.d.ts → cs-program-editor/cs-program-editor.d.ts} +0 -0
  68. /package/dist/widgets/{deprecated-standin-editor.d.ts → deprecated-standin-editor/deprecated-standin-editor.d.ts} +0 -0
  69. /package/dist/widgets/{dropdown-editor.d.ts → dropdown-editor/dropdown-editor.d.ts} +0 -0
  70. /package/dist/widgets/{explanation-editor.d.ts → explanation-editor/explanation-editor.d.ts} +0 -0
  71. /package/dist/widgets/{expression-editor.d.ts → expression-editor/expression-editor.d.ts} +0 -0
  72. /package/dist/widgets/{free-response-editor.d.ts → free-response-editor/free-response-editor.d.ts} +0 -0
  73. /package/dist/widgets/{graded-group-set-editor.d.ts → graded-group-set-editor/graded-group-set-editor.d.ts} +0 -0
  74. /package/dist/widgets/{grapher-editor.d.ts → grapher-editor/grapher-editor.d.ts} +0 -0
  75. /package/dist/widgets/{iframe-editor.d.ts → iframe-editor/iframe-editor.d.ts} +0 -0
  76. /package/dist/widgets/{matcher-editor.d.ts → matcher-editor/matcher-editor.d.ts} +0 -0
  77. /package/dist/widgets/{matrix-editor.d.ts → matrix-editor/matrix-editor.d.ts} +0 -0
  78. /package/dist/widgets/{measurer-editor.d.ts → measurer-editor/measurer-editor.d.ts} +0 -0
  79. /package/dist/widgets/{number-line-editor.d.ts → number-line-editor/number-line-editor.d.ts} +0 -0
  80. /package/dist/widgets/{numeric-input-editor.d.ts → numeric-input-editor/numeric-input-editor.d.ts} +0 -0
  81. /package/dist/widgets/{orderer-editor.d.ts → orderer-editor/orderer-editor.d.ts} +0 -0
  82. /package/dist/widgets/{phet-simulation-editor.d.ts → phet-simulation-editor/phet-simulation-editor.d.ts} +0 -0
  83. /package/dist/widgets/{plotter-editor.d.ts → plotter-editor/plotter-editor.d.ts} +0 -0
  84. /package/dist/widgets/{python-program-editor.d.ts → python-program-editor/python-program-editor.d.ts} +0 -0
  85. /package/dist/widgets/{radio/editor.d.ts → radio-editor/radio-editor.d.ts} +0 -0
  86. /package/dist/widgets/{radio → radio-editor}/radio-image-editor.d.ts +0 -0
  87. /package/dist/widgets/{radio → radio-editor}/radio-option-content-and-image-editor.d.ts +0 -0
  88. /package/dist/widgets/{radio → radio-editor}/radio-option-settings-actions.d.ts +0 -0
  89. /package/dist/widgets/{radio → radio-editor}/radio-option-settings.d.ts +0 -0
  90. /package/dist/widgets/{radio → radio-editor}/radio-status-pill.d.ts +0 -0
  91. /package/dist/widgets/{radio → radio-editor}/utils.d.ts +0 -0
  92. /package/dist/widgets/{sorter-editor.d.ts → sorter-editor/sorter-editor.d.ts} +0 -0
  93. /package/dist/widgets/{table-editor.d.ts → table-editor/table-editor.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { type LockedFigureColor, type LockedFigureFillType, type LockedLabelType, type LockedLineStyle, type StrokeWeight } from "@khanacademy/perseus-core";
2
- export declare function generateLockedFigureAppearanceDescription(color: LockedFigureColor, strokeStyle?: LockedLineStyle, fill?: LockedFigureFillType, weight?: StrokeWeight): string;
1
+ import { type LockedFigureColor, type LockedFigureFillType, type LockedFigureStrokeStyle, type LockedLabelType, type StrokeWeight } from "@khanacademy/perseus-core";
2
+ export declare function generateLockedFigureAppearanceDescription(color: LockedFigureColor, strokeStyle?: LockedFigureStrokeStyle, fill?: LockedFigureFillType, weight?: StrokeWeight): string;
3
3
  /**
4
4
  * Given a string that may contain math within TeX represented by $...$,
5
5
  * returns the spoken math equivalent using the SpeechRuleEngine.
@@ -0,0 +1 @@
1
+ export { default } from "./label-image-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./matcher-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./matrix-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./measurer-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./number-line-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./numeric-input-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./orderer-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./phet-simulation-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./plotter-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./python-program-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./radio-editor";
@@ -0,0 +1,80 @@
1
+ export declare const mockIds: string[];
2
+ export declare const singleChoice: {
3
+ id: string;
4
+ content: string;
5
+ };
6
+ export declare const threeChoicesWithCorrect: ({
7
+ id: string;
8
+ content: string;
9
+ correct?: undefined;
10
+ } | {
11
+ id: string;
12
+ content: string;
13
+ correct: boolean;
14
+ })[];
15
+ export declare const threeChoicesWithCorrectAndNoneOfTheAbove: ({
16
+ id: string;
17
+ content: string;
18
+ correct: boolean;
19
+ isNoneOfTheAbove?: undefined;
20
+ } | {
21
+ id: string;
22
+ content: string;
23
+ correct?: undefined;
24
+ isNoneOfTheAbove?: undefined;
25
+ } | {
26
+ id: string;
27
+ content: string;
28
+ isNoneOfTheAbove: boolean;
29
+ correct?: undefined;
30
+ })[];
31
+ export declare const fourChoices: {
32
+ id: string;
33
+ content: string;
34
+ }[];
35
+ export declare const fourChoicesWithAllIncorrect: {
36
+ id: string;
37
+ content: string;
38
+ correct: boolean;
39
+ }[];
40
+ export declare const fourChoicesWithFirstCorrect: {
41
+ id: string;
42
+ content: string;
43
+ correct: boolean;
44
+ }[];
45
+ export declare const fourChoicesWithSecondCorrect: {
46
+ id: string;
47
+ content: string;
48
+ correct: boolean;
49
+ }[];
50
+ export declare const fourChoicesWithTwoCorrect: {
51
+ id: string;
52
+ content: string;
53
+ correct: boolean;
54
+ }[];
55
+ export declare const fourChoicesWithNoneOfTheAboveAndCorrect: ({
56
+ id: string;
57
+ content: string;
58
+ correct?: undefined;
59
+ } | {
60
+ id: string;
61
+ content: string;
62
+ correct: boolean;
63
+ } | {
64
+ id: string;
65
+ content: string;
66
+ isNoneOfTheAbove: boolean;
67
+ })[];
68
+ export declare const fourChoicesWithOneChoice1A: {
69
+ id: string;
70
+ content: string;
71
+ }[];
72
+ export declare const fourChoicesWithOneRationale: ({
73
+ id: string;
74
+ content: string;
75
+ rationale: string;
76
+ } | {
77
+ id: string;
78
+ content: string;
79
+ rationale?: undefined;
80
+ })[];
@@ -0,0 +1 @@
1
+ export { default } from "./sorter-editor";
@@ -0,0 +1 @@
1
+ export declare const PROD_EDITOR_WIDTH = 330;
@@ -0,0 +1 @@
1
+ export { default } from "./table-editor";
@@ -0,0 +1 @@
1
+ export { default } from "./video-editor";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Perseus editors",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "35.2.2",
6
+ "version": "35.4.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -35,36 +35,36 @@
35
35
  "katex": "0.11.1",
36
36
  "mafs": "^0.19.0",
37
37
  "tiny-invariant": "1.3.1",
38
- "@khanacademy/kas": "2.2.5",
39
- "@khanacademy/keypad-context": "3.2.79",
40
- "@khanacademy/kmath": "2.4.38",
41
- "@khanacademy/math-input": "26.6.8",
42
- "@khanacademy/perseus": "83.0.0",
43
- "@khanacademy/perseus-core": "34.0.1",
44
- "@khanacademy/perseus-linter": "5.1.19",
38
+ "@khanacademy/kas": "2.2.6",
39
+ "@khanacademy/keypad-context": "3.2.81",
40
+ "@khanacademy/kmath": "2.4.40",
41
+ "@khanacademy/math-input": "27.0.1",
42
+ "@khanacademy/perseus": "83.1.0",
43
+ "@khanacademy/perseus-core": "34.1.0",
44
+ "@khanacademy/perseus-linter": "5.1.21",
45
45
  "@khanacademy/perseus-utils": "2.1.5"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@khanacademy/mathjax-renderer": "3.1.4",
49
- "@khanacademy/wonder-blocks-accordion": "3.1.68",
50
- "@khanacademy/wonder-blocks-badge": "1.1.20",
51
- "@khanacademy/wonder-blocks-banner": "5.1.10",
52
- "@khanacademy/wonder-blocks-button": "11.7.6",
53
- "@khanacademy/wonder-blocks-clickable": "8.2.8",
49
+ "@khanacademy/wonder-blocks-accordion": "3.1.69",
50
+ "@khanacademy/wonder-blocks-badge": "1.1.21",
51
+ "@khanacademy/wonder-blocks-banner": "5.1.11",
52
+ "@khanacademy/wonder-blocks-button": "11.7.7",
53
+ "@khanacademy/wonder-blocks-clickable": "8.2.9",
54
54
  "@khanacademy/wonder-blocks-core": "12.4.4",
55
- "@khanacademy/wonder-blocks-dropdown": "10.11.7",
56
- "@khanacademy/wonder-blocks-form": "7.6.9",
57
- "@khanacademy/wonder-blocks-icon": "5.3.22",
58
- "@khanacademy/wonder-blocks-icon-button": "11.4.4",
59
- "@khanacademy/wonder-blocks-labeled-field": "4.1.8",
60
- "@khanacademy/wonder-blocks-layout": "3.1.59",
61
- "@khanacademy/wonder-blocks-link": "10.3.8",
62
- "@khanacademy/wonder-blocks-pill": "3.1.72",
63
- "@khanacademy/wonder-blocks-switch": "3.4.8",
55
+ "@khanacademy/wonder-blocks-dropdown": "10.11.8",
56
+ "@khanacademy/wonder-blocks-form": "7.6.10",
57
+ "@khanacademy/wonder-blocks-icon": "5.3.23",
58
+ "@khanacademy/wonder-blocks-icon-button": "11.4.5",
59
+ "@khanacademy/wonder-blocks-labeled-field": "4.1.9",
60
+ "@khanacademy/wonder-blocks-layout": "3.1.60",
61
+ "@khanacademy/wonder-blocks-link": "10.3.9",
62
+ "@khanacademy/wonder-blocks-pill": "3.1.73",
63
+ "@khanacademy/wonder-blocks-switch": "3.4.9",
64
64
  "@khanacademy/wonder-blocks-timing": "7.1.0",
65
- "@khanacademy/wonder-blocks-tokens": "17.2.0",
66
- "@khanacademy/wonder-blocks-tooltip": "4.2.0",
67
- "@khanacademy/wonder-blocks-typography": "5.0.2",
65
+ "@khanacademy/wonder-blocks-tokens": "17.3.0",
66
+ "@khanacademy/wonder-blocks-tooltip": "4.2.1",
67
+ "@khanacademy/wonder-blocks-typography": "5.0.3",
68
68
  "@khanacademy/wonder-stuff-core": "3.0.0",
69
69
  "@phosphor-icons/core": "2.0.2",
70
70
  "aphrodite": "1.2.5",
@@ -75,29 +75,29 @@
75
75
  "react-dom": "18.2.0",
76
76
  "underscore": "1.4.4",
77
77
  "jsdiff": "1.0.2",
78
- "perseus-build-settings": "0.9.0"
78
+ "perseus-build-settings": "0.9.1"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "@khanacademy/mathjax-renderer": "^3.1.4",
82
- "@khanacademy/wonder-blocks-accordion": "^3.1.68",
83
- "@khanacademy/wonder-blocks-badge": "^1.1.20",
84
- "@khanacademy/wonder-blocks-banner": "^5.1.10",
85
- "@khanacademy/wonder-blocks-button": "^11.7.6",
86
- "@khanacademy/wonder-blocks-clickable": "^8.2.8",
82
+ "@khanacademy/wonder-blocks-accordion": "^3.1.69",
83
+ "@khanacademy/wonder-blocks-badge": "^1.1.21",
84
+ "@khanacademy/wonder-blocks-banner": "^5.1.11",
85
+ "@khanacademy/wonder-blocks-button": "^11.7.7",
86
+ "@khanacademy/wonder-blocks-clickable": "^8.2.9",
87
87
  "@khanacademy/wonder-blocks-core": "^12.4.4",
88
- "@khanacademy/wonder-blocks-dropdown": "^10.11.7",
89
- "@khanacademy/wonder-blocks-form": "^7.6.9",
90
- "@khanacademy/wonder-blocks-icon": "^5.3.22",
91
- "@khanacademy/wonder-blocks-icon-button": "^11.4.4",
92
- "@khanacademy/wonder-blocks-labeled-field": "^4.1.8",
93
- "@khanacademy/wonder-blocks-layout": "^3.1.59",
94
- "@khanacademy/wonder-blocks-link": "^10.3.8",
95
- "@khanacademy/wonder-blocks-pill": "^3.1.72",
96
- "@khanacademy/wonder-blocks-switch": "^3.4.8",
88
+ "@khanacademy/wonder-blocks-dropdown": "^10.11.8",
89
+ "@khanacademy/wonder-blocks-form": "^7.6.10",
90
+ "@khanacademy/wonder-blocks-icon": "^5.3.23",
91
+ "@khanacademy/wonder-blocks-icon-button": "^11.4.5",
92
+ "@khanacademy/wonder-blocks-labeled-field": "^4.1.9",
93
+ "@khanacademy/wonder-blocks-layout": "^3.1.60",
94
+ "@khanacademy/wonder-blocks-link": "^10.3.9",
95
+ "@khanacademy/wonder-blocks-pill": "^3.1.73",
96
+ "@khanacademy/wonder-blocks-switch": "^3.4.9",
97
97
  "@khanacademy/wonder-blocks-timing": "^7.1.0",
98
- "@khanacademy/wonder-blocks-tokens": "^17.2.0",
99
- "@khanacademy/wonder-blocks-tooltip": "^4.2.0",
100
- "@khanacademy/wonder-blocks-typography": "^5.0.2",
98
+ "@khanacademy/wonder-blocks-tokens": "^17.3.0",
99
+ "@khanacademy/wonder-blocks-tooltip": "^4.2.1",
100
+ "@khanacademy/wonder-blocks-typography": "^5.0.3",
101
101
  "@khanacademy/wonder-stuff-core": "^3.0.0",
102
102
  "@phosphor-icons/core": "^2.0.2",
103
103
  "aphrodite": "^1.2.5",
@@ -110,7 +110,7 @@
110
110
  },
111
111
  "keywords": [],
112
112
  "khan": {
113
- "catalogHash": "39ba316e4306b578"
113
+ "catalogHash": "d7dbbe60b9cbfe1a"
114
114
  },
115
115
  "scripts": {}
116
116
  }
@@ -1 +0,0 @@
1
- export declare const runAxeCoreOnUpdate: (priorTimeoutId: any, setState: any, logToConsole: boolean) => any;
File without changes