@pie-element/inline-dropdown 10.1.2-next.1 → 10.1.2-next.2
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/browser/{Close-CMvmRhfL.js → Close-ihSzAQyP.js} +2146 -2139
- package/dist/browser/Close-ihSzAQyP.js.map +1 -0
- package/dist/browser/author/index.js +11 -11
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +18 -18
- package/dist/index.iife.js +34 -34
- package/package.json +8 -9
- package/dist/browser/Close-CMvmRhfL.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ft as e, L as t, Nt as n, Rt as r, S as i, a, d as o, f as s, ft as c, ht as l, i as u, j as d, k as f, m as p, n as m, o as h, p as g, pt as _, t as v, v as y, w as b } from "../Close-ihSzAQyP.js";
|
|
2
2
|
import { _ as x, o as S } from "../dist-CAsDMEWi.js";
|
|
3
3
|
import C, { useRef as w } from "react";
|
|
4
4
|
import { createRoot as T } from "react-dom/client";
|
|
@@ -34,7 +34,7 @@ var te = class e extends CustomEvent {
|
|
|
34
34
|
}
|
|
35
35
|
}), this.component = t, this.complete = n;
|
|
36
36
|
}
|
|
37
|
-
}, k = /* @__PURE__ */ r(
|
|
37
|
+
}, k = /* @__PURE__ */ r(n(), 1), re = "height ease-in 300ms, opacity ease-in 300ms", ie = l("div")(() => ({
|
|
38
38
|
position: "relative",
|
|
39
39
|
height: 0,
|
|
40
40
|
overflow: "hidden",
|
|
@@ -2186,8 +2186,8 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
|
|
|
2186
2186
|
containerRef: k.default.oneOfType([k.default.func, k.default.shape({ current: k.default.instanceOf(Element) })])
|
|
2187
2187
|
};
|
|
2188
2188
|
componentDidMount() {
|
|
2189
|
-
let
|
|
2190
|
-
|
|
2189
|
+
let t = this.props.containerRef || this.internalContainerRef;
|
|
2190
|
+
t.current && typeof e == "function" && e(t.current);
|
|
2191
2191
|
}
|
|
2192
2192
|
handleChange = (e, t) => {
|
|
2193
2193
|
let n = {
|
|
@@ -2238,7 +2238,7 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
|
|
|
2238
2238
|
renderChildren: t(this.props)
|
|
2239
2239
|
});
|
|
2240
2240
|
}
|
|
2241
|
-
}, sn =
|
|
2241
|
+
}, sn = t(/*#__PURE__*/ D("path", { d: "m7 10 5 5 5-5z" }), "ArrowDropDown"), cn = t(/*#__PURE__*/ D("path", { d: "m7 14 5-5 5 5z" }), "ArrowDropUp");
|
|
2242
2242
|
//#endregion
|
|
2243
2243
|
//#region ../../lib-react/mask-markup/dist/components/dropdown.js
|
|
2244
2244
|
function J(e) {
|
|
@@ -2384,17 +2384,17 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
|
|
|
2384
2384
|
componentDidMount() {
|
|
2385
2385
|
this.hiddenRef.current && this.state.menuWidth === null && this.setState({ menuWidth: this.hiddenRef.current.clientWidth });
|
|
2386
2386
|
}
|
|
2387
|
-
componentDidUpdate(
|
|
2387
|
+
componentDidUpdate(t, n) {
|
|
2388
2388
|
let r = this.hiddenRef.current;
|
|
2389
|
-
if (!
|
|
2390
|
-
if (!
|
|
2391
|
-
let
|
|
2392
|
-
|
|
2389
|
+
if (!n.anchorEl && this.state.anchorEl && this.elementRefs.forEach((t) => {
|
|
2390
|
+
if (!t) return;
|
|
2391
|
+
let n = t.querySelector("[data-latex], [data-raw]"), r = t.querySelector("mjx-container"), i = t.querySelector("[data-math-handled=\"true\"]");
|
|
2392
|
+
n && (!i || !r) && e(t);
|
|
2393
2393
|
}), r) {
|
|
2394
|
-
let
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
}),
|
|
2394
|
+
let t = r.clientWidth;
|
|
2395
|
+
t !== this.state.menuWidth && (this.elementRefs.forEach((t) => {
|
|
2396
|
+
t && e(t);
|
|
2397
|
+
}), e(r), this.setState({ menuWidth: t }));
|
|
2398
2398
|
}
|
|
2399
2399
|
}
|
|
2400
2400
|
handleClick = (e) => {
|
|
@@ -2606,7 +2606,7 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
|
|
|
2606
2606
|
S(e.feedback) && this.setState({ showCorrectAnswer: !1 });
|
|
2607
2607
|
}
|
|
2608
2608
|
componentDidUpdate() {
|
|
2609
|
-
|
|
2609
|
+
e(E.findDOMNode(this));
|
|
2610
2610
|
}
|
|
2611
2611
|
toggleShowCorrect = () => {
|
|
2612
2612
|
this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
|
|
@@ -2675,7 +2675,7 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
|
|
|
2675
2675
|
}
|
|
2676
2676
|
_render = () => {
|
|
2677
2677
|
if (this._model && this._session) {
|
|
2678
|
-
let
|
|
2678
|
+
let t = C.createElement(Nn, {
|
|
2679
2679
|
model: this._model,
|
|
2680
2680
|
prompt: this._model.prompt,
|
|
2681
2681
|
rationale: this._model.rationale,
|
|
@@ -2690,8 +2690,8 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
|
|
|
2690
2690
|
language: this._model.language,
|
|
2691
2691
|
onChange: this.changeSession
|
|
2692
2692
|
});
|
|
2693
|
-
this.setLangAttribute(), this._root ||= T(this), this._root.render(
|
|
2694
|
-
|
|
2693
|
+
this.setLangAttribute(), this._root ||= T(this), this._root.render(t), queueMicrotask(() => {
|
|
2694
|
+
e(this);
|
|
2695
2695
|
});
|
|
2696
2696
|
}
|
|
2697
2697
|
};
|