@khanacademy/perseus-editor 13.0.1 → 13.1.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.
- package/dist/content-preview.d.ts +22 -0
- package/dist/es/index.js +15 -23
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graph-editor.d.ts +2 -92
- package/package.json +36 -35
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type APIOptions, type DeviceType, type PerseusRenderer } from "@khanacademy/perseus";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { LinterContextProps } from "@khanacademy/perseus-linter";
|
|
4
|
+
/**
|
|
5
|
+
* The `ContentPreview` component provides a simple preview system for Perseus
|
|
6
|
+
* Content. Due to how Persus styles are built, the preview styling matches the
|
|
7
|
+
* current device based on the viewport width (using `@media` queries for
|
|
8
|
+
* `min-width` and `max-width`).
|
|
9
|
+
*
|
|
10
|
+
* The preview will render the mobile variant (styling and layout) when the
|
|
11
|
+
* `previewDevice` is phone or tablet. Note that the styling cannot be matched
|
|
12
|
+
* 100% due to the above `@media` query limitation.
|
|
13
|
+
*/
|
|
14
|
+
declare function ContentPreview({ question, apiOptions, seamless, linterContext, legacyPerseusLint, previewDevice, }: {
|
|
15
|
+
question?: PerseusRenderer;
|
|
16
|
+
apiOptions?: APIOptions;
|
|
17
|
+
seamless?: boolean;
|
|
18
|
+
linterContext?: LinterContextProps;
|
|
19
|
+
legacyPerseusLint?: ReadonlyArray<string>;
|
|
20
|
+
previewDevice: DeviceType;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
export default ContentPreview;
|
package/dist/es/index.js
CHANGED
|
@@ -41,22 +41,17 @@ import arrowCounterClockwise from '@phosphor-icons/core/bold/arrow-counter-clock
|
|
|
41
41
|
|
|
42
42
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
43
43
|
const libName = "@khanacademy/perseus-editor";
|
|
44
|
-
const libVersion = "13.0
|
|
44
|
+
const libVersion = "13.1.0";
|
|
45
45
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
46
46
|
|
|
47
47
|
function _extends() {
|
|
48
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
49
|
-
for (var
|
|
50
|
-
var
|
|
51
|
-
for (var
|
|
52
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
53
|
-
target[key] = source[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
48
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
49
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
50
|
+
var t = arguments[e];
|
|
51
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
56
52
|
}
|
|
57
|
-
return
|
|
58
|
-
};
|
|
59
|
-
return _extends.apply(this, arguments);
|
|
53
|
+
return n;
|
|
54
|
+
}, _extends.apply(null, arguments);
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
const SCREEN_SIZES = {
|
|
@@ -20561,17 +20556,14 @@ const DragTarget = createReactClass({
|
|
|
20561
20556
|
}
|
|
20562
20557
|
});
|
|
20563
20558
|
|
|
20564
|
-
function _objectWithoutPropertiesLoose(
|
|
20565
|
-
if (
|
|
20566
|
-
var
|
|
20567
|
-
var
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
|
|
20571
|
-
|
|
20572
|
-
target[key] = source[key];
|
|
20573
|
-
}
|
|
20574
|
-
return target;
|
|
20559
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
20560
|
+
if (null == r) return {};
|
|
20561
|
+
var t = {};
|
|
20562
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
20563
|
+
if (e.includes(n)) continue;
|
|
20564
|
+
t[n] = r[n];
|
|
20565
|
+
}
|
|
20566
|
+
return t;
|
|
20575
20567
|
}
|
|
20576
20568
|
|
|
20577
20569
|
const mediaDefaultSpecLargeMarginWidth = spacing.large_24;
|