reifyui 0.13.6 → 0.13.8
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/index.cjs +647 -512
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +408 -273
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/auth/AuthForm.jsx +17 -2
- package/src/auth/GoogleButton.jsx +2 -2
- package/src/auth/MicrosoftButton.jsx +128 -0
- package/src/auth/client.js +9 -0
- package/src/components/FilePreview.jsx +2 -2
- package/src/index.js +2 -1
package/dist/index.js
CHANGED
|
@@ -1832,6 +1832,11 @@ async function googleSignIn(credential) {
|
|
|
1832
1832
|
setSession(s);
|
|
1833
1833
|
return s;
|
|
1834
1834
|
}
|
|
1835
|
+
async function microsoftSignIn(credential) {
|
|
1836
|
+
const s = toSession(await authPost("/v1/auth/microsoft", { credential, product: _cfg.product }));
|
|
1837
|
+
setSession(s);
|
|
1838
|
+
return s;
|
|
1839
|
+
}
|
|
1835
1840
|
async function requestPasswordReset(email) {
|
|
1836
1841
|
await fetch(`${_cfg.engine}/v1/auth/request-password-reset`, {
|
|
1837
1842
|
method: "POST",
|
|
@@ -1897,13 +1902,13 @@ async function fetchBalance() {
|
|
|
1897
1902
|
}
|
|
1898
1903
|
|
|
1899
1904
|
// src/auth/AuthForm.jsx
|
|
1900
|
-
import { useState as
|
|
1905
|
+
import { useState as useState9 } from "react";
|
|
1901
1906
|
|
|
1902
1907
|
// src/auth/GoogleButton.jsx
|
|
1903
1908
|
import { useEffect as useEffect6, useRef as useRef6, useState as useState7 } from "react";
|
|
1904
1909
|
import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1905
1910
|
var CLIENT_ID = "247853836408-ojk91u8901hdlbkevid4fohmrfdot17l.apps.googleusercontent.com";
|
|
1906
|
-
function GoogleButton({ onCredential, onError }) {
|
|
1911
|
+
function GoogleButton({ onCredential, onError, divider = true }) {
|
|
1907
1912
|
const ref = useRef6(null);
|
|
1908
1913
|
const [failed, setFailed] = useState7(false);
|
|
1909
1914
|
const cb = useRef6({ onCredential, onError });
|
|
@@ -1960,23 +1965,136 @@ function GoogleButton({ onCredential, onError }) {
|
|
|
1960
1965
|
}, []);
|
|
1961
1966
|
if (!CLIENT_ID || failed) return null;
|
|
1962
1967
|
return /* @__PURE__ */ jsxs8(Fragment6, { children: [
|
|
1963
|
-
/* @__PURE__ */ jsx9("div", { className: "auth-or", children: /* @__PURE__ */ jsx9("span", { children: "or" }) }),
|
|
1968
|
+
divider && /* @__PURE__ */ jsx9("div", { className: "auth-or", children: /* @__PURE__ */ jsx9("span", { children: "or" }) }),
|
|
1964
1969
|
/* @__PURE__ */ jsx9("div", { ref, className: "auth-gwrap" })
|
|
1965
1970
|
] });
|
|
1966
1971
|
}
|
|
1967
1972
|
var GOOGLE_ENABLED = !!CLIENT_ID;
|
|
1968
1973
|
|
|
1974
|
+
// src/auth/MicrosoftButton.jsx
|
|
1975
|
+
import { useRef as useRef7, useState as useState8 } from "react";
|
|
1976
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1977
|
+
var CLIENT_ID2 = "cb5c1b6e-aca8-48dd-9da9-31320de30b73";
|
|
1978
|
+
var AUTHORIZE = "https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize";
|
|
1979
|
+
var RETURN_PATH = "/auth/microsoft";
|
|
1980
|
+
var GIVE_UP_MS = 5 * 60 * 1e3;
|
|
1981
|
+
var MICROSOFT_ENABLED = !!CLIENT_ID2;
|
|
1982
|
+
function randomHex(bytes = 16) {
|
|
1983
|
+
const a = new Uint8Array(bytes);
|
|
1984
|
+
crypto.getRandomValues(a);
|
|
1985
|
+
return Array.from(a, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
1986
|
+
}
|
|
1987
|
+
function jwtClaims(token) {
|
|
1988
|
+
try {
|
|
1989
|
+
const part = token.split(".")[1].replace(/-/g, "+").replace(/_/g, "/");
|
|
1990
|
+
const bin = atob(part + "=".repeat((4 - part.length % 4) % 4));
|
|
1991
|
+
return JSON.parse(new TextDecoder().decode(Uint8Array.from(bin, (c) => c.charCodeAt(0))));
|
|
1992
|
+
} catch {
|
|
1993
|
+
return {};
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
function microsoftIdToken() {
|
|
1997
|
+
return new Promise((resolve, reject) => {
|
|
1998
|
+
const state = randomHex();
|
|
1999
|
+
const nonce = randomHex();
|
|
2000
|
+
const back = `${window.location.origin}${RETURN_PATH}`;
|
|
2001
|
+
const url = `${AUTHORIZE}?${new URLSearchParams({
|
|
2002
|
+
client_id: CLIENT_ID2,
|
|
2003
|
+
response_type: "id_token",
|
|
2004
|
+
redirect_uri: back,
|
|
2005
|
+
scope: "openid profile email",
|
|
2006
|
+
response_mode: "fragment",
|
|
2007
|
+
state,
|
|
2008
|
+
nonce,
|
|
2009
|
+
prompt: "select_account"
|
|
2010
|
+
})}`;
|
|
2011
|
+
const w = 480;
|
|
2012
|
+
const h = 640;
|
|
2013
|
+
const left = Math.max(0, window.screenX + (window.outerWidth - w) / 2);
|
|
2014
|
+
const top = Math.max(0, window.screenY + (window.outerHeight - h) / 2);
|
|
2015
|
+
const popup = window.open(url, "microsoft-sign-in", `width=${w},height=${h},left=${left},top=${top}`);
|
|
2016
|
+
if (!popup) {
|
|
2017
|
+
reject(new Error("Allow pop-ups for this site to sign in with Microsoft."));
|
|
2018
|
+
return;
|
|
2019
|
+
}
|
|
2020
|
+
const started = Date.now();
|
|
2021
|
+
const timer = window.setInterval(() => {
|
|
2022
|
+
if (popup.closed) {
|
|
2023
|
+
window.clearInterval(timer);
|
|
2024
|
+
reject(new Error("Microsoft sign in was cancelled."));
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
2027
|
+
if (Date.now() - started > GIVE_UP_MS) {
|
|
2028
|
+
window.clearInterval(timer);
|
|
2029
|
+
popup.close();
|
|
2030
|
+
reject(new Error("Microsoft sign in took too long. Try again."));
|
|
2031
|
+
return;
|
|
2032
|
+
}
|
|
2033
|
+
let href = "";
|
|
2034
|
+
try {
|
|
2035
|
+
href = popup.location.href;
|
|
2036
|
+
} catch {
|
|
2037
|
+
return;
|
|
2038
|
+
}
|
|
2039
|
+
if (!href.startsWith(back)) return;
|
|
2040
|
+
window.clearInterval(timer);
|
|
2041
|
+
const params = new URLSearchParams(popup.location.hash.replace(/^#/, ""));
|
|
2042
|
+
popup.close();
|
|
2043
|
+
if (params.get("error")) {
|
|
2044
|
+
const why = (params.get("error_description") || "").split(/\r?\n/)[0].replace(/^AADSTS\d+:\s*/, "");
|
|
2045
|
+
reject(new Error(why || "Microsoft sign in did not complete."));
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2048
|
+
const token = params.get("id_token") || "";
|
|
2049
|
+
if (!token || params.get("state") !== state || jwtClaims(token).nonce !== nonce) {
|
|
2050
|
+
reject(new Error("Microsoft sign in could not be confirmed. Try again."));
|
|
2051
|
+
return;
|
|
2052
|
+
}
|
|
2053
|
+
resolve(token);
|
|
2054
|
+
}, 300);
|
|
2055
|
+
});
|
|
2056
|
+
}
|
|
2057
|
+
function MicrosoftLogo() {
|
|
2058
|
+
return /* @__PURE__ */ jsxs9("svg", { width: "18", height: "18", viewBox: "0 0 21 21", "aria-hidden": "true", children: [
|
|
2059
|
+
/* @__PURE__ */ jsx10("rect", { x: "1", y: "1", width: "9", height: "9", fill: "#F25022" }),
|
|
2060
|
+
/* @__PURE__ */ jsx10("rect", { x: "11", y: "1", width: "9", height: "9", fill: "#7FBA00" }),
|
|
2061
|
+
/* @__PURE__ */ jsx10("rect", { x: "1", y: "11", width: "9", height: "9", fill: "#00A4EF" }),
|
|
2062
|
+
/* @__PURE__ */ jsx10("rect", { x: "11", y: "11", width: "9", height: "9", fill: "#FFB900" })
|
|
2063
|
+
] });
|
|
2064
|
+
}
|
|
2065
|
+
function MicrosoftButton({ onCredential, onError, disabled }) {
|
|
2066
|
+
const [waiting, setWaiting] = useState8(false);
|
|
2067
|
+
const cb = useRef7({ onCredential, onError });
|
|
2068
|
+
cb.current = { onCredential, onError };
|
|
2069
|
+
if (!CLIENT_ID2) return null;
|
|
2070
|
+
async function start() {
|
|
2071
|
+
setWaiting(true);
|
|
2072
|
+
try {
|
|
2073
|
+
const token = await microsoftIdToken();
|
|
2074
|
+
await cb.current.onCredential(token);
|
|
2075
|
+
} catch (ex) {
|
|
2076
|
+
cb.current.onError?.(ex instanceof Error ? ex.message : "Microsoft sign in failed.");
|
|
2077
|
+
} finally {
|
|
2078
|
+
setWaiting(false);
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
return /* @__PURE__ */ jsx10("div", { className: "auth-mswrap", children: /* @__PURE__ */ jsxs9("button", { type: "button", className: "auth-msbtn", onClick: start, disabled: disabled || waiting, children: [
|
|
2082
|
+
/* @__PURE__ */ jsx10(MicrosoftLogo, {}),
|
|
2083
|
+
/* @__PURE__ */ jsx10("span", { children: waiting ? "Waiting for Microsoft..." : "Sign in with Microsoft" })
|
|
2084
|
+
] }) });
|
|
2085
|
+
}
|
|
2086
|
+
|
|
1969
2087
|
// src/auth/AuthForm.jsx
|
|
1970
|
-
import { Fragment as Fragment7, jsx as
|
|
2088
|
+
import { Fragment as Fragment7, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1971
2089
|
function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = "" }) {
|
|
1972
|
-
const [mode, setMode] =
|
|
1973
|
-
const [email, setEmail] =
|
|
1974
|
-
const [password, setPassword] =
|
|
1975
|
-
const [name, setName] =
|
|
1976
|
-
const [err, setErr] =
|
|
1977
|
-
const [busy, setBusy] =
|
|
1978
|
-
const [choices, setChoices] =
|
|
1979
|
-
const [resetSent, setResetSent] =
|
|
2090
|
+
const [mode, setMode] = useState9("signin");
|
|
2091
|
+
const [email, setEmail] = useState9("");
|
|
2092
|
+
const [password, setPassword] = useState9("");
|
|
2093
|
+
const [name, setName] = useState9("");
|
|
2094
|
+
const [err, setErr] = useState9("");
|
|
2095
|
+
const [busy, setBusy] = useState9(false);
|
|
2096
|
+
const [choices, setChoices] = useState9(null);
|
|
2097
|
+
const [resetSent, setResetSent] = useState9(false);
|
|
1980
2098
|
async function enter(orgId) {
|
|
1981
2099
|
const session = await switchOrg(orgId);
|
|
1982
2100
|
onDone(session);
|
|
@@ -2005,6 +2123,17 @@ function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = ""
|
|
|
2005
2123
|
setBusy(false);
|
|
2006
2124
|
}
|
|
2007
2125
|
}
|
|
2126
|
+
async function onMicrosoft(credential) {
|
|
2127
|
+
setErr("");
|
|
2128
|
+
setBusy(true);
|
|
2129
|
+
try {
|
|
2130
|
+
await afterAuth(await microsoftSignIn(credential));
|
|
2131
|
+
} catch (ex) {
|
|
2132
|
+
setErr(ex instanceof Error ? ex.message : "Microsoft sign in failed.");
|
|
2133
|
+
} finally {
|
|
2134
|
+
setBusy(false);
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2008
2137
|
async function onGoogle(credential) {
|
|
2009
2138
|
setErr("");
|
|
2010
2139
|
setBusy(true);
|
|
@@ -2017,10 +2146,10 @@ function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = ""
|
|
|
2017
2146
|
}
|
|
2018
2147
|
}
|
|
2019
2148
|
if (choices) {
|
|
2020
|
-
return /* @__PURE__ */
|
|
2021
|
-
/* @__PURE__ */
|
|
2022
|
-
/* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */
|
|
2149
|
+
return /* @__PURE__ */ jsxs10("div", { children: [
|
|
2150
|
+
/* @__PURE__ */ jsx11("div", { className: "logo", children: brand }),
|
|
2151
|
+
/* @__PURE__ */ jsx11("h1", { children: "Choose workspace" }),
|
|
2152
|
+
/* @__PURE__ */ jsx11("div", { className: "org-list", children: choices.map((o) => /* @__PURE__ */ jsx11(
|
|
2024
2153
|
"button",
|
|
2025
2154
|
{
|
|
2026
2155
|
type: "button",
|
|
@@ -2038,20 +2167,20 @@ function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = ""
|
|
|
2038
2167
|
},
|
|
2039
2168
|
o.id
|
|
2040
2169
|
)) }),
|
|
2041
|
-
err && /* @__PURE__ */
|
|
2170
|
+
err && /* @__PURE__ */ jsx11("div", { className: "auth-err", children: err })
|
|
2042
2171
|
] });
|
|
2043
2172
|
}
|
|
2044
|
-
return /* @__PURE__ */
|
|
2045
|
-
/* @__PURE__ */
|
|
2046
|
-
/* @__PURE__ */
|
|
2047
|
-
/* @__PURE__ */
|
|
2048
|
-
mode === "forgot" ? resetSent ? /* @__PURE__ */
|
|
2049
|
-
/* @__PURE__ */
|
|
2173
|
+
return /* @__PURE__ */ jsxs10("form", { onSubmit: submit, children: [
|
|
2174
|
+
/* @__PURE__ */ jsx11("div", { className: "logo", children: brand }),
|
|
2175
|
+
/* @__PURE__ */ jsx11("h1", { children: mode === "register" ? "Create your account" : mode === "forgot" ? "Reset password" : "Sign in" }),
|
|
2176
|
+
/* @__PURE__ */ jsx11("p", { className: "sub", children: mode === "register" ? "Get started in seconds." : mode === "forgot" ? "We will email you a reset link." : subtitle2 || "Welcome back." }),
|
|
2177
|
+
mode === "forgot" ? resetSent ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
|
2178
|
+
/* @__PURE__ */ jsxs10("div", { className: "auth-note", children: [
|
|
2050
2179
|
"If an account exists for ",
|
|
2051
|
-
/* @__PURE__ */
|
|
2180
|
+
/* @__PURE__ */ jsx11("b", { children: email.trim() }),
|
|
2052
2181
|
", a password reset link is on its way. It is valid for 1 hour."
|
|
2053
2182
|
] }),
|
|
2054
|
-
/* @__PURE__ */
|
|
2183
|
+
/* @__PURE__ */ jsx11(
|
|
2055
2184
|
"button",
|
|
2056
2185
|
{
|
|
2057
2186
|
type: "button",
|
|
@@ -2065,36 +2194,36 @@ function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = ""
|
|
|
2065
2194
|
children: "Back to sign in"
|
|
2066
2195
|
}
|
|
2067
2196
|
)
|
|
2068
|
-
] }) : /* @__PURE__ */
|
|
2069
|
-
/* @__PURE__ */
|
|
2070
|
-
/* @__PURE__ */
|
|
2071
|
-
/* @__PURE__ */
|
|
2197
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
|
2198
|
+
/* @__PURE__ */ jsxs10("div", { className: "field", children: [
|
|
2199
|
+
/* @__PURE__ */ jsx11("label", { children: "Email" }),
|
|
2200
|
+
/* @__PURE__ */ jsx11("input", { className: "input", type: "email", value: email, onChange: (e) => setEmail(e.target.value), autoFocus: true, required: true, autoComplete: "email" })
|
|
2072
2201
|
] }),
|
|
2073
|
-
err && /* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
/* @__PURE__ */
|
|
2202
|
+
err && /* @__PURE__ */ jsx11("div", { className: "auth-err", children: err }),
|
|
2203
|
+
/* @__PURE__ */ jsx11("button", { type: "submit", className: "btn primary lg", style: { width: "100%", marginTop: 8 }, disabled: busy, children: busy ? "Please wait..." : "Send reset link" }),
|
|
2204
|
+
/* @__PURE__ */ jsx11("p", { className: "auth-switch", children: /* @__PURE__ */ jsx11("button", { type: "button", onClick: () => {
|
|
2076
2205
|
setErr("");
|
|
2077
2206
|
setMode("signin");
|
|
2078
2207
|
}, children: "Back to sign in" }) })
|
|
2079
|
-
] }) : /* @__PURE__ */
|
|
2080
|
-
mode === "register" && /* @__PURE__ */
|
|
2081
|
-
/* @__PURE__ */
|
|
2082
|
-
/* @__PURE__ */
|
|
2208
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
|
2209
|
+
mode === "register" && /* @__PURE__ */ jsxs10("div", { className: "field", children: [
|
|
2210
|
+
/* @__PURE__ */ jsx11("label", { children: "Name" }),
|
|
2211
|
+
/* @__PURE__ */ jsx11("input", { className: "input", value: name, onChange: (e) => setName(e.target.value), autoComplete: "name", placeholder: "Jane Doe" })
|
|
2083
2212
|
] }),
|
|
2084
|
-
/* @__PURE__ */
|
|
2085
|
-
/* @__PURE__ */
|
|
2086
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ jsxs10("div", { className: "field", children: [
|
|
2214
|
+
/* @__PURE__ */ jsx11("label", { children: "Email" }),
|
|
2215
|
+
/* @__PURE__ */ jsx11("input", { className: "input", type: "email", value: email, onChange: (e) => setEmail(e.target.value), autoFocus: true, required: true, autoComplete: "email" })
|
|
2087
2216
|
] }),
|
|
2088
|
-
/* @__PURE__ */
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */
|
|
2091
|
-
mode === "signin" && /* @__PURE__ */
|
|
2217
|
+
/* @__PURE__ */ jsxs10("div", { className: "field", children: [
|
|
2218
|
+
/* @__PURE__ */ jsxs10("div", { className: "field-row", children: [
|
|
2219
|
+
/* @__PURE__ */ jsx11("label", { children: "Password" }),
|
|
2220
|
+
mode === "signin" && /* @__PURE__ */ jsx11("button", { type: "button", className: "link-sm", onClick: () => {
|
|
2092
2221
|
setErr("");
|
|
2093
2222
|
setResetSent(false);
|
|
2094
2223
|
setMode("forgot");
|
|
2095
2224
|
}, children: "Forgot password?" })
|
|
2096
2225
|
] }),
|
|
2097
|
-
/* @__PURE__ */
|
|
2226
|
+
/* @__PURE__ */ jsx11(
|
|
2098
2227
|
"input",
|
|
2099
2228
|
{
|
|
2100
2229
|
className: "input",
|
|
@@ -2107,13 +2236,15 @@ function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = ""
|
|
|
2107
2236
|
}
|
|
2108
2237
|
)
|
|
2109
2238
|
] }),
|
|
2110
|
-
err && /* @__PURE__ */
|
|
2111
|
-
/* @__PURE__ */
|
|
2112
|
-
GOOGLE_ENABLED && /* @__PURE__ */
|
|
2113
|
-
/* @__PURE__ */
|
|
2239
|
+
err && /* @__PURE__ */ jsx11("div", { className: "auth-err", children: err }),
|
|
2240
|
+
/* @__PURE__ */ jsx11("button", { type: "submit", className: "btn primary lg", style: { width: "100%", marginTop: 8 }, disabled: busy, children: busy ? "Please wait..." : mode === "register" ? "Create account" : "Sign in" }),
|
|
2241
|
+
(GOOGLE_ENABLED || MICROSOFT_ENABLED) && /* @__PURE__ */ jsx11("div", { className: "auth-or", children: /* @__PURE__ */ jsx11("span", { children: "or" }) }),
|
|
2242
|
+
GOOGLE_ENABLED && /* @__PURE__ */ jsx11(GoogleButton, { onCredential: onGoogle, onError: setErr, divider: false }),
|
|
2243
|
+
MICROSOFT_ENABLED && /* @__PURE__ */ jsx11(MicrosoftButton, { onCredential: onMicrosoft, onError: setErr, disabled: busy }),
|
|
2244
|
+
/* @__PURE__ */ jsxs10("p", { className: "auth-switch", children: [
|
|
2114
2245
|
mode === "register" ? "Already have an account?" : `New to ${productName || "the product"}?`,
|
|
2115
2246
|
" ",
|
|
2116
|
-
/* @__PURE__ */
|
|
2247
|
+
/* @__PURE__ */ jsx11("button", { type: "button", onClick: () => {
|
|
2117
2248
|
setErr("");
|
|
2118
2249
|
setMode(mode === "register" ? "signin" : "register");
|
|
2119
2250
|
}, children: mode === "register" ? "Sign in" : "Create one" })
|
|
@@ -2123,8 +2254,8 @@ function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = ""
|
|
|
2123
2254
|
}
|
|
2124
2255
|
|
|
2125
2256
|
// src/components/FileTypeIcon.jsx
|
|
2126
|
-
import { useEffect as useEffect7, useState as
|
|
2127
|
-
import { jsx as
|
|
2257
|
+
import { useEffect as useEffect7, useState as useState10 } from "react";
|
|
2258
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
2128
2259
|
function extOf(name) {
|
|
2129
2260
|
const m = String(name || "").toLowerCase().match(/\.([a-z0-9]+)$/);
|
|
2130
2261
|
return m ? m[1] : "";
|
|
@@ -2132,7 +2263,7 @@ function extOf(name) {
|
|
|
2132
2263
|
var mod = null;
|
|
2133
2264
|
var tried = false;
|
|
2134
2265
|
function FileTypeIcon({ name, size = 36 }) {
|
|
2135
|
-
const [, force] =
|
|
2266
|
+
const [, force] = useState10(0);
|
|
2136
2267
|
const ext = extOf(name);
|
|
2137
2268
|
useEffect7(() => {
|
|
2138
2269
|
if (tried || mod) return;
|
|
@@ -2145,15 +2276,15 @@ function FileTypeIcon({ name, size = 36 }) {
|
|
|
2145
2276
|
}, []);
|
|
2146
2277
|
const box = { width: size, height: Math.round(size * 1.16), display: "inline-block", flex: "0 0 auto" };
|
|
2147
2278
|
if (!mod) {
|
|
2148
|
-
return /* @__PURE__ */
|
|
2279
|
+
return /* @__PURE__ */ jsx12("span", { className: "uic-fileglyph", style: box, "aria-hidden": "true", children: /* @__PURE__ */ jsx12("span", { className: "uic-fileglyph-ext", children: (ext || "file").slice(0, 4) }) });
|
|
2149
2280
|
}
|
|
2150
2281
|
const { FileIcon, defaultStyles } = mod;
|
|
2151
2282
|
const style = defaultStyles?.[ext] || {};
|
|
2152
|
-
return /* @__PURE__ */
|
|
2283
|
+
return /* @__PURE__ */ jsx12("span", { style: box, children: /* @__PURE__ */ jsx12(FileIcon, { extension: ext || void 0, ...style }) });
|
|
2153
2284
|
}
|
|
2154
2285
|
|
|
2155
2286
|
// src/components/FileCard.jsx
|
|
2156
|
-
import { jsx as
|
|
2287
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2157
2288
|
function subtitle(name, origin, bytes) {
|
|
2158
2289
|
const parts = [(extOf(name) || "file").toUpperCase()];
|
|
2159
2290
|
if (origin) parts.push(origin);
|
|
@@ -2171,7 +2302,7 @@ function FileCard({ name, origin = "output", bytes, onPreview, onDownload, class
|
|
|
2171
2302
|
e.stopPropagation();
|
|
2172
2303
|
onPreview();
|
|
2173
2304
|
} : void 0;
|
|
2174
|
-
return /* @__PURE__ */
|
|
2305
|
+
return /* @__PURE__ */ jsxs11(
|
|
2175
2306
|
"div",
|
|
2176
2307
|
{
|
|
2177
2308
|
className: "uic-filecard" + (open ? " is-clickable" : "") + (className ? " " + className : ""),
|
|
@@ -2186,12 +2317,12 @@ function FileCard({ name, origin = "output", bytes, onPreview, onDownload, class
|
|
|
2186
2317
|
} : void 0,
|
|
2187
2318
|
title: name,
|
|
2188
2319
|
children: [
|
|
2189
|
-
/* @__PURE__ */
|
|
2190
|
-
/* @__PURE__ */
|
|
2191
|
-
/* @__PURE__ */
|
|
2192
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ jsx13("span", { className: "uic-filecard-ic", children: /* @__PURE__ */ jsx13(FileTypeIcon, { name, size: 32 }) }),
|
|
2321
|
+
/* @__PURE__ */ jsxs11("span", { className: "uic-filecard-meta", children: [
|
|
2322
|
+
/* @__PURE__ */ jsx13("span", { className: "uic-filecard-name", children: name }),
|
|
2323
|
+
/* @__PURE__ */ jsx13("span", { className: "uic-filecard-sub", children: subtitle(name, origin, bytes) })
|
|
2193
2324
|
] }),
|
|
2194
|
-
onDownload && /* @__PURE__ */
|
|
2325
|
+
onDownload && /* @__PURE__ */ jsx13(
|
|
2195
2326
|
"button",
|
|
2196
2327
|
{
|
|
2197
2328
|
type: "button",
|
|
@@ -2202,18 +2333,18 @@ function FileCard({ name, origin = "output", bytes, onPreview, onDownload, class
|
|
|
2202
2333
|
e.stopPropagation();
|
|
2203
2334
|
onDownload();
|
|
2204
2335
|
},
|
|
2205
|
-
children: /* @__PURE__ */
|
|
2336
|
+
children: /* @__PURE__ */ jsx13(IcDownload, { size: 18 })
|
|
2206
2337
|
}
|
|
2207
2338
|
),
|
|
2208
|
-
onPreview && /* @__PURE__ */
|
|
2339
|
+
onPreview && /* @__PURE__ */ jsx13("button", { type: "button", className: "uic-filecard-open", "aria-label": `Preview ${name}`, onClick: open, children: "Preview" })
|
|
2209
2340
|
]
|
|
2210
2341
|
}
|
|
2211
2342
|
);
|
|
2212
2343
|
}
|
|
2213
2344
|
|
|
2214
2345
|
// src/components/FilePreview.jsx
|
|
2215
|
-
import { useEffect as useEffect8, useState as
|
|
2216
|
-
import { jsx as
|
|
2346
|
+
import { useEffect as useEffect8, useState as useState11 } from "react";
|
|
2347
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2217
2348
|
var LANG = {
|
|
2218
2349
|
js: "javascript",
|
|
2219
2350
|
mjs: "javascript",
|
|
@@ -2294,11 +2425,11 @@ function delimitedToRows(text, sep) {
|
|
|
2294
2425
|
});
|
|
2295
2426
|
}
|
|
2296
2427
|
function Grid({ rows }) {
|
|
2297
|
-
if (!rows?.length) return /* @__PURE__ */
|
|
2428
|
+
if (!rows?.length) return /* @__PURE__ */ jsx14("div", { className: "uic-fp-empty", children: "This file is empty." });
|
|
2298
2429
|
const [head, ...body] = rows;
|
|
2299
|
-
return /* @__PURE__ */
|
|
2300
|
-
/* @__PURE__ */
|
|
2301
|
-
/* @__PURE__ */
|
|
2430
|
+
return /* @__PURE__ */ jsx14("div", { className: "uic-fp-sheet", children: /* @__PURE__ */ jsxs12("table", { children: [
|
|
2431
|
+
/* @__PURE__ */ jsx14("thead", { children: /* @__PURE__ */ jsx14("tr", { children: head.map((c, i) => /* @__PURE__ */ jsx14("th", { children: c }, i)) }) }),
|
|
2432
|
+
/* @__PURE__ */ jsx14("tbody", { children: body.map((r, i) => /* @__PURE__ */ jsx14("tr", { children: r.map((c, j) => /* @__PURE__ */ jsx14("td", { children: c }, j)) }, i)) })
|
|
2302
2433
|
] }) });
|
|
2303
2434
|
}
|
|
2304
2435
|
var defaultDownload = (url, name) => {
|
|
@@ -2321,9 +2452,9 @@ function FilePreview({
|
|
|
2321
2452
|
title
|
|
2322
2453
|
}) {
|
|
2323
2454
|
const { url, name } = file || {};
|
|
2324
|
-
const [st, setSt] =
|
|
2325
|
-
const [tab, setTab] =
|
|
2326
|
-
const [view, setView] =
|
|
2455
|
+
const [st, setSt] = useState11({ kind: "loading" });
|
|
2456
|
+
const [tab, setTab] = useState11(0);
|
|
2457
|
+
const [view, setView] = useState11("preview");
|
|
2327
2458
|
useEffect8(() => {
|
|
2328
2459
|
if (!url) return void 0;
|
|
2329
2460
|
let alive = true;
|
|
@@ -2339,7 +2470,7 @@ function FilePreview({
|
|
|
2339
2470
|
const kind = kindOf(name, mime);
|
|
2340
2471
|
if (kind === "office") {
|
|
2341
2472
|
if (!officePdfUrl) {
|
|
2342
|
-
setSt({ kind: "binary", error: "This format has no
|
|
2473
|
+
setSt({ kind: "binary", error: "This format has no preview here. Download it to open it." });
|
|
2343
2474
|
return;
|
|
2344
2475
|
}
|
|
2345
2476
|
const r = await get(officePdfUrl(url));
|
|
@@ -2350,7 +2481,7 @@ function FilePreview({
|
|
|
2350
2481
|
}
|
|
2351
2482
|
if (kind === "sheet") {
|
|
2352
2483
|
if (!parseWorkbook) {
|
|
2353
|
-
setSt({ kind: "binary", error: "This format has no
|
|
2484
|
+
setSt({ kind: "binary", error: "This format has no preview here. Download it to open it." });
|
|
2354
2485
|
return;
|
|
2355
2486
|
}
|
|
2356
2487
|
try {
|
|
@@ -2387,11 +2518,11 @@ function FilePreview({
|
|
|
2387
2518
|
};
|
|
2388
2519
|
}, [url, name, fetchFile, officePdfUrl, parseWorkbook]);
|
|
2389
2520
|
const download = () => onDownload ? onDownload(url, name) : defaultDownload(url, name);
|
|
2390
|
-
return /* @__PURE__ */
|
|
2391
|
-
/* @__PURE__ */
|
|
2392
|
-
/* @__PURE__ */
|
|
2393
|
-
/* @__PURE__ */
|
|
2394
|
-
st.kind === "html" && /* @__PURE__ */
|
|
2521
|
+
return /* @__PURE__ */ jsxs12("aside", { className: "uic-fp", "aria-label": title || `Preview of ${name}`, children: [
|
|
2522
|
+
/* @__PURE__ */ jsxs12("header", { className: "uic-fp-head", children: [
|
|
2523
|
+
/* @__PURE__ */ jsx14("span", { className: "uic-fp-ic", children: /* @__PURE__ */ jsx14(FileTypeIcon, { name, size: 20 }) }),
|
|
2524
|
+
/* @__PURE__ */ jsx14("span", { className: "uic-fp-name", title: name, children: name }),
|
|
2525
|
+
st.kind === "html" && /* @__PURE__ */ jsx14("div", { className: "uic-fp-seg", role: "tablist", "aria-label": "Show the page or its source", children: [["preview", "Preview"], ["source", "Source"]].map(([id, label]) => /* @__PURE__ */ jsx14(
|
|
2395
2526
|
"button",
|
|
2396
2527
|
{
|
|
2397
2528
|
type: "button",
|
|
@@ -2403,7 +2534,7 @@ function FilePreview({
|
|
|
2403
2534
|
},
|
|
2404
2535
|
id
|
|
2405
2536
|
)) }),
|
|
2406
|
-
/* @__PURE__ */
|
|
2537
|
+
/* @__PURE__ */ jsx14(
|
|
2407
2538
|
"button",
|
|
2408
2539
|
{
|
|
2409
2540
|
type: "button",
|
|
@@ -2411,10 +2542,10 @@ function FilePreview({
|
|
|
2411
2542
|
"aria-label": `Download ${name}`,
|
|
2412
2543
|
title: "Download",
|
|
2413
2544
|
onClick: download,
|
|
2414
|
-
children: /* @__PURE__ */
|
|
2545
|
+
children: /* @__PURE__ */ jsx14(IcDownload, {})
|
|
2415
2546
|
}
|
|
2416
2547
|
),
|
|
2417
|
-
onClose && /* @__PURE__ */
|
|
2548
|
+
onClose && /* @__PURE__ */ jsx14(
|
|
2418
2549
|
"button",
|
|
2419
2550
|
{
|
|
2420
2551
|
type: "button",
|
|
@@ -2422,26 +2553,26 @@ function FilePreview({
|
|
|
2422
2553
|
"aria-label": "Close preview",
|
|
2423
2554
|
title: "Close",
|
|
2424
2555
|
onClick: onClose,
|
|
2425
|
-
children: /* @__PURE__ */
|
|
2556
|
+
children: /* @__PURE__ */ jsx14(IcX, { size: 18 })
|
|
2426
2557
|
}
|
|
2427
2558
|
)
|
|
2428
2559
|
] }),
|
|
2429
|
-
/* @__PURE__ */
|
|
2430
|
-
st.kind === "loading" && /* @__PURE__ */
|
|
2431
|
-
st.kind === "image" && st.objUrl && /* @__PURE__ */
|
|
2432
|
-
st.kind === "pdf" && st.objUrl && /* @__PURE__ */
|
|
2433
|
-
st.kind === "video" && st.objUrl && /* @__PURE__ */
|
|
2434
|
-
st.kind === "audio" && st.objUrl && /* @__PURE__ */
|
|
2435
|
-
st.kind === "markdown" && /* @__PURE__ */
|
|
2436
|
-
st.kind === "code" && /* @__PURE__ */
|
|
2437
|
-
st.kind === "html" && view === "source" && /* @__PURE__ */
|
|
2560
|
+
/* @__PURE__ */ jsxs12("div", { className: "uic-fp-body", children: [
|
|
2561
|
+
st.kind === "loading" && /* @__PURE__ */ jsx14("div", { className: "uic-fp-pad", children: /* @__PURE__ */ jsx14("span", { className: "uic-skel uic-fp-skel" }) }),
|
|
2562
|
+
st.kind === "image" && st.objUrl && /* @__PURE__ */ jsx14("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsx14("img", { className: "uic-fp-img", src: st.objUrl, alt: name }) }),
|
|
2563
|
+
st.kind === "pdf" && st.objUrl && /* @__PURE__ */ jsx14("iframe", { className: "uic-fp-frame", src: st.objUrl, title: name }),
|
|
2564
|
+
st.kind === "video" && st.objUrl && /* @__PURE__ */ jsx14("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsx14("video", { className: "uic-fp-media", src: st.objUrl, controls: true }) }),
|
|
2565
|
+
st.kind === "audio" && st.objUrl && /* @__PURE__ */ jsx14("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsx14("audio", { src: st.objUrl, controls: true }) }),
|
|
2566
|
+
st.kind === "markdown" && /* @__PURE__ */ jsx14("div", { className: "uic-fp-doc", children: renderMarkdown ? renderMarkdown(st.text || "") : /* @__PURE__ */ jsx14("pre", { className: "uic-fp-pre", children: st.text }) }),
|
|
2567
|
+
st.kind === "code" && /* @__PURE__ */ jsx14(CodeBlock, { code: st.text || "", language: LANG[extOf(name)] || "plaintext" }),
|
|
2568
|
+
st.kind === "html" && view === "source" && /* @__PURE__ */ jsx14(CodeBlock, { code: st.text || "", language: "xml" }),
|
|
2438
2569
|
st.kind === "html" && view === "preview" && // The page runs in its own origin with scripts only: a mockup's own script and styles
|
|
2439
2570
|
// work, and nothing in it can read the host page, its cookies or its storage.
|
|
2440
|
-
/* @__PURE__ */
|
|
2441
|
-
st.kind === "csv" && /* @__PURE__ */
|
|
2442
|
-
st.kind === "sheet" && st.sheets && /* @__PURE__ */
|
|
2443
|
-
st.sheets[tab]?.filled ? /* @__PURE__ */
|
|
2444
|
-
/* @__PURE__ */
|
|
2571
|
+
/* @__PURE__ */ jsx14("iframe", { className: "uic-fp-frame", title: name, sandbox: "allow-scripts", srcDoc: st.text || "" }),
|
|
2572
|
+
st.kind === "csv" && /* @__PURE__ */ jsx14(Grid, { rows: st.rows }),
|
|
2573
|
+
st.kind === "sheet" && st.sheets && /* @__PURE__ */ jsxs12("div", { className: "uic-fp-xlsx", children: [
|
|
2574
|
+
st.sheets[tab]?.filled ? /* @__PURE__ */ jsx14(Grid, { rows: st.sheets[tab].rows }) : /* @__PURE__ */ jsx14("div", { className: "uic-fp-empty", children: "This sheet is empty." }),
|
|
2575
|
+
/* @__PURE__ */ jsx14("div", { className: "uic-fp-tabs", children: st.sheets.map((s, i) => /* @__PURE__ */ jsx14(
|
|
2445
2576
|
"button",
|
|
2446
2577
|
{
|
|
2447
2578
|
type: "button",
|
|
@@ -2453,10 +2584,10 @@ function FilePreview({
|
|
|
2453
2584
|
s.name + i
|
|
2454
2585
|
)) })
|
|
2455
2586
|
] }),
|
|
2456
|
-
st.kind === "binary" && /* @__PURE__ */
|
|
2457
|
-
/* @__PURE__ */
|
|
2458
|
-
/* @__PURE__ */
|
|
2459
|
-
/* @__PURE__ */
|
|
2587
|
+
st.kind === "binary" && /* @__PURE__ */ jsx14("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsxs12("div", { className: "uic-fp-fallback", children: [
|
|
2588
|
+
/* @__PURE__ */ jsx14(FileTypeIcon, { name, size: 56 }),
|
|
2589
|
+
/* @__PURE__ */ jsx14("p", { children: st.error || "No inline preview for this file type." }),
|
|
2590
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "uic-fp-dl", onClick: download, children: "Download" })
|
|
2460
2591
|
] }) })
|
|
2461
2592
|
] })
|
|
2462
2593
|
] });
|
|
@@ -2464,29 +2595,29 @@ function FilePreview({
|
|
|
2464
2595
|
|
|
2465
2596
|
// src/components/form.jsx
|
|
2466
2597
|
import { useId as useId2 } from "react";
|
|
2467
|
-
import { jsx as
|
|
2598
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2468
2599
|
function Field({ label, hint, error, htmlFor, required, children, className = "" }) {
|
|
2469
|
-
return /* @__PURE__ */
|
|
2470
|
-
label && /* @__PURE__ */
|
|
2600
|
+
return /* @__PURE__ */ jsxs13("div", { className: "uic-field" + (error ? " is-error" : "") + (className ? " " + className : ""), children: [
|
|
2601
|
+
label && /* @__PURE__ */ jsxs13("label", { className: "uic-field-label", htmlFor, children: [
|
|
2471
2602
|
label,
|
|
2472
|
-
required && /* @__PURE__ */
|
|
2603
|
+
required && /* @__PURE__ */ jsx15("span", { className: "uic-field-req", "aria-hidden": "true", children: "*" })
|
|
2473
2604
|
] }),
|
|
2474
2605
|
children,
|
|
2475
|
-
error ? /* @__PURE__ */
|
|
2606
|
+
error ? /* @__PURE__ */ jsx15("p", { className: "uic-field-err", children: error }) : hint ? /* @__PURE__ */ jsx15("p", { className: "uic-field-hint", children: hint }) : null
|
|
2476
2607
|
] });
|
|
2477
2608
|
}
|
|
2478
2609
|
function withField(Control) {
|
|
2479
2610
|
return function Fielded({ label, hint, error, required, id, className, ...rest }) {
|
|
2480
2611
|
const auto = useId2();
|
|
2481
2612
|
const inputId = id || auto;
|
|
2482
|
-
return /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ jsx15(Field, { label, hint, error, required, htmlFor: inputId, className, children: /* @__PURE__ */ jsx15(Control, { id: inputId, invalid: !!error, required, ...rest }) });
|
|
2483
2614
|
};
|
|
2484
2615
|
}
|
|
2485
2616
|
function BareInput({ invalid, ...rest }) {
|
|
2486
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ jsx15("input", { className: "uic-input" + (invalid ? " is-error" : ""), "aria-invalid": invalid || void 0, ...rest });
|
|
2487
2618
|
}
|
|
2488
2619
|
function BareTextarea({ invalid, rows = 4, ...rest }) {
|
|
2489
|
-
return /* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ jsx15(
|
|
2490
2621
|
"textarea",
|
|
2491
2622
|
{
|
|
2492
2623
|
className: "uic-input uic-textarea" + (invalid ? " is-error" : ""),
|
|
@@ -2497,43 +2628,43 @@ function BareTextarea({ invalid, rows = 4, ...rest }) {
|
|
|
2497
2628
|
);
|
|
2498
2629
|
}
|
|
2499
2630
|
function BareSelect({ invalid, options = [], placeholder, ...rest }) {
|
|
2500
|
-
return /* @__PURE__ */
|
|
2501
|
-
/* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ jsxs13("span", { className: "uic-select-wrap", children: [
|
|
2632
|
+
/* @__PURE__ */ jsxs13(
|
|
2502
2633
|
"select",
|
|
2503
2634
|
{
|
|
2504
2635
|
className: "uic-input uic-select" + (invalid ? " is-error" : ""),
|
|
2505
2636
|
"aria-invalid": invalid || void 0,
|
|
2506
2637
|
...rest,
|
|
2507
2638
|
children: [
|
|
2508
|
-
placeholder && /* @__PURE__ */
|
|
2639
|
+
placeholder && /* @__PURE__ */ jsx15("option", { value: "", children: placeholder }),
|
|
2509
2640
|
options.map((o) => {
|
|
2510
2641
|
const opt = typeof o === "string" ? { value: o, label: o } : o;
|
|
2511
|
-
return /* @__PURE__ */
|
|
2642
|
+
return /* @__PURE__ */ jsx15("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value);
|
|
2512
2643
|
})
|
|
2513
2644
|
]
|
|
2514
2645
|
}
|
|
2515
2646
|
),
|
|
2516
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ jsx15("span", { className: "uic-select-chev", "aria-hidden": "true", children: /* @__PURE__ */ jsx15(Chevron, { dir: "down", size: 14 }) })
|
|
2517
2648
|
] });
|
|
2518
2649
|
}
|
|
2519
2650
|
var Input = withField(BareInput);
|
|
2520
2651
|
var Textarea = withField(BareTextarea);
|
|
2521
2652
|
var Select = withField(BareSelect);
|
|
2522
2653
|
function FormActions({ children, align = "end", className = "" }) {
|
|
2523
|
-
return /* @__PURE__ */
|
|
2654
|
+
return /* @__PURE__ */ jsx15("div", { className: `uic-form-actions is-${align}${className ? " " + className : ""}`, children });
|
|
2524
2655
|
}
|
|
2525
2656
|
function Button({ variant = "default", size = "md", type = "button", className = "", ...rest }) {
|
|
2526
|
-
return /* @__PURE__ */
|
|
2657
|
+
return /* @__PURE__ */ jsx15("button", { type, className: `uic-btn is-${variant} is-${size}${className ? " " + className : ""}`, ...rest });
|
|
2527
2658
|
}
|
|
2528
2659
|
|
|
2529
2660
|
// src/components/Carousel.jsx
|
|
2530
|
-
import React7, { useCallback as useCallback5, useEffect as useEffect9, useRef as
|
|
2531
|
-
import { jsx as
|
|
2661
|
+
import React7, { useCallback as useCallback5, useEffect as useEffect9, useRef as useRef8, useState as useState12 } from "react";
|
|
2662
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2532
2663
|
var EDGE = 2;
|
|
2533
2664
|
function Carousel(props) {
|
|
2534
2665
|
const { label, step, children, classNames = {} } = props;
|
|
2535
|
-
const ref =
|
|
2536
|
-
const [edges, setEdges] =
|
|
2666
|
+
const ref = useRef8(null);
|
|
2667
|
+
const [edges, setEdges] = useState12({ start: true, end: true, overflow: false });
|
|
2537
2668
|
const measure = useCallback5(() => {
|
|
2538
2669
|
const el = ref.current;
|
|
2539
2670
|
if (!el) return;
|
|
@@ -2558,8 +2689,8 @@ function Carousel(props) {
|
|
|
2558
2689
|
if (!el) return;
|
|
2559
2690
|
el.scrollBy({ left: dir * (step || Math.round(el.clientWidth * 0.9)), behavior: "smooth" });
|
|
2560
2691
|
};
|
|
2561
|
-
return /* @__PURE__ */
|
|
2562
|
-
edges.overflow ? /* @__PURE__ */
|
|
2692
|
+
return /* @__PURE__ */ jsxs14("div", { className: ["uic-carousel-wrap", classNames.root || ""].filter(Boolean).join(" "), children: [
|
|
2693
|
+
edges.overflow ? /* @__PURE__ */ jsx16(
|
|
2563
2694
|
"button",
|
|
2564
2695
|
{
|
|
2565
2696
|
type: "button",
|
|
@@ -2567,10 +2698,10 @@ function Carousel(props) {
|
|
|
2567
2698
|
onClick: () => scroll(-1),
|
|
2568
2699
|
disabled: edges.start,
|
|
2569
2700
|
"aria-label": `Scroll ${label} left`,
|
|
2570
|
-
children: /* @__PURE__ */
|
|
2701
|
+
children: /* @__PURE__ */ jsx16(Chevron, { dir: "left" })
|
|
2571
2702
|
}
|
|
2572
2703
|
) : null,
|
|
2573
|
-
/* @__PURE__ */
|
|
2704
|
+
/* @__PURE__ */ jsx16(
|
|
2574
2705
|
"div",
|
|
2575
2706
|
{
|
|
2576
2707
|
className: ["uic-carousel", classNames.viewport || ""].filter(Boolean).join(" "),
|
|
@@ -2581,7 +2712,7 @@ function Carousel(props) {
|
|
|
2581
2712
|
children
|
|
2582
2713
|
}
|
|
2583
2714
|
),
|
|
2584
|
-
edges.overflow ? /* @__PURE__ */
|
|
2715
|
+
edges.overflow ? /* @__PURE__ */ jsx16(
|
|
2585
2716
|
"button",
|
|
2586
2717
|
{
|
|
2587
2718
|
type: "button",
|
|
@@ -2589,7 +2720,7 @@ function Carousel(props) {
|
|
|
2589
2720
|
onClick: () => scroll(1),
|
|
2590
2721
|
disabled: edges.end,
|
|
2591
2722
|
"aria-label": `Scroll ${label} right`,
|
|
2592
|
-
children: /* @__PURE__ */
|
|
2723
|
+
children: /* @__PURE__ */ jsx16(Chevron, { dir: "right" })
|
|
2593
2724
|
}
|
|
2594
2725
|
) : null
|
|
2595
2726
|
] });
|
|
@@ -2597,34 +2728,34 @@ function Carousel(props) {
|
|
|
2597
2728
|
|
|
2598
2729
|
// src/components/Card.jsx
|
|
2599
2730
|
import React8 from "react";
|
|
2600
|
-
import { jsx as
|
|
2731
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2601
2732
|
function Card(props) {
|
|
2602
2733
|
const { art, title, subtitle: subtitle2, onClick, selected = false, overlay, actions, classNames = {} } = props;
|
|
2603
|
-
const foot = /* @__PURE__ */
|
|
2604
|
-
/* @__PURE__ */
|
|
2605
|
-
subtitle2 ? /* @__PURE__ */
|
|
2734
|
+
const foot = /* @__PURE__ */ jsxs15("span", { className: "uic-card-foot", children: [
|
|
2735
|
+
/* @__PURE__ */ jsx17("span", { className: "uic-card-name", children: title }),
|
|
2736
|
+
subtitle2 ? /* @__PURE__ */ jsx17("span", { className: "uic-card-sub", children: subtitle2 }) : null
|
|
2606
2737
|
] });
|
|
2607
|
-
return /* @__PURE__ */
|
|
2608
|
-
onClick ? /* @__PURE__ */
|
|
2609
|
-
/* @__PURE__ */
|
|
2738
|
+
return /* @__PURE__ */ jsxs15("div", { className: ["uic-card", selected ? "is-selected" : "", classNames.root || ""].filter(Boolean).join(" "), children: [
|
|
2739
|
+
onClick ? /* @__PURE__ */ jsxs15("button", { type: "button", className: "uic-card-main", onClick, "aria-pressed": selected || void 0, children: [
|
|
2740
|
+
/* @__PURE__ */ jsx17("span", { className: "uic-card-art", children: art }),
|
|
2610
2741
|
foot
|
|
2611
|
-
] }) : /* @__PURE__ */
|
|
2612
|
-
/* @__PURE__ */
|
|
2742
|
+
] }) : /* @__PURE__ */ jsxs15("div", { className: "uic-card-main", children: [
|
|
2743
|
+
/* @__PURE__ */ jsx17("span", { className: "uic-card-art", children: art }),
|
|
2613
2744
|
foot
|
|
2614
2745
|
] }),
|
|
2615
|
-
overlay ? /* @__PURE__ */
|
|
2616
|
-
actions ? /* @__PURE__ */
|
|
2746
|
+
overlay ? /* @__PURE__ */ jsx17("div", { className: "uic-card-overlay", children: overlay }) : null,
|
|
2747
|
+
actions ? /* @__PURE__ */ jsx17("div", { className: "uic-card-actions", children: actions }) : null
|
|
2617
2748
|
] });
|
|
2618
2749
|
}
|
|
2619
2750
|
|
|
2620
2751
|
// src/components/SearchField.jsx
|
|
2621
2752
|
import React9 from "react";
|
|
2622
|
-
import { jsx as
|
|
2753
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2623
2754
|
function SearchField(props) {
|
|
2624
2755
|
const { value, onChange, placeholder, clearLabel = "Clear search", className } = props;
|
|
2625
|
-
return /* @__PURE__ */
|
|
2626
|
-
/* @__PURE__ */
|
|
2627
|
-
/* @__PURE__ */
|
|
2756
|
+
return /* @__PURE__ */ jsxs16("label", { className: ["uic-search", className || ""].filter(Boolean).join(" "), children: [
|
|
2757
|
+
/* @__PURE__ */ jsx18("span", { className: "uic-search-ic", "aria-hidden": "true", children: /* @__PURE__ */ jsx18(IcSearch, {}) }),
|
|
2758
|
+
/* @__PURE__ */ jsx18(
|
|
2628
2759
|
"input",
|
|
2629
2760
|
{
|
|
2630
2761
|
type: "search",
|
|
@@ -2634,14 +2765,14 @@ function SearchField(props) {
|
|
|
2634
2765
|
onChange: (e) => onChange(e.target.value)
|
|
2635
2766
|
}
|
|
2636
2767
|
),
|
|
2637
|
-
value ? /* @__PURE__ */
|
|
2768
|
+
value ? /* @__PURE__ */ jsx18("button", { type: "button", className: "uic-search-x", "aria-label": clearLabel, onClick: () => onChange(""), children: /* @__PURE__ */ jsx18(IcX, { size: 12 }) }) : null
|
|
2638
2769
|
] });
|
|
2639
2770
|
}
|
|
2640
2771
|
|
|
2641
2772
|
// src/components/CascadeMenu.jsx
|
|
2642
|
-
import React10, { Fragment as Fragment8, useCallback as useCallback6, useEffect as useEffect10, useMemo as useMemo3, useRef as
|
|
2643
|
-
import { jsx as
|
|
2644
|
-
var Tick = () => /* @__PURE__ */
|
|
2773
|
+
import React10, { Fragment as Fragment8, useCallback as useCallback6, useEffect as useEffect10, useMemo as useMemo3, useRef as useRef9, useState as useState13 } from "react";
|
|
2774
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2775
|
+
var Tick = () => /* @__PURE__ */ jsx19(Svg, { s: 14, children: /* @__PURE__ */ jsx19("path", { d: "M20 6 9 17l-5-5" }) });
|
|
2645
2776
|
var FILTER_PAST = 8;
|
|
2646
2777
|
var itemsOf = (groups) => groups.flatMap((g) => g.items);
|
|
2647
2778
|
function CascadeMenu(props) {
|
|
@@ -2665,11 +2796,11 @@ function CascadeMenu(props) {
|
|
|
2665
2796
|
className,
|
|
2666
2797
|
value
|
|
2667
2798
|
} = props;
|
|
2668
|
-
const rootRef =
|
|
2669
|
-
const [q, setQ] =
|
|
2670
|
-
const [activeId, setActiveId] =
|
|
2671
|
-
const [stage, setStage] =
|
|
2672
|
-
const [stacked, setStacked] =
|
|
2799
|
+
const rootRef = useRef9(null);
|
|
2800
|
+
const [q, setQ] = useState13("");
|
|
2801
|
+
const [activeId, setActiveId] = useState13(null);
|
|
2802
|
+
const [stage, setStage] = useState13("items");
|
|
2803
|
+
const [stacked, setStacked] = useState13(false);
|
|
2673
2804
|
const visible = useMemo3(() => {
|
|
2674
2805
|
const needle = q.trim().toLowerCase();
|
|
2675
2806
|
if (!needle) return groups.filter((g) => g.items.length > 0);
|
|
@@ -2745,7 +2876,7 @@ function CascadeMenu(props) {
|
|
|
2745
2876
|
};
|
|
2746
2877
|
const showItems = !stacked || stage === "items";
|
|
2747
2878
|
const showOptions = !stacked || stage === "options";
|
|
2748
|
-
return /* @__PURE__ */
|
|
2879
|
+
return /* @__PURE__ */ jsx19(
|
|
2749
2880
|
Popover,
|
|
2750
2881
|
{
|
|
2751
2882
|
open,
|
|
@@ -2755,15 +2886,15 @@ function CascadeMenu(props) {
|
|
|
2755
2886
|
width: stacked ? 320 : width,
|
|
2756
2887
|
minHeight: 260,
|
|
2757
2888
|
className: ["uic-cascade-pop", className || ""].filter(Boolean).join(" "),
|
|
2758
|
-
children: /* @__PURE__ */
|
|
2759
|
-
showItems && /* @__PURE__ */
|
|
2760
|
-
showFilter ? /* @__PURE__ */
|
|
2761
|
-
/* @__PURE__ */
|
|
2762
|
-
visible.map((g, gi) => /* @__PURE__ */
|
|
2763
|
-
g.label ? /* @__PURE__ */
|
|
2889
|
+
children: /* @__PURE__ */ jsxs17("div", { ref: rootRef, className: "uic-cascade" + (stacked ? " is-stacked" : ""), onKeyDown: onKey, children: [
|
|
2890
|
+
showItems && /* @__PURE__ */ jsxs17("div", { className: "uic-cascade-col uic-cascade-items", children: [
|
|
2891
|
+
showFilter ? /* @__PURE__ */ jsx19(SearchField, { className: "uic-cascade-filter", value: q, onChange: setQ, placeholder: filterPlaceholder }) : null,
|
|
2892
|
+
/* @__PURE__ */ jsxs17("div", { className: "uic-pop-list", children: [
|
|
2893
|
+
visible.map((g, gi) => /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
2894
|
+
g.label ? /* @__PURE__ */ jsx19("div", { className: "uic-cascade-group", children: g.label }) : null,
|
|
2764
2895
|
g.items.map((it) => {
|
|
2765
2896
|
const on = active?.id === it.id;
|
|
2766
|
-
return /* @__PURE__ */
|
|
2897
|
+
return /* @__PURE__ */ jsxs17(
|
|
2767
2898
|
"button",
|
|
2768
2899
|
{
|
|
2769
2900
|
type: "button",
|
|
@@ -2776,22 +2907,22 @@ function CascadeMenu(props) {
|
|
|
2776
2907
|
enterOptions();
|
|
2777
2908
|
},
|
|
2778
2909
|
children: [
|
|
2779
|
-
it.icon ? /* @__PURE__ */
|
|
2780
|
-
/* @__PURE__ */
|
|
2781
|
-
it.note ? /* @__PURE__ */
|
|
2782
|
-
/* @__PURE__ */
|
|
2910
|
+
it.icon ? /* @__PURE__ */ jsx19("span", { className: "uic-cascade-ic", "aria-hidden": "true", children: it.icon }) : null,
|
|
2911
|
+
/* @__PURE__ */ jsx19("span", { className: "uic-chip-t", children: it.label }),
|
|
2912
|
+
it.note ? /* @__PURE__ */ jsx19("span", { className: "uic-cascade-note", children: it.note }) : null,
|
|
2913
|
+
/* @__PURE__ */ jsx19("span", { className: "uic-cascade-chev", "aria-hidden": "true", children: /* @__PURE__ */ jsx19(Chevron, { dir: "right", size: 14 }) })
|
|
2783
2914
|
]
|
|
2784
2915
|
},
|
|
2785
2916
|
it.id
|
|
2786
2917
|
);
|
|
2787
2918
|
})
|
|
2788
2919
|
] }, g.label || gi)),
|
|
2789
|
-
flat.length === 0 ? /* @__PURE__ */
|
|
2920
|
+
flat.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "uic-pop-note", children: emptyText }) : null
|
|
2790
2921
|
] })
|
|
2791
2922
|
] }),
|
|
2792
|
-
showOptions && /* @__PURE__ */
|
|
2793
|
-
/* @__PURE__ */
|
|
2794
|
-
stacked ? /* @__PURE__ */
|
|
2923
|
+
showOptions && /* @__PURE__ */ jsxs17("div", { className: "uic-cascade-col uic-cascade-options", role: "group", "aria-label": optionsLabel, children: [
|
|
2924
|
+
/* @__PURE__ */ jsxs17("div", { className: "uic-cascade-head", children: [
|
|
2925
|
+
stacked ? /* @__PURE__ */ jsx19(
|
|
2795
2926
|
"button",
|
|
2796
2927
|
{
|
|
2797
2928
|
type: "button",
|
|
@@ -2801,16 +2932,16 @@ function CascadeMenu(props) {
|
|
|
2801
2932
|
setStage("items");
|
|
2802
2933
|
requestAnimationFrame(() => focusIn("items", flat.indexOf(active)));
|
|
2803
2934
|
},
|
|
2804
|
-
children: /* @__PURE__ */
|
|
2935
|
+
children: /* @__PURE__ */ jsx19(Chevron, { dir: "left", size: 14 })
|
|
2805
2936
|
}
|
|
2806
2937
|
) : null,
|
|
2807
|
-
active?.icon ? /* @__PURE__ */
|
|
2808
|
-
/* @__PURE__ */
|
|
2938
|
+
active?.icon ? /* @__PURE__ */ jsx19("span", { className: "uic-cascade-ic", "aria-hidden": "true", children: active.icon }) : null,
|
|
2939
|
+
/* @__PURE__ */ jsx19("span", { className: "uic-chip-t", children: active ? active.label : "" })
|
|
2809
2940
|
] }),
|
|
2810
|
-
/* @__PURE__ */
|
|
2941
|
+
/* @__PURE__ */ jsxs17("div", { className: "uic-pop-list", children: [
|
|
2811
2942
|
options.map((o) => {
|
|
2812
2943
|
const on = !!value && active?.id === value.item && o.id === value.option;
|
|
2813
|
-
return /* @__PURE__ */
|
|
2944
|
+
return /* @__PURE__ */ jsxs17(
|
|
2814
2945
|
"button",
|
|
2815
2946
|
{
|
|
2816
2947
|
type: "button",
|
|
@@ -2819,16 +2950,16 @@ function CascadeMenu(props) {
|
|
|
2819
2950
|
disabled: !!o.disabled,
|
|
2820
2951
|
onClick: () => onPick?.(active, o),
|
|
2821
2952
|
children: [
|
|
2822
|
-
value ? /* @__PURE__ */
|
|
2823
|
-
/* @__PURE__ */
|
|
2824
|
-
o.note ? /* @__PURE__ */
|
|
2953
|
+
value ? /* @__PURE__ */ jsx19("span", { className: "uic-pop-check", "aria-hidden": "true", children: on ? /* @__PURE__ */ jsx19(Tick, {}) : null }) : null,
|
|
2954
|
+
/* @__PURE__ */ jsx19("span", { className: "uic-chip-t", children: o.label }),
|
|
2955
|
+
o.note ? /* @__PURE__ */ jsx19("span", { className: "uic-cascade-note", children: o.note }) : null,
|
|
2825
2956
|
o.badge || null
|
|
2826
2957
|
]
|
|
2827
2958
|
},
|
|
2828
2959
|
o.id
|
|
2829
2960
|
);
|
|
2830
2961
|
}),
|
|
2831
|
-
active && options.length === 0 ? /* @__PURE__ */
|
|
2962
|
+
active && options.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "uic-pop-note", children: noOptionsText }) : null
|
|
2832
2963
|
] }),
|
|
2833
2964
|
optionsFooter || null
|
|
2834
2965
|
] })
|
|
@@ -2838,13 +2969,13 @@ function CascadeMenu(props) {
|
|
|
2838
2969
|
}
|
|
2839
2970
|
|
|
2840
2971
|
// src/hooks/useTypewriter.js
|
|
2841
|
-
import { useEffect as useEffect11, useRef as
|
|
2972
|
+
import { useEffect as useEffect11, useRef as useRef10, useState as useState14 } from "react";
|
|
2842
2973
|
var CHAR_MS = 26;
|
|
2843
2974
|
var HOLD_MS = 2600;
|
|
2844
2975
|
function useTypewriter(phrases, { active = true } = {}) {
|
|
2845
2976
|
const list = phrases && phrases.length ? phrases : [""];
|
|
2846
|
-
const [text, setText] =
|
|
2847
|
-
const listRef =
|
|
2977
|
+
const [text, setText] = useState14(list[0]);
|
|
2978
|
+
const listRef = useRef10(list);
|
|
2848
2979
|
listRef.current = list;
|
|
2849
2980
|
useEffect11(() => {
|
|
2850
2981
|
if (!active) return void 0;
|
|
@@ -2877,7 +3008,7 @@ function useTypewriter(phrases, { active = true } = {}) {
|
|
|
2877
3008
|
}
|
|
2878
3009
|
|
|
2879
3010
|
// src/components/Panel.jsx
|
|
2880
|
-
import { jsx as
|
|
3011
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2881
3012
|
function Panel(props) {
|
|
2882
3013
|
const {
|
|
2883
3014
|
title,
|
|
@@ -2899,43 +3030,43 @@ function Panel(props) {
|
|
|
2899
3030
|
classNames = {},
|
|
2900
3031
|
children
|
|
2901
3032
|
} = props;
|
|
2902
|
-
const body = loading ? /* @__PURE__ */
|
|
2903
|
-
/* @__PURE__ */
|
|
2904
|
-
/* @__PURE__ */
|
|
2905
|
-
/* @__PURE__ */
|
|
2906
|
-
/* @__PURE__ */
|
|
2907
|
-
] }) : error ? /* @__PURE__ */
|
|
2908
|
-
/* @__PURE__ */
|
|
2909
|
-
/* @__PURE__ */
|
|
2910
|
-
errorDetail ? /* @__PURE__ */
|
|
2911
|
-
/* @__PURE__ */
|
|
2912
|
-
/* @__PURE__ */
|
|
3033
|
+
const body = loading ? /* @__PURE__ */ jsxs18("div", { className: "uic-panel-load", children: [
|
|
3034
|
+
/* @__PURE__ */ jsx20("span", { className: "uic-panel-load-bar" }),
|
|
3035
|
+
/* @__PURE__ */ jsx20("span", { className: "uic-panel-load-bar" }),
|
|
3036
|
+
/* @__PURE__ */ jsx20("span", { className: "uic-panel-load-bar" }),
|
|
3037
|
+
/* @__PURE__ */ jsx20("span", { className: "uic-sr", children: loadingLabel })
|
|
3038
|
+
] }) : error ? /* @__PURE__ */ jsxs18("div", { className: "uic-panel-fail", children: [
|
|
3039
|
+
/* @__PURE__ */ jsx20("p", { className: "uic-panel-fail-t", children: errorTitle }),
|
|
3040
|
+
/* @__PURE__ */ jsx20("pre", { className: "uic-panel-fail-m", children: error }),
|
|
3041
|
+
errorDetail ? /* @__PURE__ */ jsxs18("details", { className: "uic-panel-fail-d", children: [
|
|
3042
|
+
/* @__PURE__ */ jsx20("summary", { children: detailLabel }),
|
|
3043
|
+
/* @__PURE__ */ jsx20("div", { className: "uic-panel-fail-dd", children: errorDetail })
|
|
2913
3044
|
] }) : null,
|
|
2914
|
-
onRetry ? /* @__PURE__ */
|
|
3045
|
+
onRetry ? /* @__PURE__ */ jsx20("div", { className: "uic-panel-fail-act", children: /* @__PURE__ */ jsx20(Button, { size: "sm", onClick: onRetry, children: retryLabel }) }) : null
|
|
2915
3046
|
] }) : children;
|
|
2916
|
-
return /* @__PURE__ */
|
|
3047
|
+
return /* @__PURE__ */ jsxs18(
|
|
2917
3048
|
"section",
|
|
2918
3049
|
{
|
|
2919
3050
|
className: ["uic-panel", className, classNames.root || ""].filter(Boolean).join(" "),
|
|
2920
3051
|
"aria-busy": loading || busy || void 0,
|
|
2921
3052
|
children: [
|
|
2922
|
-
/* @__PURE__ */
|
|
2923
|
-
/* @__PURE__ */
|
|
2924
|
-
title ? /* @__PURE__ */
|
|
2925
|
-
meta ? /* @__PURE__ */
|
|
3053
|
+
/* @__PURE__ */ jsxs18("header", { className: ["uic-panel-head", classNames.head || ""].filter(Boolean).join(" "), children: [
|
|
3054
|
+
/* @__PURE__ */ jsxs18("div", { className: "uic-panel-titles", children: [
|
|
3055
|
+
title ? /* @__PURE__ */ jsx20(Heading, { className: "uic-panel-title", children: title }) : null,
|
|
3056
|
+
meta ? /* @__PURE__ */ jsx20("p", { className: "uic-panel-meta", children: meta }) : null
|
|
2926
3057
|
] }),
|
|
2927
|
-
actions ? /* @__PURE__ */
|
|
3058
|
+
actions ? /* @__PURE__ */ jsx20("div", { className: "uic-panel-acts", children: actions }) : null
|
|
2928
3059
|
] }),
|
|
2929
|
-
busy ? /* @__PURE__ */
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
footer ? /* @__PURE__ */
|
|
3060
|
+
busy ? /* @__PURE__ */ jsx20("div", { className: "uic-panel-busy", role: "status", "aria-label": busyLabel }) : null,
|
|
3061
|
+
/* @__PURE__ */ jsx20("div", { className: ["uic-panel-body", classNames.body || ""].filter(Boolean).join(" "), children: body }),
|
|
3062
|
+
footer ? /* @__PURE__ */ jsx20("footer", { className: "uic-panel-foot", children: footer }) : null
|
|
2932
3063
|
]
|
|
2933
3064
|
}
|
|
2934
3065
|
);
|
|
2935
3066
|
}
|
|
2936
3067
|
|
|
2937
3068
|
// src/grid/PanelGrid.jsx
|
|
2938
|
-
import React11, { useCallback as useCallback7, useEffect as useEffect12, useLayoutEffect, useMemo as useMemo4, useRef as
|
|
3069
|
+
import React11, { useCallback as useCallback7, useEffect as useEffect12, useLayoutEffect, useMemo as useMemo4, useRef as useRef11, useState as useState15 } from "react";
|
|
2939
3070
|
|
|
2940
3071
|
// src/grid/layout.js
|
|
2941
3072
|
function sortLayout(layout2) {
|
|
@@ -3008,10 +3139,10 @@ function sameLayout(a, b) {
|
|
|
3008
3139
|
}
|
|
3009
3140
|
|
|
3010
3141
|
// src/grid/PanelGrid.jsx
|
|
3011
|
-
import { jsx as
|
|
3142
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3012
3143
|
function useMeasuredWidth() {
|
|
3013
|
-
const ref =
|
|
3014
|
-
const [width, setWidth] =
|
|
3144
|
+
const ref = useRef11(null);
|
|
3145
|
+
const [width, setWidth] = useState15(0);
|
|
3015
3146
|
useLayoutEffect(() => {
|
|
3016
3147
|
const el = ref.current;
|
|
3017
3148
|
if (!el) return void 0;
|
|
@@ -3039,9 +3170,9 @@ function PanelGrid(props) {
|
|
|
3039
3170
|
className = ""
|
|
3040
3171
|
} = props;
|
|
3041
3172
|
const [wrapRef, width] = useMeasuredWidth();
|
|
3042
|
-
const [drag, setDrag] =
|
|
3043
|
-
const dragRef =
|
|
3044
|
-
const swallowClick =
|
|
3173
|
+
const [drag, setDrag] = useState15(null);
|
|
3174
|
+
const dragRef = useRef11(null);
|
|
3175
|
+
const swallowClick = useRef11(false);
|
|
3045
3176
|
const stacked = width > 0 && width < stackAt;
|
|
3046
3177
|
const arrangeable = editable && !stacked;
|
|
3047
3178
|
const live = drag ? drag.preview : layout2;
|
|
@@ -3064,7 +3195,7 @@ function PanelGrid(props) {
|
|
|
3064
3195
|
const commit = useCallback7((next) => {
|
|
3065
3196
|
if (onLayoutChange && !sameLayout(next, layout2)) onLayoutChange(next);
|
|
3066
3197
|
}, [onLayoutChange, layout2]);
|
|
3067
|
-
const detach =
|
|
3198
|
+
const detach = useRef11(null);
|
|
3068
3199
|
useEffect12(() => () => detach.current?.(), []);
|
|
3069
3200
|
const start = (id, mode) => (e) => {
|
|
3070
3201
|
if (!arrangeable || e.button !== 0) return;
|
|
@@ -3130,7 +3261,7 @@ function PanelGrid(props) {
|
|
|
3130
3261
|
const byId = new Map(live.map((it) => [it.i, it]));
|
|
3131
3262
|
const ghost = drag && drag.mode === "move" && byId.has(drag.id) ? boxOf(byId.get(drag.id)) : null;
|
|
3132
3263
|
const cls = ["uic-pg", arrangeable ? "is-editable" : "", stacked ? "is-stacked" : "", className].filter(Boolean).join(" ");
|
|
3133
|
-
return /* @__PURE__ */
|
|
3264
|
+
return /* @__PURE__ */ jsxs19(
|
|
3134
3265
|
"div",
|
|
3135
3266
|
{
|
|
3136
3267
|
ref: wrapRef,
|
|
@@ -3141,7 +3272,7 @@ function PanelGrid(props) {
|
|
|
3141
3272
|
swallowClick.current = false;
|
|
3142
3273
|
},
|
|
3143
3274
|
children: [
|
|
3144
|
-
ghost ? /* @__PURE__ */
|
|
3275
|
+
ghost ? /* @__PURE__ */ jsx21("div", { className: "uic-pg-ghost", "aria-hidden": "true", style: ghost }) : null,
|
|
3145
3276
|
width > 0 && React11.Children.map(children, (child) => {
|
|
3146
3277
|
if (!React11.isValidElement(child) || child.key == null) return null;
|
|
3147
3278
|
const id = String(child.key).replace(/^\.\$/, "");
|
|
@@ -3149,7 +3280,7 @@ function PanelGrid(props) {
|
|
|
3149
3280
|
if (!it) return null;
|
|
3150
3281
|
const moving = drag && drag.id === id;
|
|
3151
3282
|
const offset = moving && drag.mode === "move" ? { transform: `translate(${drag.dx}px, ${drag.dy}px)` } : null;
|
|
3152
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ jsxs19(
|
|
3153
3284
|
"div",
|
|
3154
3285
|
{
|
|
3155
3286
|
className: "uic-pg-item" + (moving ? " is-moving" : ""),
|
|
@@ -3157,7 +3288,7 @@ function PanelGrid(props) {
|
|
|
3157
3288
|
onPointerDown: arrangeable ? start(id, "move") : void 0,
|
|
3158
3289
|
children: [
|
|
3159
3290
|
child,
|
|
3160
|
-
arrangeable && !it.static ? /* @__PURE__ */
|
|
3291
|
+
arrangeable && !it.static ? /* @__PURE__ */ jsx21(
|
|
3161
3292
|
"button",
|
|
3162
3293
|
{
|
|
3163
3294
|
type: "button",
|
|
@@ -3165,7 +3296,7 @@ function PanelGrid(props) {
|
|
|
3165
3296
|
"aria-label": resizeLabel ? resizeLabel(id) : "Resize panel. Arrow keys resize it; shift with arrow keys moves it past its neighbours.",
|
|
3166
3297
|
onPointerDown: start(id, "resize"),
|
|
3167
3298
|
onKeyDown: onHandleKey(id),
|
|
3168
|
-
children: /* @__PURE__ */
|
|
3299
|
+
children: /* @__PURE__ */ jsx21("svg", { width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ jsx21("path", { d: "M9 1v8H1", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" }) })
|
|
3169
3300
|
}
|
|
3170
3301
|
) : null
|
|
3171
3302
|
]
|
|
@@ -3182,8 +3313,8 @@ function packLayout(layout2, cols = 12) {
|
|
|
3182
3313
|
}
|
|
3183
3314
|
|
|
3184
3315
|
// src/timeline/Timeline.jsx
|
|
3185
|
-
import { useCallback as useCallback8, useEffect as useEffect13, useLayoutEffect as useLayoutEffect2, useMemo as useMemo5, useRef as
|
|
3186
|
-
import { Fragment as Fragment9, jsx as
|
|
3316
|
+
import { useCallback as useCallback8, useEffect as useEffect13, useLayoutEffect as useLayoutEffect2, useMemo as useMemo5, useRef as useRef12, useState as useState16 } from "react";
|
|
3317
|
+
import { Fragment as Fragment9, jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3187
3318
|
var TL_MIN_PPS = 4;
|
|
3188
3319
|
var TL_MAX_PPS = 400;
|
|
3189
3320
|
var TL_DEFAULT_PPS = 26;
|
|
@@ -3272,20 +3403,20 @@ function Timeline({
|
|
|
3272
3403
|
emptyLabel = "Nothing here yet.",
|
|
3273
3404
|
className = ""
|
|
3274
3405
|
}) {
|
|
3275
|
-
const scroller =
|
|
3276
|
-
const innerRef =
|
|
3277
|
-
const [pps, setPps] =
|
|
3406
|
+
const scroller = useRef12(null);
|
|
3407
|
+
const innerRef = useRef12(null);
|
|
3408
|
+
const [pps, setPps] = useState16(() => {
|
|
3278
3409
|
if (zoomStorageKey && typeof window !== "undefined") {
|
|
3279
3410
|
const n = parseFloat(window.localStorage.getItem(zoomStorageKey) || "");
|
|
3280
3411
|
if (Number.isFinite(n)) return clamp(n, TL_MIN_PPS, TL_MAX_PPS);
|
|
3281
3412
|
}
|
|
3282
3413
|
return TL_DEFAULT_PPS;
|
|
3283
3414
|
});
|
|
3284
|
-
const [snapping, setSnapping] =
|
|
3285
|
-
const gesture =
|
|
3286
|
-
const [drag, setDrag] =
|
|
3287
|
-
const anchor =
|
|
3288
|
-
const [dropAt, setDropAt] =
|
|
3415
|
+
const [snapping, setSnapping] = useState16(() => snapStorageKey && typeof window !== "undefined" ? window.localStorage.getItem(snapStorageKey) !== "0" : true);
|
|
3416
|
+
const gesture = useRef12(null);
|
|
3417
|
+
const [drag, setDrag] = useState16(null);
|
|
3418
|
+
const anchor = useRef12(null);
|
|
3419
|
+
const [dropAt, setDropAt] = useState16(null);
|
|
3289
3420
|
const rows = useMemo5(
|
|
3290
3421
|
() => tracks.map((t) => ({
|
|
3291
3422
|
...t,
|
|
@@ -3336,7 +3467,7 @@ function Timeline({
|
|
|
3336
3467
|
if (scroller.current) scroller.current.scrollLeft = 0;
|
|
3337
3468
|
}
|
|
3338
3469
|
}, [fitPps, contentSeconds]);
|
|
3339
|
-
const fitted =
|
|
3470
|
+
const fitted = useRef12(false);
|
|
3340
3471
|
useLayoutEffect2(() => {
|
|
3341
3472
|
if (fitted.current || !(contentSeconds > 0)) return;
|
|
3342
3473
|
if (zoomStorageKey && typeof window !== "undefined" && window.localStorage.getItem(zoomStorageKey)) {
|
|
@@ -3466,9 +3597,9 @@ function Timeline({
|
|
|
3466
3597
|
const laneW = Math.max(contentSeconds * pps + 140, 320);
|
|
3467
3598
|
const ticks = [];
|
|
3468
3599
|
for (let t = 0; t <= contentSeconds + major; t += major) ticks.push(t);
|
|
3469
|
-
return /* @__PURE__ */
|
|
3470
|
-
/* @__PURE__ */
|
|
3471
|
-
onSplit && /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ jsxs20("div", { className: `rui-tl ${className}`, onKeyDown, tabIndex: 0, children: [
|
|
3601
|
+
/* @__PURE__ */ jsxs20("div", { className: "rui-tl-bar", children: [
|
|
3602
|
+
onSplit && /* @__PURE__ */ jsxs20(
|
|
3472
3603
|
"button",
|
|
3473
3604
|
{
|
|
3474
3605
|
type: "button",
|
|
@@ -3477,7 +3608,7 @@ function Timeline({
|
|
|
3477
3608
|
disabled: !splitTarget,
|
|
3478
3609
|
title: splitTarget ? "Split at the playhead (B)" : "Move the playhead inside a clip to split it",
|
|
3479
3610
|
children: [
|
|
3480
|
-
/* @__PURE__ */
|
|
3611
|
+
/* @__PURE__ */ jsxs20(
|
|
3481
3612
|
"svg",
|
|
3482
3613
|
{
|
|
3483
3614
|
width: "13",
|
|
@@ -3489,19 +3620,19 @@ function Timeline({
|
|
|
3489
3620
|
strokeLinecap: "round",
|
|
3490
3621
|
"aria-hidden": "true",
|
|
3491
3622
|
children: [
|
|
3492
|
-
/* @__PURE__ */
|
|
3493
|
-
/* @__PURE__ */
|
|
3494
|
-
/* @__PURE__ */
|
|
3495
|
-
/* @__PURE__ */
|
|
3496
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ jsx22("circle", { cx: "6", cy: "6", r: "3" }),
|
|
3624
|
+
/* @__PURE__ */ jsx22("circle", { cx: "6", cy: "18", r: "3" }),
|
|
3625
|
+
/* @__PURE__ */ jsx22("line", { x1: "20", y1: "4", x2: "8.12", y2: "15.88" }),
|
|
3626
|
+
/* @__PURE__ */ jsx22("line", { x1: "14.47", y1: "14.48", x2: "20", y2: "20" }),
|
|
3627
|
+
/* @__PURE__ */ jsx22("line", { x1: "8.12", y1: "8.12", x2: "12", y2: "12" })
|
|
3497
3628
|
]
|
|
3498
3629
|
}
|
|
3499
3630
|
),
|
|
3500
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ jsx22("span", { children: "Split" })
|
|
3501
3632
|
]
|
|
3502
3633
|
}
|
|
3503
3634
|
),
|
|
3504
|
-
onDeleteClip && /* @__PURE__ */
|
|
3635
|
+
onDeleteClip && /* @__PURE__ */ jsx22(
|
|
3505
3636
|
"button",
|
|
3506
3637
|
{
|
|
3507
3638
|
type: "button",
|
|
@@ -3512,7 +3643,7 @@ function Timeline({
|
|
|
3512
3643
|
children: "Remove"
|
|
3513
3644
|
}
|
|
3514
3645
|
),
|
|
3515
|
-
/* @__PURE__ */
|
|
3646
|
+
/* @__PURE__ */ jsx22(
|
|
3516
3647
|
"button",
|
|
3517
3648
|
{
|
|
3518
3649
|
type: "button",
|
|
@@ -3523,9 +3654,9 @@ function Timeline({
|
|
|
3523
3654
|
children: "Snap"
|
|
3524
3655
|
}
|
|
3525
3656
|
),
|
|
3526
|
-
/* @__PURE__ */
|
|
3527
|
-
/* @__PURE__ */
|
|
3528
|
-
/* @__PURE__ */
|
|
3657
|
+
/* @__PURE__ */ jsx22("span", { className: "rui-tl-time", "aria-label": "Playhead position", children: exactLabel(currentTime) }),
|
|
3658
|
+
/* @__PURE__ */ jsx22("span", { className: "rui-tl-spacer" }),
|
|
3659
|
+
/* @__PURE__ */ jsx22(
|
|
3529
3660
|
"button",
|
|
3530
3661
|
{
|
|
3531
3662
|
type: "button",
|
|
@@ -3537,7 +3668,7 @@ function Timeline({
|
|
|
3537
3668
|
children: "\u2212"
|
|
3538
3669
|
}
|
|
3539
3670
|
),
|
|
3540
|
-
/* @__PURE__ */
|
|
3671
|
+
/* @__PURE__ */ jsx22(
|
|
3541
3672
|
"button",
|
|
3542
3673
|
{
|
|
3543
3674
|
type: "button",
|
|
@@ -3549,7 +3680,7 @@ function Timeline({
|
|
|
3549
3680
|
children: "+"
|
|
3550
3681
|
}
|
|
3551
3682
|
),
|
|
3552
|
-
/* @__PURE__ */
|
|
3683
|
+
/* @__PURE__ */ jsx22(
|
|
3553
3684
|
"button",
|
|
3554
3685
|
{
|
|
3555
3686
|
type: "button",
|
|
@@ -3561,10 +3692,10 @@ function Timeline({
|
|
|
3561
3692
|
}
|
|
3562
3693
|
)
|
|
3563
3694
|
] }),
|
|
3564
|
-
/* @__PURE__ */
|
|
3565
|
-
/* @__PURE__ */
|
|
3566
|
-
/* @__PURE__ */
|
|
3567
|
-
/* @__PURE__ */
|
|
3695
|
+
/* @__PURE__ */ jsx22("div", { className: "rui-tl-scroll", ref: scroller, children: /* @__PURE__ */ jsxs20("div", { className: "rui-tl-inner", ref: innerRef, style: { width: TL_HEAD_W + laneW }, children: [
|
|
3696
|
+
/* @__PURE__ */ jsxs20("div", { className: "rui-tl-row rui-tl-rulerrow", children: [
|
|
3697
|
+
/* @__PURE__ */ jsx22("div", { className: "rui-tl-head rui-tl-rulerhead", "aria-hidden": "true" }),
|
|
3698
|
+
/* @__PURE__ */ jsx22(
|
|
3568
3699
|
"div",
|
|
3569
3700
|
{
|
|
3570
3701
|
className: "rui-tl-ruler",
|
|
@@ -3593,17 +3724,17 @@ function Timeline({
|
|
|
3593
3724
|
onSeek(currentTime + step);
|
|
3594
3725
|
}
|
|
3595
3726
|
} : void 0,
|
|
3596
|
-
children: ticks.map((t) => /* @__PURE__ */
|
|
3727
|
+
children: ticks.map((t) => /* @__PURE__ */ jsx22("span", { className: "rui-tl-ticklbl", style: { left: t * pps }, children: tickLabel(t, major) }, t))
|
|
3597
3728
|
}
|
|
3598
3729
|
)
|
|
3599
3730
|
] }),
|
|
3600
|
-
rows.length === 0 && /* @__PURE__ */
|
|
3601
|
-
rows.map((track) => /* @__PURE__ */
|
|
3602
|
-
/* @__PURE__ */
|
|
3731
|
+
rows.length === 0 && /* @__PURE__ */ jsx22("p", { className: "rui-tl-empty", children: emptyLabel }),
|
|
3732
|
+
rows.map((track) => /* @__PURE__ */ jsxs20("div", { className: "rui-tl-row", children: [
|
|
3733
|
+
/* @__PURE__ */ jsxs20("div", { className: "rui-tl-head", title: track.title || track.label, children: [
|
|
3603
3734
|
track.icon,
|
|
3604
|
-
/* @__PURE__ */
|
|
3735
|
+
/* @__PURE__ */ jsx22("span", { className: "rui-tl-headlbl", children: track.label })
|
|
3605
3736
|
] }),
|
|
3606
|
-
/* @__PURE__ */
|
|
3737
|
+
/* @__PURE__ */ jsxs20(
|
|
3607
3738
|
"div",
|
|
3608
3739
|
{
|
|
3609
3740
|
className: "rui-tl-lane" + (dropAt?.trackId === track.id ? " is-dropping" : ""),
|
|
@@ -3634,8 +3765,8 @@ function Timeline({
|
|
|
3634
3765
|
onDropClip(payload, { trackId: track.id, seconds: t, index });
|
|
3635
3766
|
} : void 0,
|
|
3636
3767
|
children: [
|
|
3637
|
-
track.laid.length === 0 && track.emptyLabel && /* @__PURE__ */
|
|
3638
|
-
track.laid.map((l) => /* @__PURE__ */
|
|
3768
|
+
track.laid.length === 0 && track.emptyLabel && /* @__PURE__ */ jsx22("p", { className: "rui-tl-laneempty", children: track.emptyLabel }),
|
|
3769
|
+
track.laid.map((l) => /* @__PURE__ */ jsx22(
|
|
3639
3770
|
Clip,
|
|
3640
3771
|
{
|
|
3641
3772
|
l,
|
|
@@ -3651,7 +3782,7 @@ function Timeline({
|
|
|
3651
3782
|
},
|
|
3652
3783
|
l.clip.id ?? l.i
|
|
3653
3784
|
)),
|
|
3654
|
-
dropAt?.trackId === track.id && /* @__PURE__ */
|
|
3785
|
+
dropAt?.trackId === track.id && /* @__PURE__ */ jsx22(
|
|
3655
3786
|
"span",
|
|
3656
3787
|
{
|
|
3657
3788
|
className: "rui-tl-dropmark",
|
|
@@ -3659,7 +3790,7 @@ function Timeline({
|
|
|
3659
3790
|
"aria-hidden": "true"
|
|
3660
3791
|
}
|
|
3661
3792
|
),
|
|
3662
|
-
laneAppend && /* @__PURE__ */
|
|
3793
|
+
laneAppend && /* @__PURE__ */ jsx22(
|
|
3663
3794
|
"span",
|
|
3664
3795
|
{
|
|
3665
3796
|
className: "rui-tl-append",
|
|
@@ -3671,9 +3802,9 @@ function Timeline({
|
|
|
3671
3802
|
}
|
|
3672
3803
|
)
|
|
3673
3804
|
] }, track.id)),
|
|
3674
|
-
onDropClip && newLaneLabel && /* @__PURE__ */
|
|
3675
|
-
/* @__PURE__ */
|
|
3676
|
-
/* @__PURE__ */
|
|
3805
|
+
onDropClip && newLaneLabel && /* @__PURE__ */ jsxs20("div", { className: "rui-tl-row", children: [
|
|
3806
|
+
/* @__PURE__ */ jsx22("div", { className: "rui-tl-head rui-tl-newhead", "aria-hidden": "true" }),
|
|
3807
|
+
/* @__PURE__ */ jsx22(
|
|
3677
3808
|
"div",
|
|
3678
3809
|
{
|
|
3679
3810
|
className: "rui-tl-newlane" + (dropAt?.trackId === null ? " is-dropping" : ""),
|
|
@@ -3695,11 +3826,11 @@ function Timeline({
|
|
|
3695
3826
|
e.preventDefault();
|
|
3696
3827
|
onDropClip(payload, { trackId: null, seconds: timeAt(e.clientX), index: 0 });
|
|
3697
3828
|
},
|
|
3698
|
-
children: /* @__PURE__ */
|
|
3829
|
+
children: /* @__PURE__ */ jsx22("span", { className: "rui-tl-newlbl", children: newLaneLabel })
|
|
3699
3830
|
}
|
|
3700
3831
|
)
|
|
3701
3832
|
] }),
|
|
3702
|
-
drag?.guide != null && /* @__PURE__ */
|
|
3833
|
+
drag?.guide != null && /* @__PURE__ */ jsx22(
|
|
3703
3834
|
"div",
|
|
3704
3835
|
{
|
|
3705
3836
|
className: "rui-tl-guide",
|
|
@@ -3707,16 +3838,16 @@ function Timeline({
|
|
|
3707
3838
|
"aria-hidden": "true"
|
|
3708
3839
|
}
|
|
3709
3840
|
),
|
|
3710
|
-
Number.isFinite(currentTime) && /* @__PURE__ */
|
|
3841
|
+
Number.isFinite(currentTime) && /* @__PURE__ */ jsx22(
|
|
3711
3842
|
"div",
|
|
3712
3843
|
{
|
|
3713
3844
|
className: "rui-tl-playhead",
|
|
3714
3845
|
style: { left: TL_HEAD_W + currentTime * pps },
|
|
3715
3846
|
"aria-hidden": "true",
|
|
3716
|
-
children: /* @__PURE__ */
|
|
3847
|
+
children: /* @__PURE__ */ jsx22("span", { className: "rui-tl-playhead-grip" })
|
|
3717
3848
|
}
|
|
3718
3849
|
),
|
|
3719
|
-
drag?.annotation && /* @__PURE__ */
|
|
3850
|
+
drag?.annotation && /* @__PURE__ */ jsx22("div", { className: "rui-tl-annot", style: { left: TL_HEAD_W + (drag.annotAt || 0) * pps }, children: drag.annotation })
|
|
3720
3851
|
] }) })
|
|
3721
3852
|
] });
|
|
3722
3853
|
}
|
|
@@ -3792,7 +3923,7 @@ function Clip({
|
|
|
3792
3923
|
click: onSelect
|
|
3793
3924
|
});
|
|
3794
3925
|
};
|
|
3795
|
-
return /* @__PURE__ */
|
|
3926
|
+
return /* @__PURE__ */ jsxs20(
|
|
3796
3927
|
"article",
|
|
3797
3928
|
{
|
|
3798
3929
|
className: "rui-tl-clip" + (clip.state ? ` is-${clip.state}` : "") + (known ? "" : " is-unmeasured") + (selected ? " is-selected" : "") + (live ? " is-live" : ""),
|
|
@@ -3807,10 +3938,10 @@ function Clip({
|
|
|
3807
3938
|
}
|
|
3808
3939
|
},
|
|
3809
3940
|
children: [
|
|
3810
|
-
clip.poster ? /* @__PURE__ */
|
|
3941
|
+
clip.poster ? /* @__PURE__ */ jsx22("span", { className: "rui-tl-strip", style: {
|
|
3811
3942
|
backgroundImage: `url("${String(clip.poster).replace(/"/g, '\\"')}")`,
|
|
3812
3943
|
backgroundSize: `${tileW}px 100%`
|
|
3813
|
-
} }) : clip.video ? /* @__PURE__ */
|
|
3944
|
+
} }) : clip.video ? /* @__PURE__ */ jsx22(
|
|
3814
3945
|
"video",
|
|
3815
3946
|
{
|
|
3816
3947
|
className: "rui-tl-frame",
|
|
@@ -3821,12 +3952,12 @@ function Clip({
|
|
|
3821
3952
|
tabIndex: -1,
|
|
3822
3953
|
"aria-hidden": "true"
|
|
3823
3954
|
}
|
|
3824
|
-
) : /* @__PURE__ */
|
|
3825
|
-
clip.badge && /* @__PURE__ */
|
|
3826
|
-
known && width > 46 && /* @__PURE__ */
|
|
3827
|
-
clip.label && width > 104 && /* @__PURE__ */
|
|
3828
|
-
onTrim && known && /* @__PURE__ */
|
|
3829
|
-
/* @__PURE__ */
|
|
3955
|
+
) : /* @__PURE__ */ jsx22("span", { className: "rui-tl-blank", "aria-hidden": "true", children: clip.glyph }),
|
|
3956
|
+
clip.badge && /* @__PURE__ */ jsx22("span", { className: "rui-tl-badge", children: clip.badge }),
|
|
3957
|
+
known && width > 46 && /* @__PURE__ */ jsx22("span", { className: "rui-tl-dur", children: durationLabel(clip.duration) }),
|
|
3958
|
+
clip.label && width > 104 && /* @__PURE__ */ jsx22("span", { className: "rui-tl-name", children: clip.label }),
|
|
3959
|
+
onTrim && known && /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
3960
|
+
/* @__PURE__ */ jsx22(
|
|
3830
3961
|
"span",
|
|
3831
3962
|
{
|
|
3832
3963
|
className: "rui-tl-trim l",
|
|
@@ -3835,7 +3966,7 @@ function Clip({
|
|
|
3835
3966
|
"aria-label": `Trim the start of ${clip.label || "this clip"}`
|
|
3836
3967
|
}
|
|
3837
3968
|
),
|
|
3838
|
-
/* @__PURE__ */
|
|
3969
|
+
/* @__PURE__ */ jsx22(
|
|
3839
3970
|
"span",
|
|
3840
3971
|
{
|
|
3841
3972
|
className: "rui-tl-trim r",
|
|
@@ -3892,8 +4023,10 @@ export {
|
|
|
3892
4023
|
IcTool,
|
|
3893
4024
|
IcX,
|
|
3894
4025
|
Input,
|
|
4026
|
+
MICROSOFT_ENABLED,
|
|
3895
4027
|
MentionInput,
|
|
3896
4028
|
MentionText,
|
|
4029
|
+
MicrosoftButton,
|
|
3897
4030
|
Modal,
|
|
3898
4031
|
PaneResizer,
|
|
3899
4032
|
Panel,
|
|
@@ -3936,6 +4069,8 @@ export {
|
|
|
3936
4069
|
logout,
|
|
3937
4070
|
majorTickStep,
|
|
3938
4071
|
mentionModel_exports as mention,
|
|
4072
|
+
microsoftIdToken,
|
|
4073
|
+
microsoftSignIn,
|
|
3939
4074
|
packLayout,
|
|
3940
4075
|
parseArgs,
|
|
3941
4076
|
prettyJson,
|