@khanacademy/perseus-editor 45.0.5 → 45.0.6
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/diffs/widget-diff.d.ts +1 -3
- package/dist/index.js +27 -23
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -6,7 +6,5 @@ type WidgetDiffProps = {
|
|
|
6
6
|
title: string;
|
|
7
7
|
type: PerseusWidget["type"] | undefined;
|
|
8
8
|
};
|
|
9
|
-
declare
|
|
10
|
-
render(): React.ReactNode;
|
|
11
|
-
}
|
|
9
|
+
declare function WidgetDiff(props: WidgetDiffProps): React.JSX.Element;
|
|
12
10
|
export default WidgetDiff;
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ import Yn from "@phosphor-icons/core/regular/arrow-up.svg";
|
|
|
69
69
|
var Xn = Object.defineProperty, __name = (e, t) => Xn(e, "name", {
|
|
70
70
|
value: t,
|
|
71
71
|
configurable: !0
|
|
72
|
-
}), Zn = "@khanacademy/perseus-editor", Qn = "45.0.
|
|
72
|
+
}), Zn = "@khanacademy/perseus-editor", Qn = "45.0.6";
|
|
73
73
|
e(Zn, Qn);
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region packages/perseus-editor/src/styles/constants.ts
|
|
@@ -4059,28 +4059,32 @@ var ci = "unchanged", li = "changed", ui = "added", di = "removed", valueEntry =
|
|
|
4059
4059
|
};
|
|
4060
4060
|
}, performDiff = function(e, t, n) {
|
|
4061
4061
|
return typeof e == "object" || typeof t == "object" ? objectEntry(e, t, n) : valueEntry(e, t, n);
|
|
4062
|
-
}
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
}
|
|
4062
|
+
};
|
|
4063
|
+
//#endregion
|
|
4064
|
+
//#region packages/perseus-editor/src/diffs/widget-diff.tsx
|
|
4065
|
+
function WidgetDiff(e) {
|
|
4066
|
+
let { after: t, before: n, title: r, type: i } = e, a = performDiff(n || {}, t || {});
|
|
4067
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
4068
|
+
/* @__PURE__ */ w("div", {
|
|
4069
|
+
className: "diff-header",
|
|
4070
|
+
children: r
|
|
4071
|
+
}),
|
|
4072
|
+
/* @__PURE__ */ w("div", {
|
|
4073
|
+
className: "diff-header",
|
|
4074
|
+
children: r
|
|
4075
|
+
}),
|
|
4076
|
+
/* @__PURE__ */ T("div", {
|
|
4077
|
+
className: "diff-body",
|
|
4078
|
+
children: [i === "image" && /* @__PURE__ */ w(ImageWidgetDiff, {
|
|
4079
|
+
before: n,
|
|
4080
|
+
after: t
|
|
4081
|
+
}), /* @__PURE__ */ w(si, { entry: a })]
|
|
4082
|
+
})
|
|
4083
|
+
] });
|
|
4084
|
+
}
|
|
4085
|
+
//#endregion
|
|
4086
|
+
//#region packages/perseus-editor/src/diffs/renderer-diff.tsx
|
|
4087
|
+
var fi, filterWidgetInfo = function(e, t) {
|
|
4084
4088
|
if (e == null) return;
|
|
4085
4089
|
let { alignment: n, options: r, type: i } = e, a = { options: r };
|
|
4086
4090
|
return t && Ce.getSupportedAlignments(i).length > 1 && (a.alignment = n), v.supportsStaticMode(i) && (a.static = e?.static ?? void 0), a;
|