@ai-matrx/meet 0.7.75 → 0.7.77

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/react.js CHANGED
@@ -6692,7 +6692,20 @@ function useGuestRecordAccess(meeting) {
6692
6692
 
6693
6693
  // src/react/components.tsx
6694
6694
  import { useEffect as useEffect4, useLayoutEffect, useMemo as useMemo3, useRef as useRef4, useState as useState4 } from "react";
6695
- import { ErrorBox } from "@ai-matrx/design-system";
6695
+ import {
6696
+ Alert,
6697
+ AlertDescription,
6698
+ Button,
6699
+ Checkbox,
6700
+ ErrorBox,
6701
+ Label,
6702
+ SegmentedControl,
6703
+ Select,
6704
+ SelectContent,
6705
+ SelectItem,
6706
+ SelectTrigger,
6707
+ SelectValue
6708
+ } from "@ai-matrx/design-system";
6696
6709
  import { avatarPaletteIndex, formatDurationMs as formatDurationMs4, getInitials } from "@ai-matrx/kit/format";
6697
6710
 
6698
6711
  // src/core/after.ts
@@ -9545,38 +9558,41 @@ function EffectsSettings({ preview }) {
9545
9558
  }
9546
9559
  };
9547
9560
  return /* @__PURE__ */ jsxs3("section", { className: "mx-meet__section", "aria-label": "Effects", children: [
9548
- /* @__PURE__ */ jsxs3("label", { className: "mx-meet__toggle", children: [
9561
+ /* @__PURE__ */ jsxs3("div", { className: "mx-meet__check", children: [
9549
9562
  /* @__PURE__ */ jsx4(
9550
- "input",
9563
+ Checkbox,
9551
9564
  {
9552
- type: "checkbox",
9565
+ id: "mx-meet-noise",
9553
9566
  checked: effects.effects.noiseSuppression,
9554
- onChange: (event) => apply({ noiseSuppression: event.target.checked })
9567
+ onCheckedChange: (checked) => apply({ noiseSuppression: checked === true })
9555
9568
  }
9556
9569
  ),
9557
- "Noise suppression",
9558
- /* @__PURE__ */ jsx4("span", { className: "mx-meet__hint", children: "Filters keyboards, fans and background chatter." })
9570
+ /* @__PURE__ */ jsxs3("div", { className: "mx-meet__check-text", children: [
9571
+ /* @__PURE__ */ jsx4(Label, { htmlFor: "mx-meet-noise", children: "Noise suppression" }),
9572
+ /* @__PURE__ */ jsx4("span", { className: "mx-meet__hint", children: "Filters keyboards, fans and background chatter." })
9573
+ ] })
9559
9574
  ] }),
9560
9575
  supported ? /* @__PURE__ */ jsxs3("div", { className: "mx-meet__field", children: [
9561
- /* @__PURE__ */ jsx4("span", { className: "mx-meet__field-label", children: "Background" }),
9562
- /* @__PURE__ */ jsx4("div", { className: "mx-meet__pills", role: "radiogroup", "aria-label": "Background", children: ["none", "blur", "image"].map((kind) => /* @__PURE__ */ jsx4(
9563
- "button",
9576
+ /* @__PURE__ */ jsx4(Label, { children: "Background" }),
9577
+ /* @__PURE__ */ jsx4(
9578
+ SegmentedControl,
9564
9579
  {
9565
- type: "button",
9566
- role: "radio",
9567
- "aria-checked": effects.effects.background === kind,
9568
- className: effects.effects.background === kind ? "mx-meet__pill mx-meet__pill--on" : "mx-meet__pill",
9569
- onClick: () => {
9580
+ fullWidth: true,
9581
+ value: effects.effects.background,
9582
+ onValueChange: (kind) => {
9570
9583
  if (kind === "image") {
9571
9584
  fileRef.current?.click();
9572
9585
  return;
9573
9586
  }
9574
9587
  apply({ background: kind });
9575
9588
  },
9576
- children: kind === "none" ? "None" : kind === "blur" ? "Blur" : "Picture\u2026"
9577
- },
9578
- kind
9579
- )) }),
9589
+ data: [
9590
+ { value: "none", label: "None" },
9591
+ { value: "blur", label: "Blur" },
9592
+ { value: "image", label: "Picture\u2026" }
9593
+ ]
9594
+ }
9595
+ ),
9580
9596
  /* @__PURE__ */ jsx4(
9581
9597
  "input",
9582
9598
  {
@@ -9960,10 +9976,10 @@ function PreJoinBody({
9960
9976
  /* @__PURE__ */ jsxs3("div", { className: "mx-meet__field-row", children: [
9961
9977
  /* @__PURE__ */ jsx4(DevicePicker, { kind: "audiooutput", label: "Speaker" }),
9962
9978
  /* @__PURE__ */ jsxs3(
9963
- "button",
9979
+ Button,
9964
9980
  {
9965
9981
  type: "button",
9966
- className: "mx-meet__chip",
9982
+ variant: "outline",
9967
9983
  disabled: speakerTesting,
9968
9984
  onClick: () => {
9969
9985
  setSpeakerTesting(true);
@@ -9972,7 +9988,7 @@ function PreJoinBody({
9972
9988
  );
9973
9989
  },
9974
9990
  children: [
9975
- /* @__PURE__ */ jsx4(SpeakerIcon, { width: 14, height: 14 }),
9991
+ /* @__PURE__ */ jsx4(SpeakerIcon, {}),
9976
9992
  " ",
9977
9993
  speakerTesting ? "Playing\u2026" : "Test"
9978
9994
  ]
@@ -9981,35 +9997,36 @@ function PreJoinBody({
9981
9997
  ] }),
9982
9998
  /* @__PURE__ */ jsx4(DevicePicker, { kind: "videoinput", label: "Camera" }),
9983
9999
  /* @__PURE__ */ jsx4(EffectsSettings, { preview: preview.preview }),
9984
- recording.consentNotice !== null ? /* @__PURE__ */ jsx4("p", { className: "mx-meet__consent", children: recording.consentNotice }) : null,
10000
+ recording.consentNotice !== null ? /* @__PURE__ */ jsx4(Alert, { variant: "info", children: /* @__PURE__ */ jsx4(AlertDescription, { children: recording.consentNotice }) }) : null,
9985
10001
  /* @__PURE__ */ jsxs3("div", { className: "mx-meet__prejoin-actions", children: [
9986
- /* @__PURE__ */ jsxs3("label", { className: "mx-meet__toggle", children: [
10002
+ /* @__PURE__ */ jsxs3("div", { className: "mx-meet__check", children: [
9987
10003
  /* @__PURE__ */ jsx4(
9988
- "input",
10004
+ Checkbox,
9989
10005
  {
9990
- type: "checkbox",
10006
+ id: "mx-meet-join-video",
9991
10007
  checked: mode === "video",
9992
- onChange: (event) => setMode(event.target.checked ? "video" : "audio")
10008
+ onCheckedChange: (checked) => setMode(checked === true ? "video" : "audio")
9993
10009
  }
9994
10010
  ),
9995
- "Join with video"
10011
+ /* @__PURE__ */ jsx4(Label, { htmlFor: "mx-meet-join-video", children: "Join with video" })
9996
10012
  ] }),
9997
- /* @__PURE__ */ jsxs3("label", { className: "mx-meet__toggle", children: [
10013
+ /* @__PURE__ */ jsxs3("div", { className: "mx-meet__check", children: [
9998
10014
  /* @__PURE__ */ jsx4(
9999
- "input",
10015
+ Checkbox,
10000
10016
  {
10001
- type: "checkbox",
10017
+ id: "mx-meet-join-mic",
10002
10018
  checked: microphone,
10003
- onChange: (event) => setMicrophone(event.target.checked)
10019
+ onCheckedChange: (checked) => setMicrophone(checked === true)
10004
10020
  }
10005
10021
  ),
10006
- "Join with microphone"
10022
+ /* @__PURE__ */ jsx4(Label, { htmlFor: "mx-meet-join-mic", children: "Join with microphone" })
10007
10023
  ] }),
10008
10024
  /* @__PURE__ */ jsx4(
10009
- "button",
10025
+ Button,
10010
10026
  {
10011
10027
  type: "button",
10012
- className: "mx-meet__primary",
10028
+ className: "mx-meet__join",
10029
+ disabled: joining,
10013
10030
  onClick: () => {
10014
10031
  setJoining(true);
10015
10032
  preview.release();
@@ -10082,18 +10099,24 @@ function DevicePicker({
10082
10099
  const devices = useDeviceSnapshot();
10083
10100
  const list = devices?.devices[kind] ?? [];
10084
10101
  if (list.length === 0) return null;
10085
- return /* @__PURE__ */ jsxs3("label", { className: "mx-meet__field", children: [
10086
- /* @__PURE__ */ jsx4("span", { className: "mx-meet__field-label", children: label }),
10087
- /* @__PURE__ */ jsx4(
10088
- "select",
10102
+ const triggerId = `mx-meet-device-${kind}`;
10103
+ const valueOf = (deviceId2) => deviceId2.length > 0 ? deviceId2 : "default";
10104
+ const current = devices?.selected[kind] ?? host.devices.resolve(kind) ?? "";
10105
+ return /* @__PURE__ */ jsxs3("div", { className: "mx-meet__field", children: [
10106
+ /* @__PURE__ */ jsx4(Label, { htmlFor: triggerId, children: label }),
10107
+ /* @__PURE__ */ jsxs3(
10108
+ Select,
10089
10109
  {
10090
- className: "mx-meet__select",
10091
- value: devices?.selected[kind] ?? host.devices.resolve(kind) ?? "",
10092
- onChange: (event) => {
10093
- if (onPick !== void 0) onPick(kind, event.target.value);
10094
- else host.devices.select(kind, event.target.value);
10110
+ ...current.length > 0 ? { value: valueOf(current) } : {},
10111
+ onValueChange: (value) => {
10112
+ const deviceId2 = list.find((device) => valueOf(device.deviceId) === value)?.deviceId ?? value;
10113
+ if (onPick !== void 0) onPick(kind, deviceId2);
10114
+ else host.devices.select(kind, deviceId2);
10095
10115
  },
10096
- children: list.map((device) => /* @__PURE__ */ jsx4("option", { value: device.deviceId, children: device.label.length > 0 ? device.label : `${label} (name hidden)` }, device.deviceId))
10116
+ children: [
10117
+ /* @__PURE__ */ jsx4(SelectTrigger, { id: triggerId, "aria-label": label, children: /* @__PURE__ */ jsx4(SelectValue, { placeholder: label }) }),
10118
+ /* @__PURE__ */ jsx4(SelectContent, { children: list.map((device) => /* @__PURE__ */ jsx4(SelectItem, { value: valueOf(device.deviceId), children: device.label.length > 0 ? device.label : `${label} (name hidden)` }, device.deviceId || "default")) })
10119
+ ]
10097
10120
  }
10098
10121
  )
10099
10122
  ] });