openchad-react 1.0.0 → 1.0.1
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/LICENSE +201 -201
- package/dist/{chunk-VZ7VQBAB.mjs → chunk-545ZTT4L.mjs} +2 -2
- package/dist/chunk-545ZTT4L.mjs.map +1 -0
- package/dist/index.js +19 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -16
- package/dist/index.mjs.map +1 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +2 -2
- package/dist/ui/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-VZ7VQBAB.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableRow, TableCell, Checkbox, Switch, Tooltip, TooltipTrigger, TooltipContent, Spinner, Button, Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription,
|
|
1
|
+
import { TableRow, TableCell, Checkbox, Switch, Tooltip, TooltipTrigger, TooltipContent, Spinner, Button, Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, Input, Card, CardContent, Avatar, Dialog, DialogContent, DialogHeader, DialogTitle, ResizablePanelGroup, ResizablePanel, ResizableHandle, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, Command, CommandInput, DropdownMenuSeparator, ScrollArea, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuPortal, DropdownMenuSubContent, CommandItem, DropdownMenuItem, DropdownMenuShortcut, Popover, PopoverTrigger, PopoverContent, CommandList as CommandList$1, CommandEmpty as CommandEmpty$1, cn, Table, TableHeader, TableHead, TableBody } from './chunk-545ZTT4L.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { memo, useCallback, useState, useRef, createContext, useEffect, useLayoutEffect, Suspense, Fragment as Fragment$1, useMemo, useContext } from 'react';
|
|
4
4
|
import clsx8 from 'clsx';
|
|
@@ -9008,6 +9008,7 @@ function useKeyEffect(callback, keys) {
|
|
|
9008
9008
|
}
|
|
9009
9009
|
}, [KEYS, callback, keys]);
|
|
9010
9010
|
}
|
|
9011
|
+
var isTauri6 = typeof window !== "undefined" && !!window.__TAURI__;
|
|
9011
9012
|
var WorkspaceLogo = ({ className }) => /* @__PURE__ */ jsxs(
|
|
9012
9013
|
"svg",
|
|
9013
9014
|
{
|
|
@@ -9061,11 +9062,14 @@ function SelectWorkspace({ workspaces, setWorkspace }) {
|
|
|
9061
9062
|
/* @__PURE__ */ jsx(EmptyTitle, { className: clsx8(isSmallHeight && "text-base"), children: "No Workspaces Yet" }),
|
|
9062
9063
|
!isSmallHeight && /* @__PURE__ */ jsx(EmptyDescription, { children: "You haven't created any workspaces yet. Get started by creating your first workspace." })
|
|
9063
9064
|
] }),
|
|
9064
|
-
/* @__PURE__ */ jsx(
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9065
|
+
/* @__PURE__ */ jsx(Button, { variant: "link", asChild: true, className: "text-muted-foreground", size: "sm", children: /* @__PURE__ */ jsxs("a", { onClick: (e) => {
|
|
9066
|
+
e.preventDefault();
|
|
9067
|
+
if (isTauri6) {
|
|
9068
|
+
openUrl("https://openchad.github.io/docs/customization/custom-app.html");
|
|
9069
|
+
} else {
|
|
9070
|
+
window.open("https://openchad.github.io/docs/customization/custom-app.html", "_blank");
|
|
9071
|
+
}
|
|
9072
|
+
}, href: "#", children: [
|
|
9069
9073
|
"Learn More ",
|
|
9070
9074
|
/* @__PURE__ */ jsx(ArrowUpRightIcon, { className: "w-4 h-4 ml-1" })
|
|
9071
9075
|
] }) })
|
|
@@ -9274,7 +9278,7 @@ function AppLoading({ status }) {
|
|
|
9274
9278
|
} }) })
|
|
9275
9279
|
] });
|
|
9276
9280
|
}
|
|
9277
|
-
var
|
|
9281
|
+
var isTauri7 = typeof window !== "undefined" && !!window.__TAURI__;
|
|
9278
9282
|
var folders = proxy({});
|
|
9279
9283
|
function useFolderImplBase(path, options = {}) {
|
|
9280
9284
|
const { baseDir = "." } = options;
|
|
@@ -9376,7 +9380,7 @@ function useFolderImplBase(path, options = {}) {
|
|
|
9376
9380
|
}
|
|
9377
9381
|
};
|
|
9378
9382
|
const addListener = async (evtName) => {
|
|
9379
|
-
if (
|
|
9383
|
+
if (isTauri7) {
|
|
9380
9384
|
const { listen } = await import('@tauri-apps/api/event');
|
|
9381
9385
|
tauriUnlisten = await listen(
|
|
9382
9386
|
sanitizeTauriEvent(evtName),
|
|
@@ -9418,7 +9422,7 @@ function useFolderImplBase(path, options = {}) {
|
|
|
9418
9422
|
}
|
|
9419
9423
|
return () => {
|
|
9420
9424
|
if (isStreamReady) {
|
|
9421
|
-
if (
|
|
9425
|
+
if (isTauri7) {
|
|
9422
9426
|
tauriUnlisten?.();
|
|
9423
9427
|
} else if (eventName) {
|
|
9424
9428
|
window.removeEventListener(eventName, handleFolderChangeWS);
|
|
@@ -9459,7 +9463,7 @@ function useGlobal2(tb, options) {
|
|
|
9459
9463
|
return typeof options?.initialValue === "undefined" ? useGlobal(tb) : useGlobal(tb, options.initialValue);
|
|
9460
9464
|
}
|
|
9461
9465
|
|
|
9462
|
-
// ../node_modules
|
|
9466
|
+
// ../node_modules/vite-plugin-splash-screen/dist/runtime/runtime.mjs
|
|
9463
9467
|
var vpss = window.__VPSS__ || {};
|
|
9464
9468
|
async function hideSplashScreen() {
|
|
9465
9469
|
if (vpss.hidden)
|
|
@@ -9474,7 +9478,7 @@ async function hideSplashScreen() {
|
|
|
9474
9478
|
}
|
|
9475
9479
|
await vpss.hide?.();
|
|
9476
9480
|
}
|
|
9477
|
-
var
|
|
9481
|
+
var isTauri8 = typeof window !== "undefined" && !!window.__TAURI__;
|
|
9478
9482
|
if (typeof window !== "undefined") {
|
|
9479
9483
|
window.React = React__default;
|
|
9480
9484
|
window.ReactDOM = ReactDOM;
|
|
@@ -10019,7 +10023,7 @@ function Container({ Apps: Apps2 }) {
|
|
|
10019
10023
|
);
|
|
10020
10024
|
}
|
|
10021
10025
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
10022
|
-
|
|
10026
|
+
isTauri8 && /* @__PURE__ */ jsx("div", { "data-tauri-drag-region": true, className: "absolute top-0 w-full h-[2.5vh] left-0 bg-transparent", style: { zIndex: 10 } }),
|
|
10023
10027
|
/* @__PURE__ */ jsx(
|
|
10024
10028
|
"div",
|
|
10025
10029
|
{
|
|
@@ -10112,7 +10116,7 @@ function Container({ Apps: Apps2 }) {
|
|
|
10112
10116
|
children: [
|
|
10113
10117
|
/* @__PURE__ */ jsx("div", { className: clsx8(
|
|
10114
10118
|
"w-full overflow-hidden",
|
|
10115
|
-
|
|
10119
|
+
isTauri8 && "pt-1.5",
|
|
10116
10120
|
"h-[calc(100%-50px)] md:h-full"
|
|
10117
10121
|
), children: /* @__PURE__ */ jsxs(
|
|
10118
10122
|
"div",
|
|
@@ -10134,7 +10138,7 @@ function Container({ Apps: Apps2 }) {
|
|
|
10134
10138
|
"relative overflow-hidden",
|
|
10135
10139
|
"flex-1"
|
|
10136
10140
|
), children: Object.keys(snaptabs).length > 0 && /* @__PURE__ */ jsx(MultiView, { actives, className: "relative top-0 left-0 bg-neutral-300 dark:bg-[hsl(var(--float))]", layout, children: Object.keys(tabs).map((key, index) => /* @__PURE__ */ jsx(TabItem, { isOpened: actives.includes(index), children: tabs[key] }, key)) }) }),
|
|
10137
|
-
|
|
10141
|
+
isTauri8 && /* @__PURE__ */ jsx("div", { className: clsx8("absolute z-10 top-[-0.2px]", currentLayout === "rightToLeft" ? "left-0" : "right-0"), children: /* @__PURE__ */ jsx(Topbar, { reverse: currentLayout === "rightToLeft", Elements: [
|
|
10138
10142
|
currentLayout === "rightToLeft" ? /* @__PURE__ */ jsx(
|
|
10139
10143
|
"button",
|
|
10140
10144
|
{
|
|
@@ -10367,7 +10371,7 @@ function Container({ Apps: Apps2 }) {
|
|
|
10367
10371
|
children: null,
|
|
10368
10372
|
separator: false,
|
|
10369
10373
|
trigger: () => {
|
|
10370
|
-
if (
|
|
10374
|
+
if (isTauri8) {
|
|
10371
10375
|
openUrl("https://github.com/openchad/openchad");
|
|
10372
10376
|
} else {
|
|
10373
10377
|
window.open("https://github.com/openchad/openchad", "_blank");
|
|
@@ -10391,7 +10395,7 @@ function Container({ Apps: Apps2 }) {
|
|
|
10391
10395
|
children: null,
|
|
10392
10396
|
separator: false,
|
|
10393
10397
|
trigger: () => {
|
|
10394
|
-
if (
|
|
10398
|
+
if (isTauri8) {
|
|
10395
10399
|
openUrl("https://discord.gg/JWeqhecqBD");
|
|
10396
10400
|
} else {
|
|
10397
10401
|
window.open("https://discord.gg/JWeqhecqBD", "_blank");
|