@q9labsai/chalk-react 5.4.0 → 5.5.0
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/README.md +7 -30
- package/dist/Board-PPO62QTR.js +80 -0
- package/dist/CallCharts-7ZQLN47C.js +114 -0
- package/dist/CallDetails-IG57GXT2.js +200 -0
- package/dist/CallDialogContent-GST2I23W.js +177 -0
- package/dist/CameraBackgroundPicker-AZXKBGRF.js +72 -0
- package/dist/ConnectionNotice-NQUBBT46.js +55 -0
- package/dist/DeviceAccessCard-MLRBTPRP.js +238 -0
- package/dist/DeviceAccessWaiting-MQXXW45M.js +25 -0
- package/dist/DeviceSheet-GZTV44UW.js +118 -0
- package/dist/InviteQrCode-TNTZA3GS.js +54 -0
- package/dist/KnockNotice-CAW4CJ4S.js +181 -0
- package/dist/ReactionSheet-ZU6RWC66.js +132 -0
- package/dist/chunk-26PBFST5.js +25 -0
- package/dist/{chunk-K5DV2OTY.js → chunk-4RSCAIFK.js} +340 -165
- package/dist/chunk-ADIDI7AJ.js +10 -0
- package/dist/chunk-ALGD3RBI.js +10 -0
- package/dist/chunk-CQBYFA2W.js +73 -0
- package/dist/chunk-E6HPIMFO.js +44 -0
- package/dist/{chunk-LYZ7EBFF.js → chunk-F6QZY5SM.js} +4116 -4605
- package/dist/chunk-I6FSUWKG.js +51 -0
- package/dist/chunk-JDCFKSGV.js +95 -0
- package/dist/chunk-PH3RC6T6.js +476 -0
- package/dist/chunk-PMGIER77.js +92 -0
- package/dist/chunk-Q36UO2T2.js +363 -0
- package/dist/chunk-SBGC5DKV.js +114 -0
- package/dist/chunk-SZNV3J4B.js +9 -0
- package/dist/{chunk-4U7QZC72.js → chunk-TSBY6C5U.js} +1 -102
- package/dist/chunk-XY7WXXME.js +85 -0
- package/dist/chunk-YOWY22N7.js +148 -0
- package/dist/chunk-Z5AASN4L.js +34 -0
- package/dist/components/admission-panel/KnockNotice.d.ts +31 -0
- package/dist/components/admission-panel/answer-all.d.ts +2 -0
- package/dist/components/call-limbo/CallLimbo.d.ts +5 -1
- package/dist/components/chalk/Chalk.d.ts +2 -5
- package/dist/components/chalk/StatusSurface.d.ts +3 -3
- package/dist/components/chalk-ui/ChalkSheet.d.ts +6 -2
- package/dist/components/chalk-ui/InviteLinkButton.d.ts +5 -0
- package/dist/components/chalk-ui/InviteQR.d.ts +4 -0
- package/dist/components/chalk-ui/InviteQrCode.d.ts +3 -0
- package/dist/components/chalk-ui/MenuIcon.d.ts +17 -0
- package/dist/components/chalk-ui/invite-qr-path.d.ts +10 -0
- package/dist/components/chalk-ui/sheet-drag.d.ts +17 -0
- package/dist/components/chalk-ui/useCopyText.d.ts +6 -0
- package/dist/components/chalk-ui/useSheetDrag.d.ts +11 -0
- package/dist/components/composite/ReactionSheet.d.ts +5 -0
- package/dist/components/connection-notice/ConnectionBars.d.ts +4 -0
- package/dist/components/connection-notice/ConnectionNotice.d.ts +12 -0
- package/dist/components/connection-notice/shown-notice.d.ts +12 -0
- package/dist/components/connection-status/ConnectionRing.d.ts +2 -0
- package/dist/components/connection-status/ConnectionStatus.d.ts +24 -0
- package/dist/components/connection-status/LiveConnectionStatus.d.ts +9 -0
- package/dist/components/connection-status/use-connection-phase.d.ts +23 -0
- package/dist/components/control-bar/DockLayout.d.ts +2 -1
- package/dist/components/control-bar/ShareControl.d.ts +3 -1
- package/dist/components/control-bar/ShellIcon.d.ts +18 -6
- package/dist/components/control-bar/control-bar-behavior.d.ts +19 -8
- package/dist/components/control-bar/control-bar-devices.d.ts +8 -0
- package/dist/components/control-bar/useDeviceSheets.d.ts +7 -0
- package/dist/components/device-access/DeviceAccessCard.d.ts +17 -0
- package/dist/components/device-access/DeviceAccessStyles.d.ts +1 -0
- package/dist/components/device-access/DeviceAccessWaiting.d.ts +4 -0
- package/dist/components/device-access/LazyDeviceAccessCard.d.ts +7 -0
- package/dist/components/device-access/browser-marks.d.ts +5 -0
- package/dist/components/device-access/card-copy.d.ts +17 -0
- package/dist/components/device-access/load-card.d.ts +2 -0
- package/dist/components/device-access/model.d.ts +29 -0
- package/dist/components/device-access/ports.d.ts +21 -0
- package/dist/components/device-access/resolve.d.ts +31 -0
- package/dist/components/device-access/store.d.ts +32 -0
- package/dist/components/device-access/useDeviceAccess.d.ts +7 -0
- package/dist/components/device-popover/CameraBackgroundPicker.d.ts +23 -0
- package/dist/components/device-popover/DevicePopover.d.ts +7 -1
- package/dist/components/device-popover/DevicePreview.d.ts +12 -0
- package/dist/components/device-popover/DeviceSheet.d.ts +26 -0
- package/dist/components/index.js +30 -15
- package/dist/components/participant-grid/ParticipantGrid.d.ts +9 -0
- package/dist/components/participant-tile/ParticipantTile.d.ts +12 -1
- package/dist/components/participant-tile/TileConnection.d.ts +9 -0
- package/dist/components/participant-tile/TileShell.d.ts +2 -1
- package/dist/components/participant-tile/useFrozenFrame.d.ts +12 -0
- package/dist/components/participant-tile/useVideoTileVisibility.d.ts +6 -0
- package/dist/components/participants-panel/ParticipantsPanel.d.ts +5 -0
- package/dist/components/participants-panel/participant-options-menu.d.ts +4 -1
- package/dist/components/participants-panel/participant-order.d.ts +13 -0
- package/dist/components/participants-panel/participant-row.d.ts +5 -1
- package/dist/components/participants-panel/participant-search.d.ts +4 -0
- package/dist/components/space-header/CallCharts.d.ts +22 -0
- package/dist/components/space-header/CallDetails.d.ts +5 -13
- package/dist/components/space-header/CallDialog.d.ts +5 -0
- package/dist/components/space-header/CallDialogContent.d.ts +13 -0
- package/dist/components/space-header/CallMenuStyles.d.ts +2 -0
- package/dist/components/space-header/RowIcon.d.ts +12 -0
- package/dist/components/space-header/call-diagnostics.d.ts +2 -1
- package/dist/components/space-header/call-network.d.ts +18 -0
- package/dist/components/space-header/space-header-contract.d.ts +8 -1
- package/dist/components/space-view/SpacePresentation.d.ts +3 -1
- package/dist/components/space-view/SpaceView.d.ts +3 -5
- package/dist/components/space-view/useBoardNotices.d.ts +7 -0
- package/dist/components/space-view/useMicrophoneNotice.d.ts +11 -0
- package/dist/components/toast-stack/ToastStack.d.ts +3 -1
- package/dist/components/toast-stack/call-events.d.ts +4 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +298 -28
- package/dist/internal/call-width.d.ts +9 -0
- package/dist/internal/media-devices.d.ts +11 -0
- package/dist/internal/speaker-test.d.ts +2 -0
- package/dist/internal/useHandOrder.d.ts +2 -0
- package/dist/internal/useHeldWhile.d.ts +2 -0
- package/dist/internal/useInputLevel.d.ts +4 -0
- package/dist/internal/useLongPress.d.ts +15 -0
- package/dist/internal/useSeenConnected.d.ts +9 -0
- package/dist/internal/useSilentMicrophone.d.ts +4 -0
- package/dist/internal/useTrueFor.d.ts +4 -0
- package/dist/participant-options-menu-S3EL6K3M.js +330 -0
- package/dist/pre-join/remembered-devices.d.ts +12 -0
- package/dist/pre-join/usePreJoinDevices.d.ts +47 -0
- package/dist/public-surface.contract.d.ts +1 -1
- package/dist/test-support/index.d.ts +1 -1
- package/dist/test-support/index.js +41 -10
- package/dist/theme.d.ts +32 -32
- package/dist/toast.d.ts +1 -0
- package/dist/toast.js +7 -0
- package/dist/utils/formatClockTime.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +20 -12
- package/package.json +24 -11
- package/dist/components/call-limbo/qr-code.d.ts +0 -4
- package/dist/components/offline-actions/OfflineActions.d.ts +0 -9
- package/dist/components/participants-panel/index.d.ts +0 -2
- package/dist/components/reconnecting-overlay/ReconnectingOverlay.d.ts +0 -12
- package/dist/components/space-header/share-qr.d.ts +0 -2
- package/dist/components/space-view/countdown.d.ts +0 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/admission-panel/answer-all.ts
|
|
2
|
+
async function answerAll(ids, answer, outcome) {
|
|
3
|
+
const results = await Promise.allSettled(ids.map((id) => answer(id)));
|
|
4
|
+
const done = results.filter((result) => result.status === "fulfilled").length;
|
|
5
|
+
if (done < ids.length) throw new Error(`${done} of ${ids.length} ${outcome}`);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
answerAll
|
|
10
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCopyText
|
|
3
|
+
} from "./chunk-PH3RC6T6.js";
|
|
4
|
+
|
|
5
|
+
// src/components/chalk-ui/MenuIcon.tsx
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var GLYPHS = {
|
|
8
|
+
link: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { d: "M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { d: "M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7" })
|
|
11
|
+
] }),
|
|
12
|
+
copy: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
|
+
/* @__PURE__ */ jsx("rect", { x: "8", y: "8", width: "13", height: "13", rx: "2.5" }),
|
|
14
|
+
/* @__PURE__ */ jsx("path", { d: "M16 8V5.5A2.5 2.5 0 0 0 13.5 3h-8A2.5 2.5 0 0 0 3 5.5v8A2.5 2.5 0 0 0 5.5 16H8" })
|
|
15
|
+
] }),
|
|
16
|
+
check: /* @__PURE__ */ jsx("path", { d: "M5 12.5l4.5 4.5L19 7.5" })
|
|
17
|
+
};
|
|
18
|
+
function GlyphSvg({ size = 18, children }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children });
|
|
20
|
+
}
|
|
21
|
+
function MenuIcon({ name, size }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(GlyphSvg, { size, children: GLYPHS[name] });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// src/components/chalk-ui/InviteLinkButton.tsx
|
|
26
|
+
import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
27
|
+
function inviteSlug(link) {
|
|
28
|
+
try {
|
|
29
|
+
const { pathname, host } = new URL(link);
|
|
30
|
+
return pathname.split("/").filter(Boolean).at(-1) ?? host;
|
|
31
|
+
} catch {
|
|
32
|
+
return link;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function InviteLinkButton({ link, variant }) {
|
|
36
|
+
const { copied, error, copy } = useCopyText(link);
|
|
37
|
+
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
38
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", "data-part": "copy-invite-link", "data-variant": variant, "data-copied": copied, className: "chalk-invite-link", onClick: () => void copy(), children: [
|
|
39
|
+
/* @__PURE__ */ jsx2("span", { className: "chalk-invite-link-lead", children: /* @__PURE__ */ jsx2(MenuIcon, { name: "link" }) }),
|
|
40
|
+
/* @__PURE__ */ jsx2("span", { className: "chalk-invite-link-label", children: variant === "card" && copied ? "Link copied" : "Copy invite link" }),
|
|
41
|
+
variant === "menu" && !copied ? /* @__PURE__ */ jsx2("span", { dir: "ltr", className: "chalk-invite-link-slug", children: inviteSlug(link) }) : null,
|
|
42
|
+
/* @__PURE__ */ jsxs2("span", { className: "chalk-invite-link-end", children: [
|
|
43
|
+
copied ? /* @__PURE__ */ jsx2(MenuIcon, { name: "check", size: variant === "menu" ? 16 : 18 }) : /* @__PURE__ */ jsx2(MenuIcon, { name: "copy", size: variant === "menu" ? 16 : 18 }),
|
|
44
|
+
variant === "menu" && copied ? "Copied" : null
|
|
45
|
+
] })
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ jsx2("span", { role: "status", "aria-live": "polite", className: "sr-only", children: error ? "Could not copy. Try again." : copied ? "Link copied" : "" })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/components/chalk-ui/InviteQR.tsx
|
|
52
|
+
import { lazy, Suspense } from "react";
|
|
53
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
54
|
+
var Code = lazy(() => import("./InviteQrCode-TNTZA3GS.js"));
|
|
55
|
+
function canEncodeInviteQr(value) {
|
|
56
|
+
return new TextEncoder().encode(value).length <= 858;
|
|
57
|
+
}
|
|
58
|
+
function InviteQR({ value }) {
|
|
59
|
+
return /* @__PURE__ */ jsx3(
|
|
60
|
+
Suspense,
|
|
61
|
+
{
|
|
62
|
+
fallback: /* @__PURE__ */ jsx3("span", { role: "status", className: "chalk-invite-qr", children: "Loading QR code\u2026" }),
|
|
63
|
+
children: /* @__PURE__ */ jsx3(Code, { value })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
GlyphSvg,
|
|
70
|
+
InviteLinkButton,
|
|
71
|
+
canEncodeInviteQr,
|
|
72
|
+
InviteQR
|
|
73
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useMediaQuery
|
|
3
|
+
} from "./chunk-PH3RC6T6.js";
|
|
4
|
+
|
|
5
|
+
// src/components/device-access/model.ts
|
|
6
|
+
function isDeviceAccessFailure(failure, device) {
|
|
7
|
+
if (device === "screen") return failure.code === "media.permission_denied";
|
|
8
|
+
return (device === "microphone" || device === "camera") && (failure.code === "media.permission_denied" || failure.code === "media.device_busy" || failure.code === "media.device_not_found");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// src/internal/call-width.ts
|
|
12
|
+
import { createContext, useContext, useLayoutEffect, useState } from "react";
|
|
13
|
+
var PHONE_CALL_WIDTH = 640;
|
|
14
|
+
var NarrowCallContext = createContext(null);
|
|
15
|
+
var NarrowCallProvider = NarrowCallContext.Provider;
|
|
16
|
+
function useNarrowCallFrame(frame) {
|
|
17
|
+
const [narrow, setNarrow] = useState(null);
|
|
18
|
+
useLayoutEffect(() => {
|
|
19
|
+
const element = frame.current;
|
|
20
|
+
if (!element || typeof ResizeObserver === "undefined") return;
|
|
21
|
+
const observer = new ResizeObserver((entries) => {
|
|
22
|
+
const entry = entries?.[0];
|
|
23
|
+
if (entry) setNarrow(entry.contentRect.width <= PHONE_CALL_WIDTH);
|
|
24
|
+
});
|
|
25
|
+
observer.observe(element);
|
|
26
|
+
return () => observer.disconnect();
|
|
27
|
+
}, [frame]);
|
|
28
|
+
return narrow;
|
|
29
|
+
}
|
|
30
|
+
function useNarrowCall() {
|
|
31
|
+
return useContext(NarrowCallContext);
|
|
32
|
+
}
|
|
33
|
+
function usePhoneCall() {
|
|
34
|
+
const narrowWindow = useMediaQuery(`(max-width: ${PHONE_CALL_WIDTH}px)`);
|
|
35
|
+
return useNarrowCall() === true || narrowWindow;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
isDeviceAccessFailure,
|
|
40
|
+
NarrowCallProvider,
|
|
41
|
+
useNarrowCallFrame,
|
|
42
|
+
useNarrowCall,
|
|
43
|
+
usePhoneCall
|
|
44
|
+
};
|