@pie-lib/render-ui 8.0.2-next.20261006160832 → 8.0.2-next.20261007003844
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/preview-prompt.js +10 -10
- package/package.json +2 -2
package/dist/preview-prompt.js
CHANGED
|
@@ -7,23 +7,23 @@ import { jsx as l } from "react/jsx-runtime";
|
|
|
7
7
|
import { renderMath as u } from "@pie-element/shared-math-rendering-mathjax";
|
|
8
8
|
import d from "@pie-lib/translator";
|
|
9
9
|
//#region src/preview-prompt.tsx
|
|
10
|
-
var { translator: f } = d, p = "pie-prompt-audio-player", m = "play-audio-button", h = c("div")(({ theme: i, tagName: a }) => ({
|
|
10
|
+
var { translator: f } = d, p = "pie-prompt-audio-player", m = "play-audio-button", h = (e) => `&:not(.MathJax) > table${e}, &:not(.MathJax) > .pie-table-scroll > table${e}`, g = c("div")(({ theme: i, tagName: a }) => ({
|
|
11
11
|
[`& .${m}:focus-visible`]: {
|
|
12
12
|
outline: `2px solid ${e()}`,
|
|
13
13
|
outlineOffset: "2px"
|
|
14
14
|
},
|
|
15
|
-
"
|
|
15
|
+
[h(":not([role=\"presentation\"])")]: { borderCollapse: "collapse" },
|
|
16
16
|
"&:not(.MathJax) table[border]:not([role=\"presentation\"]), &:not(.MathJax) table[border]:not([role=\"presentation\"]) td, &:not(.MathJax) table[border]:not([role=\"presentation\"]) th": {
|
|
17
17
|
borderStyle: "solid",
|
|
18
18
|
borderColor: t()
|
|
19
19
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
[h(":not([role=\"presentation\"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)")]: { backgroundColor: n() },
|
|
21
|
+
[h(":not([role=\"presentation\"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td")]: { backgroundColor: n() },
|
|
22
22
|
"&:not(.MathJax) table:not([role=\"presentation\"]) td, &:not(.MathJax) table:not([role=\"presentation\"]) th": {
|
|
23
23
|
padding: ".6em 1em",
|
|
24
24
|
textAlign: "left"
|
|
25
25
|
},
|
|
26
|
-
"
|
|
26
|
+
[h(" td > p.kds-indent")]: { textAlign: "initial" },
|
|
27
27
|
"&.prompt": {
|
|
28
28
|
verticalAlign: "middle",
|
|
29
29
|
color: r()
|
|
@@ -44,7 +44,7 @@ var { translator: f } = d, p = "pie-prompt-audio-player", m = "play-audio-button
|
|
|
44
44
|
cursor: "pointer",
|
|
45
45
|
"& > p": { margin: "0 0 0 0 !important" }
|
|
46
46
|
}
|
|
47
|
-
})),
|
|
47
|
+
})), _ = /\\embed\{newLine\}\[\]/g, v = "\\newline ", y = "preview-prompt", b = class extends o {
|
|
48
48
|
static propTypes = {
|
|
49
49
|
prompt: s.string,
|
|
50
50
|
tagName: s.string,
|
|
@@ -151,16 +151,16 @@ var { translator: f } = d, p = "pie-prompt-audio-player", m = "play-audio-button
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
render() {
|
|
154
|
-
let { prompt: e, tagName: t, className: n, onClick: r, defaultClassName: i } = this.props, a = `${n || ""} ${i || ""} ${t === "legend" ? "legend" : ""} ${
|
|
155
|
-
return /* @__PURE__ */ l(
|
|
154
|
+
let { prompt: e, tagName: t, className: n, onClick: r, defaultClassName: i } = this.props, a = `${n || ""} ${i || ""} ${t === "legend" ? "legend" : ""} ${y}`.trim();
|
|
155
|
+
return /* @__PURE__ */ l(g, {
|
|
156
156
|
as: t || "div",
|
|
157
157
|
ref: this.promptRef,
|
|
158
158
|
onClick: r,
|
|
159
159
|
className: a,
|
|
160
160
|
tagName: t,
|
|
161
|
-
dangerouslySetInnerHTML: { __html: this.parsedText(e || "").replace(
|
|
161
|
+
dangerouslySetInnerHTML: { __html: this.parsedText(e || "").replace(_, v) }
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
165
|
//#endregion
|
|
166
|
-
export {
|
|
166
|
+
export { b as PreviewPrompt, b as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/render-ui",
|
|
3
|
-
"version": "8.0.2-next.
|
|
3
|
+
"version": "8.0.2-next.20261007003844",
|
|
4
4
|
"description": "Some shared ui elements when rendering - but not worthy of their own package yet.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"debug": "^4.1.1",
|
|
18
18
|
"prop-types": "^15.7.2",
|
|
19
19
|
"react-transition-group": "^4.4.5",
|
|
20
|
-
"@pie-element/shared-math-rendering-mathjax": "0.1.3-next.
|
|
20
|
+
"@pie-element/shared-math-rendering-mathjax": "0.1.3-next.20261007003844",
|
|
21
21
|
"@pie-element/shared-lodash": "0.1.3-next.20261006160832"
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|