@pie-lib/render-ui 6.2.0-next.40 → 6.2.0-next.42
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 +57 -55
- package/dist/preview-prompt.js +11 -11
- package/package.json +3 -10
package/dist/color.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const defaults: {
|
|
|
10
10
|
TEXT: string;
|
|
11
11
|
DISABLED: string;
|
|
12
12
|
DISABLED_SECONDARY: string;
|
|
13
|
+
DISABLED_TEXT: string;
|
|
13
14
|
CORRECT: "#4caf50";
|
|
14
15
|
CORRECT_SECONDARY: "#e8f5e9";
|
|
15
16
|
CORRECT_TERTIARY: string;
|
|
@@ -65,6 +66,7 @@ export declare const v: (prefix: any) => (...args: any[]) => any;
|
|
|
65
66
|
export declare const text: () => any;
|
|
66
67
|
export declare const disabled: () => any;
|
|
67
68
|
export declare const disabledSecondary: () => any;
|
|
69
|
+
export declare const disabledText: () => any;
|
|
68
70
|
export declare const correct: () => any;
|
|
69
71
|
export declare const correctSecondary: () => any;
|
|
70
72
|
export declare const correctTertiary: () => any;
|
package/dist/color.js
CHANGED
|
@@ -2,68 +2,70 @@ import { __exportAll as ee } from "./_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { green as e, indigo as t, orange as te, pink as n, red as r } from "@mui/material/colors";
|
|
3
3
|
//#region src/color.ts
|
|
4
4
|
var ne = /* @__PURE__ */ ee({
|
|
5
|
-
background: () =>
|
|
6
|
-
backgroundDark: () =>
|
|
7
|
-
black: () =>
|
|
8
|
-
blueGrey100: () =>
|
|
9
|
-
blueGrey300: () =>
|
|
10
|
-
blueGrey600: () =>
|
|
11
|
-
blueGrey900: () =>
|
|
12
|
-
border: () =>
|
|
13
|
-
borderDark: () =>
|
|
14
|
-
borderGray: () =>
|
|
15
|
-
borderLight: () =>
|
|
16
|
-
buttonBorder: () =>
|
|
17
|
-
buttonFocusOutline: () =>
|
|
18
|
-
buttonHoverBg: () =>
|
|
19
|
-
correct: () =>
|
|
20
|
-
correctSecondary: () =>
|
|
21
|
-
correctTertiary: () =>
|
|
22
|
-
correctWithIcon: () =>
|
|
5
|
+
background: () => k,
|
|
6
|
+
backgroundDark: () => A,
|
|
7
|
+
black: () => H,
|
|
8
|
+
blueGrey100: () => X,
|
|
9
|
+
blueGrey300: () => Z,
|
|
10
|
+
blueGrey600: () => Q,
|
|
11
|
+
blueGrey900: () => ie,
|
|
12
|
+
border: () => F,
|
|
13
|
+
borderDark: () => L,
|
|
14
|
+
borderGray: () => R,
|
|
15
|
+
borderLight: () => I,
|
|
16
|
+
buttonBorder: () => ue,
|
|
17
|
+
buttonFocusOutline: () => Y,
|
|
18
|
+
buttonHoverBg: () => de,
|
|
19
|
+
correct: () => d,
|
|
20
|
+
correctSecondary: () => f,
|
|
21
|
+
correctTertiary: () => p,
|
|
22
|
+
correctWithIcon: () => m,
|
|
23
23
|
defaults: () => i,
|
|
24
24
|
disabled: () => c,
|
|
25
25
|
disabledSecondary: () => l,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
26
|
+
disabledText: () => u,
|
|
27
|
+
dropdownBackground: () => re,
|
|
28
|
+
fadedPrimary: () => w,
|
|
29
|
+
focusChecked: () => G,
|
|
30
|
+
focusCheckedBorder: () => K,
|
|
31
|
+
focusUnchecked: () => q,
|
|
32
|
+
focusUncheckedBorder: () => J,
|
|
33
|
+
incorrect: () => h,
|
|
34
|
+
incorrectSecondary: () => _,
|
|
35
|
+
incorrectWithIcon: () => g,
|
|
36
|
+
keyBoardFocusIndicator: () => le,
|
|
37
|
+
keypadButton: () => ae,
|
|
38
|
+
keypadButtonHover: () => se,
|
|
39
|
+
keypadButtonOperator: () => oe,
|
|
40
|
+
keypadButtonOperatorHover: () => ce,
|
|
41
|
+
keypadEmptyPlaceholder: () => $,
|
|
42
|
+
missing: () => v,
|
|
43
|
+
missingWithIcon: () => y,
|
|
44
|
+
primary: () => b,
|
|
45
|
+
primaryDark: () => S,
|
|
46
|
+
primaryLight: () => x,
|
|
47
|
+
primaryText: () => C,
|
|
48
|
+
secondary: () => T,
|
|
49
|
+
secondaryBackground: () => j,
|
|
50
|
+
secondaryDark: () => D,
|
|
51
|
+
secondaryLight: () => E,
|
|
52
|
+
secondaryText: () => O,
|
|
53
|
+
surface: () => M,
|
|
54
|
+
tableGrid: () => z,
|
|
55
|
+
tableGridLight: () => B,
|
|
56
|
+
tableStripe: () => V,
|
|
57
|
+
tertiary: () => N,
|
|
58
|
+
tertiaryLight: () => P,
|
|
58
59
|
text: () => s,
|
|
59
|
-
transparent: () =>
|
|
60
|
+
transparent: () => W,
|
|
60
61
|
v: () => a,
|
|
61
|
-
visualElementsColors: () =>
|
|
62
|
-
white: () =>
|
|
62
|
+
visualElementsColors: () => fe,
|
|
63
|
+
white: () => U
|
|
63
64
|
}), i = {
|
|
64
65
|
TEXT: "black",
|
|
65
66
|
DISABLED: "grey",
|
|
66
67
|
DISABLED_SECONDARY: "#ABABAB",
|
|
68
|
+
DISABLED_TEXT: "#545454",
|
|
67
69
|
CORRECT: e[500],
|
|
68
70
|
CORRECT_SECONDARY: e[50],
|
|
69
71
|
CORRECT_TERTIARY: "#0EA449",
|
|
@@ -119,7 +121,7 @@ Object.freeze(i);
|
|
|
119
121
|
var a = (ee) => (...e) => {
|
|
120
122
|
let t = e.pop();
|
|
121
123
|
return e.reduceRight((e, t) => `var(--${ee}-${t}, ${e})`, t);
|
|
122
|
-
}, o = a("pie"), s = () => o("text", i.TEXT), c = () => o("disabled", i.DISABLED), l = () => o("disabled-secondary", i.DISABLED_SECONDARY), u = () => o("correct", i.CORRECT),
|
|
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), re = () => o("dropdown-background", i.DROPDOWN_BACKGROUND), M = () => o("surface", i.SURFACE), N = () => o("tertiary", i.TERTIARY), P = () => 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), Q = () => o("blue-grey-600", i.BLUE_GREY600), ie = () => o("blue-grey-900", i.BLUE_GREY900), ae = () => o("keypad-button", i.KEYPAD_BUTTON), oe = () => o("keypad-button-operator", i.KEYPAD_BUTTON_OPERATOR), $ = () => o("keypad-empty-placeholder", i.KEYPAD_EMPTY_PLACEHOLDER), se = () => o("keypad-button-hover", i.KEYPAD_BUTTON_HOVER), ce = () => o("keypad-button-operator-hover", i.KEYPAD_BUTTON_OPERATOR_HOVER), le = () => o("keyboard-focus-indicator", i.KEY_BOARD_FOCUS_INDICATOR), ue = () => o("button-border", i.BUTTON_BORDER), de = () => o("button-hover-bg", i.BUTTON_HOVER_BG), fe = {
|
|
123
125
|
AXIS_LINE_COLOR: "#5A53C9",
|
|
124
126
|
ROLLOVER_FILL_BAR_COLOR: "#050F2D",
|
|
125
127
|
GRIDLINES_COLOR: "#8E88EA",
|
|
@@ -127,4 +129,4 @@ var a = (ee) => (...e) => {
|
|
|
127
129
|
SHAPES_FILL_COLOR: "#7986cb"
|
|
128
130
|
};
|
|
129
131
|
//#endregion
|
|
130
|
-
export {
|
|
132
|
+
export { k as background, A as backgroundDark, H as black, X as blueGrey100, Z as blueGrey300, Q as blueGrey600, ie as blueGrey900, F as border, L as borderDark, R as borderGray, I as borderLight, ue as buttonBorder, Y as buttonFocusOutline, de 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, re as dropdownBackground, w as fadedPrimary, G as focusChecked, K as focusCheckedBorder, q as focusUnchecked, J as focusUncheckedBorder, h as incorrect, _ as incorrectSecondary, g as incorrectWithIcon, le as keyBoardFocusIndicator, ae as keypadButton, se as keypadButtonHover, oe as keypadButtonOperator, ce as keypadButtonOperatorHover, $ 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, M as surface, z as tableGrid, B as tableGridLight, V as tableStripe, N as tertiary, P as tertiaryLight, s as text, W as transparent, a as v, fe as visualElementsColors, U as white };
|
package/dist/preview-prompt.js
CHANGED
|
@@ -54,37 +54,37 @@ var l = o("div")(({ theme: r, tagName: i }) => ({
|
|
|
54
54
|
static defaultProps = { onClick: () => {} };
|
|
55
55
|
promptRef = r.createRef();
|
|
56
56
|
parsedText = (e) => {
|
|
57
|
-
let {
|
|
58
|
-
|
|
59
|
-
let
|
|
60
|
-
if (
|
|
57
|
+
let { autoplayAudioEnabled: t, customAudioButton: n } = this.props, r = document.createElement("div");
|
|
58
|
+
r.innerHTML = e;
|
|
59
|
+
let i = r.querySelector("audio");
|
|
60
|
+
if (i) {
|
|
61
61
|
let e = document.createElement("source");
|
|
62
|
-
if (e.setAttribute("type", "audio/mp3"), e.setAttribute("src",
|
|
63
|
-
|
|
62
|
+
if (e.setAttribute("type", "audio/mp3"), e.setAttribute("src", i.getAttribute("src")), i.removeAttribute("src"), i.setAttribute("id", "pie-prompt-audio-player"), i.appendChild(e), n) {
|
|
63
|
+
i.style.display = "none";
|
|
64
64
|
let e = document.createElement("div");
|
|
65
65
|
e.id = "play-audio-button", Object.assign(e.style, {
|
|
66
66
|
cursor: "pointer",
|
|
67
67
|
display: "block",
|
|
68
68
|
width: "128px",
|
|
69
69
|
height: "128px",
|
|
70
|
-
backgroundImage: `url(${t.pauseImage})`,
|
|
70
|
+
backgroundImage: `url(${t ? n.pauseImage : n.playImage})`,
|
|
71
71
|
backgroundSize: "cover",
|
|
72
72
|
borderRadius: "50%",
|
|
73
73
|
border: "1px solid #326295"
|
|
74
|
-
}),
|
|
74
|
+
}), i.parentNode.insertBefore(e, i);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return r.innerHTML;
|
|
78
78
|
};
|
|
79
79
|
addCustomAudioButtonControls() {
|
|
80
80
|
let { autoplayAudioEnabled: e, customAudioButton: t } = this.props, n = document.getElementById("play-audio-button"), r = document.getElementById("pie-prompt-audio-player");
|
|
81
81
|
if (e && r && r.play().then(() => {
|
|
82
82
|
n && t && r.addEventListener("ended", a);
|
|
83
83
|
}).catch((e) => {
|
|
84
|
-
console.error("Error playing audio", e);
|
|
84
|
+
n && t && (n.style.backgroundImage = `url(${t.playImage})`), console.error("Error playing audio", e);
|
|
85
85
|
}), !n || !r || !t) return;
|
|
86
86
|
let i = () => {
|
|
87
|
-
r.paused &&
|
|
87
|
+
r.paused && r.play();
|
|
88
88
|
}, a = () => {
|
|
89
89
|
n.style.backgroundImage = `url(${t.playImage})`;
|
|
90
90
|
}, o = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/render-ui",
|
|
3
|
-
"version": "6.2.0-next.
|
|
3
|
+
"version": "6.2.0-next.42",
|
|
4
4
|
"description": "Some shared ui elements when rendering - but not worthy of their own package yet.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"@emotion/styled": "^11.14.1",
|
|
13
13
|
"@mui/icons-material": "^7.3.4",
|
|
14
14
|
"@mui/material": "^7.3.4",
|
|
15
|
-
"@pie-lib/icons": "
|
|
16
|
-
"@pie-lib/test-utils": "
|
|
15
|
+
"@pie-lib/icons": "5.0.0-next.0",
|
|
16
|
+
"@pie-lib/test-utils": "3.0.0-next.1",
|
|
17
17
|
"debug": "^4.1.1",
|
|
18
18
|
"prop-types": "^15.7.2",
|
|
19
19
|
"react-transition-group": "^4.4.5",
|
|
@@ -38,13 +38,6 @@
|
|
|
38
38
|
"dev": "bun x vite",
|
|
39
39
|
"test": "bun x vitest run"
|
|
40
40
|
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"vite": "^8.0.1",
|
|
43
|
-
"typescript": "^5.9.3",
|
|
44
|
-
"@vitejs/plugin-react": "^6.0.1",
|
|
45
|
-
"@types/react": "^18.2.0",
|
|
46
|
-
"@types/react-dom": "^18.2.0"
|
|
47
|
-
},
|
|
48
41
|
"peerDependencies": {
|
|
49
42
|
"react": "^18.0.0",
|
|
50
43
|
"react-dom": "^18.0.0"
|