@khanacademy/perseus-editor 45.0.5 → 45.0.7

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.
@@ -6,7 +6,5 @@ type WidgetDiffProps = {
6
6
  title: string;
7
7
  type: PerseusWidget["type"] | undefined;
8
8
  };
9
- declare class WidgetDiff extends React.Component<WidgetDiffProps> {
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.5";
72
+ }), Zn = "@khanacademy/perseus-editor", Qn = "45.0.7";
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
- }, WidgetDiff = class extends S.Component {
4063
- render() {
4064
- let { after: e, before: t, title: n, type: r } = this.props, i = performDiff(t || {}, e || {});
4065
- return /* @__PURE__ */ T(C, { children: [
4066
- /* @__PURE__ */ w("div", {
4067
- className: "diff-header",
4068
- children: n
4069
- }),
4070
- /* @__PURE__ */ w("div", {
4071
- className: "diff-header",
4072
- children: n
4073
- }),
4074
- /* @__PURE__ */ T("div", {
4075
- className: "diff-body",
4076
- children: [r === "image" && /* @__PURE__ */ w(ImageWidgetDiff, {
4077
- before: t,
4078
- after: e
4079
- }), /* @__PURE__ */ w(si, { entry: i })]
4080
- })
4081
- ] });
4082
- }
4083
- }, fi, filterWidgetInfo = function(e, t) {
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;