@meshagent/meshagent-tailwind 0.42.2 → 0.43.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/CHANGELOG.md +6 -0
- package/dist/cjs/chat/chat-bot-view.d.ts +6 -3
- package/dist/cjs/chat/chat-bot-view.js +159 -32
- package/dist/cjs/chat/chat-hooks.d.ts +2 -2
- package/dist/cjs/chat/chat-hooks.js +1 -1
- package/dist/cjs/chat/chat-input.d.ts +2 -2
- package/dist/cjs/chat/chat-input.js +6 -6
- package/dist/cjs/chat/chat-thread.js +7 -7
- package/dist/cjs/chat/chat-typing-indicator.js +2 -2
- package/dist/cjs/chat/conversation-descriptor.js +6 -0
- package/dist/cjs/chat/dataset-chat-thread.js +8 -8
- package/dist/cjs/chat/file-uploader.js +1 -1
- package/dist/cjs/chat/multi-thread-view.js +1 -1
- package/dist/cjs/chat/new-chat-thread.js +3 -3
- package/dist/cjs/chat/upload-pill.d.ts +1 -1
- package/dist/cjs/chat/upload-pill.js +3 -3
- package/dist/cjs/components/pane-example.js +3 -3
- package/dist/cjs/components/ui/avatar.js +1 -1
- package/dist/cjs/components/ui/button.d.ts +1 -1
- package/dist/cjs/components/ui/button.js +1 -1
- package/dist/cjs/components/ui/card.js +1 -1
- package/dist/cjs/components/ui/dialog.js +1 -1
- package/dist/cjs/components/ui/form.js +2 -2
- package/dist/cjs/components/ui/input.js +1 -1
- package/dist/cjs/components/ui/label.js +1 -1
- package/dist/cjs/components/ui/progress.js +1 -1
- package/dist/cjs/components/ui/radio-group.js +1 -1
- package/dist/cjs/components/ui/select.js +1 -1
- package/dist/cjs/components/ui/sheet.js +1 -1
- package/dist/cjs/components/ui/skeleton.js +1 -1
- package/dist/cjs/components/ui/spinner.js +1 -1
- package/dist/cjs/components/ui/textarea.js +1 -1
- package/dist/cjs/file-preview/file-preview.js +5 -5
- package/dist/cjs/forms/form.js +6 -6
- package/dist/cjs/forms/multi-select-autocomplete.js +1 -1
- package/dist/cjs/forms/select-users-dialog.js +3 -3
- package/dist/cjs/forms/select-users.d.ts +1 -1
- package/dist/cjs/forms/select-users.js +2 -2
- package/dist/cjs/index.d.ts +19 -19
- package/dist/cjs/index.js +19 -19
- package/dist/cjs/meetings/controls.d.ts +1 -1
- package/dist/cjs/meetings/controls.js +7 -7
- package/dist/cjs/meetings/lobby.d.ts +1 -1
- package/dist/cjs/meetings/lobby.js +7 -7
- package/dist/cjs/meetings/meeting-scope.js +1 -1
- package/dist/cjs/meetings/meeting-view.d.ts +1 -1
- package/dist/cjs/meetings/meeting-view.js +66 -9
- package/dist/cjs/meetings/meetings.d.ts +8 -8
- package/dist/cjs/meetings/meetings.js +8 -8
- package/dist/cjs/meetings/participants.d.ts +1 -1
- package/dist/cjs/meetings/participants.js +3 -3
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/tools/ask-user-for-file.js +1 -1
- package/dist/cjs/tools/ask-user.js +1 -1
- package/dist/cjs/tools/file-dialog.js +2 -2
- package/dist/cjs/tools/form-dialog.d.ts +1 -1
- package/dist/cjs/tools/form-dialog.js +3 -3
- package/dist/cjs/tools/form.d.ts +1 -1
- package/dist/cjs/tools/form.js +1 -1
- package/dist/cjs/tools/ui-toolkit.js +4 -4
- package/dist/esm/chat/chat-bot-view.d.ts +6 -3
- package/dist/esm/chat/chat-bot-view.js +163 -32
- package/dist/esm/chat/chat-hooks.d.ts +2 -2
- package/dist/esm/chat/chat-hooks.js +1 -1
- package/dist/esm/chat/chat-input.d.ts +2 -2
- package/dist/esm/chat/chat-input.js +6 -6
- package/dist/esm/chat/chat-thread.js +7 -7
- package/dist/esm/chat/chat-typing-indicator.js +2 -2
- package/dist/esm/chat/conversation-descriptor.js +6 -0
- package/dist/esm/chat/dataset-chat-thread.js +8 -8
- package/dist/esm/chat/file-uploader.js +1 -1
- package/dist/esm/chat/multi-thread-view.js +1 -1
- package/dist/esm/chat/new-chat-thread.js +3 -3
- package/dist/esm/chat/upload-pill.d.ts +1 -1
- package/dist/esm/chat/upload-pill.js +3 -3
- package/dist/esm/components/pane-example.js +3 -3
- package/dist/esm/components/ui/avatar.js +1 -1
- package/dist/esm/components/ui/button.js +1 -1
- package/dist/esm/components/ui/card.js +1 -1
- package/dist/esm/components/ui/dialog.js +1 -1
- package/dist/esm/components/ui/form.js +2 -2
- package/dist/esm/components/ui/input.js +1 -1
- package/dist/esm/components/ui/label.js +1 -1
- package/dist/esm/components/ui/progress.js +1 -1
- package/dist/esm/components/ui/radio-group.js +1 -1
- package/dist/esm/components/ui/select.js +1 -1
- package/dist/esm/components/ui/sheet.js +1 -1
- package/dist/esm/components/ui/skeleton.js +1 -1
- package/dist/esm/components/ui/spinner.js +1 -1
- package/dist/esm/components/ui/textarea.js +1 -1
- package/dist/esm/file-preview/file-preview.js +5 -5
- package/dist/esm/forms/form.js +6 -6
- package/dist/esm/forms/multi-select-autocomplete.js +1 -1
- package/dist/esm/forms/select-users-dialog.js +3 -3
- package/dist/esm/forms/select-users.d.ts +1 -1
- package/dist/esm/forms/select-users.js +2 -2
- package/dist/esm/index.d.ts +19 -19
- package/dist/esm/index.js +19 -19
- package/dist/esm/meetings/controls.d.ts +1 -1
- package/dist/esm/meetings/controls.js +8 -8
- package/dist/esm/meetings/lobby.d.ts +1 -1
- package/dist/esm/meetings/lobby.js +7 -7
- package/dist/esm/meetings/meeting-scope.js +1 -1
- package/dist/esm/meetings/meeting-view.d.ts +1 -1
- package/dist/esm/meetings/meeting-view.js +66 -9
- package/dist/esm/meetings/meetings.d.ts +8 -8
- package/dist/esm/meetings/meetings.js +8 -8
- package/dist/esm/meetings/participants.d.ts +1 -1
- package/dist/esm/meetings/participants.js +3 -3
- package/dist/esm/tools/ask-user-for-file.js +1 -1
- package/dist/esm/tools/ask-user.js +1 -1
- package/dist/esm/tools/file-dialog.js +2 -2
- package/dist/esm/tools/form-dialog.d.ts +1 -1
- package/dist/esm/tools/form-dialog.js +3 -3
- package/dist/esm/tools/form.d.ts +1 -1
- package/dist/esm/tools/form.js +1 -1
- package/dist/esm/tools/ui-toolkit.js +4 -4
- package/package.json +6 -6
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
DialogHeader,
|
|
12
12
|
DialogTitle,
|
|
13
13
|
DialogTrigger
|
|
14
|
-
} from "../components/ui/dialog";
|
|
15
|
-
import { Button } from "../components/ui/button";
|
|
16
|
-
import { Spinner } from "../components/ui/spinner";
|
|
17
|
-
import { cn } from "../lib/utils";
|
|
18
|
-
import { ChatThread } from "../chat/chat-thread";
|
|
14
|
+
} from "../components/ui/dialog.js";
|
|
15
|
+
import { Button } from "../components/ui/button.js";
|
|
16
|
+
import { Spinner } from "../components/ui/spinner.js";
|
|
17
|
+
import { cn } from "../lib/utils.js";
|
|
18
|
+
import { ChatThread } from "../chat/chat-thread.js";
|
|
19
19
|
pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
|
|
20
20
|
var FileKind = /* @__PURE__ */ ((FileKind2) => {
|
|
21
21
|
FileKind2["Image"] = "image";
|
package/dist/esm/forms/form.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { Element as MeshElement } from "@meshagent/meshagent";
|
|
4
4
|
import { useForm } from "@tanstack/react-form";
|
|
5
|
-
import { Button } from "../components/ui/button";
|
|
5
|
+
import { Button } from "../components/ui/button.js";
|
|
6
6
|
import {
|
|
7
7
|
Card,
|
|
8
8
|
CardContent,
|
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
CardFooter,
|
|
11
11
|
CardHeader,
|
|
12
12
|
CardTitle
|
|
13
|
-
} from "../components/ui/card";
|
|
14
|
-
import { Input } from "../components/ui/input";
|
|
15
|
-
import { Label } from "../components/ui/label";
|
|
13
|
+
} from "../components/ui/card.js";
|
|
14
|
+
import { Input } from "../components/ui/input.js";
|
|
15
|
+
import { Label } from "../components/ui/label.js";
|
|
16
16
|
import {
|
|
17
17
|
Select,
|
|
18
18
|
SelectContent,
|
|
19
19
|
SelectItem,
|
|
20
20
|
SelectTrigger,
|
|
21
21
|
SelectValue
|
|
22
|
-
} from "../components/ui/select";
|
|
23
|
-
import { Textarea } from "../components/ui/textarea";
|
|
22
|
+
} from "../components/ui/select.js";
|
|
23
|
+
import { Textarea } from "../components/ui/textarea.js";
|
|
24
24
|
function stringAttribute(element, name) {
|
|
25
25
|
const value = element.getAttribute(name);
|
|
26
26
|
return typeof value === "string" ? value : null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { X } from "lucide-react";
|
|
4
|
-
import { cn } from "../lib/utils";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
5
|
class MultiSelectController {
|
|
6
6
|
listeners = /* @__PURE__ */ new Set();
|
|
7
7
|
_value;
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
DialogFooter,
|
|
10
10
|
DialogHeader,
|
|
11
11
|
DialogTitle
|
|
12
|
-
} from "../components/ui/dialog";
|
|
13
|
-
import { Button } from "../components/ui/button";
|
|
14
|
-
import { SelectUsers } from "./select-users";
|
|
12
|
+
} from "../components/ui/dialog.js";
|
|
13
|
+
import { Button } from "../components/ui/button.js";
|
|
14
|
+
import { SelectUsers } from "./select-users.js";
|
|
15
15
|
function showSelectUsersDialog({
|
|
16
16
|
projectEmails,
|
|
17
17
|
initialValue = [],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
-
import { MultiSelectController } from "./multi-select-autocomplete";
|
|
2
|
+
import { MultiSelectController } from "./multi-select-autocomplete.js";
|
|
3
3
|
export declare class SelectUsersController extends MultiSelectController {
|
|
4
4
|
static readonly emailRegex: RegExp;
|
|
5
5
|
canAddItem(item: string): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo } from "react";
|
|
3
|
-
import { parseEmailList } from "./email-address";
|
|
4
|
-
import { MultiSelectAutocomplete, MultiSelectController } from "./multi-select-autocomplete";
|
|
3
|
+
import { parseEmailList } from "./email-address.js";
|
|
4
|
+
import { MultiSelectAutocomplete, MultiSelectController } from "./multi-select-autocomplete.js";
|
|
5
5
|
class SelectUsersController extends MultiSelectController {
|
|
6
6
|
static emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
|
|
7
7
|
canAddItem(item) {
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from './chat/chat-bot-view';
|
|
2
|
-
export * from './chat/chat-hooks';
|
|
3
|
-
export * from './chat/chat-input';
|
|
4
|
-
export * from './chat/chat-message';
|
|
5
|
-
export * from './chat/chat-thread';
|
|
6
|
-
export * from './chat/chat-typing-indicator';
|
|
7
|
-
export * from './chat/conversation-descriptor';
|
|
8
|
-
export * from './chat/dataset-chat-thread';
|
|
9
|
-
export * from './chat/file-attachment';
|
|
10
|
-
export * from './chat/file-uploader';
|
|
11
|
-
export * from './chat/multi-thread-view';
|
|
12
|
-
export * from './chat/new-chat-thread';
|
|
13
|
-
export * from './file-preview/file-preview';
|
|
14
|
-
export * from './forms/email-address';
|
|
15
|
-
export * from './forms/form';
|
|
16
|
-
export * from './forms/multi-select-autocomplete';
|
|
17
|
-
export * from './forms/select-users';
|
|
18
|
-
export * from './forms/select-users-dialog';
|
|
19
|
-
export * from './meetings/meetings';
|
|
1
|
+
export * from './chat/chat-bot-view.js';
|
|
2
|
+
export * from './chat/chat-hooks.js';
|
|
3
|
+
export * from './chat/chat-input.js';
|
|
4
|
+
export * from './chat/chat-message.js';
|
|
5
|
+
export * from './chat/chat-thread.js';
|
|
6
|
+
export * from './chat/chat-typing-indicator.js';
|
|
7
|
+
export * from './chat/conversation-descriptor.js';
|
|
8
|
+
export * from './chat/dataset-chat-thread.js';
|
|
9
|
+
export * from './chat/file-attachment.js';
|
|
10
|
+
export * from './chat/file-uploader.js';
|
|
11
|
+
export * from './chat/multi-thread-view.js';
|
|
12
|
+
export * from './chat/new-chat-thread.js';
|
|
13
|
+
export * from './file-preview/file-preview.js';
|
|
14
|
+
export * from './forms/email-address.js';
|
|
15
|
+
export * from './forms/form.js';
|
|
16
|
+
export * from './forms/multi-select-autocomplete.js';
|
|
17
|
+
export * from './forms/select-users.js';
|
|
18
|
+
export * from './forms/select-users-dialog.js';
|
|
19
|
+
export * from './meetings/meetings.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from "./chat/chat-bot-view";
|
|
2
|
-
export * from "./chat/chat-hooks";
|
|
3
|
-
export * from "./chat/chat-input";
|
|
4
|
-
export * from "./chat/chat-message";
|
|
5
|
-
export * from "./chat/chat-thread";
|
|
6
|
-
export * from "./chat/chat-typing-indicator";
|
|
7
|
-
export * from "./chat/conversation-descriptor";
|
|
8
|
-
export * from "./chat/dataset-chat-thread";
|
|
9
|
-
export * from "./chat/file-attachment";
|
|
10
|
-
export * from "./chat/file-uploader";
|
|
11
|
-
export * from "./chat/multi-thread-view";
|
|
12
|
-
export * from "./chat/new-chat-thread";
|
|
13
|
-
export * from "./file-preview/file-preview";
|
|
14
|
-
export * from "./forms/email-address";
|
|
15
|
-
export * from "./forms/form";
|
|
16
|
-
export * from "./forms/multi-select-autocomplete";
|
|
17
|
-
export * from "./forms/select-users";
|
|
18
|
-
export * from "./forms/select-users-dialog";
|
|
19
|
-
export * from "./meetings/meetings";
|
|
1
|
+
export * from "./chat/chat-bot-view.js";
|
|
2
|
+
export * from "./chat/chat-hooks.js";
|
|
3
|
+
export * from "./chat/chat-input.js";
|
|
4
|
+
export * from "./chat/chat-message.js";
|
|
5
|
+
export * from "./chat/chat-thread.js";
|
|
6
|
+
export * from "./chat/chat-typing-indicator.js";
|
|
7
|
+
export * from "./chat/conversation-descriptor.js";
|
|
8
|
+
export * from "./chat/dataset-chat-thread.js";
|
|
9
|
+
export * from "./chat/file-attachment.js";
|
|
10
|
+
export * from "./chat/file-uploader.js";
|
|
11
|
+
export * from "./chat/multi-thread-view.js";
|
|
12
|
+
export * from "./chat/new-chat-thread.js";
|
|
13
|
+
export * from "./file-preview/file-preview.js";
|
|
14
|
+
export * from "./forms/email-address.js";
|
|
15
|
+
export * from "./forms/form.js";
|
|
16
|
+
export * from "./forms/multi-select-autocomplete.js";
|
|
17
|
+
export * from "./forms/select-users.js";
|
|
18
|
+
export * from "./forms/select-users-dialog.js";
|
|
19
|
+
export * from "./meetings/meetings.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { Room } from "livekit-client";
|
|
3
|
-
import { MeetingController } from "./meeting-scope";
|
|
3
|
+
import { MeetingController } from "./meeting-scope.js";
|
|
4
4
|
export declare function MeetingControls({ controller: providedController, onDisconnect, spacing, }: {
|
|
5
5
|
controller?: MeetingController;
|
|
6
6
|
onDisconnect?: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Video, VideoOff, Mic, MicOff, Phone, Settings } from "lucide-react";
|
|
4
4
|
import { ConnectionState, Room } from "livekit-client";
|
|
5
|
-
import { Button } from "../components/ui/button";
|
|
5
|
+
import { Button } from "../components/ui/button.js";
|
|
6
6
|
import {
|
|
7
7
|
Dialog,
|
|
8
8
|
DialogContent,
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
DialogHeader,
|
|
12
12
|
DialogTitle,
|
|
13
13
|
DialogTrigger
|
|
14
|
-
} from "../components/ui/dialog";
|
|
14
|
+
} from "../components/ui/dialog.js";
|
|
15
15
|
import {
|
|
16
16
|
Select,
|
|
17
17
|
SelectContent,
|
|
18
18
|
SelectItem,
|
|
19
19
|
SelectTrigger,
|
|
20
20
|
SelectValue
|
|
21
|
-
} from "../components/ui/select";
|
|
22
|
-
import { Spinner } from "../components/ui/spinner";
|
|
23
|
-
import { cn } from "../lib/utils";
|
|
24
|
-
import { useMeetingController } from "./meeting-scope";
|
|
21
|
+
} from "../components/ui/select.js";
|
|
22
|
+
import { Spinner } from "../components/ui/spinner.js";
|
|
23
|
+
import { cn } from "../lib/utils.js";
|
|
24
|
+
import { useMeetingController } from "./meeting-scope.js";
|
|
25
25
|
function useControllerVersion(controller) {
|
|
26
26
|
useSyncExternalStore(
|
|
27
27
|
(listener) => controller.subscribe(listener),
|
|
@@ -116,7 +116,7 @@ function CameraToggle({ controller }) {
|
|
|
116
116
|
text: pending ? "Starting camera" : enabled ? "Turn off camera" : "Turn on camera",
|
|
117
117
|
on: showEnabled,
|
|
118
118
|
destructive: unavailable,
|
|
119
|
-
icon: showEnabled ? /* @__PURE__ */ jsx(
|
|
119
|
+
icon: showEnabled ? /* @__PURE__ */ jsx(Video, {}) : /* @__PURE__ */ jsx(VideoOff, {}),
|
|
120
120
|
loading: pending || processing,
|
|
121
121
|
disabled: processing || pending,
|
|
122
122
|
onClick: () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
-
import { type MeetingController, type MeetingFastConnectOptions } from "./meeting-scope";
|
|
2
|
+
import { type MeetingController, type MeetingFastConnectOptions } from "./meeting-scope.js";
|
|
3
3
|
export interface MeetingLobbyJoinOptions {
|
|
4
4
|
enableVideo: boolean;
|
|
5
5
|
enableAudio: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
3
|
import {
|
|
3
4
|
LocalAudioTrack,
|
|
4
5
|
LocalVideoTrack,
|
|
5
6
|
Room
|
|
6
7
|
} from "livekit-client";
|
|
7
8
|
import { Video, VideoOff, Mic, MicOff, Settings } from "lucide-react";
|
|
8
|
-
import {
|
|
9
|
-
import { Button } from "../components/ui/button";
|
|
9
|
+
import { Button } from "../components/ui/button.js";
|
|
10
10
|
import {
|
|
11
11
|
Dialog,
|
|
12
12
|
DialogContent,
|
|
@@ -15,19 +15,19 @@ import {
|
|
|
15
15
|
DialogHeader,
|
|
16
16
|
DialogTitle,
|
|
17
17
|
DialogTrigger
|
|
18
|
-
} from "../components/ui/dialog";
|
|
18
|
+
} from "../components/ui/dialog.js";
|
|
19
19
|
import {
|
|
20
20
|
Select,
|
|
21
21
|
SelectContent,
|
|
22
22
|
SelectItem,
|
|
23
23
|
SelectTrigger,
|
|
24
24
|
SelectValue
|
|
25
|
-
} from "../components/ui/select";
|
|
26
|
-
import { Spinner } from "../components/ui/spinner";
|
|
27
|
-
import { cn } from "../lib/utils";
|
|
25
|
+
} from "../components/ui/select.js";
|
|
26
|
+
import { Spinner } from "../components/ui/spinner.js";
|
|
27
|
+
import { cn } from "../lib/utils.js";
|
|
28
28
|
import {
|
|
29
29
|
useMeetingController
|
|
30
|
-
} from "./meeting-scope";
|
|
30
|
+
} from "./meeting-scope.js";
|
|
31
31
|
const audioInputStorageKey = "audioInput";
|
|
32
32
|
const audioOutputStorageKey = "audioOutput";
|
|
33
33
|
const videoInputStorageKey = "videoInput";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
RoomEvent,
|
|
14
14
|
Track
|
|
15
15
|
} from "livekit-client";
|
|
16
|
-
import { WakeLocker } from "./wake-lock";
|
|
16
|
+
import { WakeLocker } from "./wake-lock.js";
|
|
17
17
|
class PendingLocalMediaState {
|
|
18
18
|
listeners = /* @__PURE__ */ new Set();
|
|
19
19
|
cameraAwaitingEnableConfirmation = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
-
import { type MeetingController } from "./meeting-scope";
|
|
2
|
+
import { type MeetingController } from "./meeting-scope.js";
|
|
3
3
|
export declare function MeetingView({ controller: providedController, onCancel }: {
|
|
4
4
|
controller?: MeetingController;
|
|
5
5
|
onCancel?: () => void;
|
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
useState,
|
|
12
12
|
useSyncExternalStore
|
|
13
13
|
} from "react";
|
|
14
|
-
import { Button } from "../components/ui/button";
|
|
15
|
-
import { Spinner } from "../components/ui/spinner";
|
|
16
|
-
import { cn } from "../lib/utils";
|
|
17
|
-
import { AudioWave } from "./audio-visualization";
|
|
14
|
+
import { Button } from "../components/ui/button.js";
|
|
15
|
+
import { Spinner } from "../components/ui/spinner.js";
|
|
16
|
+
import { cn } from "../lib/utils.js";
|
|
17
|
+
import { AudioWave } from "./audio-visualization.js";
|
|
18
18
|
import {
|
|
19
19
|
CameraGrid,
|
|
20
20
|
TrackSource
|
|
21
|
-
} from "./camera-grid";
|
|
22
|
-
import { MeetingControls } from "./controls";
|
|
21
|
+
} from "./camera-grid.js";
|
|
22
|
+
import { MeetingControls } from "./controls.js";
|
|
23
23
|
import {
|
|
24
24
|
MeetingLobby,
|
|
25
25
|
meetingFastConnectOptions
|
|
26
|
-
} from "./lobby";
|
|
27
|
-
import { useMeetingController } from "./meeting-scope";
|
|
26
|
+
} from "./lobby.js";
|
|
27
|
+
import { useMeetingController } from "./meeting-scope.js";
|
|
28
28
|
const railGap = 16;
|
|
29
29
|
const desktopStripWidth = 250;
|
|
30
30
|
const desktopStripHeight = 100;
|
|
@@ -69,7 +69,10 @@ function useRoomSnapshot(room) {
|
|
|
69
69
|
participant.isScreenShareEnabled,
|
|
70
70
|
participant.isMicrophoneEnabled,
|
|
71
71
|
participantVideoPublications(participant).map(
|
|
72
|
-
(publication) =>
|
|
72
|
+
(publication) => `video:${publication.trackSid}:${publication.source}:${publication.isMuted}:${publication.videoTrack != null}`
|
|
73
|
+
).join(","),
|
|
74
|
+
participantAudioPublications(participant).map(
|
|
75
|
+
(publication) => `audio:${publication.trackSid}:${publication.source}:${publication.isMuted}:${publication.audioTrack != null}`
|
|
73
76
|
).join(",")
|
|
74
77
|
].join(":")
|
|
75
78
|
).join("|");
|
|
@@ -102,6 +105,9 @@ function useMeetingViewState(controller) {
|
|
|
102
105
|
console.warn("Unable to switch audio output device", error);
|
|
103
106
|
});
|
|
104
107
|
}
|
|
108
|
+
await controller.livekitRoom.startAudio().catch((error) => {
|
|
109
|
+
console.warn("Unable to start meeting audio", error);
|
|
110
|
+
});
|
|
105
111
|
setViewState("joined");
|
|
106
112
|
},
|
|
107
113
|
[controller]
|
|
@@ -116,6 +122,11 @@ function participantVideoPublications(participant) {
|
|
|
116
122
|
participant.videoTrackPublications.values()
|
|
117
123
|
);
|
|
118
124
|
}
|
|
125
|
+
function participantAudioPublications(participant) {
|
|
126
|
+
return Array.from(
|
|
127
|
+
participant.audioTrackPublications.values()
|
|
128
|
+
);
|
|
129
|
+
}
|
|
119
130
|
function activeVideoPublicationForSource(participant, source) {
|
|
120
131
|
const publication = participant.getTrackPublication(source);
|
|
121
132
|
if (publication == null || publication.isMuted || publication.videoTrack == null) {
|
|
@@ -128,6 +139,13 @@ function activeVideoPublications(participant, options = {}) {
|
|
|
128
139
|
(publication) => !publication.isMuted && publication.videoTrack != null && (options.source == null || publication.source === options.source)
|
|
129
140
|
);
|
|
130
141
|
}
|
|
142
|
+
function activeAudioPublications(participant) {
|
|
143
|
+
return Array.from(
|
|
144
|
+
participant.audioTrackPublications.values()
|
|
145
|
+
).filter(
|
|
146
|
+
(publication) => !publication.isMuted && publication.audioTrack != null
|
|
147
|
+
);
|
|
148
|
+
}
|
|
131
149
|
function screenSharePublications(participants) {
|
|
132
150
|
return participants.flatMap((participant) => {
|
|
133
151
|
const publication = activeVideoPublicationForSource(
|
|
@@ -137,6 +155,44 @@ function screenSharePublications(participants) {
|
|
|
137
155
|
return publication == null ? [] : [{ participant, publication }];
|
|
138
156
|
});
|
|
139
157
|
}
|
|
158
|
+
function useAttachedRemoteAudioTrack(track) {
|
|
159
|
+
const attachedElementRef = useRef(null);
|
|
160
|
+
useEffect(() => {
|
|
161
|
+
const element = attachedElementRef.current;
|
|
162
|
+
if (element == null || track == null) {
|
|
163
|
+
return void 0;
|
|
164
|
+
}
|
|
165
|
+
track.attach(element);
|
|
166
|
+
return () => {
|
|
167
|
+
track.detach(element);
|
|
168
|
+
};
|
|
169
|
+
}, [track]);
|
|
170
|
+
return useCallback((element) => {
|
|
171
|
+
attachedElementRef.current = element;
|
|
172
|
+
}, []);
|
|
173
|
+
}
|
|
174
|
+
function RemoteAudioTrackView({
|
|
175
|
+
track
|
|
176
|
+
}) {
|
|
177
|
+
const audioRef = useAttachedRemoteAudioTrack(track);
|
|
178
|
+
return /* @__PURE__ */ jsx("audio", { ref: audioRef, autoPlay: true });
|
|
179
|
+
}
|
|
180
|
+
function MeetingAudioRenderer({ room }) {
|
|
181
|
+
useRoomSnapshot(room);
|
|
182
|
+
const publications = Array.from(room.remoteParticipants.values()).flatMap(
|
|
183
|
+
activeAudioPublications
|
|
184
|
+
);
|
|
185
|
+
if (publications.length === 0) {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "hidden", children: publications.map((publication) => /* @__PURE__ */ jsx(
|
|
189
|
+
RemoteAudioTrackView,
|
|
190
|
+
{
|
|
191
|
+
track: publication.audioTrack
|
|
192
|
+
},
|
|
193
|
+
publication.trackSid
|
|
194
|
+
)) });
|
|
195
|
+
}
|
|
140
196
|
function useAttachedVideoTrack(track) {
|
|
141
197
|
const attachedElementRef = useRef(null);
|
|
142
198
|
useEffect(() => {
|
|
@@ -621,6 +677,7 @@ function MeetingView({ controller: providedController, onCancel }) {
|
|
|
621
677
|
);
|
|
622
678
|
}
|
|
623
679
|
return /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
680
|
+
/* @__PURE__ */ jsx(MeetingAudioRenderer, { room: controller.livekitRoom }),
|
|
624
681
|
/* @__PURE__ */ jsx("div", { className: "flex-0 border-b px-5 py-3", children: /* @__PURE__ */ jsx(ActiveMeetingToolbar, { controller, onDisconnect: onCancel }) }),
|
|
625
682
|
/* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 p-5", children: /* @__PURE__ */ jsx(MeetingStage, { controller }) })
|
|
626
683
|
] });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./audio-visualization";
|
|
2
|
-
export * from "./camera-grid";
|
|
3
|
-
export * from "./controls";
|
|
4
|
-
export * from "./lobby";
|
|
5
|
-
export * from "./meeting-scope";
|
|
6
|
-
export * from "./meeting-view";
|
|
7
|
-
export * from "./participants";
|
|
8
|
-
export * from "./wake-lock";
|
|
1
|
+
export * from "./audio-visualization.js";
|
|
2
|
+
export * from "./camera-grid.js";
|
|
3
|
+
export * from "./controls.js";
|
|
4
|
+
export * from "./lobby.js";
|
|
5
|
+
export * from "./meeting-scope.js";
|
|
6
|
+
export * from "./meeting-view.js";
|
|
7
|
+
export * from "./participants.js";
|
|
8
|
+
export * from "./wake-lock.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./audio-visualization";
|
|
2
|
-
export * from "./camera-grid";
|
|
3
|
-
export * from "./controls";
|
|
4
|
-
export * from "./lobby";
|
|
5
|
-
export * from "./meeting-scope";
|
|
6
|
-
export * from "./meeting-view";
|
|
7
|
-
export * from "./participants";
|
|
8
|
-
export * from "./wake-lock";
|
|
1
|
+
export * from "./audio-visualization.js";
|
|
2
|
+
export * from "./camera-grid.js";
|
|
3
|
+
export * from "./controls.js";
|
|
4
|
+
export * from "./lobby.js";
|
|
5
|
+
export * from "./meeting-scope.js";
|
|
6
|
+
export * from "./meeting-view.js";
|
|
7
|
+
export * from "./participants.js";
|
|
8
|
+
export * from "./wake-lock.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { Participant, Room } from "livekit-client";
|
|
3
|
-
import { MeetingController } from "./meeting-scope";
|
|
3
|
+
import { MeetingController } from "./meeting-scope.js";
|
|
4
4
|
export declare function ParticipantCamerasList({ controller: providedController, spacing, className, }: {
|
|
5
5
|
controller?: MeetingController;
|
|
6
6
|
spacing?: number;
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
Track
|
|
6
6
|
} from "livekit-client";
|
|
7
7
|
import { Mic, MicOff } from "lucide-react";
|
|
8
|
-
import { cn } from "../lib/utils";
|
|
9
|
-
import { AudioWave } from "./audio-visualization";
|
|
10
|
-
import { firstEnabledVideoPublication, useMeetingController } from "./meeting-scope";
|
|
8
|
+
import { cn } from "../lib/utils.js";
|
|
9
|
+
import { AudioWave } from "./audio-visualization.js";
|
|
10
|
+
import { firstEnabledVideoPublication, useMeetingController } from "./meeting-scope.js";
|
|
11
11
|
function useParticipantSnapshot(participant) {
|
|
12
12
|
useSyncExternalStore(
|
|
13
13
|
(listener) => {
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
DialogDescription,
|
|
10
10
|
DialogFooter,
|
|
11
11
|
DialogClose
|
|
12
|
-
} from "../components/ui/dialog";
|
|
13
|
-
import { Button } from "../components/ui/button";
|
|
12
|
+
} from "../components/ui/dialog.js";
|
|
13
|
+
import { Button } from "../components/ui/button.js";
|
|
14
14
|
function showFileDialog({ title, description }) {
|
|
15
15
|
return new Promise((resolve) => {
|
|
16
16
|
const container = document.createElement("div");
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
DialogTitle,
|
|
10
10
|
DialogFooter,
|
|
11
11
|
DialogClose
|
|
12
|
-
} from "../components/ui/dialog";
|
|
13
|
-
import { Button } from "../components/ui/button";
|
|
14
|
-
import { FormField } from "./form";
|
|
12
|
+
} from "../components/ui/dialog.js";
|
|
13
|
+
import { Button } from "../components/ui/button.js";
|
|
14
|
+
import { FormField } from "./form.js";
|
|
15
15
|
function showUserFormDialog({ formSchema, title }) {
|
|
16
16
|
return new Promise((resolve) => {
|
|
17
17
|
const container = document.createElement("div");
|
package/dist/esm/tools/form.d.ts
CHANGED
package/dist/esm/tools/form.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useController } from "react-hook-form";
|
|
|
4
4
|
import {
|
|
5
5
|
getFormField,
|
|
6
6
|
getFormFieldType
|
|
7
|
-
} from "./form-schema";
|
|
7
|
+
} from "./form-schema.js";
|
|
8
8
|
function FormField({ fieldItem, control }) {
|
|
9
9
|
const field = useMemo(() => getFormField(fieldItem), [fieldItem]);
|
|
10
10
|
const fieldKey = useMemo(() => getFormFieldType(fieldItem), [fieldItem]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Toolkit } from "@meshagent/meshagent";
|
|
2
|
-
import { AskUser } from "./ask-user";
|
|
3
|
-
import { AskUserForFile } from "./ask-user-for-file";
|
|
4
|
-
import { DisplayDocument } from "./display-document";
|
|
5
|
-
import { Toast } from "./toast";
|
|
2
|
+
import { AskUser } from "./ask-user.js";
|
|
3
|
+
import { AskUserForFile } from "./ask-user-for-file.js";
|
|
4
|
+
import { DisplayDocument } from "./display-document.js";
|
|
5
|
+
import { Toast } from "./toast.js";
|
|
6
6
|
class UIToolkit extends Toolkit {
|
|
7
7
|
constructor() {
|
|
8
8
|
super({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshagent/meshagent-tailwind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Meshagent Tailwind Components",
|
|
5
5
|
"homepage": "https://github.com/meshagent/meshagent-tailwind",
|
|
6
6
|
"scripts": {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"build:types": "npm run build:deps && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json",
|
|
11
11
|
"build": "npm run build:js && npm run build:types && npm run build:css"
|
|
12
12
|
},
|
|
13
|
-
"author": "
|
|
13
|
+
"author": "Timu, LLC",
|
|
14
14
|
"license": "Apache-2.0",
|
|
15
15
|
"module": "dist/esm/index.js",
|
|
16
|
-
"main": "./dist/
|
|
16
|
+
"main": "./dist/cjs/index.js",
|
|
17
17
|
"types": "dist/esm/index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"CHANGELOG.md"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@meshagent/meshagent": "^0.
|
|
37
|
-
"@meshagent/meshagent-agents": "^0.
|
|
38
|
-
"@meshagent/meshagent-react": "^0.
|
|
36
|
+
"@meshagent/meshagent": "^0.43.0",
|
|
37
|
+
"@meshagent/meshagent-agents": "^0.43.0",
|
|
38
|
+
"@meshagent/meshagent-react": "^0.43.0",
|
|
39
39
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
40
40
|
"@radix-ui/react-checkbox": "^1.3.2",
|
|
41
41
|
"@radix-ui/react-dialog": "^1.1.14",
|