@pie-lib/render-ui 8.0.1-next.20261005000911 → 8.0.1-next.20261005005201
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/color.d.ts +2 -0
- package/dist/color.js +39 -34
- package/dist/preview-prompt.d.ts +2 -0
- package/dist/preview-prompt.js +41 -38
- package/package.json +2 -2
package/dist/color.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare const defaults: {
|
|
|
51
51
|
KEYPAD_BUTTON_HOVER: string;
|
|
52
52
|
KEYPAD_BUTTON_OPERATOR_HOVER: string;
|
|
53
53
|
KEY_BOARD_FOCUS_INDICATOR: string;
|
|
54
|
+
EDITOR_TOOLBAR: string;
|
|
54
55
|
BUTTON_BORDER: string;
|
|
55
56
|
BUTTON_HOVER_BG: string;
|
|
56
57
|
};
|
|
@@ -108,6 +109,7 @@ export declare const keypadButtonOperator: () => any;
|
|
|
108
109
|
export declare const keypadEmptyPlaceholder: () => any;
|
|
109
110
|
export declare const keypadButtonHover: () => any;
|
|
110
111
|
export declare const keypadButtonOperatorHover: () => any;
|
|
112
|
+
export declare const editorToolbar: () => string;
|
|
111
113
|
export declare const keyBoardFocusIndicator: () => any;
|
|
112
114
|
export declare const buttonBorder: () => any;
|
|
113
115
|
export declare const buttonHoverBg: () => any;
|
package/dist/color.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { __exportAll as
|
|
2
|
-
import { green as
|
|
1
|
+
import { __exportAll as e } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { green as t, indigo as n, orange as ee, pink as r, red as te } from "@mui/material/colors";
|
|
3
3
|
//#region src/color.ts
|
|
4
|
-
var ne = /* @__PURE__ */
|
|
4
|
+
var ne = /* @__PURE__ */ e({
|
|
5
5
|
background: () => k,
|
|
6
6
|
backgroundDark: () => A,
|
|
7
7
|
black: () => H,
|
|
8
8
|
blueGrey100: () => X,
|
|
9
9
|
blueGrey300: () => Z,
|
|
10
|
-
blueGrey600: () =>
|
|
11
|
-
blueGrey900: () =>
|
|
10
|
+
blueGrey600: () => ie,
|
|
11
|
+
blueGrey900: () => ae,
|
|
12
12
|
border: () => F,
|
|
13
13
|
borderDark: () => L,
|
|
14
14
|
borderGray: () => R,
|
|
15
15
|
borderLight: () => I,
|
|
16
|
-
buttonBorder: () =>
|
|
16
|
+
buttonBorder: () => pe,
|
|
17
17
|
buttonFocusOutline: () => Y,
|
|
18
|
-
buttonHoverBg: () =>
|
|
18
|
+
buttonHoverBg: () => me,
|
|
19
19
|
correct: () => d,
|
|
20
20
|
correctSecondary: () => f,
|
|
21
21
|
correctTertiary: () => p,
|
|
@@ -24,7 +24,8 @@ var ne = /* @__PURE__ */ ee({
|
|
|
24
24
|
disabled: () => c,
|
|
25
25
|
disabledSecondary: () => l,
|
|
26
26
|
disabledText: () => u,
|
|
27
|
-
dropdownBackground: () =>
|
|
27
|
+
dropdownBackground: () => M,
|
|
28
|
+
editorToolbar: () => de,
|
|
28
29
|
fadedPrimary: () => w,
|
|
29
30
|
focusChecked: () => G,
|
|
30
31
|
focusCheckedBorder: () => K,
|
|
@@ -33,12 +34,12 @@ var ne = /* @__PURE__ */ ee({
|
|
|
33
34
|
incorrect: () => h,
|
|
34
35
|
incorrectSecondary: () => _,
|
|
35
36
|
incorrectWithIcon: () => g,
|
|
36
|
-
keyBoardFocusIndicator: () =>
|
|
37
|
-
keypadButton: () =>
|
|
38
|
-
keypadButtonHover: () =>
|
|
39
|
-
keypadButtonOperator: () =>
|
|
40
|
-
keypadButtonOperatorHover: () =>
|
|
41
|
-
keypadEmptyPlaceholder: () =>
|
|
37
|
+
keyBoardFocusIndicator: () => fe,
|
|
38
|
+
keypadButton: () => $,
|
|
39
|
+
keypadButtonHover: () => le,
|
|
40
|
+
keypadButtonOperator: () => se,
|
|
41
|
+
keypadButtonOperatorHover: () => ue,
|
|
42
|
+
keypadEmptyPlaceholder: () => ce,
|
|
42
43
|
missing: () => v,
|
|
43
44
|
missingWithIcon: () => y,
|
|
44
45
|
primary: () => b,
|
|
@@ -50,37 +51,37 @@ var ne = /* @__PURE__ */ ee({
|
|
|
50
51
|
secondaryDark: () => D,
|
|
51
52
|
secondaryLight: () => E,
|
|
52
53
|
secondaryText: () => O,
|
|
53
|
-
surface: () =>
|
|
54
|
+
surface: () => N,
|
|
54
55
|
tableGrid: () => z,
|
|
55
56
|
tableGridLight: () => B,
|
|
56
57
|
tableStripe: () => V,
|
|
57
|
-
tertiary: () =>
|
|
58
|
-
tertiaryLight: () =>
|
|
58
|
+
tertiary: () => P,
|
|
59
|
+
tertiaryLight: () => re,
|
|
59
60
|
text: () => s,
|
|
60
61
|
transparent: () => W,
|
|
61
62
|
v: () => a,
|
|
62
|
-
visualElementsColors: () =>
|
|
63
|
+
visualElementsColors: () => he,
|
|
63
64
|
white: () => U
|
|
64
65
|
}), i = {
|
|
65
66
|
TEXT: "black",
|
|
66
67
|
DISABLED: "grey",
|
|
67
68
|
DISABLED_SECONDARY: "#ABABAB",
|
|
68
69
|
DISABLED_TEXT: "#545454",
|
|
69
|
-
CORRECT:
|
|
70
|
-
CORRECT_SECONDARY:
|
|
70
|
+
CORRECT: t[500],
|
|
71
|
+
CORRECT_SECONDARY: t[50],
|
|
71
72
|
CORRECT_TERTIARY: "#0EA449",
|
|
72
73
|
CORRECT_WITH_ICON: "#087D38",
|
|
73
|
-
INCORRECT:
|
|
74
|
-
INCORRECT_SECONDARY:
|
|
74
|
+
INCORRECT: ee[500],
|
|
75
|
+
INCORRECT_SECONDARY: te[50],
|
|
75
76
|
INCORRECT_WITH_ICON: "#BF0D00",
|
|
76
|
-
MISSING:
|
|
77
|
+
MISSING: te[700],
|
|
77
78
|
MISSING_WITH_ICON: "#6A78A1",
|
|
78
|
-
PRIMARY:
|
|
79
|
-
PRIMARY_LIGHT:
|
|
80
|
-
PRIMARY_DARK:
|
|
81
|
-
SECONDARY:
|
|
82
|
-
SECONDARY_LIGHT:
|
|
83
|
-
SECONDARY_DARK:
|
|
79
|
+
PRIMARY: n[500],
|
|
80
|
+
PRIMARY_LIGHT: n[200],
|
|
81
|
+
PRIMARY_DARK: n[800],
|
|
82
|
+
SECONDARY: r.A400,
|
|
83
|
+
SECONDARY_LIGHT: r[200],
|
|
84
|
+
SECONDARY_DARK: r[900],
|
|
84
85
|
TERTIARY: "#146EB3",
|
|
85
86
|
TERTIARY_LIGHT: "#D0E2F0",
|
|
86
87
|
BACKGROUND: "rgba(255,255,255,0)",
|
|
@@ -114,14 +115,18 @@ var ne = /* @__PURE__ */ ee({
|
|
|
114
115
|
KEYPAD_BUTTON_HOVER: "rgb(214, 218, 239)",
|
|
115
116
|
KEYPAD_BUTTON_OPERATOR_HOVER: "rgb(255, 197, 217)",
|
|
116
117
|
KEY_BOARD_FOCUS_INDICATOR: "#2B87FF",
|
|
118
|
+
EDITOR_TOOLBAR: "#efefef",
|
|
117
119
|
BUTTON_BORDER: "rgba(0, 0, 0, 0.23)",
|
|
118
120
|
BUTTON_HOVER_BG: "rgba(0, 0, 0, 0.08)"
|
|
119
121
|
};
|
|
120
122
|
Object.freeze(i);
|
|
121
|
-
var a = (
|
|
122
|
-
let
|
|
123
|
-
return
|
|
124
|
-
}, o = a("pie"), s = () => o("text", i.TEXT), c = () => o("disabled", i.DISABLED), l = () => o("disabled-secondary", i.DISABLED_SECONDARY), u = () => o("disabled-text", "text", i.DISABLED_TEXT), d = () => o("correct", i.CORRECT), f = () => o("correct-secondary", i.CORRECT_SECONDARY), p = () => o("correct-tertiary", i.CORRECT_TERTIARY), m = () => o("correct-icon", i.CORRECT_WITH_ICON), h = () => o("incorrect", i.INCORRECT), g = () => o("incorrect-icon", i.INCORRECT_WITH_ICON), _ = () => o("incorrect-secondary", i.INCORRECT_SECONDARY), v = () => o("missing", i.MISSING), y = () => o("missing-icon", i.MISSING_WITH_ICON), b = () => o("primary", i.PRIMARY), x = () => o("primary-light", i.PRIMARY_LIGHT), S = () => o("primary-dark", i.PRIMARY_DARK), C = () => o("primary-text", "text", i.TEXT), w = () => o("faded-primary", i.FADED_PRIMARY), T = () => o("secondary", i.SECONDARY), E = () => o("secondary-light", i.SECONDARY_LIGHT), D = () => o("secondary-dark", i.SECONDARY_DARK), O = () => o("secondary-text", "text", i.TEXT), k = () => o("background", i.BACKGROUND), A = () => o("background-dark", i.BACKGROUND_DARK), j = () => o("secondary-background", i.SECONDARY_BACKGROUND),
|
|
123
|
+
var a = (e) => (...t) => {
|
|
124
|
+
let n = t.pop();
|
|
125
|
+
return t.reduceRight((t, n) => `var(--${e}-${n}, ${t})`, n);
|
|
126
|
+
}, o = a("pie"), s = () => o("text", i.TEXT), c = () => o("disabled", i.DISABLED), l = () => o("disabled-secondary", i.DISABLED_SECONDARY), u = () => o("disabled-text", "text", i.DISABLED_TEXT), d = () => o("correct", i.CORRECT), f = () => o("correct-secondary", i.CORRECT_SECONDARY), p = () => o("correct-tertiary", i.CORRECT_TERTIARY), m = () => o("correct-icon", i.CORRECT_WITH_ICON), h = () => o("incorrect", i.INCORRECT), g = () => o("incorrect-icon", i.INCORRECT_WITH_ICON), _ = () => o("incorrect-secondary", i.INCORRECT_SECONDARY), v = () => o("missing", i.MISSING), y = () => o("missing-icon", i.MISSING_WITH_ICON), b = () => o("primary", i.PRIMARY), x = () => o("primary-light", i.PRIMARY_LIGHT), S = () => o("primary-dark", i.PRIMARY_DARK), C = () => o("primary-text", "text", i.TEXT), w = () => o("faded-primary", i.FADED_PRIMARY), T = () => o("secondary", i.SECONDARY), E = () => o("secondary-light", i.SECONDARY_LIGHT), D = () => o("secondary-dark", i.SECONDARY_DARK), O = () => o("secondary-text", "text", i.TEXT), k = () => o("background", i.BACKGROUND), A = () => o("background-dark", i.BACKGROUND_DARK), j = () => o("secondary-background", i.SECONDARY_BACKGROUND), M = () => o("dropdown-background", i.DROPDOWN_BACKGROUND), N = () => o("surface", i.SURFACE), P = () => o("tertiary", i.TERTIARY), re = () => o("tertiary-light", i.TERTIARY_LIGHT), F = () => o("border", i.BORDER), I = () => o("border-light", i.BORDER_LIGHT), L = () => o("border-dark", i.BORDER_DARK), R = () => o("border-gray", i.BORDER_GRAY), z = () => o("table-grid", "text", i.TABLE_GRID), B = () => o("table-grid-light", "border-light", i.TABLE_GRID_LIGHT), V = () => o("table-stripe", "background-dark", i.TABLE_STRIPE), H = () => o("black", i.BLACK), U = () => o("white", i.WHITE), W = () => i.TRANSPARENT, G = () => o("focus-checked", i.FOCUS_CHECKED), K = () => o("focus-checked-border", i.FOCUS_CHECKED_BORDER), q = () => o("focus-unchecked", i.FOCUS_UNCHECKED), J = () => o("focus-unchecked-border", i.FOCUS_UNCHECKED_BORDER), Y = () => o("button-focus-outline", i.BUTTON_FOCUS_OUTLINE), X = () => o("blue-grey-100", i.BLUE_GREY100), Z = () => o("blue-grey-300", i.BLUE_GREY300), ie = () => o("blue-grey-600", i.BLUE_GREY600), ae = () => o("blue-grey-900", i.BLUE_GREY900), oe = (e) => {
|
|
127
|
+
let t = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);
|
|
128
|
+
return t ? t.slice(1).map((e) => parseInt(e, 16)) : e.match(/\d+/g).slice(0, 3).map(Number);
|
|
129
|
+
}, Q = (e, t) => `color-mix(in srgb, rgb(${oe(e).map((e) => (e - 255 * (1 - t)) / t).join(" ")}) ${t * 100}%, ${o("background", i.WHITE)})`, $ = () => o("keypad-button", Q(i.KEYPAD_BUTTON, .5)), se = () => o("keypad-button-operator", Q(i.KEYPAD_BUTTON_OPERATOR, .5)), ce = () => o("keypad-empty-placeholder", i.KEYPAD_EMPTY_PLACEHOLDER), le = () => o("keypad-button-hover", Q(i.KEYPAD_BUTTON_HOVER, .25)), ue = () => o("keypad-button-operator-hover", Q(i.KEYPAD_BUTTON_OPERATOR_HOVER, .25)), de = () => Q(i.EDITOR_TOOLBAR, .125), fe = () => o("keyboard-focus-indicator", i.KEY_BOARD_FOCUS_INDICATOR), pe = () => o("button-border", i.BUTTON_BORDER), me = () => o("button-hover-bg", i.BUTTON_HOVER_BG), he = {
|
|
125
130
|
AXIS_LINE_COLOR: "#5A53C9",
|
|
126
131
|
ROLLOVER_FILL_BAR_COLOR: "#050F2D",
|
|
127
132
|
GRIDLINES_COLOR: "#8E88EA",
|
|
@@ -129,4 +134,4 @@ var a = (ee) => (...e) => {
|
|
|
129
134
|
SHAPES_FILL_COLOR: "#7986cb"
|
|
130
135
|
};
|
|
131
136
|
//#endregion
|
|
132
|
-
export { k as background, A as backgroundDark, H as black, X as blueGrey100, Z as blueGrey300,
|
|
137
|
+
export { k as background, A as backgroundDark, H as black, X as blueGrey100, Z as blueGrey300, ie as blueGrey600, ae as blueGrey900, F as border, L as borderDark, R as borderGray, I as borderLight, pe as buttonBorder, Y as buttonFocusOutline, me as buttonHoverBg, ne as color_exports, d as correct, f as correctSecondary, p as correctTertiary, m as correctWithIcon, i as defaults, c as disabled, l as disabledSecondary, u as disabledText, M as dropdownBackground, de as editorToolbar, w as fadedPrimary, G as focusChecked, K as focusCheckedBorder, q as focusUnchecked, J as focusUncheckedBorder, h as incorrect, _ as incorrectSecondary, g as incorrectWithIcon, fe as keyBoardFocusIndicator, $ as keypadButton, le as keypadButtonHover, se as keypadButtonOperator, ue as keypadButtonOperatorHover, ce as keypadEmptyPlaceholder, v as missing, y as missingWithIcon, b as primary, S as primaryDark, x as primaryLight, C as primaryText, T as secondary, j as secondaryBackground, D as secondaryDark, E as secondaryLight, O as secondaryText, N as surface, z as tableGrid, B as tableGridLight, V as tableStripe, P as tertiary, re as tertiaryLight, s as text, W as transparent, a as v, he as visualElementsColors, U as white };
|
package/dist/preview-prompt.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export declare class PreviewPrompt extends Component {
|
|
|
17
17
|
onClick: () => void;
|
|
18
18
|
};
|
|
19
19
|
promptRef: React.RefObject<unknown>;
|
|
20
|
+
audioId: string;
|
|
21
|
+
playButtonId: string;
|
|
20
22
|
parsedText: any;
|
|
21
23
|
addCustomAudioButtonControls(): void;
|
|
22
24
|
removeCustomAudioButtonListeners(): void;
|
package/dist/preview-prompt.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { tableGrid as e, tableStripe as t, text as n } from "./color.js";
|
|
2
|
-
import
|
|
3
|
-
import a from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { createUniqueId as r } from "./unique-id.js";
|
|
3
|
+
import i, { Component as a } from "react";
|
|
4
|
+
import o from "prop-types";
|
|
5
|
+
import { styled as s } from "@mui/material/styles";
|
|
6
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
7
|
+
import { renderMath as l } from "@pie-element/shared-math-rendering-mathjax";
|
|
7
8
|
//#region src/preview-prompt.tsx
|
|
8
|
-
var
|
|
9
|
+
var u = s("div")(({ theme: r, tagName: i }) => ({
|
|
9
10
|
"&:not(.MathJax) > table:not([role=\"presentation\"])": { borderCollapse: "collapse" },
|
|
10
11
|
"&:not(.MathJax) table[border]:not([role=\"presentation\"]), &:not(.MathJax) table[border]:not([role=\"presentation\"]) td, &:not(.MathJax) table[border]:not([role=\"presentation\"]) th": {
|
|
11
12
|
borderStyle: "solid",
|
|
@@ -38,31 +39,33 @@ var l = o("div")(({ theme: r, tagName: i }) => ({
|
|
|
38
39
|
cursor: "pointer",
|
|
39
40
|
"& > p": { margin: "0 0 0 0 !important" }
|
|
40
41
|
}
|
|
41
|
-
})),
|
|
42
|
+
})), d = /\\embed\{newLine\}\[\]/g, f = "\\newline ", p = "preview-prompt", m = "pie-prompt-audio-player", h = "play-audio-button", g = class extends a {
|
|
42
43
|
static propTypes = {
|
|
43
|
-
prompt:
|
|
44
|
-
tagName:
|
|
45
|
-
className:
|
|
46
|
-
onClick:
|
|
47
|
-
defaultClassName:
|
|
48
|
-
autoplayAudioEnabled:
|
|
49
|
-
customAudioButton:
|
|
50
|
-
playImage:
|
|
51
|
-
pauseImage:
|
|
44
|
+
prompt: o.string,
|
|
45
|
+
tagName: o.string,
|
|
46
|
+
className: o.string,
|
|
47
|
+
onClick: o.func,
|
|
48
|
+
defaultClassName: o.string,
|
|
49
|
+
autoplayAudioEnabled: o.bool,
|
|
50
|
+
customAudioButton: o.shape({
|
|
51
|
+
playImage: o.string,
|
|
52
|
+
pauseImage: o.string
|
|
52
53
|
})
|
|
53
54
|
};
|
|
54
55
|
static defaultProps = { onClick: () => {} };
|
|
55
|
-
promptRef =
|
|
56
|
+
promptRef = i.createRef();
|
|
57
|
+
audioId = r(m);
|
|
58
|
+
playButtonId = r(h);
|
|
56
59
|
parsedText = (e) => {
|
|
57
60
|
let { autoplayAudioEnabled: t, customAudioButton: n } = this.props, r = document.createElement("div");
|
|
58
61
|
r.innerHTML = e;
|
|
59
62
|
let i = r.querySelector("audio");
|
|
60
63
|
if (i) {
|
|
61
64
|
let e = document.createElement("source");
|
|
62
|
-
if (e.setAttribute("type", "audio/mp3"), e.setAttribute("src", i.getAttribute("src")), i.removeAttribute("src"), i.
|
|
65
|
+
if (e.setAttribute("type", "audio/mp3"), e.setAttribute("src", i.getAttribute("src")), i.removeAttribute("src"), i.id = this.audioId, i.classList.add(m), i.appendChild(e), n) {
|
|
63
66
|
i.style.display = "none";
|
|
64
67
|
let e = document.createElement("div");
|
|
65
|
-
e.id =
|
|
68
|
+
e.id = this.playButtonId, e.className = h, Object.assign(e.style, {
|
|
66
69
|
cursor: "pointer",
|
|
67
70
|
display: "block",
|
|
68
71
|
width: "128px",
|
|
@@ -77,31 +80,31 @@ var l = o("div")(({ theme: r, tagName: i }) => ({
|
|
|
77
80
|
return r.innerHTML;
|
|
78
81
|
};
|
|
79
82
|
addCustomAudioButtonControls() {
|
|
80
|
-
let { autoplayAudioEnabled: e, customAudioButton: t } = this.props, n =
|
|
81
|
-
if (e &&
|
|
82
|
-
|
|
83
|
+
let { autoplayAudioEnabled: e, customAudioButton: t } = this.props, n = this.promptRef.current, r = n?.querySelector(`.${h}`), i = n?.querySelector(`.${m}`);
|
|
84
|
+
if (e && i && i.play().then(() => {
|
|
85
|
+
r && t && i.addEventListener("ended", o);
|
|
83
86
|
}).catch((e) => {
|
|
84
|
-
|
|
85
|
-
}), !
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
}, a = () => {
|
|
89
|
-
n.style.backgroundImage = `url(${t.playImage})`;
|
|
87
|
+
r && t && (r.style.backgroundImage = `url(${t.playImage})`), console.error("Error playing audio", e);
|
|
88
|
+
}), !r || !i || !t) return;
|
|
89
|
+
let a = () => {
|
|
90
|
+
i.paused && i.play();
|
|
90
91
|
}, o = () => {
|
|
91
|
-
|
|
92
|
+
r.style.backgroundImage = `url(${t.playImage})`;
|
|
93
|
+
}, s = () => {
|
|
94
|
+
Object.assign(r.style, {
|
|
92
95
|
backgroundImage: `url(${t.pauseImage})`,
|
|
93
96
|
border: "1px solid #ccc"
|
|
94
97
|
});
|
|
95
|
-
},
|
|
96
|
-
Object.assign(
|
|
98
|
+
}, c = () => {
|
|
99
|
+
Object.assign(r.style, {
|
|
97
100
|
backgroundImage: `url(${t.playImage})`,
|
|
98
101
|
border: "1px solid #326295"
|
|
99
102
|
});
|
|
100
103
|
};
|
|
101
|
-
|
|
104
|
+
r.addEventListener("click", a), i.addEventListener("play", s), i.addEventListener("pause", c), i.addEventListener("ended", o), this._playButton = r, this._audio = i, this._handlePlayClick = a, this._handleAudioPlay = s, this._handleAudioPause = c, this._handleAudioEnded = o;
|
|
102
105
|
}
|
|
103
106
|
removeCustomAudioButtonListeners() {
|
|
104
|
-
let e =
|
|
107
|
+
let e = this._playButton, t = this._audio;
|
|
105
108
|
!e || !t || (e.removeEventListener("click", this._handlePlayClick), t.removeEventListener("play", this._handleAudioPlay), t.removeEventListener("pause", this._handleAudioPause), t.removeEventListener("ended", this._handleAudioEnded));
|
|
106
109
|
}
|
|
107
110
|
componentDidMount() {
|
|
@@ -118,7 +121,7 @@ var l = o("div")(({ theme: r, tagName: i }) => ({
|
|
|
118
121
|
}
|
|
119
122
|
renderMathContent() {
|
|
120
123
|
let e = this.promptRef.current;
|
|
121
|
-
e && typeof
|
|
124
|
+
e && typeof l == "function" && l(e);
|
|
122
125
|
}
|
|
123
126
|
alignImages() {
|
|
124
127
|
let e = this.promptRef.current;
|
|
@@ -138,16 +141,16 @@ var l = o("div")(({ theme: r, tagName: i }) => ({
|
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
143
|
render() {
|
|
141
|
-
let { prompt: e, tagName: t, className: n, onClick: r, defaultClassName: i } = this.props, a = `${n || ""} ${i || ""} ${t === "legend" ? "legend" : ""} ${
|
|
142
|
-
return /* @__PURE__ */
|
|
144
|
+
let { prompt: e, tagName: t, className: n, onClick: r, defaultClassName: i } = this.props, a = `${n || ""} ${i || ""} ${t === "legend" ? "legend" : ""} ${p}`.trim();
|
|
145
|
+
return /* @__PURE__ */ c(u, {
|
|
143
146
|
as: t || "div",
|
|
144
147
|
ref: this.promptRef,
|
|
145
148
|
onClick: r,
|
|
146
149
|
className: a,
|
|
147
150
|
tagName: t,
|
|
148
|
-
dangerouslySetInnerHTML: { __html: this.parsedText(e || "").replace(
|
|
151
|
+
dangerouslySetInnerHTML: { __html: this.parsedText(e || "").replace(d, f) }
|
|
149
152
|
});
|
|
150
153
|
}
|
|
151
154
|
};
|
|
152
155
|
//#endregion
|
|
153
|
-
export {
|
|
156
|
+
export { g as PreviewPrompt, g as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/render-ui",
|
|
3
|
-
"version": "8.0.1-next.
|
|
3
|
+
"version": "8.0.1-next.20261005005201",
|
|
4
4
|
"description": "Some shared ui elements when rendering - but not worthy of their own package yet.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@mui/icons-material": "^7.3.4",
|
|
14
14
|
"@mui/material": "^7.3.4",
|
|
15
15
|
"@pie-lib/icons": "5.0.1-next.20261004165705",
|
|
16
|
-
"@pie-lib/translator": "5.0.1-next.
|
|
16
|
+
"@pie-lib/translator": "5.0.1-next.20261005003301",
|
|
17
17
|
"debug": "^4.1.1",
|
|
18
18
|
"prop-types": "^15.7.2",
|
|
19
19
|
"react-transition-group": "^4.4.5",
|